act-plus 1.1.75 → 1.1.76

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/act-plus.umd.cjs CHANGED
@@ -1,86 +1,86 @@
1
- (function(Zt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("vue-router"),require("element-plus"),require("tinymce/tinymce"),require("tinymce/icons/default/icons"),require("tinymce/models/dom"),require("tinymce/themes/silver"),require("tinymce/plugins/image"),require("tinymce/plugins/table"),require("tinymce/plugins/lists"),require("tinymce/plugins/wordcount"),require("tinymce/plugins/preview"),require("tinymce/plugins/emoticons"),require("tinymce/plugins/emoticons/js/emojis.js"),require("tinymce/plugins/code"),require("tinymce/plugins/link"),require("tinymce/plugins/advlist"),require("tinymce/plugins/codesample"),require("tinymce/plugins/autoresize"),require("tinymce/plugins/quickbars"),require("tinymce/plugins/nonbreaking"),require("tinymce/plugins/searchreplace"),require("tinymce/plugins/autolink"),require("tinymce/plugins/directionality"),require("tinymce/plugins/visualblocks"),require("tinymce/plugins/visualchars"),require("tinymce/plugins/charmap"),require("tinymce/plugins/insertdatetime"),require("tinymce/plugins/importcss"),require("tinymce/plugins/accordion"),require("tinymce/plugins/anchor"),require("tinymce/plugins/fullscreen")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","element-plus","tinymce/tinymce","tinymce/icons/default/icons","tinymce/models/dom","tinymce/themes/silver","tinymce/plugins/image","tinymce/plugins/table","tinymce/plugins/lists","tinymce/plugins/wordcount","tinymce/plugins/preview","tinymce/plugins/emoticons","tinymce/plugins/emoticons/js/emojis.js","tinymce/plugins/code","tinymce/plugins/link","tinymce/plugins/advlist","tinymce/plugins/codesample","tinymce/plugins/autoresize","tinymce/plugins/quickbars","tinymce/plugins/nonbreaking","tinymce/plugins/searchreplace","tinymce/plugins/autolink","tinymce/plugins/directionality","tinymce/plugins/visualblocks","tinymce/plugins/visualchars","tinymce/plugins/charmap","tinymce/plugins/insertdatetime","tinymce/plugins/importcss","tinymce/plugins/accordion","tinymce/plugins/anchor","tinymce/plugins/fullscreen"],l):(Zt=typeof globalThis<"u"?globalThis:Zt||self,l(Zt["act-plus"]={},Zt.Vue,Zt.VueRouter,Zt.elementPlus,Zt.tinymce))})(this,function(Zt,l,rn,Ne,cr){"use strict";const pT="";/*!
1
+ (function(vt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("vue-router"),require("element-plus"),require("tinymce/tinymce"),require("tinymce/icons/default/icons"),require("tinymce/models/dom"),require("tinymce/themes/silver"),require("tinymce/plugins/image"),require("tinymce/plugins/table"),require("tinymce/plugins/lists"),require("tinymce/plugins/wordcount"),require("tinymce/plugins/preview"),require("tinymce/plugins/emoticons"),require("tinymce/plugins/emoticons/js/emojis.js"),require("tinymce/plugins/code"),require("tinymce/plugins/link"),require("tinymce/plugins/advlist"),require("tinymce/plugins/codesample"),require("tinymce/plugins/autoresize"),require("tinymce/plugins/quickbars"),require("tinymce/plugins/nonbreaking"),require("tinymce/plugins/searchreplace"),require("tinymce/plugins/autolink"),require("tinymce/plugins/directionality"),require("tinymce/plugins/visualblocks"),require("tinymce/plugins/visualchars"),require("tinymce/plugins/charmap"),require("tinymce/plugins/insertdatetime"),require("tinymce/plugins/importcss"),require("tinymce/plugins/accordion"),require("tinymce/plugins/anchor"),require("tinymce/plugins/fullscreen")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","element-plus","tinymce/tinymce","tinymce/icons/default/icons","tinymce/models/dom","tinymce/themes/silver","tinymce/plugins/image","tinymce/plugins/table","tinymce/plugins/lists","tinymce/plugins/wordcount","tinymce/plugins/preview","tinymce/plugins/emoticons","tinymce/plugins/emoticons/js/emojis.js","tinymce/plugins/code","tinymce/plugins/link","tinymce/plugins/advlist","tinymce/plugins/codesample","tinymce/plugins/autoresize","tinymce/plugins/quickbars","tinymce/plugins/nonbreaking","tinymce/plugins/searchreplace","tinymce/plugins/autolink","tinymce/plugins/directionality","tinymce/plugins/visualblocks","tinymce/plugins/visualchars","tinymce/plugins/charmap","tinymce/plugins/insertdatetime","tinymce/plugins/importcss","tinymce/plugins/accordion","tinymce/plugins/anchor","tinymce/plugins/fullscreen"],l):(vt=typeof globalThis<"u"?globalThis:vt||self,l(vt["act-plus"]={},vt.Vue,vt.VueRouter,vt.elementPlus,vt.tinymce))})(this,function(vt,l,rn,Ne,hr){"use strict";const gT="";/*!
2
2
  * shared v10.0.5
3
3
  * (c) 2024 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
- */const zt=typeof window<"u";let Lt,on;if(process.env.NODE_ENV!=="production"){const i=zt&&window.performance;i&&i.mark&&i.measure&&i.clearMarks&&i.clearMeasures&&(Lt=e=>{i.mark(e)},on=(e,t,n)=>{i.measure(e,t,n),i.clearMarks(t),i.clearMarks(n)})}const HO=/\{([0-9a-zA-Z]+)\}/g;function hr(i,...e){return e.length===1&&Ce(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),i.replace(HO,(t,n)=>e.hasOwnProperty(n)?e[n]:"")}const oi=(i,e=!1)=>e?Symbol.for(i):Symbol(i),KO=(i,e,t)=>JO({l:i,k:e,s:t}),JO=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ze=i=>typeof i=="number"&&isFinite(i),e_=i=>il(i)==="[object Date]",An=i=>il(i)==="[object RegExp]",ur=i=>ke(i)&&Object.keys(i).length===0,it=Object.assign,t_=Object.create,Ve=(i=null)=>t_(i);let mh;const ln=()=>mh||(mh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ve());function gh(i){return i.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const i_=Object.prototype.hasOwnProperty;function Gt(i,e){return i_.call(i,e)}const Xe=Array.isArray,Le=i=>typeof i=="function",ne=i=>typeof i=="string",Pe=i=>typeof i=="boolean",Ce=i=>i!==null&&typeof i=="object",n_=i=>Ce(i)&&Le(i.then)&&Le(i.catch),Oh=Object.prototype.toString,il=i=>Oh.call(i),ke=i=>il(i)==="[object Object]",s_=i=>i==null?"":Xe(i)||ke(i)&&i.toString===Oh?JSON.stringify(i,null,2):String(i);function nl(i,e=""){return i.reduce((t,n,s)=>s===0?t+n:t+e+n,"")}const _h=2;function r_(i,e=0,t=i.length){const n=i.split(/\r?\n/);let s=0;const r=[];for(let o=0;o<n.length;o++)if(s+=n[o].length+1,s>=e){for(let a=o-_h;a<=o+_h||t>s;a++){if(a<0||a>=n.length)continue;const c=a+1;r.push(`${c}${" ".repeat(3-String(c).length)}| ${n[a]}`);const h=n[a].length;if(a===o){const u=e-(s-h)+1,f=Math.max(1,t>s?h-u:t-e);r.push(" | "+" ".repeat(u)+"^".repeat(f))}else if(a>o){if(t>s){const u=Math.max(Math.min(t-s,h),1);r.push(" | "+"^".repeat(u))}s+=h+1}}break}return r.join(`
6
- `)}function Di(i,e){typeof console<"u"&&(console.warn("[intlify] "+i),e&&console.warn(e.stack))}const bh={};function yh(i){bh[i]||(bh[i]=!0,Di(i))}function sl(){const i=new Map;return{events:i,on(t,n){const s=i.get(t);s&&s.push(n)||i.set(t,[n])},off(t,n){const s=i.get(t);s&&s.splice(s.indexOf(n)>>>0,1)},emit(t,n){(i.get(t)||[]).slice().map(s=>s(n)),(i.get("*")||[]).slice().map(s=>s(t,n))}}}const fr=i=>!Ce(i)||Xe(i);function dr(i,e){if(fr(i)||fr(e))throw new Error("Invalid value");const t=[{src:i,des:e}];for(;t.length;){const{src:n,des:s}=t.pop();Object.keys(n).forEach(r=>{r!=="__proto__"&&(Ce(n[r])&&!Ce(s[r])&&(s[r]=Array.isArray(n[r])?[]:Ve()),fr(s[r])||fr(n[r])?s[r]=n[r]:t.push({src:n[r],des:s[r]}))})}}/*!
5
+ */const Yt=typeof window<"u";let Rt,on;if(process.env.NODE_ENV!=="production"){const i=Yt&&window.performance;i&&i.mark&&i.measure&&i.clearMarks&&i.clearMeasures&&(Rt=e=>{i.mark(e)},on=(e,t,n)=>{i.measure(e,t,n),i.clearMarks(t),i.clearMarks(n)})}const KO=/\{([0-9a-zA-Z]+)\}/g;function ur(i,...e){return e.length===1&&Ce(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),i.replace(KO,(t,n)=>e.hasOwnProperty(n)?e[n]:"")}const si=(i,e=!1)=>e?Symbol.for(i):Symbol(i),JO=(i,e,t)=>e_({l:i,k:e,s:t}),e_=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ye=i=>typeof i=="number"&&isFinite(i),t_=i=>sl(i)==="[object Date]",An=i=>sl(i)==="[object RegExp]",fr=i=>ke(i)&&Object.keys(i).length===0,tt=Object.assign,i_=Object.create,Ve=(i=null)=>i_(i);let gh;const ln=()=>gh||(gh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ve());function Oh(i){return i.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const n_=Object.prototype.hasOwnProperty;function zt(i,e){return n_.call(i,e)}const We=Array.isArray,Le=i=>typeof i=="function",ne=i=>typeof i=="string",Te=i=>typeof i=="boolean",Ce=i=>i!==null&&typeof i=="object",s_=i=>Ce(i)&&Le(i.then)&&Le(i.catch),_h=Object.prototype.toString,sl=i=>_h.call(i),ke=i=>sl(i)==="[object Object]",r_=i=>i==null?"":We(i)||ke(i)&&i.toString===_h?JSON.stringify(i,null,2):String(i);function rl(i,e=""){return i.reduce((t,n,s)=>s===0?t+n:t+e+n,"")}const bh=2;function o_(i,e=0,t=i.length){const n=i.split(/\r?\n/);let s=0;const r=[];for(let o=0;o<n.length;o++)if(s+=n[o].length+1,s>=e){for(let a=o-bh;a<=o+bh||t>s;a++){if(a<0||a>=n.length)continue;const c=a+1;r.push(`${c}${" ".repeat(3-String(c).length)}| ${n[a]}`);const h=n[a].length;if(a===o){const u=e-(s-h)+1,f=Math.max(1,t>s?h-u:t-e);r.push(" | "+" ".repeat(u)+"^".repeat(f))}else if(a>o){if(t>s){const u=Math.max(Math.min(t-s,h),1);r.push(" | "+"^".repeat(u))}s+=h+1}}break}return r.join(`
6
+ `)}function Bi(i,e){typeof console<"u"&&(console.warn("[intlify] "+i),e&&console.warn(e.stack))}const yh={};function wh(i){yh[i]||(yh[i]=!0,Bi(i))}function ol(){const i=new Map;return{events:i,on(t,n){const s=i.get(t);s&&s.push(n)||i.set(t,[n])},off(t,n){const s=i.get(t);s&&s.splice(s.indexOf(n)>>>0,1)},emit(t,n){(i.get(t)||[]).slice().map(s=>s(n)),(i.get("*")||[]).slice().map(s=>s(t,n))}}}const dr=i=>!Ce(i)||We(i);function pr(i,e){if(dr(i)||dr(e))throw new Error("Invalid value");const t=[{src:i,des:e}];for(;t.length;){const{src:n,des:s}=t.pop();Object.keys(n).forEach(r=>{r!=="__proto__"&&(Ce(n[r])&&!Ce(s[r])&&(s[r]=Array.isArray(n[r])?[]:Ve()),dr(s[r])||dr(n[r])?s[r]=n[r]:t.push({src:n[r],des:s[r]}))})}}/*!
7
7
  * message-compiler v10.0.5
8
8
  * (c) 2024 kazuya kawaguchi
9
9
  * Released under the MIT License.
10
- */function o_(i,e,t){return{line:i,column:e,offset:t}}function rl(i,e,t){const n={start:i,end:e};return t!=null&&(n.source=t),n}const be={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},l_=17,a_={[be.EXPECTED_TOKEN]:"Expected token: '{0}'",[be.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[be.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[be.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[be.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[be.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[be.EMPTY_PLACEHOLDER]:"Empty placeholder",[be.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[be.INVALID_LINKED_FORMAT]:"Invalid linked format",[be.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[be.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[be.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[be.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[be.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[be.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Qn(i,e,t={}){const{domain:n,messages:s,args:r}=t,o=process.env.NODE_ENV!=="production"?hr((s||a_)[i]||"",...r||[]):i,a=new SyntaxError(String(o));return a.code=i,e&&(a.location=e),a.domain=n,a}function c_(i){throw i}const h_=/<\/?[\w\s="/.':;#-\/]+>/,u_=i=>h_.test(i),Ai=" ",f_="\r",yt=`
11
- `,d_=String.fromCharCode(8232),p_=String.fromCharCode(8233);function m_(i){const e=i;let t=0,n=1,s=1,r=0;const o=C=>e[C]===f_&&e[C+1]===yt,a=C=>e[C]===yt,c=C=>e[C]===p_,h=C=>e[C]===d_,u=C=>o(C)||a(C)||c(C)||h(C),f=()=>t,d=()=>n,m=()=>s,b=()=>r,w=C=>o(C)||c(C)||h(C)?yt:e[C],g=()=>w(t),p=()=>w(t+r);function O(){return r=0,u(t)&&(n++,s=0),o(t)&&t++,t++,s++,e[t]}function S(){return o(t+r)&&r++,r++,e[t+r]}function y(){t=0,n=1,s=1,r=0}function Q(C=0){r=C}function k(){const C=t+r;for(;C!==t;)O();r=0}return{index:f,line:d,column:m,peekOffset:b,charAt:w,currentChar:g,currentPeek:p,next:O,peek:S,reset:y,resetPeek:Q,skipToPeek:k}}const vi=void 0,g_=".",wh="'",O_="tokenizer";function __(i,e={}){const t=e.location!==!1,n=m_(i),s=()=>n.index(),r=()=>o_(n.line(),n.column(),n.index()),o=r(),a=s(),c={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},h=()=>c,{onError:u}=e;function f(R,P,X,...Y){const Re=h();if(P.column+=X,P.offset+=X,u){const qe=t?rl(Re.startLoc,P):null,Qe=Qn(R,qe,{domain:O_,args:Y});u(Qe)}}function d(R,P,X){R.endLoc=r(),R.currentType=P;const Y={type:P};return t&&(Y.loc=rl(R.startLoc,R.endLoc)),X!=null&&(Y.value=X),Y}const m=R=>d(R,13);function b(R,P){return R.currentChar()===P?(R.next(),P):(f(be.EXPECTED_TOKEN,r(),0,P),"")}function w(R){let P="";for(;R.currentPeek()===Ai||R.currentPeek()===yt;)P+=R.currentPeek(),R.peek();return P}function g(R){const P=w(R);return R.skipToPeek(),P}function p(R){if(R===vi)return!1;const P=R.charCodeAt(0);return P>=97&&P<=122||P>=65&&P<=90||P===95}function O(R){if(R===vi)return!1;const P=R.charCodeAt(0);return P>=48&&P<=57}function S(R,P){const{currentType:X}=P;if(X!==2)return!1;w(R);const Y=p(R.currentPeek());return R.resetPeek(),Y}function y(R,P){const{currentType:X}=P;if(X!==2)return!1;w(R);const Y=R.currentPeek()==="-"?R.peek():R.currentPeek(),Re=O(Y);return R.resetPeek(),Re}function Q(R,P){const{currentType:X}=P;if(X!==2)return!1;w(R);const Y=R.currentPeek()===wh;return R.resetPeek(),Y}function k(R,P){const{currentType:X}=P;if(X!==7)return!1;w(R);const Y=R.currentPeek()===".";return R.resetPeek(),Y}function C(R,P){const{currentType:X}=P;if(X!==8)return!1;w(R);const Y=p(R.currentPeek());return R.resetPeek(),Y}function T(R,P){const{currentType:X}=P;if(!(X===7||X===11))return!1;w(R);const Y=R.currentPeek()===":";return R.resetPeek(),Y}function N(R,P){const{currentType:X}=P;if(X!==9)return!1;const Y=()=>{const qe=R.currentPeek();return qe==="{"?p(R.peek()):qe==="@"||qe==="|"||qe===":"||qe==="."||qe===Ai||!qe?!1:qe===yt?(R.peek(),Y()):A(R,!1)},Re=Y();return R.resetPeek(),Re}function _(R){w(R);const P=R.currentPeek()==="|";return R.resetPeek(),P}function A(R,P=!0){const X=(Re=!1,qe="")=>{const Qe=R.currentPeek();return Qe==="{"||Qe==="@"||!Qe?Re:Qe==="|"?!(qe===Ai||qe===yt):Qe===Ai?(R.peek(),X(!0,Ai)):Qe===yt?(R.peek(),X(!0,yt)):!0},Y=X();return P&&R.resetPeek(),Y}function x(R,P){const X=R.currentChar();return X===vi?vi:P(X)?(R.next(),X):null}function M(R){const P=R.charCodeAt(0);return P>=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===95||P===36}function E(R){return x(R,M)}function I(R){const P=R.charCodeAt(0);return P>=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===95||P===36||P===45}function B(R){return x(R,I)}function U(R){const P=R.charCodeAt(0);return P>=48&&P<=57}function Z(R){return x(R,U)}function K(R){const P=R.charCodeAt(0);return P>=48&&P<=57||P>=65&&P<=70||P>=97&&P<=102}function W(R){return x(R,K)}function J(R){let P="",X="";for(;P=Z(R);)X+=P;return X}function fe(R){let P="";for(;;){const X=R.currentChar();if(X==="{"||X==="}"||X==="@"||X==="|"||!X)break;if(X===Ai||X===yt)if(A(R))P+=X,R.next();else{if(_(R))break;P+=X,R.next()}else P+=X,R.next()}return P}function ce(R){g(R);let P="",X="";for(;P=B(R);)X+=P;return R.currentChar()===vi&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),X}function ye(R){g(R);let P="";return R.currentChar()==="-"?(R.next(),P+=`-${J(R)}`):P+=J(R),R.currentChar()===vi&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),P}function G(R){return R!==wh&&R!==yt}function D(R){g(R),b(R,"'");let P="",X="";for(;P=x(R,G);)P==="\\"?X+=V(R):X+=P;const Y=R.currentChar();return Y===yt||Y===vi?(f(be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),Y===yt&&(R.next(),b(R,"'")),X):(b(R,"'"),X)}function V(R){const P=R.currentChar();switch(P){case"\\":case"'":return R.next(),`\\${P}`;case"u":return q(R,P,4);case"U":return q(R,P,6);default:return f(be.UNKNOWN_ESCAPE_SEQUENCE,r(),0,P),""}}function q(R,P,X){b(R,P);let Y="";for(let Re=0;Re<X;Re++){const qe=W(R);if(!qe){f(be.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${P}${Y}${R.currentChar()}`);break}Y+=qe}return`\\${P}${Y}`}function H(R){return R!=="{"&&R!=="}"&&R!==Ai&&R!==yt}function Fe(R){g(R);let P="",X="";for(;P=x(R,H);)X+=P;return X}function Yt(R){let P="",X="";for(;P=E(R);)X+=P;return X}function Ee(R){const P=X=>{const Y=R.currentChar();return Y==="{"||Y==="@"||Y==="|"||Y==="("||Y===")"||!Y||Y===Ai?X:(X+=Y,R.next(),P(X))};return P("")}function We(R){g(R);const P=b(R,"|");return g(R),P}function Li(R,P){let X=null;switch(R.currentChar()){case"{":return P.braceNest>=1&&f(be.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),R.next(),X=d(P,2,"{"),g(R),P.braceNest++,X;case"}":return P.braceNest>0&&P.currentType===2&&f(be.EMPTY_PLACEHOLDER,r(),0),R.next(),X=d(P,3,"}"),P.braceNest--,P.braceNest>0&&g(R),P.inLinked&&P.braceNest===0&&(P.inLinked=!1),X;case"@":return P.braceNest>0&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),X=ii(R,P)||m(P),P.braceNest=0,X;default:{let Re=!0,qe=!0,Qe=!0;if(_(R))return P.braceNest>0&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),X=d(P,1,We(R)),P.braceNest=0,P.inLinked=!1,X;if(P.braceNest>0&&(P.currentType===4||P.currentType===5||P.currentType===6))return f(be.UNTERMINATED_CLOSING_BRACE,r(),0),P.braceNest=0,Si(R,P);if(Re=S(R,P))return X=d(P,4,ce(R)),g(R),X;if(qe=y(R,P))return X=d(P,5,ye(R)),g(R),X;if(Qe=Q(R,P))return X=d(P,6,D(R)),g(R),X;if(!Re&&!qe&&!Qe)return X=d(P,12,Fe(R)),f(be.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,X.value),g(R),X;break}}return X}function ii(R,P){const{currentType:X}=P;let Y=null;const Re=R.currentChar();switch((X===7||X===8||X===11||X===9)&&(Re===yt||Re===Ai)&&f(be.INVALID_LINKED_FORMAT,r(),0),Re){case"@":return R.next(),Y=d(P,7,"@"),P.inLinked=!0,Y;case".":return g(R),R.next(),d(P,8,".");case":":return g(R),R.next(),d(P,9,":");default:return _(R)?(Y=d(P,1,We(R)),P.braceNest=0,P.inLinked=!1,Y):k(R,P)||T(R,P)?(g(R),ii(R,P)):C(R,P)?(g(R),d(P,11,Yt(R))):N(R,P)?(g(R),Re==="{"?Li(R,P)||Y:d(P,10,Ee(R))):(X===7&&f(be.INVALID_LINKED_FORMAT,r(),0),P.braceNest=0,P.inLinked=!1,Si(R,P))}}function Si(R,P){let X={type:13};if(P.braceNest>0)return Li(R,P)||m(P);if(P.inLinked)return ii(R,P)||m(P);switch(R.currentChar()){case"{":return Li(R,P)||m(P);case"}":return f(be.UNBALANCED_CLOSING_BRACE,r(),0),R.next(),d(P,3,"}");case"@":return ii(R,P)||m(P);default:{if(_(R))return X=d(P,1,We(R)),P.braceNest=0,P.inLinked=!1,X;if(A(R))return d(P,0,fe(R));break}}return X}function Ze(){const{currentType:R,offset:P,startLoc:X,endLoc:Y}=c;return c.lastType=R,c.lastOffset=P,c.lastStartLoc=X,c.lastEndLoc=Y,c.offset=s(),c.startLoc=r(),n.currentChar()===vi?d(c,13):Si(n,c)}return{nextToken:Ze,currentOffset:s,currentPosition:r,context:h}}const b_="parser",y_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function w_(i,e,t){switch(i){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(e||t,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function k_(i={}){const e=i.location!==!1,{onError:t}=i;function n(p,O,S,y,...Q){const k=p.currentPosition();if(k.offset+=y,k.column+=y,t){const C=e?rl(S,k):null,T=Qn(O,C,{domain:b_,args:Q});t(T)}}function s(p,O,S){const y={type:p};return e&&(y.start=O,y.end=O,y.loc={start:S,end:S}),y}function r(p,O,S,y){e&&(p.end=O,p.loc&&(p.loc.end=S))}function o(p,O){const S=p.context(),y=s(3,S.offset,S.startLoc);return y.value=O,r(y,p.currentOffset(),p.currentPosition()),y}function a(p,O){const S=p.context(),{lastOffset:y,lastStartLoc:Q}=S,k=s(5,y,Q);return k.index=parseInt(O,10),p.nextToken(),r(k,p.currentOffset(),p.currentPosition()),k}function c(p,O){const S=p.context(),{lastOffset:y,lastStartLoc:Q}=S,k=s(4,y,Q);return k.key=O,p.nextToken(),r(k,p.currentOffset(),p.currentPosition()),k}function h(p,O){const S=p.context(),{lastOffset:y,lastStartLoc:Q}=S,k=s(9,y,Q);return k.value=O.replace(y_,w_),p.nextToken(),r(k,p.currentOffset(),p.currentPosition()),k}function u(p){const O=p.nextToken(),S=p.context(),{lastOffset:y,lastStartLoc:Q}=S,k=s(8,y,Q);return O.type!==11?(n(p,be.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),k.value="",r(k,y,Q),{nextConsumeToken:O,node:k}):(O.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,li(O)),k.value=O.value||"",r(k,p.currentOffset(),p.currentPosition()),{node:k})}function f(p,O){const S=p.context(),y=s(7,S.offset,S.startLoc);return y.value=O,r(y,p.currentOffset(),p.currentPosition()),y}function d(p){const O=p.context(),S=s(6,O.offset,O.startLoc);let y=p.nextToken();if(y.type===8){const Q=u(p);S.modifier=Q.node,y=Q.nextConsumeToken||p.nextToken()}switch(y.type!==9&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(y)),y=p.nextToken(),y.type===2&&(y=p.nextToken()),y.type){case 10:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(y)),S.key=f(p,y.value||"");break;case 4:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(y)),S.key=c(p,y.value||"");break;case 5:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(y)),S.key=a(p,y.value||"");break;case 6:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(y)),S.key=h(p,y.value||"");break;default:{n(p,be.UNEXPECTED_EMPTY_LINKED_KEY,O.lastStartLoc,0);const Q=p.context(),k=s(7,Q.offset,Q.startLoc);return k.value="",r(k,Q.offset,Q.startLoc),S.key=k,r(S,Q.offset,Q.startLoc),{nextConsumeToken:y,node:S}}}return r(S,p.currentOffset(),p.currentPosition()),{node:S}}function m(p){const O=p.context(),S=O.currentType===1?p.currentOffset():O.offset,y=O.currentType===1?O.endLoc:O.startLoc,Q=s(2,S,y);Q.items=[];let k=null;do{const N=k||p.nextToken();switch(k=null,N.type){case 0:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(N)),Q.items.push(o(p,N.value||""));break;case 5:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(N)),Q.items.push(a(p,N.value||""));break;case 4:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(N)),Q.items.push(c(p,N.value||""));break;case 6:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,li(N)),Q.items.push(h(p,N.value||""));break;case 7:{const _=d(p);Q.items.push(_.node),k=_.nextConsumeToken||null;break}}}while(O.currentType!==13&&O.currentType!==1);const C=O.currentType===1?O.lastOffset:p.currentOffset(),T=O.currentType===1?O.lastEndLoc:p.currentPosition();return r(Q,C,T),Q}function b(p,O,S,y){const Q=p.context();let k=y.items.length===0;const C=s(1,O,S);C.cases=[],C.cases.push(y);do{const T=m(p);k||(k=T.items.length===0),C.cases.push(T)}while(Q.currentType!==13);return k&&n(p,be.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),r(C,p.currentOffset(),p.currentPosition()),C}function w(p){const O=p.context(),{offset:S,startLoc:y}=O,Q=m(p);return O.currentType===13?Q:b(p,S,y,Q)}function g(p){const O=__(p,it({},i)),S=O.context(),y=s(0,S.offset,S.startLoc);return e&&y.loc&&(y.loc.source=p),y.body=w(O),i.onCacheKey&&(y.cacheKey=i.onCacheKey(p)),S.currentType!==13&&n(O,be.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,p[S.offset]||""),r(y,O.currentOffset(),O.currentPosition()),y}return{parse:g}}function li(i){if(i.type===13)return"EOF";const e=(i.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function x_(i,e={}){const t={ast:i,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function kh(i,e){for(let t=0;t<i.length;t++)ol(i[t],e)}function ol(i,e){switch(i.type){case 1:kh(i.cases,e),e.helper("plural");break;case 2:kh(i.items,e);break;case 6:{ol(i.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function S_(i,e={}){const t=x_(i);t.helper("normalize"),i.body&&ol(i.body,t);const n=t.context();i.helpers=Array.from(n.helpers)}function C_(i){const e=i.body;return e.type===2?xh(e):e.cases.forEach(t=>xh(t)),i}function xh(i){if(i.items.length===1){const e=i.items[0];(e.type===3||e.type===9)&&(i.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<i.items.length;t++){const n=i.items[t];if(!(n.type===3||n.type===9)||n.value==null)break;e.push(n.value)}if(e.length===i.items.length){i.static=nl(e);for(let t=0;t<i.items.length;t++){const n=i.items[t];(n.type===3||n.type===9)&&delete n.value}}}}const A_="minifier";function Pn(i){switch(i.t=i.type,i.type){case 0:{const e=i;Pn(e.body),e.b=e.body,delete e.body;break}case 1:{const e=i,t=e.cases;for(let n=0;n<t.length;n++)Pn(t[n]);e.c=t,delete e.cases;break}case 2:{const e=i,t=e.items;for(let n=0;n<t.length;n++)Pn(t[n]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=i;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=i;Pn(e.key),e.k=e.key,delete e.key,e.modifier&&(Pn(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=i;e.i=e.index,delete e.index;break}case 4:{const e=i;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Qn(be.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:A_,args:[i.type]})}delete i.type}const Q_="parser";function P_(i,e){const{sourceMap:t,filename:n,breakLineCode:s,needIndent:r}=e,o=e.location!==!1,a={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:s,needIndent:r,indentLevel:0};o&&i.loc&&(a.source=i.loc.source);const c=()=>a;function h(g,p){a.code+=g}function u(g,p=!0){const O=p?s:"";h(r?O+" ".repeat(g):O)}function f(g=!0){const p=++a.indentLevel;g&&u(p)}function d(g=!0){const p=--a.indentLevel;g&&u(p)}function m(){u(a.indentLevel)}return{context:c,push:h,indent:f,deindent:d,newline:m,helper:g=>`_${g}`,needIndent:()=>a.needIndent}}function T_(i,e){const{helper:t}=i;i.push(`${t("linked")}(`),Tn(i,e.key),e.modifier?(i.push(", "),Tn(i,e.modifier),i.push(", _type")):i.push(", undefined, _type"),i.push(")")}function E_(i,e){const{helper:t,needIndent:n}=i;i.push(`${t("normalize")}([`),i.indent(n());const s=e.items.length;for(let r=0;r<s&&(Tn(i,e.items[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}function $_(i,e){const{helper:t,needIndent:n}=i;if(e.cases.length>1){i.push(`${t("plural")}([`),i.indent(n());const s=e.cases.length;for(let r=0;r<s&&(Tn(i,e.cases[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}}function N_(i,e){e.body?Tn(i,e.body):i.push("null")}function Tn(i,e){const{helper:t}=i;switch(e.type){case 0:N_(i,e);break;case 1:$_(i,e);break;case 2:E_(i,e);break;case 6:T_(i,e);break;case 8:i.push(JSON.stringify(e.value),e);break;case 7:i.push(JSON.stringify(e.value),e);break;case 5:i.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:i.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:i.push(JSON.stringify(e.value),e);break;case 3:i.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Qn(be.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Q_,args:[e.type]})}}const R_=(i,e={})=>{const t=ne(e.mode)?e.mode:"normal",n=ne(e.filename)?e.filename:"message.intl",s=!!e.sourceMap,r=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
12
- `,o=e.needIndent?e.needIndent:t!=="arrow",a=i.helpers||[],c=P_(i,{mode:t,filename:n,sourceMap:s,breakLineCode:r,needIndent:o});c.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),a.length>0&&(c.push(`const { ${nl(a.map(f=>`${f}: _${f}`),", ")} } = ctx`),c.newline()),c.push("return "),Tn(c,i),c.deindent(o),c.push("}"),delete i.helpers;const{code:h,map:u}=c.context();return{ast:i,code:h,map:u?u.toJSON():void 0}};function V_(i,e={}){const t=it({},e),n=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=k_(t).parse(i);return n?(r&&C_(a),s&&Pn(a),{ast:a,code:""}):(S_(a,t),R_(a,t))}/*!
10
+ */function l_(i,e,t){return{line:i,column:e,offset:t}}function ll(i,e,t){const n={start:i,end:e};return t!=null&&(n.source=t),n}const be={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},a_=17,c_={[be.EXPECTED_TOKEN]:"Expected token: '{0}'",[be.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[be.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[be.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[be.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[be.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[be.EMPTY_PLACEHOLDER]:"Empty placeholder",[be.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[be.INVALID_LINKED_FORMAT]:"Invalid linked format",[be.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[be.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[be.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[be.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[be.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[be.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Qn(i,e,t={}){const{domain:n,messages:s,args:r}=t,o=process.env.NODE_ENV!=="production"?ur((s||c_)[i]||"",...r||[]):i,a=new SyntaxError(String(o));return a.code=i,e&&(a.location=e),a.domain=n,a}function h_(i){throw i}const u_=/<\/?[\w\s="/.':;#-\/]+>/,f_=i=>u_.test(i),Si=" ",d_="\r",bt=`
11
+ `,p_=String.fromCharCode(8232),m_=String.fromCharCode(8233);function g_(i){const e=i;let t=0,n=1,s=1,r=0;const o=k=>e[k]===d_&&e[k+1]===bt,a=k=>e[k]===bt,c=k=>e[k]===m_,h=k=>e[k]===p_,u=k=>o(k)||a(k)||c(k)||h(k),f=()=>t,d=()=>n,m=()=>s,b=()=>r,w=k=>o(k)||c(k)||h(k)?bt:e[k],g=()=>w(t),p=()=>w(t+r);function O(){return r=0,u(t)&&(n++,s=0),o(t)&&t++,t++,s++,e[t]}function C(){return o(t+r)&&r++,r++,e[t+r]}function y(){t=0,n=1,s=1,r=0}function E(k=0){r=k}function x(){const k=t+r;for(;k!==t;)O();r=0}return{index:f,line:d,column:m,peekOffset:b,charAt:w,currentChar:g,currentPeek:p,next:O,peek:C,reset:y,resetPeek:E,skipToPeek:x}}const Di=void 0,O_=".",kh="'",__="tokenizer";function b_(i,e={}){const t=e.location!==!1,n=g_(i),s=()=>n.index(),r=()=>l_(n.line(),n.column(),n.index()),o=r(),a=s(),c={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},h=()=>c,{onError:u}=e;function f(R,Q,W,...Y){const $e=h();if(Q.column+=W,Q.offset+=W,u){const Xe=t?ll($e.startLoc,Q):null,Qe=Qn(R,Xe,{domain:__,args:Y});u(Qe)}}function d(R,Q,W){R.endLoc=r(),R.currentType=Q;const Y={type:Q};return t&&(Y.loc=ll(R.startLoc,R.endLoc)),W!=null&&(Y.value=W),Y}const m=R=>d(R,13);function b(R,Q){return R.currentChar()===Q?(R.next(),Q):(f(be.EXPECTED_TOKEN,r(),0,Q),"")}function w(R){let Q="";for(;R.currentPeek()===Si||R.currentPeek()===bt;)Q+=R.currentPeek(),R.peek();return Q}function g(R){const Q=w(R);return R.skipToPeek(),Q}function p(R){if(R===Di)return!1;const Q=R.charCodeAt(0);return Q>=97&&Q<=122||Q>=65&&Q<=90||Q===95}function O(R){if(R===Di)return!1;const Q=R.charCodeAt(0);return Q>=48&&Q<=57}function C(R,Q){const{currentType:W}=Q;if(W!==2)return!1;w(R);const Y=p(R.currentPeek());return R.resetPeek(),Y}function y(R,Q){const{currentType:W}=Q;if(W!==2)return!1;w(R);const Y=R.currentPeek()==="-"?R.peek():R.currentPeek(),$e=O(Y);return R.resetPeek(),$e}function E(R,Q){const{currentType:W}=Q;if(W!==2)return!1;w(R);const Y=R.currentPeek()===kh;return R.resetPeek(),Y}function x(R,Q){const{currentType:W}=Q;if(W!==7)return!1;w(R);const Y=R.currentPeek()===".";return R.resetPeek(),Y}function k(R,Q){const{currentType:W}=Q;if(W!==8)return!1;w(R);const Y=p(R.currentPeek());return R.resetPeek(),Y}function P(R,Q){const{currentType:W}=Q;if(!(W===7||W===11))return!1;w(R);const Y=R.currentPeek()===":";return R.resetPeek(),Y}function N(R,Q){const{currentType:W}=Q;if(W!==9)return!1;const Y=()=>{const Xe=R.currentPeek();return Xe==="{"?p(R.peek()):Xe==="@"||Xe==="|"||Xe===":"||Xe==="."||Xe===Si||!Xe?!1:Xe===bt?(R.peek(),Y()):A(R,!1)},$e=Y();return R.resetPeek(),$e}function _(R){w(R);const Q=R.currentPeek()==="|";return R.resetPeek(),Q}function A(R,Q=!0){const W=($e=!1,Xe="")=>{const Qe=R.currentPeek();return Qe==="{"||Qe==="@"||!Qe?$e:Qe==="|"?!(Xe===Si||Xe===bt):Qe===Si?(R.peek(),W(!0,Si)):Qe===bt?(R.peek(),W(!0,bt)):!0},Y=W();return Q&&R.resetPeek(),Y}function S(R,Q){const W=R.currentChar();return W===Di?Di:Q(W)?(R.next(),W):null}function M(R){const Q=R.charCodeAt(0);return Q>=97&&Q<=122||Q>=65&&Q<=90||Q>=48&&Q<=57||Q===95||Q===36}function T(R){return S(R,M)}function I(R){const Q=R.charCodeAt(0);return Q>=97&&Q<=122||Q>=65&&Q<=90||Q>=48&&Q<=57||Q===95||Q===36||Q===45}function B(R){return S(R,I)}function U(R){const Q=R.charCodeAt(0);return Q>=48&&Q<=57}function Z(R){return S(R,U)}function K(R){const Q=R.charCodeAt(0);return Q>=48&&Q<=57||Q>=65&&Q<=70||Q>=97&&Q<=102}function X(R){return S(R,K)}function J(R){let Q="",W="";for(;Q=Z(R);)W+=Q;return W}function fe(R){let Q="";for(;;){const W=R.currentChar();if(W==="{"||W==="}"||W==="@"||W==="|"||!W)break;if(W===Si||W===bt)if(A(R))Q+=W,R.next();else{if(_(R))break;Q+=W,R.next()}else Q+=W,R.next()}return Q}function he(R){g(R);let Q="",W="";for(;Q=B(R);)W+=Q;return R.currentChar()===Di&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),W}function ye(R){g(R);let Q="";return R.currentChar()==="-"?(R.next(),Q+=`-${J(R)}`):Q+=J(R),R.currentChar()===Di&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),Q}function z(R){return R!==kh&&R!==bt}function D(R){g(R),b(R,"'");let Q="",W="";for(;Q=S(R,z);)Q==="\\"?W+=V(R):W+=Q;const Y=R.currentChar();return Y===bt||Y===Di?(f(be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),Y===bt&&(R.next(),b(R,"'")),W):(b(R,"'"),W)}function V(R){const Q=R.currentChar();switch(Q){case"\\":case"'":return R.next(),`\\${Q}`;case"u":return q(R,Q,4);case"U":return q(R,Q,6);default:return f(be.UNKNOWN_ESCAPE_SEQUENCE,r(),0,Q),""}}function q(R,Q,W){b(R,Q);let Y="";for(let $e=0;$e<W;$e++){const Xe=X(R);if(!Xe){f(be.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${Q}${Y}${R.currentChar()}`);break}Y+=Xe}return`\\${Q}${Y}`}function H(R){return R!=="{"&&R!=="}"&&R!==Si&&R!==bt}function Ue(R){g(R);let Q="",W="";for(;Q=S(R,H);)W+=Q;return W}function Ri(R){let Q="",W="";for(;Q=T(R);)W+=Q;return W}function Re(R){const Q=W=>{const Y=R.currentChar();return Y==="{"||Y==="@"||Y==="|"||Y==="("||Y===")"||!Y||Y===Si?W:(W+=Y,R.next(),Q(W))};return Q("")}function qe(R){g(R);const Q=b(R,"|");return g(R),Q}function Wt(R,Q){let W=null;switch(R.currentChar()){case"{":return Q.braceNest>=1&&f(be.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),R.next(),W=d(Q,2,"{"),g(R),Q.braceNest++,W;case"}":return Q.braceNest>0&&Q.currentType===2&&f(be.EMPTY_PLACEHOLDER,r(),0),R.next(),W=d(Q,3,"}"),Q.braceNest--,Q.braceNest>0&&g(R),Q.inLinked&&Q.braceNest===0&&(Q.inLinked=!1),W;case"@":return Q.braceNest>0&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),W=Dt(R,Q)||m(Q),Q.braceNest=0,W;default:{let $e=!0,Xe=!0,Qe=!0;if(_(R))return Q.braceNest>0&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),W=d(Q,1,qe(R)),Q.braceNest=0,Q.inLinked=!1,W;if(Q.braceNest>0&&(Q.currentType===4||Q.currentType===5||Q.currentType===6))return f(be.UNTERMINATED_CLOSING_BRACE,r(),0),Q.braceNest=0,ki(R,Q);if($e=C(R,Q))return W=d(Q,4,he(R)),g(R),W;if(Xe=y(R,Q))return W=d(Q,5,ye(R)),g(R),W;if(Qe=E(R,Q))return W=d(Q,6,D(R)),g(R),W;if(!$e&&!Xe&&!Qe)return W=d(Q,12,Ue(R)),f(be.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,W.value),g(R),W;break}}return W}function Dt(R,Q){const{currentType:W}=Q;let Y=null;const $e=R.currentChar();switch((W===7||W===8||W===11||W===9)&&($e===bt||$e===Si)&&f(be.INVALID_LINKED_FORMAT,r(),0),$e){case"@":return R.next(),Y=d(Q,7,"@"),Q.inLinked=!0,Y;case".":return g(R),R.next(),d(Q,8,".");case":":return g(R),R.next(),d(Q,9,":");default:return _(R)?(Y=d(Q,1,qe(R)),Q.braceNest=0,Q.inLinked=!1,Y):x(R,Q)||P(R,Q)?(g(R),Dt(R,Q)):k(R,Q)?(g(R),d(Q,11,Ri(R))):N(R,Q)?(g(R),$e==="{"?Wt(R,Q)||Y:d(Q,10,Re(R))):(W===7&&f(be.INVALID_LINKED_FORMAT,r(),0),Q.braceNest=0,Q.inLinked=!1,ki(R,Q))}}function ki(R,Q){let W={type:13};if(Q.braceNest>0)return Wt(R,Q)||m(Q);if(Q.inLinked)return Dt(R,Q)||m(Q);switch(R.currentChar()){case"{":return Wt(R,Q)||m(Q);case"}":return f(be.UNBALANCED_CLOSING_BRACE,r(),0),R.next(),d(Q,3,"}");case"@":return Dt(R,Q)||m(Q);default:{if(_(R))return W=d(Q,1,qe(R)),Q.braceNest=0,Q.inLinked=!1,W;if(A(R))return d(Q,0,fe(R));break}}return W}function Vi(){const{currentType:R,offset:Q,startLoc:W,endLoc:Y}=c;return c.lastType=R,c.lastOffset=Q,c.lastStartLoc=W,c.lastEndLoc=Y,c.offset=s(),c.startLoc=r(),n.currentChar()===Di?d(c,13):ki(n,c)}return{nextToken:Vi,currentOffset:s,currentPosition:r,context:h}}const y_="parser",w_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function k_(i,e,t){switch(i){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(e||t,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function x_(i={}){const e=i.location!==!1,{onError:t}=i;function n(p,O,C,y,...E){const x=p.currentPosition();if(x.offset+=y,x.column+=y,t){const k=e?ll(C,x):null,P=Qn(O,k,{domain:y_,args:E});t(P)}}function s(p,O,C){const y={type:p};return e&&(y.start=O,y.end=O,y.loc={start:C,end:C}),y}function r(p,O,C,y){e&&(p.end=O,p.loc&&(p.loc.end=C))}function o(p,O){const C=p.context(),y=s(3,C.offset,C.startLoc);return y.value=O,r(y,p.currentOffset(),p.currentPosition()),y}function a(p,O){const C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(5,y,E);return x.index=parseInt(O,10),p.nextToken(),r(x,p.currentOffset(),p.currentPosition()),x}function c(p,O){const C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(4,y,E);return x.key=O,p.nextToken(),r(x,p.currentOffset(),p.currentPosition()),x}function h(p,O){const C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(9,y,E);return x.value=O.replace(w_,k_),p.nextToken(),r(x,p.currentOffset(),p.currentPosition()),x}function u(p){const O=p.nextToken(),C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(8,y,E);return O.type!==11?(n(p,be.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),x.value="",r(x,y,E),{nextConsumeToken:O,node:x}):(O.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ri(O)),x.value=O.value||"",r(x,p.currentOffset(),p.currentPosition()),{node:x})}function f(p,O){const C=p.context(),y=s(7,C.offset,C.startLoc);return y.value=O,r(y,p.currentOffset(),p.currentPosition()),y}function d(p){const O=p.context(),C=s(6,O.offset,O.startLoc);let y=p.nextToken();if(y.type===8){const E=u(p);C.modifier=E.node,y=E.nextConsumeToken||p.nextToken()}switch(y.type!==9&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),y=p.nextToken(),y.type===2&&(y=p.nextToken()),y.type){case 10:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=f(p,y.value||"");break;case 4:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=c(p,y.value||"");break;case 5:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=a(p,y.value||"");break;case 6:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=h(p,y.value||"");break;default:{n(p,be.UNEXPECTED_EMPTY_LINKED_KEY,O.lastStartLoc,0);const E=p.context(),x=s(7,E.offset,E.startLoc);return x.value="",r(x,E.offset,E.startLoc),C.key=x,r(C,E.offset,E.startLoc),{nextConsumeToken:y,node:C}}}return r(C,p.currentOffset(),p.currentPosition()),{node:C}}function m(p){const O=p.context(),C=O.currentType===1?p.currentOffset():O.offset,y=O.currentType===1?O.endLoc:O.startLoc,E=s(2,C,y);E.items=[];let x=null;do{const N=x||p.nextToken();switch(x=null,N.type){case 0:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(o(p,N.value||""));break;case 5:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(a(p,N.value||""));break;case 4:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(c(p,N.value||""));break;case 6:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(h(p,N.value||""));break;case 7:{const _=d(p);E.items.push(_.node),x=_.nextConsumeToken||null;break}}}while(O.currentType!==13&&O.currentType!==1);const k=O.currentType===1?O.lastOffset:p.currentOffset(),P=O.currentType===1?O.lastEndLoc:p.currentPosition();return r(E,k,P),E}function b(p,O,C,y){const E=p.context();let x=y.items.length===0;const k=s(1,O,C);k.cases=[],k.cases.push(y);do{const P=m(p);x||(x=P.items.length===0),k.cases.push(P)}while(E.currentType!==13);return x&&n(p,be.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),r(k,p.currentOffset(),p.currentPosition()),k}function w(p){const O=p.context(),{offset:C,startLoc:y}=O,E=m(p);return O.currentType===13?E:b(p,C,y,E)}function g(p){const O=b_(p,tt({},i)),C=O.context(),y=s(0,C.offset,C.startLoc);return e&&y.loc&&(y.loc.source=p),y.body=w(O),i.onCacheKey&&(y.cacheKey=i.onCacheKey(p)),C.currentType!==13&&n(O,be.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,p[C.offset]||""),r(y,O.currentOffset(),O.currentPosition()),y}return{parse:g}}function ri(i){if(i.type===13)return"EOF";const e=(i.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function S_(i,e={}){const t={ast:i,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function xh(i,e){for(let t=0;t<i.length;t++)al(i[t],e)}function al(i,e){switch(i.type){case 1:xh(i.cases,e),e.helper("plural");break;case 2:xh(i.items,e);break;case 6:{al(i.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function C_(i,e={}){const t=S_(i);t.helper("normalize"),i.body&&al(i.body,t);const n=t.context();i.helpers=Array.from(n.helpers)}function A_(i){const e=i.body;return e.type===2?Sh(e):e.cases.forEach(t=>Sh(t)),i}function Sh(i){if(i.items.length===1){const e=i.items[0];(e.type===3||e.type===9)&&(i.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<i.items.length;t++){const n=i.items[t];if(!(n.type===3||n.type===9)||n.value==null)break;e.push(n.value)}if(e.length===i.items.length){i.static=rl(e);for(let t=0;t<i.items.length;t++){const n=i.items[t];(n.type===3||n.type===9)&&delete n.value}}}}const Q_="minifier";function Pn(i){switch(i.t=i.type,i.type){case 0:{const e=i;Pn(e.body),e.b=e.body,delete e.body;break}case 1:{const e=i,t=e.cases;for(let n=0;n<t.length;n++)Pn(t[n]);e.c=t,delete e.cases;break}case 2:{const e=i,t=e.items;for(let n=0;n<t.length;n++)Pn(t[n]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=i;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=i;Pn(e.key),e.k=e.key,delete e.key,e.modifier&&(Pn(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=i;e.i=e.index,delete e.index;break}case 4:{const e=i;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Qn(be.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Q_,args:[i.type]})}delete i.type}const P_="parser";function T_(i,e){const{sourceMap:t,filename:n,breakLineCode:s,needIndent:r}=e,o=e.location!==!1,a={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:s,needIndent:r,indentLevel:0};o&&i.loc&&(a.source=i.loc.source);const c=()=>a;function h(g,p){a.code+=g}function u(g,p=!0){const O=p?s:"";h(r?O+" ".repeat(g):O)}function f(g=!0){const p=++a.indentLevel;g&&u(p)}function d(g=!0){const p=--a.indentLevel;g&&u(p)}function m(){u(a.indentLevel)}return{context:c,push:h,indent:f,deindent:d,newline:m,helper:g=>`_${g}`,needIndent:()=>a.needIndent}}function E_(i,e){const{helper:t}=i;i.push(`${t("linked")}(`),Tn(i,e.key),e.modifier?(i.push(", "),Tn(i,e.modifier),i.push(", _type")):i.push(", undefined, _type"),i.push(")")}function $_(i,e){const{helper:t,needIndent:n}=i;i.push(`${t("normalize")}([`),i.indent(n());const s=e.items.length;for(let r=0;r<s&&(Tn(i,e.items[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}function N_(i,e){const{helper:t,needIndent:n}=i;if(e.cases.length>1){i.push(`${t("plural")}([`),i.indent(n());const s=e.cases.length;for(let r=0;r<s&&(Tn(i,e.cases[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}}function R_(i,e){e.body?Tn(i,e.body):i.push("null")}function Tn(i,e){const{helper:t}=i;switch(e.type){case 0:R_(i,e);break;case 1:N_(i,e);break;case 2:$_(i,e);break;case 6:E_(i,e);break;case 8:i.push(JSON.stringify(e.value),e);break;case 7:i.push(JSON.stringify(e.value),e);break;case 5:i.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:i.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:i.push(JSON.stringify(e.value),e);break;case 3:i.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Qn(be.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:P_,args:[e.type]})}}const V_=(i,e={})=>{const t=ne(e.mode)?e.mode:"normal",n=ne(e.filename)?e.filename:"message.intl",s=!!e.sourceMap,r=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
12
+ `,o=e.needIndent?e.needIndent:t!=="arrow",a=i.helpers||[],c=T_(i,{mode:t,filename:n,sourceMap:s,breakLineCode:r,needIndent:o});c.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),a.length>0&&(c.push(`const { ${rl(a.map(f=>`${f}: _${f}`),", ")} } = ctx`),c.newline()),c.push("return "),Tn(c,i),c.deindent(o),c.push("}"),delete i.helpers;const{code:h,map:u}=c.context();return{ast:i,code:h,map:u?u.toJSON():void 0}};function L_(i,e={}){const t=tt({},e),n=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=x_(t).parse(i);return n?(r&&A_(a),s&&Pn(a),{ast:a,code:""}):(C_(a,t),V_(a,t))}/*!
13
13
  * core-base v10.0.5
14
14
  * (c) 2024 kazuya kawaguchi
15
15
  * Released under the MIT License.
16
- */function L_(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ll(i){return t=>M_(t,i)}function M_(i,e){const t=D_(e);if(t==null)throw os(0);if(cl(t)===1){const r=Z_(t);return i.plural(r.reduce((o,a)=>[...o,Sh(i,a)],[]))}else return Sh(i,t)}const B_=["b","body"];function D_(i){return Zi(i,B_)}const v_=["c","cases"];function Z_(i){return Zi(i,v_,[])}function Sh(i,e){const t=U_(e);if(t!=null)return i.type==="text"?t:i.normalize([t]);{const n=j_(e).reduce((s,r)=>[...s,al(i,r)],[]);return i.normalize(n)}}const I_=["s","static"];function U_(i){return Zi(i,I_)}const F_=["i","items"];function j_(i){return Zi(i,F_,[])}function al(i,e){const t=cl(e);switch(t){case 3:return pr(e,t);case 9:return pr(e,t);case 4:{const n=e;if(Gt(n,"k")&&n.k)return i.interpolate(i.named(n.k));if(Gt(n,"key")&&n.key)return i.interpolate(i.named(n.key));throw os(t)}case 5:{const n=e;if(Gt(n,"i")&&ze(n.i))return i.interpolate(i.list(n.i));if(Gt(n,"index")&&ze(n.index))return i.interpolate(i.list(n.index));throw os(t)}case 6:{const n=e,s=Y_(n),r=G_(n);return i.linked(al(i,r),s?al(i,s):void 0,i.type)}case 7:return pr(e,t);case 8:return pr(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const q_=["t","type"];function cl(i){return Zi(i,q_)}const X_=["v","value"];function pr(i,e){const t=Zi(i,X_);if(t)return t;throw os(e)}const W_=["m","modifier"];function Y_(i){return Zi(i,W_)}const z_=["k","key"];function G_(i){const e=Zi(i,z_);if(e)return e;throw os(6)}function Zi(i,e,t){for(let n=0;n<e.length;n++){const s=e[n];if(Gt(i,s)&&i[s]!=null)return i[s]}return t}function os(i){return new Error(`unhandled node type: ${i}`)}const H_="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function K_(i,e){e&&u_(i)&&Di(hr(H_,{source:i}))}const J_=i=>i;let mr=Ve();function Ii(i){return Ce(i)&&cl(i)===0&&(Gt(i,"b")||Gt(i,"body"))}function e0(i,e={}){let t=!1;const n=e.onError||c_;return e.onError=s=>{t=!0,n(s)},{...V_(i,e),detectError:t}}function t0(i,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ne(i)){const t=Pe(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&K_(i,t);const s=(e.onCacheKey||J_)(i),r=mr[s];if(r)return r;const{ast:o,detectError:a}=e0(i,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),c=ll(o);return a?c:mr[s]=c}else{if(process.env.NODE_ENV!=="production"&&!Ii(i))return Di(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>i;const t=i.cacheKey;if(t){const n=mr[t];return n||(mr[t]=ll(i))}else return ll(i)}}let ls=null;function i0(i){ls=i}function n0(i,e,t){ls&&ls.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:e,meta:t})}const s0=r0("function:translate");function r0(i){return e=>ls&&ls.emit(i,e)}const gt={INVALID_ARGUMENT:l_,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},o0=24;function Qi(i){return Qn(i,null,process.env.NODE_ENV!=="production"?{messages:l0}:void 0)}const l0={[gt.INVALID_ARGUMENT]:"Invalid arguments",[gt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[gt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[gt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[gt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[gt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[gt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function hl(i,e){return e.locale!=null?Ch(e.locale):Ch(i.locale)}let ul;function Ch(i){if(ne(i))return i;if(Le(i)){if(i.resolvedOnce&&ul!=null)return ul;if(i.constructor.name==="Function"){const e=i();if(n_(e))throw Qi(gt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return ul=e}else throw Qi(gt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Qi(gt.NOT_SUPPORT_LOCALE_TYPE)}function a0(i,e,t){return[...new Set([t,...Xe(e)?e:Ce(e)?Object.keys(e):ne(e)?[e]:[t]])]}function Ah(i,e,t){const n=ne(t)?t:as,s=i;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(n);if(!r){r=[];let o=[t];for(;Xe(o);)o=Qh(r,o,e);const a=Xe(e)||!ke(e)?e:e.default?e.default:null;o=ne(a)?[a]:a,Xe(o)&&Qh(r,o,!1),s.__localeChainCache.set(n,r)}return r}function Qh(i,e,t){let n=!0;for(let s=0;s<e.length&&Pe(n);s++){const r=e[s];ne(r)&&(n=c0(i,e[s],t))}return n}function c0(i,e,t){let n;const s=e.split("-");do{const r=s.join("-");n=h0(i,r,t),s.splice(-1,1)}while(s.length&&n===!0);return n}function h0(i,e,t){let n=!1;if(!i.includes(e)&&(n=!0,e)){n=e[e.length-1]!=="!";const s=e.replace(/!/g,"");i.push(s),(Xe(t)||ke(t))&&t[s]&&(n=t[s])}return n}const Ui=[];Ui[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ui[1]={w:[1],".":[2],"[":[4],o:[7]},Ui[2]={w:[2],i:[3,0],0:[3,0]},Ui[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ui[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ui[5]={"'":[4,0],o:8,l:[5,0]},Ui[6]={'"':[4,0],o:8,l:[6,0]};const u0=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function f0(i){return u0.test(i)}function d0(i){const e=i.charCodeAt(0),t=i.charCodeAt(i.length-1);return e===t&&(e===34||e===39)?i.slice(1,-1):i}function p0(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 m0(i){const e=i.trim();return i.charAt(0)==="0"&&isNaN(parseInt(i))?!1:f0(e)?d0(e):"*"+e}function g0(i){const e=[];let t=-1,n=0,s=0,r,o,a,c,h,u,f;const d=[];d[0]=()=>{o===void 0?o=a:o+=a},d[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},d[2]=()=>{d[0](),s++},d[3]=()=>{if(s>0)s--,n=4,d[0]();else{if(s=0,o===void 0||(o=m0(o),o===!1))return!1;d[1]()}};function m(){const b=i[t+1];if(n===5&&b==="'"||n===6&&b==='"')return t++,a="\\"+b,d[0](),!0}for(;n!==null;)if(t++,r=i[t],!(r==="\\"&&m())){if(c=p0(r),f=Ui[n],h=f[c]||f.l||8,h===8||(n=h[0],h[1]!==void 0&&(u=d[h[1]],u&&(a=r,u()===!1))))return;if(n===7)return e}}const Ph=new Map;function O0(i,e){return Ce(i)?i[e]:null}function _0(i,e){if(!Ce(i))return null;let t=Ph.get(e);if(t||(t=g0(e),t&&Ph.set(e,t)),!t)return null;const n=t.length;let s=i,r=0;for(;r<n;){const o=s[t[r]];if(o===void 0||Le(s))return null;s=o,r++}return s}const Ct={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},b0=8,y0={[Ct.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Ct.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Ct.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Ct.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Ct.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Ct.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Ct.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 an(i,...e){return hr(y0[i],...e)}const w0="10.0.5",gr=-1,as="en-US",Or="",Th=i=>`${i.charAt(0).toLocaleUpperCase()}${i.substr(1)}`;function k0(){return{upper:(i,e)=>e==="text"&&ne(i)?i.toUpperCase():e==="vnode"&&Ce(i)&&"__v_isVNode"in i?i.children.toUpperCase():i,lower:(i,e)=>e==="text"&&ne(i)?i.toLowerCase():e==="vnode"&&Ce(i)&&"__v_isVNode"in i?i.children.toLowerCase():i,capitalize:(i,e)=>e==="text"&&ne(i)?Th(i):e==="vnode"&&Ce(i)&&"__v_isVNode"in i?Th(i.children):i}}let Eh;function x0(i){Eh=i}let $h;function S0(i){$h=i}let Nh;function C0(i){Nh=i}let Rh=null;const A0=i=>{Rh=i},Q0=()=>Rh;let Vh=null;const Lh=i=>{Vh=i},P0=()=>Vh;let Mh=0;function T0(i={}){const e=Le(i.onWarn)?i.onWarn:Di,t=ne(i.version)?i.version:w0,n=ne(i.locale)||Le(i.locale)?i.locale:as,s=Le(n)?as:n,r=Xe(i.fallbackLocale)||ke(i.fallbackLocale)||ne(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:s,o=ke(i.messages)?i.messages:fl(s),a=ke(i.datetimeFormats)?i.datetimeFormats:fl(s),c=ke(i.numberFormats)?i.numberFormats:fl(s),h=it(Ve(),i.modifiers,k0()),u=i.pluralRules||Ve(),f=Le(i.missing)?i.missing:null,d=Pe(i.missingWarn)||An(i.missingWarn)?i.missingWarn:!0,m=Pe(i.fallbackWarn)||An(i.fallbackWarn)?i.fallbackWarn:!0,b=!!i.fallbackFormat,w=!!i.unresolving,g=Le(i.postTranslation)?i.postTranslation:null,p=ke(i.processor)?i.processor:null,O=Pe(i.warnHtmlMessage)?i.warnHtmlMessage:!0,S=!!i.escapeParameter,y=Le(i.messageCompiler)?i.messageCompiler:Eh;process.env.NODE_ENV!=="production"&&Le(i.messageCompiler)&&yh(an(Ct.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const Q=Le(i.messageResolver)?i.messageResolver:$h||O0,k=Le(i.localeFallbacker)?i.localeFallbacker:Nh||a0,C=Ce(i.fallbackContext)?i.fallbackContext:void 0,T=i,N=Ce(T.__datetimeFormatters)?T.__datetimeFormatters:new Map,_=Ce(T.__numberFormatters)?T.__numberFormatters:new Map,A=Ce(T.__meta)?T.__meta:{};Mh++;const x={version:t,cid:Mh,locale:n,fallbackLocale:r,messages:o,modifiers:h,pluralRules:u,missing:f,missingWarn:d,fallbackWarn:m,fallbackFormat:b,unresolving:w,postTranslation:g,processor:p,warnHtmlMessage:O,escapeParameter:S,messageCompiler:y,messageResolver:Q,localeFallbacker:k,fallbackContext:C,onWarn:e,__meta:A};return x.datetimeFormats=a,x.numberFormats=c,x.__datetimeFormatters=N,x.__numberFormatters=_,process.env.NODE_ENV!=="production"&&(x.__v_emitter=T.__v_emitter!=null?T.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&n0(x,t,A),x}const fl=i=>({[i]:Ve()});function _r(i,e){return i instanceof RegExp?i.test(e):i}function Bh(i,e){return i instanceof RegExp?i.test(e):i}function dl(i,e,t,n,s){const{missing:r,onWarn:o}=i;if(process.env.NODE_ENV!=="production"){const a=i.__v_emitter;a&&a.emit("missing",{locale:t,key:e,type:s,groupId:`${s}:${e}`})}if(r!==null){const a=r(i,t,e,s);return ne(a)?a:e}else return process.env.NODE_ENV!=="production"&&Bh(n,e)&&o(an(Ct.NOT_FOUND_KEY,{key:e,locale:t})),e}function cs(i,e,t){const n=i;n.__localeChainCache=new Map,i.localeFallbacker(i,t,e)}function Dh(i,e){return i===e?!1:i.split("-")[0]===e.split("-")[0]}function E0(i,e){const t=e.indexOf(i);if(t===-1)return!1;for(let n=t+1;n<e.length;n++)if(Dh(i,e[n]))return!0;return!1}const vh=typeof Intl<"u",Zh={dateTimeFormat:vh&&typeof Intl.DateTimeFormat<"u",numberFormat:vh&&typeof Intl.NumberFormat<"u"};function Ih(i,...e){const{datetimeFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__datetimeFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Zh.dateTimeFormat)return r(an(Ct.CANNOT_FORMAT_DATE)),Or;const[c,h,u,f]=pl(...e),d=Pe(u.missingWarn)?u.missingWarn:i.missingWarn,m=Pe(u.fallbackWarn)?u.fallbackWarn:i.fallbackWarn,b=!!u.part,w=hl(i,u),g=o(i,s,w);if(!ne(c)||c==="")return new Intl.DateTimeFormat(w,f).format(h);let p={},O,S=null,y=w,Q=null;const k="datetime format";for(let N=0;N<g.length;N++){if(O=Q=g[N],process.env.NODE_ENV!=="production"&&w!==O&&_r(m,c)&&r(an(Ct.FALLBACK_TO_DATE_FORMAT,{key:c,target:O})),process.env.NODE_ENV!=="production"&&w!==O){const _=i.__v_emitter;_&&_.emit("fallback",{type:k,key:c,from:y,to:Q,groupId:`${k}:${c}`})}if(p=t[O]||{},S=p[c],ke(S))break;dl(i,c,O,d,k),y=Q}if(!ke(S)||!ne(O))return n?gr:c;let C=`${O}__${c}`;ur(f)||(C=`${C}__${JSON.stringify(f)}`);let T=a.get(C);return T||(T=new Intl.DateTimeFormat(O,it({},S,f)),a.set(C,T)),b?T.formatToParts(h):T.format(h)}const Uh=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function pl(...i){const[e,t,n,s]=i,r=Ve();let o=Ve(),a;if(ne(e)){const c=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw Qi(gt.INVALID_ISO_DATE_ARGUMENT);const h=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();a=new Date(h);try{a.toISOString()}catch{throw Qi(gt.INVALID_ISO_DATE_ARGUMENT)}}else if(e_(e)){if(isNaN(e.getTime()))throw Qi(gt.INVALID_DATE_ARGUMENT);a=e}else if(ze(e))a=e;else throw Qi(gt.INVALID_ARGUMENT);return ne(t)?r.key=t:ke(t)&&Object.keys(t).forEach(c=>{Uh.includes(c)?o[c]=t[c]:r[c]=t[c]}),ne(n)?r.locale=n:ke(n)&&(o=n),ke(s)&&(o=s),[r.key||"",a,r,o]}function Fh(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__datetimeFormatters.has(r)&&n.__datetimeFormatters.delete(r)}}function jh(i,...e){const{numberFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__numberFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Zh.numberFormat)return r(an(Ct.CANNOT_FORMAT_NUMBER)),Or;const[c,h,u,f]=ml(...e),d=Pe(u.missingWarn)?u.missingWarn:i.missingWarn,m=Pe(u.fallbackWarn)?u.fallbackWarn:i.fallbackWarn,b=!!u.part,w=hl(i,u),g=o(i,s,w);if(!ne(c)||c==="")return new Intl.NumberFormat(w,f).format(h);let p={},O,S=null,y=w,Q=null;const k="number format";for(let N=0;N<g.length;N++){if(O=Q=g[N],process.env.NODE_ENV!=="production"&&w!==O&&_r(m,c)&&r(an(Ct.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:O})),process.env.NODE_ENV!=="production"&&w!==O){const _=i.__v_emitter;_&&_.emit("fallback",{type:k,key:c,from:y,to:Q,groupId:`${k}:${c}`})}if(p=t[O]||{},S=p[c],ke(S))break;dl(i,c,O,d,k),y=Q}if(!ke(S)||!ne(O))return n?gr:c;let C=`${O}__${c}`;ur(f)||(C=`${C}__${JSON.stringify(f)}`);let T=a.get(C);return T||(T=new Intl.NumberFormat(O,it({},S,f)),a.set(C,T)),b?T.formatToParts(h):T.format(h)}const qh=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ml(...i){const[e,t,n,s]=i,r=Ve();let o=Ve();if(!ze(e))throw Qi(gt.INVALID_ARGUMENT);const a=e;return ne(t)?r.key=t:ke(t)&&Object.keys(t).forEach(c=>{qh.includes(c)?o[c]=t[c]:r[c]=t[c]}),ne(n)?r.locale=n:ke(n)&&(o=n),ke(s)&&(o=s),[r.key||"",a,r,o]}function Xh(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__numberFormatters.has(r)&&n.__numberFormatters.delete(r)}}const $0=i=>i,N0=i=>"",R0="text",V0=i=>i.length===0?"":nl(i),L0=s_;function Wh(i,e){return i=Math.abs(i),e===2?i?i>1?1:0:1:i?Math.min(i,2):0}function M0(i){const e=ze(i.pluralIndex)?i.pluralIndex:-1;return i.named&&(ze(i.named.count)||ze(i.named.n))?ze(i.named.count)?i.named.count:ze(i.named.n)?i.named.n:e:e}function B0(i,e){e.count||(e.count=i),e.n||(e.n=i)}function D0(i={}){const e=i.locale,t=M0(i),n=Ce(i.pluralRules)&&ne(e)&&Le(i.pluralRules[e])?i.pluralRules[e]:Wh,s=Ce(i.pluralRules)&&ne(e)&&Le(i.pluralRules[e])?Wh:void 0,r=p=>p[n(t,p.length,s)],o=i.list||[],a=p=>o[p],c=i.named||Ve();ze(i.pluralIndex)&&B0(t,c);const h=p=>c[p];function u(p,O){const S=Le(i.messages)?i.messages(p,!!O):Ce(i.messages)?i.messages[p]:!1;return S||(i.parent?i.parent.message(p):N0)}const f=p=>i.modifiers?i.modifiers[p]:$0,d=ke(i.processor)&&Le(i.processor.normalize)?i.processor.normalize:V0,m=ke(i.processor)&&Le(i.processor.interpolate)?i.processor.interpolate:L0,b=ke(i.processor)&&ne(i.processor.type)?i.processor.type:R0,g={list:a,named:h,plural:r,linked:(p,...O)=>{const[S,y]=O;let Q="text",k="";O.length===1?Ce(S)?(k=S.modifier||k,Q=S.type||Q):ne(S)&&(k=S||k):O.length===2&&(ne(S)&&(k=S||k),ne(y)&&(Q=y||Q));const C=u(p,!0)(g),T=Q==="vnode"&&Xe(C)&&k?C[0]:C;return k?f(k)(T,Q):T},message:u,type:b,interpolate:m,normalize:d,values:it(Ve(),o,c)};return g}const Yh=()=>"",It=i=>Le(i);function zh(i,...e){const{fallbackFormat:t,postTranslation:n,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=i,[c,h]=gl(...e),u=Pe(h.missingWarn)?h.missingWarn:i.missingWarn,f=Pe(h.fallbackWarn)?h.fallbackWarn:i.fallbackWarn,d=Pe(h.escapeParameter)?h.escapeParameter:i.escapeParameter,m=!!h.resolvedMessage,b=ne(h.default)||Pe(h.default)?Pe(h.default)?r?c:()=>c:h.default:t?r?c:()=>c:null,w=t||b!=null&&(ne(b)||Le(b)),g=hl(i,h);d&&v0(h);let[p,O,S]=m?[c,g,a[g]||Ve()]:Gh(i,c,g,o,f,u),y=p,Q=c;if(!m&&!(ne(y)||Ii(y)||It(y))&&w&&(y=b,Q=y),!m&&(!(ne(y)||Ii(y)||It(y))||!ne(O)))return s?gr:c;if(process.env.NODE_ENV!=="production"&&ne(y)&&i.messageCompiler==null)return Di(`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 '${c}'.`),c;let k=!1;const C=()=>{k=!0},T=It(y)?y:Hh(i,c,O,y,Q,C);if(k)return y;const N=F0(i,O,S,h),_=D0(N),A=Z0(i,T,_),x=n?n(A,c):A;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const M={timestamp:Date.now(),key:ne(c)?c:It(y)?y.key:"",locale:O||(It(y)?y.locale:""),format:ne(y)?y:It(y)?y.source:"",message:x};M.meta=it({},i.__meta,Q0()||{}),s0(M)}return x}function v0(i){Xe(i.list)?i.list=i.list.map(e=>ne(e)?gh(e):e):Ce(i.named)&&Object.keys(i.named).forEach(e=>{ne(i.named[e])&&(i.named[e]=gh(i.named[e]))})}function Gh(i,e,t,n,s,r){const{messages:o,onWarn:a,messageResolver:c,localeFallbacker:h}=i,u=h(i,n,t);let f=Ve(),d,m=null,b=t,w=null;const g="translate";for(let p=0;p<u.length;p++){if(d=w=u[p],process.env.NODE_ENV!=="production"&&t!==d&&!Dh(t,d)&&_r(s,e)&&a(an(Ct.FALLBACK_TO_TRANSLATE,{key:e,target:d})),process.env.NODE_ENV!=="production"&&t!==d){const Q=i.__v_emitter;Q&&Q.emit("fallback",{type:g,key:e,from:b,to:w,groupId:`${g}:${e}`})}f=o[d]||Ve();let O=null,S,y;if(process.env.NODE_ENV!=="production"&&zt&&(O=window.performance.now(),S="intlify-message-resolve-start",y="intlify-message-resolve-end",Lt&&Lt(S)),(m=c(f,e))===null&&(m=f[e]),process.env.NODE_ENV!=="production"&&zt){const Q=window.performance.now(),k=i.__v_emitter;k&&O&&m&&k.emit("message-resolve",{type:"message-resolve",key:e,message:m,time:Q-O,groupId:`${g}:${e}`}),S&&y&&Lt&&on&&(Lt(y),on("intlify message resolve",S,y))}if(ne(m)||Ii(m)||It(m))break;if(!E0(d,u)){const Q=dl(i,e,d,r,g);Q!==e&&(m=Q)}b=w}return[m,d,f]}function Hh(i,e,t,n,s,r){const{messageCompiler:o,warnHtmlMessage:a}=i;if(It(n)){const d=n;return d.locale=d.locale||t,d.key=d.key||e,d}if(o==null){const d=()=>n;return d.locale=t,d.key=e,d}let c=null,h,u;process.env.NODE_ENV!=="production"&&zt&&(c=window.performance.now(),h="intlify-message-compilation-start",u="intlify-message-compilation-end",Lt&&Lt(h));const f=o(n,I0(i,t,s,n,a,r));if(process.env.NODE_ENV!=="production"&&zt){const d=window.performance.now(),m=i.__v_emitter;m&&c&&m.emit("message-compilation",{type:"message-compilation",message:n,time:d-c,groupId:`translate:${e}`}),h&&u&&Lt&&on&&(Lt(u),on("intlify message compilation",h,u))}return f.locale=t,f.key=e,f.source=n,f}function Z0(i,e,t){let n=null,s,r;process.env.NODE_ENV!=="production"&&zt&&(n=window.performance.now(),s="intlify-message-evaluation-start",r="intlify-message-evaluation-end",Lt&&Lt(s));const o=e(t);if(process.env.NODE_ENV!=="production"&&zt){const a=window.performance.now(),c=i.__v_emitter;c&&n&&c.emit("message-evaluation",{type:"message-evaluation",value:o,time:a-n,groupId:`translate:${e.key}`}),s&&r&&Lt&&on&&(Lt(r),on("intlify message evaluation",s,r))}return o}function gl(...i){const[e,t,n]=i,s=Ve();if(!ne(e)&&!ze(e)&&!It(e)&&!Ii(e))throw Qi(gt.INVALID_ARGUMENT);const r=ze(e)?String(e):(It(e),e);return ze(t)?s.plural=t:ne(t)?s.default=t:ke(t)&&!ur(t)?s.named=t:Xe(t)&&(s.list=t),ze(n)?s.plural=n:ne(n)?s.default=n:ke(n)&&it(s,n),[r,s]}function I0(i,e,t,n,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{if(r&&r(o),process.env.NODE_ENV!=="production"){const a=U0(n),c=`Message compilation error: ${o.message}`,h=o.location&&a&&r_(a,o.location.start.offset,o.location.end.offset),u=i.__v_emitter;u&&a&&u.emit("compile-error",{message:a,error:o.message,start:o.location&&o.location.start.offset,end:o.location&&o.location.end.offset,groupId:`translate:${t}`}),console.error(h?`${c}
17
- ${h}`:c)}else throw o},onCacheKey:o=>KO(e,t,o)}}function U0(i){if(ne(i))return i;if(i.loc&&i.loc.source)return i.loc.source}function F0(i,e,t,n){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:c,missingWarn:h,fallbackContext:u}=i,d={locale:e,modifiers:s,pluralRules:r,messages:(m,b)=>{let w=o(t,m);if(w==null&&(u||b)){const[,,g]=Gh(u||i,m,e,a,c,h);w=o(g,m)}if(ne(w)||Ii(w)){let g=!1;const O=Hh(i,m,e,w,m,()=>{g=!0});return g?Yh:O}else return It(w)?w:Yh}};return i.processor&&(d.processor=i.processor),n.list&&(d.list=n.list),n.named&&(d.named=n.named),ze(n.plural)&&(d.pluralIndex=n.plural),d}L_();function j0(){return Kh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Kh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const q0=typeof Proxy=="function",X0="devtools-plugin:setup",W0="plugin:settings:set";let En,Ol;function Y0(){var i;return En!==void 0||(typeof window<"u"&&window.performance?(En=!0,Ol=window.performance):typeof globalThis<"u"&&(!((i=globalThis.perf_hooks)===null||i===void 0)&&i.performance)?(En=!0,Ol=globalThis.perf_hooks.performance):En=!1),En}function z0(){return Y0()?Ol.now():Date.now()}class G0{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const o in e.settings){const a=e.settings[o];n[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},n);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return z0()}},t&&t.on(W0,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(h=>{this.targetQueue.push({method:a,args:c,resolve:h})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function H0(i,e){const t=i,n=Kh(),s=j0(),r=q0&&t.enableEarlyProxy;if(s&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(X0,i,e);else{const o=r?new G0(t,s):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}/*!
16
+ */function M_(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function cl(i){return t=>B_(t,i)}function B_(i,e){const t=v_(e);if(t==null)throw ls(0);if(ul(t)===1){const r=I_(t);return i.plural(r.reduce((o,a)=>[...o,Ch(i,a)],[]))}else return Ch(i,t)}const D_=["b","body"];function v_(i){return vi(i,D_)}const Z_=["c","cases"];function I_(i){return vi(i,Z_,[])}function Ch(i,e){const t=F_(e);if(t!=null)return i.type==="text"?t:i.normalize([t]);{const n=q_(e).reduce((s,r)=>[...s,hl(i,r)],[]);return i.normalize(n)}}const U_=["s","static"];function F_(i){return vi(i,U_)}const j_=["i","items"];function q_(i){return vi(i,j_,[])}function hl(i,e){const t=ul(e);switch(t){case 3:return mr(e,t);case 9:return mr(e,t);case 4:{const n=e;if(zt(n,"k")&&n.k)return i.interpolate(i.named(n.k));if(zt(n,"key")&&n.key)return i.interpolate(i.named(n.key));throw ls(t)}case 5:{const n=e;if(zt(n,"i")&&Ye(n.i))return i.interpolate(i.list(n.i));if(zt(n,"index")&&Ye(n.index))return i.interpolate(i.list(n.index));throw ls(t)}case 6:{const n=e,s=z_(n),r=H_(n);return i.linked(hl(i,r),s?hl(i,s):void 0,i.type)}case 7:return mr(e,t);case 8:return mr(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const X_=["t","type"];function ul(i){return vi(i,X_)}const W_=["v","value"];function mr(i,e){const t=vi(i,W_);if(t)return t;throw ls(e)}const Y_=["m","modifier"];function z_(i){return vi(i,Y_)}const G_=["k","key"];function H_(i){const e=vi(i,G_);if(e)return e;throw ls(6)}function vi(i,e,t){for(let n=0;n<e.length;n++){const s=e[n];if(zt(i,s)&&i[s]!=null)return i[s]}return t}function ls(i){return new Error(`unhandled node type: ${i}`)}const K_="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function J_(i,e){e&&f_(i)&&Bi(ur(K_,{source:i}))}const e0=i=>i;let gr=Ve();function Zi(i){return Ce(i)&&ul(i)===0&&(zt(i,"b")||zt(i,"body"))}function t0(i,e={}){let t=!1;const n=e.onError||h_;return e.onError=s=>{t=!0,n(s)},{...L_(i,e),detectError:t}}function i0(i,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ne(i)){const t=Te(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&J_(i,t);const s=(e.onCacheKey||e0)(i),r=gr[s];if(r)return r;const{ast:o,detectError:a}=t0(i,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),c=cl(o);return a?c:gr[s]=c}else{if(process.env.NODE_ENV!=="production"&&!Zi(i))return Bi(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>i;const t=i.cacheKey;if(t){const n=gr[t];return n||(gr[t]=cl(i))}else return cl(i)}}let as=null;function n0(i){as=i}function s0(i,e,t){as&&as.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:e,meta:t})}const r0=o0("function:translate");function o0(i){return e=>as&&as.emit(i,e)}const mt={INVALID_ARGUMENT:a_,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},l0=24;function Ci(i){return Qn(i,null,process.env.NODE_ENV!=="production"?{messages:a0}:void 0)}const a0={[mt.INVALID_ARGUMENT]:"Invalid arguments",[mt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[mt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[mt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[mt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[mt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[mt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function fl(i,e){return e.locale!=null?Ah(e.locale):Ah(i.locale)}let dl;function Ah(i){if(ne(i))return i;if(Le(i)){if(i.resolvedOnce&&dl!=null)return dl;if(i.constructor.name==="Function"){const e=i();if(s_(e))throw Ci(mt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return dl=e}else throw Ci(mt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ci(mt.NOT_SUPPORT_LOCALE_TYPE)}function c0(i,e,t){return[...new Set([t,...We(e)?e:Ce(e)?Object.keys(e):ne(e)?[e]:[t]])]}function Qh(i,e,t){const n=ne(t)?t:cs,s=i;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(n);if(!r){r=[];let o=[t];for(;We(o);)o=Ph(r,o,e);const a=We(e)||!ke(e)?e:e.default?e.default:null;o=ne(a)?[a]:a,We(o)&&Ph(r,o,!1),s.__localeChainCache.set(n,r)}return r}function Ph(i,e,t){let n=!0;for(let s=0;s<e.length&&Te(n);s++){const r=e[s];ne(r)&&(n=h0(i,e[s],t))}return n}function h0(i,e,t){let n;const s=e.split("-");do{const r=s.join("-");n=u0(i,r,t),s.splice(-1,1)}while(s.length&&n===!0);return n}function u0(i,e,t){let n=!1;if(!i.includes(e)&&(n=!0,e)){n=e[e.length-1]!=="!";const s=e.replace(/!/g,"");i.push(s),(We(t)||ke(t))&&t[s]&&(n=t[s])}return n}const Ii=[];Ii[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ii[1]={w:[1],".":[2],"[":[4],o:[7]},Ii[2]={w:[2],i:[3,0],0:[3,0]},Ii[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ii[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ii[5]={"'":[4,0],o:8,l:[5,0]},Ii[6]={'"':[4,0],o:8,l:[6,0]};const f0=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function d0(i){return f0.test(i)}function p0(i){const e=i.charCodeAt(0),t=i.charCodeAt(i.length-1);return e===t&&(e===34||e===39)?i.slice(1,-1):i}function m0(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 g0(i){const e=i.trim();return i.charAt(0)==="0"&&isNaN(parseInt(i))?!1:d0(e)?p0(e):"*"+e}function O0(i){const e=[];let t=-1,n=0,s=0,r,o,a,c,h,u,f;const d=[];d[0]=()=>{o===void 0?o=a:o+=a},d[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},d[2]=()=>{d[0](),s++},d[3]=()=>{if(s>0)s--,n=4,d[0]();else{if(s=0,o===void 0||(o=g0(o),o===!1))return!1;d[1]()}};function m(){const b=i[t+1];if(n===5&&b==="'"||n===6&&b==='"')return t++,a="\\"+b,d[0](),!0}for(;n!==null;)if(t++,r=i[t],!(r==="\\"&&m())){if(c=m0(r),f=Ii[n],h=f[c]||f.l||8,h===8||(n=h[0],h[1]!==void 0&&(u=d[h[1]],u&&(a=r,u()===!1))))return;if(n===7)return e}}const Th=new Map;function _0(i,e){return Ce(i)?i[e]:null}function b0(i,e){if(!Ce(i))return null;let t=Th.get(e);if(t||(t=O0(e),t&&Th.set(e,t)),!t)return null;const n=t.length;let s=i,r=0;for(;r<n;){const o=s[t[r]];if(o===void 0||Le(s))return null;s=o,r++}return s}const St={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},y0=8,w0={[St.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[St.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[St.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[St.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[St.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 an(i,...e){return ur(w0[i],...e)}const k0="10.0.5",Or=-1,cs="en-US",_r="",Eh=i=>`${i.charAt(0).toLocaleUpperCase()}${i.substr(1)}`;function x0(){return{upper:(i,e)=>e==="text"&&ne(i)?i.toUpperCase():e==="vnode"&&Ce(i)&&"__v_isVNode"in i?i.children.toUpperCase():i,lower:(i,e)=>e==="text"&&ne(i)?i.toLowerCase():e==="vnode"&&Ce(i)&&"__v_isVNode"in i?i.children.toLowerCase():i,capitalize:(i,e)=>e==="text"&&ne(i)?Eh(i):e==="vnode"&&Ce(i)&&"__v_isVNode"in i?Eh(i.children):i}}let $h;function S0(i){$h=i}let Nh;function C0(i){Nh=i}let Rh;function A0(i){Rh=i}let Vh=null;const Q0=i=>{Vh=i},P0=()=>Vh;let Lh=null;const Mh=i=>{Lh=i},T0=()=>Lh;let Bh=0;function E0(i={}){const e=Le(i.onWarn)?i.onWarn:Bi,t=ne(i.version)?i.version:k0,n=ne(i.locale)||Le(i.locale)?i.locale:cs,s=Le(n)?cs:n,r=We(i.fallbackLocale)||ke(i.fallbackLocale)||ne(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:s,o=ke(i.messages)?i.messages:pl(s),a=ke(i.datetimeFormats)?i.datetimeFormats:pl(s),c=ke(i.numberFormats)?i.numberFormats:pl(s),h=tt(Ve(),i.modifiers,x0()),u=i.pluralRules||Ve(),f=Le(i.missing)?i.missing:null,d=Te(i.missingWarn)||An(i.missingWarn)?i.missingWarn:!0,m=Te(i.fallbackWarn)||An(i.fallbackWarn)?i.fallbackWarn:!0,b=!!i.fallbackFormat,w=!!i.unresolving,g=Le(i.postTranslation)?i.postTranslation:null,p=ke(i.processor)?i.processor:null,O=Te(i.warnHtmlMessage)?i.warnHtmlMessage:!0,C=!!i.escapeParameter,y=Le(i.messageCompiler)?i.messageCompiler:$h;process.env.NODE_ENV!=="production"&&Le(i.messageCompiler)&&wh(an(St.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const E=Le(i.messageResolver)?i.messageResolver:Nh||_0,x=Le(i.localeFallbacker)?i.localeFallbacker:Rh||c0,k=Ce(i.fallbackContext)?i.fallbackContext:void 0,P=i,N=Ce(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,_=Ce(P.__numberFormatters)?P.__numberFormatters:new Map,A=Ce(P.__meta)?P.__meta:{};Bh++;const S={version:t,cid:Bh,locale:n,fallbackLocale:r,messages:o,modifiers:h,pluralRules:u,missing:f,missingWarn:d,fallbackWarn:m,fallbackFormat:b,unresolving:w,postTranslation:g,processor:p,warnHtmlMessage:O,escapeParameter:C,messageCompiler:y,messageResolver:E,localeFallbacker:x,fallbackContext:k,onWarn:e,__meta:A};return S.datetimeFormats=a,S.numberFormats=c,S.__datetimeFormatters=N,S.__numberFormatters=_,process.env.NODE_ENV!=="production"&&(S.__v_emitter=P.__v_emitter!=null?P.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&s0(S,t,A),S}const pl=i=>({[i]:Ve()});function br(i,e){return i instanceof RegExp?i.test(e):i}function Dh(i,e){return i instanceof RegExp?i.test(e):i}function ml(i,e,t,n,s){const{missing:r,onWarn:o}=i;if(process.env.NODE_ENV!=="production"){const a=i.__v_emitter;a&&a.emit("missing",{locale:t,key:e,type:s,groupId:`${s}:${e}`})}if(r!==null){const a=r(i,t,e,s);return ne(a)?a:e}else return process.env.NODE_ENV!=="production"&&Dh(n,e)&&o(an(St.NOT_FOUND_KEY,{key:e,locale:t})),e}function hs(i,e,t){const n=i;n.__localeChainCache=new Map,i.localeFallbacker(i,t,e)}function vh(i,e){return i===e?!1:i.split("-")[0]===e.split("-")[0]}function $0(i,e){const t=e.indexOf(i);if(t===-1)return!1;for(let n=t+1;n<e.length;n++)if(vh(i,e[n]))return!0;return!1}const Zh=typeof Intl<"u",Ih={dateTimeFormat:Zh&&typeof Intl.DateTimeFormat<"u",numberFormat:Zh&&typeof Intl.NumberFormat<"u"};function Uh(i,...e){const{datetimeFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__datetimeFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Ih.dateTimeFormat)return r(an(St.CANNOT_FORMAT_DATE)),_r;const[c,h,u,f]=gl(...e),d=Te(u.missingWarn)?u.missingWarn:i.missingWarn,m=Te(u.fallbackWarn)?u.fallbackWarn:i.fallbackWarn,b=!!u.part,w=fl(i,u),g=o(i,s,w);if(!ne(c)||c==="")return new Intl.DateTimeFormat(w,f).format(h);let p={},O,C=null,y=w,E=null;const x="datetime format";for(let N=0;N<g.length;N++){if(O=E=g[N],process.env.NODE_ENV!=="production"&&w!==O&&br(m,c)&&r(an(St.FALLBACK_TO_DATE_FORMAT,{key:c,target:O})),process.env.NODE_ENV!=="production"&&w!==O){const _=i.__v_emitter;_&&_.emit("fallback",{type:x,key:c,from:y,to:E,groupId:`${x}:${c}`})}if(p=t[O]||{},C=p[c],ke(C))break;ml(i,c,O,d,x),y=E}if(!ke(C)||!ne(O))return n?Or:c;let k=`${O}__${c}`;fr(f)||(k=`${k}__${JSON.stringify(f)}`);let P=a.get(k);return P||(P=new Intl.DateTimeFormat(O,tt({},C,f)),a.set(k,P)),b?P.formatToParts(h):P.format(h)}const Fh=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function gl(...i){const[e,t,n,s]=i,r=Ve();let o=Ve(),a;if(ne(e)){const c=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw Ci(mt.INVALID_ISO_DATE_ARGUMENT);const h=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();a=new Date(h);try{a.toISOString()}catch{throw Ci(mt.INVALID_ISO_DATE_ARGUMENT)}}else if(t_(e)){if(isNaN(e.getTime()))throw Ci(mt.INVALID_DATE_ARGUMENT);a=e}else if(Ye(e))a=e;else throw Ci(mt.INVALID_ARGUMENT);return ne(t)?r.key=t:ke(t)&&Object.keys(t).forEach(c=>{Fh.includes(c)?o[c]=t[c]:r[c]=t[c]}),ne(n)?r.locale=n:ke(n)&&(o=n),ke(s)&&(o=s),[r.key||"",a,r,o]}function jh(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__datetimeFormatters.has(r)&&n.__datetimeFormatters.delete(r)}}function qh(i,...e){const{numberFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__numberFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Ih.numberFormat)return r(an(St.CANNOT_FORMAT_NUMBER)),_r;const[c,h,u,f]=Ol(...e),d=Te(u.missingWarn)?u.missingWarn:i.missingWarn,m=Te(u.fallbackWarn)?u.fallbackWarn:i.fallbackWarn,b=!!u.part,w=fl(i,u),g=o(i,s,w);if(!ne(c)||c==="")return new Intl.NumberFormat(w,f).format(h);let p={},O,C=null,y=w,E=null;const x="number format";for(let N=0;N<g.length;N++){if(O=E=g[N],process.env.NODE_ENV!=="production"&&w!==O&&br(m,c)&&r(an(St.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:O})),process.env.NODE_ENV!=="production"&&w!==O){const _=i.__v_emitter;_&&_.emit("fallback",{type:x,key:c,from:y,to:E,groupId:`${x}:${c}`})}if(p=t[O]||{},C=p[c],ke(C))break;ml(i,c,O,d,x),y=E}if(!ke(C)||!ne(O))return n?Or:c;let k=`${O}__${c}`;fr(f)||(k=`${k}__${JSON.stringify(f)}`);let P=a.get(k);return P||(P=new Intl.NumberFormat(O,tt({},C,f)),a.set(k,P)),b?P.formatToParts(h):P.format(h)}const Xh=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ol(...i){const[e,t,n,s]=i,r=Ve();let o=Ve();if(!Ye(e))throw Ci(mt.INVALID_ARGUMENT);const a=e;return ne(t)?r.key=t:ke(t)&&Object.keys(t).forEach(c=>{Xh.includes(c)?o[c]=t[c]:r[c]=t[c]}),ne(n)?r.locale=n:ke(n)&&(o=n),ke(s)&&(o=s),[r.key||"",a,r,o]}function Wh(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__numberFormatters.has(r)&&n.__numberFormatters.delete(r)}}const N0=i=>i,R0=i=>"",V0="text",L0=i=>i.length===0?"":rl(i),M0=r_;function Yh(i,e){return i=Math.abs(i),e===2?i?i>1?1:0:1:i?Math.min(i,2):0}function B0(i){const e=Ye(i.pluralIndex)?i.pluralIndex:-1;return i.named&&(Ye(i.named.count)||Ye(i.named.n))?Ye(i.named.count)?i.named.count:Ye(i.named.n)?i.named.n:e:e}function D0(i,e){e.count||(e.count=i),e.n||(e.n=i)}function v0(i={}){const e=i.locale,t=B0(i),n=Ce(i.pluralRules)&&ne(e)&&Le(i.pluralRules[e])?i.pluralRules[e]:Yh,s=Ce(i.pluralRules)&&ne(e)&&Le(i.pluralRules[e])?Yh:void 0,r=p=>p[n(t,p.length,s)],o=i.list||[],a=p=>o[p],c=i.named||Ve();Ye(i.pluralIndex)&&D0(t,c);const h=p=>c[p];function u(p,O){const C=Le(i.messages)?i.messages(p,!!O):Ce(i.messages)?i.messages[p]:!1;return C||(i.parent?i.parent.message(p):R0)}const f=p=>i.modifiers?i.modifiers[p]:N0,d=ke(i.processor)&&Le(i.processor.normalize)?i.processor.normalize:L0,m=ke(i.processor)&&Le(i.processor.interpolate)?i.processor.interpolate:M0,b=ke(i.processor)&&ne(i.processor.type)?i.processor.type:V0,g={list:a,named:h,plural:r,linked:(p,...O)=>{const[C,y]=O;let E="text",x="";O.length===1?Ce(C)?(x=C.modifier||x,E=C.type||E):ne(C)&&(x=C||x):O.length===2&&(ne(C)&&(x=C||x),ne(y)&&(E=y||E));const k=u(p,!0)(g),P=E==="vnode"&&We(k)&&x?k[0]:k;return x?f(x)(P,E):P},message:u,type:b,interpolate:m,normalize:d,values:tt(Ve(),o,c)};return g}const zh=()=>"",Zt=i=>Le(i);function Gh(i,...e){const{fallbackFormat:t,postTranslation:n,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=i,[c,h]=_l(...e),u=Te(h.missingWarn)?h.missingWarn:i.missingWarn,f=Te(h.fallbackWarn)?h.fallbackWarn:i.fallbackWarn,d=Te(h.escapeParameter)?h.escapeParameter:i.escapeParameter,m=!!h.resolvedMessage,b=ne(h.default)||Te(h.default)?Te(h.default)?r?c:()=>c:h.default:t?r?c:()=>c:null,w=t||b!=null&&(ne(b)||Le(b)),g=fl(i,h);d&&Z0(h);let[p,O,C]=m?[c,g,a[g]||Ve()]:Hh(i,c,g,o,f,u),y=p,E=c;if(!m&&!(ne(y)||Zi(y)||Zt(y))&&w&&(y=b,E=y),!m&&(!(ne(y)||Zi(y)||Zt(y))||!ne(O)))return s?Or:c;if(process.env.NODE_ENV!=="production"&&ne(y)&&i.messageCompiler==null)return Bi(`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 '${c}'.`),c;let x=!1;const k=()=>{x=!0},P=Zt(y)?y:Kh(i,c,O,y,E,k);if(x)return y;const N=j0(i,O,C,h),_=v0(N),A=I0(i,P,_),S=n?n(A,c):A;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const M={timestamp:Date.now(),key:ne(c)?c:Zt(y)?y.key:"",locale:O||(Zt(y)?y.locale:""),format:ne(y)?y:Zt(y)?y.source:"",message:S};M.meta=tt({},i.__meta,P0()||{}),r0(M)}return S}function Z0(i){We(i.list)?i.list=i.list.map(e=>ne(e)?Oh(e):e):Ce(i.named)&&Object.keys(i.named).forEach(e=>{ne(i.named[e])&&(i.named[e]=Oh(i.named[e]))})}function Hh(i,e,t,n,s,r){const{messages:o,onWarn:a,messageResolver:c,localeFallbacker:h}=i,u=h(i,n,t);let f=Ve(),d,m=null,b=t,w=null;const g="translate";for(let p=0;p<u.length;p++){if(d=w=u[p],process.env.NODE_ENV!=="production"&&t!==d&&!vh(t,d)&&br(s,e)&&a(an(St.FALLBACK_TO_TRANSLATE,{key:e,target:d})),process.env.NODE_ENV!=="production"&&t!==d){const E=i.__v_emitter;E&&E.emit("fallback",{type:g,key:e,from:b,to:w,groupId:`${g}:${e}`})}f=o[d]||Ve();let O=null,C,y;if(process.env.NODE_ENV!=="production"&&Yt&&(O=window.performance.now(),C="intlify-message-resolve-start",y="intlify-message-resolve-end",Rt&&Rt(C)),(m=c(f,e))===null&&(m=f[e]),process.env.NODE_ENV!=="production"&&Yt){const E=window.performance.now(),x=i.__v_emitter;x&&O&&m&&x.emit("message-resolve",{type:"message-resolve",key:e,message:m,time:E-O,groupId:`${g}:${e}`}),C&&y&&Rt&&on&&(Rt(y),on("intlify message resolve",C,y))}if(ne(m)||Zi(m)||Zt(m))break;if(!$0(d,u)){const E=ml(i,e,d,r,g);E!==e&&(m=E)}b=w}return[m,d,f]}function Kh(i,e,t,n,s,r){const{messageCompiler:o,warnHtmlMessage:a}=i;if(Zt(n)){const d=n;return d.locale=d.locale||t,d.key=d.key||e,d}if(o==null){const d=()=>n;return d.locale=t,d.key=e,d}let c=null,h,u;process.env.NODE_ENV!=="production"&&Yt&&(c=window.performance.now(),h="intlify-message-compilation-start",u="intlify-message-compilation-end",Rt&&Rt(h));const f=o(n,U0(i,t,s,n,a,r));if(process.env.NODE_ENV!=="production"&&Yt){const d=window.performance.now(),m=i.__v_emitter;m&&c&&m.emit("message-compilation",{type:"message-compilation",message:n,time:d-c,groupId:`translate:${e}`}),h&&u&&Rt&&on&&(Rt(u),on("intlify message compilation",h,u))}return f.locale=t,f.key=e,f.source=n,f}function I0(i,e,t){let n=null,s,r;process.env.NODE_ENV!=="production"&&Yt&&(n=window.performance.now(),s="intlify-message-evaluation-start",r="intlify-message-evaluation-end",Rt&&Rt(s));const o=e(t);if(process.env.NODE_ENV!=="production"&&Yt){const a=window.performance.now(),c=i.__v_emitter;c&&n&&c.emit("message-evaluation",{type:"message-evaluation",value:o,time:a-n,groupId:`translate:${e.key}`}),s&&r&&Rt&&on&&(Rt(r),on("intlify message evaluation",s,r))}return o}function _l(...i){const[e,t,n]=i,s=Ve();if(!ne(e)&&!Ye(e)&&!Zt(e)&&!Zi(e))throw Ci(mt.INVALID_ARGUMENT);const r=Ye(e)?String(e):(Zt(e),e);return Ye(t)?s.plural=t:ne(t)?s.default=t:ke(t)&&!fr(t)?s.named=t:We(t)&&(s.list=t),Ye(n)?s.plural=n:ne(n)?s.default=n:ke(n)&&tt(s,n),[r,s]}function U0(i,e,t,n,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{if(r&&r(o),process.env.NODE_ENV!=="production"){const a=F0(n),c=`Message compilation error: ${o.message}`,h=o.location&&a&&o_(a,o.location.start.offset,o.location.end.offset),u=i.__v_emitter;u&&a&&u.emit("compile-error",{message:a,error:o.message,start:o.location&&o.location.start.offset,end:o.location&&o.location.end.offset,groupId:`translate:${t}`}),console.error(h?`${c}
17
+ ${h}`:c)}else throw o},onCacheKey:o=>JO(e,t,o)}}function F0(i){if(ne(i))return i;if(i.loc&&i.loc.source)return i.loc.source}function j0(i,e,t,n){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:c,missingWarn:h,fallbackContext:u}=i,d={locale:e,modifiers:s,pluralRules:r,messages:(m,b)=>{let w=o(t,m);if(w==null&&(u||b)){const[,,g]=Hh(u||i,m,e,a,c,h);w=o(g,m)}if(ne(w)||Zi(w)){let g=!1;const O=Kh(i,m,e,w,m,()=>{g=!0});return g?zh:O}else return Zt(w)?w:zh}};return i.processor&&(d.processor=i.processor),n.list&&(d.list=n.list),n.named&&(d.named=n.named),Ye(n.plural)&&(d.pluralIndex=n.plural),d}M_();function q0(){return Jh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Jh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const X0=typeof Proxy=="function",W0="devtools-plugin:setup",Y0="plugin:settings:set";let En,bl;function z0(){var i;return En!==void 0||(typeof window<"u"&&window.performance?(En=!0,bl=window.performance):typeof globalThis<"u"&&(!((i=globalThis.perf_hooks)===null||i===void 0)&&i.performance)?(En=!0,bl=globalThis.perf_hooks.performance):En=!1),En}function G0(){return z0()?bl.now():Date.now()}class H0{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const o in e.settings){const a=e.settings[o];n[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},n);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return G0()}},t&&t.on(Y0,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(h=>{this.targetQueue.push({method:a,args:c,resolve:h})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function K0(i,e){const t=i,n=Jh(),s=q0(),r=X0&&t.enableEarlyProxy;if(s&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(W0,i,e);else{const o=r?new H0(t,s):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}/*!
18
18
  * vue-i18n v10.0.5
19
19
  * (c) 2024 kazuya kawaguchi
20
20
  * Released under the MIT License.
21
- */const K0="10.0.5";function J0(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ln().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ln().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1)}const Fi={FALLBACK_TO_ROOT:b0,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},eb={[Fi.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Fi.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Fi.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Fi.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function br(i,...e){return hr(eb[i],...e)}const Me={UNEXPECTED_RETURN_TYPE:o0,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function wt(i,...e){return Qn(i,null,process.env.NODE_ENV!=="production"?{messages:tb,args:e}:void 0)}const tb={[Me.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Me.INVALID_ARGUMENT]:"Invalid argument",[Me.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Me.NOT_INSTALLED]:"Need to install with `app.use` function",[Me.UNEXPECTED_ERROR]:"Unexpected error",[Me.REQUIRED_VALUE]:"Required in value: {0}",[Me.INVALID_VALUE]:"Invalid value",[Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Me.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Me.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Me.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},_l=oi("__translateVNode"),bl=oi("__datetimeParts"),yl=oi("__numberParts"),cn=oi("__enableEmitter"),hs=oi("__disableEmitter"),Jh=oi("__setPluralRules"),eu=oi("__injectWithOption"),wl=oi("__dispose");function us(i){if(!Ce(i))return i;for(const e in i)if(Gt(i,e))if(!e.includes("."))Ce(i[e])&&us(i[e]);else{const t=e.split("."),n=t.length-1;let s=i,r=!1;for(let o=0;o<n;o++){if(t[o]in s||(s[t[o]]=Ve()),!Ce(s[t[o]])){process.env.NODE_ENV!=="production"&&Di(br(Fi.IGNORE_OBJ_FLATTEN,{key:t[o]})),r=!0;break}s=s[t[o]]}r||(s[t[n]]=i[e],delete i[e]),Ce(s[t[n]])&&us(s[t[n]])}return i}function kl(i,e){const{messages:t,__i18n:n,messageResolver:s,flatJson:r}=e,o=ke(t)?t:Xe(n)?Ve():{[i]:Ve()};if(Xe(n)&&n.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:c,resource:h}=a;c?(o[c]=o[c]||Ve(),dr(h,o[c])):dr(h,o)}else ne(a)&&dr(JSON.parse(a),o)}),s==null&&r)for(const a in o)Gt(o,a)&&us(o[a]);return o}function tu(i){return i.type}function iu(i,e,t){let n=Ce(e.messages)?e.messages:Ve();"__i18nGlobal"in t&&(n=kl(i.locale.value,{messages:n,__i18n:t.__i18nGlobal}));const s=Object.keys(n);s.length&&s.forEach(r=>{i.mergeLocaleMessage(r,n[r])});{if(Ce(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{i.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(Ce(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{i.mergeNumberFormat(o,e.numberFormats[o])})}}}function nu(i){return l.createVNode(l.Text,null,i,0)}const su="__INTLIFY_META__",ru=()=>[],ib=()=>!1;let ou=0;function lu(i){return(e,t,n,s)=>i(t,n,l.getCurrentInstance()||void 0,s)}const nb=()=>{const i=l.getCurrentInstance();let e=null;return i&&(e=tu(i)[su])?{[su]:e}:null};function xl(i={}){const{__root:e,__injectWithOption:t}=i,n=e===void 0,s=i.flatJson,r=zt?l.ref:l.shallowRef;let o=Pe(i.inheritLocale)?i.inheritLocale:!0;const a=r(e&&o?e.locale.value:ne(i.locale)?i.locale:as),c=r(e&&o?e.fallbackLocale.value:ne(i.fallbackLocale)||Xe(i.fallbackLocale)||ke(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:a.value),h=r(kl(a.value,i)),u=r(ke(i.datetimeFormats)?i.datetimeFormats:{[a.value]:{}}),f=r(ke(i.numberFormats)?i.numberFormats:{[a.value]:{}});let d=e?e.missingWarn:Pe(i.missingWarn)||An(i.missingWarn)?i.missingWarn:!0,m=e?e.fallbackWarn:Pe(i.fallbackWarn)||An(i.fallbackWarn)?i.fallbackWarn:!0,b=e?e.fallbackRoot:Pe(i.fallbackRoot)?i.fallbackRoot:!0,w=!!i.fallbackFormat,g=Le(i.missing)?i.missing:null,p=Le(i.missing)?lu(i.missing):null,O=Le(i.postTranslation)?i.postTranslation:null,S=e?e.warnHtmlMessage:Pe(i.warnHtmlMessage)?i.warnHtmlMessage:!0,y=!!i.escapeParameter;const Q=e?e.modifiers:ke(i.modifiers)?i.modifiers:{};let k=i.pluralRules||e&&e.pluralRules,C;C=(()=>{n&&Lh(null);const F={version:K0,locale:a.value,fallbackLocale:c.value,messages:h.value,modifiers:Q,pluralRules:k,missing:p===null?void 0:p,missingWarn:d,fallbackWarn:m,fallbackFormat:w,unresolving:!0,postTranslation:O===null?void 0:O,warnHtmlMessage:S,escapeParameter:y,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};F.datetimeFormats=u.value,F.numberFormats=f.value,F.__datetimeFormatters=ke(C)?C.__datetimeFormatters:void 0,F.__numberFormatters=ke(C)?C.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(F.__v_emitter=ke(C)?C.__v_emitter:void 0);const z=T0(F);return n&&Lh(z),z})(),cs(C,a.value,c.value);function N(){return[a.value,c.value,h.value,u.value,f.value]}const _=l.computed({get:()=>a.value,set:F=>{a.value=F,C.locale=a.value}}),A=l.computed({get:()=>c.value,set:F=>{c.value=F,C.fallbackLocale=c.value,cs(C,a.value,F)}}),x=l.computed(()=>h.value),M=l.computed(()=>u.value),E=l.computed(()=>f.value);function I(){return Le(O)?O:null}function B(F){O=F,C.postTranslation=F}function U(){return g}function Z(F){F!==null&&(p=lu(F)),g=F,C.missing=p}function K(F,z){return F!=="translate"||!z.resolvedMessage}const W=(F,z,$e,Ye,Mi,rs)=>{N();let Bi;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(C.fallbackContext=e?P0():void 0),Bi=F(C)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(C.fallbackContext=void 0)}if($e!=="translate exists"&&ze(Bi)&&Bi===gr||$e==="translate exists"&&!Bi){const[ni,ph]=z();if(process.env.NODE_ENV!=="production"&&e&&ne(ni)&&K($e,ph)&&(b&&(_r(m,ni)||Bh(d,ni))&&Di(br(Fi.FALLBACK_TO_ROOT,{key:ni,type:$e})),process.env.NODE_ENV!=="production")){const{__v_emitter:Vt}=C;Vt&&b&&Vt.emit("fallback",{type:$e,key:ni,to:"global",groupId:`${$e}:${ni}`})}return e&&b?Ye(e):Mi(ni)}else{if(rs(Bi))return Bi;throw wt(Me.UNEXPECTED_RETURN_TYPE)}};function J(...F){return W(z=>Reflect.apply(zh,null,[z,...F]),()=>gl(...F),"translate",z=>Reflect.apply(z.t,z,[...F]),z=>z,z=>ne(z))}function fe(...F){const[z,$e,Ye]=F;if(Ye&&!Ce(Ye))throw wt(Me.INVALID_ARGUMENT);return J(z,$e,it({resolvedMessage:!0},Ye||{}))}function ce(...F){return W(z=>Reflect.apply(Ih,null,[z,...F]),()=>pl(...F),"datetime format",z=>Reflect.apply(z.d,z,[...F]),()=>Or,z=>ne(z))}function ye(...F){return W(z=>Reflect.apply(jh,null,[z,...F]),()=>ml(...F),"number format",z=>Reflect.apply(z.n,z,[...F]),()=>Or,z=>ne(z))}function G(F){return F.map(z=>ne(z)||ze(z)||Pe(z)?nu(String(z)):z)}const V={normalize:G,interpolate:F=>F,type:"vnode"};function q(...F){return W(z=>{let $e;const Ye=z;try{Ye.processor=V,$e=Reflect.apply(zh,null,[Ye,...F])}finally{Ye.processor=null}return $e},()=>gl(...F),"translate",z=>z[_l](...F),z=>[nu(z)],z=>Xe(z))}function H(...F){return W(z=>Reflect.apply(jh,null,[z,...F]),()=>ml(...F),"number format",z=>z[yl](...F),ru,z=>ne(z)||Xe(z))}function Fe(...F){return W(z=>Reflect.apply(Ih,null,[z,...F]),()=>pl(...F),"datetime format",z=>z[bl](...F),ru,z=>ne(z)||Xe(z))}function Yt(F){k=F,C.pluralRules=k}function Ee(F,z){return W(()=>{if(!F)return!1;const $e=ne(z)?z:a.value,Ye=ii($e),Mi=C.messageResolver(Ye,F);return Ii(Mi)||It(Mi)||ne(Mi)},()=>[F],"translate exists",$e=>Reflect.apply($e.te,$e,[F,z]),ib,$e=>Pe($e))}function We(F){let z=null;const $e=Ah(C,c.value,a.value);for(let Ye=0;Ye<$e.length;Ye++){const Mi=h.value[$e[Ye]]||{},rs=C.messageResolver(Mi,F);if(rs!=null){z=rs;break}}return z}function Li(F){const z=We(F);return z??(e?e.tm(F)||{}:{})}function ii(F){return h.value[F]||{}}function Si(F,z){if(s){const $e={[F]:z};for(const Ye in $e)Gt($e,Ye)&&us($e[Ye]);z=$e[F]}h.value[F]=z,C.messages=h.value}function Ze(F,z){h.value[F]=h.value[F]||{};const $e={[F]:z};if(s)for(const Ye in $e)Gt($e,Ye)&&us($e[Ye]);z=$e[F],dr(z,h.value[F]),C.messages=h.value}function R(F){return u.value[F]||{}}function P(F,z){u.value[F]=z,C.datetimeFormats=u.value,Fh(C,F,z)}function X(F,z){u.value[F]=it(u.value[F]||{},z),C.datetimeFormats=u.value,Fh(C,F,z)}function Y(F){return f.value[F]||{}}function Re(F,z){f.value[F]=z,C.numberFormats=f.value,Xh(C,F,z)}function qe(F,z){f.value[F]=it(f.value[F]||{},z),C.numberFormats=f.value,Xh(C,F,z)}ou++,e&&zt&&(l.watch(e.locale,F=>{o&&(a.value=F,C.locale=F,cs(C,a.value,c.value))}),l.watch(e.fallbackLocale,F=>{o&&(c.value=F,C.fallbackLocale=F,cs(C,a.value,c.value))}));const Qe={id:ou,locale:_,fallbackLocale:A,get inheritLocale(){return o},set inheritLocale(F){o=F,F&&e&&(a.value=e.locale.value,c.value=e.fallbackLocale.value,cs(C,a.value,c.value))},get availableLocales(){return Object.keys(h.value).sort()},messages:x,get modifiers(){return Q},get pluralRules(){return k||{}},get isGlobal(){return n},get missingWarn(){return d},set missingWarn(F){d=F,C.missingWarn=d},get fallbackWarn(){return m},set fallbackWarn(F){m=F,C.fallbackWarn=m},get fallbackRoot(){return b},set fallbackRoot(F){b=F},get fallbackFormat(){return w},set fallbackFormat(F){w=F,C.fallbackFormat=w},get warnHtmlMessage(){return S},set warnHtmlMessage(F){S=F,C.warnHtmlMessage=F},get escapeParameter(){return y},set escapeParameter(F){y=F,C.escapeParameter=F},t:J,getLocaleMessage:ii,setLocaleMessage:Si,mergeLocaleMessage:Ze,getPostTranslationHandler:I,setPostTranslationHandler:B,getMissingHandler:U,setMissingHandler:Z,[Jh]:Yt};return Qe.datetimeFormats=M,Qe.numberFormats=E,Qe.rt=fe,Qe.te=Ee,Qe.tm=Li,Qe.d=ce,Qe.n=ye,Qe.getDateTimeFormat=R,Qe.setDateTimeFormat=P,Qe.mergeDateTimeFormat=X,Qe.getNumberFormat=Y,Qe.setNumberFormat=Re,Qe.mergeNumberFormat=qe,Qe[eu]=t,Qe[_l]=q,Qe[bl]=Fe,Qe[yl]=H,process.env.NODE_ENV!=="production"&&(Qe[cn]=F=>{C.__v_emitter=F},Qe[hs]=()=>{C.__v_emitter=void 0}),Qe}const au="vue-i18n: composer properties",Sl={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},sb={"vue-i18n-resource-inspector":"Search for scopes ..."},rb={"vue-i18n-timeline":16764185};let Cl;async function ob(i,e){return new Promise((t,n)=>{try{H0({id:"vue-devtools-plugin-vue-i18n",label:Sl["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:[au],app:i},s=>{Cl=s,s.on.visitComponentTree(({componentInstance:o,treeNode:a})=>{lb(o,a,e)}),s.on.inspectComponent(({componentInstance:o,instanceData:a})=>{o.vnode.el&&o.vnode.el.__VUE_I18N__&&a&&(e.mode==="legacy"?o.vnode.el.__VUE_I18N__!==e.global.__composer&&hu(a,o.vnode.el.__VUE_I18N__):hu(a,o.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Sl["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:sb["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&fb(o,e)});const r=new Map;s.on.getInspectorState(async o=>{if(o.app===i&&o.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),pb(o,e),o.nodeId==="global"){if(!r.has(o.app)){const[a]=await s.getComponentInstances(o.app);r.set(o.app,a)}s.highlightElement(r.get(o.app))}else{const a=db(o.nodeId,e);a&&s.highlightElement(a)}}),s.on.editInspectorState(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&gb(o,e)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Sl["vue-i18n-timeline"],color:rb["vue-i18n-timeline"]}),t(!0)})}catch(s){console.error(s),n(!1)}})}function cu(i){return i.type.name||i.type.displayName||i.type.__file||"Anonymous"}function lb(i,e,t){const n=t.mode==="composition"?t.global:t.global.__composer;if(i&&i.vnode.el&&i.vnode.el.__VUE_I18N__&&i.vnode.el.__VUE_I18N__!==n){const s={label:`i18n (${cu(i)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(s)}}function hu(i,e){const t=au;i.state.push({type:t,key:"locale",editable:!0,value:e.locale.value}),i.state.push({type:t,key:"availableLocales",editable:!1,value:e.availableLocales}),i.state.push({type:t,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),i.state.push({type:t,key:"inheritLocale",editable:!0,value:e.inheritLocale}),i.state.push({type:t,key:"messages",editable:!1,value:Al(e.messages.value)}),i.state.push({type:t,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),i.state.push({type:t,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Al(i){const e={};return Object.keys(i).forEach(t=>{const n=i[t];Le(n)&&"source"in n?e[t]=ub(n):Ii(n)&&n.loc&&n.loc.source?e[t]=n.loc.source:Ce(n)?e[t]=Al(n):e[t]=n}),e}const ab={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function cb(i){return i.replace(/[<>"&]/g,hb)}function hb(i){return ab[i]||i}function ub(i){return{_custom:{type:"function",display:`<span>ƒ</span> ${i.source?`("${cb(i.source)}")`:"(?)"}`}}}function fb(i,e){i.rootNodes.push({id:"global",label:"Global Scope"});const t=e.mode==="composition"?e.global:e.global.__composer;for(const[n,s]of e.__instances){const r=e.mode==="composition"?s:s.__composer;t!==r&&i.rootNodes.push({id:r.id.toString(),label:`${cu(n)} Scope`})}}function db(i,e){let t=null;if(i!=="global"){for(const[n,s]of e.__instances.entries())if(s.id.toString()===i){t=n;break}}return t}function uu(i,e){if(i==="global")return e.mode==="composition"?e.global:e.global.__composer;{const t=Array.from(e.__instances.values()).find(n=>n.id.toString()===i);return t?e.mode==="composition"?t:t.__composer:null}}function pb(i,e){const t=uu(i.nodeId,e);return t&&(i.state=mb(t)),null}function mb(i){const e={},t="Locale related info",n=[{type:t,key:"locale",editable:!0,value:i.locale.value},{type:t,key:"fallbackLocale",editable:!0,value:i.fallbackLocale.value},{type:t,key:"availableLocales",editable:!1,value:i.availableLocales},{type:t,key:"inheritLocale",editable:!0,value:i.inheritLocale}];e[t]=n;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:Al(i.messages.value)}];e[s]=r;{const o="Datetime formats info",a=[{type:o,key:"datetimeFormats",editable:!1,value:i.datetimeFormats.value}];e[o]=a;const c="Datetime formats info",h=[{type:c,key:"numberFormats",editable:!1,value:i.numberFormats.value}];e[c]=h}return e}function fs(i,e){if(Cl){let t;e&&"groupId"in e&&(t=e.groupId,delete e.groupId),Cl.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:i,groupId:t,time:Date.now(),meta:{},data:e||{},logType:i==="compile-error"?"error":i==="fallback"||i==="missing"?"warning":"default"}})}}function gb(i,e){const t=uu(i.nodeId,e);if(t){const[n]=i.path;n==="locale"&&ne(i.state.value)?t.locale.value=i.state.value:n==="fallbackLocale"&&(ne(i.state.value)||Xe(i.state.value)||Ce(i.state.value))?t.fallbackLocale.value=i.state.value:n==="inheritLocale"&&Pe(i.state.value)&&(t.inheritLocale=i.state.value)}}function Ob(i){const e=ne(i.locale)?i.locale:as,t=ne(i.fallbackLocale)||Xe(i.fallbackLocale)||ke(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:e,n=Le(i.missing)?i.missing:void 0,s=Pe(i.silentTranslationWarn)||An(i.silentTranslationWarn)?!i.silentTranslationWarn:!0,r=Pe(i.silentFallbackWarn)||An(i.silentFallbackWarn)?!i.silentFallbackWarn:!0,o=Pe(i.fallbackRoot)?i.fallbackRoot:!0,a=!!i.formatFallbackMessages,c=ke(i.modifiers)?i.modifiers:{},h=i.pluralizationRules,u=Le(i.postTranslation)?i.postTranslation:void 0,f=ne(i.warnHtmlInMessage)?i.warnHtmlInMessage!=="off":!0,d=!!i.escapeParameterHtml,m=Pe(i.sync)?i.sync:!0;let b=i.messages;if(ke(i.sharedMessages)){const Q=i.sharedMessages;b=Object.keys(Q).reduce((C,T)=>{const N=C[T]||(C[T]={});return it(N,Q[T]),C},b||{})}const{__i18n:w,__root:g,__injectWithOption:p}=i,O=i.datetimeFormats,S=i.numberFormats,y=i.flatJson;return{locale:e,fallbackLocale:t,messages:b,flatJson:y,datetimeFormats:O,numberFormats:S,missing:n,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:a,modifiers:c,pluralRules:h,postTranslation:u,warnHtmlMessage:f,escapeParameter:d,messageResolver:i.messageResolver,inheritLocale:m,__i18n:w,__root:g,__injectWithOption:p}}function Ql(i={}){const e=xl(Ob(i)),{__extender:t}=i,n={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return Pe(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=Pe(s)?!s:s},get silentFallbackWarn(){return Pe(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=Pe(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},tc(...s){const[r,o,a]=s,c={plural:1};let h=null,u=null;if(process.env.NODE_ENV!=="production"&&yh(br(Fi.DEPRECATE_TC)),!ne(r))throw wt(Me.INVALID_ARGUMENT);const f=r;return ne(o)?c.locale=o:ze(o)?c.plural=o:Xe(o)?h=o:ke(o)&&(u=o),ne(a)?c.locale=a:Xe(a)?h=a:ke(a)&&(u=a),Reflect.apply(e.t,e,[f,h||u||{},c])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return n.__extender=t,process.env.NODE_ENV!=="production"&&(n.__enableEmitter=s=>{const r=e;r[cn]&&r[cn](s)},n.__disableEmitter=()=>{const s=e;s[hs]&&s[hs]()}),n}function _b(i,e,t){return{beforeCreate(){const n=l.getCurrentInstance();if(!n)throw wt(Me.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=fu(i,r);else{r.__injectWithOption=!0,r.__extender=t.__vueI18nExtend,this.$i18n=Ql(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=fu(i,s);else{this.$i18n=Ql({__i18n:s.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=i;s.__i18nGlobal&&iu(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),t.__setInstance(n,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const n=this.$i18n;this.$el.__VUE_I18N__=n.__composer;const s=this.__v_emitter=sl();n.__enableEmitter&&n.__enableEmitter(s),s.on("*",fs)}},unmounted(){const n=l.getCurrentInstance();if(!n)throw wt(Me.UNEXPECTED_ERROR);const s=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",fs),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__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,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),t.__deleteInstance(n),delete this.$i18n}}}function fu(i,e){i.locale=e.locale||i.locale,i.fallbackLocale=e.fallbackLocale||i.fallbackLocale,i.missing=e.missing||i.missing,i.silentTranslationWarn=e.silentTranslationWarn||i.silentFallbackWarn,i.silentFallbackWarn=e.silentFallbackWarn||i.silentFallbackWarn,i.formatFallbackMessages=e.formatFallbackMessages||i.formatFallbackMessages,i.postTranslation=e.postTranslation||i.postTranslation,i.warnHtmlInMessage=e.warnHtmlInMessage||i.warnHtmlInMessage,i.escapeParameterHtml=e.escapeParameterHtml||i.escapeParameterHtml,i.sync=e.sync||i.sync,i.__composer[Jh](e.pluralizationRules||i.pluralizationRules);const t=kl(i.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(n=>i.mergeLocaleMessage(n,t[n])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(n=>i.mergeDateTimeFormat(n,e.datetimeFormats[n])),e.numberFormats&&Object.keys(e.numberFormats).forEach(n=>i.mergeNumberFormat(n,e.numberFormats[n])),i}const Pl={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:i=>i==="parent"||i==="global",default:"parent"},i18n:{type:Object}};function bb({slots:i},e){return e.length===1&&e[0]==="default"?(i.default?i.default():[]).reduce((n,s)=>[...n,...s.type===l.Fragment?s.children:[s]],[]):e.reduce((t,n)=>{const s=i[n];return s&&(t[n]=s()),t},Ve())}function du(){return l.Fragment}const pu=l.defineComponent({name:"i18n-t",props:it({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:i=>ze(i)||!isNaN(i)}},Pl),setup(i,e){const{slots:t,attrs:n}=e,s=i.i18n||Ht({useScope:i.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f!=="_"),o=Ve();i.locale&&(o.locale=i.locale),i.plural!==void 0&&(o.plural=ne(i.plural)?+i.plural:i.plural);const a=bb(e,r),c=s[_l](i.keypath,a,o),h=it(Ve(),n),u=ne(i.tag)||Ce(i.tag)?i.tag:du();return l.h(u,h,c)}}});function yb(i){return Xe(i)&&!ne(i[0])}function mu(i,e,t,n){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=Ve();i.locale&&(o.locale=i.locale),ne(i.format)?o.key=i.format:Ce(i.format)&&(ne(i.format.key)&&(o.key=i.format.key),a=Object.keys(i.format).reduce((d,m)=>t.includes(m)?it(Ve(),d,{[m]:i.format[m]}):d,Ve()));const c=n(i.value,o,a);let h=[o.key];Xe(c)?h=c.map((d,m)=>{const b=s[d.type],w=b?b({[d.type]:d.value,index:m,parts:c}):[d.value];return yb(w)&&(w[0].key=`${d.type}-${m}`),w}):ne(c)&&(h=[c]);const u=it(Ve(),r),f=ne(i.tag)||Ce(i.tag)?i.tag:du();return l.h(f,u,h)}}const gu=l.defineComponent({name:"i18n-n",props:it({value:{type:Number,required:!0},format:{type:[String,Object]}},Pl),setup(i,e){const t=i.i18n||Ht({useScope:i.scope,__useComponent:!0});return mu(i,e,qh,(...n)=>t[yl](...n))}}),Ou=l.defineComponent({name:"i18n-d",props:it({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Pl),setup(i,e){const t=i.i18n||Ht({useScope:i.scope,__useComponent:!0});return mu(i,e,Uh,(...n)=>t[bl](...n))}});function wb(i,e){const t=i;if(i.mode==="composition")return t.__getInstance(e)||i.global;{const n=t.__getInstance(e);return n!=null?n.__composer:i.global.__composer}}function kb(i){const e=o=>{const{instance:a,value:c}=o;if(!a||!a.$)throw wt(Me.UNEXPECTED_ERROR);const h=wb(i,a.$),u=_u(c);return[Reflect.apply(h.t,h,[...bu(u)]),h]};return{created:(o,a)=>{const[c,h]=e(a);zt&&i.global===h&&(o.__i18nWatcher=l.watch(h.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=h,o.textContent=c},unmounted:o=>{zt&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const c=o.__composer,h=_u(a);o.textContent=Reflect.apply(c.t,c,[...bu(h)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function _u(i){if(ne(i))return{path:i};if(ke(i)){if(!("path"in i))throw wt(Me.REQUIRED_VALUE,"path");return i}else throw wt(Me.INVALID_VALUE)}function bu(i){const{path:e,locale:t,args:n,choice:s,plural:r}=i,o={},a=n||{};return ne(t)&&(o.locale=t),ze(s)&&(o.plural=s),ze(r)&&(o.plural=r),[e,a,o]}function xb(i,e,...t){const n=ke(t[0])?t[0]:{};(Pe(n.globalInstall)?n.globalInstall:!0)&&([pu.name,"I18nT"].forEach(r=>i.component(r,pu)),[gu.name,"I18nN"].forEach(r=>i.component(r,gu)),[Ou.name,"I18nD"].forEach(r=>i.component(r,Ou))),i.directive("t",kb(e))}const Sb=oi("global-vue-i18n");function yu(i={},e){const t=__VUE_I18N_LEGACY_API__&&Pe(i.legacy)?i.legacy:__VUE_I18N_LEGACY_API__,n=Pe(i.globalInjection)?i.globalInjection:!0,s=new Map,[r,o]=Cb(i,t),a=oi(process.env.NODE_ENV!=="production"?"vue-i18n":"");function c(d){return s.get(d)||null}function h(d,m){s.set(d,m)}function u(d){s.delete(d)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...m){if(process.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=f),d.__VUE_I18N_SYMBOL__=a,d.provide(d.__VUE_I18N_SYMBOL__,f),ke(m[0])){const g=m[0];f.__composerExtend=g.__composerExtend,f.__vueI18nExtend=g.__vueI18nExtend}let b=null;!t&&n&&(b=Rb(d,f.global)),__VUE_I18N_FULL_INSTALL__&&xb(d,f,...m),__VUE_I18N_LEGACY_API__&&t&&d.mixin(_b(o,o.__composer,f));const w=d.unmount;if(d.unmount=()=>{b&&b(),f.dispose(),w()},process.env.NODE_ENV!=="production"){if(!await ob(d,f))throw wt(Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const p=sl();if(t){const O=o;O.__enableEmitter&&O.__enableEmitter(p)}else{const O=o;O[cn]&&O[cn](p)}p.on("*",fs)}},get global(){return o},dispose(){r.stop()},__instances:s,__getInstance:c,__setInstance:h,__deleteInstance:u};return f}function Ht(i={}){const e=l.getCurrentInstance();if(e==null)throw wt(Me.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw wt(Me.NOT_INSTALLED);const t=Ab(e),n=Pb(t),s=tu(e),r=Qb(i,s);if(r==="global")return iu(n,i,s),n;if(r==="parent"){let c=Tb(t,e,i.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Di(br(Fi.NOT_FOUND_PARENT_SCOPE)),c=n),c}const o=t;let a=o.__getInstance(e);if(a==null){const c=it({},i);"__i18n"in s&&(c.__i18n=s.__i18n),n&&(c.__root=n),a=xl(c),o.__composerExtend&&(a[wl]=o.__composerExtend(a)),$b(o,e,a),o.__setInstance(e,a)}return a}function Cb(i,e,t){const n=l.effectScope(),s=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Ql(i)):n.run(()=>xl(i));if(s==null)throw wt(Me.UNEXPECTED_ERROR);return[n,s]}function Ab(i){const e=l.inject(i.isCE?Sb:i.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw wt(i.isCE?Me.NOT_INSTALLED_WITH_PROVIDE:Me.UNEXPECTED_ERROR);return e}function Qb(i,e){return ur(i)?"__i18n"in e?"local":"global":i.useScope?i.useScope:"local"}function Pb(i){return i.mode==="composition"?i.global:i.global.__composer}function Tb(i,e,t=!1){let n=null;const s=e.root;let r=Eb(e,t);for(;r!=null;){const o=i;if(i.mode==="composition")n=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(r);a!=null&&(n=a.__composer,t&&n&&!n[eu]&&(n=null))}if(n!=null||s===r)break;r=r.parent}return n}function Eb(i,e=!1){return i==null?null:e&&i.vnode.ctx||i.parent}function $b(i,e,t){let n=null;l.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,n=sl();const s=t;s[cn]&&s[cn](n),n.on("*",fs)}},e),l.onUnmounted(()=>{const s=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(n&&n.off("*",fs),s[hs]&&s[hs](),delete e.vnode.el.__VUE_I18N__),i.__deleteInstance(e);const r=s[wl];r&&(r(),delete s[wl])},e)}const Nb=["locale","fallbackLocale","availableLocales"],wu=["t","rt","d","n","tm","te"];function Rb(i,e){const t=Object.create(null);return Nb.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw wt(Me.UNEXPECTED_ERROR);const o=l.isRef(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),i.config.globalProperties.$i18n=t,wu.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw wt(Me.UNEXPECTED_ERROR);Object.defineProperty(i.config.globalProperties,`$${s}`,r)}),()=>{delete i.config.globalProperties.$i18n,wu.forEach(s=>{delete i.config.globalProperties[`$${s}`]})}}if(J0(),x0(t0),S0(_0),C0(Ah),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const i=ln();i.__INTLIFY__=!0,i0(i.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const ku="3.7.7",Vb=ku,$n=typeof Buffer=="function",xu=typeof TextDecoder=="function"?new TextDecoder:void 0,Su=typeof TextEncoder=="function"?new TextEncoder:void 0,Lb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ds=Array.prototype.slice.call(Lb),yr=(i=>{let e={};return i.forEach((t,n)=>e[t]=n),e})(ds),Mb=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ct=String.fromCharCode.bind(String),Cu=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):i=>new Uint8Array(Array.prototype.slice.call(i,0)),Au=i=>i.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Qu=i=>i.replace(/[^A-Za-z0-9\+\/]/g,""),Pu=i=>{let e,t,n,s,r="";const o=i.length%3;for(let a=0;a<i.length;){if((t=i.charCodeAt(a++))>255||(n=i.charCodeAt(a++))>255||(s=i.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=t<<16|n<<8|s,r+=ds[e>>18&63]+ds[e>>12&63]+ds[e>>6&63]+ds[e&63]}return o?r.slice(0,o-3)+"===".substring(o):r},Tl=typeof btoa=="function"?i=>btoa(i):$n?i=>Buffer.from(i,"binary").toString("base64"):Pu,El=$n?i=>Buffer.from(i).toString("base64"):i=>{let t=[];for(let n=0,s=i.length;n<s;n+=4096)t.push(ct.apply(null,i.subarray(n,n+4096)));return Tl(t.join(""))},wr=(i,e=!1)=>e?Au(El(i)):El(i),Bb=i=>{if(i.length<2){var e=i.charCodeAt(0);return e<128?i:e<2048?ct(192|e>>>6)+ct(128|e&63):ct(224|e>>>12&15)+ct(128|e>>>6&63)+ct(128|e&63)}else{var e=65536+(i.charCodeAt(0)-55296)*1024+(i.charCodeAt(1)-56320);return ct(240|e>>>18&7)+ct(128|e>>>12&63)+ct(128|e>>>6&63)+ct(128|e&63)}},Db=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Tu=i=>i.replace(Db,Bb),Eu=$n?i=>Buffer.from(i,"utf8").toString("base64"):Su?i=>El(Su.encode(i)):i=>Tl(Tu(i)),Nn=(i,e=!1)=>e?Au(Eu(i)):Eu(i),$u=i=>Nn(i,!0),vb=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Zb=i=>{switch(i.length){case 4:var e=(7&i.charCodeAt(0))<<18|(63&i.charCodeAt(1))<<12|(63&i.charCodeAt(2))<<6|63&i.charCodeAt(3),t=e-65536;return ct((t>>>10)+55296)+ct((t&1023)+56320);case 3:return ct((15&i.charCodeAt(0))<<12|(63&i.charCodeAt(1))<<6|63&i.charCodeAt(2));default:return ct((31&i.charCodeAt(0))<<6|63&i.charCodeAt(1))}},Nu=i=>i.replace(vb,Zb),Ru=i=>{if(i=i.replace(/\s+/g,""),!Mb.test(i))throw new TypeError("malformed base64.");i+="==".slice(2-(i.length&3));let e,t="",n,s;for(let r=0;r<i.length;)e=yr[i.charAt(r++)]<<18|yr[i.charAt(r++)]<<12|(n=yr[i.charAt(r++)])<<6|(s=yr[i.charAt(r++)]),t+=n===64?ct(e>>16&255):s===64?ct(e>>16&255,e>>8&255):ct(e>>16&255,e>>8&255,e&255);return t},$l=typeof atob=="function"?i=>atob(Qu(i)):$n?i=>Buffer.from(i,"base64").toString("binary"):Ru,Vu=$n?i=>Cu(Buffer.from(i,"base64")):i=>Cu($l(i).split("").map(e=>e.charCodeAt(0))),Lu=i=>Vu(Mu(i)),Ib=$n?i=>Buffer.from(i,"base64").toString("utf8"):xu?i=>xu.decode(Vu(i)):i=>Nu($l(i)),Mu=i=>Qu(i.replace(/[-_]/g,e=>e=="-"?"+":"/")),Nl=i=>Ib(Mu(i)),Ub=i=>{if(typeof i!="string")return!1;const e=i.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},Bu=i=>({value:i,enumerable:!1,writable:!0,configurable:!0}),Du=function(){const i=(e,t)=>Object.defineProperty(String.prototype,e,Bu(t));i("fromBase64",function(){return Nl(this)}),i("toBase64",function(e){return Nn(this,e)}),i("toBase64URI",function(){return Nn(this,!0)}),i("toBase64URL",function(){return Nn(this,!0)}),i("toUint8Array",function(){return Lu(this)})},vu=function(){const i=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Bu(t));i("toBase64",function(e){return wr(this,e)}),i("toBase64URI",function(){return wr(this,!0)}),i("toBase64URL",function(){return wr(this,!0)})},Fb={version:ku,VERSION:Vb,atob:$l,atobPolyfill:Ru,btoa:Tl,btoaPolyfill:Pu,fromBase64:Nl,toBase64:Nn,encode:Nn,encodeURI:$u,encodeURL:$u,utob:Tu,btou:Nu,decode:Nl,isValid:Ub,fromUint8Array:wr,toUint8Array:Lu,extendString:Du,extendUint8Array:vu,extendBuiltins:()=>{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/GoeK4AAiLnpPA0IIADiya/msQIIgJibztOAAAIgnvxqHiuAAIi56TwNCCAA4smv5rECCICYm87TgAACIJ78ah4rgACIuek8DQggAOLJr+axAgiAmJvO04AAAiCe/GoeK4AAiLnpPA0IIADiya/msQIIgJibztOAALJYrchfHv97Rk0/CO3JdJ5iTQXE2hOmrz9IBWRa6Kp+jdyT+WqPVfDSnzAlUz+YAiIUpPZ1Jj5bBQDEVm9G86TA4XB4tnyFg2kGCQsheCGmp/UjVmUFLN8NEqZiDoiwD1GWnct7UMC6QS8CCH2IBytWG6Np/1EEkDAoWaRaA1YbWInsUQwQski1Pqw2MOveYxbCvAeZBwaSar1YY2DmpVVxQKY7Wj//fwFr0htOa1w9YlJVoBgcxUqspZxkElVzub146DlqeL12sRLrduVSP5PjduUJfFOBUg35vcCqAWRRcj0Nw/BtHMfvm0pyQDMKBCjGcfx9OBzOlk/KtwSsCpB7wU6ZZWse/LtDBQIMIeyagLiVsXpAHK47ITekAIA0tJhMJb8CAJJfU67YkAIA0tBiMpX8CgBIfk25YkMKAEhDi8lU8isAIPk15YoNKQAgDS0mU8mvAIDk15QrNqQAgDS0mEwlvwL/AfRjWW6yHrZ9AAAAAElFTkSuQmCC",Yb={xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.12",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",pdf:"application/pdf",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",png:"image/png",gif:"image/gif",jpeg:"image/jpeg",jpg:"image/jpeg",mp3:"audio/mpeg",aac:"audio/aac",html:"text/html",css:"text/css",js:"text/javascript",json:"application/json",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",htm:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jsonld:"application/ld+json",mid:"audio/midi audio/x-midi",midi:"audio/midi audio/x-midi",mjs:"text/javascript",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",otf:"font/otf",rar:"application/x-rar-compressed",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tif:"image/tiff",tiff:"image/tiff",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xml:"text/xml",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip"},Zu=()=>{function i(o,a){try{const c=decodeURI(o.headers["content-disposition"]);let h=a||c.split("filename*=utf-8")[1];const u=h.substring(h.lastIndexOf(".")+1),f=new Blob([o.data],{type:Yb[u]??"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),m=(window.URL||window.webkitURL).createObjectURL(f),b=document.createElement("a");b.setAttribute("href",m);const w=h.lastIndexOf(".");h=`${h.slice(0,w)}_${Ne.dayjs().format("YYYYMMDD")+h.slice(w)}`,b.setAttribute("download",h),document.body.appendChild(b),b.click(),document.body.removeChild(b),window.URL.revokeObjectURL(m)}catch(c){console.error(c)}}function e({multiple:o=!1},a){const c=document.createElement("input");c.style.display="none",c.setAttribute("type","file"),o&&c.setAttribute("multiple",o),c.setAttribute("accept","application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,.xml"),document.body.appendChild(c),c.click(),c.addEventListener("change",h=>{a(h)&&document.body.removeChild(c)})}function t(o){return o?o.substring(o.lastIndexOf("/")+1):""}function n(o){return o?new URL(Object.assign({"../static/images/upload-excel.png":jb,"../static/images/upload-file.png":qb,"../static/images/upload-pdf.png":Xb,"../static/images/upload-word.png":Wb})[`../static/${o}`],self.location).href:""}function s(o,a,c){if(!a)return;let h=c||t(a);const u=h.lastIndexOf(".");h=`${h.slice(0,u)}_${Date.now()+h.slice(u)}`,o({url:a,method:"GET",responseType:"blob"}).then(f=>{const d=URL.createObjectURL(f.data),m=document.createElement("a");m.style.display="none",m.setAttribute("href",d),m.setAttribute("target","_blank"),m.setAttribute("download",h),document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(d)})}function r(o){if(!o)return;const a=document.createElement("input");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),Ne.ElNotification({title:"提示",message:"复制成功",type:"success",duration:2e3})}return{exportFile:i,importFile:e,getAssetsFileName:t,getAssetsFilePath:n,downloadFile:s,copy:r}},Iu={label:"name",value:"code",children:"children"},Uu={label:"key",value:"value"},kr={label:"name",value:"code",children:"children"},zb={year:"year",month:"month",date:"day"};/*! Element Plus Icons Vue v2.3.1 */var Gb=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Hb=Gb,Kb=l.defineComponent({name:"Delete",__name:"delete",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Jb=Kb,ey=l.defineComponent({name:"Download",__name:"download",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),ty=ey,iy=l.defineComponent({name:"MoreFilled",__name:"more-filled",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),ny=iy,sy=l.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),ry=sy;const bT="",ht=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},oy={class:"a-loading"},xr=ht({__name:"index",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("div",oy,t[0]||(t[0]=[l.createElementVNode("span",{class:"dot dot-spin"},[l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i")],-1)])))}},[["__scopeId","data-v-048c6c03"]]),wT="",ly={key:0,class:"table-link"},ay=["onClick"],cy={class:"no-image"},hy={key:4},Fu=ht({__name:"index",props:{pageKey:{type:String,default:""},defaultParams:{type:Array,default:()=>[]},matchData:{type:Object,default:()=>({})},maxHeight:{type:[String,Number],default:-1},tableConfig:{type:Object,default:()=>({})}},emits:["onClickRow","changeExpansionRow","refresh","load","operate"],setup(i,{expose:e,emit:t}){const n=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>jy),loadingComponent:xr,delay:20}),s=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>Xy),loadingComponent:xr,delay:20}),r=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>Yy),loadingComponent:xr,delay:20}),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Hy)),a=l.defineAsyncComponent(()=>Promise.resolve().then(()=>e1)),{t:c}=Ht(),h=l.inject("actModules"),u=l.inject("apiPrefix"),f=l.inject("request"),d=l.inject("themeColor"),m=rn.useRoute(),b=rn.useRouter(),w=t,g=i,p=()=>({pageLoading:!1,tableLoading:!1,tableTotal:0,tableSelection:[],tableQuery:{pageIndex:1,pageSize:10},showFormDialog:!1,showEditorPreDialog:!1,dialogTitle:"",editorDialogTitle:"",dialogData:{}});let O=l.reactive(p()),S=l.ref("loading"),y=l.ref([]),Q={},k=[],C=l.ref([]),T=l.ref([]),N=l.ref([]),_=l.ref([]),A=l.ref([]),x=l.ref({});const M=l.ref(null),E=l.ref(null),I=l.ref(null),B=l.ref(null),U=l.ref(0);let Z=l.ref({});const K=$=>f({url:`${u}/sysOperate/getMenuOfOperateByRole`,method:"post",data:$}),W=$=>f({url:`${u}/pages/getPageDetail?key=${$}`,method:"get"}),J=()=>{O=l.reactive(p()),S.value="loading",y.value=[],Q={},k=[],C.value=[],T.value=[],N.value=[],_.value=[],A.value=[],Z.value={}},fe=()=>{l.nextTick(()=>{setTimeout(()=>{var ue,le,re,te,ee,Oe,me;const $=((le=(ue=M.value)==null?void 0:ue.$el)==null?void 0:le.offsetHeight)||0,v=((te=(re=E.value)==null?void 0:re.$el)==null?void 0:te.offsetHeight)||0,he=((Oe=(ee=I.value)==null?void 0:ee.$el)==null?void 0:Oe.offsetHeight)||0,pe=$-v-he-6;U.value=g.maxHeight>0?g.maxHeight:(me=Q==null?void 0:Q.tableConfig)!=null&&me.isPagination?pe-48:pe},500)})},ce=()=>[...ni(k)],ye=$=>{B.value.updateSelection($)},G=()=>O.tableSelection,D=async()=>{await Vt(k),w("refresh")},V=$=>{if(!$||!$.tableQueryDefaultValue)return;const he=Ee($)["value-format"]||"YYYY-MM-DD HH:mm:ss";if($.fieldType=="date"&&$.tableQueryDefaultValue=="nowYear")return Ne.dayjs().format(he);if($.fieldType=="date"&&$.tableQueryDefaultValue=="yearAgo")return Ne.dayjs().subtract(1,"year").format(he);if($.fieldType=="dateRange"&&$.tableQueryDefaultValue.includes("&")){const pe=$.tableQueryDefaultValue.split("&");return[Ne.dayjs(pe[0]).subtract(6,"month").format(he),Ne.dayjs(pe[1]).format(he)]}if($.fieldType=="dateRange"&&$.tableQueryDefaultValue=="yearAgo")return[Ne.dayjs().subtract(1,"year").format(he),Ne.dayjs().format(he)];if($.fieldType=="dateRange"&&$.tableQueryDefaultValue=="sixMonthsAgo")return[Ne.dayjs().subtract(6,"month").format(he),Ne.dayjs().format(he)]},q=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const pe=(v.row[$.fieldKey]??"").split(";"),ue=pe&&pe.length?pe[0]:"",le=ue.substring(ue.lastIndexOf(".")+1);return/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/.test(le)},H=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const pe=(v.row[$.fieldKey]??"").split(";");return pe&&pe.length?pe[0]:""},Fe=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const he=v.row[$.fieldKey]??null;return he?he.split(";"):[]},Yt=$=>$==="true",Ee=$=>new Function("",$.fieldUiProps)()||{},We=async($,v)=>Reflect.has(h,`/src/views${$}.vue`)?l.markRaw(l.defineAsyncComponent(h[`/src/views${$}.vue`])):null,Li=async($,v)=>Reflect.has(h,`/src/views${$}.vue`)?l.markRaw(l.defineAsyncComponent({loader:h[`/src/views${$}.vue`],loadingComponent:xr,delay:20})):null,ii=async()=>{Q.buttons=await Promise.all(Q.buttons.map(async $=>{if($.isCustomBtn&&$.customType=="component"){const{customComponentUrl:v,customComponentName:he}=$,pe=await We(v);$[he]=pe}return $}))},Si=async()=>{const $=Q.fields.filter(v=>(v.formCustomComponentes??[]).some(he=>he.permissionCode=="tableShow"&&he.isFieldCustom));A.value=await Promise.all($.map(async v=>{const he=v.formCustomComponentes.find(re=>re.permissionCode=="tableShow"),{customComponentUrl:pe,customComponentName:ue}=he,le=await We(pe);return v.customTableHeaderName=ue,v.customTableHeaderUrl=pe,v[`customTableHeaderInstance_${ue}`]=le,v.headerItem={label:v.fieldName,prop:v.fieldKey,align:v.tableCellAlignType,width:v.tableCellWidthType=="default"?v.tableCellWidth:"",minWidth:v.tableCellWidthType=="min"?v.tableCellWidth:"",showOverflowTooltip:v.isTableCellOverflowTooltip||!1,sort:v.isTableCellSort||!1},v}))},Ze=($,v)=>{switch($){case"array":return typeof v=="string"?v.toString().split().sort((he,pe)=>he.sort-pe.sort):[v];case"number":return Number(v);case"boolean":return!!v;default:return v}},R=($,v)=>v[$.fieldKey]?v[$.fieldKey].toString().includes("T")?Ne.dayjs(v[$.fieldKey]).format("YYYY-MM-DD HH:mm:ss"):v[$.fieldKey]:"";function P($,v={}){return $.replace(/\{([^}]+)\}/g,(he,pe)=>{const ue=pe.trim().split(".");let le=v;for(const re of ue){if(!le||typeof le!="object")break;le=le[re]}return le!==void 0?le:he})}const X=$=>$?P($,g.matchData):"",Y=($,v,he)=>{switch($){case"LessThanOrEqual":return v<=he;case"LessThan":return v<he;case"GreaterThanOrEqual":return v>=he;case"GreaterThan":return v>he;case"NotEqual":return v!=he;case"Equal":return v==he;default:return v==he}},Re=($,v)=>{if(!$.matchFields.length)return!0;const he=re=>re.matchType=="default"?v[re.matchFieldName]:g.matchData[re.matchType][re.matchFieldName];let ue=$.matchFields.reduce((re,te,ee)=>{const Oe=he(te),me=Y(te.matchCondition,Oe,te.fieldValue==""?null:te.fieldValue=="true"||te.fieldValue=="false"?Yt(te.fieldValue):te.fieldValue);return re+=me,ee!==$.matchFields.length-1&&(re+=te.spliceCondition||"&&"),re},"").split("||"),le=ue.reduce((re,te,ee)=>(re+=`(${te})`,ee<ue.length-1&&(re+="||"),re),"");return new Function(`return ${le}`)()},qe=($,v)=>Object.keys(v).length?y.value.some(he=>he.unique==$.permissionCode)&&Re($,v):!1,Qe=async $=>{try{O.pageLoading=!0;const v=g.pageKey??m.params.key,{data:{pageConfigs:he}}=await W(v);return Q=he.pageConfig?JSON.parse(he.pageConfig):{},O.tableQuery.pageSize=Q.tableConfig.pageSize||10,O.pageLoading=!1,Promise.resolve(Object.keys(Q).length)}catch(v){O.pageLoading=!1,console.error(v)}},F=async($=[],v={},he=!0,pe=!1)=>{try{const ue=$.filter(te=>["select","multipleSelect","selectIcon","switch","virtualizedSelect","virtualizedMultipleSelect","fullLoadTreeSelect","provinceCascade"].includes(te.fieldType)&&(!Reflect.has(te,"dataList")||!te.dataList.length||pe)),re=(await Promise.allSettled(ue.map(async te=>{const ee=te.postRequestParams.filter(at=>at.submitType==="default").reduce((at,si)=>(at[si.submitName]=Ze(si.paramsType,si.submitValue),at),{}),Oe=te.postRequestParams.filter(at=>at.submitType==="match").reduce((at,si)=>(at[si.submitName]=Ze(si.paramsType,v[si.submitValue][si.submitName]),at),{}),me=te.postRequestParams.filter(at=>at.submitType==="dynamic").map(at=>({field:at.submitName,operate:at.submitMatchType,value:Ze(at.paramsType,at.submitValue)}));let Ke={};Object.keys(ee).length&&(Ke={...Ke,...ee}),Object.keys(Oe).length&&(Ke={...Ke,...Oe}),me.length&&(Ke.dynamicFilters=me);const{data:Ci}=await f({url:te.fieldRequestUrl,method:te.fieldRequestType||"GET",data:Ke});return Promise.resolve({...te,dataList:Ci||[]})}))).filter(te=>te.status==="fulfilled"&&Reflect.has(te,"value")).map(te=>te.value);return he&&Q.fields.forEach(te=>{const ee=re.find(Oe=>te.fieldName==Oe.fieldName&&te.fieldKey==Oe.fieldKey);ee&&(te.dataList=(ee==null?void 0:ee.dataList)??[])}),re}catch(ue){console.error(ue)}},z=l.computed(()=>{const{tableConfig:{tableMoreBtnSplitNumber:$}}=Q;return!$||$>=T.value.length}),$e=()=>{const{tableConfig:{tableMoreBtnSplitNumber:$}}=Q;return z.value?T.value:T.value.slice(0,$)},Ye=()=>{var v;const{tableConfig:{tableMoreBtnSplitNumber:$}}=Q;return z.value?[]:T.value.slice($,(v=T.value)==null?void 0:v.length)},Mi=async $=>{try{const v=($||[]).filter(le=>le.useScenes.some(re=>["tableShow"].includes(re))).sort((le,re)=>le.sort-re.sort),he=["editor","upload","date"];let pe=v.map(le=>{const re=le.formCustomComponentes.some(te=>te.permissionCode=="tableShow"&&te.isFieldCustom);return{label:le.fieldName,prop:le.fieldKey,align:le.tableCellAlignType,width:le.tableCellWidthType=="default"?le.tableCellWidth:"",minWidth:le.tableCellWidthType=="min"?le.tableCellWidth:"",showOverflowTooltip:le.isTableCellOverflowTooltip||!1,sort:le.isTableCellSort||!1,render:!!le.fieldRequestUrl||le.tableCellContentType=="link"||he.includes(le.fieldType),isCustomTableHeader:re}});Q.tableConfig.isSerialNumber&&pe.unshift({prop:"serialNumber",width:80}),Q.tableConfig.isCheckRow&&pe.unshift({prop:"checkbox",width:50});const ue=T.value.filter(le=>y.value.some(re=>re.unique==le.permissionCode));Q.tableConfig.isOperateRow&&ue.length&&pe.push({label:c("act.operate"),prop:"operate",width:Q.tableConfig.tableOperateCellWidth,render:!0,fixed:"right"}),_.value=v.filter(le=>!!le.fieldRequestUrl&&le.useScenes.includes("tableShow")||le.tableCellContentType=="link"||he.includes(le.fieldType)),C.value=pe}catch(v){console.error(v)}},rs=()=>{T.value=(Q.buttons||[]).filter($=>$.permissionCode!==1001&&$.btnPostion.includes("table")).sort(($,v)=>$.sort-v.sort).map($=>($.loading=!1,$.btnAlias&&($.btnName=$.btnAlias),$))},Bi=()=>Q.fields.filter($=>$.useScenes.includes("tableSearch")).map($=>(["date","dateRange"].includes($.fieldType)?$.queryValue=$.tableQueryDefaultValue?$.tableQueryDefaultValue:V($):$.queryValue=($==null?void 0:$.tableQueryDefaultValue)||void 0,g.defaultParams.some(v=>{v.field==$.fieldKey&&v.operate===$.tableQueryCondition&&($.queryValue=v.value)}),$)),ni=($,v="queryValue")=>$?($||[]).filter(pe=>!!pe[v]).reduce((pe,ue)=>{var re;const le=Ee(ue);if(ue.fieldType==="date"&&le["value-format"]!=="YYYY"){const te=le!=null&&le.dayJsType?zb[(re=ue.fieldUiProps)==null?void 0:re.dayJsType]:"day",ee=le["value-format"]||"YYYY-MM-DD HH:mm:ss";pe=[...pe,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:Ne.dayjs(ue[v]).startOf(te).format(ee)},{field:ue.fieldKey,operate:"LessThanOrEqual",value:Ne.dayjs(ue[v]).endOf(te).format(ee)}]}else if(ue.fieldType==="dateRange"&&ue[v].length)if(ue.fieldKey.includes("&")){const te=ue.fieldKey.split("&")||[];pe=[...pe,{field:te[0],operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:te[1],operate:"LessThanOrEqual",value:ue.queryValue[1]}]}else pe=[...pe,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:ue.fieldKey,operate:"LessThanOrEqual",value:ue.queryValue[1]}];else if(["provinceCascade"].includes(ue.fieldType)&&ue[v].length){const te=(ue.fieldKey.split("&")||[]).map((ee,Oe)=>({field:ee,operate:"Equal",value:ue.queryValue[Oe]}));pe=[...pe,...te]}else return Array.isArray(ue[v])&&!ue[v].length?[...pe]:[...pe,{field:ue.fieldKey,operate:ue.tableQueryCondition,value:ue.tableQueryCondition==="In"&&ue[v]&&typeof ue[v]=="string"?ue[v].split(";"):ue[v]=="true"||ue[v]=="false"?Yt(ue[v]):ue[v]}];return pe},[]):[],ph=($,v)=>{if(!$.dataList||!Reflect.has(v,$.fieldKey))return"";const he=v[$.fieldKey];if(!he&&he!==0&&he!==!1)return"";const pe=Ee($),ue=Object.assign({key:"key",value:"value"},pe.props||{});return["virtualizedSelect","virtualizedMultipleSelect"].includes($.fieldType)&&(ue.key=ue.label),["multipleSelect","select","switch","virtualizedSelect","virtualizedMultipleSelect","selectIcon"].includes($.fieldType)?($.dataList||[]).filter(le=>{const re=$.fieldType==="selectIcon"?`btn-${le[ue.value]}`:le[ue.value],te=re=="true"||re=="false"?Yt(re):re;return Array.isArray(he)?he.some(ee=>ee==re==ee):typeof he=="string"?he.split(";").includes(te):he==te}).map(le=>le[ue.key]).join(";"):he},Vt=async($=[])=>{try{O.tableLoading=!0;const v=g.defaultParams.filter(le=>!(Q.fields??[]).some(re=>re.fieldKey===le.field&&re.tableQueryCondition===le.operate&&re.useScenes.includes("tableSearch"))),he=Q.tableConfig.defaultParams.map(le=>({field:le.submitFieldName,operate:le.matchValue,value:Ze(le.submitFieldType,le.defaultValue)})),pe=[...v,...he,...ni($)];Q.tableConfig.isPagination||(O.tableQuery.pageSize=9999);const{data:ue}=await f({url:Q.tableConfig.dataUrl,method:"POST",data:{...O.tableQuery,dynamicFilters:pe}});O.tableTotal=ue.totalCount||0,N.value=ue.datas||[],O.tableLoading=!1}catch(v){O.tableLoading=!1,console.error(v)}},WO=async()=>{try{S.value="loading";const $=g.pageKey;if(!await Qe($)){S.value="end";return}await Si(),await ii(),await F(Q.fields.filter(le=>le.useScenes.some(re=>["tableSearch","tableShow"].includes(re)))),S.value="success";const he=sessionStorage.getItem("accessToken"),ue=JSON.parse(Fb.decode(he.split(".")[1]))["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];y.value=(await K({roleId:ue,key:$})).data.datas||[],rs(),Mi(Q.fields),fe(),k=Bi(),(!Reflect.has(Q.tableConfig,"isExecuteImmediatelyTableApi")||Q.tableConfig.isExecuteImmediatelyTableApi)&&await Vt(k),w("load"),console.log(Q)}catch($){console.error($),S.value="end"}};l.provide("globalProps",g),l.provide("loadComponents",We),l.provide("defineAsyncLoadComponents",Li),l.provide("stringToBoolean",Yt),l.provide("matchCondition",Y),l.provide("menuPermissionBtns",y),l.provide("getTableData",Vt),l.provide("tableBtnRefs",x.value),l.provide("formatDataType",Ze),l.provide("getFieldUiProps",Ee),l.provide("disposeRequestData",F),l.provide("disposeDate",V),l.provide("getDefaultQueryValues",Bi),l.watch(()=>g.pageKey,($,v)=>{J(),WO()},{immediate:!0});const YO=async($,v)=>{k=$,await Vt($),w("refresh"),v(!0)},hT=$=>{w("operate",$),Vt(k)},tl=($,v)=>{const{exportFile:he,importFile:pe,downloadFile:ue}=Zu();if($.isCustomBtn){if($.customType=="component"&&!Reflect.has($,[$.customComponentName])){Ne.ElNotification({title:"提示",message:`当前自定义按钮未创建vue文件,请在路径【/src/views${$.customComponentUrl}】下创建vue文件`,type:"warning",duration:2500});return}if($.customType=="code"){try{new Function("router","route","data","configItem",$.codeStr)(b,m,v,$)}catch(te){console.error(te)}return}const re=`${$.customComponentName}-${$.permissionCode}`;x.value[re]&&x.value[re].onTigger({rowData:v,tableSelection:O.tableSelection});return}if($.submitWay=="associationSubTable"){Ne.ElNotification({title:c("act.tip"),message:c("act.developing"),type:"warning",duration:2500});return}if(["export","exportUrl"].includes($.submitWay)){$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0;let re=[...g.defaultParams,...ni(k)],te=($.submitFields||[]).reduce((Oe,me)=>{if(me.matchType=="default")Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:Ze(me.submitFieldType,me.matchFieldName)}];else if(me.matchType=="match"){const Ke=me.submitFieldMatchOrigin==="rowData"?v:g.matchData[me.submitFieldMatchOrigin];Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:Ze(me.submitFieldType,Ke[me.matchFieldName])}]}else if(me.matchType=="selection"){const Ke=O.tableSelection.map(Ci=>Ci[me.matchFieldName]);Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:me.submitFieldType==="string"?Ke.join():Ke}]}return Oe},[]);const ee=[...re,...te];f({url:X($.requestUrl),method:"post",data:{dynamicFilters:ee},responseType:["exportUrl"].includes($.submitWay)?"json":"blob"}).then(Oe=>{$.submitWay=="exportUrl"?ue(f,Oe.data):he(Oe),w("operate",$),$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1}).catch(Oe=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1});return}if(["import","batchImport"].includes($.submitWay)){pe({multiple:$.submitWay=="batchImport"},re=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0;const te=new FormData;if(($.submitFields||[]).forEach(ee=>{var Oe,me;if(ee.matchType=="default")te.append(ee.submitFieldName,Ze(ee.submitFieldType,ee.matchFieldName));else if(ee.matchType=="match")(Oe=Object.keys(v))!=null&&Oe.length&&te.append(ee.submitFieldName,Ze(ee.submitFieldType,v[ee.matchFieldName]));else if(ee.matchType=="query"){const Ke=((me=k.find(Ci=>Ci.fieldKey==ee.matchFieldName))==null?void 0:me.queryValue)??null;te.append(ee.submitFieldName,Ze(ee.submitFieldType,Ke))}}),$.submitWay=="import")te.append($.importFileName||"file",re.target.files[0]);else for(let ee of re.target.files)te.append($.importFileName||"files",ee);return f({url:X($.requestUrl),method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:te}).then(ee=>{Ne.ElNotification({title:c("act.tip"),message:`${ee.msg}`,type:"success",duration:2500}),w("operate",$),Vt(k),$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1}).catch(()=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1})});return}if($.submitWay==="executeApi"){let re=($.submitFields||[]).reduce((te,ee)=>{var Oe;if(ee.matchType=="default")te[ee.submitFieldName]=Ze(ee.submitFieldType,ee.matchFieldName);else if(ee.matchType=="match"){const me=ee.submitFieldMatchOrigin==="rowData"?v:g.matchData[ee.submitFieldMatchOrigin];te[ee.submitFieldName]=Ze(ee.submitFieldType,me[ee.matchFieldName])}else ee.matchType=="query"&&(te[ee.submitFieldName]=((Oe=k.find(me=>me.fieldKey==ee.matchFieldName))==null?void 0:Oe.queryValue)??null);return te},{});if($.btnPostion==="header"&&$.isPromptVerificationSelectTable=="1"){if(!Q.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!O.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}if($.btnPostion==="header"){const te=($.submitFields||[]).filter(ee=>ee.matchType=="selection").reduce((ee,Oe)=>(ee[Oe.submitFieldName]=O.tableSelection.reduce((me,Ke)=>(Oe.submitFieldType==="array"?me=[...me,...Ze(Oe.submitFieldType,Ke[Oe.matchFieldName])]:me=[...me,Ze(Oe.submitFieldType,Ke[Oe.matchFieldName])],me),[]),ee),{});Object.assign(re,te)}$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0,f({url:X($.requestUrl),method:"post",data:re}).then(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1,Ne.ElNotification({type:"success",title:c("act.tip"),message:`${$.btnName}${c("act.success")}`,duration:2500}),w("operate",$),Vt(k)}).catch(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1});return}if($.submitWay==="messageBox"){if($.btnPostion==="header"&&$.isPromptVerificationSelectTable=="1"){if(!Q.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!O.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}Ne.ElMessageBox.confirm(`${c("act.isExecuteOperate")}?`,c("act.tip"),{confirmButtonText:c("act.enter"),cancelButtonText:c("act.cancel"),type:"warning"}).then(()=>{let re=($.submitFields||[]).reduce((te,ee)=>{var Oe;if(ee.matchType=="default")te[ee.submitFieldName]=Ze(ee.submitFieldType,ee.matchFieldName);else if(ee.matchType=="match"){const me=ee.submitFieldMatchOrigin==="rowData"?v:g.matchData[ee.submitFieldMatchOrigin];te[ee.submitFieldName]=Ze(ee.submitFieldType,me[ee.matchFieldName])}else ee.matchType=="query"&&(te[ee.submitFieldName]=((Oe=k.find(me=>me.fieldKey==ee.matchFieldName))==null?void 0:Oe.queryValue)??null);return te},{});if($.btnPostion==="header"){const te=($.submitFields||[]).filter(ee=>ee.matchType=="selection").reduce((ee,Oe)=>(ee[Oe.submitFieldName]=O.tableSelection.reduce((me,Ke)=>(Oe.submitFieldType==="array"?me=[...me,...Ze(Oe.submitFieldType,Ke[Oe.matchFieldName])]:me=[...me,Ze(Oe.submitFieldType,Ke[Oe.matchFieldName])],me),[]),ee),{});Object.assign(re,te)}$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0,f({url:X($.requestUrl),method:"post",data:re}).then(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1,Ne.ElNotification({type:"success",title:c("act.tip"),message:`${$.btnName}${c("act.success")}`,duration:2500}),w("operate",$),Vt(k)}).catch(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1})}).catch(re=>{});return}if($.btnPostion==="header"&&$.submitWay==="dialog"&&($.submitFields||[]).some(re=>re.submitFieldMatchOrigin==="selections")&&!O.tableSelection.length){if(!Q.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!O.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}return}let le=(Q.fields||[]).filter(re=>re.useScenes.includes($.permissionCode)).map(re=>(re.customFiledsComponentes=re.formCustomComponentes.find(te=>te.permissionCode==$.permissionCode)||{},re));if(!le.length){Ne.ElNotification({title:c("act.tip"),message:c("act.buttonBindField"),type:"warning",duration:2500});return}if($.submitWay==="dialog"){O.dialogTitle=$.btnName,O.dialogData={dataItem:{...$},rowData:{...v},selections:O.tableSelection||[],formConfig:Q.formConfig,formList:le},O.showFormDialog=!0;return}},uT=($,v,he)=>{w("onClickRow",$,v,he)},fT=($,v)=>{Z.value=$,w("changeExpansionRow",$,v)},dT=($,v)=>{O.editorDialogTitle=`${c("act.preview")}${$.fieldName}`,O.dialogData={...v,editorContent:v[$.fieldKey]},O.showEditorPreDialog=!0};return e({loadData:WO,getDynamicFiltersData:ce,getTableData:Vt,getTableSelection:G,setTableSelection:ye}),($,v)=>{const he=l.resolveComponent("el-table-column"),pe=l.resolveComponent("el-image"),ue=l.resolveComponent("el-link"),le=l.resolveComponent("a-svg-icon"),re=l.resolveComponent("el-button"),te=l.resolveComponent("el-dropdown-item"),ee=l.resolveComponent("el-dropdown-menu"),Oe=l.resolveComponent("el-dropdown"),me=l.resolveComponent("el-empty"),Ke=l.resolveComponent("el-card"),Ci=l.resolveDirective("debounce"),at=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createBlock(Ke,{class:"act-module",ref_key:"actModuleRef",ref:M,shadow:"never"},{default:l.withCtx(()=>{var si,zO;return[l.unref(S)==="success"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(l.unref(n),{ref_key:"queryModuleRef",ref:E,data:l.unref(Q),onReset:YO,onSearch:YO},null,8,["data"]),l.createVNode(l.unref(s),{ref_key:"headerButtonsModuleRef",ref:I,data:l.unref(Q),onOnOperate:tl},null,8,["data"]),l.createVNode(l.unref(r),{ref_key:"aTableRef",ref:B,loading:l.unref(O).tableLoading,total:l.unref(O).tableTotal,tableQuery:l.unref(O).tableQuery,"onUpdate:tableQuery":v[0]||(v[0]=_e=>l.unref(O).tableQuery=_e),selection:l.unref(O).tableSelection,"onUpdate:selection":v[1]||(v[1]=_e=>l.unref(O).tableSelection=_e),headers:l.unref(C),data:l.unref(N),showPagination:(zO=(si=l.unref(Q))==null?void 0:si.tableConfig)==null?void 0:zO.isPagination,tableConfig:g.tableConfig,maxHeight:U.value,onRefresh:D,onOnRowClick:uT,onChangeExpand:fT},l.createSlots({operate:l.withCtx(({scope:_e})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList($e(),(ge,ri)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:ri},[qe(ge,_e.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[ge.isCustomBtn&&ge.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(ge[ge.customComponentName]),{key:0,ref_for:!0,ref:Cn=>l.unref(x)[`${ge.customComponentName}-${ge.permissionCode}`]=Cn,buttonData:ge,scope:_e,onRefresh:Vt},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(re,{class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`],onClick:Cn=>tl(ge,_e.row)},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(le,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading","onClick"])),[[Ci]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(re,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`],onClick:Cn=>tl(ge,_e.row)},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(le,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading","onClick"])),[[Ci]])],64)):l.createCommentVNode("",!0)],64))),128)),z.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Oe,{key:0,class:"table-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode(ee,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ye(),(ge,ri)=>(l.openBlock(),l.createBlock(te,{key:ri,onClick:Cn=>tl(ge,_e.row)},{default:l.withCtx(()=>[qe(ge,_e.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[ge.isCustomBtn&&ge.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(ge[ge.customComponentName]),{key:0,ref_for:!0,ref:Cn=>l.unref(x)[`${ge.customComponentName}-${ge.permissionCode}`]=Cn,buttonData:ge,scope:_e,onRefresh:Vt},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(re,{class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`]},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(le,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading"])),[[Ci]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(re,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`]},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(le,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading"])),[[Ci]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:l.withCtx(()=>[l.createVNode(re,{class:"table-btn-more",icon:l.unref(ny),size:"small",circle:""},null,8,["icon"])]),_:2},1024))]),_:2},[l.renderList(l.unref(A),(_e,ge)=>({name:_e.fieldKey,fn:l.withCtx(()=>[_e[`customTableHeaderInstance_${_e.customTableHeaderName}`]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(_e[`customTableHeaderInstance_${_e.customTableHeaderName}`]),{key:0,data:_e,configData:l.unref(Q),rowData:l.unref(Z)},null,8,["data","configData","rowData"])):(l.openBlock(),l.createBlock(he,{key:1,label:_e.fieldName+l.unref(c)("act.customTableHeader"),width:"260"},null,8,["label"]))])})),l.renderList(l.unref(_),(_e,ge)=>({name:_e.fieldKey,fn:l.withCtx(({scope:ri})=>[_e.tableCellContentType=="link"?(l.openBlock(),l.createElementBlock("span",ly,l.toDisplayString(ri.row[_e.fieldKey]),1)):_e.fieldType=="editor"?(l.openBlock(),l.createElementBlock("span",{key:1,class:"table-link",onClick:Cn=>dT(_e,ri.row)},"点击预览",8,ay)):_e.fieldType=="upload"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[q(_e,ri)?(l.openBlock(),l.createBlock(pe,{key:0,class:"file-image",fit:"cover","preview-src-list":Fe(_e,ri),"preview-teleported":"",src:H(_e,ri)},{error:l.withCtx(()=>[l.createElementVNode("div",cy,l.toDisplayString(_e("act.noImage")),1)]),_:2},1032,["preview-src-list","src"])):(l.openBlock(),l.createBlock(ue,{key:1,type:"primary"}))],64)):_e.fieldType=="date"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createTextVNode(l.toDisplayString(R(_e,ri.row)),1)],64)):(l.openBlock(),l.createElementBlock("span",hy,l.toDisplayString(ph(_e,ri.row)),1))])}))]),1032,["loading","total","tableQuery","selection","headers","data","showPagination","tableConfig","maxHeight"])],64)):l.createCommentVNode("",!0),l.createVNode(l.unref(o),{visible:l.unref(O).showFormDialog,"onUpdate:visible":v[2]||(v[2]=_e=>l.unref(O).showFormDialog=_e),title:l.unref(O).dialogTitle,data:l.unref(O).dialogData,onRefresh:hT},null,8,["visible","title","data"]),l.createVNode(l.unref(a),{visible:l.unref(O).showEditorPreDialog,"onUpdate:visible":v[3]||(v[3]=_e=>l.unref(O).showEditorPreDialog=_e),title:l.unref(O).editorDialogTitle,data:l.unref(O).dialogData},null,8,["visible","title","data"]),l.unref(S)==="end"?(l.openBlock(),l.createBlock(me,{key:1,description:l.unref(c)("act.noConfigPage")},{image:l.withCtx(()=>[l.createVNode(le,{name:"config-nodata",width:"200",height:"200"})]),_:1},8,["description"])):l.createCommentVNode("",!0)]}),_:1})),[[at,l.unref(O).pageLoading]])}}},[["__scopeId","data-v-71fbc4b9"]]),uy=[{key:"按钮形式",value:"default"},{key:"文字形式",value:"text"}],fy=[{key:"顶部",value:"header"},{key:"表格",value:"table"}],dy=[{key:"主题色",value:"primary"},{key:"绿色",value:"success"},{key:"灰色",value:"info"},{key:"橙黄色",value:"warning"},{key:"红色",value:"danger"},{key:"浅蓝",value:"primary-light"}],py=[{key:"模态框",value:"dialog"},{key:"提示框",value:"messageBox"},{key:"导入",value:"import"},{key:"多文件导入",value:"batchImport"},{key:"导出(流)",value:"export"},{key:"导出(url)",value:"exportUrl"},{key:"直接执行接口",value:"executeApi"},{key:"关联子表",value:"associationSubTable"}],my=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],gy=[{key:"且",value:"&&"},{key:"或",value:"||"}],Oy=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"选择列",value:"selection"},{key:"查询条件",value:"query"}],_y=[{key:"默认匹配",value:"default"},{key:"用户信息变量",value:"userInfo"}],by=[{key:"组件",value:"component"},{key:"代码",value:"code"}],yy=[{key:"GET",value:"GET"},{key:"POST",value:"POST"}],ju=[{key:"隐式",value:"implicit"},{key:"输入框",value:"input"},{key:"数字输入框",value:"inputNumber"},{key:"textarea文本框",value:"textarea"},{key:"下拉单选框",value:"select"},{key:"虚拟下拉框",value:"virtualizedSelect"},{key:"下拉多选框",value:"multipleSelect"},{key:"虚拟下拉多选框",value:"virtualizedMultipleSelect"},{key:"树形下拉框",value:"fullLoadTreeSelect"},{key:"树形下拉框(懒加载)",value:"treeSelect"},{key:"级联下拉框",value:"provinceCascade"},{key:"时间框",value:"date"},{key:"时间范围框",value:"dateRange"},{key:"上传",value:"upload"},{key:"富文本",value:"editor"},{key:"switch开关",value:"switch"},{key:"下拉选择图标",value:"selectIcon"}],wy=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"dynamic",value:"dynamic"}],ky=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"}],xy=[{key:"居中",value:"center"},{key:"左对齐",value:"left"},{key:"右对齐",value:"right"}],Sy=[{key:"默认",value:"default"},{key:"链接",value:"link"},{key:"标签",value:"tag"}],Cy=[{key:"默认宽",value:"default"},{key:"最小宽",value:"min"}],qu=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],Ay=[{key:"左侧",value:"right"},{key:"上侧",value:"top"}],Qy=[{key:"是",value:"1"},{key:"否",value:"0"}],Xu=[{label:"表格配置",options:[{key:"表格查询",value:"tableSearch"},{key:"表格展示",value:"tableShow"}]},{label:"表单配置",options:[]}],Py={__name:"configForm",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({formRow:1,dialogWidth:800,formLabelWidth:120,formLabelPosition:"top"});let r=l.ref(null),o=l.ref(s());return l.watch(()=>n.modelValue,(a,c)=>{a&&(o.value=Object.assign(o.value,{...a}))},{deep:!0,immediate:!0}),e({formRef:r,form:o}),(a,c)=>{const h=l.resolveComponent("el-input-number"),u=l.resolveComponent("el-form-item"),f=l.resolveComponent("el-col"),d=l.resolveComponent("el-option"),m=l.resolveComponent("el-select"),b=l.resolveComponent("el-row"),w=l.resolveComponent("el-form"),g=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(g,{class:"form-card",shadow:"hover",header:"表单配置"},{default:l.withCtx(()=>[l.createVNode(w,{ref_key:"formRef",ref:r,model:l.unref(o),"label-suffix":":","label-width":"110px"},{default:l.withCtx(()=>[l.createVNode(b,null,{default:l.withCtx(()=>[l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"弹窗宽度"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).dialogWidth,"onUpdate:modelValue":c[0]||(c[0]=p=>l.unref(o).dialogWidth=p),min:800},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"排版列数"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).formRow,"onUpdate:modelValue":c[1]||(c[1]=p=>l.unref(o).formRow=p),min:1,max:4},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"label宽度"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).formLabelWidth,"onUpdate:modelValue":c[2]||(c[2]=p=>l.unref(o).formLabelWidth=p),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"label位置",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"formLabelPosition"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(o).formLabelPosition,"onUpdate:modelValue":c[3]||(c[3]=p=>l.unref(o).formLabelPosition=p),placeholder:"请选择"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ay),(p,O)=>(l.openBlock(),l.createBlock(d,{key:O+"labelPosition",label:p.key,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},xT="",Ty=ht({__name:"configTable",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({dataUrl:void 0,defaultParams:[],isCheckRow:!1,isOperateRow:!0,isPagination:!0,isSerialNumber:!0,isSort:!0,isExpandQuery:!1,isExecuteImmediatelyTableApi:!0,tableOperateCellWidth:160,pageSize:10,tableQueryLabelWidth:100,tableQueryRowWidth:5,tableMoreBtnSplitNumber:0,headerMoreBtnSplitNumber:0}),r=l.inject("conditionList")();let o=l.ref(null),a=l.ref(s());l.watch(()=>n.modelValue,(f,d)=>{if(f){if(!Object.keys(f).length)return;const m={...f,defaultParams:[...f.defaultParams||[]]};Object.keys(a.value).forEach(b=>{["defaultParams"].includes(b)?a.value[b]=[...m[b]||[]]:b==="tableMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"tableMoreBtnSplitNumber")?m[b]:0:b==="headerMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"headerMoreBtnSplitNumber")?m[b]:0:b==="isExecuteImmediatelyTableApi"?a.value[b]=Reflect.has(m,"isExecuteImmediatelyTableApi")?m[b]:!0:a.value[b]=m[b]})}},{deep:!0,immediate:!0});const c=()=>{a.value.defaultParams.push({submitFieldName:"",defaultValue:"",matchValue:"",submitFieldType:""})},h=f=>{a.value.defaultParams.splice(f,1)},u=f=>{f||(a.value.pageSize=10)};return e({formRef:o,form:a}),(f,d)=>{const m=l.resolveComponent("el-input"),b=l.resolveComponent("el-form-item"),w=l.resolveComponent("el-col"),g=l.resolveComponent("el-row"),p=l.resolveComponent("el-button"),O=l.resolveComponent("el-divider"),S=l.resolveComponent("el-option"),y=l.resolveComponent("el-select"),Q=l.resolveComponent("el-switch"),k=l.resolveComponent("el-input-number"),C=l.resolveComponent("el-form"),T=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(T,{class:"form-card",shadow:"hover",header:"表格配置"},{default:l.withCtx(()=>[l.createVNode(C,{ref_key:"formRef",ref:o,model:l.unref(a),"label-suffix":":","label-width":"120"},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:24},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格数据url",prop:"dataUrl",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(a).dataUrl,"onUpdate:modelValue":d[0]||(d[0]=N=>l.unref(a).dataUrl=N),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(O,{"content-position":"left"},{default:l.withCtx(()=>[d[14]||(d[14]=l.createTextVNode(" 表格默认参数配置 ")),l.createVNode(p,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:c})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a).defaultParams,(N,_)=>(l.openBlock(),l.createBlock(g,{class:"table-post-params",key:_},{default:l.withCtx(()=>[l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"字段",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:N.submitFieldName,"onUpdate:modelValue":A=>N.submitFieldName=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".matchValue"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:N.matchValue,"onUpdate:modelValue":A=>N.matchValue=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(A,x)=>(l.openBlock(),l.createBlock(S,{key:x,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"默认值",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".defaultValue"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:N.defaultValue,"onUpdate:modelValue":A=>N.defaultValue=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:N.submitFieldType,"onUpdate:modelValue":A=>N.submitFieldType=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(qu),(A,x)=>(l.openBlock(),l.createBlock(S,{key:x,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(O,{"content-position":"left"}),l.createVNode(w,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(p,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:A=>h(_)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"多选列"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isCheckRow,"onUpdate:modelValue":d[1]||(d[1]=N=>l.unref(a).isCheckRow=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isOperateRow,"onUpdate:modelValue":d[2]||(d[2]=N=>l.unref(a).isOperateRow=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isPagination,"onUpdate:modelValue":d[3]||(d[3]=N=>l.unref(a).isPagination=N),onChange:u},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"序号列"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isSerialNumber,"onUpdate:modelValue":d[4]||(d[4]=N=>l.unref(a).isSerialNumber=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"排序"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isSort,"onUpdate:modelValue":d[5]||(d[5]=N=>l.unref(a).isSort=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"展/收查询条件"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isExpandQuery,"onUpdate:modelValue":d[6]||(d[6]=N=>l.unref(a).isExpandQuery=N),onChange:u},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"立即执行接口"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isExecuteImmediatelyTableApi,"onUpdate:modelValue":d[7]||(d[7]=N=>l.unref(a).isExecuteImmediatelyTableApi=N)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(g,null,{default:l.withCtx(()=>[l.unref(a).isOperateRow?(l.openBlock(),l.createBlock(w,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:l.unref(a).tableOperateCellWidth,"onUpdate:modelValue":d[8]||(d[8]=N=>l.unref(a).tableOperateCellWidth=N),min:120},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(a).isPagination?(l.openBlock(),l.createBlock(w,{key:1,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页页数",prop:"pageSize","label-width":"150",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:l.unref(a).pageSize,"onUpdate:modelValue":d[9]||(d[9]=N=>l.unref(a).pageSize=N),min:10},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件label宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:l.unref(a).tableQueryLabelWidth,"onUpdate:modelValue":d[10]||(d[10]=N=>l.unref(a).tableQueryLabelWidth=N),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件列数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:l.unref(a).tableQueryRowWidth,"onUpdate:modelValue":d[11]||(d[11]=N=>l.unref(a).tableQueryRowWidth=N),min:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:l.unref(a).tableMoreBtnSplitNumber,"onUpdate:modelValue":d[12]||(d[12]=N=>l.unref(a).tableMoreBtnSplitNumber=N),min:0},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"顶部更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:l.unref(a).headerMoreBtnSplitNumber,"onUpdate:modelValue":d[13]||(d[13]=N=>l.unref(a).headerMoreBtnSplitNumber=N),min:0},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},[["__scopeId","data-v-fa895b16"]]),CT="",Ey=ht({__name:"configBtns",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=rn.useRoute(),s=l.inject("apiPrefix"),r=l.inject("request"),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>i1)),a=i,c=()=>({sort:0,permissionCode:null,requestUrl:"",btnName:"",btnAlias:"",btnIcon:"",btnPostion:"",btnType:"",btnColor:"",submitWay:"",importFileName:"",isPromptVerificationSelectTable:"1",isCustomBtn:!1,customType:"",codeStr:"",customComponentName:"",customComponentUrl:"",associationMenuId:"",submitFields:[],matchFields:[]}),h=()=>({tableLoading:!1,showConfigBtnDialog:!1,dialogData:{}});let u=l.reactive(h()),f=l.ref(null),d=0,m=l.ref([]),b=l.ref([]),w=[{prop:"checkbox",width:60},{prop:"serialNumber",width:80},{label:"按钮名称",prop:"btnName",minWidth:200},{label:"权限码",prop:"permissionCode",minWidth:200},{label:"按钮别名",prop:"btnAlias",minWidth:120},{label:"按钮图标",prop:"btnIcon",minWidth:120},{label:"是否自定义",prop:"isCustomBtn",width:120,render:!0},{label:"排序",prop:"sort",width:180,render:!0},{label:"操作",prop:"operate",width:120,render:!0,fixed:"right"}],g=l.ref([]);const p=C=>r({url:`${s}/sysMenus/getAllList`,method:"post",data:C}),O=C=>r({url:`${s}/sysMenus/getMenuOfOperate`,method:"get",params:C}),S=(C,T)=>{b.value.includes(C.permissionCode)||b.value.push(C.permissionCode),Object.assign(g.value[d],C),T(!0)},y=async C=>{try{u.tableLoading=!0;const T=a.id?a.id:n.params.id,{data:N}=await O({id:T});b.value=(N||[]).filter(_=>(C||[]).some(A=>A.permissionCode==_.unique)).map(_=>_.unique),g.value=(N||[]).map((_,A)=>{let x=c(),M=(C||[]).find(E=>E.permissionCode==_.unique)||{};return{...x,btnIcon:_.icon||"",...M,btnName:_.name,permissionCode:_.unique,sort:M.sort?M.sort:(A+1)*10}}).sort((_,A)=>_.sort-A.sort),u.tableLoading=!1}catch(T){u.tableLoading=!1,console.error(T)}},Q=()=>f.value.getSelectionRows()||[];l.provide("associationMenuList",m),l.provide("createDefaultButtonItem",c),l.watch(()=>a.modelValue,async(C,T)=>{try{const N=a.id?a.id:n.params.id;m.value=(await p({dynamicFilters:[{field:"parentId",operate:"Equal",value:N}]})).data||[],await y(C)}catch(N){u.tableLoading=!1,console.error(N)}},{deep:!0});const k=C=>{u.dialogData=C.row,d=C.$index,u.showConfigBtnDialog=!0};return e({getTableSelectionRows:Q}),(C,T)=>{const N=l.resolveComponent("el-tag"),_=l.resolveComponent("el-input-number"),A=l.resolveComponent("el-button"),x=l.resolveComponent("a-table"),M=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(M,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>T[2]||(T[2]=[l.createElementVNode("div",{class:"card-header"},[l.createElementVNode("div",{class:"card-header-title"},"按钮配置")],-1)])),default:l.withCtx(()=>[l.createVNode(x,{ref_key:"tableRef",ref:f,loading:l.unref(u).tableLoading,rowKey:"permissionCode",selection:l.unref(b),"onUpdate:selection":T[0]||(T[0]=E=>l.isRef(b)?b.value=E:b=E),headers:l.unref(w),data:l.unref(g),showPagination:!1},{isCustomBtn:l.withCtx(({scope:E})=>[l.createVNode(N,{type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(E.row.isCustomBtn?"是":"否"),1)]),_:2},1024)]),sort:l.withCtx(({scope:E})=>[l.createVNode(_,{modelValue:E.row.sort,"onUpdate:modelValue":I=>E.row.sort=I,min:0},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:E})=>[l.createVNode(A,{type:"primary",text:"",size:"small",icon:"Aim",onClick:I=>k(E)},{default:l.withCtx(()=>T[3]||(T[3]=[l.createTextVNode(" 配置 ")])),_:2},1032,["onClick"])]),_:1},8,["loading","selection","headers","data"]),l.createVNode(l.unref(o),{visible:l.unref(u).showConfigBtnDialog,"onUpdate:visible":T[1]||(T[1]=E=>l.unref(u).showConfigBtnDialog=E),title:"配置按钮",data:l.unref(u).dialogData,onRefresh:S},null,8,["visible","data"])]),_:1})}}},[["__scopeId","data-v-8c801481"]]),QT="",$y={class:"card-header"},Ny=ht({__name:"configFileds",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>r1)),n=e,s=i;l.inject("configData")();const r=()=>({tableLoading:!1,showAddFieldDialog:!1,dialogTitle:"字段配置",dialogData:{}});let o=l.reactive(r()),a=0,c=[{label:"序号",prop:"serialNumber",width:60},{label:"字段",prop:"fieldName",minWidth:160},{label:"字段Key",prop:"fieldKey",minWidth:160},{label:"字段类型",prop:"fieldType",minWidth:160,render:!0},{label:"使用场景",prop:"useScenes",minWidth:340,render:!0},{label:"排序",prop:"sort",width:200,render:!0},{label:"操作",prop:"operate",width:170,render:!0,fixed:"right"}],h=l.ref([]);Xu[0].options.map(S=>({btnName:S.key,permissionCode:S.value}));const u=S=>{if(!Reflect.has(S,"fieldType"))return"";const y=ju.find(Q=>Q.value==S.fieldType);return(y==null?void 0:y.key)||""},f=S=>Reflect.has(S,"useScenes")?(S.formCustomComponentes??[]).filter(y=>S.useScenes.includes(y.permissionCode)):[],d=S=>(S.formCustomComponentes||[]).filter(y=>y.isFieldCustom).map(y=>`${y.btnName}:是`).join(),m=(S,y)=>{if(a==null){const Q=h.value.length;h.value.push({...S,sort:(Q+1)*10})}else h.value[a]={...S,postRequestParams:[...S.postRequestParams],useScenes:[...S.useScenes],formCustomComponentes:[...S.formCustomComponentes]};n("update:modelValue",h.value),y(!0)},b=async()=>{try{o.tableLoading=!0,h.value=(s.modelValue||[]).map(S=>({...S,sort:S.sort?S.sort:0})).sort((S,y)=>S.sort-y.sort),o.tableLoading=!1}catch(S){o.tableLoading=!1,console.error(S)}};l.watch(()=>s.modelValue,async(S,y)=>{await b()},{deep:!0,immediate:!0});const w=()=>{a=null,o.dialogData={},o.showAddFieldDialog=!0},g=S=>{a=S.$index,o.dialogData=S.row,o.showAddFieldDialog=!0},p=()=>{n("update:modelValue",h.value)},O=S=>{h.value.splice(S.$index,1),n("update:modelValue",h.value)};return(S,y)=>{const Q=l.resolveComponent("el-button"),k=l.resolveComponent("el-tag"),C=l.resolveComponent("el-badge"),T=l.resolveComponent("el-input-number"),N=l.resolveComponent("a-table"),_=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(_,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>[l.createElementVNode("div",$y,[y[3]||(y[3]=l.createElementVNode("div",{class:"card-header-title"},"字段配置",-1)),l.createVNode(Q,{class:"card-header-operate",type:"primary",icon:"Plus",onClick:y[0]||(y[0]=A=>w())},{default:l.withCtx(()=>y[2]||(y[2]=[l.createTextVNode("添加字段")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(N,{loading:l.unref(o).tableLoading,headers:l.unref(c),data:l.unref(h),showPagination:!1},{fieldType:l.withCtx(({scope:A})=>[l.createTextVNode(l.toDisplayString(u(A.row)),1)]),useScenes:l.withCtx(({scope:A})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f(A.row),(x,M)=>(l.openBlock(),l.createBlock(C,{key:M,value:x.isFieldCustom?"C":"",offset:[-5,5]},{default:l.withCtx(()=>[l.createVNode(k,{style:{margin:"0 4px"},type:"success",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(x.btnName),1)]),_:2},1024)]),_:2},1032,["value"]))),128))]),formCustomComponentes:l.withCtx(({scope:A})=>[d(A.row)?(l.openBlock(),l.createBlock(k,{key:0,type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d(A.row)),1)]),_:2},1024)):l.createCommentVNode("",!0)]),sort:l.withCtx(({scope:A})=>[l.createVNode(T,{modelValue:A.row.sort,"onUpdate:modelValue":x=>A.row.sort=x,min:0,onChange:p},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:A})=>[l.createVNode(Q,{type:"primary",text:"",size:"small",icon:"EditPen",onClick:x=>g(A)},{default:l.withCtx(()=>y[4]||(y[4]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(Q,{type:"danger",text:"",size:"small",icon:"Delete",onClick:x=>O(A)},{default:l.withCtx(()=>y[5]||(y[5]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1},8,["loading","headers","data"]),l.createVNode(l.unref(t),{visible:l.unref(o).showAddFieldDialog,"onUpdate:visible":y[1]||(y[1]=A=>l.unref(o).showAddFieldDialog=A),title:l.unref(o).dialogTitle,configData:s.data,data:l.unref(o).dialogData,onRefresh:m},null,8,["visible","title","configData","data"])]),_:1})}}},[["__scopeId","data-v-75e750d2"]]),TT="",Ry={class:"dialog-footer"},Vy=ht({__name:"dialogInitConfig",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=rn.useRoute(),n=l.inject("apiPrefix"),s=l.inject("request"),r=e,o=i;l.computed(()=>t.params.key);const a=()=>({dataBase:"",api:""}),c=()=>({loading:!1,btnLoading:!1});let h=l.reactive(c()),u=l.ref([]),f=l.ref(null),d=l.ref(a());const m=S=>s({url:`${n}/scripts/getAllDatabaseTable`,method:"get",data:S}),b=async()=>{try{h.loading=!0;const{data:S}=await m();u.value=S||[],h.loading=!1}catch(S){console.error(S),h.loading=!1}};l.watch(()=>o.visible,async(S,y)=>{S&&await b()});const w=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),g=S=>{p(),S()},p=()=>{d.value=Object.assign(d.value,a()),f.value.resetFields(),r("update:visible",!1)},O=S=>{S&&S.validate(async y=>{if(y)try{h.btnLoading=!0;const{data:Q}=await s({url:`${n}/scripts/getAllColumnsByTableName`,method:"get",params:{tableName:d.value.dataBase}}),k=(Q||[]).map(C=>{let T=w();return T.fieldName=C.comment,T.fieldKey=C.name,T.fieldType="string",T});r("refresh",{formList:k},()=>{p()}),h.btnLoading=!1}catch(Q){console.error(Q),h.btnLoading=!1}})};return(S,y)=>{const Q=l.resolveComponent("el-option"),k=l.resolveComponent("el-select"),C=l.resolveComponent("el-form-item"),T=l.resolveComponent("el-input"),N=l.resolveComponent("el-form"),_=l.resolveComponent("el-button"),A=l.resolveComponent("el-dialog"),x=l.resolveDirective("loading"),M=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(A,{"model-value":o.visible,title:o.title,top:"10vh",width:"600",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":g},{footer:l.withCtx(()=>[l.createElementVNode("span",Ry,[l.createVNode(_,{loading:l.unref(h).btnLoading,onClick:p},{default:l.withCtx(()=>y[3]||(y[3]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(_,{type:"primary",loading:l.unref(h).btnLoading,onClick:y[2]||(y[2]=E=>O(l.unref(f)))},{default:l.withCtx(()=>y[4]||(y[4]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[M]])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(N,{ref_key:"formRef",ref:f,model:l.unref(d),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(C,{label:"数据库","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"dataBase"},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:l.unref(d).dataBase,"onUpdate:modelValue":y[0]||(y[0]=E=>l.unref(d).dataBase=E),placeholder:"请选择数据库",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u),(E,I)=>(l.openBlock(),l.createBlock(Q,{key:E,label:`${E.tableComment}【${E.tableName}】`,value:E.tableName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l.createVNode(C,{label:"接口地址(关键字)","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"api"},{default:l.withCtx(()=>[l.createVNode(T,{modelValue:l.unref(d).api,"onUpdate:modelValue":y[1]||(y[1]=E=>l.unref(d).api=E),placeholder:"请输入接口地址(关键字)",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[x,l.unref(h).loading]])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-8fa48448"]]),$T="",Ly={class:"page-container"},My={class:"submit-box"},By={class:"submit-box-r"},Wu=ht({__name:"index",props:{pageKey:{type:String,default:""},id:{type:String,default:void 0}},setup(i){const e=rn.useRoute(),t=rn.useRouter(),n=l.inject("apiPrefix"),s=l.inject("request"),r=i;let o=r.id??void 0,a=r.pageKey?r.pageKey:e.params.key,c=l.ref([]),h=l.ref(),u=l.ref([]),f=l.ref({}),d=l.ref(null),m=l.ref(null),b=l.ref(null),w=l.ref({}),g=l.ref({}),p=l.ref([]),O=l.ref([]),S=l.reactive({pageLoading:!1,saveBtnLoading:!1,showDialogInitConfig:!1});const y=B=>s({url:`${n}/pages/getPageDetail?key=${B}`,method:"get"}),Q=B=>s({url:`${n}/pageConfigs/createOrEdit`,method:"post",data:B}),k=B=>s({url:`${n}/sysMenus/getAllList`,method:"post",data:B}),C=B=>s({url:`${n}/sysDataDictionaries/getDictionaryByGroup?groupName=${B}`,method:"get"}),T=async()=>{const{data:B}=await k({dynamicFilters:[{field:"url",operate:"Equal",value:"/pages"}]});c.value=B||[]},N=async()=>{try{const{data:{pageConfigs:B}}=await y(a),U=JSON.parse(B.pageConfig)||{};o=B.pageId,console.log("pageConfigData",U),f.value=U,w.value={...U.tableConfig??{}},g.value={...U.formConfig??{}},p.value=[...U.buttons??[]],O.value=[...U.fields??[]]}catch(B){console.error(B)}},_=()=>{w.value={},g.value={},p.value=[],O.value=[],N()};l.provide("conditionList",()=>u),l.provide("pageKey",()=>l.ref(a)),l.provide("configData",()=>f),l.onMounted(async()=>{try{S.pageLoading=!0,await T(),h.value=e.params.id,u.value=(await C("Condition")).data||[],await N(),S.pageLoading=!1}catch(B){S.pageLoading=!1,console.error(B)}});const A=B=>{const U=c.value.find(Z=>Z.id==B);t.replace({path:`/actConfig/${U.key}/${U.id}`}),h.value=U.id,a=U.key,N()},x=()=>{S.showDialogInitConfig=!0},M=({formList:B},U)=>{O.value=[...B],U(!0)},E=()=>{let B={id:o,key:a,pageConfig:{tableConfig:d.value.form,formConfig:m.value.form,buttons:b.value.getTableSelectionRows(),fields:O.value}};B.pageConfig=JSON.stringify(B.pageConfig),S.saveBtnLoading=!0,Q(B).then(U=>{Ne.ElNotification({title:"提示",message:"保存成功",type:"success",duration:2500}),_(),S.saveBtnLoading=!1}).catch(U=>{S.saveBtnLoading=!1})},I=async()=>{Promise.all([d.value.formRef.validate(),m.value.formRef.validate()]).then(B=>{B.every(U=>U)&&E()}).catch(B=>B)};return(B,U)=>{const Z=l.resolveComponent("el-button"),K=l.resolveComponent("el-option"),W=l.resolveComponent("el-select"),J=l.resolveComponent("el-card"),fe=l.resolveComponent("el-col"),ce=l.resolveComponent("el-row"),ye=l.resolveDirective("debounce"),G=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createElementBlock("div",Ly,[l.createVNode(ce,{style:{margin:"0"},gutter:12},{default:l.withCtx(()=>[l.createVNode(fe,{class:"header-operate",span:24},{default:l.withCtx(()=>[l.createVNode(J,{class:"form-card",shadow:"hover"},{default:l.withCtx(()=>[l.createElementVNode("div",My,[U[10]||(U[10]=l.createElementVNode("div",{class:"submit-box-l"},null,-1)),l.createElementVNode("div",By,[l.withDirectives((l.openBlock(),l.createBlock(Z,{style:{width:"120px"},type:"primary",loading:l.unref(S).initBtnLoading,onClick:U[0]||(U[0]=D=>x())},{default:l.withCtx(()=>U[8]||(U[8]=[l.createTextVNode("一键初始化配置")])),_:1},8,["loading"])),[[ye]]),l.createVNode(W,{class:"menu-select",modelValue:l.unref(h),"onUpdate:modelValue":U[1]||(U[1]=D=>l.isRef(h)?h.value=D:h=D),placeholder:"菜单切换",clearable:"",filterable:"",onChange:A},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c),D=>(l.openBlock(),l.createBlock(K,{key:D.id,label:D.name,value:D.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.withDirectives((l.openBlock(),l.createBlock(Z,{style:{width:"120px"},type:"success",loading:l.unref(S).saveBtnLoading,onClick:U[2]||(U[2]=D=>I(B.formRef))},{default:l.withCtx(()=>U[9]||(U[9]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[ye]])])])]),_:1})]),_:1}),l.createVNode(fe,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(Ty,{ref_key:"configTableRef",ref:d,modelValue:l.unref(w),"onUpdate:modelValue":U[3]||(U[3]=D=>l.isRef(w)?w.value=D:w=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(Py,{ref_key:"configFormRef",ref:m,modelValue:l.unref(g),"onUpdate:modelValue":U[4]||(U[4]=D=>l.isRef(g)?g.value=D:g=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode(Ey,{ref_key:"configBtnsRef",ref:b,modelValue:l.unref(p),"onUpdate:modelValue":U[5]||(U[5]=D=>l.isRef(p)?p.value=D:p=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode(Ny,{modelValue:l.unref(O),"onUpdate:modelValue":U[6]||(U[6]=D=>l.isRef(O)?O.value=D:O=D)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(Vy,{visible:l.unref(S).showDialogInitConfig,"onUpdate:visible":U[7]||(U[7]=D=>l.unref(S).showDialogInitConfig=D),title:"一键初始化配置",onRefresh:M},null,8,["visible"])])),[[G,l.unref(S).pageLoading]])}}},[["__scopeId","data-v-8dfa8a8a"]]),Dy=(i,e)=>{let t=e.value||1e3,n,s=!1;i.addEventListener("click",r=>{n&&clearTimeout(n),s?r&&r.stopImmediatePropagation():s=!0,n=setTimeout(()=>{n=null,s=!1},t)},!0)},Sr={en:{act:{sort:"Serial Number",noData:"No Data",operate:"Operation",inputPlaceholder:"Please Input ",selectPlaceholder:"Please Select ",tip:"Tip",time:"Time",startTime:"Start Time",endTime:"End Time",loading:"ing",reset:"Reset",requiredMessage:"Required",customTableHeader:"Custom",developing:"In the process of feature development Coming soon",fieldCustom:"Custom",cancel:"Cancel",save:"Save",saveSuccessfully:"Save Successfully",configTableRow:"Please configure the table to select multiple columns",pleaseSelcet:"Please Selcet Need",data:"Data",success:"Success",buttonBindField:"The current button is not bound to a field",enter:"Enter",isExecuteOperate:"Are you sure to perform this operation",noConfigPage:"No Config Page",noImage:"No image",preview:"Preview",uploadText:"Drag the file here, or",clickUpload:"Click to upload",uploadLoading:"Upload loading...",uploadErrorTip:"The file type is incorrect. Please upload the file in the correct format again",uploadLimitTip:"Exceeding the file limit, please confirm and upload again.",expand:"Expand",retract:"Retract",formatCode:"FormatCode"}},zhCn:{act:{sort:"序号",noData:"暂无数据",operate:"操作",inputPlaceholder:"请输入",selectPlaceholder:"请选择",tip:"提示",time:"时间",startTime:"开始时间",endTime:"结束时间",loading:"中",reset:"重置",requiredMessage:"必填项",customTableHeader:"自定义表头(暂未创建文件)",developing:"功能开发中...敬请期待",fieldCustom:"当前字段为自定义,请在项目中创建对应组件",cancel:"取消",save:"保存",saveSuccessfully:"保存成功",configTableRow:"请配置表格多选列",pleaseSelcet:"请选择需要",data:"的数据",success:"成功",buttonBindField:"当前按钮未绑定字段",enter:"确定",isExecuteOperate:"是否确认执行此操作",noConfigPage:"暂无页面信息",noImage:"暂无",preview:"预览",uploadText:"将文件拖到此处,或",clickUpload:"点击上传",uploadLoading:"上传中...",uploadErrorTip:"文件类型不正确,请重新上传正确格式的文件。",uploadLimitTip:"超出文件数量限制,请确认后重新上传。",expand:"展开",retract:"收起",formatCode:"一键格式化代码"}}},Yu={ActPage:Fu,ActConfig:Wu},vy={install(i,e){var u;const{modules:t,request:n,themeColor:s,apiPrefix:r,language:{messages:o={},en:a="zhCn"}}=e,c={act:Object.assign(Sr[a].act,((u=o[a])==null?void 0:u.act)??{})},h=yu({locale:a,fallbackLocale:a,messages:{...Sr,[a]:c}});i.use(h),i.provide("actModules",t),i.provide("themeColor",s),i.provide("apiPrefix",r||"/api/v1"),i.provide("request",n),i.directive("debounce",Dy),Object.keys(Yu).forEach(f=>{i.component(f,Yu[f])})}},Zy={ActPage:Fu,ActConfig:Wu};function Iy(i){var o;const{modules:e,language:{messages:t={},en:n="zhCn"}}=i,s={act:Object.assign(Sr[n].act,((o=t[n])==null?void 0:o.act)??{})};return yu({locale:n,fallbackLocale:n,messages:{...Sr,[n]:s}})}const RT="",Uy={key:0,class:"search-module-container"},Fy={class:"no-config-field"},jy=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["reset","search"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>zu)),{t:n}=Ht(),s=l.inject("request"),r=l.inject("globalProps"),o=l.inject("loadComponents"),a=l.inject("getFieldUiProps"),c=l.inject("formatDataType"),h=l.inject("disposeDate"),u=l.inject("getDefaultQueryValues"),f=e,d=i,m=l.ref({});let b=l.ref([]),w=l.ref([]),g=l.ref(!0);const p=l.ref(0),O=l.ref(0),S=A=>d.data.tableConfig.isExpandQuery&&g.value?d.data.tableConfig.tableQueryRowWidth>A+1:!0,y=async A=>{b.value=await Promise.all(A.filter(x=>x.useScenes.includes("tableSearch")).map(async x=>{x.tableQueryDefaultValue&&(["date","dateRange"].includes(x.fieldType)?x.queryValue=h(x):x.queryValue=x.tableQueryDefaultValue?x.tableQueryDefaultValue:void 0),r.defaultParams.some(E=>{E.field==x.fieldKey&&E.operate===x.tableQueryCondition&&(x.queryValue=E.value)});const M=(x.formCustomComponentes??[]).find(E=>E.permissionCode==="tableSearch");if(x.isQueryFieldCustom=!1,M&&M.isFieldCustom){const{isFieldCustom:E,customComponentName:I,customComponentUrl:B}=M;if(x.isQueryFieldCustom=!0,O.value++,E&&!x.customQueryComponent){const U=await o(B,I);x.customQueryComponent=U}}return x}))},Q=A=>{const x=(A||[]).filter(M=>M.permissionCode===1001).map(M=>({...M,loading:!1}));w.value=[...x,{btnName:n("act.reset"),permissionCode:"9999",btnColor:"info",btnIcon:"btn-reset",loading:!1}]},k=async({node:A,resolve:x},M)=>{const E=a(M),{label:I,value:B,children:U,isLeaf:Z}={...kr,...E.treeProps||{}};if(A[Z])return x([]);const K=M.postRequestParams.filter(G=>G.submitType==="default").reduce((G,D)=>(G[D.submitName]=c(D.paramsType,D.submitValue),G),{}),W=M.postRequestParams.filter(G=>G.submitType==="match").reduce((G,D)=>(G[D.submitName]=c(D.paramsType,r.matchData[D.submitValue][D.submitName]),G),{}),J=M.postRequestParams.filter(G=>G.submitType==="dynamic").map(G=>({field:G.submitName,operate:G.submitMatchType,value:E.loadCode?A==null?void 0:A.data.value:c(G.paramsType,G.submitValue)}));let fe={};Object.keys(K).length&&(fe={...fe,...K}),Object.keys(W).length&&(fe={...fe,...W}),J.length&&(fe.dynamicFilters=J),E.loadCode&&Reflect.has(fe,E.loadCode)&&(fe[E.loadCode]=A==null?void 0:A.data.value);const{data:ce}=await s({url:M.fieldRequestUrl,method:M.fieldRequestType||"GET",data:fe}),ye=(ce||[]).map(G=>({label:G[I],value:G[B],children:[],isLeaf:G[Z]}));x(ye)};l.watch(()=>d.data,(A,x)=>{y(A.fields),Q(A.buttons)},{immediate:!0,deep:!0});const C=()=>{p.value++,p.value===O.value&&T({permissionCode:1001})},T=A=>{switch(A.loading=!0,A.permissionCode){case"9999":b.value.forEach(E=>{E.tableQueryDefaultValue?E.queryValue=["date","dateRange"].includes(E.fieldType)?h(E):(E==null?void 0:E.tableQueryDefaultValue)||void 0:E.queryValue=E.fieldType.includes("&")?[]:void 0});const x=u();f("reset",x,()=>{A.loading=!1});break;default:const M=b.value.filter(E=>Array.isArray(E.queryValue)?E.queryValue.length:!!E.queryValue);f("search",M,()=>{A.loading=!1});break}},N=()=>{g.value=!g.value},_=()=>{T({permissionCode:1001})};return(A,x)=>{var G;const M=l.resolveComponent("el-input"),E=l.resolveComponent("el-option"),I=l.resolveComponent("el-select"),B=l.resolveComponent("el-select-v2"),U=l.resolveComponent("el-cascader"),Z=l.resolveComponent("el-tree-select"),K=l.resolveComponent("el-date-picker"),W=l.resolveComponent("el-form-item"),J=l.resolveComponent("a-svg-icon"),fe=l.resolveComponent("el-button"),ce=l.resolveComponent("el-form"),ye=l.resolveDirective("debounce");return l.unref(b)&&l.unref(b).length?(l.openBlock(),l.createElementBlock("div",Uy,[l.createVNode(ce,{style:l.normalizeStyle({"--table-query-row":d.data.tableConfig.tableQueryRowWidth}),class:"form-content",ref:"elForm","label-suffix":":","label-position":"right"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(D,V)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:V},[S(V)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[D.isQueryFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[D.customQueryComponent?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(D.customQueryComponent),{key:0,class:"custom-btn",ref_for:!0,ref:q=>m.value[`customQueryComponent_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,queryItem:D,data:d.data,onRefresh:x[9]||(x[9]=q=>T({permissionCode:1001})),onLoaded:C},null,40,["modelValue","onUpdate:modelValue","queryItem","data"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:V},[l.createElementVNode("span",Fy,"【"+l.toDisplayString(D.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(n)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(W,{key:0,class:"search-form-item","label-width":d.data.tableConfig.tableQueryLabelWidth,label:D.fieldName},{default:l.withCtx(()=>[D.fieldType==="input"||D.fieldType==="editor"?(l.openBlock(),l.createBlock(M,l.mergeProps({key:0,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${D.fieldName}`,clearable:"",ref_for:!0},l.unref(a)(D),{onKeyup:x[0]||(x[0]=l.withKeys(l.withModifiers(q=>T({permissionCode:1001}),["prevent"]),["enter","native"])),onClear:_}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):l.createCommentVNode("",!0),D.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${D.fieldName}`,clearable:"",onKeyup:x[1]||(x[1]=l.withKeys(l.withModifiers(q=>T({permissionCode:1001}),["prevent"]),["enter","native"])),ref_for:!0},l.unref(a)(D)),null,16,["modelValue","onUpdate:modelValue","placeholder"])):["select","switch","multipleSelect"].includes(D.fieldType)?(l.openBlock(),l.createBlock(I,l.mergeProps({key:2,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(a)(D),{multiple:D.fieldType==="multipleSelect","collapse-tags":D.fieldType==="multipleSelect","collapse-tags-tooltip":D.fieldType==="multipleSelect",onChange:x[2]||(x[2]=q=>T({permissionCode:1001}))}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(D.dataList,(q,H)=>(l.openBlock(),l.createBlock(E,{key:H,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","collapse-tags","collapse-tags-tooltip"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(D.fieldType)?(l.openBlock(),l.createBlock(B,l.mergeProps({key:3,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,options:D.dataList,props:{...l.unref(Uu)},placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(a)(D),{"collapse-tags":D.fieldType==="virtualizedMultipleSelect","collapse-tags-tooltip":D.fieldType==="virtualizedMultipleSelect",multiple:D.fieldType==="virtualizedMultipleSelect",onChange:x[3]||(x[3]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","collapse-tags","collapse-tags-tooltip","multiple"])):D.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(U,l.mergeProps({key:4,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,options:D.dataList,props:{...l.unref(Iu)},clearable:"",filterable:"",placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,ref_for:!0},l.unref(a)(D),{onChange:x[4]||(x[4]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder"])):D.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:5,ref_for:!0,ref:q=>m.value[`elTreeSelect_fullLoad_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,data:D.dataList,placeholder:`请选择${D.fieldName}`,props:{...l.unref(kr),...l.unref(a)(D).treeProps||{}},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:""},l.unref(a)(D),{onChange:x[5]||(x[5]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","data","placeholder","props"])):D.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:6,ref_for:!0,ref:q=>m.value[`elTreeSelect_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`请选择${D.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(q,H)=>k({node:q,resolve:H},D)},l.unref(a)(D),{onChange:x[6]||(x[6]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):D.fieldType==="date"?(l.openBlock(),l.createBlock(K,l.mergeProps({key:7,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,type:"date",placeholder:`${l.unref(n)("act.selectPlaceholder")}${l.unref(n)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss",clearable:"",ref_for:!0},l.unref(a)(D),{onChange:x[7]||(x[7]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):D.fieldType==="dateRange"?(l.openBlock(),l.createBlock(K,l.mergeProps({key:8,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,type:"daterange","start-placeholder":l.unref(n)("act.startTime"),"end-placeholder":l.unref(n)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",clearable:"",ref_for:!0},l.unref(a)(D),{onChange:x[8]||(x[8]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label-width","label"]))],64)):l.createCommentVNode("",!0)],64))),128)),l.unref(b).length?(l.openBlock(),l.createBlock(W,{key:0,class:"search-form-btn","label-width":"0"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(D,V)=>l.withDirectives((l.openBlock(),l.createBlock(fe,{key:V,type:D.btnColor,loading:D.loading,onClick:q=>T(D)},{default:l.withCtx(()=>[D.btnIcon?(l.openBlock(),l.createBlock(J,{key:0,class:"mr6",name:D.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(D.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[ye]])),128))]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["style"]),d.data.tableConfig.isExpandQuery&&((G=l.unref(b))==null?void 0:G.length)>d.data.tableConfig.tableQueryRowWidth?(l.openBlock(),l.createBlock(fe,{key:0,class:"expand",text:"",size:"small",icon:l.unref(g)?"ArrowDown":"ArrowUp",onClick:N},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(g)?l.unref(n)("act.expand"):l.unref(n)("act.retract")),1)]),_:1},8,["icon"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}},[["__scopeId","data-v-92d7682c"]])},Symbol.toStringTag,{value:"Module"})),MT="",qy={class:"header-operate-container"},Xy=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["onOperate"],setup(i,{emit:e}){const t=e,n=i,{t:s}=Ht();let r=l.ref([]);const o=l.inject("globalProps"),a=l.inject("menuPermissionBtns"),c=l.inject("stringToBoolean"),h=l.inject("matchCondition"),u=l.inject("getTableData"),f=l.inject("tableBtnRefs"),d=l.computed(()=>{const{tableConfig:{headerMoreBtnSplitNumber:S}}=n.data;return!S||S>=r.value.length}),m=()=>{const{tableConfig:{headerMoreBtnSplitNumber:S}}=n.data;return d.value?r.value:r.value.slice(0,S)},b=()=>{var y;const{tableConfig:{headerMoreBtnSplitNumber:S}}=n.data;return d.value?[]:r.value.slice(S,(y=r.value)==null?void 0:y.length)},w=S=>{if(!S.matchFields.length)return!0;const y=S.matchFields.filter(N=>N.matchType!="default"),Q=N=>o.matchData[N.matchType][N.matchFieldName];let C=y.reduce((N,_,A)=>{const x=Q(_);return N+=h(_.matchCondition,x,_.fieldValue==""?null:_.fieldValue=="true"||_.fieldValue=="false"?c(_.fieldValue):_.fieldValue),A!==y.length-1&&(N+=_.spliceCondition||"&&"),N},"").split("||"),T=C.reduce((N,_,A)=>(N+=`(${_})`,A<C.length-1&&(N+="||"),N),"");return new Function(`return ${T}`)()},g=S=>a.value.some(y=>y.unique==S.permissionCode)&&w(S),p=S=>{r.value=(S||[]).filter(y=>y.permissionCode!==1001&&y.btnPostion.includes("header")).sort((y,Q)=>y.sort-Q.sort).map(y=>(y.btnAlias&&(y.btnName=y.btnAlias),Reflect.has(y,"isPromptVerificationSelectTable")||(y.isPromptVerificationSelectTable="1"),y))};l.watch(()=>n.data,(S,y)=>{p(S.buttons)},{immediate:!0});const O=S=>{t("onOperate",S,{})};return(S,y)=>{const Q=l.resolveComponent("a-svg-icon"),k=l.resolveComponent("el-button"),C=l.resolveComponent("el-icon"),T=l.resolveComponent("el-dropdown-item"),N=l.resolveComponent("el-dropdown-menu"),_=l.resolveComponent("el-dropdown"),A=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",qy,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m(),(x,M)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:x.permissionCode},[g(x)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[x.isCustomBtn&&x.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(x[x.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:E=>l.unref(f)[`${x.customComponentName}-${x.permissionCode}`]=E,buttonData:x,onRefresh:y[0]||(y[0]=E=>l.unref(u)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(k,{class:"el-btn",type:x.btnColor,loading:x[`loading${x.permissionCode}`],onClick:E=>O(x)},{default:l.withCtx(()=>[x.btnIcon&&!x[`loading${x.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:x.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(x[`loading${x.permissionCode}`]?x.btnName+l.unref(s)("act.loading")+"...":x.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(k,{key:1,class:"el-btn",type:x.btnColor,loading:x[`loading${x.permissionCode}`],onClick:E=>O(x)},{default:l.withCtx(()=>[x.btnIcon&&!x[`loading${x.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:x.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(x[`loading${x.permissionCode}`]?x.btnName+l.unref(s)("act.loading")+"...":x.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])],64)):l.createCommentVNode("",!0)],64))),128)),d.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(_,{key:0,class:"header-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode(N,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b(),(x,M)=>(l.openBlock(),l.createBlock(T,{key:x.permissionCode,onClick:E=>O(x)},{default:l.withCtx(()=>[g(x)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[x.isCustomBtn&&x.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(x[x.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:E=>l.unref(f)[`${x.customComponentName}-${x.permissionCode}`]=E,buttonData:x,onRefresh:y[1]||(y[1]=E=>l.unref(u)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(k,{class:"el-btn",type:x.btnColor,loading:x[`loading${x.permissionCode}`]},{default:l.withCtx(()=>[x.btnIcon&&!x[`loading${x.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:x.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(x[`loading${x.permissionCode}`]?x.btnName+l.unref(s)("act.loading")+"...":x.btnName),1)]),_:2},1032,["type","loading"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(k,{key:1,class:"el-btn",type:x.btnColor,loading:x[`loading${x.permissionCode}`]},{default:l.withCtx(()=>[x.btnIcon&&!x[`loading${x.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:x.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(x[`loading${x.permissionCode}`]?x.btnName+l.unref(s)("act.loading")+"...":x.btnName),1)]),_:2},1032,["type","loading"])),[[A]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:l.withCtx(()=>[l.createVNode(k,{type:"primary"},{default:l.withCtx(()=>[y[2]||(y[2]=l.createTextVNode(" 更多按钮")),l.createVNode(C,{class:"el-icon--right"},{default:l.withCtx(()=>[l.createVNode(l.unref(Hb))]),_:1})]),_:1})]),_:1}))])}}},[["__scopeId","data-v-f0dda1b5"]])},Symbol.toStringTag,{value:"Module"})),vT="",Wy={class:"act-table"},Yy=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{loading:{type:Boolean,default:!1},maxHeight:{type:Number,default:600},total:{type:Number,default:0},tableQuery:{type:Object,default:()=>({pageIndex:1,pageSize:10})},selection:{type:Array,default:()=>[]},headers:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},showSerialNumber:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},rowKey:{type:String,default:"id"},treeProps:{type:Object,default:()=>({children:"children",hasChildren:"hasChildren"})},tableConfig:{type:Object,default:()=>({})}},emits:["update:tableQuery","update:selection","refresh","onRowClick","changeExpand"],setup(i,{expose:e,emit:t}){const{t:n}=Ht(),s=t,r=i;let o=l.ref(null);const a=g=>r.showPagination?g+1+(r.tableQuery.pageIndex-1)*r.tableQuery.pageSize:g+1,c=g=>{l.nextTick(()=>{r.data.forEach(p=>{g.includes(p[r.rowKey])&&o.value.toggleRowSelection(p,!0)})})},h=g=>o.value.getSelectionRows();l.watch(()=>r.selection,(g,p)=>{g&&g.length&&c(g)},{deep:!0,immediate:!0});const u=g=>{s("update:selection",g)},f=(g,p)=>{g&&l.nextTick(()=>{r.data.forEach(O=>{g.includes(O[p||r.rowKey])&&o.value.toggleRowSelection(O,!0)})})},d=g=>{s("update:tableQuery",{...r.tableQuery,pageSize:g}),s("refresh",[])},m=g=>{s("update:tableQuery",{...r.tableQuery,pageIndex:g}),s("refresh",[])},b=(g,p,O)=>{s("onRowClick",g,p,O)},w=(g,p)=>{s("changeExpand",g,p)};return e({getSelectionRows:h,updateSelection:f}),(g,p)=>{const O=l.resolveComponent("el-table-column"),S=l.resolveComponent("el-table"),y=l.resolveComponent("el-pagination"),Q=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Wy,[l.withDirectives((l.openBlock(),l.createBlock(S,l.mergeProps({style:{width:"100%"},ref_key:"tableRef",ref:o,data:r.data,stripe:"",border:"","highlight-current-row":"","max-height":r.maxHeight,"row-key":r.rowKey,"default-expand-all":"","tree-props":i.treeProps},r.tableConfig,{onSelectionChange:u,onRowClick:b,onExpandChange:w}),{empty:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(r.data.length||r.data.length==0?l.unref(n)("act.noData"):""),1)]),default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.headers,k=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:k.prop},[k.isCustomTableHeader?l.renderSlot(g.$slots,k.prop,{key:0},void 0,!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[k.render?(l.openBlock(),l.createBlock(O,{key:0,label:k.label,align:k.align,width:k.width,minWidth:k.minWidth,sortable:k.sort,"show-overflow-tooltip":k.prop=="operate"?!1:k.showOverflowTooltip,fixed:k.fixed},{default:l.withCtx(C=>[l.renderSlot(g.$slots,k.prop,{scope:C},void 0,!0)]),_:2},1032,["label","align","width","minWidth","sortable","show-overflow-tooltip","fixed"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[k.prop=="checkbox"?(l.openBlock(),l.createBlock(O,{key:0,type:"selection",align:"center",width:k.width,fixed:""},null,8,["width"])):k.prop=="serialNumber"?(l.openBlock(),l.createBlock(O,{key:1,index:a,type:"index",align:"center",width:k.width,label:l.unref(n)("act.sort"),fixed:""},null,8,["width","label"])):(l.openBlock(),l.createBlock(O,{key:2,prop:k.prop,label:k.label,align:k.align,sortable:k.sort,"show-overflow-tooltip":k.showOverflowTooltip,width:k.width,"min-width":k.minWidth,fixed:k.fixed},null,8,["prop","label","align","sortable","show-overflow-tooltip","width","min-width","fixed"]))],64))],64))],64))),128))]),_:3},16,["data","max-height","row-key","tree-props"])),[[Q,r.loading]]),r.showPagination?(l.openBlock(),l.createBlock(y,{key:0,class:"table-pagination","current-page":r.tableQuery.pageIndex,"onUpdate:currentPage":p[0]||(p[0]=k=>r.tableQuery.pageIndex=k),"page-size":r.tableQuery.pageSize,"onUpdate:pageSize":p[1]||(p[1]=k=>r.tableQuery.pageSize=k),"page-sizes":[10,20,50,75,100,200,500],background:"",layout:"total, sizes, prev, pager, next, jumper",total:r.total,onSizeChange:d,onCurrentChange:m},null,8,["current-page","page-size","total"])):l.createCommentVNode("",!0)])}}},[["__scopeId","data-v-d2da0301"]])},Symbol.toStringTag,{value:"Module"})),UT="",zy={class:"no-config-field"},Gy={class:"dialog-footer"},Hy=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>zu)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Gu)),s=l.defineAsyncComponent(()=>Promise.resolve().then(()=>y1)),r=l.defineAsyncComponent(()=>Promise.resolve().then(()=>B1)),{t:o}=Ht(),a=l.inject("request"),c=l.inject("loadComponents"),h=l.inject("formatDataType"),u=l.inject("globalProps"),f=l.inject("stringToBoolean"),d=l.inject("getFieldUiProps"),m=l.inject("disposeRequestData"),b=e,w=i,g=l.ref(!1),p=l.ref(!1),O=l.ref(null),S=l.ref([]),y=l.ref({}),Q=l.ref({}),k=Z=>Z.formColumnCol==null?24:Z.formColumnCol?Z.formColumnCol:24/Z.formRow,C=Z=>["input","textarea"].includes(Z.fieldType)?"blur":(["select","multipleSelect","datetimerange","treeSelect","provinceCascade"].includes(Z.fieldType),"change"),T=async({node:Z,resolve:K},W)=>{const J=d(W),{label:fe,value:ce,children:ye,isLeaf:G}={...kr,...J.treeProps||{}};if(Z[G])return K([]);const D=W.postRequestParams.filter(Ee=>Ee.submitType==="default").reduce((Ee,We)=>(Ee[We.submitName]=h(We.paramsType,We.submitValue),Ee),{}),V=W.postRequestParams.filter(Ee=>Ee.submitType==="match").reduce((Ee,We)=>(Ee[We.submitName]=h(We.paramsType,u.matchData[We.submitValue][We.submitName]),Ee),{}),q=W.postRequestParams.filter(Ee=>Ee.submitType==="dynamic").map(Ee=>{let We={field:Ee.submitName,operate:Ee.submitMatchType,value:h(Ee.paramsType,Ee.submitValue)};return J.loadCode===Ee.submitName&&(Z!=null&&Z.data.value)&&(We.value=Z==null?void 0:Z.data.value),We});let H={};Object.keys(D).length&&(H={...H,...D}),Object.keys(V).length&&(H={...H,...V}),q.length&&(H.dynamicFilters=q),J.loadCode&&Reflect.has(H,J.loadCode)&&(H[J.loadCode]=Z==null?void 0:Z.data.value);const{data:Fe}=await a({url:W.fieldRequestUrl,method:W.fieldRequestType||"GET",data:H}),Yt=(Fe||[]).map(Ee=>({label:Ee[fe],value:Ee[ce],children:[],isLeaf:Ee[G]}));K(Yt)},N=Z=>{if(!["input","textarea"].includes(Z)){if(["multipleSelect","dateRange"].includes(Z))return[];if(["switch"].includes(Z))return!1}},_=(Z,K)=>{if(typeof Z=="string"&&["string"].includes(K))return Z.toString();if(["string"].includes(K))return Z.sort((W,J)=>W.sort-J.sort).join(";");if(["number"].includes(K))return Number(Z);if(["array"].includes(K))return Z.sort((W,J)=>W.sort-J.sort)},A=(Z,K=!1)=>{if(["multipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";").map(J=>K?{value:J}:J):[];if(["virtualizedMultipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";"):[];if(["dateRange","provinceCascade"].includes(Z.fieldType)){const J=Z.fieldKey.split("&");return w.data.rowData[Z.fieldKey]=J.map(fe=>w.data.rowData[fe]),w.data.rowData[Z.fieldKey]}let W=w.data.rowData[Z.fieldKey];if(["select"].includes(Z.fieldType)){const J=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][J["value-key"]?J["value-key"]:"value"]=="string"&&W!==null&&(W=K?{value:W.toString()}:W.toString())}if(["virtualizedSelect"].includes(Z.fieldType)){const J=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][J["value-key"]?J["value-key"]:"value"]=="string"&&W!==null&&(W=W.toString())}return(W==="true"||W==="false")&&(W=f(W)),W},x=Z=>a({url:w.data.dataItem.requestUrl,method:"post",data:Z});l.watch(()=>w.visible,async(Z,K)=>{var W,J;if(Z)try{g.value=!0;const fe=await m(w.data.formList,w.data.rowData,!1,!0);console.log("formList",(W=w.data)==null?void 0:W.formList),S.value=await Promise.all((((J=w.data)==null?void 0:J.formList)??[]).sort((ce,ye)=>ce.sort-ye.sort).map(async ce=>{const ye=fe.find(q=>ce.fieldName==q.fieldName&&ce.fieldKey==q.fieldKey);ye&&(ce.dataList=(ye==null?void 0:ye.dataList)??[]),["select","multipleSelect"].includes(ce.fieldType)&&(y.value[`${ce.fieldKey}ActImplicit`]=Object.keys(w.data.rowData).length&&ce.isFormSetValue?A(ce,!0):N(ce.fieldType)),y.value[ce.fieldKey]=Object.keys(w.data.rowData).length&&ce.isFormSetValue?A(ce):N(ce.fieldType);const{isFieldCustom:G,customComponentName:D,customComponentUrl:V}=ce.customFiledsComponentes;if(G&&!ce.customFiledsComponentes[D]){const q=await c(V,D);ce.customFiledsComponentes[D]=q}return ce})),g.value=!1}catch(fe){console.error(fe),g.value=!1}});const M=Z=>{E(),Z()},E=()=>{S.value=[],O.value.resetFields(),b("update:visible",!1)},I=(Z,K)=>{const W=d(K),{fieldKey:J,fieldType:fe}=K;if(fe==="multipleSelect"){const ce=Z.filter(G=>typeof G=="string"),ye=Z.filter(G=>typeof G!="string").map(G=>G.value);y.value[W.createFieldKey]=ce.length?_(ce,"string"):void 0,y.value[J]=ye.length?_(ye,"string"):void 0}else typeof Z=="string"?(y.value[W.createFieldKey]=Z,y.value[J]=void 0):(y.value[J]=Z.value,delete y.value[W.createFieldKey])},B=Z=>{Z&&Z.validate(K=>{if(K){const{dataItem:W,rowData:J}=w.data;let fe={...l.toRaw(y.value)};Object.keys(fe).forEach(G=>{if(G.includes("ActImplicit")){delete fe[G];return}const D=S.value.find(V=>V.fieldKey===G);G.includes("&")?G.split("&").forEach((q,H)=>{fe[q]=fe[G]?_(fe[G][H],D.fieldSubmitType):fe[G]}):Array.isArray(fe[G])&&D.fieldSubmitType=="string"&&(fe[G]=_(fe[G],"string"))});const ce=W.submitFields.filter(G=>G.matchType=="default").reduce((G,D)=>(D.submitFieldType==="string"&&(G[D.submitFieldName]=D.matchFieldName.toString()),G),{}),ye=W.submitFields.filter(G=>G.matchType=="match").reduce((G,D)=>(Reflect.has(D,"submitFieldMatchOrigin")&&D.submitFieldMatchOrigin==="selections"?G[D.submitFieldName]=w.data.selections.map(V=>h(D.submitFieldType,V[D.matchFieldName])):Reflect.has(D,"submitFieldMatchOrigin")&&D.submitFieldMatchOrigin!="rowData"?Reflect.has(u.matchData,D.submitFieldMatchOrigin)&&(G[D.submitFieldName]=h(D.submitFieldType,u.matchData[D.submitFieldMatchOrigin][D.matchFieldName])):G[D.submitFieldName]=h(D.submitFieldType,J[D.matchFieldName]),G),{});x({...fe,...ce,...ye}).then(G=>{try{Ne.ElNotification({title:o("act.tip"),message:o("act.saveSuccessfully"),type:"success",duration:2500}),E(),b("refresh",W)}catch(D){console.error(D)}p.value=!1}).catch(G=>{console.error(G),p.value=!1})}})},U=Z=>{const K=Object.keys(Q.value).map(W=>{var J;return(J=Q.value[W])==null?void 0:J.updateFormData(y.value)}).filter(W=>W);Promise.all([Z.validate(),...K]).then(W=>{W.every(J=>J)&&B(Z)}).catch(W=>(console.error(W),W))};return(Z,K)=>{var Si;const W=l.resolveComponent("el-input"),J=l.resolveComponent("el-option"),fe=l.resolveComponent("el-select"),ce=l.resolveComponent("el-select-v2"),ye=l.resolveComponent("el-tree-select"),G=l.resolveComponent("el-date-picker"),D=l.resolveComponent("el-cascader"),V=l.resolveComponent("el-switch"),q=l.resolveComponent("el-form-item"),H=l.resolveComponent("el-col"),Fe=l.resolveComponent("el-row"),Yt=l.resolveComponent("el-form"),Ee=l.resolveComponent("el-button"),We=l.resolveComponent("el-dialog"),Li=l.resolveDirective("loading"),ii=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(We,{"model-value":w.visible,title:w.title,top:"5vh",width:(Si=i.data.formConfig)==null?void 0:Si.dialogWidth,draggable:"",overflow:"","append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,"before-close":M},{footer:l.withCtx(()=>[l.createElementVNode("span",Gy,[l.createVNode(Ee,{loading:p.value,onClick:E},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.cancel")),1)]),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(Ee,{type:"primary",loading:p.value,onClick:K[1]||(K[1]=Ze=>U(O.value))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.save")),1)]),_:1},8,["loading"])),[[ii]])])]),default:l.withCtx(()=>{var Ze,R;return[l.withDirectives((l.openBlock(),l.createBlock(Yt,{class:"a-form",ref_key:"formRef",ref:O,model:y.value,"label-suffix":":","label-width":(Ze=i.data.formConfig)==null?void 0:Ze.formLabelWidth,"label-position":(R=i.data.formConfig)==null?void 0:R.formLabelPosition},{default:l.withCtx(()=>[l.createVNode(Fe,{gutter:40},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(S.value,(P,X)=>(l.openBlock(),l.createBlock(H,{span:k(P),key:X},{default:l.withCtx(()=>[P.customFiledsComponentes.isFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[P.customFiledsComponentes[P.customFiledsComponentes.customComponentName]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(P.customFiledsComponentes[P.customFiledsComponentes.customComponentName]),{key:0,ref_for:!0,ref:Y=>Q.value[P.customFiledsComponentes.customComponentName]=Y,formConfig:i.data.formConfig,item:P,rowData:w.data.rowData,visible:w.visible,form:y.value,"onUpdate:form":K[0]||(K[0]=Y=>y.value=Y)},null,40,["formConfig","item","rowData","visible","form"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:X},[l.createElementVNode("span",zy,"【"+l.toDisplayString(P.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(o)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(q,{key:0,label:P.fieldName,prop:["select","multipleSelect"].includes(P.fieldType)?`${P.fieldKey}ActImplicit`:P.fieldKey,rules:[{required:P.isFormFieldRequired,message:l.unref(o)("act.requiredMessage"),trigger:C(P)}]},{default:l.withCtx(()=>[P.fieldType==="input"?(l.openBlock(),l.createBlock(W,l.mergeProps({key:0,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${P.fieldName}`,clearable:"",ref_for:!0},l.unref(d)(P),{disabled:P.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):l.createCommentVNode("",!0),P.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${P.fieldName}`,clearable:"",ref_for:!0},l.unref(d)(P),{disabled:P.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):P.fieldType==="textarea"?(l.openBlock(),l.createBlock(W,l.mergeProps({key:2,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${P.fieldName}`,rows:4,ref_for:!0},l.unref(d)(P),{type:"textarea",disabled:P.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):P.fieldType==="selectIcon"?(l.openBlock(),l.createBlock(l.unref(n),l.mergeProps({key:3,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,icons:P.dataList,placeholder:`${l.unref(o)("act.selectPlaceholder")}${P.fieldName}`,ref_for:!0},l.unref(d)(P),{disabled:P.isFormDisabled}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(P.dataList,(Y,Re)=>(l.openBlock(),l.createBlock(J,{key:Re,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","icons","placeholder","disabled"])):["select","multipleSelect"].includes(P.fieldType)?(l.openBlock(),l.createBlock(fe,l.mergeProps({key:4,modelValue:y.value[`${P.fieldKey}ActImplicit`],"onUpdate:modelValue":Y=>y.value[`${P.fieldKey}ActImplicit`]=Y,placeholder:`${l.unref(o)("act.selectPlaceholder")}${P.fieldName}`,clearable:"",filterable:"","value-key":"value",ref_for:!0},l.unref(d)(P),{multiple:P.fieldType==="multipleSelect",disabled:P.isFormDisabled,onChange:Y=>I(Y,P)}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(P.dataList,(Y,Re)=>(l.openBlock(),l.createBlock(J,{key:Re,label:Y.key,value:Y},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","disabled","onChange"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(P.fieldType)?(l.openBlock(),l.createBlock(ce,l.mergeProps({key:5,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,options:P.dataList,props:{...l.unref(Uu)},placeholder:`${l.unref(o)("act.selectPlaceholder")}${P.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(d)(P),{disabled:P.isFormDisabled,multiple:P.fieldType==="virtualizedMultipleSelect"}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled","multiple"])):P.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(ye,l.mergeProps({key:6,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,data:P.dataList,"default-expanded-keys":[y.value[P.fieldKey]||null],placeholder:`请选择${P.fieldName}`,props:{...l.unref(kr),...l.unref(d)(P).treeProps||{}},"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",ref_for:!0},l.unref(d)(P)),null,16,["modelValue","onUpdate:modelValue","data","default-expanded-keys","placeholder","props"])):P.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(ye,l.mergeProps({key:7,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,placeholder:`请选择${P.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(Y,Re)=>T({node:Y,resolve:Re},P),ref_for:!0},l.unref(d)(P)),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):P.fieldType==="date"?(l.openBlock(),l.createBlock(G,l.mergeProps({key:8,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,type:"date",placeholder:`${l.unref(o)("act.selectPlaceholder")}${l.unref(o)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss",ref_for:!0},l.unref(d)(P),{disabled:P.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):P.fieldType==="dateRange"?(l.openBlock(),l.createBlock(G,l.mergeProps({key:9,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,type:"daterange","start-placeholder":l.unref(o)("act.startTime"),"end-placeholder":l.unref(o)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",ref_for:!0},l.unref(d)(P),{disabled:P.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","disabled"])):P.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(D,l.mergeProps({key:10,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,options:P.dataList,props:l.unref(Iu),clearable:"",filterable:"",placeholder:`${l.unref(o)("act.selectPlaceholder")}${P.fieldName}`,ref_for:!0},l.unref(d)(P),{disabled:P.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled"])):P.fieldType==="switch"?(l.openBlock(),l.createBlock(V,l.mergeProps({key:11,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,"active-value":!0,"inactive-value":!1,ref_for:!0},l.unref(d)(P)),null,16,["modelValue","onUpdate:modelValue"])):P.fieldType==="upload"?(l.openBlock(),l.createBlock(l.unref(s),l.mergeProps({key:12,class:"form-upload",modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,request:l.unref(a),ref_for:!0},l.unref(d)(P)),null,16,["modelValue","onUpdate:modelValue","request"])):P.fieldType==="editor"?(l.openBlock(),l.createBlock(l.unref(r),l.mergeProps({key:13,modelValue:y.value[P.fieldKey],"onUpdate:modelValue":Y=>y.value[P.fieldKey]=Y,disabled:P.isFormDisabled,placeholder:`${l.unref(o)("act.inputPlaceholder")}${P.fieldName}`,ref_for:!0},l.unref(d)(P)),null,16,["modelValue","onUpdate:modelValue","disabled","placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label","prop","rules"]))]),_:2},1032,["span"]))),128))]),_:1})]),_:1},8,["model","label-width","label-position"])),[[Li,g.value]])]}),_:1},8,["model-value","title","width"])}}},[["__scopeId","data-v-4ca7d743"]])},Symbol.toStringTag,{value:"Module"})),qT="",Ky=["innerHTML"],Jy={class:"dialog-footer"},e1=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const{t}=Ht(),n=e,s=i,r=()=>({loading:!1});let o=l.reactive(r());l.watch(()=>s.visible,async(h,u)=>{h&&(o.loading=!0,o.loading=!1)});const a=h=>{c(),h()},c=()=>{n("update:visible",!1)};return(h,u)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:800,"append-to-body":"","destroy-on-close":"",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":a},{footer:l.withCtx(()=>[l.createElementVNode("span",Jy,[l.createVNode(f,{onClick:c},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.cancel")),1)]),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("div",{innerHTML:i.data.editorContent},null,8,Ky)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-be1c5be6"]])},Symbol.toStringTag,{value:"Module"})),YT="",t1={class:"dialog-footer"},i1=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"dialogConfigBtn",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Gu)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>XO)),s=rn.useRoute(),r=l.inject("apiPrefix"),o=l.inject("request"),a=e,c=i,h=l.computed(()=>s.params.key),u=()=>({btnLoading:!1});let f=l.reactive(u());const d=l.inject("createDefaultButtonItem"),m=l.inject("associationMenuList"),b=l.inject("conditionList")();let w=l.ref([]),g=l.ref(null),p=l.ref(d());const O=M=>o({url:`${r}/icons/getAllList`,method:"post",data:M}),S=async()=>{try{const{data:M}=await O({dynamicFilters:[{field:"type",operate:"Equal",value:"2"}]});w.value=M||[]}catch(M){console.error(M)}};l.watch(()=>c.visible,async(M,E)=>{if(M){await S();const I={...c.data};Object.keys(p.value).forEach(B=>{B=="submitFields"||B=="matchFields"?p.value[B]=[...I[B]||[]]:B=="isPromptVerificationSelectTable"?p.value[B]=I[B]??"1":p.value[B]=I[B]})}});const y=()=>{p.value.submitWay=void 0,p.value.customType=void 0,p.value.codeStr=void 0,p.value.customComponentName=void 0,p.value.customComponentUrl=void 0},Q=()=>{p.value.submitFields.push({matchType:"match",submitFieldMatchOrigin:"rowData",submitFieldName:"",matchFieldName:"",submitFieldType:""})},k=M=>{p.value.submitFields.splice(M,1)},C=()=>{p.value.matchFields.push({matchType:"default",matchFieldName:"",matchCondition:"",fieldValue:"",spliceCondition:""})},T=M=>{p.value.matchFields.splice(M,1),p.value.matchFields.length===1&&(p.value.matchFields[0].spliceCondition="")},N=(M,E)=>{M.submitFieldMatchOrigin=E==="match"?"rowData":""},_=M=>{A(),M()},A=()=>{p.value=Object.assign(p.value,d()),g.value.resetFields(),a("update:visible",!1)},x=M=>{M&&M.validate(E=>{if(E)try{f.btnLoading=!0,a("refresh",{...p.value,submitFields:[...p.value.submitFields],matchFields:[...p.value.matchFields]},()=>{A()}),f.btnLoading=!1}catch(I){console.error(I),f.btnLoading=!1}})};return(M,E)=>{const I=l.resolveComponent("el-input"),B=l.resolveComponent("el-form-item"),U=l.resolveComponent("el-col"),Z=l.resolveComponent("el-option"),K=l.resolveComponent("el-select"),W=l.resolveComponent("el-row"),J=l.resolveComponent("el-button"),fe=l.resolveComponent("el-divider"),ce=l.resolveComponent("el-switch"),ye=l.resolveComponent("el-form"),G=l.resolveComponent("el-dialog"),D=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(G,{"model-value":c.visible,title:c.title,top:"5vh",width:"1200",draggable:"",overflow:"","append-to-body":"","append-to":"body","close-on-click-modal":!1,"before-close":_},{footer:l.withCtx(()=>[l.createElementVNode("span",t1,[l.createVNode(J,{loading:l.unref(f).btnLoading,onClick:A},{default:l.withCtx(()=>E[19]||(E[19]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(J,{type:"primary",loading:l.unref(f).btnLoading,onClick:E[16]||(E[16]=V=>x(l.unref(g)))},{default:l.withCtx(()=>E[20]||(E[20]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[D]])])]),default:l.withCtx(()=>[l.createVNode(ye,{ref_key:"formRef",ref:g,model:l.unref(p),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(W,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮",prop:"btnName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).btnName,"onUpdate:modelValue":E[0]||(E[0]=V=>l.unref(p).btnName=V),disabled:"",placeholder:"请输入按钮名称"},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(p).permissionCode),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮图标",prop:"btnIcon"},{default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(p).btnIcon,"onUpdate:modelValue":E[1]||(E[1]=V=>l.unref(p).btnIcon=V),icons:l.unref(w),props:{value:"name",type:"btn"}},null,8,["modelValue","icons"])]),_:1})]),_:1}),l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"接口地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"requestUrl"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).requestUrl,"onUpdate:modelValue":E[2]||(E[2]=V=>l.unref(p).requestUrl=V),placeholder:"请输入接口地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮位置",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnPostion"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnPostion,"onUpdate:modelValue":E[3]||(E[3]=V=>l.unref(p).btnPostion=V),placeholder:"请选择按钮位置",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(fy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnType,"onUpdate:modelValue":E[4]||(E[4]=V=>l.unref(p).btnType=V),placeholder:"请选择按钮类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(uy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮别名",prop:"btnAlias"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).btnAlias,"onUpdate:modelValue":E[5]||(E[5]=V=>l.unref(p).btnAlias=V),placeholder:"请输入按钮别名",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮颜色",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnColor"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnColor,"onUpdate:modelValue":E[6]||(E[6]=V=>l.unref(p).btnColor=V),placeholder:"请选择按钮颜色",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(dy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(U,{key:0,span:12},{default:l.withCtx(()=>[!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(B,{key:0,label:"提交方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitWay"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).submitWay,"onUpdate:modelValue":E[7]||(E[7]=V=>l.unref(p).submitWay=V),placeholder:"请选择提交方式",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(py),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):l.createCommentVNode("",!0)]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["import","batchImport"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:1,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"导入提交文件字段",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"importFileName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).importFileName,"onUpdate:modelValue":E[8]||(E[8]=V=>l.unref(p).importFileName=V),placeholder:"请输入导入提交文件字段",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["messageBox","executeApi"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:2,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"是否提示校验选择表格",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"isPromptVerificationSelectTable"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).isPromptVerificationSelectTable,"onUpdate:modelValue":E[9]||(E[9]=V=>l.unref(p).isPromptVerificationSelectTable=V),placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Qy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1}),l.createVNode(fe,{"content-position":"left"},{default:l.withCtx(()=>[E[17]||(E[17]=l.createTextVNode(" 提交字段配置 ")),l.createVNode(J,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:Q})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).submitFields,(V,q)=>(l.openBlock(),l.createBlock(W,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.submitFieldName,"onUpdate:modelValue":H=>V.submitFieldName=H,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:8},{default:l.withCtx(()=>[l.createVNode(B,{label:"方式","label-width":"80px",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{placeholder:"请输入",modelValue:V.matchFieldName,"onUpdate:modelValue":H=>V.matchFieldName=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchType,"onUpdate:modelValue":H=>V.matchType=H,placeholder:"请选择",style:{width:"120px"},onChange:H=>N(V,H)},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Oy),(H,Fe)=>(l.openBlock(),l.createBlock(Z,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),V.matchType==="match"?(l.openBlock(),l.createBlock(U,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配源",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldMatchOrigin"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.submitFieldMatchOrigin,"onUpdate:modelValue":H=>V.submitFieldMatchOrigin=H,placeholder:"请输入匹配源",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitFields."+q+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.submitFieldType,"onUpdate:modelValue":H=>V.submitFieldType=H,placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(my),(H,Fe)=>(l.openBlock(),l.createBlock(Z,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(J,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>k(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(fe,{"content-position":"left"},{default:l.withCtx(()=>[E[18]||(E[18]=l.createTextVNode(" 匹配字段配置(表格操作列按钮显示/隐藏) ")),l.createVNode(J,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:C})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).matchFields,(V,q)=>(l.openBlock(),l.createBlock(W,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"matchFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{placeholder:"请输入",modelValue:V.matchFieldName,"onUpdate:modelValue":H=>V.matchFieldName=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchType,"onUpdate:modelValue":H=>V.matchType=H,placeholder:"请选择",style:{width:"180px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(_y),(H,Fe)=>(l.openBlock(),l.createBlock(Z,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"matchFields."+q+".matchCondition"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchCondition,"onUpdate:modelValue":H=>V.matchCondition=H,placeholder:"请选择匹配条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(H,Fe)=>(l.openBlock(),l.createBlock(Z,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"字段值",prop:"matchFields."+q+".fieldValue"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.fieldValue,"onUpdate:modelValue":H=>V.fieldValue=H,placeholder:"请输入字段值",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(J,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>T(q)},null,8,["onClick"])]),_:2},1024),q+1!==l.unref(p).matchFields.length?(l.openBlock(),l.createBlock(U,{key:0,span:24},{default:l.withCtx(()=>[l.createVNode(B,{class:"condition-box",label:"","label-width":"0",prop:"matchFields."+q+".spliceCondition"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.spliceCondition,"onUpdate:modelValue":H=>V.spliceCondition=H,placeholder:"请选择拼接条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(gy),(H,Fe)=>(l.openBlock(),l.createBlock(Z,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128)),l.createVNode(W,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义按钮",prop:"isCustomBtn"},{default:l.withCtx(()=>[l.createVNode(ce,{modelValue:l.unref(p).isCustomBtn,"onUpdate:modelValue":E[10]||(E[10]=V=>l.unref(p).isCustomBtn=V),onChange:y},null,8,["modelValue"])]),_:1})]),_:1}),l.unref(p).isCustomBtn?(l.openBlock(),l.createBlock(U,{key:0,span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"customType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).customType,"onUpdate:modelValue":E[11]||(E[11]=V=>l.unref(p).customType=V),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(by),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"关联菜单"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).associationMenuId,"onUpdate:modelValue":E[12]||(E[12]=V=>l.unref(p).associationMenuId=V),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(m),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.name,value:V.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.unref(p).customType==="code"?(l.openBlock(),l.createBlock(W,{key:0,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"代码片段",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"codeStr"},{default:l.withCtx(()=>[l.createVNode(l.unref(n),{modelValue:l.unref(p).codeStr,"onUpdate:modelValue":E[13]||(E[13]=V=>l.unref(p).codeStr=V)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(p).customType==="component"?(l.openBlock(),l.createBlock(W,{key:1,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).customComponentName,"onUpdate:modelValue":E[14]||(E[14]=V=>l.unref(p).customComponentName=V),placeholder:"请输入组件名称",clearable:""},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(h.value),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:14},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentUrl"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).customComponentUrl,"onUpdate:modelValue":E[15]||(E[15]=V=>l.unref(p).customComponentUrl=V),placeholder:"请输入组件地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-325d2233"]])},Symbol.toStringTag,{value:"Module"})),HT="",n1={slot:"prepend"},s1={class:"dialog-footer"},r1=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"dialogAddField",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>cT)),n=e,s=i,r=l.inject("pageKey")(),o=l.inject("conditionList")(),a=l.inject("configData")(),c=()=>({btnLoading:!1,showSiteComponentsParamsDialog:!1});let h=l.reactive(c());const u=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableQueryDefaultValue:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),f=Xu,d=l.ref(null),m=l.ref(u()),b=()=>["select","selectIcon","multipleSelect","treeSelect","provinceCascade","switch","virtualizedSelect","virtualizedMultipleSelect"].includes(m.value.fieldType),w=()=>m.value.useScenes.includes("tableSearch")&&m.value.fieldType!=="time",g=()=>m.value.useScenes.includes("tableShow"),p=()=>m.value.fieldType&&m.value.fieldType!=="implicit"&&m.value.useScenes.some(_=>!["tableSearch","tableShow"].some(A=>A==_));l.watch(()=>s.visible,async(_,A)=>{if(_){const x=(a.value.buttons||[]).filter(E=>E.permissionCode!=1001).map(E=>({key:E.btnName,value:E.permissionCode}));f.some(E=>{if(E.label==="表单配置")return E.options=x,!0});const{data:M}=s;if(!M.fieldName)return;Object.keys(m.value).forEach(E=>{if(E=="permissionCode")m.value[E]=M.unique;else if(E=="formCustomComponentes"){const I=M.useScenes.map(B=>M[E].find(Z=>Z.permissionCode==B)||{});m.value[E]=[...I]}else["postRequestParams","useScenes"].includes(E)?m.value[E]=[...M[E]||[]]:m.value[E]=M[E]})}});const O=()=>{m.value.postRequestParams.push({submitName:"",submitValue:"",submitType:"default",submitMatchType:"",paramsType:""})},S=_=>{m.value.postRequestParams.splice(_,1)},y=_=>{m.value.postRequestParams=[]},Q=_=>{const A=f.find(M=>M.label==="表格配置").options,x=f.find(M=>M.label==="表单配置").options;m.value.formCustomComponentes=[...A,...x].filter(M=>_.includes(M.value)).map(M=>{const E=m.value.formCustomComponentes.find(I=>I.permissionCode==M.value);return{btnName:M.key,permissionCode:M.value,pageKey:r,customComponentName:(E==null?void 0:E.customComponentName)||void 0,customComponentUrl:(E==null?void 0:E.customComponentUrl)||void 0,isFieldCustom:(E==null?void 0:E.isFieldCustom)||!1}})},k=(_,A)=>{A.customComponentName=void 0,A.customComponentUrl=void 0},C=_=>{T(),_()},T=()=>{m.value=u(),d.value.resetFields(),n("update:visible",!1)},N=_=>{_&&_.validate(A=>{A&&(h.btnLoading=!0,m.value.formCustomComponentes.forEach(x=>{delete x.isFiledCustom}),n("refresh",JSON.parse(JSON.stringify(m.value)),()=>{T()}),h.btnLoading=!1)})};return(_,A)=>{const x=l.resolveComponent("el-input"),M=l.resolveComponent("el-form-item"),E=l.resolveComponent("el-col"),I=l.resolveComponent("el-option"),B=l.resolveComponent("el-select"),U=l.resolveComponent("el-button"),Z=l.resolveComponent("el-row"),K=l.resolveComponent("el-divider"),W=l.resolveComponent("el-option-group"),J=l.resolveComponent("el-switch"),fe=l.resolveComponent("el-input-number"),ce=l.resolveComponent("el-form"),ye=l.resolveComponent("el-scrollbar"),G=l.resolveComponent("el-dialog"),D=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(G,{"model-value":s.visible,title:s.title,top:"5vh",width:"1400",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":C},{footer:l.withCtx(()=>[l.createElementVNode("span",s1,[l.createVNode(U,{onClick:T,loading:l.unref(h).btnLoading},{default:l.withCtx(()=>A[29]||(A[29]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(U,{type:"primary",loading:l.unref(h).btnLoading,onClick:A[22]||(A[22]=V=>N(d.value))},{default:l.withCtx(()=>A[30]||(A[30]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[D]])])]),default:l.withCtx(()=>[l.createVNode(ye,{ref:"configFieldsScroll","max-height":"800px"},{default:l.withCtx(()=>[l.createVNode(ce,{ref_key:"formRef",ref:d,model:m.value,"label-suffix":":","label-width":"120px"},{default:l.withCtx(()=>[l.createVNode(Z,null,{default:l.withCtx(()=>[l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldName"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:m.value.fieldName,"onUpdate:modelValue":A[0]||(A[0]=V=>m.value.fieldName=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段key",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldKey"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:m.value.fieldKey,"onUpdate:modelValue":A[1]||(A[1]=V=>m.value.fieldKey=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段类型",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldType,"onUpdate:modelValue":A[2]||(A[2]=V=>m.value.fieldType=V),placeholder:"请选择",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(ju),V=>(l.openBlock(),l.createBlock(I,{key:V.value,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:4},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件参数",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(U,{type:"primary",onClick:A[3]||(A[3]=V=>l.unref(h).showSiteComponentsParamsDialog=!0)},{default:l.withCtx(()=>A[23]||(A[23]=[l.createTextVNode("设置props")])),_:1}),l.createVNode(l.unref(t),{modelValue:m.value.fieldUiProps,"onUpdate:modelValue":A[4]||(A[4]=V=>m.value.fieldUiProps=V),visible:l.unref(h).showSiteComponentsParamsDialog,"onUpdate:visible":A[5]||(A[5]=V=>l.unref(h).showSiteComponentsParamsDialog=V),title:"设置组件参数"},null,8,["modelValue","visible"])]),_:1})]),_:1})]),_:1}),b()?(l.openBlock(),l.createBlock(Z,{key:0},{default:l.withCtx(()=>[l.createVNode(E,{span:24},{default:l.withCtx(()=>[l.createVNode(M,{label:"数据源",prop:"fieldRequestUrl"},{default:l.withCtx(()=>[l.createVNode(x,{placeholder:"请输入",modelValue:m.value.fieldRequestUrl,"onUpdate:modelValue":A[7]||(A[7]=V=>m.value.fieldRequestUrl=V),clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldRequestType,"onUpdate:modelValue":A[6]||(A[6]=V=>m.value.fieldRequestType=V),placeholder:"请选择",style:{width:"150px"},onChange:y},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(yy),V=>(l.openBlock(),l.createBlock(I,{key:V.value,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),m.value.fieldRequestType=="POST"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>[A[24]||(A[24]=l.createTextVNode(" POST参数配置 ")),l.createVNode(U,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:O})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.postRequestParams,(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q},{default:l.withCtx(()=>[l.createVNode(E,{span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitName"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:V.submitName,"onUpdate:modelValue":H=>V.submitName=H,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(E,{span:8},{default:l.withCtx(()=>[l.createVNode(M,{label:"方式",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitValue"},{default:l.withCtx(()=>[l.createVNode(x,{placeholder:"请输入值",modelValue:V.submitValue,"onUpdate:modelValue":H=>V.submitValue=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:V.submitType,"onUpdate:modelValue":H=>V.submitType=H,placeholder:"请选择方式",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(wy),(H,Fe)=>(l.openBlock(),l.createBlock(I,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),V.submitType==="dynamic"?(l.openBlock(),l.createBlock(E,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitMatchType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:V.submitMatchType,"onUpdate:modelValue":H=>V.submitMatchType=H,placeholder:"请选择方式",clearable:"",filterable:"",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(H,Fe)=>(l.openBlock(),l.createBlock(I,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(E,{span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"postRequestParams."+q+".paramsType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:V.paramsType,"onUpdate:modelValue":H=>V.paramsType=H,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(qu),(H,Fe)=>(l.openBlock(),l.createBlock(I,{key:Fe,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(E,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(U,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>S(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))],64)):l.createCommentVNode("",!0),l.createVNode(Z,null,{default:l.withCtx(()=>[l.createVNode(E,{span:24},{default:l.withCtx(()=>[l.createVNode(M,{label:"使用场景",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"useScenes"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.useScenes,"onUpdate:modelValue":A[8]||(A[8]=V=>m.value.useScenes=V),placeholder:"请选择",multiple:"",clearable:"",filterable:"",onChange:Q},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f),V=>(l.openBlock(),l.createBlock(W,{key:V.label,label:V.label},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(V.options,q=>(l.openBlock(),l.createBlock(I,{key:q.key,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),w()?(l.openBlock(),l.createBlock(Z,{key:2},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[25]||(A[25]=[l.createTextVNode("查询模块")])),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"查询条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableQueryCondition"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableQueryCondition,"onUpdate:modelValue":A[9]||(A[9]=V=>m.value.tableQueryCondition=V),placeholder:"请选择查询条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"默认值",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"tableQueryDefaultValue"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:m.value.tableQueryDefaultValue,"onUpdate:modelValue":A[10]||(A[10]=V=>m.value.tableQueryDefaultValue=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),g()?(l.openBlock(),l.createBlock(Z,{key:3},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[26]||(A[26]=[l.createTextVNode("表格模块")])),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"列宽",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"tableCellWidth"},{default:l.withCtx(()=>[l.createVNode(x,{placeholder:"请输入",modelValue:m.value.tableCellWidth,"onUpdate:modelValue":A[12]||(A[12]=V=>m.value.tableCellWidth=V)},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellWidthType,"onUpdate:modelValue":A[11]||(A[11]=V=>m.value.tableCellWidthType=V),placeholder:"请选择",style:{width:"100px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"对齐方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellAlignType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellAlignType,"onUpdate:modelValue":A[13]||(A[13]=V=>m.value.tableCellAlignType=V),placeholder:"请选择对齐方式",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(xy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"内容类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellContentType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellContentType,"onUpdate:modelValue":A[14]||(A[14]=V=>m.value.tableCellContentType=V),placeholder:"请选择内容类型",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Sy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:"溢出隐藏",prop:"isTableCellOverflowTooltip"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isTableCellOverflowTooltip,"onUpdate:modelValue":A[15]||(A[15]=V=>m.value.isTableCellOverflowTooltip=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:"排序",prop:"isTableCellSort"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isTableCellSort,"onUpdate:modelValue":A[16]||(A[16]=V=>m.value.isTableCellSort=V)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),p()?(l.openBlock(),l.createBlock(Z,{key:4},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[27]||(A[27]=[l.createTextVNode("表单模块")])),_:1}),l.createVNode(E,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否必填",prop:"isFormFieldRequired"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormFieldRequired,"onUpdate:modelValue":A[17]||(A[17]=V=>m.value.isFormFieldRequired=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否回显",prop:"isFormSetValue"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormSetValue,"onUpdate:modelValue":A[18]||(A[18]=V=>m.value.isFormSetValue=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否禁用",prop:"isFormDisabled"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormDisabled,"onUpdate:modelValue":A[19]||(A[19]=V=>m.value.isFormDisabled=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"fieldSubmitType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldSubmitType,"onUpdate:modelValue":A[20]||(A[20]=V=>m.value.fieldSubmitType=V),placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(ky),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(E,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"栅格数",prop:"formColumnCol"},{default:l.withCtx(()=>[l.createVNode(fe,{modelValue:m.value.formColumnCol,"onUpdate:modelValue":A[21]||(A[21]=V=>m.value.formColumnCol=V),max:24},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[28]||(A[28]=[l.createTextVNode("不同场景自定义字段组件")])),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.formCustomComponentes,(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q},{default:l.withCtx(()=>[l.createVNode(E,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:`${V.btnName}`,prop:`formCustomComponentes.${q}.isFieldCustom`},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:V.isFieldCustom,"onUpdate:modelValue":H=>V.isFieldCustom=H,onChange:H=>k(H,V)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["label","prop"])]),_:2},1024),V.isFieldCustom?(l.openBlock(),l.createBlock(E,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件名称","label-width":"220",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentName`},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:V.customComponentName,"onUpdate:modelValue":H=>V.customComponentName=H,placeholder:"请输入",clearable:""},{default:l.withCtx(()=>[l.createElementVNode("template",n1,[l.createTextVNode(l.toDisplayString(l.unref(r)),1)])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),V.isFieldCustom?(l.openBlock(),l.createBlock(E,{key:1,span:14},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentUrl`},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:V.customComponentUrl,"onUpdate:modelValue":H=>V.customComponentUrl=H,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["model"])]),_:1},512)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-6b2ebaa8"]])},Symbol.toStringTag,{value:"Module"})),zu=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i,s=l.computed({get(){return n.modelValue},set(a){t("update:modelValue",a)}}),r=a=>{let c=a.charAt(0);return a=a.replace(/[^\d.]/g,""),a=a.replace(/^\./g,""),a=a.replace(/\.{2,}/g,"."),a=a.replace(".","$#$").replace(/\./g,"").replace("$#$","."),c=="-"&&(a="-"+a),a},o=a=>{s.value=r(a)};return(a,c)=>{const h=l.resolveComponent("el-input");return l.openBlock(),l.createBlock(h,l.mergeProps({modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),modelModifiers:{number:!0},placeholder:"Please input"},a.$attrs,{onInput:o}),null,16,["modelValue"])}}}},Symbol.toStringTag,{value:"Module"})),tE="",iE="",o1={class:"select-icon-container"},l1={class:"icon-list"},a1=["onClick"],c1={class:"icon-value",slot:"reference"},Gu=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{modelValue:{type:String,default:""},icons:{type:Array,default:()=>[]},props:{type:Object,default:()=>({value:"value",type:"btn"})}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i;let s=l.ref(!1),r=l.ref(-1),o=l.ref([]);const a=()=>r.value==-1?"":o.value[r.value];l.watch(()=>n.icons,(h,u)=>{h&&(o.value=(n.icons||[]).map(f=>{const{props:d}=n;return Reflect.has(f,d.value)?`${d.type}-${f[d.value]}`:`${d.type}-${f}`}))},{deep:!0,immediate:!0}),l.watch(()=>n.modelValue,(h,u)=>{if(!h){r.value=-1,t("update:modelValue","");return}const f=o.value.findIndex(d=>d===h);r.value=f},{deep:!0,immediate:!0});const c=(h,u)=>{r.value=u,t("update:modelValue",a()),s.value=!1};return(h,u)=>{const f=l.resolveComponent("a-svg-icon"),d=l.resolveComponent("el-button"),m=l.resolveComponent("el-popover");return l.openBlock(),l.createElementBlock("div",o1,[l.createVNode(m,{"popper-class":"select-icon-popover",placement:"bottom-start",visible:l.unref(s),"onUpdate:visible":u[0]||(u[0]=b=>l.isRef(s)?s.value=b:s=b),width:400,trigger:"click"},{reference:l.withCtx(()=>[l.createElementVNode("div",c1,[l.unref(r)>=0?(l.openBlock(),l.createBlock(f,{key:0,name:n.modelValue,width:"24",height:"24",color:"#000"},null,8,["name"])):l.createCommentVNode("",!0),l.createVNode(d,{class:"icon-btn",type:"primary"},{default:l.withCtx(()=>u[1]||(u[1]=[l.createTextVNode("选择图标")])),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("ul",l1,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(b,w)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["icon-item",{"icon-item-checked":l.unref(r)==w}]),key:w,onClick:g=>c(b,w)},[l.createVNode(f,{class:"icon-svg",name:b,width:"24",height:"24",color:"#999"},null,8,["name"])],10,a1))),128))])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-308d02d4"]])},Symbol.toStringTag,{value:"Module"}));let Cr;const h1=new Uint8Array(16);function u1(){if(!Cr&&(Cr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cr(h1)}const ut=[];for(let i=0;i<256;++i)ut.push((i+256).toString(16).slice(1));function f1(i,e=0){return ut[i[e+0]]+ut[i[e+1]]+ut[i[e+2]]+ut[i[e+3]]+"-"+ut[i[e+4]]+ut[i[e+5]]+"-"+ut[i[e+6]]+ut[i[e+7]]+"-"+ut[i[e+8]]+ut[i[e+9]]+"-"+ut[i[e+10]]+ut[i[e+11]]+ut[i[e+12]]+ut[i[e+13]]+ut[i[e+14]]+ut[i[e+15]]}const Hu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function d1(i,e,t){if(Hu.randomUUID&&!e&&!i)return Hu.randomUUID();i=i||{};const n=i.random||(i.rng||u1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=n[s];return e}return f1(n)}const oE="",p1={class:"upload-container"},m1={class:"el-upload__text"},g1={class:"tip-text"},O1={class:"file-list-l"},_1=["onMouseenter","onMouseleave"],b1={class:"el-file-operate"},y1=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{request:{type:Function,required:!0,default:null},modelValue:{type:[Array,String],default:[]},action:{type:String,default:"/api/v1/utils/uploadFiles"},data:{type:Object,default:()=>({uploadFileType:1})},name:{type:String,default:"files"},multiple:{type:Boolean,default:!0},limit:{type:Number,default:9},accept:{type:String,default:"*"},tipText:{type:String,default:""},fileMaxSize:{type:Number,default:100},autoUpload:{type:Boolean,default:!0}},emits:["update:modelValue","delete"],setup(i,{expose:e,emit:t}){const{getAssetsFileName:n,getAssetsFilePath:s,downloadFile:r}=Zu(),{t:o}=Ht(),a=t,c=i,h={image:/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/,word:/(doc|docx)$/,pdf:/(pdf)$/,excel:/(xls|xlsx)$/};let u=l.ref(!1),f=l.ref({}),d=l.ref(!1),m=l.ref(null),b=null,w=l.computed({get(){return S(c.modelValue)},set(E){a("update:modelValue",E)}});const g=E=>{const I=(w.value||[]).map(Z=>Z.filePath);if(E==0)return I;let B=I.splice(E),U=I.splice(0,E);return B.concat(U)},p=E=>{const I=E.substring(E.lastIndexOf(".")+1);let B=null;return Object.keys(h).some(U=>{if(h[U].test(I))return B=U,!0}),B===null&&(B="file"),B},O=E=>E.map(I=>({uid:I.uid??d1(),name:n(I),filePath:I,fileType:p(I),status:"success"})),S=E=>{const I=Array.isArray(E)?E.map(B=>B.filePath):E?E.split(";"):[];return O(I||[])},y=({name:E})=>{const I=E.lastIndexOf("."),B=E.slice(I),U=c.accept.trim().split(",");let Z=!1;return U.includes(B)&&(Z=!0),Z=U.some(K=>K=="image/*"?h.image.test(B):K.startsWith(".")?E.endsWith(K):K===B),Z||Ne.ElNotification({title:`${o("act.tip")}`,message:`【${E}】${o("act.uploadErrorTip")}`,type:"warning",duration:2500}),Z},Q=(E,I,B)=>{b&&(clearTimeout(b),b=null),b=setTimeout(()=>{E.call(this,I)},B)},k=E=>c.request({url:c.action,method:"POST",data:E,headers:{"Content-Type":"application/x-www-form-urlencoded"}}),C=async E=>{try{const I=E.filter(W=>W.status=="ready"&&y(W)),B=w.value.length+I.length;if(I.length===0){m.value.clearFiles();return}if(B>c.limit){Ne.ElNotification({title:`${o("act.tip")}`,message:`${o("act.uploadLimitTip")}`,type:"warning",duration:2500}),m.value.clearFiles();return}if(!c.autoUpload){const W=I.map(J=>({...J,filePath:null,status:"success"}));a("update:modelValue",W),m.value.clearFiles();return}u.value=!0;const U=new FormData;Object.keys(c.data).forEach(W=>{U.append(W,c.data[W])}),I.forEach(W=>{U.append(c.name,W.raw)});let{data:Z}=await k(U);const K=c.multiple?[...w.value.map(W=>W.filePath),...Z.filePaths||[]].join(";"):[...Z.filePaths||[]].join(";");m.value.clearFiles(),a("update:modelValue",K),u.value=!1}catch(I){m.value.clearFiles(),u.value=!1,console.error(I)}},T=(E,I)=>{Q(C,I,500)},N=(E,I)=>{const B=f.value[`tooltipRef${I}`];d.value=B.scrollWidth<=Math.round(B.getBoundingClientRect().width)},_=({filePath:E,name:I,uid:B},U)=>{l.nextTick(()=>{document.querySelector(`.previewImage_${B}`).children[0].click()})},A=({filePath:E,name:I})=>{r(c.request,E)},x=(E,I)=>{w.value=w.value.filter((B,U)=>U!==I),a("delete",{data:E})};return e({clearFiles:()=>{w.value=[],m.value.clearFiles()}}),(E,I)=>{const B=l.resolveComponent("upload-filled"),U=l.resolveComponent("el-icon"),Z=l.resolveComponent("el-upload"),K=l.resolveComponent("el-image"),W=l.resolveComponent("el-tooltip"),J=l.resolveComponent("el-button"),fe=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",p1,[l.withDirectives((l.openBlock(),l.createBlock(Z,l.mergeProps({ref_key:"uploadRef",ref:m,action:"#",drag:"",accept:c.accept,multiple:c.multiple,"auto-upload":!1,"show-file-list":!1,"on-change":T},E.$attrs,{"element-loading-text":l.unref(o)("act.uploadLoading")}),{tip:l.withCtx(()=>[c.tipText?l.renderSlot(E.$slots,"default",{key:0},()=>[l.createElementVNode("p",g1,l.toDisplayString(c.tipText),1)],!0):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[l.createVNode(U,{class:"el-icon--upload"},{default:l.withCtx(()=>[l.createVNode(B)]),_:1}),l.createElementVNode("div",m1,[l.createTextVNode(l.toDisplayString(l.unref(o)("act.uploadText")),1),l.createElementVNode("em",null,l.toDisplayString(l.unref(o)("act.clickUpload")),1)])]),_:3},16,["accept","multiple","element-loading-text"])),[[fe,l.unref(u)]]),l.renderSlot(E.$slots,"default",{},()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(ce,ye)=>(l.openBlock(),l.createElementBlock("div",{class:"file-list",key:ce.uid},[l.createElementVNode("div",O1,[ce.fileType==="image"?(l.openBlock(),l.createBlock(K,{key:0,class:l.normalizeClass(["file-list-image",{[`previewImage_${ce.uid}`]:!0}]),fit:"cover","preview-src-list":g(ye),"preview-teleported":"",src:ce.filePath},null,8,["class","preview-src-list","src"])):(l.openBlock(),l.createBlock(K,{key:1,class:"file-list-icon",src:l.unref(s)(`images/upload-${ce.fileType}.png`)},null,8,["src"])),l.createVNode(W,{effect:"dark",content:ce.name,placement:"bottom-start",disabled:l.unref(d)},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"el-file-name",ref_for:!0,ref:G=>l.unref(f)[`tooltipRef${ye}`]=G,onMouseenter:G=>N(G,ye),onMouseleave:G=>N(G,ye)},l.toDisplayString(ce.name),41,_1)]),_:2},1032,["content","disabled"])]),l.createElementVNode("div",b1,[ce.fileType==="image"?(l.openBlock(),l.createBlock(J,{key:0,type:"primary",size:"small",icon:l.unref(ry),circle:"",onClick:G=>_(ce)},null,8,["icon","onClick"])):l.createCommentVNode("",!0),l.createVNode(J,{type:"primary",size:"small",icon:l.unref(ty),circle:"",onClick:G=>A(ce)},null,8,["icon","onClick"]),l.createVNode(J,{type:"danger",size:"small",icon:l.unref(Jb),circle:"",onClick:G=>x(ce,ye)},null,8,["icon","onClick"])])]))),128))],!0)])}}},[["__scopeId","data-v-f839bee6"]])},Symbol.toStringTag,{value:"Module"}));var w1=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCommentChange","onCompositionEnd","onCompositionStart","onCompositionUpdate","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onInput","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],k1=function(i){return w1.map(function(e){return e.toLowerCase()}).indexOf(i.toLowerCase())!==-1},x1=function(i,e,t){Object.keys(e).filter(k1).forEach(function(n){var s=e[n];typeof s=="function"&&(n==="onInit"?s(i,t):t.on(n.substring(2),function(r){return s(r,t)}))})},S1=function(i,e,t,n){var s=i.modelEvents?i.modelEvents:null,r=Array.isArray(s)?s.join(" "):s;l.watch(n,function(o,a){t&&typeof o=="string"&&o!==a&&o!==t.getContent({format:i.outputFormat})&&t.setContent(o)}),t.on(r||"change input undo redo",function(){e.emit("update:modelValue",t.getContent({format:i.outputFormat}))})},C1=function(i,e,t,n,s,r){n.setContent(r()),t.attrs["onUpdate:modelValue"]&&S1(e,t,n,s),x1(i,t.attrs,n)},Ku=0,Ju=function(i){var e=Date.now(),t=Math.floor(Math.random()*1e9);return Ku++,i+"_"+t+Ku+String(e)},A1=function(i){return i!==null&&i.tagName.toLowerCase()==="textarea"},ef=function(i){return typeof i>"u"||i===""?[]:Array.isArray(i)?i:i.split(" ")},Q1=function(i,e){return ef(i).concat(ef(e))},P1=function(i){return i==null},tf=function(){return{listeners:[],scriptId:Ju("tiny-script"),scriptLoaded:!1}},T1=function(){var i=tf(),e=function(s,r,o,a){var c=r.createElement("script");c.referrerPolicy="origin",c.type="application/javascript",c.id=s,c.src=o;var h=function(){c.removeEventListener("load",h),a()};c.addEventListener("load",h),r.head&&r.head.appendChild(c)},t=function(s,r,o){i.scriptLoaded?o():(i.listeners.push(o),s.getElementById(i.scriptId)||e(i.scriptId,s,r,function(){i.listeners.forEach(function(a){return a()}),i.scriptLoaded=!0}))},n=function(){i=tf()};return{load:t,reinitialize:n}},E1=T1(),$1=function(){return typeof window<"u"?window:global},hn=function(){var i=$1();return i&&i.tinymce?i.tinymce:null},N1={apiKey:String,licenseKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(i){return i==="html"||i==="text"}}},ai=globalThis&&globalThis.__assign||function(){return ai=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s])}return i},ai.apply(this,arguments)},R1=function(i,e,t,n){return i(n||"div",{id:e,ref:t})},V1=function(i,e,t){return i("textarea",{id:e,visibility:"hidden",ref:t})},Rl={selector:void 0,target:void 0},L1=l.defineComponent({props:N1,setup:function(i,e){var t=i.init?ai(ai({},i.init),Rl):ai({},Rl),n=l.toRefs(i),s=n.disabled,r=n.modelValue,o=n.tagName,a=l.ref(null),c=null,h=i.id||Ju("tiny-vue"),u=i.init&&i.init.inline||i.inline,f=!!e.attrs["onUpdate:modelValue"],d=!0,m=i.initialValue?i.initialValue:"",b="",w=function(O){return f?function(){return r!=null&&r.value?r.value:""}:function(){return O?m:b}},g=function(){var O=w(d),S=ai(ai({},t),{readonly:i.disabled,target:a.value,plugins:Q1(t.plugins,i.plugins),toolbar:i.toolbar||t.toolbar,inline:u,license_key:i.licenseKey,setup:function(y){c=y,y.on("init",function(Q){return C1(Q,i,e,y,r,O)}),typeof t.setup=="function"&&t.setup(y)}});A1(a.value)&&(a.value.style.visibility=""),hn().init(S),d=!1};l.watch(s,function(O){var S;c!==null&&(typeof((S=c.mode)===null||S===void 0?void 0:S.set)=="function"?c.mode.set(O?"readonly":"design"):c.setMode(O?"readonly":"design"))}),l.watch(o,function(O){var S;f||(b=c.getContent()),(S=hn())===null||S===void 0||S.remove(c),l.nextTick(function(){return g()})}),l.onMounted(function(){if(hn()!==null)g();else if(a.value&&a.value.ownerDocument){var O=i.cloudChannel?i.cloudChannel:"7",S=i.apiKey?i.apiKey:"no-api-key",y=P1(i.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/".concat(S,"/tinymce/").concat(O,"/tinymce.min.js"):i.tinymceScriptSrc;E1.load(a.value.ownerDocument,y,g)}}),l.onBeforeUnmount(function(){hn()!==null&&hn().remove(c)}),u||(l.onActivated(function(){d||g()}),l.onDeactivated(function(){var O;f||(b=c.getContent()),(O=hn())===null||O===void 0||O.remove(c)}));var p=function(O){var S;b=c.getContent(),(S=hn())===null||S===void 0||S.remove(c),t=ai(ai(ai({},t),O),Rl),l.nextTick(function(){return g()})};return e.expose({rerender:p,getEditor:function(){return c}}),function(){return u?R1(l.h,h,a,i.tagName):V1(l.h,h,a)}}});const cE="",M1={style:{height:"100%",overflow:"hidden"}},B1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String,default:""},value:{type:String,default:""},baseUrl:{type:String,default:""},width:{type:[Number,String],default:"100%"},height:{type:Number,default:500},disabled:{type:Boolean,default:!1},editableRoot:{type:Boolean,default:!0},placeholder:{type:String,default:"请输入"},plugins:{type:[String,Array],default:"importcss autoresize searchreplace autolink directionality code visualblocks visualchars fullscreen image link codesample table charmap nonbreaking anchor insertdatetime advlist lists wordcount charmap quickbars emoticons accordion"},toolbar:{type:[String,Array,Boolean],default:"undo redo | accordion accordionremove | blocks fontfamily fontsize| bold italic underline strikethrough ltr rtl | align numlist bullist | link image | table | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | anchor codesample"}},emits:["update:modelValue","setHtml"],setup(i,{expose:e,emit:t}){const n=t,s=i,r=l.ref("vue-tinymce-"+ +new Date+((Math.random()*1e3).toFixed(0)+"")),o=l.reactive({selector:"#"+r.value,language_url:"/tinymce/langs/zh_CN.js",language:"zh_CN",skin_url:"/tinymce/skins/ui/oxide",content_css:"/tinymce/skins/content/default/content.css",editable_root:s.editableRoot,width:s.width,max_height:s.height,branding:!1,promotion:!1,menubar:"edit view insert format tools table",paste_data_images:!0,image_dimensions:!1,plugins:s.plugins,toolbar:s.toolbar,convert_urls:!1,link_default_target:"_blank",link_context_toolbar:!0,quickbars_insert_toolbar:"",quickbars_image_toolbar:"alignleft aligncenter alignright | rotateleft rotateright | imageoptions",editimage_toolbar:"rotateleft rotateright | flipv fliph | editimage imageoptions",font_family_formats:"Arial=arial,helvetica,sans-serif; 宋体=SimSun; 微软雅黑=Microsoft Yahei; Impact=impact,chicago;",font_size_formats:"11px 12px 14px 16px 18px 24px 36px 48px 64px 72px",image_caption:!0,editimage_cors_hosts:["picsum.photos"],noneditable_class:"mceNonEditable",toolbar_mode:"wrap",content_style:"body {margin:12px; font-family:sans-serif; font-size:14px }p {margin:3px; line-height:24px;}",image_advtab:!0,importcss_append:!0,paste_webkit_styles:"all",paste_merge_formats:!0,nonbreaking_force_tab:!1,paste_auto_cleanup_on_paste:!1,file_picker_types:"file",quickbars_selection_toolbar:"bold italic | quicklink h2 h3 blockquote quickimage quicktable",images_upload_handler:function(u,f){}});console.log(o);const a=l.computed({get(){return s.modelValue},set(u){n("update:modelValue",u)}});return l.watch(()=>a.value,()=>{n("setHtml",cr.activeEditor.getContent({format:"text"}),a.value)}),l.onMounted(()=>{cr.init({})}),e({onGetContent:()=>cr.activeEditor.getContent(),onSetContent:u=>{cr.activeEditor.setContent(u)}}),(u,f)=>(l.openBlock(),l.createElementBlock("div",M1,[l.createVNode(l.unref(L1),{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=d=>a.value=d),init:o,disabled:i.disabled,placeholder:i.placeholder,id:r.value},null,8,["modelValue","init","disabled","placeholder","id"])]))}}},Symbol.toStringTag,{value:"Module"}));let Vl=[],nf=[];(()=>{let i="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(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<i.length;e++)(e%2?nf:Vl).push(t=t+i[e])})();function D1(i){if(i<768)return!1;for(let e=0,t=Vl.length;;){let n=e+t>>1;if(i<Vl[n])t=n;else if(i>=nf[n])e=n+1;else return!0;if(e==t)return!1}}function sf(i){return i>=127462&&i<=127487}const rf=8205;function v1(i,e,t=!0,n=!0){return(t?of:Z1)(i,e,n)}function of(i,e,t){if(e==i.length)return e;e&&lf(i.charCodeAt(e))&&af(i.charCodeAt(e-1))&&e--;let n=Ll(i,e);for(e+=cf(n);e<i.length;){let s=Ll(i,e);if(n==rf||s==rf||t&&D1(s))e+=cf(s),n=s;else if(sf(s)){let r=0,o=e-2;for(;o>=0&&sf(Ll(i,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Z1(i,e,t){for(;e>0;){let n=of(i,e-2,t);if(n<e)return n;e--}return 0}function Ll(i,e){let t=i.charCodeAt(e);if(!af(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return lf(n)?(t-55296<<10)+(n-56320)+65536:t}function lf(i){return i>=56320&&i<57344}function af(i){return i>=55296&&i<56320}function cf(i){return i<65536?1:2}class Ae{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,n){[e,t]=Rn(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(t,this.length,s,1),ci.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Rn(this,e,t);let n=[];return this.decompose(e,t,n,0),ci.from(n,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),n=this.length-this.scanIdentical(e,-1),s=new ps(this),r=new ps(e);for(let o=t,a=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(a+=s.value.length,s.done||a>=n)return!0}}iter(e=1){return new ps(this,e)}iterRange(e,t=this.length){return new uf(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ff(n)}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]?Ae.empty:e.length<=32?new Ge(e):ci.from(Ge.split(e,[]))}}class Ge extends Ae{constructor(e,t=I1(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.text[r],a=s+o.length;if((t?n:a)>=e)return new U1(s,a,n,o);s=a+1,n++}}decompose(e,t,n,s){let r=e<=0&&t>=this.length?this:new Ge(hf(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=n.pop(),a=Ar(r.text,o.text.slice(),0,r.length);if(a.length<=32)n.push(new Ge(a,o.length+r.length));else{let c=a.length>>1;n.push(new Ge(a.slice(0,c)),new Ge(a.slice(c)))}}else n.push(r)}replace(e,t,n){if(!(n instanceof Ge))return super.replace(e,t,n);[e,t]=Rn(this,e,t);let s=Ar(this.text,Ar(n.text,hf(this.text,0,e)),t),r=this.length+n.length-(t-e);return s.length<=32?new Ge(s,r):ci.from(Ge.split(s,[]),r)}sliceString(e,t=this.length,n=`
22
- `){[e,t]=Rn(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let a=this.text[o],c=r+a.length;r>e&&o&&(s+=n),e<c&&t>r&&(s+=a.slice(Math.max(0,e-r),t-r)),r=c+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let r of e)n.push(r),s+=r.length+1,n.length==32&&(t.push(new Ge(n,s)),n=[],s=-1);return s>-1&&t.push(new Ge(n,s)),t}}class ci extends Ae{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.children[r],a=s+o.length,c=n+o.lines-1;if((t?c:a)>=e)return o.lineInner(e,t,n,s);s=a+1,n=c+1}}decompose(e,t,n,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let a=this.children[r],c=o+a.length;if(e<=c&&t>=o){let h=s&((o<=e?1:0)|(c>=t?2:0));o>=e&&c<=t&&!h?n.push(a):a.decompose(e-o,t-o,n,h)}o=c+1}}replace(e,t,n){if([e,t]=Rn(this,e,t),n.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],a=r+o.length;if(e>=r&&t<=a){let c=o.replace(e-r,t-r,n),h=this.lines-o.lines+c.lines;if(c.lines<h>>5-1&&c.lines>h>>5+1){let u=this.children.slice();return u[s]=c,new ci(u,this.length-(t-e)+n.length)}return super.replace(r,a,c)}r=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
23
- `){[e,t]=Rn(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let a=this.children[r],c=o+a.length;o>e&&r&&(s+=n),e<c&&t>o&&(s+=a.sliceString(e-o,t-o,n)),o=c+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ci))return 0;let n=0,[s,r,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==a)return n;let c=this.children[s],h=e.children[r];if(c!=h)return n+c.scanIdentical(h,t);n+=c.length+1}}static from(e,t=e.reduce((n,s)=>n+s.length+1,-1)){let n=0;for(let m of e)n+=m.lines;if(n<32){let m=[];for(let b of e)b.flatten(m);return new Ge(m,t)}let s=Math.max(32,n>>5),r=s<<1,o=s>>1,a=[],c=0,h=-1,u=[];function f(m){let b;if(m.lines>r&&m instanceof ci)for(let w of m.children)f(w);else m.lines>o&&(c>o||!c)?(d(),a.push(m)):m instanceof Ge&&c&&(b=u[u.length-1])instanceof Ge&&m.lines+b.lines<=32?(c+=m.lines,h+=m.length+1,u[u.length-1]=new Ge(b.text.concat(m.text),b.length+1+m.length)):(c+m.lines>s&&d(),c+=m.lines,h+=m.length+1,u.push(m))}function d(){c!=0&&(a.push(u.length==1?u[0]:ci.from(u,h)),h=-1,c=u.length=0)}for(let m of e)f(m);return d(),a.length==1?a[0]:new ci(a,t)}}Ae.empty=new Ge([""],0);function I1(i){let e=-1;for(let t of i)e+=t.length+1;return e}function Ar(i,e,t=0,n=1e9){for(let s=0,r=0,o=!0;r<i.length&&s<=n;r++){let a=i[r],c=s+a.length;c>=t&&(c>n&&(a=a.slice(0,n-s)),s<t&&(a=a.slice(t-s)),o?(e[e.length-1]+=a,o=!1):e.push(a)),s=c+1}return e}function hf(i,e,t){return Ar(i,[""],e,t)}class ps{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 Ge?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],r=this.offsets[n],o=r>>1,a=s instanceof Ge?s.text.length:s.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
24
- `,this;e--}else if(s instanceof Ge){let c=s.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=s.children[o+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof Ge?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class uf{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new ps(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}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 n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),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 ff{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ae.prototype[Symbol.iterator]=function(){return this.iter()},ps.prototype[Symbol.iterator]=uf.prototype[Symbol.iterator]=ff.prototype[Symbol.iterator]=function(){return this});class U1{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}}function Rn(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}function ft(i,e,t=!0,n=!0){return v1(i,e,t,n)}function F1(i){return i>=56320&&i<57344}function j1(i){return i>=55296&&i<56320}function At(i,e){let t=i.charCodeAt(e);if(!j1(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return F1(n)?(t-55296<<10)+(n-56320)+65536:t}function Ml(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}function hi(i){return i<65536?1:2}const Bl=/\r\n?|\n/;var dt=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(dt||(dt={}));class ui{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 n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(n,s,r),s+=r):s+=o,n+=r}}iterChangedRanges(e,t=!1){Dl(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?e.push(n,s):e.push(s,n)}return new ui(e)}composeDesc(e){return this.empty?e:e.empty?this:df(this,e)}mapDesc(e,t=!1){return e.empty?this:vl(this,e,t)}mapPos(e,t=-1,n=dt.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],c=this.sections[o++],h=s+a;if(c<0){if(h>e)return r+(e-s);r+=a}else{if(n!=dt.Simple&&h>=e&&(n==dt.TrackDel&&s<e&&h>e||n==dt.TrackBefore&&s<e||n==dt.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!a)return e==s||t<0?r:r+c;r+=c}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let n=0,s=0;n<this.sections.length&&s<=t;){let r=this.sections[n++],o=this.sections[n++],a=s+r;if(o>=0&&s<=t&&a>=e)return s<e&&a>t?"cover":!0;s=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+n+(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 ui(e)}static create(e){return new ui(e)}}class nt extends ui{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 Dl(this,(t,n,s,r,o)=>e=e.replace(s,s+(n-t),o),!1),e}mapDesc(e,t=!1){return vl(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],a=t[s+1];if(a>=0){t[s]=a,t[s+1]=o;let c=s>>1;for(;n.length<c;)n.push(Ae.empty);n.push(o?e.slice(r,r+o):Ae.empty)}r+=o}return new nt(t,n)}compose(e){return this.empty?e:e.empty?this:df(this,e,!0)}map(e,t=!1){return e.empty?this:vl(this,e,t,!0)}iterChanges(e,t=!1){Dl(this,e,t)}get desc(){return ui.create(this.sections)}filter(e){let t=[],n=[],s=[],r=new ms(this);e:for(let o=0,a=0;;){let c=o==e.length?1e9:e[o++];for(;a<c||a==c&&r.len==0;){if(r.done)break e;let u=Math.min(r.len,c-a);Ot(s,u,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;Ot(t,u,f),f>0&&ji(n,t,r.text),r.forward(u),a+=u}let h=e[o++];for(;a<h;){if(r.done)break e;let u=Math.min(r.len,h-a);Ot(t,u,-1),Ot(s,u,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(u),a+=u}}return{changes:new nt(t,n),filtered:ui.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],s=this.sections[t+1];s<0?e.push(n):s==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let s=[],r=[],o=0,a=null;function c(u=!1){if(!u&&!s.length)return;o<t&&Ot(s,t-o,-1);let f=new nt(s,r);a=a?a.compose(f.map(a)):f,s=[],r=[],o=0}function h(u){if(Array.isArray(u))for(let f of u)h(f);else if(u instanceof nt){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);c(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:m}=u;if(f>d||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let b=m?typeof m=="string"?Ae.of(m.split(n||Bl)):m:Ae.empty,w=b.length;if(f==d&&w==0)return;f<o&&c(),f>o&&Ot(s,f-o,-1),Ot(s,d-f,w),ji(r,s,b),o=d}}return h(e),c(!a),a}static empty(e){return new nt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;n.length<s;)n.push(Ae.empty);n[s]=Ae.of(r.slice(1)),t.push(r[0],n[s].length)}}}return new nt(t,n)}static createSet(e,t){return new nt(e,t)}}function Ot(i,e,t,n=!1){if(e==0&&t<=0)return;let s=i.length-2;s>=0&&t<=0&&t==i[s+1]?i[s]+=e:s>=0&&e==0&&i[s]==0?i[s+1]+=t:n?(i[s]+=e,i[s+1]+=t):i.push(e,t)}function ji(i,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<i.length)i[i.length-1]=i[i.length-1].append(t);else{for(;i.length<n;)i.push(Ae.empty);i.push(t)}}function Dl(i,e,t){let n=i.inserted;for(let s=0,r=0,o=0;o<i.sections.length;){let a=i.sections[o++],c=i.sections[o++];if(c<0)s+=a,r+=a;else{let h=s,u=r,f=Ae.empty;for(;h+=a,u+=c,c&&n&&(f=f.append(n[o-2>>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)a=i.sections[o++],c=i.sections[o++];e(s,h,r,u,f),s=h,r=u}}}function vl(i,e,t,n=!1){let s=[],r=n?[]:null,o=new ms(i),a=new ms(e);for(let c=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let h=Math.min(o.len,a.len);Ot(s,h,-1),o.forward(h),a.forward(h)}else if(a.ins>=0&&(o.ins<0||c==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!t))){let h=a.len;for(Ot(s,a.ins,-1);h;){let u=Math.min(o.len,h);o.ins>=0&&c<o.i&&o.len<=u&&(Ot(s,0,o.ins),r&&ji(r,s,o.text),c=o.i),o.forward(u),h-=u}a.next()}else if(o.ins>=0){let h=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);h+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Ot(s,h,c<o.i?o.ins:0),r&&c<o.i&&ji(r,s,o.text),c=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return r?nt.createSet(s,r):ui.create(s);throw new Error("Mismatched change set lengths")}}}function df(i,e,t=!1){let n=[],s=t?[]:null,r=new ms(i),o=new ms(e);for(let a=!1;;){if(r.done&&o.done)return s?nt.createSet(n,s):ui.create(n);if(r.ins==0)Ot(n,r.len,0,a),r.next();else if(o.len==0&&!o.done)Ot(n,0,o.ins,a),s&&ji(s,n,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let c=Math.min(r.len2,o.len),h=n.length;if(r.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Ot(n,c,u,a),s&&u&&ji(s,n,o.text)}else o.ins==-1?(Ot(n,r.off?0:r.len,c,a),s&&ji(s,n,r.textBit(c))):(Ot(n,r.off?0:r.len,o.off?0:o.ins,a),s&&!o.off&&ji(s,n,o.text));a=(r.ins>c||o.ins>=0&&o.len>c)&&(a||n.length>h),r.forward2(c),o.forward(c)}}}}class ms{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?Ae.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Ae.empty:t[n].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 un{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}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 n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new un(n,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return j.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return j.range(this.anchor,n)}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 j.range(e.anchor,e.head)}static create(e,t,n){return new un(e,t,n)}}class j{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:j.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new j([this.main],0)}addRange(e,t=!0){return j.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,j.create(n,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 j(e.ranges.map(t=>un.fromJSON(t)),e.main)}static single(e,t=e){return new j([j.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 n=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=n:r.from<n)return j.normalized(e.slice(),t);n=r.to}return new j(e,t)}static cursor(e,t=0,n,s){return un.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(s??16777215)<<6)}static range(e,t,n,s){let r=(n??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?un.create(t,e,48|r):un.create(e,t,(t>e?8:0)|r)}static normalized(e,t=0){let n=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(n);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let a=o.from,c=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?j.range(c,a):j.range(a,c))}}return new j(e,t)}}function pf(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Zl=0;class ae{constructor(e,t,n,s,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=Zl++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new ae(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Il),!!e.static,e.enables)}of(e){return new Qr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qr(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function Il(i,e){return i==e||i.length==e.length&&i.every((t,n)=>t===e[n])}class Qr{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=Zl++}dynamicSlot(e){var t;let n=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,a=this.type==2,c=!1,h=!1,u=[];for(let f of this.dependencies)f=="doc"?c=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||u.push(e[f.id]);return{create(f){return f.values[o]=n(f),1},update(f,d){if(c&&d.docChanged||h&&(d.docChanged||d.selection)||Ul(f,u)){let m=n(f);if(a?!mf(m,f.values[o],s):!s(m,f.values[o]))return f.values[o]=m,1}return 0},reconfigure:(f,d)=>{let m,b=d.config.address[r];if(b!=null){let w=Er(d,b);if(this.dependencies.every(g=>g instanceof ae?d.facet(g)===f.facet(g):g instanceof ot?d.field(g,!1)==f.field(g,!1):!0)||(a?mf(m=n(f),w,s):s(m=n(f),w)))return f.values[o]=w,0}else m=n(f);return f.values[o]=m,1}}}}function mf(i,e,t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!t(i[n],e[n]))return!1;return!0}function Ul(i,e){let t=!1;for(let n of e)_s(i,n)&1&&(t=!0);return t}function q1(i,e,t){let n=t.map(c=>i[c.id]),s=t.map(c=>c.type),r=n.filter(c=>!(c&1)),o=i[e.id]>>1;function a(c){let h=[];for(let u=0;u<n.length;u++){let f=Er(c,n[u]);if(s[u]==2)for(let d of f)h.push(d);else h.push(f)}return e.combine(h)}return{create(c){for(let h of n)_s(c,h);return c.values[o]=a(c),1},update(c,h){if(!Ul(c,r))return 0;let u=a(c);return e.compare(u,c.values[o])?0:(c.values[o]=u,1)},reconfigure(c,h){let u=Ul(c,n),f=h.config.facets[e.id],d=h.facet(e);if(f&&!u&&Il(t,f))return c.values[o]=d,0;let m=a(c);return e.compare(m,d)?(c.values[o]=d,0):(c.values[o]=m,1)}}}const Pr=ae.define({static:!0});class ot{constructor(e,t,n,s,r){this.id=e,this.createF=t,this.updateF=n,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new ot(Zl++,e.create,e.update,e.compare||((n,s)=>n===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Pr).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,s)=>{let r=n.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(n.values[t]=o,1)},reconfigure:(n,s)=>{let r=n.facet(Pr),o=s.facet(Pr),a;return(a=r.find(c=>c.field==this))&&a!=o.find(c=>c.field==this)?(n.values[t]=a.create(n),1):s.config.address[this.id]!=null?(n.values[t]=s.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,Pr.of({field:this,create:e})]}get extension(){return this}}const fn={lowest:4,low:3,default:2,high:1,highest:0};function gs(i){return e=>new gf(e,i)}const qi={highest:gs(fn.highest),high:gs(fn.high),default:gs(fn.default),low:gs(fn.low),lowest:gs(fn.lowest)};class gf{constructor(e,t){this.inner=e,this.prec=t}}class Os{of(e){return new Fl(this,e)}reconfigure(e){return Os.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Fl{constructor(e,t){this.compartment=e,this.inner=t}}class Tr{constructor(e,t,n,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.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,n){let s=[],r=Object.create(null),o=new Map;for(let d of X1(e,t,o))d instanceof ot?s.push(d):(r[d.facet.id]||(r[d.facet.id]=[])).push(d);let a=Object.create(null),c=[],h=[];for(let d of s)a[d.id]=h.length<<1,h.push(m=>d.slot(m));let u=n==null?void 0:n.config.facets;for(let d in r){let m=r[d],b=m[0].facet,w=u&&u[d]||[];if(m.every(g=>g.type==0))if(a[b.id]=c.length<<1|1,Il(w,m))c.push(n.facet(b));else{let g=b.combine(m.map(p=>p.value));c.push(n&&b.compare(g,n.facet(b))?n.facet(b):g)}else{for(let g of m)g.type==0?(a[g.id]=c.length<<1|1,c.push(g.value)):(a[g.id]=h.length<<1,h.push(p=>g.dynamicSlot(p)));a[b.id]=h.length<<1,h.push(g=>q1(g,b,m))}}let f=h.map(d=>d(a));return new Tr(e,o,f,a,c,r)}}function X1(i,e,t){let n=[[],[],[],[],[]],s=new Map;function r(o,a){let c=s.get(o);if(c!=null){if(c<=a)return;let h=n[c].indexOf(o);h>-1&&n[c].splice(h,1),o instanceof Fl&&t.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let h of o)r(h,a);else if(o instanceof Fl){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,a)}else if(o instanceof gf)r(o.inner,o.prec);else if(o instanceof ot)n[a].push(o),o.provides&&r(o.provides,a);else if(o instanceof Qr)n[a].push(o),o.facet.extensions&&r(o.facet.extensions,fn.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,a)}}return r(i,fn.default),n.reduce((o,a)=>o.concat(a))}function _s(i,e){if(e&1)return 2;let t=e>>1,n=i.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;i.status[t]=4;let s=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|s}function Er(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}const Of=ae.define(),jl=ae.define({combine:i=>i.some(e=>e),static:!0}),_f=ae.define({combine:i=>i.length?i[0]:void 0,static:!0}),bf=ae.define(),yf=ae.define(),wf=ae.define(),kf=ae.define({combine:i=>i.length?i[0]:!1});class Pi{constructor(e,t){this.type=e,this.value=t}static define(){return new W1}}class W1{of(e){return new Pi(this,e)}}class Y1{constructor(e){this.map=e}of(e){return new we(this,e)}}class we{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 we(this.type,t)}is(e){return this.type==e}static define(e={}){return new Y1(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let s of e){let r=s.map(t);r&&n.push(r)}return n}}we.reconfigure=we.define(),we.appendConfig=we.define();class Je{constructor(e,t,n,s,r,o){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&pf(n,t.newLength),r.some(a=>a.type==Je.time)||(this.annotations=r.concat(Je.time.of(Date.now())))}static create(e,t,n,s,r,o){return new Je(e,t,n,s,r,o)}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(Je.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Je.time=Pi.define(),Je.userEvent=Pi.define(),Je.addToHistory=Pi.define(),Je.remote=Pi.define();function z1(i,e){let t=[];for(let n=0,s=0;;){let r,o;if(n<i.length&&(s==e.length||e[s]>=i[n]))r=i[n++],o=i[n++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function xf(i,e,t){var n;let s,r,o;return t?(s=e.changes,r=nt.empty(e.changes.length),o=i.changes.compose(e.changes)):(s=e.changes.map(i.changes),r=i.changes.mapDesc(e.changes,!0),o=i.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(n=i.selection)===null||n===void 0?void 0:n.map(s),effects:we.mapEffects(i.effects,s).concat(we.mapEffects(e.effects,r)),annotations:i.annotations.length?i.annotations.concat(e.annotations):e.annotations,scrollIntoView:i.scrollIntoView||e.scrollIntoView}}function ql(i,e,t){let n=e.selection,s=Vn(e.annotations);return e.userEvent&&(s=s.concat(Je.userEvent.of(e.userEvent))),{changes:e.changes instanceof nt?e.changes:nt.of(e.changes||[],t,i.facet(_f)),selection:n&&(n instanceof j?n:j.single(n.anchor,n.head)),effects:Vn(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function Sf(i,e,t){let n=ql(i,e.length?e[0]:{},i.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;n=xf(n,ql(i,e[r],o?n.changes.newLength:i.doc.length),o)}let s=Je.create(i,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return H1(t?G1(s):s)}function G1(i){let e=i.startState,t=!0;for(let s of e.facet(bf)){let r=s(i);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:z1(t,r))}if(t!==!0){let s,r;if(t===!1)r=i.changes.invertedDesc,s=nt.empty(e.doc.length);else{let o=i.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}i=Je.create(e,s,i.selection&&i.selection.map(r),we.mapEffects(i.effects,r),i.annotations,i.scrollIntoView)}let n=e.facet(yf);for(let s=n.length-1;s>=0;s--){let r=n[s](i);r instanceof Je?i=r:Array.isArray(r)&&r.length==1&&r[0]instanceof Je?i=r[0]:i=Sf(e,Vn(r),!1)}return i}function H1(i){let e=i.startState,t=e.facet(wf),n=i;for(let s=t.length-1;s>=0;s--){let r=t[s](i);r&&Object.keys(r).length&&(n=xf(n,ql(e,r,i.changes.newLength),!0))}return n==i?i:Je.create(e,i.changes,i.selection,n.effects,n.annotations,n.scrollIntoView)}const K1=[];function Vn(i){return i==null?K1:Array.isArray(i)?i:[i]}var je=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(je||(je={}));const J1=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Xl;try{Xl=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function ew(i){if(Xl)return Xl.test(i);for(let e=0;e<i.length;e++){let t=i[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||J1.test(t)))return!0}return!1}function tw(i){return e=>{if(!/\S/.test(e))return je.Space;if(ew(e))return je.Word;for(let t=0;t<i.length;t++)if(e.indexOf(i[t])>-1)return je.Word;return je.Other}}class Se{constructor(e,t,n,s,r,o){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)_s(this,a<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return _s(this,n),Er(this,n)}update(...e){return Sf(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:s}=t;for(let a of e.effects)a.is(Os.reconfigure)?(t&&(s=new Map,t.compartments.forEach((c,h)=>s.set(h,c)),t=null),s.set(a.value.compartment,a.value.extension)):a.is(we.reconfigure)?(t=null,n=a.value):a.is(we.appendConfig)&&(t=null,n=Vn(n).concat(a.value));let r;t?r=e.startState.values.slice():(t=Tr.resolve(n,s,this),r=new Se(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let o=e.startState.facet(jl)?e.newSelection:e.newSelection.asSingle();new Se(t,e.newDoc,o,r,(a,c)=>c.update(a,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:j.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),s=this.changes(n.changes),r=[n.range],o=Vn(n.effects);for(let a=1;a<t.ranges.length;a++){let c=e(t.ranges[a]),h=this.changes(c.changes),u=h.map(s);for(let d=0;d<a;d++)r[d]=r[d].map(u);let f=s.mapDesc(h,!0);r.push(c.range.map(f)),s=s.compose(u),o=we.mapEffects(o,u).concat(we.mapEffects(Vn(c.effects),f))}return{changes:s,selection:j.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof nt?e:nt.of(e,this.doc.length,this.facet(Se.lineSeparator))}toText(e){return Ae.of(e.split(this.facet(Se.lineSeparator)||Bl))}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:(_s(this,t),Er(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let s=e[n];s instanceof ot&&this.config.address[s.id]!=null&&(t[n]=s.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(n){for(let r in n)if(Object.prototype.hasOwnProperty.call(e,r)){let o=n[r],a=e[r];s.push(o.init(c=>o.spec.fromJSON(a,c)))}}return Se.create({doc:e.doc,selection:j.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Tr.resolve(e.extensions||[],new Map),n=e.doc instanceof Ae?e.doc:Ae.of((e.doc||"").split(t.staticFacet(Se.lineSeparator)||Bl)),s=e.selection?e.selection instanceof j?e.selection:j.single(e.selection.anchor,e.selection.head):j.single(0);return pf(s,n.length),t.staticFacet(jl)||(s=s.asSingle()),new Se(t,n,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Se.tabSize)}get lineBreak(){return this.facet(Se.lineSeparator)||`
25
- `}get readOnly(){return this.facet(kf)}phrase(e,...t){for(let n of this.facet(Se.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?n:t[r-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let r of this.facet(Of))for(let o of r(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return tw(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let c=ft(t,o,!1);if(r(t.slice(c,o))!=je.Word)break;o=c}for(;a<s;){let c=ft(t,a);if(r(t.slice(a,c))!=je.Word)break;a=c}return o==a?null:j.range(o+n,a+n)}}Se.allowMultipleSelections=jl,Se.tabSize=ae.define({combine:i=>i.length?i[0]:4}),Se.lineSeparator=_f,Se.readOnly=kf,Se.phrases=ae.define({compare(i,e){let t=Object.keys(i),n=Object.keys(e);return t.length==n.length&&t.every(s=>i[s]==e[s])}}),Se.languageData=Of,Se.changeFilter=bf,Se.transactionFilter=yf,Se.transactionExtender=wf,Os.reconfigure=we.define();function fi(i,e,t={}){let n={};for(let s of i)for(let r of Object.keys(s)){let o=s[r],a=n[r];if(a===void 0)n[r]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(t,r))n[r]=t[r](a,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)n[s]===void 0&&(n[s]=e[s]);return n}class dn{eq(e){return this==e}range(e,t=e){return Wl.create(e,t,this)}}dn.prototype.startSide=dn.prototype.endSide=0,dn.prototype.point=!1,dn.prototype.mapMode=dt.TrackDel;let Wl=class GO{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new GO(e,t,n)}};function Yl(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}class zl{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let r=n?this.to:this.from;for(let o=s,a=r.length;;){if(o==a)return o;let c=o+a>>1,h=r[c]-e||(n?this.value[c].endSide:this.value[c].startSide)-t;if(c==o)return h>=0?o:a;h>=0?a=c:o=c+1}}between(e,t,n,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let n=[],s=[],r=[],o=-1,a=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],u=this.from[c]+e,f=this.to[c]+e,d,m;if(u==f){let b=t.mapPos(u,h.startSide,h.mapMode);if(b==null||(d=m=b,h.startSide!=h.endSide&&(m=t.mapPos(u,h.endSide),m<d)))continue}else if(d=t.mapPos(u,h.startSide),m=t.mapPos(f,h.endSide),d>m||d==m&&h.startSide>0&&h.endSide<=0)continue;(m-d||h.endSide-h.startSide)<0||(o<0&&(o=d),h.point&&(a=Math.max(a,m-d)),n.push(h),s.push(d-o),r.push(m-o))}return{mapped:n.length?new zl(s,r,n,a):null,pos:o}}}class Te{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new Te(e,t,n,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:n=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(Yl)),this.isEmpty)return t.length?Te.of(t):this;let a=new Af(this,null,-1).goto(0),c=0,h=[],u=new Ti;for(;a.value||c<t.length;)if(c<t.length&&(a.from-t[c].from||a.startSide-t[c].value.startSide)>=0){let f=t[c++];u.addInner(f.from,f.to,f.value)||h.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(a.chunkIndex)<t[c].from)&&(!o||s>this.chunkEnd(a.chunkIndex)||r<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||s>a.to||r<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||h.push(Wl.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!h.length?Te.empty:this.nextLayer.update({add:h,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],s=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],c=this.chunk[o],h=e.touchesRange(a,a+c.length);if(h===!1)s=Math.max(s,c.maxPoint),t.push(c),n.push(e.mapPos(a));else if(h===!0){let{mapped:u,pos:f}=c.map(a,e);u&&(s=Math.max(s,u.maxPoint),t.push(u),n.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new Te(n,t,r||Te.empty,s)}between(e,t,n){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return bs.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return bs.from(e).goto(t)}static compare(e,t,n,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),c=Cf(o,a,n),h=new ys(o,c,r),u=new ys(a,c,r);n.iterGaps((f,d,m)=>Qf(h,f,u,d,m,s)),n.empty&&n.length==0&&Qf(h,0,u,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=1e9-1);let r=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),o=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let a=Cf(r,o),c=new ys(r,a,0).goto(n),h=new ys(o,a,0).goto(n);for(;;){if(c.to!=h.to||!Hl(c.active,h.active)||c.point&&(!h.point||!c.point.eq(h.point)))return!1;if(c.to>s)return!0;c.next(),h.next()}}static spans(e,t,n,s,r=-1){let o=new ys(e,null,r).goto(t),a=t,c=o.openStart;for(;;){let h=Math.min(o.to,n);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<t?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,c);s.point(a,h,o.point,u,f,o.pointRank),c=Math.min(o.openEnd(h),u.length)}else h>a&&(s.span(a,h,o.active,c),c=o.openEnd(h));if(o.to>n)return c+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(e,t=!1){let n=new Ti;for(let s of e instanceof Wl?[e]:t?iw(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return Te.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=Te.empty;s=s.nextLayer)t=new Te(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}Te.empty=new Te([],[],null,-1);function iw(i){if(i.length>1)for(let e=i[0],t=1;t<i.length;t++){let n=i[t];if(Yl(e,n)>0)return i.slice().sort(Yl);e=n}return i}Te.empty.nextLayer=Te.empty;class Ti{finishChunk(e){this.chunks.push(new zl(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,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Ti)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.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=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.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 n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Te.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Te.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Cf(i,e,t){let n=new Map;for(let r of i)for(let o=0;o<r.chunk.length;o++)r.chunk[o].maxPoint<=0&&n.set(r.chunk[o],r.chunkPos[o]);let s=new Set;for(let r of e)for(let o=0;o<r.chunk.length;o++){let a=n.get(r.chunk[o]);a!=null&&(t?t.mapPos(a):a)==r.chunkPos[o]&&!(t!=null&&t.touchesRange(a,a+r.chunk[o].length))&&s.add(r.chunk[o])}return s}class Af{constructor(e,t,n,s=0){this.layer=e,this.skip=t,this.minPoint=n,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,n){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++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||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],n=e+t.from[this.rangeIndex];if(this.from=n,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 bs{constructor(e){this.heap=e}static from(e,t=null,n=-1){let s=[];for(let r=0;r<e.length;r++)for(let o=e[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&s.push(new Af(o,t,n,r));return s.length==1?s[0]:new bs(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)Gl(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)Gl(this.heap,n);(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(),Gl(this.heap,0)}}}function Gl(i,e){for(let t=i[e];;){let n=(e<<1)+1;if(n>=i.length)break;let s=i[n];if(n+1<i.length&&s.compare(i[n+1])>=0&&(s=i[n+1],n++),t.compare(s)<0)break;i[n]=t,i[e]=s,e=n}}class ys{constructor(e,t,n){this.minPoint=n,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=bs.from(e,t,n)}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){$r(this.active,e),$r(this.activeTo,e),$r(this.activeRank,e),this.minActive=Pf(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:s,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||s-this.activeTo[t])>0;)t++;Nr(this.active,t,n),Nr(this.activeTo,t,s),Nr(this.activeRank,t,r),e&&Nr(e,t,this.cursor.from),this.minActive=Pf(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=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),n&&$r(n,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=r,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=r.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let s=n.length-1;s>=0&&n[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Qf(i,e,t,n,s,r){i.goto(e),t.goto(n);let o=n+s,a=n,c=n-e;for(;;){let h=i.to+c-t.to,u=h||i.endSide-t.endSide,f=u<0?i.to+c:t.to,d=Math.min(f,o);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&Hl(i.activeForPoint(i.to),t.activeForPoint(t.to))||r.comparePoint(a,d,i.point,t.point):d>a&&!Hl(i.active,t.active)&&r.compareRange(a,d,i.active,t.active),f>o)break;(h||i.openEnd!=t.openEnd)&&r.boundChange&&r.boundChange(f),a=f,u<=0&&i.next(),u>=0&&t.next()}}function Hl(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(i[t]!=e[t]&&!i[t].eq(e[t]))return!1;return!0}function $r(i,e){for(let t=e,n=i.length-1;t<n;t++)i[t]=i[t+1];i.pop()}function Nr(i,e,t){for(let n=i.length-1;n>=e;n--)i[n+1]=i[n];i[e]=t}function Pf(i,e){let t=-1,n=1e9;for(let s=0;s<e.length;s++)(e[s]-n||i[s].endSide-i[t].endSide)<0&&(t=s,n=e[s]);return t}function Ln(i,e,t=i.length){let n=0;for(let s=0;s<t&&s<i.length;)i.charCodeAt(s)==9?(n+=e-n%e,s++):(n++,s=ft(i,s));return n}function Kl(i,e,t,n){for(let s=0,r=0;;){if(r>=e)return s;if(s==i.length)break;r+=i.charCodeAt(s)==9?t-r%t:1,s=ft(i,s)}return n===!0?-1:i.length}const Jl="ͼ",Tf=typeof Symbol>"u"?"__"+Jl:Symbol.for(Jl),ea=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Ef=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Xi{constructor(e,t){this.rules=[];let{finish:n}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,a,c,h){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return c.push(o[0]+";");for(let m in a){let b=a[m];if(/&/.test(m))r(m.split(/,\s*/).map(w=>o.map(g=>w.replace(/&/,g))).reduce((w,g)=>w.concat(g)),b,c);else if(b&&typeof b=="object"){if(!f)throw new RangeError("The value of a property ("+m+") should be a primitive value.");r(s(m),b,u,d)}else b!=null&&u.push(m.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+b+";")}(u.length||d)&&c.push((n&&!f&&!h?o.map(n):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(`
26
- `)}static newName(){let e=Ef[Tf]||1;return Ef[Tf]=e+1,Jl+e.toString(36)}static mount(e,t,n){let s=e[ea],r=n&&n.nonce;s?r&&s.setNonce(r):s=new nw(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let $f=new Map;class nw{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=$f.get(n);if(r)return e[ea]=r;this.sheet=new s.CSSStyleSheet,$f.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[ea]=this}mount(e,t){let n=this.sheet,s=0,r=0;for(let o=0;o<e.length;o++){let a=e[o],c=this.modules.indexOf(a);if(c<r&&c>-1&&(this.modules.splice(c,1),r--,c=-1),c==-1){if(this.modules.splice(r++,0,a),n)for(let h=0;h<a.rules.length;h++)n.insertRule(a.rules[h],s++)}else{for(;r<c;)s+=this.modules[r++].rules.length;s+=a.rules.length,r++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let c=0;c<this.modules.length;c++)o+=this.modules[c].getRules()+`
27
- `;this.styleTag.textContent=o;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Wi={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:"'"},ws={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},sw=typeof navigator<"u"&&/Mac/.test(navigator.platform),rw=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),pt=0;pt<10;pt++)Wi[48+pt]=Wi[96+pt]=String(pt);for(var pt=1;pt<=24;pt++)Wi[pt+111]="F"+pt;for(var pt=65;pt<=90;pt++)Wi[pt]=String.fromCharCode(pt+32),ws[pt]=String.fromCharCode(pt);for(var ta in Wi)ws.hasOwnProperty(ta)||(ws[ta]=Wi[ta]);function ow(i){var e=sw&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||rw&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?ws:Wi)[i.keyCode]||i.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 ks(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function ia(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function Rr(i,e){if(!e.anchorNode)return!1;try{return ia(i,e.anchorNode)}catch{return!1}}function Mn(i){return i.nodeType==3?mn(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function xs(i,e,t,n){return t?Nf(i,e,t,n,-1)||Nf(i,e,t,n,1):!1}function pn(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function Vr(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName)}function Nf(i,e,t,n,s){for(;;){if(i==t&&e==n)return!0;if(e==(s<0?0:di(i))){if(i.nodeName=="DIV")return!1;let r=i.parentNode;if(!r||r.nodeType!=1)return!1;e=pn(i)+(s<0?0:1),i=r}else if(i.nodeType==1){if(i=i.childNodes[e+(s<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=s<0?di(i):0}else return!1}}function di(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function Ss(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function lw(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function Rf(i,e){let t=e.width/i.offsetWidth,n=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-i.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function aw(i,e,t,n,s,r,o,a){let c=i.ownerDocument,h=c.defaultView||window;for(let u=i,f=!1;u&&!f;)if(u.nodeType==1){let d,m=u==c.body,b=1,w=1;if(m)d=lw(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:b,scaleY:w}=Rf(u,O)),d={left:O.left,right:O.left+u.clientWidth*b,top:O.top,bottom:O.top+u.clientHeight*w}}let g=0,p=0;if(s=="nearest")e.top<d.top?(p=-(d.top-e.top+o),t>0&&e.bottom>d.bottom+p&&(p=e.bottom-d.bottom+p+o)):e.bottom>d.bottom&&(p=e.bottom-d.bottom+o,t<0&&e.top-p<d.top&&(p=-(d.top+p-e.top+o)));else{let O=e.bottom-e.top,S=d.bottom-d.top;p=(s=="center"&&O<=S?e.top+O/2-S/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-S+o)-d.top}if(n=="nearest"?e.left<d.left?(g=-(d.left-e.left+r),t>0&&e.right>d.right+g&&(g=e.right-d.right+g+r)):e.right>d.right&&(g=e.right-d.right+r,t<0&&e.left<d.left+g&&(g=-(d.left+g-e.left+r))):g=(n=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:n=="start"==a?e.left-r:e.right-(d.right-d.left)+r)-d.left,g||p)if(m)h.scrollBy(g,p);else{let O=0,S=0;if(p){let y=u.scrollTop;u.scrollTop+=p/w,S=(u.scrollTop-y)*w}if(g){let y=u.scrollLeft;u.scrollLeft+=g/b,O=(u.scrollLeft-y)*b}e={left:e.left-O,top:e.top-S,right:e.right-O,bottom:e.bottom-S},O&&Math.abs(O-g)<1&&(n="nearest"),S&&Math.abs(S-p)<1&&(s="nearest")}if(m)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function cw(i){let e=i.ownerDocument,t,n;for(let s=i.parentNode;s&&!(s==e.body||t&&n);)if(s.nodeType==1)!n&&s.scrollHeight>s.clientHeight&&(n=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:n}}class hw{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:n}=e;this.set(t,Math.min(e.anchorOffset,t?di(t):0),n,Math.min(e.focusOffset,n?di(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let Bn=null;function Vf(i){if(i.setActive)return i.setActive();if(Bn)return i.focus(Bn);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(Bn==null?{get preventScroll(){return Bn={preventScroll:!0},!0}}:void 0),!Bn){Bn=!1;for(let t=0;t<e.length;){let n=e[t++],s=e[t++],r=e[t++];n.scrollTop!=s&&(n.scrollTop=s),n.scrollLeft!=r&&(n.scrollLeft=r)}}}let Lf;function mn(i,e,t=e){let n=Lf||(Lf=document.createRange());return n.setEnd(i,t),n.setStart(i,e),n}function Dn(i,e,t,n){let s={key:e,code:e,keyCode:t,which:t,cancelable:!0};n&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=n);let r=new KeyboardEvent("keydown",s);r.synthetic=!0,i.dispatchEvent(r);let o=new KeyboardEvent("keyup",s);return o.synthetic=!0,i.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function uw(i){for(;i;){if(i&&(i.nodeType==9||i.nodeType==11&&i.host))return i;i=i.assignedSlot||i.parentNode}return null}function Mf(i){for(;i.attributes.length;)i.removeAttributeNode(i.attributes[0])}function fw(i,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,di(t));;)if(n){if(t.nodeType!=1)return!1;let s=t.childNodes[n-1];s.contentEditable=="false"?n--:(t=s,n=di(t))}else{if(t==i)return!0;n=pn(t),t=t.parentNode}}function Bf(i){return i.scrollTop>Math.max(1,i.scrollHeight-i.clientHeight-4)}function Df(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=di(t)}else if(t.parentNode&&!Vr(t))n=pn(t),t=t.parentNode;else return null}}function vf(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n<t.nodeValue.length)return{node:t,offset:n};if(t.nodeType==1&&n<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[n],n=0}else if(t.parentNode&&!Vr(t))n=pn(t)+1,t=t.parentNode;else return null}}class _t{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new _t(e.parentNode,pn(e),t)}static after(e,t){return new _t(e.parentNode,pn(e)+1,t)}}const na=[];class Be{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 n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,s=null,r;for(let o of this.children){if(o.flags&7){if(!o.dom&&(r=s?s.nextSibling:n.firstChild)){let a=Be.get(r);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(r)}o.sync(e,t),o.flags&=-8}if(r=s?s.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&r!=o.dom&&(t.written=!0),o.dom.parentNode==n)for(;r&&r!=o.dom;)r=Zf(r);else n.insertBefore(o.dom,r);s=o.dom}for(r=s?s.nextSibling:n.firstChild,r&&t&&t.node==n&&(t.written=!0);r;)r=Zf(r)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let s=di(e)==0?0:t==0?-1:1;for(;;){let r=e.parentNode;if(r==this.dom)break;s==0&&r.firstChild!=r.lastChild&&(e==r.firstChild?s=-1:s=1),e=r}s<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Be.get(n);)n=n.nextSibling;if(!n)return this.length;for(let s=0,r=0;;s++){let o=this.children[s];if(o.dom==n)return r;r+=o.length+o.breakAfter}}domBoundsAround(e,t,n=0){let s=-1,r=-1,o=-1,a=-1;for(let c=0,h=n,u=n;c<this.children.length;c++){let f=this.children[c],d=h+f.length;if(h<e&&d>t)return f.domBoundsAround(e,t,h);if(d>=e&&s==-1&&(s=c,r=h),h>t&&f.dom.parentNode==this.dom){o=c,a=u;break}u=d,h=d+f.breakAfter}return{from:r,to:a<0?n+this.length:a,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].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,n=na){this.markDirty();for(let s=e;s<t;s++){let r=this.children[s];r.parent==this&&n.indexOf(r)<0&&r.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let s=0;s<n.length;s++)n[s].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new If(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,n,s,r,o){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}}Be.prototype.breakAfter=0;function Zf(i){let e=i.nextSibling;return i.parentNode.removeChild(i),e}class If{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,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 n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Uf(i,e,t,n,s,r,o,a,c){let{children:h}=i,u=h.length?h[e]:null,f=r.length?r[r.length-1]:null,d=f?f.breakAfter:o;if(!(e==n&&u&&!o&&!d&&r.length<2&&u.merge(t,s,r.length?f:null,t==0,a,c))){if(n<h.length){let m=h[n];m&&(s<m.length||m.breakAfter&&(f!=null&&f.breakAfter))?(e==n&&(m=m.split(s),s=0),!d&&f&&m.merge(0,s,f,!0,0,c)?r[r.length-1]=m:((s||m.children.length&&!m.children[0].length)&&m.merge(0,s,null,!1,0,c),r.push(m))):m!=null&&m.breakAfter&&(f?f.breakAfter=1:o=1),n++}for(u&&(u.breakAfter=o,t>0&&(!o&&r.length&&u.merge(t,u.length,r[0],!1,a,0)?u.breakAfter=r.shift().breakAfter:(t<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(t,u.length,null,!1,a,0),e++));e<n&&r.length;)if(h[n-1].become(r[r.length-1]))n--,r.pop(),c=r.length?0:a;else if(h[e].become(r[0]))e++,r.shift(),a=r.length?0:c;else break;!r.length&&e&&n<h.length&&!h[e-1].breakAfter&&h[n].merge(0,0,h[e-1],!1,a,c)&&e--,(e<n||r.length)&&i.replaceChildren(e,n,r)}}function Ff(i,e,t,n,s,r){let o=i.childCursor(),{i:a,off:c}=o.findPos(t,1),{i:h,off:u}=o.findPos(e,-1),f=e-t;for(let d of n)f+=d.length;i.length+=f,Uf(i,h,u,a,c,n,0,s,r)}let Qt=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},sa=typeof document<"u"?document:{documentElement:{style:{}}};const ra=/Edge\/(\d+)/.exec(Qt.userAgent),jf=/MSIE \d/.test(Qt.userAgent),oa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qt.userAgent),Lr=!!(jf||oa||ra),qf=!Lr&&/gecko\/(\d+)/i.test(Qt.userAgent),la=!Lr&&/Chrome\/(\d+)/.exec(Qt.userAgent),Xf="webkitFontSmoothing"in sa.documentElement.style,Wf=!Lr&&/Apple Computer/.test(Qt.vendor),Yf=Wf&&(/Mobile\/\w+/.test(Qt.userAgent)||Qt.maxTouchPoints>2);var oe={mac:Yf||/Mac/.test(Qt.platform),windows:/Win/.test(Qt.platform),linux:/Linux|X11/.test(Qt.platform),ie:Lr,ie_version:jf?sa.documentMode||6:oa?+oa[1]:ra?+ra[1]:0,gecko:qf,gecko_version:qf?+(/Firefox\/(\d+)/.exec(Qt.userAgent)||[0,0])[1]:0,chrome:!!la,chrome_version:la?+la[1]:0,ios:Yf,android:/Android\b/.test(Qt.userAgent),webkit:Xf,safari:Wf,webkit_version:Xf?+(/\bAppleWebKit\/(\d+)/.exec(Qt.userAgent)||[0,0])[1]:0,tabSize:sa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const dw=256;class Kt extends Be{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,n){return this.flags&8||n&&(!(n instanceof Kt)||this.length-(t-e)+n.length>dw||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Kt(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 _t(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return pw(this.dom,e,t)}}class Ei extends Be{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let s of t)s.setParent(this)}setAttrs(e){if(Mf(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,n,s,r,o){return n&&(!(n instanceof Ei&&n.mark.eq(this.mark))||e&&r<=0||t<this.length&&o<=0)?!1:(Ff(this,e,t,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,s=-1,r=0;for(let a of this.children){let c=n+a.length;c>e&&t.push(n<e?a.split(e-n):a),s<0&&n>=e&&(s=r),n=c,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Ei(this.mark,t,o)}domAtPos(e){return zf(this,e)}coordsAt(e,t){return Hf(this,e,t)}}function pw(i,e,t){let n=i.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;e==0&&t<0||e==n&&t>=0?oe.chrome||oe.gecko||(e?(s--,o=1):r<n&&(r++,o=-1)):t<0?s--:r<n&&r++;let a=mn(i,s,r).getClientRects();if(!a.length)return null;let c=a[(o?o<0:t>=0)?0:a.length-1];return oe.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(a,h=>h.width)||c),o?Ss(c,o<0):c||null}class Yi extends Be{static create(e,t,n){return new Yi(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Yi.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,n,s,r,o){return n&&(!(n instanceof Yi)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Yi&&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 Ae.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,s=this.posAtStart;return n?n.slice(s,s+this.length):Ae.empty}domAtPos(e){return(this.length?e==0:this.side>0)?_t.before(this.dom):_t.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?s.length-1:0;r=s[a],!(e>0?a==0:a==s.length-1||r.top<r.bottom);a+=o?-1:1);return Ss(r,!o)}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 vn extends Be{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof vn&&e.side==this.side}split(){return new vn(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?_t.before(this.dom):_t.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ae.empty}get isHidden(){return!0}}Kt.prototype.children=Yi.prototype.children=vn.prototype.children=na;function zf(i,e){let t=i.dom,{children:n}=i,s=0;for(let r=0;s<n.length;s++){let o=n[s],a=r+o.length;if(!(a==r&&o.getSide()<=0)){if(e>r&&e<a&&o.dom.parentNode==t)return o.domAtPos(e-r);if(e<=r)break;r=a}}for(let r=s;r>0;r--){let o=n[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r<n.length;r++){let o=n[r];if(o.dom.parentNode==t)return o.domAtPos(0)}return new _t(t,0)}function Gf(i,e,t){let n,{children:s}=i;t>0&&e instanceof Ei&&s.length&&(n=s[s.length-1])instanceof Ei&&n.mark.eq(e.mark)?Gf(n,e.children[0],t-1):(s.push(e),e.setParent(i)),i.length+=e.length}function Hf(i,e,t){let n=null,s=-1,r=null,o=-1;function a(h,u){for(let f=0,d=0;f<h.children.length&&d<=u;f++){let m=h.children[f],b=d+m.length;b>=u&&(m.children.length?a(m,u-d):(!r||r.isHidden&&t>0)&&(b>u||d==b&&m.getSide()>0)?(r=m,o=u-d):(d<u||d==b&&m.getSide()<0&&!m.isHidden)&&(n=m,s=u-d)),d=b}}a(i,e);let c=(t<0?n:r)||n||r;return c?c.coordsAt(Math.max(0,c==n?s:o),t):mw(i)}function mw(i){let e=i.dom.lastChild;if(!e)return i.dom.getBoundingClientRect();let t=Mn(e);return t[t.length-1]||null}function aa(i,e){for(let t in i)t=="class"&&e.class?e.class+=" "+i.class:t=="style"&&e.style?e.style+=";"+i.style:e[t]=i[t];return e}const Kf=Object.create(null);function Mr(i,e,t){if(i==e)return!0;i||(i=Kf),e||(e=Kf);let n=Object.keys(i),s=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of n)if(r!=t&&(s.indexOf(r)==-1||i[r]!==e[r]))return!1;return!0}function ca(i,e,t){let n=!1;if(e)for(let s in e)t&&s in t||(n=!0,s=="style"?i.style.cssText="":i.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(n=!0,s=="style"?i.style.cssText=t[s]:i.setAttribute(s,t[s]));return n}function gw(i){let e=Object.create(null);for(let t=0;t<i.attributes.length;t++){let n=i.attributes[t];e[n.name]=n.value}return e}class pi{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,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var kt=function(i){return i[i.Text=0]="Text",i[i.WidgetBefore=1]="WidgetBefore",i[i.WidgetAfter=2]="WidgetAfter",i[i.WidgetRange=3]="WidgetRange",i}(kt||(kt={}));class de extends dn{constructor(e,t,n,s){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Cs(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new zi(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:r,end:o}=Jf(e,t);n=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new zi(e,n,s,t,e.widget||null,!0)}static line(e){return new As(e)}static set(e,t=!1){return Te.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}de.none=Te.empty;class Cs extends de{constructor(e){let{start:t,end:n}=Jf(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof Cs&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&Mr(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)}}Cs.prototype.point=!1;class As extends de{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof As&&this.spec.class==e.spec.class&&Mr(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)}}As.prototype.mapMode=dt.TrackBefore,As.prototype.point=!0;class zi extends de{constructor(e,t,n,s,r,o){super(t,n,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?dt.TrackBefore:dt.TrackAfter:dt.TrackDel}get type(){return this.startSide!=this.endSide?kt.WidgetRange:this.startSide<=0?kt.WidgetBefore:kt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof zi&&Ow(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)}}zi.prototype.point=!0;function Jf(i,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=i;return t==null&&(t=i.inclusive),n==null&&(n=i.inclusive),{start:t??e,end:n??e}}function Ow(i,e){return i==e||!!(i&&e&&i.compare(e))}function Br(i,e,t,n=0){let s=t.length-1;s>=0&&t[s]+n>=i?t[s]=Math.max(t[s],e):t.push(i,e)}class et extends Be{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,s,r,o){if(n){if(!(n instanceof et))return!1;this.dom||n.transferDOM(this)}return s&&this.setDeco(n?n.attrs:null),Ff(this,e,t,n?n.children.slice():[],r,o),!0}split(e){let t=new et;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:s}=this.childPos(e);s&&(t.append(this.children[n].split(s),0),this.children[n].merge(s,this.children[n].length,null,!1,0,0),n++);for(let r=n;r<this.children.length;r++)t.append(this.children[r],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,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){Mr(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Gf(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=aa(t,this.attrs||{})),n&&(this.attrs=aa({class:n},this.attrs||{}))}domAtPos(e){return zf(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(Mf(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&&(ca(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&&Be.get(s)instanceof Ei;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((n=Be.get(s))===null||n===void 0?void 0:n.isEditable)==!1&&(!oe.ios||!this.children.some(r=>r instanceof Kt))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Kt)||/[^ -~]/.test(n.text))return null;let s=Mn(n.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 n=Hf(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=n.bottom-n.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight<r){let o=(r-s.textHeight)/2;return{top:n.top+o,bottom:n.bottom-o,left:n.left,right:n.left}}}return n}become(e){return e instanceof et&&this.children.length==0&&e.children.length==0&&Mr(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,s=0;n<e.children.length;n++){let r=e.children[n],o=s+r.length;if(o>=t){if(r instanceof et)return r;if(o>t)break}s=o+r.breakAfter}return null}}class $i extends Be{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,s,r,o){return n&&(!(n instanceof $i)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?_t.before(this.dom):_t.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new $i(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return na}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):Ae.empty}domBoundsAround(){return null}become(e){return e instanceof $i&&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 n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof ha?null:Ss(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:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class ha extends pi{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 Qs{constructor(e,t,n,s){this.doc=e,this.pos=t,this.end=n,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 $i&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new et),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Dr(new vn(-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 $i)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){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=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Dr(new Kt(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}span(e,t,n,s){this.buildText(t-e,n,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,n,s,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof zi){if(n.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 a=t-e;if(n instanceof zi)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new $i(n.widget||Zn.block,a,n));else{let c=Yi.create(n.widget||Zn.inline,a,a?0:n.startSide),h=this.atCursorPos&&!c.isEditable&&r<=s.length&&(e<t||n.startSide>0),u=!c.isEditable&&(e<t||r>s.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(Dr(new vn(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Dr(c,s),r),this.atCursorPos=u,this.pendingBuffer=u?e<t||r>s.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,n,s,r){let o=new Qs(e,t,n,r);return o.openEnd=Te.spans(s,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Dr(i,e){for(let t of e)i=new Ei(t,[i],i.length);return i}class Zn extends pi{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}}Zn.inline=new Zn("span"),Zn.block=new Zn("div");var Ie=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(Ie||(Ie={}));const gn=Ie.LTR,ua=Ie.RTL;function ed(i){let e=[];for(let t=0;t<i.length;t++)e.push(1<<+i[t]);return e}const _w=ed("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),bw=ed("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),fa=Object.create(null),mi=[];for(let i of["()","[]","{}"]){let e=i.charCodeAt(0),t=i.charCodeAt(1);fa[e]=t,fa[t]=-e}function td(i){return i<=247?_w[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?bw[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8204?256:64336<=i&&i<=65023?4:1}const yw=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Gi{get dir(){return this.level%2?ua:gn}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,s){let r=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(r<0||(s!=0?s<0?a.from<t:a.to>t:e[r].level>a.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function id(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++){let n=i[t],s=e[t];if(n.from!=s.from||n.to!=s.to||n.direction!=s.direction||!id(n.inner,s.inner))return!1}return!0}const De=[];function ww(i,e,t,n,s){for(let r=0;r<=n.length;r++){let o=r?n[r-1].to:e,a=r<n.length?n[r].from:t,c=r?256:s;for(let h=o,u=c,f=c;h<a;h++){let d=td(i.charCodeAt(h));d==512?d=u:d==8&&f==4&&(d=16),De[h]=d==4?2:d,d&7&&(f=d),u=d}for(let h=o,u=c,f=c;h<a;h++){let d=De[h];if(d==128)h<a-1&&u==De[h+1]&&u&24?d=De[h]=u:De[h]=256;else if(d==64){let m=h+1;for(;m<a&&De[m]==64;)m++;let b=h&&u==8||m<t&&De[m]==8?f==1?1:8:256;for(let w=h;w<m;w++)De[w]=b;h=m-1}else d==8&&f==1&&(De[h]=1);u=d,d&7&&(f=d)}}}function kw(i,e,t,n,s){let r=s==1?2:1;for(let o=0,a=0,c=0;o<=n.length;o++){let h=o?n[o-1].to:e,u=o<n.length?n[o].from:t;for(let f=h,d,m,b;f<u;f++)if(m=fa[d=i.charCodeAt(f)])if(m<0){for(let w=a-3;w>=0;w-=3)if(mi[w+1]==-m){let g=mi[w+2],p=g&2?s:g&4?g&1?r:s:0;p&&(De[f]=De[mi[w]]=p),a=w;break}}else{if(mi.length==189)break;mi[a++]=f,mi[a++]=d,mi[a++]=c}else if((b=De[f])==2||b==1){let w=b==s;c=w?0:1;for(let g=a-3;g>=0;g-=3){let p=mi[g+2];if(p&2)break;if(w)mi[g+2]|=2;else{if(p&4)break;mi[g+2]|=4}}}}}function xw(i,e,t,n){for(let s=0,r=n;s<=t.length;s++){let o=s?t[s-1].to:i,a=s<t.length?t[s].from:e;for(let c=o;c<a;){let h=De[c];if(h==256){let u=c+1;for(;;)if(u==a){if(s==t.length)break;u=t[s++].to,a=s<t.length?t[s].from:e}else if(De[u]==256)u++;else break;let f=r==1,d=(u<e?De[u]:n)==1,m=f==d?f?1:2:n;for(let b=u,w=s,g=w?t[w-1].to:i;b>c;)b==g&&(b=t[--w].from,g=w?t[w-1].to:i),De[--b]=m;c=u}else r=h,c++}}}function da(i,e,t,n,s,r,o){let a=n%2?2:1;if(n%2==s%2)for(let c=e,h=0;c<t;){let u=!0,f=!1;if(h==r.length||c<r[h].from){let w=De[c];w!=a&&(u=!1,f=w==16)}let d=!u&&a==1?[]:null,m=u?n:n+1,b=c;e:for(;;)if(h<r.length&&b==r[h].from){if(f)break e;let w=r[h];if(!u)for(let g=w.to,p=h+1;;){if(g==t)break e;if(p<r.length&&r[p].from==g)g=r[p++].to;else{if(De[g]==a)break e;break}}if(h++,d)d.push(w);else{w.from>c&&o.push(new Gi(c,w.from,m));let g=w.direction==gn!=!(m%2);pa(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.to}b=w.to}else{if(b==t||(u?De[b]!=a:De[b]==a))break;b++}d?da(i,c,b,n+1,s,d,o):c<b&&o.push(new Gi(c,b,m)),c=b}else for(let c=t,h=r.length;c>e;){let u=!0,f=!1;if(!h||c>r[h-1].to){let w=De[c-1];w!=a&&(u=!1,f=w==16)}let d=!u&&a==1?[]:null,m=u?n:n+1,b=c;e:for(;;)if(h&&b==r[h-1].to){if(f)break e;let w=r[--h];if(!u)for(let g=w.from,p=h;;){if(g==e)break e;if(p&&r[p-1].to==g)g=r[--p].from;else{if(De[g-1]==a)break e;break}}if(d)d.push(w);else{w.to<c&&o.push(new Gi(w.to,c,m));let g=w.direction==gn!=!(m%2);pa(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.from}b=w.from}else{if(b==e||(u?De[b-1]!=a:De[b-1]==a))break;b--}d?da(i,b,c,n+1,s,d,o):b<c&&o.push(new Gi(b,c,m)),c=b}}function pa(i,e,t,n,s,r,o){let a=e%2?2:1;ww(i,s,r,n,a),kw(i,s,r,n,a),xw(s,r,n,a),da(i,s,r,e,t,n,o)}function Sw(i,e,t){if(!i)return[new Gi(0,0,e==ua?1:0)];if(e==gn&&!t.length&&!yw.test(i))return nd(i.length);if(t.length)for(;i.length>De.length;)De[De.length]=256;let n=[],s=e==gn?0:1;return pa(i,s,s,t,0,i.length,n),n}function nd(i){return[new Gi(0,i,0)]}let sd="";function Cw(i,e,t,n,s){var r;let o=n.head-i.from,a=Gi.find(e,o,(r=n.bidiLevel)!==null&&r!==void 0?r:-1,n.assoc),c=e[a],h=c.side(s,t);if(o==h){let d=a+=s?1:-1;if(d<0||d>=e.length)return null;c=e[a=d],o=c.side(!s,t),h=c.side(s,t)}let u=ft(i.text,o,c.forward(s,t));(u<c.from||u>c.to)&&(u=h),sd=i.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return f&&u==h&&f.level+(s?0:1)<c.level?j.cursor(f.side(!s,t)+i.from,f.forward(s,t)?1:-1,f.level):j.cursor(u+i.from,c.forward(s,t)?-1:1,c.level)}function Aw(i,e,t){for(let n=e;n<t;n++){let s=td(i.charCodeAt(n));if(s==1)return gn;if(s==2||s==4)return ua}return gn}const rd=ae.define(),od=ae.define(),ld=ae.define(),ad=ae.define(),ma=ae.define(),cd=ae.define(),hd=ae.define(),ga=ae.define(),Oa=ae.define(),ud=ae.define({combine:i=>i.some(e=>e)}),fd=ae.define({combine:i=>i.some(e=>e)}),dd=ae.define();class In{constructor(e,t="nearest",n="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new In(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 In(j.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const vr=we.define({map:(i,e)=>i.map(e)}),pd=we.define();function Pt(i,e,t){let n=i.facet(ad);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Ni=ae.define({combine:i=>i.length?i[0]:!0});let Qw=0;const Ps=ae.define();class He{constructor(e,t,n,s,r){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:n,eventObservers:s,provide:r,decorations:o}=t||{};return new He(Qw++,e,n,s,a=>{let c=[Ps.of(a)];return o&&c.push(Ts.of(h=>{let u=h.plugin(a);return u?o(u):de.none})),r&&c.push(r(a)),c})}static fromClass(e,t){return He.define(n=>new e(n),t)}}class _a{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(n){if(Pt(t.state,n,"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){Pt(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(n){Pt(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const md=ae.define(),ba=ae.define(),Ts=ae.define(),gd=ae.define(),ya=ae.define(),Od=ae.define();function _d(i,e){let t=i.state.facet(Od);if(!t.length)return t;let n=t.map(r=>r instanceof Function?r(i):r),s=[];return Te.spans(n,e.from,e.to,{point(){},span(r,o,a,c){let h=r-e.from,u=o-e.from,f=s;for(let d=a.length-1;d>=0;d--,c--){let m=a[d].spec.bidiIsolate,b;if(m==null&&(m=Aw(e.text,h,u)),c>0&&f.length&&(b=f[f.length-1]).to==h&&b.direction==m)b.to=u,f=b.inner;else{let w={from:h,to:u,direction:m,inner:[]};f.push(w),f=w.inner}}}}),s}const bd=ae.define();function wa(i){let e=0,t=0,n=0,s=0;for(let r of i.state.facet(bd)){let o=r(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:n,bottom:s}}const Es=ae.define();class Ut{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new Ut(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,n=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>n.toA)){if(s.toA<n.fromA)break;n=n.join(s),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let s=0,r=0,o=0,a=0;;s++){let c=s==e.length?null:e[s],h=o-a,u=c?c.fromB:1e9;for(;r<t.length&&t[r]<u;){let f=t[r],d=t[r+1],m=Math.max(a,f),b=Math.min(u,d);if(m<=b&&new Ut(m+h,b+h,m,b).addToSet(n),d>u)break;r+=2}if(!c)return n;new Ut(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),o=c.toA,a=c.toB}}}class Zr{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=nt.empty(this.startState.doc.length);for(let r of n)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,a,c)=>s.push(new Ut(r,o,a,c))),this.changedRanges=s}static create(e,t,n){return new Zr(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>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 yd extends Be{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=de.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 et],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ut(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:h,toA:u})=>u<this.minWidthFrom||h>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:!Vw(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?Tw(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:u}=this.hasComposition;n=new Ut(h,u,e.changes.mapPos(h,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(oe.ie||oe.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),c=Nw(o,a,e.changes);return n=Ut.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);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 o=oe.chrome||oe.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof $i&&o.widget instanceof ha&&r.push(o.dom);s.updateGaps(r)}updateChildren(e,t,n){let s=n?n.range.addToSet(e.slice()):e,r=this.childCursor(t);for(let o=s.length-1;;o--){let a=o>=0?s[o]:null;if(!a)break;let{fromA:c,toA:h,fromB:u,toB:f}=a,d,m,b,w;if(n&&n.range.fromB<f&&n.range.toB>u){let y=Qs.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),Q=Qs.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);m=y.breakAtStart,b=y.openStart,w=Q.openEnd;let k=this.compositionView(n);Q.breakAtStart?k.breakAfter=1:Q.content.length&&k.merge(k.length,k.length,Q.content[0],!1,Q.openStart,0)&&(k.breakAfter=Q.content[0].breakAfter,Q.content.shift()),y.content.length&&k.merge(0,0,y.content[y.content.length-1],!0,0,y.openEnd)&&y.content.pop(),d=y.content.concat(k).concat(Q.content)}else({content:d,breakAtStart:m,openStart:b,openEnd:w}=Qs.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:p}=r.findPos(h,1),{i:O,off:S}=r.findPos(c,-1);Uf(this,O,S,g,p,d,m,b,w)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(pd)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new Kt(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Ei(s,[t],t.length);let n=new et;return n.append(t,0),n}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(o);let a=Be.get(r);a&&a!=o&&(a.dom=null),o.setDOM(r)},n=this.childPos(e.range.fromB,1),s=this.children[n.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)n=s.childPos(n.off,1),s=s.children[n.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,s=n==this.dom,r=!s&&!(this.view.state.facet(Ni)||this.dom.tabIndex>-1)&&Rr(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),h=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(oe.gecko&&a.empty&&!this.hasComposition&&Pw(c)){let f=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(f,c.node.childNodes[c.offset]||null)),c=h=new _t(f,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!xs(c.node,c.offset,u.anchorNode,u.anchorOffset)||!xs(h.node,h.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{oe.android&&oe.chrome&&this.dom.contains(u.focusNode)&&Rw(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=ks(this.view.root);if(f)if(a.empty){if(oe.gecko){let d=Ew(c.node,c.offset);if(d&&d!=3){let m=(d==1?Df:vf)(c.node,c.offset);m&&(c=new _t(m.node,m.offset))}}f.collapse(c.node,c.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(c.node,c.offset);try{f.extend(h.node,h.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([c,h]=[h,c]),d.setEnd(h.node,h.offset),d.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(d)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,h)),this.impreciseAnchor=c.precise?null:new _t(u.anchorNode,u.anchorOffset),this.impreciseHead=h.precise?null:new _t(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&xs(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,n=ks(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=et.find(this,t.head);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let c=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!c||!h||c.bottom>h.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.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&&n.collapse(s,r)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let s=e.offset;!n&&s<t.childNodes.length;s++){let r=Be.get(t.childNodes[s]);r instanceof et&&(n=r.domAtPos(0))}for(let s=e.offset-1;!n&&s>=0;s--){let r=Be.get(t.childNodes[s]);r instanceof et&&(n=r.domAtPos(r.length))}return n?new _t(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Be.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let s=this.children[t];if(n<s.length||s instanceof et)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,s=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],c=r-a.breakAfter,h=c-a.length;if(c<e)break;if(h<=e&&(h<e||a.covers(-1))&&(c>e||a.covers(1))&&(!n||a instanceof et&&!(n instanceof et&&t>=0)))n=a,s=h;else if(n&&h==e&&c==e&&a instanceof $i&&Math.abs(t)<2){if(a.deco.startSide<0)break;o&&(n=null)}r=h}return n?n.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),s=this.children[t];if(!(s instanceof et))return null;for(;s.children.length;){let{i:a,off:c}=s.childPos(n,1);for(;;a++){if(a==s.children.length)return null;if((s=s.children[a]).length)break}n=c}if(!(s instanceof Kt))return null;let r=ft(s.text,n);if(r==n)return null;let o=mn(s.dom,n,r).getClientRects();for(let a=0;a<o.length;a++){let c=o[a];if(a==o.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==Ie.LTR;for(let h=0,u=0;u<this.children.length;u++){let f=this.children[u],d=h+f.length;if(d>s)break;if(h>=n){let m=f.dom.getBoundingClientRect();if(t.push(m.height),o){let b=f.dom.lastChild,w=b?Mn(b):[];if(w.length){let g=w[w.length-1],p=c?g.right-m.left:m.right-g.left;p>a&&(a=p,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=d)}}}h=d+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Ie.RTL:Ie.LTR}measureTextSize(){for(let r of this.children)if(r instanceof et){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,n,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 r=Mn(e.firstChild)[0];t=e.getBoundingClientRect().height,n=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new If(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>n){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(de.replace({widget:new ha(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return de.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Ts).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),n=!1,s=this.view.state.facet(gd).map((r,o)=>{let a=typeof r=="function";return a&&(n=!0),a?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(Te.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 h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(dd))try{if(h(this.view,e.range,e))return!0}catch(u){Pt(this.view.state,u,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let r=wa(this.view),o={left:n.left-r.left,top:n.top-r.top,right:n.right+r.right,bottom:n.bottom+r.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;aw(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Ie.LTR)}}function Pw(i){return i.node.nodeType==1&&i.node.firstChild&&(i.offset==0||i.node.childNodes[i.offset-1].contentEditable=="false")&&(i.offset==i.node.childNodes.length||i.node.childNodes[i.offset].contentEditable=="false")}function wd(i,e){let t=i.observer.selectionRange;if(!t.focusNode)return null;let n=Df(t.focusNode,t.focusOffset),s=vf(t.focusNode,t.focusOffset),r=n||s;if(s&&n&&s.node!=n.node){let a=Be.get(s.node);if(!a||a instanceof Kt&&a.text!=s.node.nodeValue)r=s;else if(i.docView.lastCompositionAfterCursor){let c=Be.get(n.node);!c||c instanceof Kt&&c.text!=n.node.nodeValue||(r=s)}}if(i.docView.lastCompositionAfterCursor=r!=n,!r)return null;let o=e-r.offset;return{from:o,to:o+r.node.nodeValue.length,node:r.node}}function Tw(i,e,t){let n=wd(i,t);if(!n)return null;let{node:s,from:r,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a)||i.state.doc.sliceString(n.from,n.to)!=a)return null;let c=e.invertedDesc,h=new Ut(c.mapPos(r),c.mapPos(o),r,o),u=[];for(let f=s.parentNode;;f=f.parentNode){let d=Be.get(f);if(d instanceof Ei)u.push({node:f,deco:d.mark});else{if(d instanceof et||f.nodeName=="DIV"&&f.parentNode==i.contentDOM)return{range:h,text:s,marks:u,line:f};if(f!=i.contentDOM)u.push({node:f,deco:new Cs({inclusive:!0,attributes:gw(f),tagName:f.tagName.toLowerCase()})});else return null}}}function Ew(i,e){return i.nodeType!=1?0:(e&&i.childNodes[e-1].contentEditable=="false"?1:0)|(e<i.childNodes.length&&i.childNodes[e].contentEditable=="false"?2:0)}let $w=class{constructor(){this.changes=[]}compareRange(e,t){Br(e,t,this.changes)}comparePoint(e,t){Br(e,t,this.changes)}boundChange(e){Br(e,e,this.changes)}};function Nw(i,e,t){let n=new $w;return Te.compare(i,e,t,n),n.changes}function Rw(i,e){for(let t=i;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function Vw(i,e){let t=!1;return e&&i.iterChangedRanges((n,s)=>{n<e.to&&s>e.from&&(t=!0)}),t}function Lw(i,e,t=1){let n=i.charCategorizer(e),s=i.doc.lineAt(e),r=e-s.from;if(s.length==0)return j.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,a=r;t<0?o=ft(s.text,r,!1):a=ft(s.text,r);let c=n(s.text.slice(o,a));for(;o>0;){let h=ft(s.text,o,!1);if(n(s.text.slice(h,o))!=c)break;o=h}for(;a<s.length;){let h=ft(s.text,a);if(n(s.text.slice(a,h))!=c)break;a=h}return j.range(o+s.from,a+s.from)}function Mw(i,e){return e.left>i?e.left-i:Math.max(0,i-e.right)}function Bw(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function ka(i,e){return i.top<e.bottom-1&&i.bottom>e.top+1}function kd(i,e){return e<i.top?{top:e,left:i.left,right:i.right,bottom:i.bottom}:i}function xd(i,e){return e>i.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function xa(i,e,t){let n,s,r,o,a=!1,c,h,u,f;for(let b=i.firstChild;b;b=b.nextSibling){let w=Mn(b);for(let g=0;g<w.length;g++){let p=w[g];s&&ka(s,p)&&(p=kd(xd(p,s.bottom),s.top));let O=Mw(e,p),S=Bw(t,p);if(O==0&&S==0)return b.nodeType==3?Sd(b,e,t):xa(b,e,t);if(!n||o>S||o==S&&r>O){n=b,s=p,r=O,o=S;let y=S?t<p.top?-1:1:O?e<p.left?-1:1:0;a=!y||(y>0?g<w.length-1:g>0)}O==0?t>p.bottom&&(!u||u.bottom<p.bottom)?(c=b,u=p):t<p.top&&(!f||f.top>p.top)&&(h=b,f=p):u&&ka(u,p)?u=xd(u,p.bottom):f&&ka(f,p)&&(f=kd(f,p.top))}}if(u&&u.bottom>=t?(n=c,s=u):f&&f.top<=t&&(n=h,s=f),!n)return{node:i,offset:0};let d=Math.max(s.left,Math.min(s.right,e));if(n.nodeType==3)return Sd(n,d,t);if(a&&n.contentEditable!="false")return xa(n,d,t);let m=Array.prototype.indexOf.call(i.childNodes,n)+(e>=(s.left+s.right)/2?1:0);return{node:i,offset:m}}function Sd(i,e,t){let n=i.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;a<n;a++){let c=mn(i,a,a+1).getClientRects();for(let h=0;h<c.length;h++){let u=c[h];if(u.top==u.bottom)continue;o||(o=e-u.left);let f=(u.top>t?u.top-t:t-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f<r){let d=e>=(u.left+u.right)/2,m=d;if((oe.chrome||oe.gecko)&&mn(i,a).getBoundingClientRect().left==u.right&&(m=!d),f<=0)return{node:i,offset:a+(m?1:0)};s=a+(m?1:0),r=f}}}return{node:i,offset:s>-1?s:o>0?i.nodeValue.length:0}}function Cd(i,e,t,n=-1){var s,r;let o=i.contentDOM.getBoundingClientRect(),a=o.top+i.viewState.paddingTop,c,{docHeight:h}=i.viewState,{x:u,y:f}=e,d=f-a;if(d<0)return 0;if(d>h)return i.state.doc.length;for(let y=i.viewState.heightOracle.textHeight/2,Q=!1;c=i.elementAtHeight(d),c.type!=kt.Text;)for(;d=n>0?c.bottom+y:c.top-y,!(d>=0&&d<=h);){if(Q)return t?null:0;Q=!0,n=-n}f=a+d;let m=c.from;if(m<i.viewport.from)return i.viewport.from==0?0:t?null:Ad(i,o,c,u,f);if(m>i.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:Ad(i,o,c,u,f);let b=i.dom.ownerDocument,w=i.root.elementFromPoint?i.root:b,g=w.elementFromPoint(u,f);g&&!i.contentDOM.contains(g)&&(g=null),g||(u=Math.max(o.left+1,Math.min(o.right-1,u)),g=w.elementFromPoint(u,f),g&&!i.contentDOM.contains(g)&&(g=null));let p,O=-1;if(g&&((s=i.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(b.caretPositionFromPoint){let y=b.caretPositionFromPoint(u,f);y&&({offsetNode:p,offset:O}=y)}else if(b.caretRangeFromPoint){let y=b.caretRangeFromPoint(u,f);y&&({startContainer:p,startOffset:O}=y,(!i.contentDOM.contains(p)||oe.safari&&Dw(p,O,u)||oe.chrome&&vw(p,O,u))&&(p=void 0))}p&&(O=Math.min(di(p),O))}if(!p||!i.docView.dom.contains(p)){let y=et.find(i.docView,m);if(!y)return d>c.top+c.height/2?c.to:c.from;({node:p,offset:O}=xa(y.dom,u,f))}let S=i.docView.nearest(p);if(!S)return null;if(S.isWidget&&((r=S.dom)===null||r===void 0?void 0:r.nodeType)==1){let y=S.dom.getBoundingClientRect();return e.y<y.top||e.y<=y.bottom&&e.x<=(y.left+y.right)/2?S.posAtStart:S.posAtEnd}else return S.localPosFromDOM(p,O)+S.posAtStart}function Ad(i,e,t,n,s){let r=Math.round((n-e.left)*i.defaultCharacterWidth);if(i.lineWrapping&&t.height>i.defaultLineHeight*1.5){let a=i.viewState.heightOracle.textHeight,c=Math.floor((s-t.top-(i.defaultLineHeight-a)*.5)/a);r+=c*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+Kl(o,r,i.state.tabSize)}function Dw(i,e,t){let n;if(i.nodeType!=3||e!=(n=i.nodeValue.length))return!1;for(let s=i.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return mn(i,n-1,n).getBoundingClientRect().left>t}function vw(i,e,t){if(e!=0)return!1;for(let s=i;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let n=i.nodeType==1?i.getBoundingClientRect():mn(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function Sa(i,e){let t=i.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==kt.Text))return n}return t}function Zw(i,e,t,n){let s=Sa(i,e.head),r=!n||s.type!=kt.Text||!(i.lineWrapping||s.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=i.dom.getBoundingClientRect(),a=i.textDirectionAt(s.from),c=i.posAtCoords({x:t==(a==Ie.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(c!=null)return j.cursor(c,t?-1:1)}return j.cursor(t?s.to:s.from,t?-1:1)}function Qd(i,e,t,n){let s=i.state.doc.lineAt(e.head),r=i.bidiSpans(s),o=i.textDirectionAt(s.from);for(let a=e,c=null;;){let h=Cw(s,r,o,a,t),u=sd;if(!h){if(s.number==(t?i.state.doc.lines:1))return a;u=`
28
- `,s=i.state.doc.line(s.number+(t?1:-1)),r=i.bidiSpans(s),h=i.visualLineSide(s,!t)}if(c){if(!c(u))return a}else{if(!n)return h;c=n(u)}a=h}}function Iw(i,e,t){let n=i.state.charCategorizer(e),s=n(t);return r=>{let o=n(r);return s==je.Space&&(s=o),s==o}}function Uw(i,e,t,n){let s=e.head,r=t?1:-1;if(s==(t?i.state.doc.length:0))return j.cursor(s,e.assoc);let o=e.goalColumn,a,c=i.contentDOM.getBoundingClientRect(),h=i.coordsAtPos(s,e.assoc||-1),u=i.documentTop;if(h)o==null&&(o=h.left-c.left),a=r<0?h.top:h.bottom;else{let m=i.viewState.lineBlockAt(s);o==null&&(o=Math.min(c.right-c.left,i.defaultCharacterWidth*(s-m.from))),a=(r<0?m.top:m.bottom)+u}let f=c.left+o,d=n??i.viewState.heightOracle.textHeight>>1;for(let m=0;;m+=10){let b=a+(d+m)*r,w=Cd(i,{x:f,y:b},!1,r);if(b<c.top||b>c.bottom||(r<0?w<s:w>s)){let g=i.docView.coordsForChar(w),p=!g||b<g.top?-1:1;return j.cursor(w,p,void 0,o)}}}function Ir(i,e,t){for(;;){let n=0;for(let s of i)s.between(e-1,e+1,(r,o,a)=>{if(e>r&&e<o){let c=n||t||(e-r<o-e?-1:1);e=c<0?r:o,n=c}});if(!n)return e}}function Ca(i,e,t){let n=Ir(i.state.facet(ya).map(s=>s(i)),t.from,e.head>t.from?-1:1);return n==t.from?t:j.cursor(n,n<t.from?1:-1)}const $s="￿";class Fw{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Se.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=$s}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let s=e;;){this.findPointBefore(n,s);let r=this.text.length;this.readNode(s);let o=s.nextSibling;if(o==t)break;let a=Be.get(s),c=Be.get(o);(a&&c?a.breakAfter:(a?a.breakAfter:Vr(s))||Vr(o)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>r)&&this.lineBreak(),s=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,a;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=s.exec(t))&&(r=a.index,o=a[0].length),this.append(t.slice(n,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=o-1);n=r+o}}readNode(e){if(e.cmIgnore)return;let t=Be.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let s=n.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 n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(jw(e,n.node,n.offset)?t:0))}}function jw(i,e,t){for(;;){if(!e||t<di(e))return!1;if(e==i)return!0;t=pn(e)+1,e=e.parentNode}}class Pd{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class qw{constructor(e,t,n,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let a=r||o?[]:Yw(e),c=new Fw(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=zw(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=r&&r.node==a.focusNode&&r.offset==a.focusOffset||!ia(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),h=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!ia(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((oe.ios||oe.chrome)&&e.state.selection.main.empty&&c!=h&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(c,h),d=Math.max(c,h),m=u.from-f,b=u.to-d;(m==0||m==1||f==0)&&(b==0||b==-1||d==e.state.doc.length)&&(c=0,h=e.state.doc.length)}this.newSel=j.single(h,c)}}}function Td(i,e){let t,{newSel:n}=e,s=i.state.selection.main,r=i.inputState.lastKeyTime>Date.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,c=s.from,h=null;(r===8||oe.android&&e.text.length<a-o)&&(c=s.to,h="end");let u=Ww(i.state.doc.sliceString(o,a,$s),e.text,c-o,h);u&&(oe.chrome&&r==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==$s+$s&&u.toB--,t={from:o+u.from,to:o+u.toA,insert:Ae.of(e.text.slice(u.from,u.toB).split($s))})}else n&&(!i.hasFocus&&i.state.facet(Ni)||n.main.eq(s))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!s.empty&&n&&n.main.empty?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,s.to)}:(oe.mac||oe.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=j.single(n.main.anchor-1,n.main.head-1)),t={from:t.from,to:t.to,insert:Ae.of([t.insert.toString().replace("."," ")])}):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:i.state.doc.slice(s.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,s.to))}:oe.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
29
- `&&i.lineWrapping&&(n&&(n=j.single(n.main.anchor-1,n.main.head-1)),t={from:s.from,to:s.to,insert:Ae.of([" "])}),t)return Aa(i,t,n,r);if(n&&!n.main.eq(s)){let o=!1,a="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),a=i.inputState.lastSelectionOrigin),i.dispatch({selection:n,scrollIntoView:o,userEvent:a}),!0}else return!1}function Aa(i,e,t,n=-1){if(oe.ios&&i.inputState.flushIOSKey(e))return!0;let s=i.state.selection.main;if(oe.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&i.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Dn(i.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&Dn(i.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Dn(i.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,a=()=>o||(o=Xw(i,e,t));return i.state.facet(cd).some(c=>c(i,e.from,e.to,r,a))||i.dispatch(a()),!0}function Xw(i,e,t){let n,s=i.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let a=r.from<e.from?s.sliceDoc(r.from,e.from):"",c=r.to>e.to?s.sliceDoc(e.to,r.to):"";n=s.replaceSelection(i.state.toText(a+e.insert.sliceString(0,void 0,i.state.lineBreak)+c))}else{let a=s.changes(e),c=t&&t.main.to<=a.newLength?t.main:void 0;if(s.selection.ranges.length>1&&i.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=i.state.sliceDoc(e.from,e.to),u,f=t&&wd(i,t.main.head);if(f){let b=e.insert.length-(e.to-e.from);u={from:f.from,to:f.to-b}}else u=i.state.doc.lineAt(r.head);let d=r.to-e.to,m=r.to-r.from;n=s.changeByRange(b=>{if(b.from==r.from&&b.to==r.to)return{changes:a,range:c||b.map(a)};let w=b.to-d,g=w-h.length;if(b.to-b.from!=m||i.state.sliceDoc(g,w)!=h||b.to>=u.from&&b.from<=u.to)return{range:b};let p=s.changes({from:g,to:w,insert:e.insert}),O=b.to-r.to;return{changes:p,range:c?j.range(Math.max(0,c.anchor+O),Math.max(0,c.head+O)):b.map(p)}})}else n={changes:a,selection:c&&s.selection.replaceRange(c)}}let o="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,o+=".compose",i.inputState.compositionFirstChange&&(o+=".start",i.inputState.compositionFirstChange=!1)),s.update(n,{userEvent:o,scrollIntoView:!0})}function Ww(i,e,t,n){let s=Math.min(i.length,e.length),r=0;for(;r<s&&i.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==s&&i.length==e.length)return null;let o=i.length,a=e.length;for(;o>0&&a>0&&i.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(n=="end"){let c=Math.max(0,r-Math.min(o,a));t-=o+c-r}if(o<r&&i.length<e.length){let c=t<=r&&t>=o?r-t:0;r-=c,a=r+(a-o),o=r}else if(a<r){let c=t<=r&&t>=a?r-t:0;r-=c,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}function Yw(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}=i.observer.selectionRange;return t&&(e.push(new Pd(t,n)),(s!=t||r!=n)&&e.push(new Pd(s,r))),e}function zw(i,e){if(i.length==0)return null;let t=i[0].pos,n=i.length==2?i[1].pos:t;return t>-1&&n>-1?j.single(t+e,n+e):null}class Gw{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,oe.safari&&e.contentDOM.addEventListener("input",()=>null),oe.gecko&&fk(e.contentDOM.ownerDocument)}handleEvent(e){!sk(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let s of n.observers)s(this.view,t);for(let s of n.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Hw(e),n=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,a=n[r];a&&o!=!a.handlers.length&&(s.removeEventListener(r,this.handleEvent),a=null),a||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in n)r!="scroll"&&!t[r]&&s.removeEventListener(r,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&&Nd.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),oe.android&&oe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return oe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=$d.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||Kw.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,Dn(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:oe.safari&&!oe.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 Ed(i,e){return(t,n)=>{try{return e.call(i,n,t)}catch(s){Pt(t.state,s)}}}function Hw(i){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of i){let s=n.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push(Ed(n.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push(Ed(n.value,o))}}for(let n in Jt)t(n).handlers.push(Jt[n]);for(let n in Ft)t(n).observers.push(Ft[n]);return e}const $d=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Kw="dthko",Nd=[16,17,18,20,91,92,224,225],Ur=6;function Fr(i){return Math.max(0,i)*.7+8}function Jw(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}class ek{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=cw(e.contentDOM),this.atoms=e.state.facet(ya).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Se.allowMultipleSelections)&&tk(e,t),this.dragging=nk(e,t)&&Id(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&&Jw(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,s=0,r=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=wa(this.view);e.clientX-c.left<=s+Ur?t=-Fr(s-e.clientX):e.clientX+c.right>=o-Ur&&(t=Fr(e.clientX-o)),e.clientY-c.top<=r+Ur?n=-Fr(r-e.clientY):e.clientY+c.bottom>=a-Ur&&(n=Fr(e.clientY-a)),this.setScrollSpeed(t,n)}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 n=0;n<e.ranges.length;n++){let s=e.ranges[n],r=null;if(s.empty){let o=Ir(this.atoms,s.from,0);o!=s.from&&(r=j.cursor(o,-1))}else{let o=Ir(this.atoms,s.from,-1),a=Ir(this.atoms,s.to,1);(o!=s.from||a!=s.to)&&(r=j.range(s.from==s.anchor?o:a,s.from==s.head?o:a))}r&&(t||(t=e.ranges.slice()),t[n]=r)}return t?j.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,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 tk(i,e){let t=i.state.facet(rd);return t.length?t[0](e):oe.mac?e.metaKey:e.ctrlKey}function ik(i,e){let t=i.state.facet(od);return t.length?t[0](e):oe.mac?!e.altKey:!e.ctrlKey}function nk(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let n=ks(i.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let r=0;r<s.length;r++){let o=s[r];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function sk(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Be.get(t))&&n.ignoreEvent(e))return!1;return!0}const Jt=Object.create(null),Ft=Object.create(null),Rd=oe.ie&&oe.ie_version<15||oe.ios&&oe.webkit_version<604;function rk(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),Vd(i,t.value)},50)}function jr(i,e,t){for(let n of i.facet(e))t=n(t,i);return t}function Vd(i,e){e=jr(i.state,ga,e);let{state:t}=i,n,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(Qa!=null&&t.selection.ranges.every(c=>c.empty)&&Qa==r.toString()){let c=-1;n=t.changeByRange(h=>{let u=t.doc.lineAt(h.from);if(u.from==c)return{range:h};c=u.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:f},range:j.cursor(h.from+f.length)}})}else o?n=t.changeByRange(c=>{let h=r.line(s++);return{changes:{from:c.from,to:c.to,insert:h.text},range:j.cursor(c.from+h.length)}}):n=t.replaceSelection(r);i.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Ft.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft},Jt.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1),Ft.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")},Ft.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")},Jt.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of i.state.facet(ld))if(t=n(i,e),t)break;if(!t&&e.button==0&&(t=ak(i,e)),t){let n=!i.hasFocus;i.inputState.startMouseSelection(new ek(i,e,t,n)),n&&i.observer.ignore(()=>{Vf(i.contentDOM);let r=i.root.activeElement;r&&!r.contains(i.contentDOM)&&r.blur()});let s=i.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function Ld(i,e,t,n){if(n==1)return j.cursor(e,t);if(n==2)return Lw(i.state,e,t);{let s=et.find(i.docView,e),r=i.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,a=s?s.posAtEnd:r.to;return a<i.state.doc.length&&a==r.to&&a++,j.range(o,a)}}let Md=(i,e,t)=>e>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function ok(i,e,t,n){let s=et.find(i.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Md(t,n,o))return-1;let a=s.coordsAt(r,1);return a&&Md(t,n,a)?1:o&&o.bottom>=n?-1:1}function Bd(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:ok(i,t,e.clientX,e.clientY)}}const lk=oe.ie&&oe.ie_version<=11;let Dd=null,vd=0,Zd=0;function Id(i){if(!lk)return i.detail;let e=Dd,t=Zd;return Dd=i,Zd=Date.now(),vd=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(vd+1)%3:1}function ak(i,e){let t=Bd(i,e),n=Id(e),s=i.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,a){let c=Bd(i,r),h,u=Ld(i,c.pos,c.bias,n);if(t.pos!=c.pos&&!o){let f=Ld(i,t.pos,t.bias,n),d=Math.min(f.from,u.from),m=Math.max(f.to,u.to);u=d<u.from?j.range(d,m):j.range(m,d)}return o?s.replaceRange(s.main.extend(u.from,u.to)):a&&n==1&&s.ranges.length>1&&(h=ck(s,c.pos))?h:a?s.addRange(u):j.create([u])}}}function ck(i,e){for(let t=0;t<i.ranges.length;t++){let{from:n,to:s}=i.ranges[t];if(n<=e&&s>=e)return j.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}Jt.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let s=i.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=j.range(r,o))}}let{inputState:n}=i;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",jr(i.state,Oa,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Jt.dragend=i=>(i.inputState.draggedContent=null,!1);function Ud(i,e,t,n){if(t=jr(i.state,ga,t),!t)return;let s=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=i.inputState,o=n&&r&&ik(i,e)?{from:r.from,to:r.to}:null,a={from:s,insert:t},c=i.state.changes(o?[o,a]:a);i.focus(),i.dispatch({changes:c,selection:{anchor:c.mapPos(s,-1),head:c.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}Jt.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),s=0,r=()=>{++s==t.length&&Ud(i,e,n.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let a=new FileReader;a.onerror=r,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(n[o]=a.result),r()},a.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return Ud(i,e,n,!0),!0}return!1},Jt.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=Rd?null:e.clipboardData;return t?(Vd(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(rk(i),!1)};function hk(i,e){let t=i.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),i.focus()},50)}function uk(i){let e=[],t=[],n=!1;for(let s of i.selection.ranges)s.empty||(e.push(i.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of i.selection.ranges){let o=i.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),s=o.number}n=!0}return{text:jr(i,Oa,e.join(i.lineBreak)),ranges:t,linewise:n}}let Qa=null;Jt.copy=Jt.cut=(i,e)=>{let{text:t,ranges:n,linewise:s}=uk(i.state);if(!t&&!s)return!1;Qa=s?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let r=Rd?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(hk(i,t),!1)};const Fd=Pi.define();function jd(i,e){let t=[];for(let n of i.facet(hd)){let s=n(i,e);s&&t.push(s)}return t?i.update({effects:t,annotations:Fd.of(!0)}):null}function qd(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=jd(i.state,e);t?i.dispatch(t):i.update([])}},10)}Ft.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),qd(i)},Ft.blur=i=>{i.observer.clearSelectionRange(),qd(i)},Ft.compositionstart=Ft.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))},Ft.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,oe.chrome&&oe.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))},Ft.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()},Jt.beforeinput=(i,e)=>{var t,n;if(e.inputType=="insertReplacementText"&&i.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let a=o[0],c=i.posAtDOM(a.startContainer,a.startOffset),h=i.posAtDOM(a.endContainer,a.endOffset);return Aa(i,{from:c,to:h,insert:i.state.toText(r)},null),!0}}let s;if(oe.chrome&&oe.android&&(s=$d.find(r=>r.inputType==e.inputType))&&(i.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return oe.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),oe.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Ft.compositionend(i,e),20),!1};const Xd=new Set;function fk(i){Xd.has(i)||(Xd.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}const Wd=["pre-wrap","normal","pre-line","break-spaces"];let Un=!1;function Yd(){Un=!1}class dk{constructor(e){this.lineWrapping=e,this.doc=Ae.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}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 Wd.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let s=e[n];s<0?n++:this.heightSamples[Math.floor(s*10)]||(t=!0,this.heightSamples[Math.floor(s*10)]=!0)}return t}refresh(e,t,n,s,r,o){let a=Wd.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=r,c){this.heightSamples={};for(let h=0;h<o.length;h++){let u=o[h];u<0?h++:this.heightSamples[Math.floor(u*10)]=!0}}return c}}class pk{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class gi{constructor(e,t,n,s,r){this.from=e,this.length=t,this.top=n,this.height=s,this._content=r}get type(){return typeof this._content=="number"?kt.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 zi?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 gi(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ue=function(i){return i[i.ByPos=0]="ByPos",i[i.ByHeight=1]="ByHeight",i[i.ByPosNoHeight=2]="ByPosNoHeight",i}(Ue||(Ue={}));const qr=.001;class xt{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}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)>qr&&(Un=!0),this.height=e)}replace(e,t,n){return xt.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let r=this,o=n.doc;for(let a=s.length-1;a>=0;a--){let{fromA:c,toA:h,fromB:u,toB:f}=s[a],d=r.lineAt(c,Ue.ByPosNoHeight,n.setDoc(t),0,0),m=d.to>=h?d:r.lineAt(h,Ue.ByPosNoHeight,n,0,0);for(f+=m.to-h,h=m.to;a>0&&d.from<=s[a-1].toA;)c=s[a-1].fromA,u=s[a-1].fromB,a--,c<d.from&&(d=r.lineAt(c,Ue.ByPosNoHeight,n,0,0));u+=d.from-c,c=d.from;let b=Pa.build(n.setDoc(o),e,u,f);r=Xr(r,r.replace(c,h,b))}return r.updateHeight(n,0)}static empty(){return new Mt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,s=0,r=0;for(;;)if(t==n)if(s>r*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),n+=1+a.break,s-=a.size}else if(r>s*2){let a=e[n];a.break?e.splice(n,1,a.left,null,a.right):e.splice(n,1,a.left,a.right),n+=2+a.break,r-=a.size}else break;else if(s<r){let a=e[t++];a&&(s+=a.size)}else{let a=e[--n];a&&(r+=a.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,n++),new mk(xt.of(e.slice(0,t)),o,xt.of(e.slice(n)))}}function Xr(i,e){return i==e?i:(i.constructor!=e.constructor&&(Un=!0),e)}xt.prototype.size=1;class zd extends xt{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,s){return new gi(s,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,s,r){return this.blockAt(0,n,s,r)}forEachLine(e,t,n,s,r,o){e<=r+this.length&&t>=r&&o(this.blockAt(0,n,s,r))}updateHeight(e,t=0,n=!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 Mt extends zd{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,s){return new gi(s,this.length,n,this.height,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof Mt||s instanceof mt&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof mt?s=new Mt(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):xt.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(n||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 mt extends xt{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-n+1,o,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*r);o=c/r,this.length>r+1&&(a=(this.height-c)/(this.length-r-1))}else o=this.height/r;return{firstLine:n,lastLine:s,perLine:o,perChar:a}}blockAt(e,t,n,s){let{firstLine:r,lastLine:o,perLine:a,perChar:c}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),u=t.doc.lineAt(h),f=a+u.length*c,d=Math.max(n,e-f/2);return new gi(u.from,u.length,d,f,0)}else{let h=Math.max(0,Math.min(o-r,Math.floor((e-n)/a))),{from:u,length:f}=t.doc.line(r+h);return new gi(u,f,n+a*h,a,0)}}lineAt(e,t,n,s,r){if(t==Ue.ByHeight)return this.blockAt(e,n,s,r);if(t==Ue.ByPosNoHeight){let{from:m,to:b}=n.doc.lineAt(e);return new gi(m,b-m,0,0,0)}let{firstLine:o,perLine:a,perChar:c}=this.heightMetrics(n,r),h=n.doc.lineAt(e),u=a+h.length*c,f=h.number-o,d=s+a*f+c*(h.from-r-f);return new gi(h.from,h.length,Math.max(s,Math.min(d,s+this.height-u)),u,0)}forEachLine(e,t,n,s,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:a,perLine:c,perChar:h}=this.heightMetrics(n,r);for(let u=e,f=s;u<=t;){let d=n.doc.lineAt(u);if(u==e){let b=d.number-a;f+=c*b+h*(e-r-b)}let m=c+h*d.length;o(new gi(d.from,d.length,f,m,0)),f+=m,u=d.to+1}}replace(e,t,n){let s=this.length-t;if(s>0){let r=n[n.length-1];r instanceof mt?n[n.length-1]=new mt(r.length+s):n.push(null,new mt(s-1))}if(e>0){let r=n[0];r instanceof mt?n[0]=new mt(e+r.length):n.unshift(new mt(e-1),null)}return xt.of(n)}decomposeLeft(e,t){t.push(new mt(e-1),null)}decomposeRight(e,t){t.push(null,new mt(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],a=Math.max(t,s.from),c=-1;for(s.from>t&&o.push(new mt(s.from-t-1).updateHeight(e,t));a<=r&&s.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=s.heights[s.index++];c==-1?c=f:Math.abs(f-c)>=qr&&(c=-2);let d=new Mt(u,f);d.outdated=!1,o.push(d),a+=u+1}a<=r&&o.push(null,new mt(r-a).updateHeight(e,a));let h=xt.of(o);return(c<0||Math.abs(h.height-this.height)>=qr||Math.abs(c-this.heightMetrics(e,t).perLine)>=qr)&&(Un=!0),Xr(this,h)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class mk extends xt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let r=n+this.left.height;return e<r?this.left.blockAt(e,t,n,s):this.right.blockAt(e,t,r,s+this.left.length+this.break)}lineAt(e,t,n,s,r){let o=s+this.left.height,a=r+this.left.length+this.break,c=t==Ue.ByHeight?e<o:e<a,h=c?this.left.lineAt(e,t,n,s,r):this.right.lineAt(e,t,n,o,a);if(this.break||(c?h.to<a:h.from>a))return h;let u=t==Ue.ByPosNoHeight?Ue.ByPosNoHeight:Ue.ByPos;return c?h.join(this.right.lineAt(a,u,n,o,a)):this.left.lineAt(a,u,n,s,r).join(h)}forEachLine(e,t,n,s,r,o){let a=s+this.left.height,c=r+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,s,r,o),t>=c&&this.right.forEachLine(e,t,n,a,c,o);else{let h=this.lineAt(c,Ue.ByPos,n,s,r);e<h.from&&this.left.forEachLine(e,h.from-1,n,s,r,o),h.to>=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,n,a,c,o)}}replace(e,t,n){let s=this.left.length+this.break;if(t<s)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,n));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let a of n)r.push(a);if(e>0&&Gd(r,o-1),t<this.length){let a=r.length;this.decomposeRight(t,r),Gd(r,a)}return xt.of(r)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,s=n+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e<n&&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?xt.of(this.break?[e,null,t]:[e,t]):(this.left=Xr(this.left,e),this.right=Xr(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,n=!1,s){let{left:r,right:o}=this,a=t+r.length+this.break,c=null;return s&&s.from<=t+r.length&&s.more?c=r=r.updateHeight(e,t,n,s):r.updateHeight(e,t,n),s&&s.from<=a+o.length&&s.more?c=o=o.updateHeight(e,a,n,s):o.updateHeight(e,a,n),c?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Gd(i,e){let t,n;i[e]==null&&(t=i[e-1])instanceof mt&&(n=i[e+1])instanceof mt&&i.splice(e-1,3,new mt(t.length+1+n.length))}const gk=5;class Pa{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 n=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Mt?s.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Mt(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let s=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new zd(o,s,n)):(o||r||s>=gk)&&this.addLineDeco(s,r,o)}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 Mt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new mt(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Mt)return e;let t=new Mt(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,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Mt)&&!this.isCovered?this.nodes.push(new Mt(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let s of this.nodes)s instanceof Mt&&s.updateHeight(this.oracle,n),n+=s?s.length:1;return this.nodes}static build(e,t,n,s){let r=new Pa(n,e);return Te.spans(t,n,s,r,0),r.finish(n)}}function Ok(i,e,t){let n=new _k;return Te.compare(i,e,t,n,0),n.changes}class _k{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,s){(e<t||n&&n.heightRelevant||s&&s.heightRelevant)&&Br(e,t,this.changes,5)}}function bk(i,e){let t=i.getBoundingClientRect(),n=i.ownerDocument,s=n.defaultView||window,r=Math.max(0,t.left),o=Math.min(s.innerWidth,t.right),a=Math.max(0,t.top),c=Math.min(s.innerHeight,t.bottom);for(let h=i.parentNode;h&&h!=n.body;)if(h.nodeType==1){let u=h,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();r=Math.max(r,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),c=Math.min(h==i.parentNode?s.innerHeight:c,d.bottom)}h=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,c)-(t.top+e)}}function yk(i){let e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function wk(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Ta{constructor(e,t,n,s){this.from=e,this.to=t,this.size=n,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let s=e[n],r=t[n];if(s.from!=r.from||s.to!=r.to||s.size!=r.size)return!1}return!0}draw(e,t){return de.replace({widget:new kk(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class kk extends pi{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 Hd{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=Kd,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ie.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(ba).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new dk(t),this.stateDeco=e.facet(Ts).filter(n=>typeof n!="function"),this.heightMap=xt.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle.setDoc(e.doc),[new Ut(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=de.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Wr(r,o))}}return this.viewports=e.sort((n,s)=>n.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Kd:new Ea(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(Ns(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Ts).filter(u=>typeof u!="function");let s=e.changedRanges,r=Ut.extendWithRanges(s,Ok(n,this.stateDeco,e?e.changes:nt.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Yd(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Un)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!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(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(fd)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),s=this.heightOracle,r=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Ie.RTL:Ie.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),a=t.getBoundingClientRect(),c=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let h=0,u=0;if(a.width&&a.height){let{scaleX:y,scaleY:Q}=Rf(t,a);(y>.005&&Math.abs(this.scaleX-y)>.005||Q>.005&&Math.abs(this.scaleY-Q)>.005)&&(this.scaleX=y,this.scaleY=Q,h|=16,o=c=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let m=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=m&&(this.scrollAnchorHeight=-1,this.scrollTop=m),this.scrolledToBottom=Bf(e.scrollDOM);let b=(this.printing?wk:bk)(t,this.paddingTop),w=b.top-this.pixelViewport.top,g=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let p=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(p!=this.inView&&(this.inView=p,p&&(c=!0)),!this.inView&&!this.scrollTarget&&!yk(e.dom))return 0;let O=a.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let y=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(y)&&(o=!0),o||s.lineWrapping&&Math.abs(O-this.contentDOMWidth)>s.charWidth){let{lineHeight:Q,charWidth:k,textHeight:C}=e.docView.measureTextSize();o=Q>0&&s.refresh(r,Q,k,C,O/k,y),o&&(e.docView.minWidth=0,h|=16)}w>0&&g>0?u=Math.max(w,g):w<0&&g<0&&(u=Math.min(w,g)),Yd();for(let Q of this.viewports){let k=Q.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(Q);this.heightMap=(o?xt.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle,[new Ut(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new pk(Q.from,k))}Un&&(h|=2)}let S=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return S&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),h|=this.updateForViewport()),(h&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,c=new Wr(s.lineAt(o-n*1e3,Ue.ByHeight,r,0,0).from,s.lineAt(a+(1-n)*1e3,Ue.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(h<c.from||h>c.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,Ue.ByPos,r,0,0),d;t.y=="center"?d=(f.top+f.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&h<c.from?d=f.top:d=f.bottom-u,c=new Wr(s.lineAt(d-1e3/2,Ue.ByHeight,r,0,0).from,s.lineAt(d+u+1e3/2,Ue.ByHeight,r,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),s=t.mapPos(e.to,1);return new Wr(this.heightMap.lineAt(n,Ue.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,Ue.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,Ue.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,Ue.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||s<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||r>=a+Math.max(10,Math.min(n,250)))&&s>o-2*1e3&&r<a+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let s of e)t.touchesRange(s.from,s.to)||n.push(new Ta(t.mapPos(s.from),t.mapPos(s.to),s.size,s.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,s=n?1e4:2e3,r=s>>1,o=s<<1;if(this.defaultTextDirection!=Ie.LTR&&!n)return[];let a=[],c=(u,f,d,m)=>{if(f-u<r)return;let b=this.state.selection.main,w=[b.from];b.empty||w.push(b.to);for(let p of w)if(p>u&&p<f){c(u,p-10,d,m),c(p+10,f,d,m);return}let g=Sk(e,p=>p.from>=d.from&&p.to<=d.to&&Math.abs(p.from-u)<r&&Math.abs(p.to-f)<r&&!w.some(O=>p.from<O&&p.to>O));if(!g){if(f<d.to&&t&&n&&t.visibleRanges.some(S=>S.from<=f&&S.to>=f)){let S=t.moveToLineBoundary(j.cursor(f),!1,!0).head;S>u&&(f=S)}let p=this.gapSize(d,u,f,m),O=n||p<2e6?p:2e6;g=new Ta(u,f,p,O)}a.push(g)},h=u=>{if(u.length<o||u.type!=kt.Text)return;let f=xk(u.from,u.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,m,b;if(n){let w=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,p;if(d!=null){let O=zr(f,d),S=((this.visibleBottom-this.visibleTop)/2+w)/u.height;g=O-S,p=O+S}else g=(this.visibleTop-u.top-w)/u.height,p=(this.visibleBottom-u.top+w)/u.height;m=Yr(f,g),b=Yr(f,p)}else{let w=f.total*this.heightOracle.charWidth,g=s*this.heightOracle.charWidth,p=0;if(w>2e6)for(let k of e)k.from>=u.from&&k.from<u.to&&k.size!=k.displaySize&&k.from*this.heightOracle.charWidth+p<this.pixelViewport.left&&(p=k.size-k.displaySize);let O=this.pixelViewport.left+p,S=this.pixelViewport.right+p,y,Q;if(d!=null){let k=zr(f,d),C=((S-O)/2+g)/w;y=k-C,Q=k+C}else y=(O-g)/w,Q=(S+g)/w;m=Yr(f,y),b=Yr(f,Q)}m>u.from&&c(u.from,m,u,f),b<u.to&&c(b,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(h):h(u);return a}gapSize(e,t,n,s){let r=zr(s,n)-zr(s,t);return this.heightOracle.lineWrapping?e.height*r:s.total*this.heightOracle.charWidth*r}updateLineGaps(e){Ta.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=de.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Te.spans(t,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let s=0;if(n.length!=this.visibleRanges.length)s=12;else for(let r=0;r<n.length&&!(s&8);r++){let o=this.visibleRanges[r],a=n[r];(o.from!=a.from||o.to!=a.to)&&(s|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(s|=8))}return this.visibleRanges=n,s}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ns(this.heightMap.lineAt(e,Ue.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)||Ns(this.heightMap.lineAt(this.scaler.fromDOM(e),Ue.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 Ns(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 Wr{constructor(e,t){this.from=e,this.to=t}}function xk(i,e,t){let n=[],s=i,r=0;return Te.spans(t,i,e,{span(){},point(o,a){o>s&&(n.push({from:s,to:o}),r+=o-s),s=a}},20),s<e&&(n.push({from:s,to:e}),r+=e-s),{total:r,ranges:n}}function Yr({total:i,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(i*t);for(let s=0;;s++){let{from:r,to:o}=e[s],a=o-r;if(n<=a)return r+n;n-=a}}function zr(i,e){let t=0;for(let{from:n,to:s}of i.ranges){if(e<=s){t+=e-n;break}t+=s-n}return t/i.total}function Sk(i,e){for(let t of i)if(e(t))return t}const Kd={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}};class Ea{constructor(e,t,n){let s=0,r=0,o=0;this.viewports=n.map(({from:a,to:c})=>{let h=t.lineAt(a,Ue.ByPos,e,0,0).top,u=t.lineAt(c,Ue.ByPos,e,0,0).bottom;return s+=u-h,{from:a,to:c,top:h,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let a of this.viewports)a.domTop=o+(a.top-r)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),r=a.bottom}toDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return s+(e-n)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);n=r.bottom,s=r.domBottom}}fromDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return n+(e-s)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);n=r.bottom,s=r.domBottom}}eq(e){return e instanceof Ea?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function Ns(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),n=e.toDOM(i.bottom);return new gi(i.from,i.length,t,n-t,Array.isArray(i._content)?i._content.map(s=>Ns(s,e)):i._content)}const Gr=ae.define({combine:i=>i.join(" ")}),$a=ae.define({combine:i=>i.indexOf(!0)>-1}),Na=Xi.newName(),Jd=Xi.newName(),ep=Xi.newName(),tp={"&light":"."+Jd,"&dark":"."+ep};function Ra(i,e,t){return new Xi(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,s=>{if(s=="&")return i;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):i+" "+n}})}const Ck=Ra("."+Na,{"&":{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:"#ddd"},".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":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".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"}},tp),Ak={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Va=oe.ie&&oe.ie_version<=11;class Qk{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new hw,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 n of t)this.queue.push(n);(oe.ie&&oe.ie_version<=11||oe.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(oe.chrome&&oe.chrome_version<126)&&(this.editContext=new Tk(e),e.state.facet(Ni)&&(e.contentDOM.editContext=this.editContext.editContext)),Va&&(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,n)=>t!=e[n]))){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:n}=this,s=this.selectionRange;if(n.state.facet(Ni)?n.root.activeElement!=this.dom:!Rr(this.dom,s))return;let r=s.anchorNode&&n.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(oe.ie&&oe.ie_version<=11||oe.android&&oe.chrome)&&!n.state.selection.main.empty&&s.focusNode&&xs(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=ks(e.root);if(!t)return!1;let n=oe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Pk(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let s=Rr(this.dom,n);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&fw(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),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 n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.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,Ak),Va&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Va&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let s=()=>{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Dn(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.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,n=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:s}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),s=this.selectionChanged&&Rr(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 r=new qw(this.view,e,t,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}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 n=this.view.state,s=Td(this.view,t);return this.view.state==n&&(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 n=ip(t,e.previousSibling||e.target.previousSibling,-1),s=ip(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):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(Ni)!=e.state.facet(Ni)&&(e.view.contentDOM.editContext=e.state.facet(Ni)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.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 ip(i,e,t){for(;e;){let n=Be.get(e);if(n&&n.parent==i)return n;let s=e.parentNode;e=s!=i.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function np(i,e){let t=e.startContainer,n=e.startOffset,s=e.endContainer,r=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor);return xs(o.node,o.offset,s,r)&&([t,n,s,r]=[s,r,t,n]),{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}}function Pk(i,e){if(e.getComposedRanges){let s=e.getComposedRanges(i.root)[0];if(s)return np(i,s)}let t=null;function n(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",n,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",n,!0),t?np(i,t):null}class Tk{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=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=n=>{let s=e.state.selection.main,{anchor:r,head:o}=s,a=this.toEditorPos(n.updateRangeStart),c=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let h={from:a,to:c,insert:Ae.of(n.text.split(`
30
- `))};if(h.from==this.from&&r<this.from?h.from=r:h.to==this.to&&r>this.to&&(h.to=r),h.from==h.to&&!h.insert.length){let u=j.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));u.main.eq(s)||e.dispatch({selection:u,userEvent:"select"});return}if((oe.mac||oe.android)&&h.from==o-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:c,insert:Ae.of([n.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let u=this.to-this.from+(h.to-h.from+h.insert.length);Aa(e,h,j.single(this.toEditorPos(n.selectionStart,u),this.toEditorPos(n.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=n=>{let s=[],r=null;for(let o=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);o<a;o++){let c=e.coordsForChar(o);r=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||r||new DOMRect,s.push(r)}t.updateCharacterBounds(n.rangeStart,s)},this.handlers.textformatupdate=n=>{let s=[];for(let r of n.getTextFormats()){let o=r.underlineStyle,a=r.underlineThickness;if(o!="None"&&a!="None"){let c=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(c<h){let u=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;s.push(de.mark({attributes:{style:u}}).range(c,h))}}}e.dispatch({effects:pd.of(de.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let s=ks(n.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,a,c,h)=>{if(n)return;let u=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=u,this.to+=u;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+h.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=u}t+=u}),s&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(n=>!n.isUserEvent("input.type")&&n.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(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)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}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,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,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,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class se{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:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(s=>s.forEach(r=>n(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||uw(e.parent)||document,this.viewState=new Hd(e.state||Se.create(e)),e.scrollTo&&e.scrollTo.is(vr)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ps).map(s=>new _a(s));for(let s of this.plugins)s.update(this);this.observer=new Qk(this),this.inputState=new Gw(this),this.inputState.ensureHandlers(this.plugins),this.docView=new yd(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 Je?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,n=!1,s,r=this.state;for(let d of e){if(d.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=d.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,a=0,c=null;e.some(d=>d.annotation(Fd))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=jd(r,o),c||(a=1));let h=this.observer.delayedAndroidKey,u=null;if(h?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(u=null)):this.observer.clear(),r.facet(Se.phrases)!=this.state.facet(Se.phrases))return this.setState(r);s=Zr.create(this,r,e),s.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:m}=d.state.selection;f=new In(m.empty?m:j.cursor(m.head,m.head>m.anchor?-1:1))}for(let m of d.effects)m.is(vr)&&(f=m.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Hr.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(Es)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Gr)!=s.state.facet(Gr)&&(this.viewState.mustMeasureContent=!0),(t||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let d of this.state.facet(ma))try{d(s)}catch(m){Pt(this.state,m,"update listener")}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Td(this,u)&&h.force&&Dn(this.contentDOM,h.key,h.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 n of this.plugins)n.destroy(this);this.viewState=new Hd(e),this.plugins=e.facet(Ps).map(n=>new _a(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new yd(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(Ps),n=e.state.facet(Ps);if(t!=n){let s=[];for(let r of n){let o=t.indexOf(r);if(o<0)s.push(new _a(r));else{let a=this.plugins[o];a.mustUpdate=e,s.push(a)}}for(let r of this.plugins)r.mustUpdate!=e&&r.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!=n&&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(n){Pt(this.state,n,"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,n=this.scrollDOM,s=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(Bf(n))r=-1,o=this.viewState.heightMap.height;else{let m=this.viewState.scrollAnchorAt(s);r=m.from,o=m.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let u=h.map(m=>{try{return m.read(this)}catch(b){return Pt(this.state,b),sp}}),f=Zr.create(this,this.state,[]),d=!1;f.flags|=c,t?t.flags|=c:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let m=0;m<h.length;m++)if(u[m]!=sp)try{let b=h[m];b.write&&b.write(u[m],this)}catch(b){Pt(this.state,b)}if(d&&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,o=-1;continue}else{let b=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(b>1||b<-1){s=s+b,n.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(ma))a(t)}get themeClasses(){return Na+" "+(this.state.facet($a)?ep:Jd)+" "+this.state.facet(Gr)}updateAttrs(){let e=rp(this,md,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ni)?"true":"false",class:"cm-content",style:`${oe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),rp(this,ba,t);let n=this.observer.ignore(()=>{let s=ca(this.contentDOM,this.contentAttrs,t),r=ca(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let s of n.effects)if(s.is(se.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Es);let e=this.state.facet(se.cspNonce);Xi.mount(this.root,this.styleModules.concat(Ck).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(n=>n.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,n){return Ca(this,e,Qd(this,e,t,n))}moveByGroup(e,t){return Ca(this,e,Qd(this,e,t,n=>Iw(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=n[t?n.length-1:0];return j.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,n=!0){return Zw(this,e,t,n)}moveVertically(e,t,n){return Ca(this,e,Uw(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Cd(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[Gi.find(r,e-s.from,-1,t)];return Ss(n,o.dir==Ie.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(ud)||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>Ek)return nd(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||id(r.isolates,n=_d(this,e))))return r.order;n||(n=_d(this,e));let s=Sw(e.text,t,n);return this.bidiCache.push(new Hr(e.from,e.to,t,n,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||oe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Vf(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 vr.of(new In(typeof e=="number"?j.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return vr.of(new In(j.cursor(n.from),"start","start",n.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 He.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return He.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Xi.newName(),s=[Gr.of(n),Es.of(Ra(`.${n}`,e))];return t&&t.dark&&s.push($a.of(!0)),s}static baseTheme(e){return qi.lowest(Es.of(Ra("."+Na,e,tp)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),s=n&&Be.get(n)||Be.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}se.styleModule=Es,se.inputHandler=cd,se.clipboardInputFilter=ga,se.clipboardOutputFilter=Oa,se.scrollHandler=dd,se.focusChangeEffect=hd,se.perLineTextDirection=ud,se.exceptionSink=ad,se.updateListener=ma,se.editable=Ni,se.mouseSelectionStyle=ld,se.dragMovesSelection=od,se.clickAddsSelectionRange=rd,se.decorations=Ts,se.outerDecorations=gd,se.atomicRanges=ya,se.bidiIsolatedRanges=Od,se.scrollMargins=bd,se.darkTheme=$a,se.cspNonce=ae.define({combine:i=>i.length?i[0]:""}),se.contentAttributes=ba,se.editorAttributes=md,se.lineWrapping=se.contentAttributes.of({class:"cm-lineWrapping"}),se.announce=we.define();const Ek=4096,sp={};class Hr{constructor(e,t,n,s,r,o){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:Ie.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let o=e[r];o.dir==s&&!t.touchesRange(o.from,o.to)&&n.push(new Hr(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function rp(i,e,t){for(let n=i.state.facet(e),s=n.length-1;s>=0;s--){let r=n[s],o=typeof r=="function"?r(i):r;o&&aa(o,t)}return t}const $k=oe.mac?"mac":oe.windows?"win":oe.linux?"linux":"key";function Nk(i,e){const t=i.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let s,r,o,a;for(let c=0;c<t.length-1;++c){const h=t[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))s=!0;else if(/^(c|ctrl|control)$/i.test(h))r=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?a=!0:r=!0;else throw new Error("Unrecognized modifier name: "+h)}return s&&(n="Alt-"+n),r&&(n="Ctrl-"+n),a&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function Kr(i,e,t){return e.altKey&&(i="Alt-"+i),e.ctrlKey&&(i="Ctrl-"+i),e.metaKey&&(i="Meta-"+i),t!==!1&&e.shiftKey&&(i="Shift-"+i),i}const Rk=qi.default(se.domEventHandlers({keydown(i,e){return ap(lp(e.state),i,e,"editor")}})),Rs=ae.define({enables:Rk}),op=new WeakMap;function lp(i){let e=i.facet(Rs),t=op.get(e);return t||op.set(e,t=Mk(e.reduce((n,s)=>n.concat(s),[]))),t}function Vk(i,e,t){return ap(lp(i.state),e,i,t)}let Hi=null;const Lk=4e3;function Mk(i,e=$k){let t=Object.create(null),n=Object.create(null),s=(o,a)=>{let c=n[o];if(c==null)n[o]=a;else if(c!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,a,c,h,u)=>{var f,d;let m=t[o]||(t[o]=Object.create(null)),b=a.split(/ (?!$)/).map(p=>Nk(p,e));for(let p=1;p<b.length;p++){let O=b.slice(0,p).join(" ");s(O,!0),m[O]||(m[O]={preventDefault:!0,stopPropagation:!1,run:[S=>{let y=Hi={view:S,prefix:O,scope:o};return setTimeout(()=>{Hi==y&&(Hi=null)},Lk),!0}]})}let w=b.join(" ");s(w,!1);let g=m[w]||(m[w]={preventDefault:!1,stopPropagation:!1,run:((d=(f=m._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});c&&g.run.push(c),h&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let o of i){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of a){let u=t[h]||(t[h]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(m=>f(m,La))}let c=o[e]||o.key;if(c)for(let h of a)r(h,c,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+c,o.shift,o.preventDefault,o.stopPropagation)}return t}let La=null;function ap(i,e,t,n){La=e;let s=ow(e),r=At(s,0),o=hi(r)==s.length&&s!=" ",a="",c=!1,h=!1,u=!1;Hi&&Hi.view==t&&Hi.scope==n&&(a=Hi.prefix+" ",Nd.indexOf(e.keyCode)<0&&(h=!0,Hi=null));let f=new Set,d=g=>{if(g){for(let p of g.run)if(!f.has(p)&&(f.add(p),p(t)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),h=!0)}return!1},m=i[n],b,w;return m&&(d(m[a+Kr(s,e,!o)])?c=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(oe.windows&&e.ctrlKey&&e.altKey)&&(b=Wi[e.keyCode])&&b!=s?(d(m[a+Kr(b,e,!0)])||e.shiftKey&&(w=ws[e.keyCode])!=s&&w!=b&&d(m[a+Kr(w,e,!1)]))&&(c=!0):o&&e.shiftKey&&d(m[a+Kr(s,e,!0)])&&(c=!0),!c&&d(m._any)&&(c=!0)),h&&(c=!0),c&&u&&e.stopPropagation(),La=null,c}class Vs{constructor(e,t,n,s,r){this.className=e,this.left=t,this.top=n,this.width=s,this.height=r}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,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let r=cp(e);return[new Vs(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Bk(e,t,n)}}function cp(i){let e=i.scrollDOM.getBoundingClientRect();return{left:(i.textDirection==Ie.LTR?e.left:e.right-i.scrollDOM.clientWidth*i.scaleX)-i.scrollDOM.scrollLeft*i.scaleX,top:e.top-i.scrollDOM.scrollTop*i.scaleY}}function hp(i,e,t,n){let s=i.coordsAtPos(e,t*2);if(!s)return n;let r=i.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,a=i.posAtCoords({x:r.left+1,y:o}),c=i.posAtCoords({x:r.right-1,y:o});return a==null||c==null?n:{from:Math.max(n.from,Math.min(a,c)),to:Math.min(n.to,Math.max(a,c))}}function Bk(i,e,t){if(t.to<=i.viewport.from||t.from>=i.viewport.to)return[];let n=Math.max(t.from,i.viewport.from),s=Math.min(t.to,i.viewport.to),r=i.textDirection==Ie.LTR,o=i.contentDOM,a=o.getBoundingClientRect(),c=cp(i),h=o.querySelector(".cm-line"),u=h&&window.getComputedStyle(h),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),m=Sa(i,n),b=Sa(i,s),w=m.type==kt.Text?m:null,g=b.type==kt.Text?b:null;if(w&&(i.lineWrapping||m.widgetLineBreaks)&&(w=hp(i,n,1,w)),g&&(i.lineWrapping||b.widgetLineBreaks)&&(g=hp(i,s,-1,g)),w&&g&&w.from==g.from&&w.to==g.to)return O(S(t.from,t.to,w));{let Q=w?S(t.from,null,w):y(m,!1),k=g?S(null,t.to,g):y(b,!0),C=[];return(w||m).to<(g||b).from-(w&&g?1:0)||m.widgetLineBreaks>1&&Q.bottom+i.defaultLineHeight/2<k.top?C.push(p(f,Q.bottom,d,k.top)):Q.bottom<k.top&&i.elementAtHeight((Q.bottom+k.top)/2).type==kt.Text&&(Q.bottom=k.top=(Q.bottom+k.top)/2),O(Q).concat(C).concat(O(k))}function p(Q,k,C,T){return new Vs(e,Q-c.left,k-c.top,C-Q,T-k)}function O({top:Q,bottom:k,horizontal:C}){let T=[];for(let N=0;N<C.length;N+=2)T.push(p(C[N],Q,C[N+1],k));return T}function S(Q,k,C){let T=1e9,N=-1e9,_=[];function A(E,I,B,U,Z){let K=i.coordsAtPos(E,E==C.to?-2:2),W=i.coordsAtPos(B,B==C.from?2:-2);!K||!W||(T=Math.min(K.top,W.top,T),N=Math.max(K.bottom,W.bottom,N),Z==Ie.LTR?_.push(r&&I?f:K.left,r&&U?d:W.right):_.push(!r&&U?f:W.left,!r&&I?d:K.right))}let x=Q??C.from,M=k??C.to;for(let E of i.visibleRanges)if(E.to>x&&E.from<M)for(let I=Math.max(E.from,x),B=Math.min(E.to,M);;){let U=i.state.doc.lineAt(I);for(let Z of i.bidiSpans(U)){let K=Z.from+U.from,W=Z.to+U.from;if(K>=B)break;W>I&&A(Math.max(K,I),Q==null&&K<=x,Math.min(W,B),k==null&&W>=M,Z.dir)}if(I=U.to+1,I>=B)break}return _.length==0&&A(x,Q==null,M,k==null,i.textDirection),{top:T,bottom:N,horizontal:_}}function y(Q,k){let C=a.top+(k?Q.top:Q.bottom);return{top:C,bottom:C,horizontal:[]}}}function Dk(i,e){return i.constructor==e.constructor&&i.eq(e)}class vk{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(Jr)!=e.state.facet(Jr)&&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,n=e.facet(Jr);for(;t<n.length&&n[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,n)=>!Dk(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Jr=ae.define();function up(i){return[He.define(e=>new vk(e,i)),Jr.of(i)]}const fp=!(oe.ios&&oe.webkit&&oe.webkit_version<534),Ls=ae.define({combine(i){return fi(i,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Zk(i={}){return[Ls.of(i),Ik,Uk,Fk,fd.of(!0)]}function dp(i){return i.startState.facet(Ls)!=i.state.facet(Ls)}const Ik=up({above:!0,markers(i){let{state:e}=i,t=e.facet(Ls),n=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||fp:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=s.empty?s:j.cursor(s.head,s.head>s.anchor?-1:1);for(let c of Vs.forRange(i,o,a))n.push(c)}}return n},update(i,e){i.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=dp(i);return t&&pp(i.state,e),i.docChanged||i.selectionSet||t},mount(i,e){pp(e.state,i)},class:"cm-cursorLayer"});function pp(i,e){e.style.animationDuration=i.facet(Ls).cursorBlinkRate+"ms"}const Uk=up({above:!1,markers(i){return i.state.selection.ranges.map(e=>e.empty?[]:Vs.forRange(i,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(i,e){return i.docChanged||i.selectionSet||i.viewportChanged||dp(i)},class:"cm-selectionLayer"}),Ma={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};fp&&(Ma[".cm-line"].caretColor=Ma[".cm-content"].caretColor="transparent !important");const Fk=qi.highest(se.theme(Ma)),mp=we.define({map(i,e){return i==null?null:e.mapPos(i)}}),Ms=ot.define({create(){return null},update(i,e){return i!=null&&(i=e.changes.mapPos(i)),e.effects.reduce((t,n)=>n.is(mp)?n.value:t,i)}}),jk=He.fromClass(class{constructor(i){this.view=i,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(i){var e;let t=i.state.field(Ms);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"),(i.startState.field(Ms)!=t||i.docChanged||i.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:i}=this,e=i.state.field(Ms),t=e!=null&&i.coordsAtPos(e);if(!t)return null;let n=i.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+i.scrollDOM.scrollLeft*i.scaleX,top:t.top-n.top+i.scrollDOM.scrollTop*i.scaleY,height:t.bottom-t.top}}drawCursor(i){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;i?(this.cursor.style.left=i.left/e+"px",this.cursor.style.top=i.top/t+"px",this.cursor.style.height=i.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(i){this.view.state.field(Ms)!=i&&this.view.dispatch({effects:mp.of(i)})}},{eventObservers:{dragover(i){this.setDropPos(this.view.posAtCoords({x:i.clientX,y:i.clientY}))},dragleave(i){(i.target==this.view.contentDOM||!this.view.contentDOM.contains(i.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function qk(){return[Ms,jk]}function gp(i,e,t,n,s){e.lastIndex=0;for(let r=i.iterRange(t,n),o=t,a;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;a=e.exec(r.value);)s(o+a.index,a)}function Xk(i,e){let t=i.visibleRanges;if(t.length==1&&t[0].from==i.viewport.from&&t[0].to==i.viewport.to)return t;let n=[];for(let{from:s,to:r}of t)s=Math.max(i.state.doc.lineAt(s).from,s-e),r=Math.min(i.state.doc.lineAt(r).to,r+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}class Wk{constructor(e){const{regexp:t,decoration:n,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(a,c,h,u)=>s(u,h,h+a[0].length,a,c);else if(typeof n=="function")this.addMatch=(a,c,h,u)=>{let f=n(a,c,h);f&&u(h,h+a[0].length,f)};else if(n)this.addMatch=(a,c,h,u)=>u(h,h+a[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Ti,n=t.add.bind(t);for(let{from:s,to:r}of Xk(e,this.maxLength))gp(e.state.doc,this.regexp,s,r,(o,a)=>this.addMatch(a,e,o,n));return t.finish()}updateDeco(e,t){let n=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),s=Math.max(c,s))}),e.viewportMoved||s-n>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),n,s):t}updateRange(e,t,n,s){for(let r of e.visibleRanges){let o=Math.max(r.from,n),a=Math.min(r.to,s);if(a>o){let c=e.state.doc.lineAt(o),h=c.to<a?e.state.doc.lineAt(a):c,u=Math.max(r.from,c.from),f=Math.min(r.to,h.to);if(this.boundary){for(;o>c.from;o--)if(this.boundary.test(c.text[o-1-c.from])){u=o;break}for(;a<h.to;a++)if(this.boundary.test(h.text[a-h.from])){f=a;break}}let d=[],m,b=(w,g,p)=>d.push(p.range(w,g));if(c==h)for(this.regexp.lastIndex=u-c.from;(m=this.regexp.exec(c.text))&&m.index<f-c.from;)this.addMatch(m,e,m.index+c.from,b);else gp(e.state.doc,this.regexp,u,f,(w,g)=>this.addMatch(g,e,w,b));t=t.update({filterFrom:u,filterTo:f,filter:(w,g)=>w<u||g>f,add:d})}}return t}}const Ba=/x/.unicode!=null?"gu":"g",Yk=new RegExp(`[\0-\b
31
- --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Ba),zk={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 Da=null;function Gk(){var i;if(Da==null&&typeof document<"u"&&document.body){let e=document.body.style;Da=((i=e.tabSize)!==null&&i!==void 0?i:e.MozTabSize)!=null}return Da||!1}const eo=ae.define({combine(i){let e=fi(i,{render:null,specialChars:Yk,addSpecialChars:null});return(e.replaceTabs=!Gk())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Ba)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ba)),e}});function Hk(i={}){return[eo.of(i),Kk()]}let Op=null;function Kk(){return Op||(Op=He.fromClass(class{constructor(i){this.view=i,this.decorations=de.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(i.state.facet(eo)),this.decorations=this.decorator.createDeco(i)}makeDecorator(i){return new Wk({regexp:i.specialChars,decoration:(e,t,n)=>{let{doc:s}=t.state,r=At(e[0],0);if(r==9){let o=s.lineAt(n),a=t.state.tabSize,c=Ln(o.text,a,n-o.from);return de.replace({widget:new ix((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=de.replace({widget:new tx(i,r)}))},boundary:i.replaceTabs?void 0:/[^]/})}update(i){let e=i.state.facet(eo);i.startState.facet(eo)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(i.view)):this.decorations=this.decorator.updateDeco(i,this.decorations)}},{decorations:i=>i.decorations}))}const Jk="•";function ex(i){return i>=32?Jk:i==10?"␤":String.fromCharCode(9216+i)}class tx extends pi{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=ex(this.code),n=e.state.phrase("Control character")+" "+(zk[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,n,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=n,r.setAttribute("aria-label",n),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class ix extends pi{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 nx(){return rx}const sx=de.line({class:"cm-activeLine"}),rx=He.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.docChanged||i.selectionSet)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=-1,t=[];for(let n of i.state.selection.ranges){let s=i.lineBlockAt(n.head);s.from>e&&(t.push(sx.range(s.from)),e=s.from)}return de.set(t)}},{decorations:i=>i.decorations});class ox extends pi{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Mn(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),s=Ss(t[0],n.direction!="rtl"),r=parseInt(n.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function lx(i){return He.fromClass(class{constructor(e){this.view=e,this.placeholder=i?de.set([de.widget({widget:new ox(i),side:1}).range(0)]):de.none}get decorations(){return this.view.state.doc.length?de.none:this.placeholder}},{decorations:e=>e.decorations})}const va=2e3;function ax(i,e,t){let n=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>va||t.off>va||e.col<0||t.col<0){let o=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let c=n;c<=s;c++){let h=i.doc.line(c);h.length<=a&&r.push(j.range(h.from+o,h.to+a))}}else{let o=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let c=n;c<=s;c++){let h=i.doc.line(c),u=Kl(h.text,o,i.tabSize,!0);if(u<0)r.push(j.cursor(h.to));else{let f=Kl(h.text,a,i.tabSize);r.push(j.range(h.from+u,h.from+f))}}}return r}function cx(i,e){let t=i.coordsAtPos(i.viewport.from);return t?Math.round(Math.abs((t.left-e)/i.defaultCharacterWidth)):-1}function _p(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1),n=i.state.doc.lineAt(t),s=t-n.from,r=s>va?-1:s==n.length?cx(i,e.clientX):Ln(n.text,i.state.tabSize,t-n.from);return{line:n.number,col:r,off:s}}function hx(i,e){let t=_p(i,e),n=i.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},n=n.map(s.changes)}},get(s,r,o){let a=_p(i,s);if(!a)return n;let c=ax(i.state,t,a);return c.length?o?j.create(c.concat(n.ranges)):j.create(c):n}}:null}function ux(i){let e=(i==null?void 0:i.eventFilter)||(t=>t.altKey&&t.button==0);return se.mouseSelectionStyle.of((t,n)=>e(n)?hx(t,n):null)}const fx={Alt:[18,i=>!!i.altKey],Control:[17,i=>!!i.ctrlKey],Shift:[16,i=>!!i.shiftKey],Meta:[91,i=>!!i.metaKey]},dx={style:"cursor: crosshair"};function px(i={}){let[e,t]=fx[i.key||"Alt"],n=He.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[n,se.contentAttributes.of(s=>{var r;return!((r=s.plugin(n))===null||r===void 0)&&r.isDown?dx:null})]}const Bs="-10000px";class bp{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=n(o,r))}update(e,t){var n;let s=e.state.facet(this.facet),r=s.filter(c=>c);if(s===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let o=[],a=t?[]:null;for(let c=0;c<r.length;c++){let h=r[c],u=-1;if(h){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==h.create&&(u=f)}if(u<0)o[c]=this.createTooltipView(h,c?o[c-1]:null),a&&(a[c]=!!h.above);else{let f=o[c]=this.tooltipViews[u];a&&(a[c]=t[u]),f.update&&f.update(e)}}}for(let c of this.tooltipViews)o.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(a.forEach((c,h)=>t[h]=c),t.length=a.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function mx(i){let{win:e}=i;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Za=ae.define({combine:i=>{var e,t,n;return{position:oe.ios?"absolute":((e=i.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=i.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=i.find(s=>s.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||mx}}}),yp=new WeakMap,Ia=He.fromClass(class{constructor(i){this.view=i,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=i.state.facet(Za);this.position=e.position,this.parent=e.parent,this.classes=i.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 bp(i,Ua,(t,n)=>this.createTooltip(t,n),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(),i.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 i of this.manager.tooltipViews)this.intersectionObserver.observe(i.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(i){i.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(i,this.above);e&&this.observeIntersection();let t=e||i.geometryChanged,n=i.state.facet(Za);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(i,e){let t=i.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),i.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Bs,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var i,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(i=n.destroy)===null||i===void 0||i.call(n);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 i=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(oe.gecko)t=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==Bs&&r.style.left=="0px"){let o=r.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(t||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(i=r.width/this.parent.offsetWidth,e=r.height/this.parent.offsetHeight)}else({scaleX:i,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=wa(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Za).tooltipSpace(this.view),scaleX:i,scaleY:e,makeAbsolute:t}}writeMeasure(i){var e;if(i.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:n,scaleX:s,scaleY:r}=i,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:u}=h,f=i.pos[a],d=i.size[a];if(!f||c.clip!==!1&&(f.bottom<=Math.max(t.top,n.top)||f.top>=Math.min(t.bottom,n.bottom)||f.right<Math.max(t.left,n.left)-.1||f.left>Math.min(t.right,n.right)+.1)){u.style.top=Bs;continue}let m=c.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,b=m?7:0,w=d.right-d.left,g=(e=yp.get(h))!==null&&e!==void 0?e:d.bottom-d.top,p=h.offset||Ox,O=this.view.textDirection==Ie.LTR,S=d.width>n.right-n.left?O?n.left:n.right-d.width:O?Math.max(n.left,Math.min(f.left-(m?14:0)+p.x,n.right-w)):Math.min(Math.max(n.left,f.left-w+(m?14:0)-p.x),n.right-w),y=this.above[a];!c.strictSide&&(y?f.top-g-b-p.y<n.top:f.bottom+g+b+p.y>n.bottom)&&y==n.bottom-f.bottom>f.top-n.top&&(y=this.above[a]=!y);let Q=(y?f.top-n.top:n.bottom-f.bottom)-b;if(Q<g&&h.resize!==!1){if(Q<this.view.defaultLineHeight){u.style.top=Bs;continue}yp.set(h,g),u.style.height=(g=Q)/r+"px"}else u.style.height&&(u.style.height="");let k=y?f.top-g-b-p.y:f.bottom+b+p.y,C=S+w;if(h.overlap!==!0)for(let T of o)T.left<C&&T.right>S&&T.top<k+g&&T.bottom>k&&(k=y?T.top-g-2-b:T.bottom+b+2);if(this.position=="absolute"?(u.style.top=(k-i.parent.top)/r+"px",wp(u,(S-i.parent.left)/s)):(u.style.top=k/r+"px",wp(u,S/s)),m){let T=f.left+(O?p.x:-p.x)-(S+14-7);m.style.left=T/s+"px"}h.overlap!==!0&&o.push({left:S,top:k,right:C,bottom:k+g}),u.classList.toggle("cm-tooltip-above",y),u.classList.toggle("cm-tooltip-below",!y),h.positioned&&h.positioned(i.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 i of this.manager.tooltipViews)i.dom.style.top=Bs}},{eventObservers:{scroll(){this.maybeMeasure()}}});function wp(i,e){let t=parseInt(i.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(i.style.left=e+"px")}const gx=se.baseTheme({".cm-tooltip":{zIndex:500,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"}}}),Ox={x:0,y:0},Ua=ae.define({enables:[Ia,gx]}),to=ae.define({combine:i=>i.reduce((e,t)=>e.concat(t),[])});class io{static create(e){return new io(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new bp(e,to,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}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 n of this.manager.tooltipViews){let s=n[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)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 _x=Ua.compute([to],i=>{let e=i.facet(to);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:io.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class bx{constructor(e,t,n,s,r){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=r,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,n=e.docView.nearest(t.target);if(!n)return;let s,r=1;if(n instanceof Yi)s=n.posAtStart;else{if(s=e.posAtCoords(t),s==null)return;let a=e.coordsAtPos(s);if(!a||t.y<a.top||t.y>a.bottom||t.x<a.left-e.defaultCharacterWidth||t.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(s)).find(u=>u.from<=s&&u.to>=s),h=c&&c.dir==Ie.RTL?-1:1;r=t.x<a.left?-h:h}let o=this.source(e,s,r);if(o!=null&&o.then){let a=this.pending={pos:s};o.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>Pt(e.state,c,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Ia),t=e?e.manager.tooltips.findIndex(n=>n.create==io.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;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:s,tooltip:r}=this;if(s.length&&r&&!yx(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,a=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!wx(this.view,o,a,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:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.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 no=4;function yx(i,e){let{left:t,right:n,top:s,bottom:r}=i.getBoundingClientRect(),o;if(o=i.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();s=Math.min(a.top,s),r=Math.max(a.bottom,r)}return e.clientX>=t-no&&e.clientX<=n+no&&e.clientY>=s-no&&e.clientY<=r+no}function wx(i,e,t,n,s,r){let o=i.scrollDOM.getBoundingClientRect(),a=i.documentTop+i.documentPadding.top+i.contentHeight;if(o.left>n||o.right<n||o.top>s||Math.min(o.bottom,a)<s)return!1;let c=i.posAtCoords({x:n,y:s},!1);return c>=e&&c<=t}function kx(i,e={}){let t=we.define(),n=ot.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let a of s){let c=r.changes.mapPos(a.pos,-1,dt.TrackDel);if(c!=null){let h=Object.assign(Object.create(null),a);h.pos=c,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(xx)&&(s=[]);return s},provide:s=>to.from(s)});return{active:n,extension:[n,He.define(s=>new bx(s,i,n,t,e.hoverTime||300)),_x]}}function kp(i,e){let t=i.plugin(Ia);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const xx=we.define(),xp=ae.define({combine(i){let e,t;for(let n of i)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Ds(i,e){let t=i.plugin(Sp),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const Sp=He.fromClass(class{constructor(i){this.input=i.state.facet(vs),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(i));let e=i.state.facet(xp);this.top=new so(i,!0,e.topContainer),this.bottom=new so(i,!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(i){let e=i.state.facet(xp);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new so(i.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new so(i.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=i.state.facet(vs);if(t!=this.input){let n=t.filter(c=>c),s=[],r=[],o=[],a=[];for(let c of n){let h=this.specs.indexOf(c),u;h<0?(u=c(i.view),a.push(u)):(u=this.panels[h],u.update&&u.update(i)),s.push(u),(u.top?r:o).push(u)}this.specs=n,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let n of this.panels)n.update&&n.update(i)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:i=>se.scrollMargins.of(e=>{let t=e.plugin(i);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class so{constructor(e,t,n){this.view=e,this.top=t,this.container=n,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=Cp(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Cp(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 Cp(i){let e=i.nextSibling;return i.remove(),e}const vs=ae.define({enables:Sp});class Ri extends dn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Ri.prototype.elementClass="",Ri.prototype.toDOM=void 0,Ri.prototype.mapMode=dt.TrackBefore,Ri.prototype.startSide=Ri.prototype.endSide=-1,Ri.prototype.point=!0;const ro=ae.define(),Sx=ae.define(),Cx={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Te.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Zs=ae.define();function Ax(i){return[Ap(),Zs.of(Object.assign(Object.assign({},Cx),i))]}const Fa=ae.define({combine:i=>i.some(e=>e)});function Ap(i){let e=[Qx];return i&&i.fixed===!1&&e.push(Fa.of(!0)),e}const Qx=He.fromClass(class{constructor(i){this.view=i,this.prevViewport=i.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=i.state.facet(Zs).map(e=>new Pp(i,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!i.state.facet(Fa),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),i.scrollDOM.insertBefore(this.dom,i.contentDOM)}update(i){if(this.updateGutters(i)){let e=this.prevViewport,t=i.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}i.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Fa)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=i.view.viewport}syncGutters(i){let e=this.dom.nextSibling;i&&this.dom.remove();let t=Te.iter(this.view.state.facet(ro),this.view.viewport.from),n=[],s=this.gutters.map(r=>new Px(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(r.type)){let o=!0;for(let a of r.type)if(a.type==kt.Text&&o){ja(t,n,a.from);for(let c of s)c.line(this.view,a,n);o=!1}else if(a.widget)for(let c of s)c.widget(this.view,a)}else if(r.type==kt.Text){ja(t,n,r.from);for(let o of s)o.line(this.view,r,n)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();i&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(i){let e=i.startState.facet(Zs),t=i.state.facet(Zs),n=i.docChanged||i.heightChanged||i.viewportChanged||!Te.eq(i.startState.facet(ro),i.state.facet(ro),i.view.viewport.from,i.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(i)&&(n=!0);else{n=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new Pp(this.view,r)):(this.gutters[o].update(i),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return n}destroy(){for(let i of this.gutters)i.destroy();this.dom.remove()}},{provide:i=>se.scrollMargins.of(e=>{let t=e.plugin(i);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Ie.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function Qp(i){return Array.isArray(i)?i:[i]}function ja(i,e,t){for(;i.value&&i.from<=t;)i.from==t&&e.push(i.value),i.next()}class Px{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Te.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let a=new Tp(e,o,r,n);s.elements.push(a),s.dom.appendChild(a.dom)}else s.elements[this.i].update(e,o,r,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];ja(this.cursor,s,t.from),n.length&&(s=s.concat(n));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),s=n?[n]:null;for(let r of e.state.facet(Sx)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Pp{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 n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let c=r.getBoundingClientRect();o=(c.top+c.bottom)/2}else o=s.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,s)&&s.preventDefault()});this.markers=Qp(t.markers(e)),t.initialSpacer&&(this.spacer=new Tp(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=Qp(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let n=e.view.viewport;return!Te.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Tp{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),Tx(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let n="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let a=o,c=r<t.length?t[r++]:null,h=!1;if(c){let u=c.elementClass;u&&(n+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(c)){a=f,h=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(s);let f=s.nextSibling;s.remove(),s=f}}if(!c)break;c.toDOM&&(h?s=s.nextSibling:this.dom.insertBefore(c.toDOM(e),s)),h&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function Tx(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(!i[t].compare(e[t]))return!1;return!0}const Ex=ae.define(),$x=ae.define(),Fn=ae.define({combine(i){return fi(i,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let s in t){let r=n[s],o=t[s];n[s]=r?(a,c,h)=>r(a,c,h)||o(a,c,h):o}return n}})}});class qa extends Ri{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Xa(i,e){return i.state.facet(Fn).formatNumber(e,i.state)}const Nx=Zs.compute([Fn],i=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Ex)},lineMarker(e,t,n){return n.some(s=>s.toDOM)?null:new qa(Xa(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let s of e.state.facet($x)){let r=s(e,t,n);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Fn)!=e.state.facet(Fn),initialSpacer(e){return new qa(Xa(e,Ep(e.state.doc.lines)))},updateSpacer(e,t){let n=Xa(t.view,Ep(t.view.state.doc.lines));return n==e.number?e:new qa(n)},domEventHandlers:i.facet(Fn).domEventHandlers}));function Rx(i={}){return[Fn.of(i),Ap(),Nx]}function Ep(i){let e=9;for(;e<i;)e=e*10+9;return e}const Vx=new class extends Ri{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Lx=ro.compute(["selection"],i=>{let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head).from;s>t&&(t=s,e.push(Vx.range(s)))}return Te.of(e)});function Mx(){return Lx}const $p=1024;let Bx=0;class Wa{constructor(e,t){this.from=e,this.to=t}}class xe{constructor(e={}){this.id=Bx++,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=Tt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}xe.closedBy=new xe({deserialize:i=>i.split(" ")}),xe.openedBy=new xe({deserialize:i=>i.split(" ")}),xe.group=new xe({deserialize:i=>i.split(" ")}),xe.isolate=new xe({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}}),xe.contextHash=new xe({perNode:!0}),xe.lookAhead=new xe({perNode:!0}),xe.mounted=new xe({perNode:!0});class oo{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[xe.mounted.id]}}const Dx=Object.create(null);class Tt{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):Dx,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Tt(e.name||"",t,e.id,n);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[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(xe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return n=>{for(let s=n.prop(xe.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?n.name:s[r]];if(o)return o}}}}Tt.none=new Tt("",Object.create(null),0,8);class Ya{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 n of this.types){let s=null;for(let r of e){let o=r(n);o&&(s||(s=Object.assign({},n.props)),s[o[0].id]=o[1])}t.push(s?new Tt(n.name,s,n.id,n.flags):n)}return new Ya(t)}}const lo=new WeakMap,Np=new WeakMap;var st;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays"})(st||(st={}));class tt{constructor(e,t,n,s,r){if(this.type=e,this.children=t,this.positions=n,this.length=s,this.props=null,r&&r.length){this.props=Object.create(null);for(let[o,a]of r)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=oo.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let s=n.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 Ha(this.topNode,e)}cursorAt(e,t=0,n=0){let s=lo.get(this)||this.topNode,r=new Ha(s);return r.moveTo(e,t),lo.set(this,r._tree),r}get topNode(){return new Et(this,0,0,null)}resolve(e,t=0){let n=Is(lo.get(this)||this.topNode,e,t,!1);return lo.set(this,n),n}resolveInner(e,t=0){let n=Is(Np.get(this)||this.topNode,e,t,!0);return Np.set(this,n),n}resolveStack(e,t=0){return Ix(this,e,t)}iterate(e){let{enter:t,leave:n,from:s=0,to:r=this.length}=e,o=e.mode||0,a=(o&st.IncludeAnonymous)>0;for(let c=this.cursor(o|st.IncludeAnonymous);;){let h=!1;if(c.from<=r&&c.to>=s&&(!a&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&n&&(a||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;h=!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:Ja(Tt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,s)=>new tt(this.type,t,n,s,this.propValues),e.makeTree||((t,n,s)=>new tt(Tt.none,t,n,s)))}static build(e){return Ux(e)}}tt.empty=new tt(Tt.none,[],[],0);class za{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 za(this.buffer,this.index)}}class Ki{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Tt.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],n=this.buffer[e+3],s=this.set.types[t],r=s.name;if(/\W/.test(r)&&!s.isError&&(r=JSON.stringify(r)),e+=4,n==e)return r;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return r+"("+o.join(",")+")"}findChild(e,t,n,s,r){let{buffer:o}=this,a=-1;for(let c=e;c!=t&&!(Rp(r,s,o[c+1],o[c+2])&&(a=c,n>0));c=o[c+3]);return a}slice(e,t,n){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let a=e,c=0;a<t;){r[c++]=s[a++],r[c++]=s[a++]-n;let h=r[c++]=s[a++]-n;r[c++]=s[a++]-e,o=Math.max(o,h)}return new Ki(r,o,this.set)}}function Rp(i,e,t,n){switch(i){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function Is(i,e,t,n){for(var s;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to<e);){let o=!n&&i instanceof Et&&i.index<0?null:i.parent;if(!o)return i;i=o}let r=n?0:st.IgnoreOverlays;if(n)for(let o=i,a=o.parent;a;o=a,a=o.parent)o instanceof Et&&o.index<0&&((s=a.enter(e,t,r))===null||s===void 0?void 0:s.from)!=o.from&&(i=a);for(;;){let o=i.enter(e,t,r);if(!o)return i;i=o}}class Vp{cursor(e=0){return new Ha(this,e)}getChild(e,t=null,n=null){let s=Lp(this,e,t,n);return s.length?s[0]:null}getChildren(e,t=null,n=null){return Lp(this,e,t,n)}resolve(e,t=0){return Is(this,e,t,!1)}resolveInner(e,t=0){return Is(this,e,t,!0)}matchContext(e){return Ga(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let s=t.lastChild;if(!s||s.to!=t.to)break;s.type.isError&&s.from==s.to?(n=t,t=s.prevSibling):t=s}return n}get node(){return this}get next(){return this.parent}}class Et extends Vp{constructor(e,t,n,s){super(),this._tree=e,this.from=t,this.index=n,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,n,s,r=0){for(let o=this;;){for(let{children:a,positions:c}=o._tree,h=t>0?a.length:-1;e!=h;e+=t){let u=a[e],f=c[e]+o.from;if(Rp(s,n,f,f+u.length)){if(u instanceof Ki){if(r&st.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,t,n-f,s);if(d>-1)return new Oi(new vx(o,u,e,f),null,d)}else if(r&st.IncludeAnonymous||!u.type.isAnonymous||Ka(u)){let d;if(!(r&st.IgnoreMounts)&&(d=oo.get(u))&&!d.overlay)return new Et(d.tree,f,e,o);let m=new Et(u,f,e,o);return r&st.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(t<0?u.children.length-1:0,t,n,s)}}}if(r&st.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))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,n=0){let s;if(!(n&st.IgnoreOverlays)&&(s=oo.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:a}of s.overlay)if((t>0?o<=r:o<r)&&(t<0?a>=r:a>r))return new Et(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}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 Lp(i,e,t,n){let s=i.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(n!=null&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return n==null?r:[]}}function Ga(i,e,t=e.length-1){for(let n=i;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class vx{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class Oi extends Vp{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,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return r<0?null:new Oi(this.context,this,r)}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,n=0){if(n&st.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new Oi(this.context,this,r)}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 Oi(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 Oi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,s=this.index+4,r=n.buffer[this.index+3];if(r>s){let o=n.buffer[this.index+1];e.push(n.slice(s,r,o)),t.push(0)}return new tt(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Mp(i){if(!i.length)return null;let e=0,t=i[0];for(let r=1;r<i.length;r++){let o=i[r];(o.from>t.from||o.to<t.to)&&(t=o,e=r)}let n=t instanceof Et&&t.index<0?null:t.parent,s=i.slice();return n?s[e]=n:s.splice(e,1),new Zx(s,t)}class Zx{constructor(e,t){this.heads=e,this.node=t}get next(){return Mp(this.heads)}}function Ix(i,e,t){let n=i.resolveInner(e,t),s=null;for(let r=n instanceof Et?n:n.context.parent;r;r=r.parent)if(r.index<0){let o=r.parent;(s||(s=[n])).push(o.resolve(e,t)),r=o}else{let o=oo.get(r.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Et(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[n])).push(Is(a,e,t,!1))}}return s?Mp(s):n}class Ha{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 Et)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.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:n,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=n+s.buffer[e+1],this.to=n+s.buffer[e+2],!0}yield(e){return e?e instanceof Et?(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,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}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,n=this.mode){return this.buffer?n&st.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&st.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&st.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,n=this.stack.length-1;if(e<0){let s=n<0?0:this.stack[n]+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<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<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,n,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let r=0;r<this.index;r++)if(s.buffer.buffer[r+3]<this.index)return!1;({index:t,parent:n}=s)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let a=n._tree.children[r];if(this.mode&st.IncludeAnonymous||a instanceof Ki||!a.type.isAnonymous||Ka(a))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,n=0;if(e&&e.context==this.buffer)e:for(let s=this.index,r=this.stack.length;r>=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,n=r+1;break e}s=this.stack[--r]}for(let s=n;s<this.stack.length;s++)t=new Oi(this.buffer,t,this.stack[s]);return this.bufferNode=new Oi(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&t&&t(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(e){if(!this.buffer)return Ga(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let s=e.length-1,r=this.stack.length-1;s>=0;r--){if(r<0)return Ga(this._tree,e,s);let o=n[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function Ka(i){return i.children.some(e=>e instanceof Ki||!e.type.isAnonymous||Ka(e))}function Ux(i){var e;let{buffer:t,nodeSet:n,maxBufferLength:s=$p,reused:r=[],minRepeatType:o=n.types.length}=i,a=Array.isArray(t)?new za(t,t.length):t,c=n.types,h=0,u=0;function f(Q,k,C,T,N,_){let{id:A,start:x,end:M,size:E}=a,I=u,B=h;for(;E<0;)if(a.next(),E==-1){let J=r[A];C.push(J),T.push(x-Q);return}else if(E==-3){h=A;return}else if(E==-4){u=A;return}else throw new RangeError(`Unrecognized record size: ${E}`);let U=c[A],Z,K,W=x-Q;if(M-x<=s&&(K=g(a.pos-k,N))){let J=new Uint16Array(K.size-K.skip),fe=a.pos-K.size,ce=J.length;for(;a.pos>fe;)ce=p(K.start,J,ce);Z=new Ki(J,M-K.start,n),W=K.start-Q}else{let J=a.pos-E;a.next();let fe=[],ce=[],ye=A>=o?A:-1,G=0,D=M;for(;a.pos>J;)ye>=0&&a.id==ye&&a.size>=0?(a.end<=D-s&&(b(fe,ce,x,G,a.end,D,ye,I,B),G=fe.length,D=a.end),a.next()):_>2500?d(x,J,fe,ce):f(x,J,fe,ce,ye,_+1);if(ye>=0&&G>0&&G<fe.length&&b(fe,ce,x,G,x,D,ye,I,B),fe.reverse(),ce.reverse(),ye>-1&&G>0){let V=m(U,B);Z=Ja(U,fe,ce,0,fe.length,0,M-x,V,V)}else Z=w(U,fe,ce,M-x,I-M,B)}C.push(Z),T.push(W)}function d(Q,k,C,T){let N=[],_=0,A=-1;for(;a.pos>k;){let{id:x,start:M,end:E,size:I}=a;if(I>4)a.next();else{if(A>-1&&M<A)break;A<0&&(A=E-s),N.push(x,M,E),_++,a.next()}}if(_){let x=new Uint16Array(_*4),M=N[N.length-2];for(let E=N.length-3,I=0;E>=0;E-=3)x[I++]=N[E],x[I++]=N[E+1]-M,x[I++]=N[E+2]-M,x[I++]=I;C.push(new Ki(x,N[2]-M,n)),T.push(M-Q)}}function m(Q,k){return(C,T,N)=>{let _=0,A=C.length-1,x,M;if(A>=0&&(x=C[A])instanceof tt){if(!A&&x.type==Q&&x.length==N)return x;(M=x.prop(xe.lookAhead))&&(_=T[A]+x.length+M)}return w(Q,C,T,N,_,k)}}function b(Q,k,C,T,N,_,A,x,M){let E=[],I=[];for(;Q.length>T;)E.push(Q.pop()),I.push(k.pop()+C-N);Q.push(w(n.types[A],E,I,_-N,x-_,M)),k.push(N-C)}function w(Q,k,C,T,N,_,A){if(_){let x=[xe.contextHash,_];A=A?[x].concat(A):[x]}if(N>25){let x=[xe.lookAhead,N];A=A?[x].concat(A):[x]}return new tt(Q,k,C,T,A)}function g(Q,k){let C=a.fork(),T=0,N=0,_=0,A=C.end-s,x={size:0,start:0,skip:0};e:for(let M=C.pos-Q;C.pos>M;){let E=C.size;if(C.id==k&&E>=0){x.size=T,x.start=N,x.skip=_,_+=4,T+=4,C.next();continue}let I=C.pos-E;if(E<0||I<M||C.start<A)break;let B=C.id>=o?4:0,U=C.start;for(C.next();C.pos>I;){if(C.size<0)if(C.size==-3)B+=4;else break e;else C.id>=o&&(B+=4);C.next()}N=U,T+=E,_+=B}return(k<0||T==Q)&&(x.size=T,x.start=N,x.skip=_),x.size>4?x:void 0}function p(Q,k,C){let{id:T,start:N,end:_,size:A}=a;if(a.next(),A>=0&&T<o){let x=C;if(A>4){let M=a.pos-(A-4);for(;a.pos>M;)C=p(Q,k,C)}k[--C]=x,k[--C]=_-Q,k[--C]=N-Q,k[--C]=T}else A==-3?h=T:A==-4&&(u=T);return C}let O=[],S=[];for(;a.pos>0;)f(i.start||0,i.bufferStart||0,O,S,-1,0);let y=(e=i.length)!==null&&e!==void 0?e:O.length?S[0]+O[0].length:0;return new tt(c[i.topID],O.reverse(),S.reverse(),y)}const Bp=new WeakMap;function ao(i,e){if(!i.isAnonymous||e instanceof Ki||e.type!=i)return 1;let t=Bp.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=i||!(n instanceof tt)){t=1;break}t+=ao(i,n)}Bp.set(e,t)}return t}function Ja(i,e,t,n,s,r,o,a,c){let h=0;for(let b=n;b<s;b++)h+=ao(i,e[b]);let u=Math.ceil(h*1.5/8),f=[],d=[];function m(b,w,g,p,O){for(let S=g;S<p;){let y=S,Q=w[S],k=ao(i,b[S]);for(S++;S<p;S++){let C=ao(i,b[S]);if(k+C>=u)break;k+=C}if(S==y+1){if(k>u){let C=b[y];m(C.children,C.positions,0,C.children.length,w[y]+O);continue}f.push(b[y])}else{let C=w[S-1]+b[S-1].length-Q;f.push(Ja(i,b,w,y,S,Q,C,null,c))}d.push(Q+O-r)}}return m(e,t,n,s,0),(a||c)(f,d,o)}class Fx{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof Oi?this.setBuffer(e.context.buffer,e.index,t):e instanceof Et&&this.map.set(e.tree,t)}get(e){return e instanceof Oi?this.getBuffer(e.context.buffer,e.index):e instanceof Et?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 On{constructor(e,t,n,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new On(0,e.length,e,0,!1,n)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let a=0,c=0,h=0;;a++){let u=a<t.length?t[a]:null,f=u?u.fromA:1e9;if(f-c>=n)for(;o&&o.from<f;){let d=o;if(c>=d.from||f<=d.to||h){let m=Math.max(d.from,c)-h,b=Math.min(d.to,f)-h;d=m>=b?null:new On(m,b,d.tree,d.offset+h,a>0,!!u)}if(d&&s.push(d),o.to>f)break;o=r<e.length?e[r++]:null}if(!u)break;c=u.toA,h=u.toA-u.toB}return s}}class Dp{startParse(e,t,n){return typeof e=="string"&&(e=new jx(e)),n=n?n.length?n.map(s=>new Wa(s.from,s.to)):[new Wa(0,0)]:[new Wa(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let r=s.advance();if(r)return r}}}class jx{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 xe({perNode:!0});let qx=0;class jt{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=qx++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof jt&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new jt(n,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new co(e);return n=>n.modified.indexOf(t)>-1?n:co.get(n.base||n,n.modified.concat(t).sort((s,r)=>s.id-r.id))}}let Xx=0;class co{constructor(e){this.name=e,this.instances=[],this.id=Xx++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(a=>a.base==e&&Wx(t,a.modified));if(n)return n;let s=[],r=new jt(e.name,s,e,t);for(let a of t)a.instances.push(r);let o=Yx(t);for(let a of e.set)if(!a.modified.length)for(let c of o)s.push(co.get(a,c));return r}}function Wx(i,e){return i.length==e.length&&i.every((t,n)=>t==e[n])}function Yx(i){let e=[[]];for(let t=0;t<i.length;t++)for(let n=0,s=e.length;n<s;n++)e.push(e[n].concat(i[t]));return e.sort((t,n)=>n.length-t.length)}function vp(i){let e=Object.create(null);for(let t in i){let n=i[t];Array.isArray(n)||(n=[n]);for(let s of t.split(" "))if(s){let r=[],o=2,a=s;for(let f=0;;){if(a=="..."&&f>0&&f+3==s.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+s);if(r.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==s.length)break;let m=s[f++];if(f==s.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);a=s.slice(f)}let c=r.length-1,h=r[c];if(!h)throw new RangeError("Invalid path: "+s);let u=new ho(n,o,c>0?r.slice(0,c):null);e[h]=u.sort(e[h])}}return Zp.add(e)}const Zp=new xe;class ho{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,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}}ho.empty=new ho([],2,null);function Ip(i,e){let t=Object.create(null);for(let r of i)if(!Array.isArray(r.tag))t[r.tag.id]=r.class;else for(let o of r.tag)t[o.id]=r.class;let{scope:n,all:s=null}=e||{};return{style:r=>{let o=s;for(let a of r)for(let c of a.set){let h=t[c.id];if(h){o=o?o+" "+h:h;break}}return o},scope:n}}function zx(i,e){let t=null;for(let n of i){let s=n.style(e);s&&(t=t?t+" "+s:s)}return t}function Gx(i,e,t,n=0,s=i.length){let r=new Hx(n,Array.isArray(e)?e:[e],t);r.highlightRange(i.cursor(),n,s,"",r.highlighters),r.flush(s)}class Hx{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,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,n,s,r){let{type:o,from:a,to:c}=e;if(a>=n||c<=t)return;o.isTop&&(r=this.highlighters.filter(m=>!m.scope||m.scope(o)));let h=s,u=Kx(e)||ho.empty,f=zx(r,u.tags);if(f&&(h&&(h+=" "),h+=f,u.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,a),h),u.opaque)return;let d=e.tree&&e.tree.prop(xe.mounted);if(d&&d.overlay){let m=e.node.enter(d.overlay[0].from+a,1),b=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),w=e.firstChild();for(let g=0,p=a;;g++){let O=g<d.overlay.length?d.overlay[g]:null,S=O?O.from+a:c,y=Math.max(t,p),Q=Math.min(n,S);if(y<Q&&w)for(;e.from<Q&&(this.highlightRange(e,y,Q,s,r),this.startSpan(Math.min(Q,e.to),h),!(e.to>=S||!e.nextSibling())););if(!O||S>n)break;p=O.to+a,p>t&&(this.highlightRange(m.cursor(),Math.max(t,O.from+a),Math.min(n,p),"",b),this.startSpan(Math.min(n,p),h))}w&&e.parent()}else if(e.firstChild()){d&&(s="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,s,r),this.startSpan(Math.min(n,e.to),h)}while(e.nextSibling());e.parent()}}}function Kx(i){let e=i.type.prop(Zp);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}const ie=jt.define,uo=ie(),Ji=ie(),Up=ie(Ji),Fp=ie(Ji),en=ie(),fo=ie(en),ec=ie(en),_i=ie(),_n=ie(_i),bi=ie(),yi=ie(),tc=ie(),Us=ie(tc),po=ie(),L={comment:uo,lineComment:ie(uo),blockComment:ie(uo),docComment:ie(uo),name:Ji,variableName:ie(Ji),typeName:Up,tagName:ie(Up),propertyName:Fp,attributeName:ie(Fp),className:ie(Ji),labelName:ie(Ji),namespace:ie(Ji),macroName:ie(Ji),literal:en,string:fo,docString:ie(fo),character:ie(fo),attributeValue:ie(fo),number:ec,integer:ie(ec),float:ie(ec),bool:ie(en),regexp:ie(en),escape:ie(en),color:ie(en),url:ie(en),keyword:bi,self:ie(bi),null:ie(bi),atom:ie(bi),unit:ie(bi),modifier:ie(bi),operatorKeyword:ie(bi),controlKeyword:ie(bi),definitionKeyword:ie(bi),moduleKeyword:ie(bi),operator:yi,derefOperator:ie(yi),arithmeticOperator:ie(yi),logicOperator:ie(yi),bitwiseOperator:ie(yi),compareOperator:ie(yi),updateOperator:ie(yi),definitionOperator:ie(yi),typeOperator:ie(yi),controlOperator:ie(yi),punctuation:tc,separator:ie(tc),bracket:Us,angleBracket:ie(Us),squareBracket:ie(Us),paren:ie(Us),brace:ie(Us),content:_i,heading:_n,heading1:ie(_n),heading2:ie(_n),heading3:ie(_n),heading4:ie(_n),heading5:ie(_n),heading6:ie(_n),contentSeparator:ie(_i),list:ie(_i),quote:ie(_i),emphasis:ie(_i),strong:ie(_i),link:ie(_i),monospace:ie(_i),strikethrough:ie(_i),inserted:ie(),deleted:ie(),changed:ie(),invalid:ie(),meta:po,documentMeta:ie(po),annotation:ie(po),processingInstruction:ie(po),definition:jt.defineModifier("definition"),constant:jt.defineModifier("constant"),function:jt.defineModifier("function"),standard:jt.defineModifier("standard"),local:jt.defineModifier("local"),special:jt.defineModifier("special")};for(let i in L){let e=L[i];e instanceof jt&&(e.name=i)}Ip([{tag:L.link,class:"tok-link"},{tag:L.heading,class:"tok-heading"},{tag:L.emphasis,class:"tok-emphasis"},{tag:L.strong,class:"tok-strong"},{tag:L.keyword,class:"tok-keyword"},{tag:L.atom,class:"tok-atom"},{tag:L.bool,class:"tok-bool"},{tag:L.url,class:"tok-url"},{tag:L.labelName,class:"tok-labelName"},{tag:L.inserted,class:"tok-inserted"},{tag:L.deleted,class:"tok-deleted"},{tag:L.literal,class:"tok-literal"},{tag:L.string,class:"tok-string"},{tag:L.number,class:"tok-number"},{tag:[L.regexp,L.escape,L.special(L.string)],class:"tok-string2"},{tag:L.variableName,class:"tok-variableName"},{tag:L.local(L.variableName),class:"tok-variableName tok-local"},{tag:L.definition(L.variableName),class:"tok-variableName tok-definition"},{tag:L.special(L.variableName),class:"tok-variableName2"},{tag:L.definition(L.propertyName),class:"tok-propertyName tok-definition"},{tag:L.typeName,class:"tok-typeName"},{tag:L.namespace,class:"tok-namespace"},{tag:L.className,class:"tok-className"},{tag:L.macroName,class:"tok-macroName"},{tag:L.propertyName,class:"tok-propertyName"},{tag:L.operator,class:"tok-operator"},{tag:L.comment,class:"tok-comment"},{tag:L.meta,class:"tok-meta"},{tag:L.invalid,class:"tok-invalid"},{tag:L.punctuation,class:"tok-punctuation"}]);var ic;const jn=new xe;function jp(i){return ae.define({combine:i?e=>e.concat(i):void 0})}const nc=new xe;class ei{constructor(e,t,n=[],s=""){this.data=e,this.name=s,Se.prototype.hasOwnProperty("tree")||Object.defineProperty(Se.prototype,"tree",{get(){return rt(this)}}),this.parser=t,this.extension=[tn.of(this),Se.languageData.of((r,o,a)=>{let c=qp(r,o,a),h=c.type.prop(jn);if(!h)return[];let u=r.facet(h),f=c.type.prop(nc);if(f){let d=c.resolve(o-c.from,a);for(let m of f)if(m.test(d,r)){let b=r.facet(m.facet);return m.type=="replace"?b:b.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return qp(e,t,n).type.prop(jn)==this.data}findRegions(e){let t=e.facet(tn);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],s=(r,o)=>{if(r.prop(jn)==this.data){n.push({from:o,to:o+r.length});return}let a=r.prop(xe.mounted);if(a){if(a.tree.prop(jn)==this.data){if(a.overlay)for(let c of a.overlay)n.push({from:c.from+o,to:c.to+o});else n.push({from:o,to:o+r.length});return}else if(a.overlay){let c=n.length;if(s(a.tree,a.overlay[0].from+o),n.length>c)return}}for(let c=0;c<r.children.length;c++){let h=r.children[c];h instanceof tt&&s(h,r.positions[c]+o)}};return s(rt(e),0),n}get allowsNesting(){return!0}}ei.setState=we.define();function qp(i,e,t){let n=i.facet(tn),s=rt(i).topNode;if(!n||n.allowsNesting)for(let r=s;r;r=r.enter(e,t,st.ExcludeBuffers))r.type.isTop&&(s=r);return s}class mo extends ei{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=jp(e.languageData);return new mo(t,e.parser.configure({props:[jn.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new mo(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function rt(i){let e=i.field(ei.state,!1);return e?e.tree:tt.empty}class Jx{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 n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Fs=null;class go{constructor(e,t,n=[],s,r,o,a,c){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new go(e,t,[],tt.empty,0,n,[],null)}startParse(){return this.parser.startParse(new Jx(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=tt.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;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(On.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n: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(On.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Fs;Fs=this;try{return e()}finally{Fs=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Xp(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:s,treeLen:r,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,u,f,d)=>c.push({fromA:h,toA:u,fromB:f,toB:d})),n=On.applyChanges(n,c),s=tt.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let h of this.skipped){let u=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);u<f&&a.push({from:u,to:f})}}}return new go(this.parser,t,n,s,r,o,a,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 n=0;n<this.skipped.length;n++){let{from:s,to:r}=this.skipped[n];s<e.to&&r>e.from&&(this.fragments=Xp(this.fragments,s,r),this.skipped.splice(n--,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 Dp{createParse(t,n,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let c=Fs;if(c){for(let h of s)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=o,new tt(Tt.none,[],[],o-r)},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 Fs}}function Xp(i,e,t){return On.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}class qn{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),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new qn(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=go.create(e.facet(tn).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new qn(n)}}ei.state=ot.define({create:qn.init,update(i,e){for(let t of e.effects)if(t.is(ei.setState))return t.value;return e.startState.facet(tn)!=e.state.facet(tn)?qn.init(e.state):i.apply(e)}});let Wp=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Wp=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const sc=typeof navigator<"u"&&(!((ic=navigator.scheduling)===null||ic===void 0)&&ic.isInputPending)?()=>navigator.scheduling.isInputPending():null,eS=He.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(ei.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(ei.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Wp(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:n,viewport:{to:s}}=this.view,r=n.field(ei.state);if(r.tree==r.context.tree&&r.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!sc?Math.max(25,e.timeRemaining()-5):1e9),a=r.context.treeLen<s&&n.doc.length>s+1e3,c=r.context.work(()=>sc&&sc()||Date.now()>o,s+(a?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:ei.setState.of(new qn(r.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Pt(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()}}}),tn=ae.define({combine(i){return i.length?i[0]:null},enables:i=>[ei.state,eS,se.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});class tS{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const iS=ae.define(),js=ae.define({combine:i=>{if(!i.length)return" ";let e=i[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(i[0]));return e}});function Oo(i){let e=i.facet(js);return e.charCodeAt(0)==9?i.tabSize*e.length:e.length}function qs(i,e){let t="",n=i.tabSize,s=i.facet(js)[0];if(s==" "){for(;e>=n;)t+=" ",e-=n;s=" "}for(let r=0;r<e;r++)t+=s;return t}function rc(i,e){i instanceof Se&&(i=new _o(i));for(let n of i.state.facet(iS)){let s=n(i,e);if(s!==void 0)return s}let t=rt(i.state);return t.length>=e?nS(i,t,e):null}class _o{constructor(e,t={}){this.state=e,this.options=t,this.unit=Oo(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=n.from&&s<=n.to?r&&s==e?{text:"",from:e}:(t<0?s<e:s<=e)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(e,t);return n.slice(e-s,Math.min(n.length,e+100-s))}column(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.countColumn(n,e-s),o=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return o>-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return Ln(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Yp=new xe;function nS(i,e,t){let n=e.resolveStack(t),s=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(s!=n.node){let r=[];for(let o=s;o&&!(o.from==n.node.from&&o.type==n.node.type);o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)n={node:r[o],next:n}}return zp(n,i,t)}function zp(i,e,t){for(let n=i;n;n=n.next){let s=rS(n.node);if(s)return s(oc.create(e,t,n))}return 0}function sS(i){return i.pos==i.options.simulateBreak&&i.options.simulateDoubleBreak}function rS(i){let e=i.type.prop(Yp);if(e)return e;let t=i.firstChild,n;if(t&&(n=t.type.prop(xe.closedBy))){let s=i.lastChild,r=s&&n.indexOf(s.name)>-1;return o=>Gp(o,!0,1,void 0,r&&!sS(o)?s.from:void 0)}return i.parent==null?oS:null}function oS(){return 0}class oc extends _o{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new oc(e,t,n)}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 n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(lS(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return zp(this.context.next,this.base,this.pos)}}function lS(i,e){for(let t=e;t;t=t.parent)if(i==t)return!0;return!1}function aS(i){let e=i.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let s=i.options.simulateBreak,r=i.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let a=t.to;;){let c=e.childAfter(a);if(!c||c==n)return null;if(!c.type.isSkipped){if(c.from>=o)return null;let h=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+h}}a=c.to}}function cS({closing:i,align:e=!0,units:t=1}){return n=>Gp(n,e,t,i)}function Gp(i,e,t,n,s){let r=i.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==i.pos+o,c=e?aS(i):null;return c?a?i.column(c.from):i.column(c.to):i.baseIndent+(a?0:i.unit*t)}const hS=i=>i.baseIndent;function lc({except:i,units:e=1}={}){return t=>{let n=i&&i.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const uS=200;function fS(){return Se.transactionFilter.of(i=>{if(!i.docChanged||!i.isUserEvent("input.type")&&!i.isUserEvent("input.complete"))return i;let e=i.startState.languageDataAt("indentOnInput",i.startState.selection.main.head);if(!e.length)return i;let t=i.newDoc,{head:n}=i.newSelection.main,s=t.lineAt(n);if(n>s.from+uS)return i;let r=t.sliceString(s.from,n);if(!e.some(h=>h.test(r)))return i;let{state:o}=i,a=-1,c=[];for(let{head:h}of o.selection.ranges){let u=o.doc.lineAt(h);if(u.from==a)continue;a=u.from;let f=rc(o,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],m=qs(o,f);d!=m&&c.push({from:u.from,to:u.from+d.length,insert:m})}return c.length?[i,{changes:c,sequential:!0}]:i})}const dS=ae.define(),Hp=new xe;function pS(i){let e=i.firstChild,t=i.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?i.to:t.from}:null}function mS(i,e,t){let n=rt(i);if(n.length<t)return null;let s=n.resolveStack(t,1),r=null;for(let o=s;o;o=o.next){let a=o.node;if(a.to<=t||a.from>t)continue;if(r&&a.from<e)break;let c=a.type.prop(Hp);if(c&&(a.to<n.length-50||n.length==i.doc.length||!gS(a))){let h=c(a,i);h&&h.from<=t&&h.from>=e&&h.to>t&&(r=h)}}return r}function gS(i){let e=i.lastChild;return e&&e.to==i.to&&e.type.isError}function bo(i,e,t){for(let n of i.facet(dS)){let s=n(i,e,t);if(s)return s}return mS(i,e,t)}function Kp(i,e){let t=e.mapPos(i.from,1),n=e.mapPos(i.to,-1);return t>=n?void 0:{from:t,to:n}}const yo=we.define({map:Kp}),Xs=we.define({map:Kp});function Jp(i){let e=[];for(let{head:t}of i.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(i.lineBlockAt(t));return e}const bn=ot.define({create(){return de.none},update(i,e){i=i.map(e.changes);for(let t of e.effects)if(t.is(yo)&&!OS(i,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(ac),s=n?de.replace({widget:new kS(n(e.state,t.value))}):sm;i=i.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(Xs)&&(i=i.update({filter:(n,s)=>t.value.from!=n||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;i.between(n,n,(s,r)=>{s<n&&r>n&&(t=!0)}),t&&(i=i.update({filterFrom:n,filterTo:n,filter:(s,r)=>r<=n||s>=n}))}return i},provide:i=>se.decorations.from(i),toJSON(i,e){let t=[];return i.between(0,e.doc.length,(n,s)=>{t.push(n,s)}),t},fromJSON(i){if(!Array.isArray(i)||i.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<i.length;){let n=i[t++],s=i[t++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");e.push(sm.range(n,s))}return de.set(e,!0)}});function wo(i,e,t){var n;let s=null;return(n=i.field(bn,!1))===null||n===void 0||n.between(e,t,(r,o)=>{(!s||s.from>r)&&(s={from:r,to:o})}),s}function OS(i,e,t){let n=!1;return i.between(e,e,(s,r)=>{s==e&&r==t&&(n=!0)}),n}function em(i,e){return i.field(bn,!1)?e:e.concat(we.appendConfig.of(im()))}const _S=i=>{for(let e of Jp(i)){let t=bo(i.state,e.from,e.to);if(t)return i.dispatch({effects:em(i.state,[yo.of(t),tm(i,t)])}),!0}return!1},bS=i=>{if(!i.state.field(bn,!1))return!1;let e=[];for(let t of Jp(i)){let n=wo(i.state,t.from,t.to);n&&e.push(Xs.of(n),tm(i,n,!1))}return e.length&&i.dispatch({effects:e}),e.length>0};function tm(i,e,t=!0){let n=i.state.doc.lineAt(e.from).number,s=i.state.doc.lineAt(e.to).number;return se.announce.of(`${i.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${i.state.phrase("to")} ${s}.`)}const yS=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:_S},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:bS},{key:"Ctrl-Alt-[",run:i=>{let{state:e}=i,t=[];for(let n=0;n<e.doc.length;){let s=i.lineBlockAt(n),r=bo(e,s.from,s.to);r&&t.push(yo.of(r)),n=(r?i.lineBlockAt(r.to):s).to+1}return t.length&&i.dispatch({effects:em(i.state,t)}),!!t.length}},{key:"Ctrl-Alt-]",run:i=>{let e=i.state.field(bn,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,i.state.doc.length,(n,s)=>{t.push(Xs.of({from:n,to:s}))}),i.dispatch({effects:t}),!0}}],wS={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},ac=ae.define({combine(i){return fi(i,wS)}});function im(i){let e=[bn,CS];return i&&e.push(ac.of(i)),e}function nm(i,e){let{state:t}=i,n=t.facet(ac),s=o=>{let a=i.lineBlockAt(i.posAtDOM(o.target)),c=wo(i.state,a.from,a.to);c&&i.dispatch({effects:Xs.of(c)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(i,s,e);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const sm=de.replace({widget:new class extends pi{toDOM(i){return nm(i,null)}}});class kS extends pi{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return nm(e,this.value)}}const xS={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class cc extends Ri{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 SS(i={}){let e=Object.assign(Object.assign({},xS),i),t=new cc(e,!0),n=new cc(e,!1),s=He.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(tn)!=o.state.facet(tn)||o.startState.field(bn,!1)!=o.state.field(bn,!1)||rt(o.startState)!=rt(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new Ti;for(let c of o.viewportLineBlocks){let h=wo(o.state,c.from,c.to)?n:bo(o.state,c.from,c.to)?t:null;h&&a.add(c.from,c.from,h)}return a.finish()}}),{domEventHandlers:r}=e;return[s,Ax({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(s))===null||a===void 0?void 0:a.markers)||Te.empty},initialSpacer(){return new cc(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,a,c)=>{if(r.click&&r.click(o,a,c))return!0;let h=wo(o.state,a.from,a.to);if(h)return o.dispatch({effects:Xs.of(h)}),!0;let u=bo(o.state,a.from,a.to);return u?(o.dispatch({effects:yo.of(u)}),!0):!1}})}),im()]}const CS=se.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 Ws{constructor(e,t){this.specs=e;let n;function s(a){let c=Xi.newName();return(n||(n=Object.create(null)))["."+c]=a,c}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof ei?a=>a.prop(jn)==o.data:o?a=>a==o:void 0,this.style=Ip(e.map(a=>({tag:a.tag,class:a.class||s(Object.assign({},a,{tag:null}))})),{all:r}).style,this.module=n?new Xi(n):null,this.themeType=t.themeType}static define(e,t){return new Ws(e,t||{})}}const hc=ae.define(),rm=ae.define({combine(i){return i.length?[i[0]]:null}});function uc(i){let e=i.facet(hc);return e.length?e:i.facet(rm)}function om(i,e){let t=[QS],n;return i instanceof Ws&&(i.module&&t.push(se.styleModule.of(i.module)),n=i.themeType),e!=null&&e.fallback?t.push(rm.of(i)):n?t.push(hc.computeN([se.darkTheme],s=>s.facet(se.darkTheme)==(n=="dark")?[i]:[])):t.push(hc.of(i)),t}class AS{constructor(e){this.markCache=Object.create(null),this.tree=rt(e.state),this.decorations=this.buildDeco(e,uc(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=rt(e.state),n=uc(e.state),s=n!=uc(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!s&&t.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return de.none;let n=new Ti;for(let{from:s,to:r}of e.visibleRanges)Gx(this.tree,t,(o,a,c)=>{n.add(o,a,this.markCache[c]||(this.markCache[c]=de.mark({class:c})))},s,r);return n.finish()}}const QS=qi.high(He.fromClass(AS,{decorations:i=>i.decorations})),PS=Ws.define([{tag:L.meta,color:"#404740"},{tag:L.link,textDecoration:"underline"},{tag:L.heading,textDecoration:"underline",fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strong,fontWeight:"bold"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.keyword,color:"#708"},{tag:[L.atom,L.bool,L.url,L.contentSeparator,L.labelName],color:"#219"},{tag:[L.literal,L.inserted],color:"#164"},{tag:[L.string,L.deleted],color:"#a11"},{tag:[L.regexp,L.escape,L.special(L.string)],color:"#e40"},{tag:L.definition(L.variableName),color:"#00f"},{tag:L.local(L.variableName),color:"#30a"},{tag:[L.typeName,L.namespace],color:"#085"},{tag:L.className,color:"#167"},{tag:[L.special(L.variableName),L.macroName],color:"#256"},{tag:L.definition(L.propertyName),color:"#00c"},{tag:L.comment,color:"#940"},{tag:L.invalid,color:"#f00"}]),TS=se.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),lm=1e4,am="()[]{}",cm=ae.define({combine(i){return fi(i,{afterCursor:!0,brackets:am,maxScanDistance:lm,renderMatch:NS})}}),ES=de.mark({class:"cm-matchingBracket"}),$S=de.mark({class:"cm-nonmatchingBracket"});function NS(i){let e=[],t=i.matched?ES:$S;return e.push(t.range(i.start.from,i.start.to)),i.end&&e.push(t.range(i.end.from,i.end.to)),e}const RS=[ot.define({create(){return de.none},update(i,e){if(!e.docChanged&&!e.selection)return i;let t=[],n=e.state.facet(cm);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=wi(e.state,s.head,-1,n)||s.head>0&&wi(e.state,s.head-1,1,n)||n.afterCursor&&(wi(e.state,s.head,1,n)||s.head<e.state.doc.length&&wi(e.state,s.head+1,-1,n));r&&(t=t.concat(n.renderMatch(r,e.state)))}return de.set(t,!0)},provide:i=>se.decorations.from(i)}),TS];function VS(i={}){return[cm.of(i),RS]}const LS=new xe;function fc(i,e,t){let n=i.prop(e<0?xe.openedBy:xe.closedBy);if(n)return n;if(i.name.length==1){let s=t.indexOf(i.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function dc(i){let e=i.type.prop(LS);return e?e(i.node):i}function wi(i,e,t,n={}){let s=n.maxScanDistance||lm,r=n.brackets||am,o=rt(i),a=o.resolveInner(e,t);for(let c=a;c;c=c.parent){let h=fc(c.type,t,r);if(h&&c.from<c.to){let u=dc(c);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return MS(i,e,t,c,u,h,r)}}return BS(i,e,t,o,a.type,s,r)}function MS(i,e,t,n,s,r,o){let a=n.parent,c={from:s.from,to:s.to},h=0,u=a==null?void 0:a.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(h==0&&r.indexOf(u.type.name)>-1&&u.from<u.to){let f=dc(u);return{start:c,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(fc(u.type,t,o))h++;else if(fc(u.type,-t,o)){if(h==0){let f=dc(u);return{start:c,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}h--}}while(t<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function BS(i,e,t,n,s,r,o){let a=t<0?i.sliceDoc(e-1,e):i.sliceDoc(e,e+1),c=o.indexOf(a);if(c<0||c%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},u=i.doc.iterRange(e,t>0?i.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=r;){let m=u.value;t<0&&(d+=m.length);let b=e+d*t;for(let w=t>0?0:m.length-1,g=t>0?m.length:-1;w!=g;w+=t){let p=o.indexOf(m[w]);if(!(p<0||n.resolveInner(b+w,1).type!=s))if(p%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:b+w,to:b+w+1},matched:p>>1==c>>1};f--}}t>0&&(d+=m.length)}return u.done?{start:h,matched:!1}:null}const DS=Object.create(null),hm=[Tt.none],um=[],fm=Object.create(null),vS=Object.create(null);for(let[i,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"]])vS[i]=ZS(DS,e);function pc(i,e){um.indexOf(i)>-1||(um.push(i),console.warn(e))}function ZS(i,e){let t=[];for(let a of e.split(" ")){let c=[];for(let h of a.split(".")){let u=i[h]||L[h];u?typeof u=="function"?c.length?c=c.map(u):pc(h,`Modifier ${h} used at start of tag`):c.length?pc(h,`Tag ${h} used as modifier`):c=Array.isArray(u)?u:[u]:pc(h,`Unknown highlighting tag ${h}`)}for(let h of c)t.push(h)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+t.map(a=>a.id),r=fm[s];if(r)return r.id;let o=fm[s]=Tt.define({id:hm.length,name:n,props:[vp({[n]:t})]});return hm.push(o),o.id}Ie.RTL,Ie.LTR;const IS=i=>{let{state:e}=i,t=e.doc.lineAt(e.selection.main.from),n=gc(i.state,t.from);return n.line?US(i):n.block?jS(i):!1};function mc(i,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=i(e,t);return s?(n(t.update(s)),!0):!1}}const US=mc(WS,0),FS=mc(dm,0),jS=mc((i,e)=>dm(i,e,XS(e)),0);function gc(i,e){let t=i.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Ys=50;function qS(i,{open:e,close:t},n,s){let r=i.sliceDoc(n-Ys,n),o=i.sliceDoc(s,s+Ys),a=/\s*$/.exec(r)[0].length,c=/^\s*/.exec(o)[0].length,h=r.length-a;if(r.slice(h-e.length,h)==e&&o.slice(c,c+t.length)==t)return{open:{pos:n-a,margin:a&&1},close:{pos:s+c,margin:c&&1}};let u,f;s-n<=2*Ys?u=f=i.sliceDoc(n,s):(u=i.sliceDoc(n,n+Ys),f=i.sliceDoc(s-Ys,s));let d=/^\s*/.exec(u)[0].length,m=/\s*$/.exec(f)[0].length,b=f.length-m-t.length;return u.slice(d,d+e.length)==e&&f.slice(b,b+t.length)==t?{open:{pos:n+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:s-m-t.length,margin:/\s/.test(f.charAt(b-1))?1:0}}:null}function XS(i){let e=[];for(let t of i.selection.ranges){let n=i.doc.lineAt(t.from),s=t.to<=n.to?n:i.doc.lineAt(t.to);s.from>n.from&&s.from==t.to&&(s=t.to==n.to+1?n:i.doc.lineAt(t.to-1));let r=e.length-1;r>=0&&e[r].to>n.from?e[r].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}function dm(i,e,t=e.selection.ranges){let n=t.map(r=>gc(e,r.from).block);if(!n.every(r=>r))return null;let s=t.map((r,o)=>qS(e,n[o],r.from,r.to));if(i!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:n[o].open+" "},{from:r.to,insert:" "+n[o].close}]))};if(i!=1&&s.some(r=>r)){let r=[];for(let o=0,a;o<s.length;o++)if(a=s[o]){let c=n[o],{open:h,close:u}=a;r.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:u.pos-u.margin,to:u.pos+c.close.length})}return{changes:r}}return null}function WS(i,e,t=e.selection.ranges){let n=[],s=-1;for(let{from:r,to:o}of t){let a=n.length,c=1e9,h=gc(e,r).line;if(h){for(let u=r;u<=o;){let f=e.doc.lineAt(u);if(f.from>s&&(r==o||o>f.from)){s=f.from;let d=/^\s*/.exec(f.text)[0].length,m=d==f.length,b=f.text.slice(d,d+h.length)==h?d:-1;d<f.text.length&&d<c&&(c=d),n.push({line:f,comment:b,token:h,indent:d,empty:m,single:!1})}u=f.to+1}if(c<1e9)for(let u=a;u<n.length;u++)n[u].indent<n[u].line.text.length&&(n[u].indent=c);n.length==a+1&&(n[a].single=!0)}}if(i!=2&&n.some(r=>r.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:a,token:c,indent:h,empty:u,single:f}of n)(f||!u)&&r.push({from:a.from+h,insert:c+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(i!=1&&n.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:a,token:c}of n)if(a>=0){let h=o.from+a,u=h+c.length;o.text[u-o.from]==" "&&u++,r.push({from:h,to:u})}return{changes:r}}return null}const Oc=Pi.define(),YS=Pi.define(),zS=ae.define(),pm=ae.define({combine(i){return fi(i,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),mm=ot.define({create(){return ki.empty},update(i,e){let t=e.state.facet(pm),n=e.annotation(Oc);if(n){let c=$t.fromTransaction(e,n.selection),h=n.side,u=h==0?i.undone:i.done;return c?u=xo(u,u.length,t.minDepth,c):u=_m(u,e.startState.selection),new ki(h==0?n.rest:u,h==0?u:n.rest)}let s=e.annotation(YS);if((s=="full"||s=="before")&&(i=i.isolate()),e.annotation(Je.addToHistory)===!1)return e.changes.empty?i:i.addMapping(e.changes.desc);let r=$t.fromTransaction(e),o=e.annotation(Je.time),a=e.annotation(Je.userEvent);return r?i=i.addChanges(r,o,a,t,e):e.selection&&(i=i.addSelection(e.startState.selection,o,a,t.newGroupDelay)),(s=="full"||s=="after")&&(i=i.isolate()),i},toJSON(i){return{done:i.done.map(e=>e.toJSON()),undone:i.undone.map(e=>e.toJSON())}},fromJSON(i){return new ki(i.done.map($t.fromJSON),i.undone.map($t.fromJSON))}});function GS(i={}){return[mm,pm.of(i),se.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?gm:e.inputType=="historyRedo"?_c:null;return n?(e.preventDefault(),n(t)):!1}})]}function ko(i,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let s=t.field(mm,!1);if(!s)return!1;let r=s.pop(i,t,e);return r?(n(r),!0):!1}}const gm=ko(0,!1),_c=ko(1,!1),HS=ko(0,!0),KS=ko(1,!0);class $t{constructor(e,t,n,s,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new $t(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;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:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new $t(e.changes&&nt.fromJSON(e.changes),[],e.mapped&&ui.fromJSON(e.mapped),e.startSelection&&j.fromJSON(e.startSelection),e.selectionsAfter.map(j.fromJSON))}static fromTransaction(e,t){let n=qt;for(let s of e.startState.facet(zS)){let r=s(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new $t(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,qt)}static selection(e){return new $t(void 0,qt,void 0,void 0,e)}}function xo(i,e,t,n){let s=e+1>t+20?e-t-1:0,r=i.slice(s,e);return r.push(n),r}function JS(i,e){let t=[],n=!1;return i.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,a)=>{for(let c=0;c<t.length;){let h=t[c++],u=t[c++];a>=h&&o<=u&&(n=!0)}}),n}function eC(i,e){return i.ranges.length==e.ranges.length&&i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function Om(i,e){return i.length?e.length?i.concat(e):i:e}const qt=[],tC=200;function _m(i,e){if(i.length){let t=i[i.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-tC));return n.length&&n[n.length-1].eq(e)?i:(n.push(e),xo(i,i.length-1,1e9,t.setSelAfter(n)))}else return[$t.selection([e])]}function iC(i){let e=i[i.length-1],t=i.slice();return t[i.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function bc(i,e){if(!i.length)return i;let t=i.length,n=qt;for(;t;){let s=nC(i[t-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let r=i.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,n=s.selectionsAfter}return n.length?[$t.selection(n)]:qt}function nC(i,e,t){let n=Om(i.selectionsAfter.length?i.selectionsAfter.map(a=>a.map(e)):qt,t);if(!i.changes)return $t.selection(n);let s=i.changes.map(e),r=e.mapDesc(i.changes,!0),o=i.mapped?i.mapped.composeDesc(r):r;return new $t(s,we.mapEffects(i.effects,e),o,i.startSelection.map(r),n)}const sC=/^(input\.type|delete)($|\.)/;class ki{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new ki(this.done,this.undone):this}addChanges(e,t,n,s,r){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||sC.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime<s.newGroupDelay&&s.joinToEvent(r,JS(a.changes,e.changes))||n=="input.type.compose")?o=xo(o,o.length-1,s.minDepth,new $t(e.changes.compose(a.changes),Om(we.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,qt)):o=xo(o,o.length,s.minDepth,e),new ki(o,qt,t,n)}addSelection(e,t,n,s){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:qt;return r.length>0&&t-this.prevTime<s&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&eC(r[r.length-1],e)?this:new ki(_m(this.done,e),this.undone,t,n)}addMapping(e){return new ki(bc(this.done,e),bc(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let s=e==0?this.done:this.undone;if(s.length==0)return null;let r=s[s.length-1],o=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:Oc.of({side:e,rest:iC(s),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let a=s.length==1?qt:s.slice(0,s.length-1);return r.mapped&&(a=bc(a,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:Oc.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}ki.empty=new ki(qt,qt);const rC=[{key:"Mod-z",run:gm,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:_c,preventDefault:!0},{linux:"Ctrl-Shift-z",run:_c,preventDefault:!0},{key:"Mod-u",run:HS,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:KS,preventDefault:!0}];function Xn(i,e){return j.create(i.ranges.map(e),i.mainIndex)}function xi(i,e){return i.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ti({state:i,dispatch:e},t){let n=Xn(i.selection,t);return n.eq(i.selection,!0)?!1:(e(xi(i,n)),!0)}function So(i,e){return j.cursor(e?i.to:i.from)}function bm(i,e){return ti(i,t=>t.empty?i.moveByChar(t,e):So(t,e))}function bt(i){return i.textDirectionAt(i.state.selection.main.head)==Ie.LTR}const ym=i=>bm(i,!bt(i)),wm=i=>bm(i,bt(i));function km(i,e){return ti(i,t=>t.empty?i.moveByGroup(t,e):So(t,e))}const oC=i=>km(i,!bt(i)),lC=i=>km(i,bt(i));function aC(i,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(i.sliceDoc(e.from,e.to)))||e.firstChild}function Co(i,e,t){let n=rt(i).resolveInner(e.head),s=t?xe.closedBy:xe.openedBy;for(let c=e.head;;){let h=t?n.childAfter(c):n.childBefore(c);if(!h)break;aC(i,h,s)?n=h:c=t?h.to:h.from}let r=n.type.prop(s),o,a;return r&&(o=t?wi(i,n.from,1):wi(i,n.to,-1))&&o.matched?a=t?o.end.to:o.end.from:a=t?n.to:n.from,j.cursor(a,t?-1:1)}const cC=i=>ti(i,e=>Co(i.state,e,!bt(i))),hC=i=>ti(i,e=>Co(i.state,e,bt(i)));function xm(i,e){return ti(i,t=>{if(!t.empty)return So(t,e);let n=i.moveVertically(t,e);return n.head!=t.head?n:i.moveToLineBoundary(t,e)})}const Sm=i=>xm(i,!1),Cm=i=>xm(i,!0);function Am(i){let e=i.scrollDOM.clientHeight<i.scrollDOM.scrollHeight-2,t=0,n=0,s;if(e){for(let r of i.state.facet(se.scrollMargins)){let o=r(i);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(n=Math.max(o==null?void 0:o.bottom,n))}s=i.scrollDOM.clientHeight-t-n}else s=(i.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:n,selfScroll:e,height:Math.max(i.defaultLineHeight,s-5)}}function Qm(i,e){let t=Am(i),{state:n}=i,s=Xn(n.selection,o=>o.empty?i.moveVertically(o,e,t.height):So(o,e));if(s.eq(n.selection))return!1;let r;if(t.selfScroll){let o=i.coordsAtPos(n.selection.main.head),a=i.scrollDOM.getBoundingClientRect(),c=a.top+t.marginTop,h=a.bottom-t.marginBottom;o&&o.top>c&&o.bottom<h&&(r=se.scrollIntoView(s.main.head,{y:"start",yMargin:o.top-c}))}return i.dispatch(xi(n,s),{effects:r}),!0}const Pm=i=>Qm(i,!1),yc=i=>Qm(i,!0);function nn(i,e,t){let n=i.lineBlockAt(e.head),s=i.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?n.to:n.from)&&(s=i.moveToLineBoundary(e,t,!1)),!t&&s.head==n.from&&n.length){let r=/^\s*/.exec(i.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;r&&e.head!=n.from+r&&(s=j.cursor(n.from+r))}return s}const uC=i=>ti(i,e=>nn(i,e,!0)),fC=i=>ti(i,e=>nn(i,e,!1)),dC=i=>ti(i,e=>nn(i,e,!bt(i))),pC=i=>ti(i,e=>nn(i,e,bt(i))),mC=i=>ti(i,e=>j.cursor(i.lineBlockAt(e.head).from,1)),gC=i=>ti(i,e=>j.cursor(i.lineBlockAt(e.head).to,-1));function OC(i,e,t){let n=!1,s=Xn(i.selection,r=>{let o=wi(i,r.head,-1)||wi(i,r.head,1)||r.head>0&&wi(i,r.head-1,1)||r.head<i.doc.length&&wi(i,r.head+1,-1);if(!o||!o.end)return r;n=!0;let a=o.start.from==r.head?o.end.to:o.end.from;return t?j.range(r.anchor,a):j.cursor(a)});return n?(e(xi(i,s)),!0):!1}const _C=({state:i,dispatch:e})=>OC(i,e,!1);function Xt(i,e){let t=Xn(i.state.selection,n=>{let s=e(n);return j.range(n.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(i.state.selection)?!1:(i.dispatch(xi(i.state,t)),!0)}function Tm(i,e){return Xt(i,t=>i.moveByChar(t,e))}const Em=i=>Tm(i,!bt(i)),$m=i=>Tm(i,bt(i));function Nm(i,e){return Xt(i,t=>i.moveByGroup(t,e))}const bC=i=>Nm(i,!bt(i)),yC=i=>Nm(i,bt(i)),wC=i=>Xt(i,e=>Co(i.state,e,!bt(i))),kC=i=>Xt(i,e=>Co(i.state,e,bt(i)));function Rm(i,e){return Xt(i,t=>i.moveVertically(t,e))}const Vm=i=>Rm(i,!1),Lm=i=>Rm(i,!0);function Mm(i,e){return Xt(i,t=>i.moveVertically(t,e,Am(i).height))}const Bm=i=>Mm(i,!1),Dm=i=>Mm(i,!0),xC=i=>Xt(i,e=>nn(i,e,!0)),SC=i=>Xt(i,e=>nn(i,e,!1)),CC=i=>Xt(i,e=>nn(i,e,!bt(i))),AC=i=>Xt(i,e=>nn(i,e,bt(i))),QC=i=>Xt(i,e=>j.cursor(i.lineBlockAt(e.head).from)),PC=i=>Xt(i,e=>j.cursor(i.lineBlockAt(e.head).to)),vm=({state:i,dispatch:e})=>(e(xi(i,{anchor:0})),!0),Zm=({state:i,dispatch:e})=>(e(xi(i,{anchor:i.doc.length})),!0),Im=({state:i,dispatch:e})=>(e(xi(i,{anchor:i.selection.main.anchor,head:0})),!0),Um=({state:i,dispatch:e})=>(e(xi(i,{anchor:i.selection.main.anchor,head:i.doc.length})),!0),TC=({state:i,dispatch:e})=>(e(i.update({selection:{anchor:0,head:i.doc.length},userEvent:"select"})),!0),EC=({state:i,dispatch:e})=>{let t=Qo(i).map(({from:n,to:s})=>j.range(n,Math.min(s+1,i.doc.length)));return e(i.update({selection:j.create(t),userEvent:"select"})),!0},$C=({state:i,dispatch:e})=>{let t=Xn(i.selection,n=>{let s=rt(i),r=s.resolveStack(n.from,1);if(n.empty){let o=s.resolveStack(n.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:a}=o;if((a.from<n.from&&a.to>=n.to||a.to>n.to&&a.from<=n.from)&&o.next)return j.range(a.to,a.from)}return n});return t.eq(i.selection)?!1:(e(xi(i,t)),!0)},NC=({state:i,dispatch:e})=>{let t=i.selection,n=null;return t.ranges.length>1?n=j.create([t.main]):t.main.empty||(n=j.create([j.cursor(t.main.head)])),n?(e(xi(i,n)),!0):!1};function zs(i,e){if(i.state.readOnly)return!1;let t="delete.selection",{state:n}=i,s=n.changeByRange(r=>{let{from:o,to:a}=r;if(o==a){let c=e(r);c<o?(t="delete.backward",c=Ao(i,c,!1)):c>o&&(t="delete.forward",c=Ao(i,c,!0)),o=Math.min(o,c),a=Math.max(a,c)}else o=Ao(i,o,!1),a=Ao(i,a,!0);return o==a?{range:r}:{changes:{from:o,to:a},range:j.cursor(o,o<r.head?-1:1)}});return s.changes.empty?!1:(i.dispatch(n.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?se.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function Ao(i,e,t){if(i instanceof se)for(let n of i.state.facet(se.atomicRanges).map(s=>s(i)))n.between(e,e,(s,r)=>{s<e&&r>e&&(e=t?r:s)});return e}const Fm=(i,e,t)=>zs(i,n=>{let s=n.from,{state:r}=i,o=r.doc.lineAt(s),a,c;if(t&&!e&&s>o.from&&s<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,s-o.from))){if(a[a.length-1]==" ")return s-1;let h=Ln(a,r.tabSize),u=h%Oo(r)||Oo(r);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)s--;c=s}else c=ft(o.text,s-o.from,e,e)+o.from,c==s&&o.number!=(e?r.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,s-o.from))&&(c=ft(o.text,c-o.from,!1,!1)+o.from);return c}),wc=i=>Fm(i,!1,!0),jm=i=>Fm(i,!0,!1),qm=(i,e)=>zs(i,t=>{let n=t.head,{state:s}=i,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let a=null;;){if(n==(e?r.to:r.from)){n==t.head&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let c=ft(r.text,n-r.from,e)+r.from,h=r.text.slice(Math.min(n,c)-r.from,Math.max(n,c)-r.from),u=o(h);if(a!=null&&u!=a)break;(h!=" "||n!=t.head)&&(a=u),n=c}return n}),Xm=i=>qm(i,!1),RC=i=>qm(i,!0),VC=i=>zs(i,e=>{let t=i.lineBlockAt(e.head).to;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),LC=i=>zs(i,e=>{let t=i.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),MC=i=>zs(i,e=>{let t=i.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),BC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Ae.of(["",""])},range:j.cursor(n.from)}));return e(i.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},DC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>{if(!n.empty||n.from==0||n.from==i.doc.length)return{range:n};let s=n.from,r=i.doc.lineAt(s),o=s==r.from?s-1:ft(r.text,s-r.from,!1)+r.from,a=s==r.to?s+1:ft(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:a,insert:i.doc.slice(s,a).append(i.doc.slice(o,s))},range:j.cursor(a)}});return t.changes.empty?!1:(e(i.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Qo(i){let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.from),r=i.doc.lineAt(n.to);if(!n.empty&&n.to==r.from&&(r=i.doc.lineAt(n.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});t=r.number+1}return e}function Wm(i,e,t){if(i.readOnly)return!1;let n=[],s=[];for(let r of Qo(i)){if(t?r.to==i.doc.length:r.from==0)continue;let o=i.doc.lineAt(t?r.to+1:r.from-1),a=o.length+1;if(t){n.push({from:r.to,to:o.to},{from:r.from,insert:o.text+i.lineBreak});for(let c of r.ranges)s.push(j.range(Math.min(i.doc.length,c.anchor+a),Math.min(i.doc.length,c.head+a)))}else{n.push({from:o.from,to:r.from},{from:r.to,insert:i.lineBreak+o.text});for(let c of r.ranges)s.push(j.range(c.anchor-a,c.head-a))}}return n.length?(e(i.update({changes:n,scrollIntoView:!0,selection:j.create(s,i.selection.mainIndex),userEvent:"move.line"})),!0):!1}const vC=({state:i,dispatch:e})=>Wm(i,e,!1),ZC=({state:i,dispatch:e})=>Wm(i,e,!0);function Ym(i,e,t){if(i.readOnly)return!1;let n=[];for(let s of Qo(i))t?n.push({from:s.from,insert:i.doc.slice(s.from,s.to)+i.lineBreak}):n.push({from:s.to,insert:i.lineBreak+i.doc.slice(s.from,s.to)});return e(i.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const IC=({state:i,dispatch:e})=>Ym(i,e,!1),UC=({state:i,dispatch:e})=>Ym(i,e,!0),FC=i=>{if(i.state.readOnly)return!1;let{state:e}=i,t=e.changes(Qo(e).map(({from:s,to:r})=>(s>0?s--:r<e.doc.length&&r++,{from:s,to:r}))),n=Xn(e.selection,s=>{let r;if(i.lineWrapping){let o=i.lineBlockAt(s.head),a=i.coordsAtPos(s.head,s.assoc||1);a&&(r=o.bottom+i.documentTop-a.bottom+i.defaultLineHeight/2)}return i.moveVertically(s,!0,r)}).map(t);return i.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function jC(i,e){if(/\(\)|\[\]|\{\}/.test(i.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=rt(i).resolveInner(e),n=t.childBefore(e),s=t.childAfter(e),r;return n&&s&&n.to<=e&&s.from>=e&&(r=n.type.prop(xe.closedBy))&&r.indexOf(s.name)>-1&&i.doc.lineAt(n.to).from==i.doc.lineAt(s.from).from&&!/\S/.test(i.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const zm=Gm(!1),qC=Gm(!0);function Gm(i){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>{let{from:r,to:o}=s,a=e.doc.lineAt(r),c=!i&&r==o&&jC(e,r);i&&(r=o=(o<=a.to?a:e.doc.lineAt(o)).to);let h=new _o(e,{simulateBreak:r,simulateDoubleBreak:!!c}),u=rc(h,r);for(u==null&&(u=Ln(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;c?{from:r,to:o}=c:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let f=["",qs(e,u)];return c&&f.push(qs(e,h.lineIndent(a.from,-1))),{changes:{from:r,to:o,insert:Ae.of(f)},range:j.cursor(r+1+f[1].length)}});return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function kc(i,e){let t=-1;return i.changeByRange(n=>{let s=[];for(let o=n.from;o<=n.to;){let a=i.doc.lineAt(o);a.number>t&&(n.empty||n.to>a.from)&&(e(a,s,n),t=a.number),o=a.to+1}let r=i.changes(s);return{changes:s,range:j.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}})}const XC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=Object.create(null),n=new _o(i,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=kc(i,(r,o,a)=>{let c=rc(n,r.from);if(c==null)return;/\S/.test(r.text)||(c=0);let h=/^\s*/.exec(r.text)[0],u=qs(i,c);(h!=u||a.from<r.from+h.length)&&(t[r.from]=c,o.push({from:r.from,to:r.from+h.length,insert:u}))});return s.changes.empty||e(i.update(s,{userEvent:"indent"})),!0},Hm=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(kc(i,(t,n)=>{n.push({from:t.from,insert:i.facet(js)})}),{userEvent:"input.indent"})),!0),Km=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(kc(i,(t,n)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Ln(s,i.tabSize),o=0,a=qs(i,Math.max(0,r-Oo(i)));for(;o<s.length&&o<a.length&&s.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+s.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),WC=i=>(i.setTabFocusMode(),!0),YC=[{key:"Ctrl-b",run:ym,shift:Em,preventDefault:!0},{key:"Ctrl-f",run:wm,shift:$m},{key:"Ctrl-p",run:Sm,shift:Vm},{key:"Ctrl-n",run:Cm,shift:Lm},{key:"Ctrl-a",run:mC,shift:QC},{key:"Ctrl-e",run:gC,shift:PC},{key:"Ctrl-d",run:jm},{key:"Ctrl-h",run:wc},{key:"Ctrl-k",run:VC},{key:"Ctrl-Alt-h",run:Xm},{key:"Ctrl-o",run:BC},{key:"Ctrl-t",run:DC},{key:"Ctrl-v",run:yc}],zC=[{key:"ArrowLeft",run:ym,shift:Em,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:oC,shift:bC,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:dC,shift:CC,preventDefault:!0},{key:"ArrowRight",run:wm,shift:$m,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:lC,shift:yC,preventDefault:!0},{mac:"Cmd-ArrowRight",run:pC,shift:AC,preventDefault:!0},{key:"ArrowUp",run:Sm,shift:Vm,preventDefault:!0},{mac:"Cmd-ArrowUp",run:vm,shift:Im},{mac:"Ctrl-ArrowUp",run:Pm,shift:Bm},{key:"ArrowDown",run:Cm,shift:Lm,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Zm,shift:Um},{mac:"Ctrl-ArrowDown",run:yc,shift:Dm},{key:"PageUp",run:Pm,shift:Bm},{key:"PageDown",run:yc,shift:Dm},{key:"Home",run:fC,shift:SC,preventDefault:!0},{key:"Mod-Home",run:vm,shift:Im},{key:"End",run:uC,shift:xC,preventDefault:!0},{key:"Mod-End",run:Zm,shift:Um},{key:"Enter",run:zm,shift:zm},{key:"Mod-a",run:TC},{key:"Backspace",run:wc,shift:wc},{key:"Delete",run:jm},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Xm},{key:"Mod-Delete",mac:"Alt-Delete",run:RC},{mac:"Mod-Backspace",run:LC},{mac:"Mod-Delete",run:MC}].concat(YC.map(i=>({mac:i.key,run:i.run,shift:i.shift}))),GC=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:cC,shift:wC},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:hC,shift:kC},{key:"Alt-ArrowUp",run:vC},{key:"Shift-Alt-ArrowUp",run:IC},{key:"Alt-ArrowDown",run:ZC},{key:"Shift-Alt-ArrowDown",run:UC},{key:"Escape",run:NC},{key:"Mod-Enter",run:qC},{key:"Alt-l",mac:"Ctrl-l",run:EC},{key:"Mod-i",run:$C,preventDefault:!0},{key:"Mod-[",run:Km},{key:"Mod-]",run:Hm},{key:"Mod-Alt-\\",run:XC},{key:"Shift-Mod-k",run:FC},{key:"Shift-Mod-\\",run:_C},{key:"Mod-/",run:IS},{key:"Alt-A",run:FS},{key:"Ctrl-m",mac:"Shift-Alt-m",run:WC}].concat(zC),HC={key:"Tab",run:Hm,shift:Km};function ve(){var i=arguments[0];typeof i=="string"&&(i=document.createElement(i));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n];typeof s=="string"?i.setAttribute(n,s):s!=null&&(i[n]=s)}e++}for(;e<arguments.length;e++)Jm(i,arguments[e]);return i}function Jm(i,e){if(typeof e=="string")i.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)i.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Jm(i,e[t]);else throw new RangeError("Unsupported child node: "+e)}const eg=typeof String.prototype.normalize=="function"?i=>i.normalize("NFKD"):i=>i;class Wn{constructor(e,t,n=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=r?a=>r(eg(a)):eg,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 At(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=Ml(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=hi(e);let s=this.normalize(t);if(s.length)for(let r=0,o=n;;r++){let a=s.charCodeAt(r),c=this.match(a,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(c)return this.value=c,this;break}o==n&&r<t.length&&t.charCodeAt(r)==a&&o++}}}match(e,t,n){let s=null;for(let r=0;r<this.matches.length;r+=2){let o=this.matches[r],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?s={from:this.matches[r+1],to:n}:(this.matches[r]++,a=!0)),a||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?s={from:t,to:n}:this.matches.push(1,t)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}typeof Symbol<"u"&&(Wn.prototype[Symbol.iterator]=function(){return this});const tg={from:-1,to:-1,match:/.*/.exec("")},xc="gm"+(/x/.unicode==null?"":"u");class ig{constructor(e,t,n,s=0,r=e.length){if(this.text=e,this.to=r,this.curLine="",this.done=!1,this.value=tg,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new ng(e,t,n,s,r);this.re=new RegExp(t,xc+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.iter=e.iter();let o=e.lineAt(s);this.curLineStart=o.from,this.matchPos=Po(e,s),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 n=this.curLineStart+t.index,s=n+t[0].length;if(this.matchPos=Po(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<s||n>this.value.to)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,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 Sc=new WeakMap;class Yn{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let s=Sc.get(e);if(!s||s.from>=n||s.to<=t){let a=new Yn(t,e.sliceString(t,n));return Sc.set(e,a),a}if(s.from==t&&s.to==n)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to<n&&(r+=e.sliceString(s.to,n)),Sc.set(e,new Yn(o,r)),new Yn(t,r.slice(t-o,n-o))}}class ng{constructor(e,t,n,s,r){this.text=e,this.to=r,this.done=!1,this.value=tg,this.matchPos=Po(e,s),this.re=new RegExp(t,xc+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.flat=Yn.get(e,s,this.chunkEnd(s+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 n=this.flat.from+t.index,s=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this.matchPos=Po(this.text,s+(n==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Yn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(ig.prototype[Symbol.iterator]=ng.prototype[Symbol.iterator]=function(){return this});function KC(i){try{return new RegExp(i,xc),!0}catch{return!1}}function Po(i,e){if(e>=i.length)return e;let t=i.lineAt(e),n;for(;e<t.to&&(n=t.text.charCodeAt(e-t.from))>=56320&&n<57344;)e++;return e}function Cc(i){let e=String(i.state.doc.lineAt(i.state.selection.main.head).number),t=ve("input",{class:"cm-textfield",name:"line",value:e}),n=ve("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),i.dispatch({effects:To.of(!1)}),i.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},ve("label",i.state.phrase("Go to line"),": ",t)," ",ve("button",{class:"cm-button",type:"submit"},i.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=i,a=o.doc.lineAt(o.selection.main.head),[,c,h,u,f]=r,d=u?+u.slice(1):0,m=h?+h:a.number;if(h&&f){let g=m/100;c&&(g=g*(c=="-"?-1:1)+a.number/o.doc.lines),m=Math.round(o.doc.lines*g)}else h&&c&&(m=m*(c=="-"?-1:1)+a.number);let b=o.doc.line(Math.max(1,Math.min(o.doc.lines,m))),w=j.cursor(b.from+Math.max(0,Math.min(d,b.length)));i.dispatch({effects:[To.of(!1),se.scrollIntoView(w.from,{y:"center"})],selection:w}),i.focus()}return{dom:n}}const To=we.define(),sg=ot.define({create(){return!0},update(i,e){for(let t of e.effects)t.is(To)&&(i=t.value);return i},provide:i=>vs.from(i,e=>e?Cc:null)}),JC=i=>{let e=Ds(i,Cc);if(!e){let t=[To.of(!0)];i.state.field(sg,!1)==null&&t.push(we.appendConfig.of([sg,eA])),i.dispatch({effects:t}),e=Ds(i,Cc)}return e&&e.dom.querySelector("input").select(),!0},eA=se.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),tA={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},rg=ae.define({combine(i){return fi(i,tA,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function iA(i){let e=[lA,oA];return i&&e.push(rg.of(i)),e}const nA=de.mark({class:"cm-selectionMatch"}),sA=de.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function og(i,e,t,n){return(t==0||i(e.sliceDoc(t-1,t))!=je.Word)&&(n==e.doc.length||i(e.sliceDoc(n,n+1))!=je.Word)}function rA(i,e,t,n){return i(e.sliceDoc(t,t+1))==je.Word&&i(e.sliceDoc(n-1,n))==je.Word}const oA=He.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.selectionSet||i.docChanged||i.viewportChanged)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=i.state.facet(rg),{state:t}=i,n=t.selection;if(n.ranges.length>1)return de.none;let s=n.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return de.none;let c=t.wordAt(s.head);if(!c)return de.none;o=t.charCategorizer(s.head),r=t.sliceDoc(c.from,c.to)}else{let c=s.to-s.from;if(c<e.minSelectionLength||c>200)return de.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(og(o,t,s.from,s.to)&&rA(o,t,s.from,s.to)))return de.none}else if(r=t.sliceDoc(s.from,s.to),!r)return de.none}let a=[];for(let c of i.visibleRanges){let h=new Wn(t.doc,r,c.from,c.to);for(;!h.next().done;){let{from:u,to:f}=h.value;if((!o||og(o,t,u,f))&&(s.empty&&u<=s.from&&f>=s.to?a.push(sA.range(u,f)):(u>=s.to||f<=s.from)&&a.push(nA.range(u,f)),a.length>e.maxMatches))return de.none}}return de.set(a)}},{decorations:i=>i.decorations}),lA=se.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),aA=({state:i,dispatch:e})=>{let{selection:t}=i,n=j.create(t.ranges.map(s=>i.wordAt(s.head)||j.cursor(s.head)),t.mainIndex);return n.eq(t)?!1:(e(i.update({selection:n})),!0)};function cA(i,e){let{main:t,ranges:n}=i.selection,s=i.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,a=new Wn(i.doc,e,n[n.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Wn(i.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(c=>c.from==a.value.from))continue;if(r){let c=i.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const hA=({state:i,dispatch:e})=>{let{ranges:t}=i.selection;if(t.some(r=>r.from===r.to))return aA({state:i,dispatch:e});let n=i.sliceDoc(t[0].from,t[0].to);if(i.selection.ranges.some(r=>i.sliceDoc(r.from,r.to)!=n))return!1;let s=cA(i,n);return s?(e(i.update({selection:i.selection.addRange(j.range(s.from,s.to),!1),effects:se.scrollIntoView(s.to)})),!0):!1},zn=ae.define({combine(i){return fi(i,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new kA(e),scrollToMatch:e=>se.scrollIntoView(e)})}});class lg{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||KC(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?`
32
- `:n=="r"?"\r":n=="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 pA(this):new fA(this)}getCursor(e,t=0,n){let s=e.doc?e:Se.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Hn(this,s,t,n):Gn(this,s,t,n)}}class ag{constructor(e){this.spec=e}}function Gn(i,e,t,n){return new Wn(e.doc,i.unquoted,t,n,i.caseSensitive?void 0:s=>s.toLowerCase(),i.wholeWord?uA(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function uA(i,e){return(t,n,s,r)=>((r>t||r+s.length<n)&&(r=Math.max(0,t-2),s=i.sliceString(r,Math.min(i.length,n+2))),(e(Eo(s,t-r))!=je.Word||e($o(s,t-r))!=je.Word)&&(e($o(s,n-r))!=je.Word||e(Eo(s,n-r))!=je.Word))}class fA extends ag{constructor(e){super(e)}nextMatch(e,t,n){let s=Gn(this.spec,e,n,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Gn(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==n?null:s.value}prevMatchInRange(e,t,n){for(let s=n;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Gn(this.spec,e,r,s),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(r==t)return null;s-=1e4}}prevMatch(e,t,n){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=n)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Gn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Gn(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Hn(i,e,t,n){return new ig(e.doc,i.search,{ignoreCase:!i.caseSensitive,test:i.wholeWord?dA(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function Eo(i,e){return i.slice(ft(i,e,!1),e)}function $o(i,e){return i.slice(e,ft(i,e))}function dA(i){return(e,t,n)=>!n[0].length||(i(Eo(n.input,n.index))!=je.Word||i($o(n.input,n.index))!=je.Word)&&(i($o(n.input,n.index+n[0].length))!=je.Word||i(Eo(n.input,n.index+n[0].length))!=je.Word)}class pA extends ag{nextMatch(e,t,n){let s=Hn(this.spec,e,n,e.doc.length).next();return s.done&&(s=Hn(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let s=1;;s++){let r=Math.max(t,n-s*1e4),o=Hn(this.spec,e,r,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(r==t||a.from>r+10))return a;if(r==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n<e.match.length?e.match[n]:t)}matchAll(e,t){let n=Hn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Hn(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Gs=we.define(),Ac=we.define(),sn=ot.define({create(i){return new Qc(Tc(i).create(),null)},update(i,e){for(let t of e.effects)t.is(Gs)?i=new Qc(t.value.create(),i.panel):t.is(Ac)&&(i=new Qc(i.query,t.value?Pc:null));return i},provide:i=>vs.from(i,e=>e.panel)});class Qc{constructor(e,t){this.query=e,this.panel=t}}const mA=de.mark({class:"cm-searchMatch"}),gA=de.mark({class:"cm-searchMatch cm-searchMatch-selected"}),OA=He.fromClass(class{constructor(i){this.view=i,this.decorations=this.highlight(i.state.field(sn))}update(i){let e=i.state.field(sn);(e!=i.startState.field(sn)||i.docChanged||i.selectionSet||i.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:i,panel:e}){if(!e||!i.spec.valid)return de.none;let{view:t}=this,n=new Ti;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:a,to:c}=r[s];for(;s<o-1&&c>r[s+1].from-2*250;)c=r[++s].to;i.highlight(t.state,a,c,(h,u)=>{let f=t.state.selection.ranges.some(d=>d.from==h&&d.to==u);n.add(h,u,f?gA:mA)})}return n.finish()}},{decorations:i=>i.decorations});function Hs(i){return e=>{let t=e.state.field(sn,!1);return t&&t.query.spec.valid?i(e,t):fg(e)}}const No=Hs((i,{query:e})=>{let{to:t}=i.state.selection.main,n=e.nextMatch(i.state,t,t);if(!n)return!1;let s=j.single(n.from,n.to),r=i.state.facet(zn);return i.dispatch({selection:s,effects:[Ec(i,n),r.scrollToMatch(s.main,i)],userEvent:"select.search"}),ug(i),!0}),Ro=Hs((i,{query:e})=>{let{state:t}=i,{from:n}=t.selection.main,s=e.prevMatch(t,n,n);if(!s)return!1;let r=j.single(s.from,s.to),o=i.state.facet(zn);return i.dispatch({selection:r,effects:[Ec(i,s),o.scrollToMatch(r.main,i)],userEvent:"select.search"}),ug(i),!0}),_A=Hs((i,{query:e})=>{let t=e.matchAll(i.state,1e3);return!t||!t.length?!1:(i.dispatch({selection:j.create(t.map(n=>j.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),bA=({state:i,dispatch:e})=>{let t=i.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:s}=t.main,r=[],o=0;for(let a=new Wn(i.doc,i.sliceDoc(n,s));!a.next().done;){if(r.length>1e3)return!1;a.value.from==n&&(o=r.length),r.push(j.range(a.value.from,a.value.to))}return e(i.update({selection:j.create(r,o),userEvent:"select.search.matches"})),!0},cg=Hs((i,{query:e})=>{let{state:t}=i,{from:n,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,n,n);if(!r)return!1;let o=r,a=[],c,h,u=[];if(o.from==n&&o.to==s&&(h=t.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:h}),o=e.nextMatch(t,o.from,o.to),u.push(se.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))),o){let f=a.length==0||a[0].from>=r.to?0:r.to-r.from-h.length;c=j.single(o.from-f,o.to-f),u.push(Ec(i,o)),u.push(t.facet(zn).scrollToMatch(c.main,i))}return i.dispatch({changes:a,selection:c,effects:u,userEvent:"input.replace"}),!0}),yA=Hs((i,{query:e})=>{if(i.state.readOnly)return!1;let t=e.matchAll(i.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let n=i.state.phrase("replaced $ matches",t.length)+".";return i.dispatch({changes:t,effects:se.announce.of(n),userEvent:"input.replace.all"}),!0});function Pc(i){return i.state.facet(zn).createPanel(i)}function Tc(i,e){var t,n,s,r,o;let a=i.selection.main,c=a.empty||a.to>a.from+100?"":i.sliceDoc(a.from,a.to);if(e&&!c)return e;let h=i.facet(zn);return new lg({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function hg(i){let e=Ds(i,Pc);return e&&e.dom.querySelector("[main-field]")}function ug(i){let e=hg(i);e&&e==i.root.activeElement&&e.select()}const fg=i=>{let e=i.state.field(sn,!1);if(e&&e.panel){let t=hg(i);if(t&&t!=i.root.activeElement){let n=Tc(i.state,e.query.spec);n.valid&&i.dispatch({effects:Gs.of(n)}),t.focus(),t.select()}}else i.dispatch({effects:[Ac.of(!0),e?Gs.of(Tc(i.state,e.query.spec)):we.appendConfig.of(SA)]});return!0},dg=i=>{let e=i.state.field(sn,!1);if(!e||!e.panel)return!1;let t=Ds(i,Pc);return t&&t.dom.contains(i.root.activeElement)&&i.focus(),i.dispatch({effects:Ac.of(!1)}),!0},wA=[{key:"Mod-f",run:fg,scope:"editor search-panel"},{key:"F3",run:No,shift:Ro,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:No,shift:Ro,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:dg,scope:"editor search-panel"},{key:"Mod-Shift-l",run:bA},{key:"Mod-Alt-g",run:JC},{key:"Mod-d",run:hA,preventDefault:!0}];class kA{constructor(e){this.view=e;let t=this.query=e.state.field(sn).query.spec;this.commit=this.commit.bind(this),this.searchField=ve("input",{value:t.search,placeholder:Bt(e,"Find"),"aria-label":Bt(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ve("input",{value:t.replace,placeholder:Bt(e,"Replace"),"aria-label":Bt(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ve("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=ve("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=ve("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(s,r,o){return ve("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=ve("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,n("next",()=>No(e),[Bt(e,"next")]),n("prev",()=>Ro(e),[Bt(e,"previous")]),n("select",()=>_A(e),[Bt(e,"all")]),ve("label",null,[this.caseField,Bt(e,"match case")]),ve("label",null,[this.reField,Bt(e,"regexp")]),ve("label",null,[this.wordField,Bt(e,"by word")]),...e.state.readOnly?[]:[ve("br"),this.replaceField,n("replace",()=>cg(e),[Bt(e,"replace")]),n("replaceAll",()=>yA(e),[Bt(e,"replace all")])],ve("button",{name:"close",onclick:()=>dg(e),"aria-label":Bt(e,"close"),type:"button"},["×"])])}commit(){let e=new lg({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:Gs.of(e)}))}keydown(e){Vk(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ro:No)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),cg(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(Gs)&&!n.value.eq(this.query)&&this.setQuery(n.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(zn).top}}function Bt(i,e){return i.state.phrase(e)}const Vo=30,Lo=/[\s\.,:;?!]/;function Ec(i,{from:e,to:t}){let n=i.state.doc.lineAt(e),s=i.state.doc.lineAt(t).to,r=Math.max(n.from,e-Vo),o=Math.min(s,t+Vo),a=i.state.sliceDoc(r,o);if(r!=n.from){for(let c=0;c<Vo;c++)if(!Lo.test(a[c+1])&&Lo.test(a[c])){a=a.slice(c);break}}if(o!=s){for(let c=a.length-1;c>a.length-Vo;c--)if(!Lo.test(a[c-1])&&Lo.test(a[c])){a=a.slice(0,c);break}}return se.announce.of(`${i.state.phrase("current match")}. ${a} ${i.state.phrase("on line")} ${n.number}.`)}const xA=se.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"}}),SA=[sn,qi.low(OA),xA];class pg{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=rt(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),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),r=s.search(_g(e,!1));return r<0?null:{from:n+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function mg(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function CA(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let r=1;r<s.length;r++)t[s[r]]=!0}let n=mg(e)+mg(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function gg(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:CA(e);return s=>{let r=s.matchBefore(n);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function AA(i,e){return t=>{for(let n=rt(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class Og{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function yn(i){return i.selection.main.from}function _g(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",r=n[n.length-1]!="$";return!s&&!r?i:new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const $c=Pi.define();function QA(i,e,t,n){let{main:s}=i.selection,r=t-s.from,o=n-s.from;return Object.assign(Object.assign({},i.changeByRange(a=>{if(a!=s&&t!=n&&i.sliceDoc(a.from+r,a.from+o)!=i.sliceDoc(t,n))return{range:a};let c=i.toText(e);return{changes:{from:a.from+r,to:n==s.from?a.to:a.from+o,insert:c},range:j.cursor(a.from+r+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const bg=new WeakMap;function PA(i){if(!Array.isArray(i))return i;let e=bg.get(i);return e||bg.set(i,e=gg(i)),e}const Mo=we.define(),Ks=we.define();class TA{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 n=At(e,t),s=hi(n);this.chars.push(n);let r=e.slice(t,t+s),o=r.toUpperCase();this.folded.push(At(o==r?r.toLowerCase():o,0)),t+=s}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:n,any:s,precise:r,byWord:o}=this;if(t.length==1){let O=At(e,0),S=hi(O),y=S==e.length?0:-100;if(O!=t[0])if(O==n[0])y+=-200;else return null;return this.ret(y,[0,S])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,h=0;if(a<0){for(let O=0,S=Math.min(e.length,200);O<S&&h<c;){let y=At(e,O);(y==t[h]||y==n[h])&&(s[h++]=O),O+=hi(y)}if(h<c)return null}let u=0,f=0,d=!1,m=0,b=-1,w=-1,g=/[a-z]/.test(e),p=!0;for(let O=0,S=Math.min(e.length,200),y=0;O<S&&f<c;){let Q=At(e,O);a<0&&(u<c&&Q==t[u]&&(r[u++]=O),m<c&&(Q==t[m]||Q==n[m]?(m==0&&(b=O),w=O+1,m++):m=0));let k,C=Q<255?Q>=48&&Q<=57||Q>=97&&Q<=122?2:Q>=65&&Q<=90?1:0:(k=Ml(Q))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!O||C==1&&g||y==0&&C!=0)&&(t[f]==Q||n[f]==Q&&(d=!0)?o[f++]=O:o.length&&(p=!1)),y=C,O+=hi(Q)}return f==c&&o[0]==0&&p?this.result(-100+(d?-200:0),o,e):m==c&&b==0?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):m==c?this.ret(-200+-700-e.length,[b,w]):f==c?this.result(-100+(d?-200:0)+-700+(p?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],r=0;for(let o of t){let a=o+(this.astral?hi(At(n,o)):1);r&&s[r-1]==o?s[r-1]=a:(s[r++]=o,s[r++]=a)}return this.ret(e-n.length,s)}}class EA{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),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const lt=ae.define({combine(i){return fi(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:$A,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)=>n=>yg(e(n),t(n)),optionClass:(e,t)=>n=>yg(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function yg(i,e){return i?e?i+" "+e:i:e}function $A(i,e,t,n,s,r){let o=i.textDirection==Ie.RTL,a=o,c=!1,h="top",u,f,d=e.left-s.left,m=s.right-e.right,b=n.right-n.left,w=n.bottom-n.top;if(a&&d<Math.min(b,m)?a=!1:!a&&m<Math.min(b,d)&&(a=!0),b<=(a?d:m))u=Math.max(s.top,Math.min(t.top,s.bottom-w))-e.top,f=Math.min(400,a?d:m);else{c=!0,f=Math.min(400,(o?e.right:s.right-e.left)-30);let O=s.bottom-e.bottom;O>=w||O>e.top?u=t.bottom-e.top:(h="bottom",u=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,p=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${u/g}px; max-width: ${f/p}px`,class:"cm-completionInfo-"+(c?o?"left-narrow":"right-narrow":a?"left":"right")}}function NA(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let a=t.displayLabel||t.label,c=0;for(let h=0;h<r.length;){let u=r[h++],f=r[h++];u>c&&o.appendChild(document.createTextNode(a.slice(c,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",c=f}return c<a.length&&o.appendChild(document.createTextNode(a.slice(c))),o},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function Nc(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.floor((i-e)/t);return{from:i-(n+1)*t,to:i-n*t}}class RA{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,a=e.state.facet(lt);this.optionContent=NA(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Nc(r.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:h}=e.state.field(t).open;for(let u=c.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<h.length){this.applyCompletion(e,h[+f[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(lt).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:Ks.of(null)})}),this.showOptions(r,s.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 n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:r,selected:o,disabled:a}=n.open;(!s.open||s.open.options!=r)&&(this.range=Nc(r.length,o,e.state.facet(lt).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),a!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);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=Nc(t.options.length,t.selected,this.view.state.facet(lt).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:s}=n;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(n);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,n)}).catch(o=>Pt(this.view.state,o,"completion info")):this.addInfoPane(r,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;n.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&LA(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(lt).positionInfo(this.view,t,s,n,r,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,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions"));let r=null;for(let o=n.from;o<n.to;o++){let{completion:a,match:c}=e[o],{section:h}=a;if(h){let d=typeof h=="string"?h:h.name;if(d!=r&&(o>n.from||n.from==0))if(r=d,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let m=s.appendChild(document.createElement("completion-section"));m.textContent=d}}const u=s.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let m=d(a,this.view.state,this.view,c);m&&u.appendChild(m)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function VA(i,e){return t=>new RA(t,i,e)}function LA(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function wg(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function MA(i,e){let t=[],n=null,s=h=>{t.push(h);let{section:u}=h.completion;if(u){n||(n=[]);let f=typeof u=="string"?u:u.name;n.some(d=>d.name==f)||n.push(typeof u=="string"?{name:f}:u)}},r=e.facet(lt);for(let h of i)if(h.hasResult()){let u=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new Og(f,h.source,u?u(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),d,m=r.filterStrict?new EA(f):new TA(f);for(let b of h.result.options)if(d=m.match(b.label)){let w=b.displayLabel?u?u(b,d.matched):[]:d.matched;s(new Og(b,h.source,w,d.score+(b.boost||0)))}}}if(n){let h=Object.create(null),u=0,f=(d,m)=>{var b,w;return((b=d.rank)!==null&&b!==void 0?b:1e9)-((w=m.rank)!==null&&w!==void 0?w:1e9)||(d.name<m.name?-1:1)};for(let d of n.sort(f))u-=1e5,h[d.name]=u;for(let d of t){let{section:m}=d.completion;m&&(d.score+=h[typeof m=="string"?m:m.name])}}let o=[],a=null,c=r.compareCompletions;for(let h of t.sort((u,f)=>f.score-u.score||c(u.completion,f.completion))){let u=h.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?o.push(h):wg(h.completion)>wg(a)&&(o[o.length-1]=h),a=h.completion}return o}class Kn{constructor(e,t,n,s,r,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Kn(this.options,kg(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,r,o){if(s&&!o&&e.some(h=>h.isPending))return s.setDisabled();let a=MA(e,t);if(!a.length)return s&&e.some(h=>h.isPending)?s.setDisabled():null;let c=t.facet(lt).selectOnOpen?0:-1;if(s&&s.selected!=c&&s.selected!=-1){let h=s.options[s.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==h){c=u;break}}return new Kn(a,kg(n,c),{pos:e.reduce((h,u)=>u.hasResult()?Math.min(h,u.from):h,1e8),create:UA,above:r.aboveCursor},s?s.timestamp:Date.now(),c,!1)}map(e){return new Kn(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new Kn(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Bo{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Bo(ZA,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(lt),r=(n.override||t.languageDataAt("autocomplete",yn(t)).map(PA)).map(c=>(this.active.find(u=>u.source==c)||new Wt(c,this.active.some(u=>u.state!=0)?1:0)).update(e,n));r.length==this.active.length&&r.every((c,h)=>c==this.active[h])&&(r=this.active);let o=this.open,a=e.effects.some(c=>c.is(Rc));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!BA(r,this.active)||a?o=Kn.build(r,t,this.id,o,n,a):o&&o.disabled&&!r.some(c=>c.isPending)&&(o=null),!o&&r.every(c=>!c.isPending)&&r.some(c=>c.hasResult())&&(r=r.map(c=>c.hasResult()?new Wt(c.source,0):c));for(let c of e.effects)c.is(Sg)&&(o=o&&o.setSelected(c.value,this.id));return r==this.active&&o==this.open?this:new Bo(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?DA:vA}}function BA(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,r=n==e.length;if(s||r)return s==r;if(i[t++].result!=e[n++].result)return!1}}const DA={"aria-autocomplete":"list"},vA={};function kg(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const ZA=[];function xg(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation($c);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class Wt{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=xg(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new Wt(s.source,0)),n&4&&s.state==0&&(s=new Wt(this.source,1)),s=s.updateFor(e,n);for(let r of e.effects)if(r.is(Mo))s=new Wt(s.source,1,r.value);else if(r.is(Ks))s=new Wt(s.source,0);else if(r.is(Rc))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(yn(e.state))}}class Jn extends Wt{constructor(e,t,n,s,r,o){super(e,3,t),this.limit=n,this.result=s,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=yn(e.state);if(a>o||!s||t&2&&(yn(e.startState)==this.from||a<this.limit))return new Wt(this.source,t&4?1:0);let c=e.changes.mapPos(this.limit);return IA(s.validFor,e.state,r,o)?new Jn(this.source,this.explicit,c,s,r,o):s.update&&(s=s.update(s,r,o,new pg(e.state,a,!1)))?new Jn(this.source,this.explicit,c,s,s.from,(n=s.to)!==null&&n!==void 0?n:yn(e.state)):new Wt(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Jn(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Wt(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function IA(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):_g(i,!0).test(s)}const Rc=we.define({map(i,e){return i.map(t=>t.map(e))}}),Sg=we.define(),Nt=ot.define({create(){return Bo.start()},update(i,e){return i.update(e)},provide:i=>[Ua.from(i,e=>e.tooltip),se.contentAttributes.from(i,e=>e.attrs)]});function Vc(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field(Nt).active.find(s=>s.source==e.source);return n instanceof Jn?(typeof t=="string"?i.dispatch(Object.assign(Object.assign({},QA(i.state,t,n.from,n.to)),{annotations:$c.of(e.completion)})):t(i,e.completion,n.from,n.to),!0):!1}const UA=VA(Nt,Vc);function Do(i,e="option"){return t=>{let n=t.state.field(Nt,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(lt).interactionDelay)return!1;let s=1,r;e=="page"&&(r=kp(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));let{length:o}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:Sg.of(a)}),!0}}const FA=i=>{let e=i.state.field(Nt,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(lt).interactionDelay?!1:Vc(i,e.open.options[e.open.selected])},Cg=i=>i.state.field(Nt,!1)?(i.dispatch({effects:Mo.of(!0)}),!0):!1,jA=i=>{let e=i.state.field(Nt,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:Ks.of(null)}),!0)};class qA{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const XA=50,WA=1e3,YA=He.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field(Nt).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field(Nt),t=i.state.facet(lt);if(!i.selectionSet&&!i.docChanged&&i.startState.field(Nt)==e)return;let n=i.transactions.some(r=>{let o=xg(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;r<this.running.length;r++){let o=this.running[r];if(n||o.context.abortOnDocChange&&i.docChanged||o.updates.length+i.transactions.length>XA&&Date.now()-o.time>WA){for(let a of o.context.abortListeners)try{a()}catch(c){Pt(this.view.state,c)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(r=>r.effects.some(o=>o.is(Mo)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.isPending&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of i.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field(Nt);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(lt).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=yn(e),n=new pg(e,t,i.explicit,this.view),s=new qA(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Ks.of(null)}),Pt(this.view.state,r)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(lt).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(lt),n=this.view.state.field(Nt);for(let s=0;s<this.running.length;s++){let r=this.running[s];if(r.done===void 0)continue;if(this.running.splice(s--,1),r.done){let a=yn(r.updates.length?r.updates[0].startState:this.view.state),c=Math.min(a,r.done.from+(r.active.explicit?0:1)),h=new Jn(r.active.source,r.active.explicit,c,r.done,r.done.from,(i=r.done.to)!==null&&i!==void 0?i:a);for(let u of r.updates)h=h.update(u,t);if(h.hasResult()){e.push(h);continue}}let o=n.active.find(a=>a.source==r.active.source);if(o&&o.isPending)if(r.done==null){let a=new Wt(r.active.source,0);for(let c of r.updates)a=a.update(c,t);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Rc.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field(Nt,!1);if(e&&e.tooltip&&this.view.state.facet(lt).closeOnBlur){let t=e.open&&kp(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Ks.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Mo.of(!1)}),20),this.composing=0}}}),zA=typeof navigator=="object"&&/Win/.test(navigator.platform),GA=qi.highest(se.domEventHandlers({keydown(i,e){let t=e.state.field(Nt,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(zA&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(o=>o.source==n.source),r=n.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(i.key)>-1&&Vc(e,n),!1}})),Ag=se.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 HA{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class Lc{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,dt.TrackDel),n=e.mapPos(this.to,1,dt.TrackDel);return t==null||n==null?null:new Lc(this.field,t,n)}}class Mc{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let c of this.lines){if(n.length){let h=o,u=/^\t*/.exec(c)[0].length;for(let f=0;f<u;f++)h+=e.facet(js);s.push(t+h.length-u),c=h+c.slice(u)}n.push(c),t+=c.length+1}let a=this.fieldPositions.map(c=>new Lc(c.field,s[c.line]+c.from,s[c.line]+c.to));return{text:n,ranges:a}}static parse(e){let t=[],n=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let a=r[1]?+r[1]:null,c=r[2]||r[3]||"",h=-1,u=c.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:u&&t[f].name==u)&&(h=f);if(h<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:u}),h=f;for(let d of s)d.field>=h&&d.field++}s.push(new HA(h,n.length,r.index,r.index+u.length)),o=o.slice(0,r.index)+c+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(a,c,h)=>{for(let u of s)u.line==n.length&&u.from>h&&(u.from--,u.to--);return c}),n.push(o)}return new Mc(n,s)}}let KA=de.widget({widget:new class extends pi{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),JA=de.mark({class:"cm-snippetField"});class es{constructor(e,t){this.ranges=e,this.active=t,this.deco=de.set(e.map(n=>(n.from==n.to?KA:JA).range(n.from,n.to)))}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new es(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const Js=we.define({map(i,e){return i&&i.map(e)}}),eQ=we.define(),er=ot.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(Js))return t.value;if(t.is(eQ)&&i)return new es(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>se.decorations.from(i,e=>e?e.deco:de.none)});function Bc(i,e){return j.create(i.filter(t=>t.field==e).map(t=>j.range(t.from,t.to)))}function tQ(i){let e=Mc.parse(i);return(t,n,s,r)=>{let{text:o,ranges:a}=e.instantiate(t.state,s),{main:c}=t.state.selection,h={changes:{from:s,to:r==c.from?c.to:r,insert:Ae.of(o)},scrollIntoView:!0,annotations:n?[$c.of(n),Je.userEvent.of("input.complete")]:void 0};if(a.length&&(h.selection=Bc(a,0)),a.some(u=>u.field>0)){let u=new es(a,0),f=h.effects=[Js.of(u)];t.state.field(er,!1)===void 0&&f.push(we.appendConfig.of([er,nQ,sQ,Ag]))}t.dispatch(t.state.update(h))}}function Qg(i){return({state:e,dispatch:t})=>{let n=e.field(er,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,r=i>0&&!n.ranges.some(o=>o.field==s+i);return t(e.update({selection:Bc(n.ranges,s),effects:Js.of(r?null:new es(n.ranges,s)),scrollIntoView:!0})),!0}}const iQ=[{key:"Tab",run:Qg(1),shift:Qg(-1)},{key:"Escape",run:({state:i,dispatch:e})=>i.field(er,!1)?(e(i.update({effects:Js.of(null)})),!0):!1}],Pg=ae.define({combine(i){return i.length?i[0]:iQ}}),nQ=qi.highest(Rs.compute([Pg],i=>i.facet(Pg)));function Rt(i,e){return Object.assign(Object.assign({},e),{apply:tQ(i)})}const sQ=se.domEventHandlers({mousedown(i,e){let t=e.state.field(er,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=n&&r.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:Bc(t.ranges,s.field),effects:Js.of(t.ranges.some(r=>r.field>s.field)?new es(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),tr={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},wn=we.define({map(i,e){let t=e.mapPos(i,-1,dt.TrackAfter);return t??void 0}}),Dc=new class extends dn{};Dc.startSide=1,Dc.endSide=-1;const Tg=ot.define({create(){return Te.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(wn)&&(i=i.update({add:[Dc.range(t.value,t.value+1)]}));return i}});function rQ(){return[lQ,Tg]}const vc="()[]{}<>";function Eg(i){for(let e=0;e<vc.length;e+=2)if(vc.charCodeAt(e)==i)return vc.charAt(e+1);return Ml(i<128?i:i+1)}function $g(i,e){return i.languageDataAt("closeBrackets",e)[0]||tr}const oQ=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),lQ=se.inputHandler.of((i,e,t,n)=>{if((oQ?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&hi(At(n,0))==1||e!=s.from||t!=s.to)return!1;let r=cQ(i.state,n);return r?(i.dispatch(r),!0):!1}),aQ=[{key:"Backspace",run:({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=$g(i,i.selection.main.head).brackets||tr.brackets,s=null,r=i.changeByRange(o=>{if(o.empty){let a=hQ(i.doc,o.head);for(let c of n)if(c==a&&vo(i.doc,o.head)==Eg(At(c,0)))return{changes:{from:o.head-c.length,to:o.head+c.length},range:j.cursor(o.head-c.length)}}return{range:s=o}});return s||e(i.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s}}];function cQ(i,e){let t=$g(i,i.selection.main.head),n=t.brackets||tr.brackets;for(let s of n){let r=Eg(At(s,0));if(e==s)return r==s?dQ(i,s,n.indexOf(s+s+s)>-1,t):uQ(i,s,r,t.before||tr.before);if(e==r&&Ng(i,i.selection.main.from))return fQ(i,s,r)}return null}function Ng(i,e){let t=!1;return i.field(Tg).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function vo(i,e){let t=i.sliceString(e,e+2);return t.slice(0,hi(At(t,0)))}function hQ(i,e){let t=i.sliceString(e-2,e);return hi(At(t,0))==t.length?t:t.slice(1)}function uQ(i,e,t,n){let s=null,r=i.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:wn.of(o.to+e.length),range:j.range(o.anchor+e.length,o.head+e.length)};let a=vo(i.doc,o.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:o.head},effects:wn.of(o.head+e.length),range:j.cursor(o.head+e.length)}:{range:s=o}});return s?null:i.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function fQ(i,e,t){let n=null,s=i.changeByRange(r=>r.empty&&vo(i.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:j.cursor(r.head+t.length)}:n={range:r});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function dQ(i,e,t,n){let s=n.stringPrefixes||tr.stringPrefixes,r=null,o=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:wn.of(a.to+e.length),range:j.range(a.anchor+e.length,a.head+e.length)};let c=a.head,h=vo(i.doc,c),u;if(h==e){if(Rg(i,c))return{changes:{insert:e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)};if(Ng(i,c)){let d=t&&i.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+d.length,insert:d},range:j.cursor(c+d.length)}}}else{if(t&&i.sliceDoc(c-2*e.length,c)==e+e&&(u=Vg(i,c-2*e.length,s))>-1&&Rg(i,u))return{changes:{insert:e+e+e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)};if(i.charCategorizer(c)(h)!=je.Word&&Vg(i,c,s)>-1&&!pQ(i,c,e,s))return{changes:{insert:e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)}}return{range:r=a}});return r?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Rg(i,e){let t=rt(i).resolveInner(e+1);return t.parent&&t.from==e}function pQ(i,e,t,n){let s=rt(i).resolveInner(e,-1),r=n.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),c=a.indexOf(t);if(!c||c>-1&&n.indexOf(a.slice(0,c))>-1){let u=s.firstChild;for(;u&&u.from==s.from&&u.to-u.from>t.length+c;){if(i.sliceDoc(u.to-t.length,u.to)==t)return!1;u=u.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function Vg(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=je.Word)return e;for(let s of t){let r=e-s.length;if(i.sliceDoc(r,e)==s&&n(i.sliceDoc(r-1,r))!=je.Word)return r}return-1}function mQ(i={}){return[GA,Nt,lt.of(i),YA,gQ,Ag]}const Lg=[{key:"Ctrl-Space",run:Cg},{mac:"Alt-`",run:Cg},{key:"Escape",run:jA},{key:"ArrowDown",run:Do(!0)},{key:"ArrowUp",run:Do(!1)},{key:"PageDown",run:Do(!0,"page")},{key:"PageUp",run:Do(!1,"page")},{key:"Enter",run:FA}],gQ=qi.highest(Rs.computeN([lt],i=>i.facet(lt).defaultKeymap?[Lg]:[]));class Mg{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class kn{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=e,r=n.facet(ir).markerFilter;r&&(s=r(s,n));let o=e.slice().sort((f,d)=>f.from-d.from||f.to-d.to),a=new Ti,c=[],h=0;for(let f=0;;){let d=f==o.length?null:o[f];if(!d&&!c.length)break;let m,b;for(c.length?(m=h,b=c.reduce((g,p)=>Math.min(g,p.to),d&&d.from>m?d.from:1e8)):(m=d.from,b=d.to,c.push(d),f++);f<o.length;){let g=o[f];if(g.from==m&&(g.to>g.from||g.to==m))c.push(g),f++,b=Math.min(g.to,b);else{b=Math.min(g.from,b);break}}let w=PQ(c);if(c.some(g=>g.from==g.to||g.from==g.to-1&&n.doc.lineAt(g.from).to==g.from))a.add(m,m,de.widget({widget:new SQ(w),diagnostics:c.slice()}));else{let g=c.reduce((p,O)=>O.markClass?p+" "+O.markClass:p,"");a.add(m,b,de.mark({class:"cm-lintRange cm-lintRange-"+w+g,diagnostics:c.slice(),inclusiveEnd:c.some(p=>p.to>b)}))}h=b;for(let g=0;g<c.length;g++)c[g].to<=h&&c.splice(g--,1)}let u=a.finish();return new kn(u,t,ts(u))}}function ts(i,e=null,t=0){let n=null;return i.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!n)n=new Mg(s,r,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(n.diagnostic)<0)return!1;n=new Mg(n.from,r,n.diagnostic)}}),n}function OQ(i,e){let t=e.pos,n=e.end||t,s=i.state.facet(ir).hideOn(i,t,n);if(s!=null)return s;let r=i.startState.doc.lineAt(e.pos);return!!(i.effects.some(o=>o.is(Bg))||i.changes.touchesRange(r.from,Math.max(r.to,n)))}function _Q(i,e){return i.field(Dt,!1)?e:e.concat(we.appendConfig.of(TQ))}const Bg=we.define(),Zc=we.define(),Dg=we.define(),Dt=ot.define({create(){return new kn(de.none,null,null)},update(i,e){if(e.docChanged&&i.diagnostics.size){let t=i.diagnostics.map(e.changes),n=null,s=i.panel;if(i.selected){let r=e.changes.mapPos(i.selected.from,1);n=ts(t,i.selected.diagnostic,r)||ts(t,null,r)}!t.size&&s&&e.state.facet(ir).autoPanel&&(s=null),i=new kn(t,s,n)}for(let t of e.effects)if(t.is(Bg)){let n=e.state.facet(ir).autoPanel?t.value.length?nr.open:null:i.panel;i=kn.init(t.value,n,e.state)}else t.is(Zc)?i=new kn(i.diagnostics,t.value?nr.open:null,i.selected):t.is(Dg)&&(i=new kn(i.diagnostics,i.panel,t.value));return i},provide:i=>[vs.from(i,e=>e.panel),se.decorations.from(i,e=>e.diagnostics)]}),bQ=de.mark({class:"cm-lintRange cm-lintRange-active"});function yQ(i,e,t){let{diagnostics:n}=i.state.field(Dt),s,r=-1,o=-1;n.between(e-(t<0?1:0),e+(t>0?1:0),(c,h,{spec:u})=>{if(e>=c&&e<=h&&(c==h||(e>c||t>0)&&(e<h||t<0)))return s=u.diagnostics,r=c,o=h,!1});let a=i.state.facet(ir).tooltipFilter;return s&&a&&(s=a(s,i.state)),s?{pos:r,end:o,above:i.state.doc.lineAt(r).to<o,create(){return{dom:wQ(i,s)}}}:null}function wQ(i,e){return ve("ul",{class:"cm-tooltip-lint"},e.map(t=>Ig(i,t,!1)))}const kQ=i=>{let e=i.state.field(Dt,!1);(!e||!e.panel)&&i.dispatch({effects:_Q(i.state,[Zc.of(!0)])});let t=Ds(i,nr.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},vg=i=>{let e=i.state.field(Dt,!1);return!e||!e.panel?!1:(i.dispatch({effects:Zc.of(!1)}),!0)},xQ=[{key:"Mod-Shift-m",run:kQ,preventDefault:!0},{key:"F8",run:i=>{let e=i.state.field(Dt,!1);if(!e)return!1;let t=i.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(i.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)}}],ir=ae.define({combine(i){return Object.assign({sources:i.map(e=>e.source).filter(e=>e!=null)},fi(i.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function Zg(i){let e=[];if(i)e:for(let{name:t}of i){for(let n=0;n<t.length;n++){let s=t[n];if(/[a-zA-Z]/.test(s)&&!e.some(r=>r.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Ig(i,e,t){var n;let s=t?Zg(e.actions):[];return ve("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ve("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(i):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((r,o)=>{let a=!1,c=d=>{if(d.preventDefault(),a)return;a=!0;let m=ts(i.state.field(Dt).diagnostics,e);m&&r.apply(i,m.from,m.to)},{name:h}=r,u=s[o]?h.indexOf(s[o]):-1,f=u<0?h:[h.slice(0,u),ve("u",h.slice(u,u+1)),h.slice(u+1)];return ve("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${h}${u<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&ve("div",{class:"cm-diagnosticSource"},e.source))}class SQ extends pi{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return ve("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Ug{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ig(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nr{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)vg(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=Zg(r.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==s.keyCode){let c=ts(this.view.state.field(Dt).diagnostics,r);c&&r.actions[a].apply(e,c.from,c.to)}}else return;s.preventDefault()},n=s=>{for(let r=0;r<this.items.length;r++)this.items[r].dom.contains(s.target)&&this.moveSelection(r)};this.list=ve("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=ve("div",{class:"cm-panel-lint"},this.list,ve("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>vg(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Dt).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(Dt),n=0,s=!1,r=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:h})=>{for(let u of h.diagnostics){if(o.has(u))continue;o.add(u);let f=-1,d;for(let m=n;m<this.items.length;m++)if(this.items[m].diagnostic==u){f=m;break}f<0?(d=new Ug(this.view,u),this.items.splice(n,0,d),s=!0):(d=this.items[f],f>n&&(this.items.splice(n,f-n),s=!0)),t&&d.diagnostic==t.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),r=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();this.items.length==0&&(this.items.push(new Ug(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let h=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/h:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Dt),n=ts(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:Dg.of(n)})}static open(e){return new nr(e)}}function CQ(i,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(i)}</svg>')`}function Zo(i){return CQ(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${i}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const AQ=se.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:Zo("#d11")},".cm-lintRange-warning":{backgroundImage:Zo("orange")},".cm-lintRange-info":{backgroundImage:Zo("#999")},".cm-lintRange-hint":{backgroundImage:Zo("#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}}});function QQ(i){return i=="error"?4:i=="warning"?3:i=="info"?2:1}function PQ(i){let e="hint",t=1;for(let n of i){let s=QQ(n.severity);s>t&&(t=s,e=n.severity)}return e}const TQ=[Dt,se.decorations.compute([Dt],i=>{let{selected:e,panel:t}=i.field(Dt);return!e||!t||e.from==e.to?de.none:de.set([bQ.range(e.from,e.to)])}),kx(yQ,{hideOn:OQ}),AQ],EQ=(()=>[Rx(),Mx(),Hk(),GS(),SS(),Zk(),qk(),Se.allowMultipleSelections.of(!0),fS(),om(PS,{fallback:!0}),VS(),rQ(),mQ(),ux(),px(),nx(),iA(),Rs.of([...aQ,...GC,...wA,...rC,...yS,...Lg,...xQ])])();/*!
21
+ */const J0="10.0.5";function eb(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ln().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ln().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1)}const Ui={FALLBACK_TO_ROOT:y0,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},tb={[Ui.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Ui.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Ui.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Ui.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function yr(i,...e){return ur(tb[i],...e)}const Me={UNEXPECTED_RETURN_TYPE:l0,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function yt(i,...e){return Qn(i,null,process.env.NODE_ENV!=="production"?{messages:ib,args:e}:void 0)}const ib={[Me.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Me.INVALID_ARGUMENT]:"Invalid argument",[Me.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Me.NOT_INSTALLED]:"Need to install with `app.use` function",[Me.UNEXPECTED_ERROR]:"Unexpected error",[Me.REQUIRED_VALUE]:"Required in value: {0}",[Me.INVALID_VALUE]:"Invalid value",[Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Me.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Me.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Me.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},yl=si("__translateVNode"),wl=si("__datetimeParts"),kl=si("__numberParts"),cn=si("__enableEmitter"),us=si("__disableEmitter"),eu=si("__setPluralRules"),tu=si("__injectWithOption"),xl=si("__dispose");function fs(i){if(!Ce(i))return i;for(const e in i)if(zt(i,e))if(!e.includes("."))Ce(i[e])&&fs(i[e]);else{const t=e.split("."),n=t.length-1;let s=i,r=!1;for(let o=0;o<n;o++){if(t[o]in s||(s[t[o]]=Ve()),!Ce(s[t[o]])){process.env.NODE_ENV!=="production"&&Bi(yr(Ui.IGNORE_OBJ_FLATTEN,{key:t[o]})),r=!0;break}s=s[t[o]]}r||(s[t[n]]=i[e],delete i[e]),Ce(s[t[n]])&&fs(s[t[n]])}return i}function Sl(i,e){const{messages:t,__i18n:n,messageResolver:s,flatJson:r}=e,o=ke(t)?t:We(n)?Ve():{[i]:Ve()};if(We(n)&&n.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:c,resource:h}=a;c?(o[c]=o[c]||Ve(),pr(h,o[c])):pr(h,o)}else ne(a)&&pr(JSON.parse(a),o)}),s==null&&r)for(const a in o)zt(o,a)&&fs(o[a]);return o}function iu(i){return i.type}function nu(i,e,t){let n=Ce(e.messages)?e.messages:Ve();"__i18nGlobal"in t&&(n=Sl(i.locale.value,{messages:n,__i18n:t.__i18nGlobal}));const s=Object.keys(n);s.length&&s.forEach(r=>{i.mergeLocaleMessage(r,n[r])});{if(Ce(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{i.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(Ce(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{i.mergeNumberFormat(o,e.numberFormats[o])})}}}function su(i){return l.createVNode(l.Text,null,i,0)}const ru="__INTLIFY_META__",ou=()=>[],nb=()=>!1;let lu=0;function au(i){return(e,t,n,s)=>i(t,n,l.getCurrentInstance()||void 0,s)}const sb=()=>{const i=l.getCurrentInstance();let e=null;return i&&(e=iu(i)[ru])?{[ru]:e}:null};function Cl(i={}){const{__root:e,__injectWithOption:t}=i,n=e===void 0,s=i.flatJson,r=Yt?l.ref:l.shallowRef;let o=Te(i.inheritLocale)?i.inheritLocale:!0;const a=r(e&&o?e.locale.value:ne(i.locale)?i.locale:cs),c=r(e&&o?e.fallbackLocale.value:ne(i.fallbackLocale)||We(i.fallbackLocale)||ke(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:a.value),h=r(Sl(a.value,i)),u=r(ke(i.datetimeFormats)?i.datetimeFormats:{[a.value]:{}}),f=r(ke(i.numberFormats)?i.numberFormats:{[a.value]:{}});let d=e?e.missingWarn:Te(i.missingWarn)||An(i.missingWarn)?i.missingWarn:!0,m=e?e.fallbackWarn:Te(i.fallbackWarn)||An(i.fallbackWarn)?i.fallbackWarn:!0,b=e?e.fallbackRoot:Te(i.fallbackRoot)?i.fallbackRoot:!0,w=!!i.fallbackFormat,g=Le(i.missing)?i.missing:null,p=Le(i.missing)?au(i.missing):null,O=Le(i.postTranslation)?i.postTranslation:null,C=e?e.warnHtmlMessage:Te(i.warnHtmlMessage)?i.warnHtmlMessage:!0,y=!!i.escapeParameter;const E=e?e.modifiers:ke(i.modifiers)?i.modifiers:{};let x=i.pluralRules||e&&e.pluralRules,k;k=(()=>{n&&Mh(null);const F={version:J0,locale:a.value,fallbackLocale:c.value,messages:h.value,modifiers:E,pluralRules:x,missing:p===null?void 0:p,missingWarn:d,fallbackWarn:m,fallbackFormat:w,unresolving:!0,postTranslation:O===null?void 0:O,warnHtmlMessage:C,escapeParameter:y,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};F.datetimeFormats=u.value,F.numberFormats=f.value,F.__datetimeFormatters=ke(k)?k.__datetimeFormatters:void 0,F.__numberFormatters=ke(k)?k.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(F.__v_emitter=ke(k)?k.__v_emitter:void 0);const G=E0(F);return n&&Mh(G),G})(),hs(k,a.value,c.value);function N(){return[a.value,c.value,h.value,u.value,f.value]}const _=l.computed({get:()=>a.value,set:F=>{a.value=F,k.locale=a.value}}),A=l.computed({get:()=>c.value,set:F=>{c.value=F,k.fallbackLocale=c.value,hs(k,a.value,F)}}),S=l.computed(()=>h.value),M=l.computed(()=>u.value),T=l.computed(()=>f.value);function I(){return Le(O)?O:null}function B(F){O=F,k.postTranslation=F}function U(){return g}function Z(F){F!==null&&(p=au(F)),g=F,k.missing=p}function K(F,G){return F!=="translate"||!G.resolvedMessage}const X=(F,G,Pe,Fe,Li,rs)=>{N();let sn;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=e?T0():void 0),sn=F(k)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=void 0)}if(Pe!=="translate exists"&&Ye(sn)&&sn===Or||Pe==="translate exists"&&!sn){const[Mi,il]=G();if(process.env.NODE_ENV!=="production"&&e&&ne(Mi)&&K(Pe,il)&&(b&&(br(m,Mi)||Dh(d,Mi))&&Bi(yr(Ui.FALLBACK_TO_ROOT,{key:Mi,type:Pe})),process.env.NODE_ENV!=="production")){const{__v_emitter:os}=k;os&&b&&os.emit("fallback",{type:Pe,key:Mi,to:"global",groupId:`${Pe}:${Mi}`})}return e&&b?Fe(e):Li(Mi)}else{if(rs(sn))return sn;throw yt(Me.UNEXPECTED_RETURN_TYPE)}};function J(...F){return X(G=>Reflect.apply(Gh,null,[G,...F]),()=>_l(...F),"translate",G=>Reflect.apply(G.t,G,[...F]),G=>G,G=>ne(G))}function fe(...F){const[G,Pe,Fe]=F;if(Fe&&!Ce(Fe))throw yt(Me.INVALID_ARGUMENT);return J(G,Pe,tt({resolvedMessage:!0},Fe||{}))}function he(...F){return X(G=>Reflect.apply(Uh,null,[G,...F]),()=>gl(...F),"datetime format",G=>Reflect.apply(G.d,G,[...F]),()=>_r,G=>ne(G))}function ye(...F){return X(G=>Reflect.apply(qh,null,[G,...F]),()=>Ol(...F),"number format",G=>Reflect.apply(G.n,G,[...F]),()=>_r,G=>ne(G))}function z(F){return F.map(G=>ne(G)||Ye(G)||Te(G)?su(String(G)):G)}const V={normalize:z,interpolate:F=>F,type:"vnode"};function q(...F){return X(G=>{let Pe;const Fe=G;try{Fe.processor=V,Pe=Reflect.apply(Gh,null,[Fe,...F])}finally{Fe.processor=null}return Pe},()=>_l(...F),"translate",G=>G[yl](...F),G=>[su(G)],G=>We(G))}function H(...F){return X(G=>Reflect.apply(qh,null,[G,...F]),()=>Ol(...F),"number format",G=>G[kl](...F),ou,G=>ne(G)||We(G))}function Ue(...F){return X(G=>Reflect.apply(Uh,null,[G,...F]),()=>gl(...F),"datetime format",G=>G[wl](...F),ou,G=>ne(G)||We(G))}function Ri(F){x=F,k.pluralRules=x}function Re(F,G){return X(()=>{if(!F)return!1;const Pe=ne(G)?G:a.value,Fe=Dt(Pe),Li=k.messageResolver(Fe,F);return Zi(Li)||Zt(Li)||ne(Li)},()=>[F],"translate exists",Pe=>Reflect.apply(Pe.te,Pe,[F,G]),nb,Pe=>Te(Pe))}function qe(F){let G=null;const Pe=Qh(k,c.value,a.value);for(let Fe=0;Fe<Pe.length;Fe++){const Li=h.value[Pe[Fe]]||{},rs=k.messageResolver(Li,F);if(rs!=null){G=rs;break}}return G}function Wt(F){const G=qe(F);return G??(e?e.tm(F)||{}:{})}function Dt(F){return h.value[F]||{}}function ki(F,G){if(s){const Pe={[F]:G};for(const Fe in Pe)zt(Pe,Fe)&&fs(Pe[Fe]);G=Pe[F]}h.value[F]=G,k.messages=h.value}function Vi(F,G){h.value[F]=h.value[F]||{};const Pe={[F]:G};if(s)for(const Fe in Pe)zt(Pe,Fe)&&fs(Pe[Fe]);G=Pe[F],pr(G,h.value[F]),k.messages=h.value}function R(F){return u.value[F]||{}}function Q(F,G){u.value[F]=G,k.datetimeFormats=u.value,jh(k,F,G)}function W(F,G){u.value[F]=tt(u.value[F]||{},G),k.datetimeFormats=u.value,jh(k,F,G)}function Y(F){return f.value[F]||{}}function $e(F,G){f.value[F]=G,k.numberFormats=f.value,Wh(k,F,G)}function Xe(F,G){f.value[F]=tt(f.value[F]||{},G),k.numberFormats=f.value,Wh(k,F,G)}lu++,e&&Yt&&(l.watch(e.locale,F=>{o&&(a.value=F,k.locale=F,hs(k,a.value,c.value))}),l.watch(e.fallbackLocale,F=>{o&&(c.value=F,k.fallbackLocale=F,hs(k,a.value,c.value))}));const Qe={id:lu,locale:_,fallbackLocale:A,get inheritLocale(){return o},set inheritLocale(F){o=F,F&&e&&(a.value=e.locale.value,c.value=e.fallbackLocale.value,hs(k,a.value,c.value))},get availableLocales(){return Object.keys(h.value).sort()},messages:S,get modifiers(){return E},get pluralRules(){return x||{}},get isGlobal(){return n},get missingWarn(){return d},set missingWarn(F){d=F,k.missingWarn=d},get fallbackWarn(){return m},set fallbackWarn(F){m=F,k.fallbackWarn=m},get fallbackRoot(){return b},set fallbackRoot(F){b=F},get fallbackFormat(){return w},set fallbackFormat(F){w=F,k.fallbackFormat=w},get warnHtmlMessage(){return C},set warnHtmlMessage(F){C=F,k.warnHtmlMessage=F},get escapeParameter(){return y},set escapeParameter(F){y=F,k.escapeParameter=F},t:J,getLocaleMessage:Dt,setLocaleMessage:ki,mergeLocaleMessage:Vi,getPostTranslationHandler:I,setPostTranslationHandler:B,getMissingHandler:U,setMissingHandler:Z,[eu]:Ri};return Qe.datetimeFormats=M,Qe.numberFormats=T,Qe.rt=fe,Qe.te=Re,Qe.tm=Wt,Qe.d=he,Qe.n=ye,Qe.getDateTimeFormat=R,Qe.setDateTimeFormat=Q,Qe.mergeDateTimeFormat=W,Qe.getNumberFormat=Y,Qe.setNumberFormat=$e,Qe.mergeNumberFormat=Xe,Qe[tu]=t,Qe[yl]=q,Qe[wl]=Ue,Qe[kl]=H,process.env.NODE_ENV!=="production"&&(Qe[cn]=F=>{k.__v_emitter=F},Qe[us]=()=>{k.__v_emitter=void 0}),Qe}const cu="vue-i18n: composer properties",Al={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},rb={"vue-i18n-resource-inspector":"Search for scopes ..."},ob={"vue-i18n-timeline":16764185};let Ql;async function lb(i,e){return new Promise((t,n)=>{try{K0({id:"vue-devtools-plugin-vue-i18n",label:Al["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:[cu],app:i},s=>{Ql=s,s.on.visitComponentTree(({componentInstance:o,treeNode:a})=>{ab(o,a,e)}),s.on.inspectComponent(({componentInstance:o,instanceData:a})=>{o.vnode.el&&o.vnode.el.__VUE_I18N__&&a&&(e.mode==="legacy"?o.vnode.el.__VUE_I18N__!==e.global.__composer&&uu(a,o.vnode.el.__VUE_I18N__):uu(a,o.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Al["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:rb["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&db(o,e)});const r=new Map;s.on.getInspectorState(async o=>{if(o.app===i&&o.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),mb(o,e),o.nodeId==="global"){if(!r.has(o.app)){const[a]=await s.getComponentInstances(o.app);r.set(o.app,a)}s.highlightElement(r.get(o.app))}else{const a=pb(o.nodeId,e);a&&s.highlightElement(a)}}),s.on.editInspectorState(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&Ob(o,e)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Al["vue-i18n-timeline"],color:ob["vue-i18n-timeline"]}),t(!0)})}catch(s){console.error(s),n(!1)}})}function hu(i){return i.type.name||i.type.displayName||i.type.__file||"Anonymous"}function ab(i,e,t){const n=t.mode==="composition"?t.global:t.global.__composer;if(i&&i.vnode.el&&i.vnode.el.__VUE_I18N__&&i.vnode.el.__VUE_I18N__!==n){const s={label:`i18n (${hu(i)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(s)}}function uu(i,e){const t=cu;i.state.push({type:t,key:"locale",editable:!0,value:e.locale.value}),i.state.push({type:t,key:"availableLocales",editable:!1,value:e.availableLocales}),i.state.push({type:t,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),i.state.push({type:t,key:"inheritLocale",editable:!0,value:e.inheritLocale}),i.state.push({type:t,key:"messages",editable:!1,value:Pl(e.messages.value)}),i.state.push({type:t,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),i.state.push({type:t,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Pl(i){const e={};return Object.keys(i).forEach(t=>{const n=i[t];Le(n)&&"source"in n?e[t]=fb(n):Zi(n)&&n.loc&&n.loc.source?e[t]=n.loc.source:Ce(n)?e[t]=Pl(n):e[t]=n}),e}const cb={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function hb(i){return i.replace(/[<>"&]/g,ub)}function ub(i){return cb[i]||i}function fb(i){return{_custom:{type:"function",display:`<span>ƒ</span> ${i.source?`("${hb(i.source)}")`:"(?)"}`}}}function db(i,e){i.rootNodes.push({id:"global",label:"Global Scope"});const t=e.mode==="composition"?e.global:e.global.__composer;for(const[n,s]of e.__instances){const r=e.mode==="composition"?s:s.__composer;t!==r&&i.rootNodes.push({id:r.id.toString(),label:`${hu(n)} Scope`})}}function pb(i,e){let t=null;if(i!=="global"){for(const[n,s]of e.__instances.entries())if(s.id.toString()===i){t=n;break}}return t}function fu(i,e){if(i==="global")return e.mode==="composition"?e.global:e.global.__composer;{const t=Array.from(e.__instances.values()).find(n=>n.id.toString()===i);return t?e.mode==="composition"?t:t.__composer:null}}function mb(i,e){const t=fu(i.nodeId,e);return t&&(i.state=gb(t)),null}function gb(i){const e={},t="Locale related info",n=[{type:t,key:"locale",editable:!0,value:i.locale.value},{type:t,key:"fallbackLocale",editable:!0,value:i.fallbackLocale.value},{type:t,key:"availableLocales",editable:!1,value:i.availableLocales},{type:t,key:"inheritLocale",editable:!0,value:i.inheritLocale}];e[t]=n;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:Pl(i.messages.value)}];e[s]=r;{const o="Datetime formats info",a=[{type:o,key:"datetimeFormats",editable:!1,value:i.datetimeFormats.value}];e[o]=a;const c="Datetime formats info",h=[{type:c,key:"numberFormats",editable:!1,value:i.numberFormats.value}];e[c]=h}return e}function ds(i,e){if(Ql){let t;e&&"groupId"in e&&(t=e.groupId,delete e.groupId),Ql.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:i,groupId:t,time:Date.now(),meta:{},data:e||{},logType:i==="compile-error"?"error":i==="fallback"||i==="missing"?"warning":"default"}})}}function Ob(i,e){const t=fu(i.nodeId,e);if(t){const[n]=i.path;n==="locale"&&ne(i.state.value)?t.locale.value=i.state.value:n==="fallbackLocale"&&(ne(i.state.value)||We(i.state.value)||Ce(i.state.value))?t.fallbackLocale.value=i.state.value:n==="inheritLocale"&&Te(i.state.value)&&(t.inheritLocale=i.state.value)}}function _b(i){const e=ne(i.locale)?i.locale:cs,t=ne(i.fallbackLocale)||We(i.fallbackLocale)||ke(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:e,n=Le(i.missing)?i.missing:void 0,s=Te(i.silentTranslationWarn)||An(i.silentTranslationWarn)?!i.silentTranslationWarn:!0,r=Te(i.silentFallbackWarn)||An(i.silentFallbackWarn)?!i.silentFallbackWarn:!0,o=Te(i.fallbackRoot)?i.fallbackRoot:!0,a=!!i.formatFallbackMessages,c=ke(i.modifiers)?i.modifiers:{},h=i.pluralizationRules,u=Le(i.postTranslation)?i.postTranslation:void 0,f=ne(i.warnHtmlInMessage)?i.warnHtmlInMessage!=="off":!0,d=!!i.escapeParameterHtml,m=Te(i.sync)?i.sync:!0;let b=i.messages;if(ke(i.sharedMessages)){const E=i.sharedMessages;b=Object.keys(E).reduce((k,P)=>{const N=k[P]||(k[P]={});return tt(N,E[P]),k},b||{})}const{__i18n:w,__root:g,__injectWithOption:p}=i,O=i.datetimeFormats,C=i.numberFormats,y=i.flatJson;return{locale:e,fallbackLocale:t,messages:b,flatJson:y,datetimeFormats:O,numberFormats:C,missing:n,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:a,modifiers:c,pluralRules:h,postTranslation:u,warnHtmlMessage:f,escapeParameter:d,messageResolver:i.messageResolver,inheritLocale:m,__i18n:w,__root:g,__injectWithOption:p}}function Tl(i={}){const e=Cl(_b(i)),{__extender:t}=i,n={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return Te(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=Te(s)?!s:s},get silentFallbackWarn(){return Te(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=Te(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},tc(...s){const[r,o,a]=s,c={plural:1};let h=null,u=null;if(process.env.NODE_ENV!=="production"&&wh(yr(Ui.DEPRECATE_TC)),!ne(r))throw yt(Me.INVALID_ARGUMENT);const f=r;return ne(o)?c.locale=o:Ye(o)?c.plural=o:We(o)?h=o:ke(o)&&(u=o),ne(a)?c.locale=a:We(a)?h=a:ke(a)&&(u=a),Reflect.apply(e.t,e,[f,h||u||{},c])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return n.__extender=t,process.env.NODE_ENV!=="production"&&(n.__enableEmitter=s=>{const r=e;r[cn]&&r[cn](s)},n.__disableEmitter=()=>{const s=e;s[us]&&s[us]()}),n}function bb(i,e,t){return{beforeCreate(){const n=l.getCurrentInstance();if(!n)throw yt(Me.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=du(i,r);else{r.__injectWithOption=!0,r.__extender=t.__vueI18nExtend,this.$i18n=Tl(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=du(i,s);else{this.$i18n=Tl({__i18n:s.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=i;s.__i18nGlobal&&nu(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),t.__setInstance(n,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const n=this.$i18n;this.$el.__VUE_I18N__=n.__composer;const s=this.__v_emitter=ol();n.__enableEmitter&&n.__enableEmitter(s),s.on("*",ds)}},unmounted(){const n=l.getCurrentInstance();if(!n)throw yt(Me.UNEXPECTED_ERROR);const s=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ds),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__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,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),t.__deleteInstance(n),delete this.$i18n}}}function du(i,e){i.locale=e.locale||i.locale,i.fallbackLocale=e.fallbackLocale||i.fallbackLocale,i.missing=e.missing||i.missing,i.silentTranslationWarn=e.silentTranslationWarn||i.silentFallbackWarn,i.silentFallbackWarn=e.silentFallbackWarn||i.silentFallbackWarn,i.formatFallbackMessages=e.formatFallbackMessages||i.formatFallbackMessages,i.postTranslation=e.postTranslation||i.postTranslation,i.warnHtmlInMessage=e.warnHtmlInMessage||i.warnHtmlInMessage,i.escapeParameterHtml=e.escapeParameterHtml||i.escapeParameterHtml,i.sync=e.sync||i.sync,i.__composer[eu](e.pluralizationRules||i.pluralizationRules);const t=Sl(i.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(n=>i.mergeLocaleMessage(n,t[n])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(n=>i.mergeDateTimeFormat(n,e.datetimeFormats[n])),e.numberFormats&&Object.keys(e.numberFormats).forEach(n=>i.mergeNumberFormat(n,e.numberFormats[n])),i}const El={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:i=>i==="parent"||i==="global",default:"parent"},i18n:{type:Object}};function yb({slots:i},e){return e.length===1&&e[0]==="default"?(i.default?i.default():[]).reduce((n,s)=>[...n,...s.type===l.Fragment?s.children:[s]],[]):e.reduce((t,n)=>{const s=i[n];return s&&(t[n]=s()),t},Ve())}function pu(){return l.Fragment}const mu=l.defineComponent({name:"i18n-t",props:tt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:i=>Ye(i)||!isNaN(i)}},El),setup(i,e){const{slots:t,attrs:n}=e,s=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f!=="_"),o=Ve();i.locale&&(o.locale=i.locale),i.plural!==void 0&&(o.plural=ne(i.plural)?+i.plural:i.plural);const a=yb(e,r),c=s[yl](i.keypath,a,o),h=tt(Ve(),n),u=ne(i.tag)||Ce(i.tag)?i.tag:pu();return l.h(u,h,c)}}});function wb(i){return We(i)&&!ne(i[0])}function gu(i,e,t,n){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=Ve();i.locale&&(o.locale=i.locale),ne(i.format)?o.key=i.format:Ce(i.format)&&(ne(i.format.key)&&(o.key=i.format.key),a=Object.keys(i.format).reduce((d,m)=>t.includes(m)?tt(Ve(),d,{[m]:i.format[m]}):d,Ve()));const c=n(i.value,o,a);let h=[o.key];We(c)?h=c.map((d,m)=>{const b=s[d.type],w=b?b({[d.type]:d.value,index:m,parts:c}):[d.value];return wb(w)&&(w[0].key=`${d.type}-${m}`),w}):ne(c)&&(h=[c]);const u=tt(Ve(),r),f=ne(i.tag)||Ce(i.tag)?i.tag:pu();return l.h(f,u,h)}}const Ou=l.defineComponent({name:"i18n-n",props:tt({value:{type:Number,required:!0},format:{type:[String,Object]}},El),setup(i,e){const t=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return gu(i,e,Xh,(...n)=>t[kl](...n))}}),_u=l.defineComponent({name:"i18n-d",props:tt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},El),setup(i,e){const t=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return gu(i,e,Fh,(...n)=>t[wl](...n))}});function kb(i,e){const t=i;if(i.mode==="composition")return t.__getInstance(e)||i.global;{const n=t.__getInstance(e);return n!=null?n.__composer:i.global.__composer}}function xb(i){const e=o=>{const{instance:a,value:c}=o;if(!a||!a.$)throw yt(Me.UNEXPECTED_ERROR);const h=kb(i,a.$),u=bu(c);return[Reflect.apply(h.t,h,[...yu(u)]),h]};return{created:(o,a)=>{const[c,h]=e(a);Yt&&i.global===h&&(o.__i18nWatcher=l.watch(h.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=h,o.textContent=c},unmounted:o=>{Yt&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const c=o.__composer,h=bu(a);o.textContent=Reflect.apply(c.t,c,[...yu(h)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function bu(i){if(ne(i))return{path:i};if(ke(i)){if(!("path"in i))throw yt(Me.REQUIRED_VALUE,"path");return i}else throw yt(Me.INVALID_VALUE)}function yu(i){const{path:e,locale:t,args:n,choice:s,plural:r}=i,o={},a=n||{};return ne(t)&&(o.locale=t),Ye(s)&&(o.plural=s),Ye(r)&&(o.plural=r),[e,a,o]}function Sb(i,e,...t){const n=ke(t[0])?t[0]:{};(Te(n.globalInstall)?n.globalInstall:!0)&&([mu.name,"I18nT"].forEach(r=>i.component(r,mu)),[Ou.name,"I18nN"].forEach(r=>i.component(r,Ou)),[_u.name,"I18nD"].forEach(r=>i.component(r,_u))),i.directive("t",xb(e))}const Cb=si("global-vue-i18n");function wu(i={},e){const t=__VUE_I18N_LEGACY_API__&&Te(i.legacy)?i.legacy:__VUE_I18N_LEGACY_API__,n=Te(i.globalInjection)?i.globalInjection:!0,s=new Map,[r,o]=Ab(i,t),a=si(process.env.NODE_ENV!=="production"?"vue-i18n":"");function c(d){return s.get(d)||null}function h(d,m){s.set(d,m)}function u(d){s.delete(d)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...m){if(process.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=f),d.__VUE_I18N_SYMBOL__=a,d.provide(d.__VUE_I18N_SYMBOL__,f),ke(m[0])){const g=m[0];f.__composerExtend=g.__composerExtend,f.__vueI18nExtend=g.__vueI18nExtend}let b=null;!t&&n&&(b=Vb(d,f.global)),__VUE_I18N_FULL_INSTALL__&&Sb(d,f,...m),__VUE_I18N_LEGACY_API__&&t&&d.mixin(bb(o,o.__composer,f));const w=d.unmount;if(d.unmount=()=>{b&&b(),f.dispose(),w()},process.env.NODE_ENV!=="production"){if(!await lb(d,f))throw yt(Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const p=ol();if(t){const O=o;O.__enableEmitter&&O.__enableEmitter(p)}else{const O=o;O[cn]&&O[cn](p)}p.on("*",ds)}},get global(){return o},dispose(){r.stop()},__instances:s,__getInstance:c,__setInstance:h,__deleteInstance:u};return f}function Gt(i={}){const e=l.getCurrentInstance();if(e==null)throw yt(Me.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw yt(Me.NOT_INSTALLED);const t=Qb(e),n=Tb(t),s=iu(e),r=Pb(i,s);if(r==="global")return nu(n,i,s),n;if(r==="parent"){let c=Eb(t,e,i.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Bi(yr(Ui.NOT_FOUND_PARENT_SCOPE)),c=n),c}const o=t;let a=o.__getInstance(e);if(a==null){const c=tt({},i);"__i18n"in s&&(c.__i18n=s.__i18n),n&&(c.__root=n),a=Cl(c),o.__composerExtend&&(a[xl]=o.__composerExtend(a)),Nb(o,e,a),o.__setInstance(e,a)}return a}function Ab(i,e,t){const n=l.effectScope(),s=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Tl(i)):n.run(()=>Cl(i));if(s==null)throw yt(Me.UNEXPECTED_ERROR);return[n,s]}function Qb(i){const e=l.inject(i.isCE?Cb:i.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw yt(i.isCE?Me.NOT_INSTALLED_WITH_PROVIDE:Me.UNEXPECTED_ERROR);return e}function Pb(i,e){return fr(i)?"__i18n"in e?"local":"global":i.useScope?i.useScope:"local"}function Tb(i){return i.mode==="composition"?i.global:i.global.__composer}function Eb(i,e,t=!1){let n=null;const s=e.root;let r=$b(e,t);for(;r!=null;){const o=i;if(i.mode==="composition")n=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(r);a!=null&&(n=a.__composer,t&&n&&!n[tu]&&(n=null))}if(n!=null||s===r)break;r=r.parent}return n}function $b(i,e=!1){return i==null?null:e&&i.vnode.ctx||i.parent}function Nb(i,e,t){let n=null;l.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,n=ol();const s=t;s[cn]&&s[cn](n),n.on("*",ds)}},e),l.onUnmounted(()=>{const s=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(n&&n.off("*",ds),s[us]&&s[us](),delete e.vnode.el.__VUE_I18N__),i.__deleteInstance(e);const r=s[xl];r&&(r(),delete s[xl])},e)}const Rb=["locale","fallbackLocale","availableLocales"],ku=["t","rt","d","n","tm","te"];function Vb(i,e){const t=Object.create(null);return Rb.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw yt(Me.UNEXPECTED_ERROR);const o=l.isRef(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),i.config.globalProperties.$i18n=t,ku.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw yt(Me.UNEXPECTED_ERROR);Object.defineProperty(i.config.globalProperties,`$${s}`,r)}),()=>{delete i.config.globalProperties.$i18n,ku.forEach(s=>{delete i.config.globalProperties[`$${s}`]})}}if(eb(),S0(i0),C0(b0),A0(Qh),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const i=ln();i.__INTLIFY__=!0,n0(i.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const xu="3.7.7",Lb=xu,$n=typeof Buffer=="function",Su=typeof TextDecoder=="function"?new TextDecoder:void 0,Cu=typeof TextEncoder=="function"?new TextEncoder:void 0,Mb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ps=Array.prototype.slice.call(Mb),wr=(i=>{let e={};return i.forEach((t,n)=>e[t]=n),e})(ps),Bb=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,at=String.fromCharCode.bind(String),Au=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):i=>new Uint8Array(Array.prototype.slice.call(i,0)),Qu=i=>i.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Pu=i=>i.replace(/[^A-Za-z0-9\+\/]/g,""),Tu=i=>{let e,t,n,s,r="";const o=i.length%3;for(let a=0;a<i.length;){if((t=i.charCodeAt(a++))>255||(n=i.charCodeAt(a++))>255||(s=i.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=t<<16|n<<8|s,r+=ps[e>>18&63]+ps[e>>12&63]+ps[e>>6&63]+ps[e&63]}return o?r.slice(0,o-3)+"===".substring(o):r},$l=typeof btoa=="function"?i=>btoa(i):$n?i=>Buffer.from(i,"binary").toString("base64"):Tu,Nl=$n?i=>Buffer.from(i).toString("base64"):i=>{let t=[];for(let n=0,s=i.length;n<s;n+=4096)t.push(at.apply(null,i.subarray(n,n+4096)));return $l(t.join(""))},kr=(i,e=!1)=>e?Qu(Nl(i)):Nl(i),Db=i=>{if(i.length<2){var e=i.charCodeAt(0);return e<128?i:e<2048?at(192|e>>>6)+at(128|e&63):at(224|e>>>12&15)+at(128|e>>>6&63)+at(128|e&63)}else{var e=65536+(i.charCodeAt(0)-55296)*1024+(i.charCodeAt(1)-56320);return at(240|e>>>18&7)+at(128|e>>>12&63)+at(128|e>>>6&63)+at(128|e&63)}},vb=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Eu=i=>i.replace(vb,Db),$u=$n?i=>Buffer.from(i,"utf8").toString("base64"):Cu?i=>Nl(Cu.encode(i)):i=>$l(Eu(i)),Nn=(i,e=!1)=>e?Qu($u(i)):$u(i),Nu=i=>Nn(i,!0),Zb=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ib=i=>{switch(i.length){case 4:var e=(7&i.charCodeAt(0))<<18|(63&i.charCodeAt(1))<<12|(63&i.charCodeAt(2))<<6|63&i.charCodeAt(3),t=e-65536;return at((t>>>10)+55296)+at((t&1023)+56320);case 3:return at((15&i.charCodeAt(0))<<12|(63&i.charCodeAt(1))<<6|63&i.charCodeAt(2));default:return at((31&i.charCodeAt(0))<<6|63&i.charCodeAt(1))}},Ru=i=>i.replace(Zb,Ib),Vu=i=>{if(i=i.replace(/\s+/g,""),!Bb.test(i))throw new TypeError("malformed base64.");i+="==".slice(2-(i.length&3));let e,t="",n,s;for(let r=0;r<i.length;)e=wr[i.charAt(r++)]<<18|wr[i.charAt(r++)]<<12|(n=wr[i.charAt(r++)])<<6|(s=wr[i.charAt(r++)]),t+=n===64?at(e>>16&255):s===64?at(e>>16&255,e>>8&255):at(e>>16&255,e>>8&255,e&255);return t},Rl=typeof atob=="function"?i=>atob(Pu(i)):$n?i=>Buffer.from(i,"base64").toString("binary"):Vu,Lu=$n?i=>Au(Buffer.from(i,"base64")):i=>Au(Rl(i).split("").map(e=>e.charCodeAt(0))),Mu=i=>Lu(Bu(i)),Ub=$n?i=>Buffer.from(i,"base64").toString("utf8"):Su?i=>Su.decode(Lu(i)):i=>Ru(Rl(i)),Bu=i=>Pu(i.replace(/[-_]/g,e=>e=="-"?"+":"/")),Vl=i=>Ub(Bu(i)),Fb=i=>{if(typeof i!="string")return!1;const e=i.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},Du=i=>({value:i,enumerable:!1,writable:!0,configurable:!0}),vu=function(){const i=(e,t)=>Object.defineProperty(String.prototype,e,Du(t));i("fromBase64",function(){return Vl(this)}),i("toBase64",function(e){return Nn(this,e)}),i("toBase64URI",function(){return Nn(this,!0)}),i("toBase64URL",function(){return Nn(this,!0)}),i("toUint8Array",function(){return Mu(this)})},Zu=function(){const i=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Du(t));i("toBase64",function(e){return kr(this,e)}),i("toBase64URI",function(){return kr(this,!0)}),i("toBase64URL",function(){return kr(this,!0)})},jb={version:xu,VERSION:Lb,atob:Rl,atobPolyfill:Vu,btoa:$l,btoaPolyfill:Tu,fromBase64:Vl,toBase64:Nn,encode:Nn,encodeURI:Nu,encodeURL:Nu,utob:Eu,btou:Ru,decode:Vl,isValid:Fb,fromUint8Array:kr,toUint8Array:Mu,extendString:vu,extendUint8Array:Zu,extendBuiltins:()=>{vu(),Zu()}},qb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACOZJREFUeF7tnUF2ozoQRYGNJT2Nvacke3KYJr0x00f9zYnb346FwKpXpZtJD1qgp1fvusAhqO/4wQEcuOlAjzc4gAO3HQAQ0oEDPzgAIMQDBwCEDOBAmQN0kDLfOKoRBwCkkUKzzDIHAKTMN45qxAEAaaTQLLPMAQAp842jGnFAGpD9fv+c6nA8Hv/+y892DgzD8HU4HL62O2PMM0kBkoBIMPR9/zRNE1DUydz7OI5vdabyN4sMILvd7hMozAIEJDesNwckdY1pml6BwwyOeWIguVICU0BeXl5Sa381jwYCgEStgwCHLJV0krPSmHWQl5eXSTYiCAOSUwZMAOGG3AWBQNJ1XXVAuLRyAQf3JFYdhO7hCpAktulOYtFBuPdwx0i7kFQF5PSb8k9/+UBxq52kKiDcf7gHrbnLLXlAhmH4xUN168HasHs3BUlVQApu0JsqxnoMfj4DkCx3uCogBb8cBJDlNf3xCCBZZiiALPMrxGggyS8jgOR7FWokkOSVE0DyfAo5CkjulxVA7nsUegSQ/FxeAAkd/7zFAcltnwAkL0PhRwHJ9RIDSPjo5y8QSP7vFYDk56eJkUDyb5kBpInYL1skkHz7BSDLstPMaCD5r9QA0kzkly8USABkeWoaO6J1SOggjQW+ZLktQwIgJYlp8JhWIQGQBsNeuuQWIQGQ0rQ0elxrkABIo0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gCJuGXh5QtTt1PxELfkjlbp/oMSq4ESS9iom5cugixiHuO9PZQSy3mJJXgeUsx4iWYrFucSlMSYr6daZj4+7h5RGsaWAjXcFYostaqAI1bX2yUCkE9FqlnIrcWsAY7Iu1puNF3buwCkUkAW5db38KKbOczwK4bH4/EcmYxMDptKl/Am3Guc4zj+Du8eqTTOpF+kBJCKATFxd0eD0IM00KR35FfzqQIIgJibztOAAAIgnvxqHiuAAIi56TwNCCAA4smv5rECCICYm87TgAACIJ78ah4rgACIuek8DQggAOLJr+axAgiAmJvO04AAAiCe/GoeK4AAiLnpPA0IIADiya/msQIIgJibztOAAAIgnvxqHiuAAIi56TwNCCAA4smv5rECCICYm87TgAACIJ78ah4rgACIuek8DQggAOLJr+axAgiAmJvO04AAAiCe/GoeK4AAiLnpPA0IIADiya/msQIIgJibztOAALJYrchfHv97Rk0/CO3JdJ5iTQXE2hOmrz9IBWRa6Kp+jdyT+WqPVfDSnzAlUz+YAiIUpPZ1Jj5bBQDEVm9G86TA4XB4tnyFg2kGCQsheCGmp/UjVmUFLN8NEqZiDoiwD1GWnct7UMC6QS8CCH2IBytWG6Np/1EEkDAoWaRaA1YbWInsUQwQski1Pqw2MOveYxbCvAeZBwaSar1YY2DmpVVxQKY7Wj//fwFr0htOa1w9YlJVoBgcxUqspZxkElVzub146DlqeL12sRLrduVSP5PjduUJfFOBUg35vcCqAWRRcj0Nw/BtHMfvm0pyQDMKBCjGcfx9OBzOlk/KtwSsCpB7wU6ZZWse/LtDBQIMIeyagLiVsXpAHK47ITekAIA0tJhMJb8CAJJfU67YkAIA0tBiMpX8CgBIfk25YkMKAEhDi8lU8isAIPk15YoNKQAgDS0mU8mvAIDk15QrNqQAgDS0mEwlvwL/AfRjWW6yHrZ9AAAAAElFTkSuQmCC",zb={xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.12",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",pdf:"application/pdf",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",png:"image/png",gif:"image/gif",jpeg:"image/jpeg",jpg:"image/jpeg",mp3:"audio/mpeg",aac:"audio/aac",html:"text/html",css:"text/css",js:"text/javascript",json:"application/json",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",htm:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jsonld:"application/ld+json",mid:"audio/midi audio/x-midi",midi:"audio/midi audio/x-midi",mjs:"text/javascript",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",otf:"font/otf",rar:"application/x-rar-compressed",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tif:"image/tiff",tiff:"image/tiff",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xml:"text/xml",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip"},Iu=()=>{function i(o,a){try{const c=decodeURI(o.headers["content-disposition"]);let h=a||c.split("filename*=utf-8")[1];const u=h.substring(h.lastIndexOf(".")+1),f=new Blob([o.data],{type:zb[u]??"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),m=(window.URL||window.webkitURL).createObjectURL(f),b=document.createElement("a");b.setAttribute("href",m);const w=h.lastIndexOf(".");h=`${h.slice(0,w)}_${Ne.dayjs().format("YYYYMMDD")+h.slice(w)}`,b.setAttribute("download",h),document.body.appendChild(b),b.click(),document.body.removeChild(b),window.URL.revokeObjectURL(m)}catch(c){console.error(c)}}function e({multiple:o=!1},a){const c=document.createElement("input");c.style.display="none",c.setAttribute("type","file"),o&&c.setAttribute("multiple",o),c.setAttribute("accept","application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,.xml"),document.body.appendChild(c),c.click(),c.addEventListener("change",h=>{a(h)&&document.body.removeChild(c)})}function t(o){return o?o.substring(o.lastIndexOf("/")+1):""}function n(o){return o?new URL(Object.assign({"../static/images/upload-excel.png":qb,"../static/images/upload-file.png":Xb,"../static/images/upload-pdf.png":Wb,"../static/images/upload-word.png":Yb})[`../static/${o}`],self.location).href:""}function s(o,a,c){if(!a)return;let h=c||t(a);const u=h.lastIndexOf(".");h=`${h.slice(0,u)}_${Date.now()+h.slice(u)}`,o({url:a,method:"GET",responseType:"blob"}).then(f=>{const d=URL.createObjectURL(f.data),m=document.createElement("a");m.style.display="none",m.setAttribute("href",d),m.setAttribute("target","_blank"),m.setAttribute("download",h),document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(d)})}function r(o){if(!o)return;const a=document.createElement("input");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),Ne.ElNotification({title:"提示",message:"复制成功",type:"success",duration:2e3})}return{exportFile:i,importFile:e,getAssetsFileName:t,getAssetsFilePath:n,downloadFile:s,copy:r}},Uu={label:"name",value:"code",children:"children"},Fu={label:"key",value:"value"},xr={label:"name",value:"code",children:"children"},Gb={year:"year",month:"month",date:"day"};/*! Element Plus Icons Vue v2.3.1 */var Hb=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Kb=Hb,Jb=l.defineComponent({name:"Delete",__name:"delete",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),ey=Jb,ty=l.defineComponent({name:"Download",__name:"download",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),iy=ty,ny=l.defineComponent({name:"MoreFilled",__name:"more-filled",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),sy=ny,ry=l.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),oy=ry;const wT="",ct=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},ly={class:"a-loading"},Sr=ct({__name:"index",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("div",ly,t[0]||(t[0]=[l.createElementVNode("span",{class:"dot dot-spin"},[l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i")],-1)])))}},[["__scopeId","data-v-048c6c03"]]),xT="",ay={key:0,class:"table-link"},cy=["onClick"],hy={class:"no-image"},uy={key:4},ju=ct({__name:"index",props:{pageKey:{type:String,default:""},defaultParams:{type:Array,default:()=>[]},matchData:{type:Object,default:()=>({})},maxHeight:{type:[String,Number],default:-1},tableConfig:{type:Object,default:()=>({})}},emits:["onClickRow","changeExpansionRow","refresh","load","operate"],setup(i,{expose:e,emit:t}){const n=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>qy),loadingComponent:Sr,delay:20}),s=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>Wy),loadingComponent:Sr,delay:20}),r=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>zy),loadingComponent:Sr,delay:20}),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Ky)),a=l.defineAsyncComponent(()=>Promise.resolve().then(()=>t1)),{t:c}=Gt(),h=l.inject("actModules"),u=l.inject("apiPrefix"),f=l.inject("request"),d=l.inject("themeColor"),m=l.inject("cacheTokenType"),b=l.inject("cookieStorage"),w=rn.useRoute(),g=rn.useRouter(),p=t,O=i,C=()=>({pageLoading:!1,tableLoading:!1,tableTotal:0,tableSelection:[],tableQuery:{pageIndex:1,pageSize:10},showFormDialog:!1,showEditorPreDialog:!1,dialogTitle:"",editorDialogTitle:"",dialogData:{}});let y=l.reactive(C()),E=l.ref("loading"),x=l.ref([]),k={},P=[],N=l.ref([]),_=l.ref([]),A=l.ref([]),S=l.ref([]),M=l.ref([]),T=l.ref({});const I=l.ref(null),B=l.ref(null),U=l.ref(null),Z=l.ref(null),K=l.ref(0);let X=l.ref({});const J=$=>f({url:`${u}/sysOperate/getMenuOfOperateByRole`,method:"post",data:$}),fe=$=>f({url:`${u}/pages/getPageDetail?key=${$}`,method:"get"}),he=()=>{y=l.reactive(C()),E.value="loading",x.value=[],k={},P=[],N.value=[],_.value=[],A.value=[],S.value=[],M.value=[],X.value={}},ye=()=>{l.nextTick(()=>{setTimeout(()=>{var ue,ae,re,te,ee,Oe,me;const $=((ae=(ue=I.value)==null?void 0:ue.$el)==null?void 0:ae.offsetHeight)||0,v=((te=(re=B.value)==null?void 0:re.$el)==null?void 0:te.offsetHeight)||0,le=((Oe=(ee=U.value)==null?void 0:ee.$el)==null?void 0:Oe.offsetHeight)||0,pe=$-v-le-6;K.value=O.maxHeight>0?O.maxHeight:(me=k==null?void 0:k.tableConfig)!=null&&me.isPagination?pe-48:pe},500)})},z=()=>[...os(P)],D=$=>{Z.value.updateSelection($)},V=()=>y.tableSelection,q=async()=>{await ti(P),p("refresh")},H=$=>{if(!$||!$.tableQueryDefaultValue)return;const le=Wt($)["value-format"]||"YYYY-MM-DD HH:mm:ss";if($.fieldType=="date"&&$.tableQueryDefaultValue=="nowYear")return Ne.dayjs().format(le);if($.fieldType=="date"&&$.tableQueryDefaultValue=="yearAgo")return Ne.dayjs().subtract(1,"year").format(le);if($.fieldType=="dateRange"&&$.tableQueryDefaultValue.includes("&")){const pe=$.tableQueryDefaultValue.split("&");return[Ne.dayjs(pe[0]).subtract(6,"month").format(le),Ne.dayjs(pe[1]).format(le)]}if($.fieldType=="dateRange"&&$.tableQueryDefaultValue=="yearAgo")return[Ne.dayjs().subtract(1,"year").format(le),Ne.dayjs().format(le)];if($.fieldType=="dateRange"&&$.tableQueryDefaultValue=="sixMonthsAgo")return[Ne.dayjs().subtract(6,"month").format(le),Ne.dayjs().format(le)]},Ue=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const pe=(v.row[$.fieldKey]??"").split(";"),ue=pe&&pe.length?pe[0]:"",ae=ue.substring(ue.lastIndexOf(".")+1);return/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/.test(ae)},Ri=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const pe=(v.row[$.fieldKey]??"").split(";");return pe&&pe.length?pe[0]:""},Re=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const le=v.row[$.fieldKey]??null;return le?le.split(";"):[]},qe=$=>$==="true",Wt=$=>new Function("",$.fieldUiProps)()||{},Dt=async($,v)=>Reflect.has(h,`/src/views${$}.vue`)?l.markRaw(l.defineAsyncComponent(h[`/src/views${$}.vue`])):null,ki=async($,v)=>Reflect.has(h,`/src/views${$}.vue`)?l.markRaw(l.defineAsyncComponent({loader:h[`/src/views${$}.vue`],loadingComponent:Sr,delay:20})):null,Vi=async()=>{k.buttons=await Promise.all(k.buttons.map(async $=>{if($.isCustomBtn&&$.customType=="component"){const{customComponentUrl:v,customComponentName:le}=$,pe=await Dt(v);$[le]=pe}return $}))},R=async()=>{const $=k.fields.filter(v=>(v.formCustomComponentes??[]).some(le=>le.permissionCode=="tableShow"&&le.isFieldCustom));M.value=await Promise.all($.map(async v=>{const le=v.formCustomComponentes.find(re=>re.permissionCode=="tableShow"),{customComponentUrl:pe,customComponentName:ue}=le,ae=await Dt(pe);return v.customTableHeaderName=ue,v.customTableHeaderUrl=pe,v[`customTableHeaderInstance_${ue}`]=ae,v.headerItem={label:v.fieldName,prop:v.fieldKey,align:v.tableCellAlignType,width:v.tableCellWidthType=="default"?v.tableCellWidth:"",minWidth:v.tableCellWidthType=="min"?v.tableCellWidth:"",showOverflowTooltip:v.isTableCellOverflowTooltip||!1,sort:v.isTableCellSort||!1},v}))},Q=($,v)=>{switch($){case"array":return typeof v=="string"?v.toString().split().sort((le,pe)=>le.sort-pe.sort):[v];case"number":return Number(v);case"boolean":return!!v;default:return v}},W=($,v)=>v[$.fieldKey]?v[$.fieldKey].toString().includes("T")?Ne.dayjs(v[$.fieldKey]).format("YYYY-MM-DD HH:mm:ss"):v[$.fieldKey]:"";function Y($,v={}){return $.replace(/\{([^}]+)\}/g,(le,pe)=>{const ue=pe.trim().split(".");let ae=v;for(const re of ue){if(!ae||typeof ae!="object")break;ae=ae[re]}return ae!==void 0?ae:le})}const $e=$=>$?Y($,O.matchData):"",Xe=($,v,le)=>{switch($){case"LessThanOrEqual":return v<=le;case"LessThan":return v<le;case"GreaterThanOrEqual":return v>=le;case"GreaterThan":return v>le;case"NotEqual":return v!=le;case"Equal":return v==le;default:return v==le}},Qe=($,v)=>{if(!$.matchFields.length)return!0;const le=re=>re.matchType=="default"?v[re.matchFieldName]:O.matchData[re.matchType][re.matchFieldName];let ue=$.matchFields.reduce((re,te,ee)=>{const Oe=le(te),me=Xe(te.matchCondition,Oe,te.fieldValue==""?null:te.fieldValue=="true"||te.fieldValue=="false"?qe(te.fieldValue):te.fieldValue);return re+=me,ee!==$.matchFields.length-1&&(re+=te.spliceCondition||"&&"),re},"").split("||"),ae=ue.reduce((re,te,ee)=>(re+=`(${te})`,ee<ue.length-1&&(re+="||"),re),"");return new Function(`return ${ae}`)()},F=($,v)=>Object.keys(v).length?x.value.some(le=>le.unique==$.permissionCode)&&Qe($,v):!1,G=async $=>{try{y.pageLoading=!0;const v=O.pageKey??w.params.key,{data:{pageConfigs:le}}=await fe(v);return k=le.pageConfig?JSON.parse(le.pageConfig):{},y.tableQuery.pageSize=k.tableConfig.pageSize||10,y.pageLoading=!1,Promise.resolve(Object.keys(k).length)}catch(v){y.pageLoading=!1,console.error(v)}},Pe=async($=[],v={},le=!0,pe=!1)=>{try{const ue=$.filter(te=>["select","multipleSelect","selectIcon","switch","virtualizedSelect","virtualizedMultipleSelect","fullLoadTreeSelect","provinceCascade"].includes(te.fieldType)&&(!Reflect.has(te,"dataList")||!te.dataList.length||pe)),re=(await Promise.allSettled(ue.map(async te=>{const ee=te.postRequestParams.filter(lt=>lt.submitType==="default").reduce((lt,ii)=>(lt[ii.submitName]=Q(ii.paramsType,ii.submitValue),lt),{}),Oe=te.postRequestParams.filter(lt=>lt.submitType==="match").reduce((lt,ii)=>(lt[ii.submitName]=Q(ii.paramsType,v[ii.submitValue][ii.submitName]),lt),{}),me=te.postRequestParams.filter(lt=>lt.submitType==="dynamic").map(lt=>({field:lt.submitName,operate:lt.submitMatchType,value:Q(lt.paramsType,lt.submitValue)}));let He={};Object.keys(ee).length&&(He={...He,...ee}),Object.keys(Oe).length&&(He={...He,...Oe}),me.length&&(He.dynamicFilters=me);const{data:xi}=await f({url:te.fieldRequestUrl,method:te.fieldRequestType||"GET",data:He});return Promise.resolve({...te,dataList:xi||[]})}))).filter(te=>te.status==="fulfilled"&&Reflect.has(te,"value")).map(te=>te.value);return le&&k.fields.forEach(te=>{const ee=re.find(Oe=>te.fieldName==Oe.fieldName&&te.fieldKey==Oe.fieldKey);ee&&(te.dataList=(ee==null?void 0:ee.dataList)??[])}),re}catch(ue){console.error(ue)}},Fe=l.computed(()=>{const{tableConfig:{tableMoreBtnSplitNumber:$}}=k;return!$||$>=_.value.length}),Li=()=>{const{tableConfig:{tableMoreBtnSplitNumber:$}}=k;return Fe.value?_.value:_.value.slice(0,$)},rs=()=>{var v;const{tableConfig:{tableMoreBtnSplitNumber:$}}=k;return Fe.value?[]:_.value.slice($,(v=_.value)==null?void 0:v.length)},sn=async $=>{try{const v=($||[]).filter(ae=>ae.useScenes.some(re=>["tableShow"].includes(re))).sort((ae,re)=>ae.sort-re.sort),le=["editor","upload","date"];let pe=v.map(ae=>{const re=ae.formCustomComponentes.some(te=>te.permissionCode=="tableShow"&&te.isFieldCustom);return{label:ae.fieldName,prop:ae.fieldKey,align:ae.tableCellAlignType,width:ae.tableCellWidthType=="default"?ae.tableCellWidth:"",minWidth:ae.tableCellWidthType=="min"?ae.tableCellWidth:"",showOverflowTooltip:ae.isTableCellOverflowTooltip||!1,sort:ae.isTableCellSort||!1,render:!!ae.fieldRequestUrl||ae.tableCellContentType=="link"||le.includes(ae.fieldType),isCustomTableHeader:re}});k.tableConfig.isSerialNumber&&pe.unshift({prop:"serialNumber",width:80}),k.tableConfig.isCheckRow&&pe.unshift({prop:"checkbox",width:50});const ue=_.value.filter(ae=>x.value.some(re=>re.unique==ae.permissionCode));k.tableConfig.isOperateRow&&ue.length&&pe.push({label:c("act.operate"),prop:"operate",width:k.tableConfig.tableOperateCellWidth,render:!0,fixed:"right"}),S.value=v.filter(ae=>!!ae.fieldRequestUrl&&ae.useScenes.includes("tableShow")||ae.tableCellContentType=="link"||le.includes(ae.fieldType)),N.value=pe}catch(v){console.error(v)}},Mi=()=>{_.value=(k.buttons||[]).filter($=>$.permissionCode!==1001&&$.btnPostion.includes("table")).sort(($,v)=>$.sort-v.sort).map($=>($.loading=!1,$.btnAlias&&($.btnName=$.btnAlias),$))},il=()=>k.fields.filter($=>$.useScenes.includes("tableSearch")).map($=>(["date","dateRange"].includes($.fieldType)?$.queryValue=$.tableQueryDefaultValue?$.tableQueryDefaultValue:H($):$.queryValue=($==null?void 0:$.tableQueryDefaultValue)||void 0,O.defaultParams.some(v=>{v.field==$.fieldKey&&v.operate===$.tableQueryCondition&&($.queryValue=v.value)}),$)),os=($,v="queryValue")=>$?($||[]).filter(pe=>!!pe[v]).reduce((pe,ue)=>{var re;const ae=Wt(ue);if(ue.fieldType==="date"&&ae["value-format"]!=="YYYY"){const te=ae!=null&&ae.dayJsType?Gb[(re=ue.fieldUiProps)==null?void 0:re.dayJsType]:"day",ee=ae["value-format"]||"YYYY-MM-DD HH:mm:ss";pe=[...pe,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:Ne.dayjs(ue[v]).startOf(te).format(ee)},{field:ue.fieldKey,operate:"LessThanOrEqual",value:Ne.dayjs(ue[v]).endOf(te).format(ee)}]}else if(ue.fieldType==="dateRange"&&ue[v].length)if(ue.fieldKey.includes("&")){const te=ue.fieldKey.split("&")||[];pe=[...pe,{field:te[0],operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:te[1],operate:"LessThanOrEqual",value:ue.queryValue[1]}]}else pe=[...pe,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:ue.fieldKey,operate:"LessThanOrEqual",value:ue.queryValue[1]}];else if(["provinceCascade"].includes(ue.fieldType)&&ue[v].length){const te=(ue.fieldKey.split("&")||[]).map((ee,Oe)=>({field:ee,operate:"Equal",value:ue.queryValue[Oe]}));pe=[...pe,...te]}else return Array.isArray(ue[v])&&!ue[v].length?[...pe]:[...pe,{field:ue.fieldKey,operate:ue.tableQueryCondition,value:ue.tableQueryCondition==="In"&&ue[v]&&typeof ue[v]=="string"?ue[v].split(";"):ue[v]=="true"||ue[v]=="false"?qe(ue[v]):ue[v]}];return pe},[]):[],uT=($,v)=>{if(!$.dataList||!Reflect.has(v,$.fieldKey))return"";const le=v[$.fieldKey];if(!le&&le!==0&&le!==!1)return"";const pe=Wt($),ue=Object.assign({key:"key",value:"value"},pe.props||{});return["virtualizedSelect","virtualizedMultipleSelect"].includes($.fieldType)&&(ue.key=ue.label),["multipleSelect","select","switch","virtualizedSelect","virtualizedMultipleSelect","selectIcon"].includes($.fieldType)?($.dataList||[]).filter(ae=>{const re=$.fieldType==="selectIcon"?`btn-${ae[ue.value]}`:ae[ue.value],te=re=="true"||re=="false"?qe(re):re;return Array.isArray(le)?le.some(ee=>ee==re==ee):typeof le=="string"?le.split(";").includes(te):le==te}).map(ae=>ae[ue.key]).join(";"):le},ti=async($=[])=>{try{y.tableLoading=!0;const v=O.defaultParams.filter(ae=>!(k.fields??[]).some(re=>re.fieldKey===ae.field&&re.tableQueryCondition===ae.operate&&re.useScenes.includes("tableSearch"))),le=k.tableConfig.defaultParams.map(ae=>({field:ae.submitFieldName,operate:ae.matchValue,value:Q(ae.submitFieldType,ae.defaultValue)})),pe=[...v,...le,...os($)];k.tableConfig.isPagination||(y.tableQuery.pageSize=9999);const{data:ue}=await f({url:k.tableConfig.dataUrl,method:"POST",data:{...y.tableQuery,dynamicFilters:pe}});y.tableTotal=ue.totalCount||0,A.value=ue.datas||[],y.tableLoading=!1}catch(v){y.tableLoading=!1,console.error(v)}},YO=async()=>{try{E.value="loading";const $=O.pageKey;if(!await G($)){E.value="end";return}await R(),await Vi(),await Pe(k.fields.filter(ae=>ae.useScenes.some(re=>["tableSearch","tableShow"].includes(re)))),E.value="success";let le="";m==="sessionStorage"?le=sessionStorage.getItem("accessToken"):le=b.getItemValue("accessToken");const ue=JSON.parse(jb.decode(le.split(".")[1]))["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];x.value=(await J({roleId:ue,key:$})).data.datas||[],Mi(),sn(k.fields),ye(),P=il(),(!Reflect.has(k.tableConfig,"isExecuteImmediatelyTableApi")||k.tableConfig.isExecuteImmediatelyTableApi)&&await ti(P),p("load"),console.log(k)}catch($){console.error($),E.value="end"}};l.provide("globalProps",O),l.provide("loadComponents",Dt),l.provide("defineAsyncLoadComponents",ki),l.provide("stringToBoolean",qe),l.provide("matchCondition",Xe),l.provide("menuPermissionBtns",x),l.provide("getTableData",ti),l.provide("tableBtnRefs",T.value),l.provide("formatDataType",Q),l.provide("getFieldUiProps",Wt),l.provide("disposeRequestData",Pe),l.provide("disposeDate",H),l.provide("getDefaultQueryValues",il),l.watch(()=>O.pageKey,($,v)=>{he(),YO()},{immediate:!0});const zO=async($,v)=>{P=$,await ti($),p("refresh"),v(!0)},fT=$=>{p("operate",$),ti(P)},nl=($,v)=>{const{exportFile:le,importFile:pe,downloadFile:ue}=Iu();if($.isCustomBtn){if($.customType=="component"&&!Reflect.has($,[$.customComponentName])){Ne.ElNotification({title:"提示",message:`当前自定义按钮未创建vue文件,请在路径【/src/views${$.customComponentUrl}】下创建vue文件`,type:"warning",duration:2500});return}if($.customType=="code"){try{new Function("router","route","data","configItem",$.codeStr)(g,w,v,$)}catch(te){console.error(te)}return}const re=`${$.customComponentName}-${$.permissionCode}`;T.value[re]&&T.value[re].onTigger({rowData:v,tableSelection:y.tableSelection});return}if($.submitWay=="associationSubTable"){Ne.ElNotification({title:c("act.tip"),message:c("act.developing"),type:"warning",duration:2500});return}if(["export","exportUrl"].includes($.submitWay)){$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0;let re=[...O.defaultParams,...os(P)],te=($.submitFields||[]).reduce((Oe,me)=>{if(me.matchType=="default")Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:Q(me.submitFieldType,me.matchFieldName)}];else if(me.matchType=="match"){const He=me.submitFieldMatchOrigin==="rowData"?v:O.matchData[me.submitFieldMatchOrigin];Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:Q(me.submitFieldType,He[me.matchFieldName])}]}else if(me.matchType=="selection"){const He=y.tableSelection.map(xi=>xi[me.matchFieldName]);Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:me.submitFieldType==="string"?He.join():He}]}return Oe},[]);const ee=[...re,...te];f({url:$e($.requestUrl),method:"post",data:{dynamicFilters:ee},responseType:["exportUrl"].includes($.submitWay)?"json":"blob"}).then(Oe=>{$.submitWay=="exportUrl"?ue(f,Oe.data):le(Oe),p("operate",$),$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1}).catch(Oe=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1});return}if(["import","batchImport"].includes($.submitWay)){pe({multiple:$.submitWay=="batchImport"},re=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0;const te=new FormData;if(($.submitFields||[]).forEach(ee=>{var Oe,me;if(ee.matchType=="default")te.append(ee.submitFieldName,Q(ee.submitFieldType,ee.matchFieldName));else if(ee.matchType=="match")(Oe=Object.keys(v))!=null&&Oe.length&&te.append(ee.submitFieldName,Q(ee.submitFieldType,v[ee.matchFieldName]));else if(ee.matchType=="query"){const He=((me=P.find(xi=>xi.fieldKey==ee.matchFieldName))==null?void 0:me.queryValue)??null;te.append(ee.submitFieldName,Q(ee.submitFieldType,He))}}),$.submitWay=="import")te.append($.importFileName||"file",re.target.files[0]);else for(let ee of re.target.files)te.append($.importFileName||"files",ee);return f({url:$e($.requestUrl),method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:te}).then(ee=>{Ne.ElNotification({title:c("act.tip"),message:`${ee.msg}`,type:"success",duration:2500}),p("operate",$),ti(P),$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1}).catch(()=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1})});return}if($.submitWay==="executeApi"){let re=($.submitFields||[]).reduce((te,ee)=>{var Oe;if(ee.matchType=="default")te[ee.submitFieldName]=Q(ee.submitFieldType,ee.matchFieldName);else if(ee.matchType=="match"){const me=ee.submitFieldMatchOrigin==="rowData"?v:O.matchData[ee.submitFieldMatchOrigin];te[ee.submitFieldName]=Q(ee.submitFieldType,me[ee.matchFieldName])}else ee.matchType=="query"&&(te[ee.submitFieldName]=((Oe=P.find(me=>me.fieldKey==ee.matchFieldName))==null?void 0:Oe.queryValue)??null);return te},{});if($.btnPostion==="header"&&$.isPromptVerificationSelectTable=="1"){if(!k.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!y.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}if($.btnPostion==="header"){const te=($.submitFields||[]).filter(ee=>ee.matchType=="selection").reduce((ee,Oe)=>(ee[Oe.submitFieldName]=y.tableSelection.reduce((me,He)=>(Oe.submitFieldType==="array"?me=[...me,...Q(Oe.submitFieldType,He[Oe.matchFieldName])]:me=[...me,Q(Oe.submitFieldType,He[Oe.matchFieldName])],me),[]),ee),{});Object.assign(re,te)}$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0,f({url:$e($.requestUrl),method:"post",data:re}).then(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1,Ne.ElNotification({type:"success",title:c("act.tip"),message:`${$.btnName}${c("act.success")}`,duration:2500}),p("operate",$),ti(P)}).catch(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1});return}if($.submitWay==="messageBox"){if($.btnPostion==="header"&&$.isPromptVerificationSelectTable=="1"){if(!k.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!y.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}Ne.ElMessageBox.confirm(`${c("act.isExecuteOperate")}?`,c("act.tip"),{confirmButtonText:c("act.enter"),cancelButtonText:c("act.cancel"),type:"warning"}).then(()=>{let re=($.submitFields||[]).reduce((te,ee)=>{var Oe;if(ee.matchType=="default")te[ee.submitFieldName]=Q(ee.submitFieldType,ee.matchFieldName);else if(ee.matchType=="match"){const me=ee.submitFieldMatchOrigin==="rowData"?v:O.matchData[ee.submitFieldMatchOrigin];te[ee.submitFieldName]=Q(ee.submitFieldType,me[ee.matchFieldName])}else ee.matchType=="query"&&(te[ee.submitFieldName]=((Oe=P.find(me=>me.fieldKey==ee.matchFieldName))==null?void 0:Oe.queryValue)??null);return te},{});if($.btnPostion==="header"){const te=($.submitFields||[]).filter(ee=>ee.matchType=="selection").reduce((ee,Oe)=>(ee[Oe.submitFieldName]=y.tableSelection.reduce((me,He)=>(Oe.submitFieldType==="array"?me=[...me,...Q(Oe.submitFieldType,He[Oe.matchFieldName])]:me=[...me,Q(Oe.submitFieldType,He[Oe.matchFieldName])],me),[]),ee),{});Object.assign(re,te)}$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0,f({url:$e($.requestUrl),method:"post",data:re}).then(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1,Ne.ElNotification({type:"success",title:c("act.tip"),message:`${$.btnName}${c("act.success")}`,duration:2500}),p("operate",$),ti(P)}).catch(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1})}).catch(re=>{});return}if($.btnPostion==="header"&&$.submitWay==="dialog"&&($.submitFields||[]).some(re=>re.submitFieldMatchOrigin==="selections")&&!y.tableSelection.length){if(!k.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!y.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}return}let ae=(k.fields||[]).filter(re=>re.useScenes.includes($.permissionCode)).map(re=>(re.customFiledsComponentes=re.formCustomComponentes.find(te=>te.permissionCode==$.permissionCode)||{},re));if(!ae.length){Ne.ElNotification({title:c("act.tip"),message:c("act.buttonBindField"),type:"warning",duration:2500});return}if($.submitWay==="dialog"){y.dialogTitle=$.btnName,y.dialogData={dataItem:{...$},rowData:{...v},selections:y.tableSelection||[],formConfig:k.formConfig,formList:ae},y.showFormDialog=!0;return}},dT=($,v,le)=>{p("onClickRow",$,v,le)},pT=($,v)=>{X.value=$,p("changeExpansionRow",$,v)},mT=($,v)=>{y.editorDialogTitle=`${c("act.preview")}${$.fieldName}`,y.dialogData={...v,editorContent:v[$.fieldKey]},y.showEditorPreDialog=!0};return e({loadData:YO,getDynamicFiltersData:z,getTableData:ti,getTableSelection:V,setTableSelection:D}),($,v)=>{const le=l.resolveComponent("el-table-column"),pe=l.resolveComponent("el-image"),ue=l.resolveComponent("el-link"),ae=l.resolveComponent("a-svg-icon"),re=l.resolveComponent("el-button"),te=l.resolveComponent("el-dropdown-item"),ee=l.resolveComponent("el-dropdown-menu"),Oe=l.resolveComponent("el-dropdown"),me=l.resolveComponent("el-empty"),He=l.resolveComponent("el-card"),xi=l.resolveDirective("debounce"),lt=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createBlock(He,{class:"act-module",ref_key:"actModuleRef",ref:I,shadow:"never"},{default:l.withCtx(()=>{var ii,GO;return[l.unref(E)==="success"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(l.unref(n),{ref_key:"queryModuleRef",ref:B,data:l.unref(k),onReset:zO,onSearch:zO},null,8,["data"]),l.createVNode(l.unref(s),{ref_key:"headerButtonsModuleRef",ref:U,data:l.unref(k),onOnOperate:nl},null,8,["data"]),l.createVNode(l.unref(r),{ref_key:"aTableRef",ref:Z,loading:l.unref(y).tableLoading,total:l.unref(y).tableTotal,tableQuery:l.unref(y).tableQuery,"onUpdate:tableQuery":v[0]||(v[0]=_e=>l.unref(y).tableQuery=_e),selection:l.unref(y).tableSelection,"onUpdate:selection":v[1]||(v[1]=_e=>l.unref(y).tableSelection=_e),headers:l.unref(N),data:l.unref(A),showPagination:(GO=(ii=l.unref(k))==null?void 0:ii.tableConfig)==null?void 0:GO.isPagination,tableConfig:O.tableConfig,maxHeight:K.value,onRefresh:q,onOnRowClick:dT,onChangeExpand:pT},l.createSlots({operate:l.withCtx(({scope:_e})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Li(),(ge,ni)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:ni},[F(ge,_e.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[ge.isCustomBtn&&ge.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(ge[ge.customComponentName]),{key:0,ref_for:!0,ref:Cn=>l.unref(T)[`${ge.customComponentName}-${ge.permissionCode}`]=Cn,buttonData:ge,scope:_e,onRefresh:ti},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(re,{class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`],onClick:Cn=>nl(ge,_e.row)},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(ae,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading","onClick"])),[[xi]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(re,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`],onClick:Cn=>nl(ge,_e.row)},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(ae,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading","onClick"])),[[xi]])],64)):l.createCommentVNode("",!0)],64))),128)),Fe.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Oe,{key:0,class:"table-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode(ee,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(rs(),(ge,ni)=>(l.openBlock(),l.createBlock(te,{key:ni,onClick:Cn=>nl(ge,_e.row)},{default:l.withCtx(()=>[F(ge,_e.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[ge.isCustomBtn&&ge.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(ge[ge.customComponentName]),{key:0,ref_for:!0,ref:Cn=>l.unref(T)[`${ge.customComponentName}-${ge.permissionCode}`]=Cn,buttonData:ge,scope:_e,onRefresh:ti},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(re,{class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`]},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(ae,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading"])),[[xi]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(re,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`]},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(ae,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading"])),[[xi]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:l.withCtx(()=>[l.createVNode(re,{class:"table-btn-more",icon:l.unref(sy),size:"small",circle:""},null,8,["icon"])]),_:2},1024))]),_:2},[l.renderList(l.unref(M),(_e,ge)=>({name:_e.fieldKey,fn:l.withCtx(()=>[_e[`customTableHeaderInstance_${_e.customTableHeaderName}`]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(_e[`customTableHeaderInstance_${_e.customTableHeaderName}`]),{key:0,data:_e,configData:l.unref(k),rowData:l.unref(X)},null,8,["data","configData","rowData"])):(l.openBlock(),l.createBlock(le,{key:1,label:_e.fieldName+l.unref(c)("act.customTableHeader"),width:"260"},null,8,["label"]))])})),l.renderList(l.unref(S),(_e,ge)=>({name:_e.fieldKey,fn:l.withCtx(({scope:ni})=>[_e.tableCellContentType=="link"?(l.openBlock(),l.createElementBlock("span",ay,l.toDisplayString(ni.row[_e.fieldKey]),1)):_e.fieldType=="editor"?(l.openBlock(),l.createElementBlock("span",{key:1,class:"table-link",onClick:Cn=>mT(_e,ni.row)},"点击预览",8,cy)):_e.fieldType=="upload"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[Ue(_e,ni)?(l.openBlock(),l.createBlock(pe,{key:0,class:"file-image",fit:"cover","preview-src-list":Re(_e,ni),"preview-teleported":"",src:Ri(_e,ni)},{error:l.withCtx(()=>[l.createElementVNode("div",hy,l.toDisplayString(_e("act.noImage")),1)]),_:2},1032,["preview-src-list","src"])):(l.openBlock(),l.createBlock(ue,{key:1,type:"primary"}))],64)):_e.fieldType=="date"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createTextVNode(l.toDisplayString(W(_e,ni.row)),1)],64)):(l.openBlock(),l.createElementBlock("span",uy,l.toDisplayString(uT(_e,ni.row)),1))])}))]),1032,["loading","total","tableQuery","selection","headers","data","showPagination","tableConfig","maxHeight"])],64)):l.createCommentVNode("",!0),l.createVNode(l.unref(o),{visible:l.unref(y).showFormDialog,"onUpdate:visible":v[2]||(v[2]=_e=>l.unref(y).showFormDialog=_e),title:l.unref(y).dialogTitle,data:l.unref(y).dialogData,onRefresh:fT},null,8,["visible","title","data"]),l.createVNode(l.unref(a),{visible:l.unref(y).showEditorPreDialog,"onUpdate:visible":v[3]||(v[3]=_e=>l.unref(y).showEditorPreDialog=_e),title:l.unref(y).editorDialogTitle,data:l.unref(y).dialogData},null,8,["visible","title","data"]),l.unref(E)==="end"?(l.openBlock(),l.createBlock(me,{key:1,description:l.unref(c)("act.noConfigPage")},{image:l.withCtx(()=>[l.createVNode(ae,{name:"config-nodata",width:"200",height:"200"})]),_:1},8,["description"])):l.createCommentVNode("",!0)]}),_:1})),[[lt,l.unref(y).pageLoading]])}}},[["__scopeId","data-v-a0e34299"]]),fy=[{key:"按钮形式",value:"default"},{key:"文字形式",value:"text"}],dy=[{key:"顶部",value:"header"},{key:"表格",value:"table"}],py=[{key:"主题色",value:"primary"},{key:"绿色",value:"success"},{key:"灰色",value:"info"},{key:"橙黄色",value:"warning"},{key:"红色",value:"danger"},{key:"浅蓝",value:"primary-light"}],my=[{key:"模态框",value:"dialog"},{key:"提示框",value:"messageBox"},{key:"导入",value:"import"},{key:"多文件导入",value:"batchImport"},{key:"导出(流)",value:"export"},{key:"导出(url)",value:"exportUrl"},{key:"直接执行接口",value:"executeApi"},{key:"关联子表",value:"associationSubTable"}],gy=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],Oy=[{key:"且",value:"&&"},{key:"或",value:"||"}],_y=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"选择列",value:"selection"},{key:"查询条件",value:"query"}],by=[{key:"默认匹配",value:"default"},{key:"用户信息变量",value:"userInfo"}],yy=[{key:"组件",value:"component"},{key:"代码",value:"code"}],wy=[{key:"GET",value:"GET"},{key:"POST",value:"POST"}],qu=[{key:"隐式",value:"implicit"},{key:"输入框",value:"input"},{key:"数字输入框",value:"inputNumber"},{key:"textarea文本框",value:"textarea"},{key:"下拉单选框",value:"select"},{key:"虚拟下拉框",value:"virtualizedSelect"},{key:"下拉多选框",value:"multipleSelect"},{key:"虚拟下拉多选框",value:"virtualizedMultipleSelect"},{key:"树形下拉框",value:"fullLoadTreeSelect"},{key:"树形下拉框(懒加载)",value:"treeSelect"},{key:"级联下拉框",value:"provinceCascade"},{key:"时间框",value:"date"},{key:"时间范围框",value:"dateRange"},{key:"上传",value:"upload"},{key:"富文本",value:"editor"},{key:"switch开关",value:"switch"},{key:"下拉选择图标",value:"selectIcon"}],ky=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"dynamic",value:"dynamic"}],xy=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"}],Sy=[{key:"居中",value:"center"},{key:"左对齐",value:"left"},{key:"右对齐",value:"right"}],Cy=[{key:"默认",value:"default"},{key:"链接",value:"link"},{key:"标签",value:"tag"}],Ay=[{key:"默认宽",value:"default"},{key:"最小宽",value:"min"}],Xu=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],Qy=[{key:"左侧",value:"right"},{key:"上侧",value:"top"}],Py=[{key:"是",value:"1"},{key:"否",value:"0"}],Wu=[{label:"表格配置",options:[{key:"表格查询",value:"tableSearch"},{key:"表格展示",value:"tableShow"}]},{label:"表单配置",options:[]}],Ty={__name:"configForm",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({formRow:1,dialogWidth:800,formLabelWidth:120,formLabelPosition:"top"});let r=l.ref(null),o=l.ref(s());return l.watch(()=>n.modelValue,(a,c)=>{a&&(o.value=Object.assign(o.value,{...a}))},{deep:!0,immediate:!0}),e({formRef:r,form:o}),(a,c)=>{const h=l.resolveComponent("el-input-number"),u=l.resolveComponent("el-form-item"),f=l.resolveComponent("el-col"),d=l.resolveComponent("el-option"),m=l.resolveComponent("el-select"),b=l.resolveComponent("el-row"),w=l.resolveComponent("el-form"),g=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(g,{class:"form-card",shadow:"hover",header:"表单配置"},{default:l.withCtx(()=>[l.createVNode(w,{ref_key:"formRef",ref:r,model:l.unref(o),"label-suffix":":","label-width":"110px"},{default:l.withCtx(()=>[l.createVNode(b,null,{default:l.withCtx(()=>[l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"弹窗宽度"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).dialogWidth,"onUpdate:modelValue":c[0]||(c[0]=p=>l.unref(o).dialogWidth=p),min:800},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"排版列数"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).formRow,"onUpdate:modelValue":c[1]||(c[1]=p=>l.unref(o).formRow=p),min:1,max:4},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"label宽度"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).formLabelWidth,"onUpdate:modelValue":c[2]||(c[2]=p=>l.unref(o).formLabelWidth=p),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"label位置",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"formLabelPosition"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(o).formLabelPosition,"onUpdate:modelValue":c[3]||(c[3]=p=>l.unref(o).formLabelPosition=p),placeholder:"请选择"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Qy),(p,O)=>(l.openBlock(),l.createBlock(d,{key:O+"labelPosition",label:p.key,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},CT="",Ey=ct({__name:"configTable",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({dataUrl:void 0,defaultParams:[],isCheckRow:!1,isOperateRow:!0,isPagination:!0,isSerialNumber:!0,isSort:!0,isExpandQuery:!1,isExecuteImmediatelyTableApi:!0,tableOperateCellWidth:160,pageSize:10,tableQueryLabelWidth:100,tableQueryRowWidth:5,tableMoreBtnSplitNumber:0,headerMoreBtnSplitNumber:0}),r=l.inject("conditionList")();let o=l.ref(null),a=l.ref(s());l.watch(()=>n.modelValue,(f,d)=>{if(f){if(!Object.keys(f).length)return;const m={...f,defaultParams:[...f.defaultParams||[]]};Object.keys(a.value).forEach(b=>{["defaultParams"].includes(b)?a.value[b]=[...m[b]||[]]:b==="tableMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"tableMoreBtnSplitNumber")?m[b]:0:b==="headerMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"headerMoreBtnSplitNumber")?m[b]:0:b==="isExecuteImmediatelyTableApi"?a.value[b]=Reflect.has(m,"isExecuteImmediatelyTableApi")?m[b]:!0:a.value[b]=m[b]})}},{deep:!0,immediate:!0});const c=()=>{a.value.defaultParams.push({submitFieldName:"",defaultValue:"",matchValue:"",submitFieldType:""})},h=f=>{a.value.defaultParams.splice(f,1)},u=f=>{f||(a.value.pageSize=10)};return e({formRef:o,form:a}),(f,d)=>{const m=l.resolveComponent("el-input"),b=l.resolveComponent("el-form-item"),w=l.resolveComponent("el-col"),g=l.resolveComponent("el-row"),p=l.resolveComponent("el-button"),O=l.resolveComponent("el-divider"),C=l.resolveComponent("el-option"),y=l.resolveComponent("el-select"),E=l.resolveComponent("el-switch"),x=l.resolveComponent("el-input-number"),k=l.resolveComponent("el-form"),P=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(P,{class:"form-card",shadow:"hover",header:"表格配置"},{default:l.withCtx(()=>[l.createVNode(k,{ref_key:"formRef",ref:o,model:l.unref(a),"label-suffix":":","label-width":"120"},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:24},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格数据url",prop:"dataUrl",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(a).dataUrl,"onUpdate:modelValue":d[0]||(d[0]=N=>l.unref(a).dataUrl=N),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(O,{"content-position":"left"},{default:l.withCtx(()=>[d[14]||(d[14]=l.createTextVNode(" 表格默认参数配置 ")),l.createVNode(p,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:c})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a).defaultParams,(N,_)=>(l.openBlock(),l.createBlock(g,{class:"table-post-params",key:_},{default:l.withCtx(()=>[l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"字段",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:N.submitFieldName,"onUpdate:modelValue":A=>N.submitFieldName=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".matchValue"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:N.matchValue,"onUpdate:modelValue":A=>N.matchValue=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(A,S)=>(l.openBlock(),l.createBlock(C,{key:S,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"默认值",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".defaultValue"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:N.defaultValue,"onUpdate:modelValue":A=>N.defaultValue=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:N.submitFieldType,"onUpdate:modelValue":A=>N.submitFieldType=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Xu),(A,S)=>(l.openBlock(),l.createBlock(C,{key:S,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(O,{"content-position":"left"}),l.createVNode(w,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(p,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:A=>h(_)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"多选列"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isCheckRow,"onUpdate:modelValue":d[1]||(d[1]=N=>l.unref(a).isCheckRow=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isOperateRow,"onUpdate:modelValue":d[2]||(d[2]=N=>l.unref(a).isOperateRow=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isPagination,"onUpdate:modelValue":d[3]||(d[3]=N=>l.unref(a).isPagination=N),onChange:u},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"序号列"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isSerialNumber,"onUpdate:modelValue":d[4]||(d[4]=N=>l.unref(a).isSerialNumber=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"排序"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isSort,"onUpdate:modelValue":d[5]||(d[5]=N=>l.unref(a).isSort=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"展/收查询条件"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isExpandQuery,"onUpdate:modelValue":d[6]||(d[6]=N=>l.unref(a).isExpandQuery=N),onChange:u},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"立即执行接口"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isExecuteImmediatelyTableApi,"onUpdate:modelValue":d[7]||(d[7]=N=>l.unref(a).isExecuteImmediatelyTableApi=N)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(g,null,{default:l.withCtx(()=>[l.unref(a).isOperateRow?(l.openBlock(),l.createBlock(w,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableOperateCellWidth,"onUpdate:modelValue":d[8]||(d[8]=N=>l.unref(a).tableOperateCellWidth=N),min:120},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(a).isPagination?(l.openBlock(),l.createBlock(w,{key:1,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页页数",prop:"pageSize","label-width":"150",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).pageSize,"onUpdate:modelValue":d[9]||(d[9]=N=>l.unref(a).pageSize=N),min:10},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件label宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableQueryLabelWidth,"onUpdate:modelValue":d[10]||(d[10]=N=>l.unref(a).tableQueryLabelWidth=N),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件列数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableQueryRowWidth,"onUpdate:modelValue":d[11]||(d[11]=N=>l.unref(a).tableQueryRowWidth=N),min:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableMoreBtnSplitNumber,"onUpdate:modelValue":d[12]||(d[12]=N=>l.unref(a).tableMoreBtnSplitNumber=N),min:0},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"顶部更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).headerMoreBtnSplitNumber,"onUpdate:modelValue":d[13]||(d[13]=N=>l.unref(a).headerMoreBtnSplitNumber=N),min:0},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},[["__scopeId","data-v-fa895b16"]]),QT="",$y=ct({__name:"configBtns",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=rn.useRoute(),s=l.inject("apiPrefix"),r=l.inject("request"),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>n1)),a=i,c=()=>({sort:0,permissionCode:null,requestUrl:"",btnName:"",btnAlias:"",btnIcon:"",btnPostion:"",btnType:"",btnColor:"",submitWay:"",importFileName:"",isPromptVerificationSelectTable:"1",isCustomBtn:!1,customType:"",codeStr:"",customComponentName:"",customComponentUrl:"",associationMenuId:"",submitFields:[],matchFields:[]}),h=()=>({tableLoading:!1,showConfigBtnDialog:!1,dialogData:{}});let u=l.reactive(h()),f=l.ref(null),d=0,m=l.ref([]),b=l.ref([]),w=[{prop:"checkbox",width:60},{prop:"serialNumber",width:80},{label:"按钮名称",prop:"btnName",minWidth:200},{label:"权限码",prop:"permissionCode",minWidth:200},{label:"按钮别名",prop:"btnAlias",minWidth:120},{label:"按钮图标",prop:"btnIcon",minWidth:120},{label:"是否自定义",prop:"isCustomBtn",width:120,render:!0},{label:"排序",prop:"sort",width:180,render:!0},{label:"操作",prop:"operate",width:120,render:!0,fixed:"right"}],g=l.ref([]);const p=k=>r({url:`${s}/sysMenus/getAllList`,method:"post",data:k}),O=k=>r({url:`${s}/sysMenus/getMenuOfOperate`,method:"get",params:k}),C=(k,P)=>{b.value.includes(k.permissionCode)||b.value.push(k.permissionCode),Object.assign(g.value[d],k),P(!0)},y=async k=>{try{u.tableLoading=!0;const P=a.id?a.id:n.params.id,{data:N}=await O({id:P});b.value=(N||[]).filter(_=>(k||[]).some(A=>A.permissionCode==_.unique)).map(_=>_.unique),g.value=(N||[]).map((_,A)=>{let S=c(),M=(k||[]).find(T=>T.permissionCode==_.unique)||{};return{...S,btnIcon:_.icon||"",...M,btnName:_.name,permissionCode:_.unique,sort:M.sort?M.sort:(A+1)*10}}).sort((_,A)=>_.sort-A.sort),u.tableLoading=!1}catch(P){u.tableLoading=!1,console.error(P)}},E=()=>f.value.getSelectionRows()||[];l.provide("associationMenuList",m),l.provide("createDefaultButtonItem",c),l.watch(()=>a.modelValue,async(k,P)=>{try{const N=a.id?a.id:n.params.id;m.value=(await p({dynamicFilters:[{field:"parentId",operate:"Equal",value:N}]})).data||[],await y(k)}catch(N){u.tableLoading=!1,console.error(N)}},{deep:!0});const x=k=>{u.dialogData=k.row,d=k.$index,u.showConfigBtnDialog=!0};return e({getTableSelectionRows:E}),(k,P)=>{const N=l.resolveComponent("el-tag"),_=l.resolveComponent("el-input-number"),A=l.resolveComponent("el-button"),S=l.resolveComponent("a-table"),M=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(M,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>P[2]||(P[2]=[l.createElementVNode("div",{class:"card-header"},[l.createElementVNode("div",{class:"card-header-title"},"按钮配置")],-1)])),default:l.withCtx(()=>[l.createVNode(S,{ref_key:"tableRef",ref:f,loading:l.unref(u).tableLoading,rowKey:"permissionCode",selection:l.unref(b),"onUpdate:selection":P[0]||(P[0]=T=>l.isRef(b)?b.value=T:b=T),headers:l.unref(w),data:l.unref(g),showPagination:!1},{isCustomBtn:l.withCtx(({scope:T})=>[l.createVNode(N,{type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(T.row.isCustomBtn?"是":"否"),1)]),_:2},1024)]),sort:l.withCtx(({scope:T})=>[l.createVNode(_,{modelValue:T.row.sort,"onUpdate:modelValue":I=>T.row.sort=I,min:0},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:T})=>[l.createVNode(A,{type:"primary",text:"",size:"small",icon:"Aim",onClick:I=>x(T)},{default:l.withCtx(()=>P[3]||(P[3]=[l.createTextVNode(" 配置 ")])),_:2},1032,["onClick"])]),_:1},8,["loading","selection","headers","data"]),l.createVNode(l.unref(o),{visible:l.unref(u).showConfigBtnDialog,"onUpdate:visible":P[1]||(P[1]=T=>l.unref(u).showConfigBtnDialog=T),title:"配置按钮",data:l.unref(u).dialogData,onRefresh:C},null,8,["visible","data"])]),_:1})}}},[["__scopeId","data-v-8c801481"]]),TT="",Ny={class:"card-header"},Ry=ct({__name:"configFileds",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>o1)),n=e,s=i;l.inject("configData")();const r=()=>({tableLoading:!1,showAddFieldDialog:!1,dialogTitle:"字段配置",dialogData:{}});let o=l.reactive(r()),a=0,c=[{label:"序号",prop:"serialNumber",width:60},{label:"字段",prop:"fieldName",minWidth:160},{label:"字段Key",prop:"fieldKey",minWidth:160},{label:"字段类型",prop:"fieldType",minWidth:160,render:!0},{label:"使用场景",prop:"useScenes",minWidth:340,render:!0},{label:"排序",prop:"sort",width:200,render:!0},{label:"操作",prop:"operate",width:170,render:!0,fixed:"right"}],h=l.ref([]);Wu[0].options.map(C=>({btnName:C.key,permissionCode:C.value}));const u=C=>{if(!Reflect.has(C,"fieldType"))return"";const y=qu.find(E=>E.value==C.fieldType);return(y==null?void 0:y.key)||""},f=C=>Reflect.has(C,"useScenes")?(C.formCustomComponentes??[]).filter(y=>C.useScenes.includes(y.permissionCode)):[],d=C=>(C.formCustomComponentes||[]).filter(y=>y.isFieldCustom).map(y=>`${y.btnName}:是`).join(),m=(C,y)=>{if(a==null){const E=h.value.length;h.value.push({...C,sort:(E+1)*10})}else h.value[a]={...C,postRequestParams:[...C.postRequestParams],useScenes:[...C.useScenes],formCustomComponentes:[...C.formCustomComponentes]};n("update:modelValue",h.value),y(!0)},b=async()=>{try{o.tableLoading=!0,h.value=(s.modelValue||[]).map(C=>({...C,sort:C.sort?C.sort:0})).sort((C,y)=>C.sort-y.sort),o.tableLoading=!1}catch(C){o.tableLoading=!1,console.error(C)}};l.watch(()=>s.modelValue,async(C,y)=>{await b()},{deep:!0,immediate:!0});const w=()=>{a=null,o.dialogData={},o.showAddFieldDialog=!0},g=C=>{a=C.$index,o.dialogData=C.row,o.showAddFieldDialog=!0},p=()=>{n("update:modelValue",h.value)},O=C=>{h.value.splice(C.$index,1),n("update:modelValue",h.value)};return(C,y)=>{const E=l.resolveComponent("el-button"),x=l.resolveComponent("el-tag"),k=l.resolveComponent("el-badge"),P=l.resolveComponent("el-input-number"),N=l.resolveComponent("a-table"),_=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(_,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>[l.createElementVNode("div",Ny,[y[3]||(y[3]=l.createElementVNode("div",{class:"card-header-title"},"字段配置",-1)),l.createVNode(E,{class:"card-header-operate",type:"primary",icon:"Plus",onClick:y[0]||(y[0]=A=>w())},{default:l.withCtx(()=>y[2]||(y[2]=[l.createTextVNode("添加字段")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(N,{loading:l.unref(o).tableLoading,headers:l.unref(c),data:l.unref(h),showPagination:!1},{fieldType:l.withCtx(({scope:A})=>[l.createTextVNode(l.toDisplayString(u(A.row)),1)]),useScenes:l.withCtx(({scope:A})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f(A.row),(S,M)=>(l.openBlock(),l.createBlock(k,{key:M,value:S.isFieldCustom?"C":"",offset:[-5,5]},{default:l.withCtx(()=>[l.createVNode(x,{style:{margin:"0 4px"},type:"success",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S.btnName),1)]),_:2},1024)]),_:2},1032,["value"]))),128))]),formCustomComponentes:l.withCtx(({scope:A})=>[d(A.row)?(l.openBlock(),l.createBlock(x,{key:0,type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d(A.row)),1)]),_:2},1024)):l.createCommentVNode("",!0)]),sort:l.withCtx(({scope:A})=>[l.createVNode(P,{modelValue:A.row.sort,"onUpdate:modelValue":S=>A.row.sort=S,min:0,onChange:p},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:A})=>[l.createVNode(E,{type:"primary",text:"",size:"small",icon:"EditPen",onClick:S=>g(A)},{default:l.withCtx(()=>y[4]||(y[4]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(E,{type:"danger",text:"",size:"small",icon:"Delete",onClick:S=>O(A)},{default:l.withCtx(()=>y[5]||(y[5]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1},8,["loading","headers","data"]),l.createVNode(l.unref(t),{visible:l.unref(o).showAddFieldDialog,"onUpdate:visible":y[1]||(y[1]=A=>l.unref(o).showAddFieldDialog=A),title:l.unref(o).dialogTitle,configData:s.data,data:l.unref(o).dialogData,onRefresh:m},null,8,["visible","title","configData","data"])]),_:1})}}},[["__scopeId","data-v-75e750d2"]]),$T="",Vy={class:"dialog-footer"},Ly=ct({__name:"dialogInitConfig",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=rn.useRoute(),n=l.inject("apiPrefix"),s=l.inject("request"),r=e,o=i;l.computed(()=>t.params.key);const a=()=>({dataBase:"",api:""}),c=()=>({loading:!1,btnLoading:!1});let h=l.reactive(c()),u=l.ref([]),f=l.ref(null),d=l.ref(a());const m=C=>s({url:`${n}/scripts/getAllDatabaseTable`,method:"get",data:C}),b=async()=>{try{h.loading=!0;const{data:C}=await m();u.value=C||[],h.loading=!1}catch(C){console.error(C),h.loading=!1}};l.watch(()=>o.visible,async(C,y)=>{C&&await b()});const w=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),g=C=>{p(),C()},p=()=>{d.value=Object.assign(d.value,a()),f.value.resetFields(),r("update:visible",!1)},O=C=>{C&&C.validate(async y=>{if(y)try{h.btnLoading=!0;const{data:E}=await s({url:`${n}/scripts/getAllColumnsByTableName`,method:"get",params:{tableName:d.value.dataBase}}),x=(E||[]).map(k=>{let P=w();return P.fieldName=k.comment,P.fieldKey=k.name,P.fieldType="string",P});r("refresh",{formList:x},()=>{p()}),h.btnLoading=!1}catch(E){console.error(E),h.btnLoading=!1}})};return(C,y)=>{const E=l.resolveComponent("el-option"),x=l.resolveComponent("el-select"),k=l.resolveComponent("el-form-item"),P=l.resolveComponent("el-input"),N=l.resolveComponent("el-form"),_=l.resolveComponent("el-button"),A=l.resolveComponent("el-dialog"),S=l.resolveDirective("loading"),M=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(A,{"model-value":o.visible,title:o.title,top:"10vh",width:"600",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":g},{footer:l.withCtx(()=>[l.createElementVNode("span",Vy,[l.createVNode(_,{loading:l.unref(h).btnLoading,onClick:p},{default:l.withCtx(()=>y[3]||(y[3]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(_,{type:"primary",loading:l.unref(h).btnLoading,onClick:y[2]||(y[2]=T=>O(l.unref(f)))},{default:l.withCtx(()=>y[4]||(y[4]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[M]])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(N,{ref_key:"formRef",ref:f,model:l.unref(d),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(k,{label:"数据库","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"dataBase"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(d).dataBase,"onUpdate:modelValue":y[0]||(y[0]=T=>l.unref(d).dataBase=T),placeholder:"请选择数据库",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u),(T,I)=>(l.openBlock(),l.createBlock(E,{key:T,label:`${T.tableComment}【${T.tableName}】`,value:T.tableName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l.createVNode(k,{label:"接口地址(关键字)","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"api"},{default:l.withCtx(()=>[l.createVNode(P,{modelValue:l.unref(d).api,"onUpdate:modelValue":y[1]||(y[1]=T=>l.unref(d).api=T),placeholder:"请输入接口地址(关键字)",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[S,l.unref(h).loading]])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-8fa48448"]]),RT="",My={class:"page-container"},By={class:"submit-box"},Dy={class:"submit-box-r"},Yu=ct({__name:"index",props:{pageKey:{type:String,default:""},id:{type:String,default:void 0}},setup(i){const e=rn.useRoute(),t=rn.useRouter(),n=l.inject("apiPrefix"),s=l.inject("request"),r=i;let o=r.id??void 0,a=r.pageKey?r.pageKey:e.params.key,c=l.ref([]),h=l.ref(),u=l.ref([]),f=l.ref({}),d=l.ref(null),m=l.ref(null),b=l.ref(null),w=l.ref({}),g=l.ref({}),p=l.ref([]),O=l.ref([]),C=l.reactive({pageLoading:!1,saveBtnLoading:!1,showDialogInitConfig:!1});const y=B=>s({url:`${n}/pages/getPageDetail?key=${B}`,method:"get"}),E=B=>s({url:`${n}/pageConfigs/createOrEdit`,method:"post",data:B}),x=B=>s({url:`${n}/sysMenus/getAllList`,method:"post",data:B}),k=B=>s({url:`${n}/sysDataDictionaries/getDictionaryByGroup?groupName=${B}`,method:"get"}),P=async()=>{const{data:B}=await x({dynamicFilters:[{field:"url",operate:"Equal",value:"/pages"}]});c.value=B||[]},N=async()=>{try{const{data:{pageConfigs:B}}=await y(a),U=JSON.parse(B.pageConfig)||{};o=B.pageId,console.log("pageConfigData",U),f.value=U,w.value={...U.tableConfig??{}},g.value={...U.formConfig??{}},p.value=[...U.buttons??[]],O.value=[...U.fields??[]]}catch(B){console.error(B)}},_=()=>{w.value={},g.value={},p.value=[],O.value=[],N()};l.provide("conditionList",()=>u),l.provide("pageKey",()=>l.ref(a)),l.provide("configData",()=>f),l.onMounted(async()=>{try{C.pageLoading=!0,await P(),h.value=e.params.id,u.value=(await k("Condition")).data||[],await N(),C.pageLoading=!1}catch(B){C.pageLoading=!1,console.error(B)}});const A=B=>{const U=c.value.find(Z=>Z.id==B);t.replace({path:`/actConfig/${U.key}/${U.id}`}),h.value=U.id,a=U.key,N()},S=()=>{C.showDialogInitConfig=!0},M=({formList:B},U)=>{O.value=[...B],U(!0)},T=()=>{let B={id:o,key:a,pageConfig:{tableConfig:d.value.form,formConfig:m.value.form,buttons:b.value.getTableSelectionRows(),fields:O.value}};B.pageConfig=JSON.stringify(B.pageConfig),C.saveBtnLoading=!0,E(B).then(U=>{Ne.ElNotification({title:"提示",message:"保存成功",type:"success",duration:2500}),_(),C.saveBtnLoading=!1}).catch(U=>{C.saveBtnLoading=!1})},I=async()=>{Promise.all([d.value.formRef.validate(),m.value.formRef.validate()]).then(B=>{B.every(U=>U)&&T()}).catch(B=>B)};return(B,U)=>{const Z=l.resolveComponent("el-button"),K=l.resolveComponent("el-option"),X=l.resolveComponent("el-select"),J=l.resolveComponent("el-card"),fe=l.resolveComponent("el-col"),he=l.resolveComponent("el-row"),ye=l.resolveDirective("debounce"),z=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createElementBlock("div",My,[l.createVNode(he,{style:{margin:"0"},gutter:12},{default:l.withCtx(()=>[l.createVNode(fe,{class:"header-operate",span:24},{default:l.withCtx(()=>[l.createVNode(J,{class:"form-card",shadow:"hover"},{default:l.withCtx(()=>[l.createElementVNode("div",By,[U[10]||(U[10]=l.createElementVNode("div",{class:"submit-box-l"},null,-1)),l.createElementVNode("div",Dy,[l.withDirectives((l.openBlock(),l.createBlock(Z,{style:{width:"120px"},type:"primary",loading:l.unref(C).initBtnLoading,onClick:U[0]||(U[0]=D=>S())},{default:l.withCtx(()=>U[8]||(U[8]=[l.createTextVNode("一键初始化配置")])),_:1},8,["loading"])),[[ye]]),l.createVNode(X,{class:"menu-select",modelValue:l.unref(h),"onUpdate:modelValue":U[1]||(U[1]=D=>l.isRef(h)?h.value=D:h=D),placeholder:"菜单切换",clearable:"",filterable:"",onChange:A},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c),D=>(l.openBlock(),l.createBlock(K,{key:D.id,label:D.name,value:D.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.withDirectives((l.openBlock(),l.createBlock(Z,{style:{width:"120px"},type:"success",loading:l.unref(C).saveBtnLoading,onClick:U[2]||(U[2]=D=>I(B.formRef))},{default:l.withCtx(()=>U[9]||(U[9]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[ye]])])])]),_:1})]),_:1}),l.createVNode(fe,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(Ey,{ref_key:"configTableRef",ref:d,modelValue:l.unref(w),"onUpdate:modelValue":U[3]||(U[3]=D=>l.isRef(w)?w.value=D:w=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(Ty,{ref_key:"configFormRef",ref:m,modelValue:l.unref(g),"onUpdate:modelValue":U[4]||(U[4]=D=>l.isRef(g)?g.value=D:g=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode($y,{ref_key:"configBtnsRef",ref:b,modelValue:l.unref(p),"onUpdate:modelValue":U[5]||(U[5]=D=>l.isRef(p)?p.value=D:p=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode(Ry,{modelValue:l.unref(O),"onUpdate:modelValue":U[6]||(U[6]=D=>l.isRef(O)?O.value=D:O=D)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(Ly,{visible:l.unref(C).showDialogInitConfig,"onUpdate:visible":U[7]||(U[7]=D=>l.unref(C).showDialogInitConfig=D),title:"一键初始化配置",onRefresh:M},null,8,["visible"])])),[[z,l.unref(C).pageLoading]])}}},[["__scopeId","data-v-8dfa8a8a"]]),vy=(i,e)=>{let t=e.value||1e3,n,s=!1;i.addEventListener("click",r=>{n&&clearTimeout(n),s?r&&r.stopImmediatePropagation():s=!0,n=setTimeout(()=>{n=null,s=!1},t)},!0)},Cr={en:{act:{sort:"Serial Number",noData:"No Data",operate:"Operation",inputPlaceholder:"Please Input ",selectPlaceholder:"Please Select ",tip:"Tip",time:"Time",startTime:"Start Time",endTime:"End Time",loading:"ing",reset:"Reset",requiredMessage:"Required",customTableHeader:"Custom",developing:"In the process of feature development Coming soon",fieldCustom:"Custom",cancel:"Cancel",save:"Save",saveSuccessfully:"Save Successfully",configTableRow:"Please configure the table to select multiple columns",pleaseSelcet:"Please Selcet Need",data:"Data",success:"Success",buttonBindField:"The current button is not bound to a field",enter:"Enter",isExecuteOperate:"Are you sure to perform this operation",noConfigPage:"No Config Page",noImage:"No image",preview:"Preview",uploadText:"Drag the file here, or",clickUpload:"Click to upload",uploadLoading:"Upload loading...",uploadErrorTip:"The file type is incorrect. Please upload the file in the correct format again",uploadLimitTip:"Exceeding the file limit, please confirm and upload again.",expand:"Expand",retract:"Retract",formatCode:"FormatCode"}},zhCn:{act:{sort:"序号",noData:"暂无数据",operate:"操作",inputPlaceholder:"请输入",selectPlaceholder:"请选择",tip:"提示",time:"时间",startTime:"开始时间",endTime:"结束时间",loading:"中",reset:"重置",requiredMessage:"必填项",customTableHeader:"自定义表头(暂未创建文件)",developing:"功能开发中...敬请期待",fieldCustom:"当前字段为自定义,请在项目中创建对应组件",cancel:"取消",save:"保存",saveSuccessfully:"保存成功",configTableRow:"请配置表格多选列",pleaseSelcet:"请选择需要",data:"的数据",success:"成功",buttonBindField:"当前按钮未绑定字段",enter:"确定",isExecuteOperate:"是否确认执行此操作",noConfigPage:"暂无页面信息",noImage:"暂无",preview:"预览",uploadText:"将文件拖到此处,或",clickUpload:"点击上传",uploadLoading:"上传中...",uploadErrorTip:"文件类型不正确,请重新上传正确格式的文件。",uploadLimitTip:"超出文件数量限制,请确认后重新上传。",expand:"展开",retract:"收起",formatCode:"一键格式化代码"}}},zu={ActPage:ju,ActConfig:Yu},Zy={install(i,e){var u;const{modules:t,request:n,themeColor:s,apiPrefix:r,language:{messages:o={},en:a="zhCn"}}=e,c={act:Object.assign(Cr[a].act,((u=o[a])==null?void 0:u.act)??{})},h=wu({locale:a,fallbackLocale:a,messages:{...Cr,[a]:c}});i.use(h),i.provide("actModules",t),i.provide("themeColor",s),i.provide("apiPrefix",r||"/api/v1"),i.provide("request",n),i.directive("debounce",vy),Object.keys(zu).forEach(f=>{i.component(f,zu[f])})}},Iy={ActPage:ju,ActConfig:Yu};function Uy(i){var o;const{modules:e,language:{messages:t={},en:n="zhCn"}}=i,s={act:Object.assign(Cr[n].act,((o=t[n])==null?void 0:o.act)??{})};return wu({locale:n,fallbackLocale:n,messages:{...Cr,[n]:s}})}const LT="",Fy={key:0,class:"search-module-container"},jy={class:"no-config-field"},qy=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["reset","search"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Gu)),{t:n}=Gt(),s=l.inject("request"),r=l.inject("globalProps"),o=l.inject("loadComponents"),a=l.inject("getFieldUiProps"),c=l.inject("formatDataType"),h=l.inject("disposeDate"),u=l.inject("getDefaultQueryValues"),f=e,d=i,m=l.ref({});let b=l.ref([]),w=l.ref([]),g=l.ref(!0);const p=l.ref(0),O=l.ref(0),C=A=>d.data.tableConfig.isExpandQuery&&g.value?d.data.tableConfig.tableQueryRowWidth>A+1:!0,y=async A=>{b.value=await Promise.all(A.filter(S=>S.useScenes.includes("tableSearch")).map(async S=>{S.tableQueryDefaultValue&&(["date","dateRange"].includes(S.fieldType)?S.queryValue=h(S):S.queryValue=S.tableQueryDefaultValue?S.tableQueryDefaultValue:void 0),r.defaultParams.some(T=>{T.field==S.fieldKey&&T.operate===S.tableQueryCondition&&(S.queryValue=T.value)});const M=(S.formCustomComponentes??[]).find(T=>T.permissionCode==="tableSearch");if(S.isQueryFieldCustom=!1,M&&M.isFieldCustom){const{isFieldCustom:T,customComponentName:I,customComponentUrl:B}=M;if(S.isQueryFieldCustom=!0,O.value++,T&&!S.customQueryComponent){const U=await o(B,I);S.customQueryComponent=U}}return S}))},E=A=>{const S=(A||[]).filter(M=>M.permissionCode===1001).map(M=>({...M,loading:!1}));w.value=[...S,{btnName:n("act.reset"),permissionCode:"9999",btnColor:"info",btnIcon:"btn-reset",loading:!1}]},x=async({node:A,resolve:S},M)=>{const T=a(M),{label:I,value:B,children:U,isLeaf:Z}={...xr,...T.treeProps||{}};if(A[Z])return S([]);const K=M.postRequestParams.filter(z=>z.submitType==="default").reduce((z,D)=>(z[D.submitName]=c(D.paramsType,D.submitValue),z),{}),X=M.postRequestParams.filter(z=>z.submitType==="match").reduce((z,D)=>(z[D.submitName]=c(D.paramsType,r.matchData[D.submitValue][D.submitName]),z),{}),J=M.postRequestParams.filter(z=>z.submitType==="dynamic").map(z=>({field:z.submitName,operate:z.submitMatchType,value:T.loadCode?A==null?void 0:A.data.value:c(z.paramsType,z.submitValue)}));let fe={};Object.keys(K).length&&(fe={...fe,...K}),Object.keys(X).length&&(fe={...fe,...X}),J.length&&(fe.dynamicFilters=J),T.loadCode&&Reflect.has(fe,T.loadCode)&&(fe[T.loadCode]=A==null?void 0:A.data.value);const{data:he}=await s({url:M.fieldRequestUrl,method:M.fieldRequestType||"GET",data:fe}),ye=(he||[]).map(z=>({label:z[I],value:z[B],children:[],isLeaf:z[Z]}));S(ye)};l.watch(()=>d.data,(A,S)=>{y(A.fields),E(A.buttons)},{immediate:!0,deep:!0});const k=()=>{p.value++,p.value===O.value&&P({permissionCode:1001})},P=A=>{switch(A.loading=!0,A.permissionCode){case"9999":b.value.forEach(T=>{T.tableQueryDefaultValue?T.queryValue=["date","dateRange"].includes(T.fieldType)?h(T):(T==null?void 0:T.tableQueryDefaultValue)||void 0:T.queryValue=T.fieldType.includes("&")?[]:void 0});const S=u();f("reset",S,()=>{A.loading=!1});break;default:const M=b.value.filter(T=>Array.isArray(T.queryValue)?T.queryValue.length:!!T.queryValue);f("search",M,()=>{A.loading=!1});break}},N=()=>{g.value=!g.value},_=()=>{P({permissionCode:1001})};return(A,S)=>{var z;const M=l.resolveComponent("el-input"),T=l.resolveComponent("el-option"),I=l.resolveComponent("el-select"),B=l.resolveComponent("el-select-v2"),U=l.resolveComponent("el-cascader"),Z=l.resolveComponent("el-tree-select"),K=l.resolveComponent("el-date-picker"),X=l.resolveComponent("el-form-item"),J=l.resolveComponent("a-svg-icon"),fe=l.resolveComponent("el-button"),he=l.resolveComponent("el-form"),ye=l.resolveDirective("debounce");return l.unref(b)&&l.unref(b).length?(l.openBlock(),l.createElementBlock("div",Fy,[l.createVNode(he,{style:l.normalizeStyle({"--table-query-row":d.data.tableConfig.tableQueryRowWidth}),class:"form-content",ref:"elForm","label-suffix":":","label-position":"right"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(D,V)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:V},[C(V)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[D.isQueryFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[D.customQueryComponent?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(D.customQueryComponent),{key:0,class:"custom-btn",ref_for:!0,ref:q=>m.value[`customQueryComponent_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,queryItem:D,data:d.data,onRefresh:S[9]||(S[9]=q=>P({permissionCode:1001})),onLoaded:k},null,40,["modelValue","onUpdate:modelValue","queryItem","data"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:V},[l.createElementVNode("span",jy,"【"+l.toDisplayString(D.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(n)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(X,{key:0,class:"search-form-item","label-width":d.data.tableConfig.tableQueryLabelWidth,label:D.fieldName},{default:l.withCtx(()=>[D.fieldType==="input"||D.fieldType==="editor"?(l.openBlock(),l.createBlock(M,l.mergeProps({key:0,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${D.fieldName}`,clearable:"",ref_for:!0},l.unref(a)(D),{onKeyup:S[0]||(S[0]=l.withKeys(l.withModifiers(q=>P({permissionCode:1001}),["prevent"]),["enter","native"])),onClear:_}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):l.createCommentVNode("",!0),D.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${D.fieldName}`,clearable:"",onKeyup:S[1]||(S[1]=l.withKeys(l.withModifiers(q=>P({permissionCode:1001}),["prevent"]),["enter","native"])),ref_for:!0},l.unref(a)(D)),null,16,["modelValue","onUpdate:modelValue","placeholder"])):["select","switch","multipleSelect"].includes(D.fieldType)?(l.openBlock(),l.createBlock(I,l.mergeProps({key:2,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(a)(D),{multiple:D.fieldType==="multipleSelect","collapse-tags":D.fieldType==="multipleSelect","collapse-tags-tooltip":D.fieldType==="multipleSelect",onChange:S[2]||(S[2]=q=>P({permissionCode:1001}))}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(D.dataList,(q,H)=>(l.openBlock(),l.createBlock(T,{key:H,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","collapse-tags","collapse-tags-tooltip"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(D.fieldType)?(l.openBlock(),l.createBlock(B,l.mergeProps({key:3,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,options:D.dataList,props:{...l.unref(Fu)},placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(a)(D),{"collapse-tags":D.fieldType==="virtualizedMultipleSelect","collapse-tags-tooltip":D.fieldType==="virtualizedMultipleSelect",multiple:D.fieldType==="virtualizedMultipleSelect",onChange:S[3]||(S[3]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","collapse-tags","collapse-tags-tooltip","multiple"])):D.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(U,l.mergeProps({key:4,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,options:D.dataList,props:{...l.unref(Uu)},clearable:"",filterable:"",placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,ref_for:!0},l.unref(a)(D),{onChange:S[4]||(S[4]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder"])):D.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:5,ref_for:!0,ref:q=>m.value[`elTreeSelect_fullLoad_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,data:D.dataList,placeholder:`请选择${D.fieldName}`,props:{...l.unref(xr),...l.unref(a)(D).treeProps||{}},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:""},l.unref(a)(D),{onChange:S[5]||(S[5]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","data","placeholder","props"])):D.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:6,ref_for:!0,ref:q=>m.value[`elTreeSelect_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`请选择${D.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(q,H)=>x({node:q,resolve:H},D)},l.unref(a)(D),{onChange:S[6]||(S[6]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):D.fieldType==="date"?(l.openBlock(),l.createBlock(K,l.mergeProps({key:7,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,type:"date",placeholder:`${l.unref(n)("act.selectPlaceholder")}${l.unref(n)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss",clearable:"",ref_for:!0},l.unref(a)(D),{onChange:S[7]||(S[7]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):D.fieldType==="dateRange"?(l.openBlock(),l.createBlock(K,l.mergeProps({key:8,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,type:"daterange","start-placeholder":l.unref(n)("act.startTime"),"end-placeholder":l.unref(n)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",clearable:"",ref_for:!0},l.unref(a)(D),{onChange:S[8]||(S[8]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label-width","label"]))],64)):l.createCommentVNode("",!0)],64))),128)),l.unref(b).length?(l.openBlock(),l.createBlock(X,{key:0,class:"search-form-btn","label-width":"0"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(D,V)=>l.withDirectives((l.openBlock(),l.createBlock(fe,{key:V,type:D.btnColor,loading:D.loading,onClick:q=>P(D)},{default:l.withCtx(()=>[D.btnIcon?(l.openBlock(),l.createBlock(J,{key:0,class:"mr6",name:D.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(D.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[ye]])),128))]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["style"]),d.data.tableConfig.isExpandQuery&&((z=l.unref(b))==null?void 0:z.length)>d.data.tableConfig.tableQueryRowWidth?(l.openBlock(),l.createBlock(fe,{key:0,class:"expand",text:"",size:"small",icon:l.unref(g)?"ArrowDown":"ArrowUp",onClick:N},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(g)?l.unref(n)("act.expand"):l.unref(n)("act.retract")),1)]),_:1},8,["icon"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}},[["__scopeId","data-v-92d7682c"]])},Symbol.toStringTag,{value:"Module"})),DT="",Xy={class:"header-operate-container"},Wy=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["onOperate"],setup(i,{emit:e}){const t=e,n=i,{t:s}=Gt();let r=l.ref([]);const o=l.inject("globalProps"),a=l.inject("menuPermissionBtns"),c=l.inject("stringToBoolean"),h=l.inject("matchCondition"),u=l.inject("getTableData"),f=l.inject("tableBtnRefs"),d=l.computed(()=>{const{tableConfig:{headerMoreBtnSplitNumber:C}}=n.data;return!C||C>=r.value.length}),m=()=>{const{tableConfig:{headerMoreBtnSplitNumber:C}}=n.data;return d.value?r.value:r.value.slice(0,C)},b=()=>{var y;const{tableConfig:{headerMoreBtnSplitNumber:C}}=n.data;return d.value?[]:r.value.slice(C,(y=r.value)==null?void 0:y.length)},w=C=>{if(!C.matchFields.length)return!0;const y=C.matchFields.filter(N=>N.matchType!="default"),E=N=>o.matchData[N.matchType][N.matchFieldName];let k=y.reduce((N,_,A)=>{const S=E(_);return N+=h(_.matchCondition,S,_.fieldValue==""?null:_.fieldValue=="true"||_.fieldValue=="false"?c(_.fieldValue):_.fieldValue),A!==y.length-1&&(N+=_.spliceCondition||"&&"),N},"").split("||"),P=k.reduce((N,_,A)=>(N+=`(${_})`,A<k.length-1&&(N+="||"),N),"");return new Function(`return ${P}`)()},g=C=>a.value.some(y=>y.unique==C.permissionCode)&&w(C),p=C=>{r.value=(C||[]).filter(y=>y.permissionCode!==1001&&y.btnPostion.includes("header")).sort((y,E)=>y.sort-E.sort).map(y=>(y.btnAlias&&(y.btnName=y.btnAlias),Reflect.has(y,"isPromptVerificationSelectTable")||(y.isPromptVerificationSelectTable="1"),y))};l.watch(()=>n.data,(C,y)=>{p(C.buttons)},{immediate:!0});const O=C=>{t("onOperate",C,{})};return(C,y)=>{const E=l.resolveComponent("a-svg-icon"),x=l.resolveComponent("el-button"),k=l.resolveComponent("el-icon"),P=l.resolveComponent("el-dropdown-item"),N=l.resolveComponent("el-dropdown-menu"),_=l.resolveComponent("el-dropdown"),A=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",Xy,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m(),(S,M)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:S.permissionCode},[g(S)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[S.isCustomBtn&&S.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(S[S.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:T=>l.unref(f)[`${S.customComponentName}-${S.permissionCode}`]=T,buttonData:S,onRefresh:y[0]||(y[0]=T=>l.unref(u)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(x,{class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`],onClick:T=>O(S)},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(x,{key:1,class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`],onClick:T=>O(S)},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])],64)):l.createCommentVNode("",!0)],64))),128)),d.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(_,{key:0,class:"header-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode(N,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b(),(S,M)=>(l.openBlock(),l.createBlock(P,{key:S.permissionCode,onClick:T=>O(S)},{default:l.withCtx(()=>[g(S)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[S.isCustomBtn&&S.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(S[S.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:T=>l.unref(f)[`${S.customComponentName}-${S.permissionCode}`]=T,buttonData:S,onRefresh:y[1]||(y[1]=T=>l.unref(u)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(x,{class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`]},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(x,{key:1,class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`]},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading"])),[[A]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:l.withCtx(()=>[l.createVNode(x,{type:"primary"},{default:l.withCtx(()=>[y[2]||(y[2]=l.createTextVNode(" 更多按钮")),l.createVNode(k,{class:"el-icon--right"},{default:l.withCtx(()=>[l.createVNode(l.unref(Kb))]),_:1})]),_:1})]),_:1}))])}}},[["__scopeId","data-v-f0dda1b5"]])},Symbol.toStringTag,{value:"Module"})),IT="",Yy={class:"act-table"},zy=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{loading:{type:Boolean,default:!1},maxHeight:{type:Number,default:600},total:{type:Number,default:0},tableQuery:{type:Object,default:()=>({pageIndex:1,pageSize:10})},selection:{type:Array,default:()=>[]},headers:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},showSerialNumber:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},rowKey:{type:String,default:"id"},treeProps:{type:Object,default:()=>({children:"children",hasChildren:"hasChildren"})},tableConfig:{type:Object,default:()=>({})}},emits:["update:tableQuery","update:selection","refresh","onRowClick","changeExpand"],setup(i,{expose:e,emit:t}){const{t:n}=Gt(),s=t,r=i;let o=l.ref(null);const a=g=>r.showPagination?g+1+(r.tableQuery.pageIndex-1)*r.tableQuery.pageSize:g+1,c=g=>{l.nextTick(()=>{r.data.forEach(p=>{g.includes(p[r.rowKey])&&o.value.toggleRowSelection(p,!0)})})},h=g=>o.value.getSelectionRows();l.watch(()=>r.selection,(g,p)=>{g&&g.length&&c(g)},{deep:!0,immediate:!0});const u=g=>{s("update:selection",g)},f=(g,p)=>{g&&l.nextTick(()=>{r.data.forEach(O=>{g.includes(O[p||r.rowKey])&&o.value.toggleRowSelection(O,!0)})})},d=g=>{s("update:tableQuery",{...r.tableQuery,pageSize:g}),s("refresh",[])},m=g=>{s("update:tableQuery",{...r.tableQuery,pageIndex:g}),s("refresh",[])},b=(g,p,O)=>{s("onRowClick",g,p,O)},w=(g,p)=>{s("changeExpand",g,p)};return e({getSelectionRows:h,updateSelection:f}),(g,p)=>{const O=l.resolveComponent("el-table-column"),C=l.resolveComponent("el-table"),y=l.resolveComponent("el-pagination"),E=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Yy,[l.withDirectives((l.openBlock(),l.createBlock(C,l.mergeProps({style:{width:"100%"},ref_key:"tableRef",ref:o,data:r.data,stripe:"",border:"","highlight-current-row":"","max-height":r.maxHeight,"row-key":r.rowKey,"default-expand-all":"","tree-props":i.treeProps},r.tableConfig,{onSelectionChange:u,onRowClick:b,onExpandChange:w}),{empty:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(r.data.length||r.data.length==0?l.unref(n)("act.noData"):""),1)]),default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.headers,x=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:x.prop},[x.isCustomTableHeader?l.renderSlot(g.$slots,x.prop,{key:0},void 0,!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[x.render?(l.openBlock(),l.createBlock(O,{key:0,label:x.label,align:x.align,width:x.width,minWidth:x.minWidth,sortable:x.sort,"show-overflow-tooltip":x.prop=="operate"?!1:x.showOverflowTooltip,fixed:x.fixed},{default:l.withCtx(k=>[l.renderSlot(g.$slots,x.prop,{scope:k},void 0,!0)]),_:2},1032,["label","align","width","minWidth","sortable","show-overflow-tooltip","fixed"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[x.prop=="checkbox"?(l.openBlock(),l.createBlock(O,{key:0,type:"selection",align:"center",width:x.width,fixed:""},null,8,["width"])):x.prop=="serialNumber"?(l.openBlock(),l.createBlock(O,{key:1,index:a,type:"index",align:"center",width:x.width,label:l.unref(n)("act.sort"),fixed:""},null,8,["width","label"])):(l.openBlock(),l.createBlock(O,{key:2,prop:x.prop,label:x.label,align:x.align,sortable:x.sort,"show-overflow-tooltip":x.showOverflowTooltip,width:x.width,"min-width":x.minWidth,fixed:x.fixed},null,8,["prop","label","align","sortable","show-overflow-tooltip","width","min-width","fixed"]))],64))],64))],64))),128))]),_:3},16,["data","max-height","row-key","tree-props"])),[[E,r.loading]]),r.showPagination?(l.openBlock(),l.createBlock(y,{key:0,class:"table-pagination","current-page":r.tableQuery.pageIndex,"onUpdate:currentPage":p[0]||(p[0]=x=>r.tableQuery.pageIndex=x),"page-size":r.tableQuery.pageSize,"onUpdate:pageSize":p[1]||(p[1]=x=>r.tableQuery.pageSize=x),"page-sizes":[10,20,50,75,100,200,500],background:"",layout:"total, sizes, prev, pager, next, jumper",total:r.total,onSizeChange:d,onCurrentChange:m},null,8,["current-page","page-size","total"])):l.createCommentVNode("",!0)])}}},[["__scopeId","data-v-d2da0301"]])},Symbol.toStringTag,{value:"Module"})),jT="",Gy={class:"no-config-field"},Hy={class:"dialog-footer"},Ky=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Gu)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Hu)),s=l.defineAsyncComponent(()=>Promise.resolve().then(()=>w1)),r=l.defineAsyncComponent(()=>Promise.resolve().then(()=>D1)),{t:o}=Gt(),a=l.inject("request"),c=l.inject("loadComponents"),h=l.inject("formatDataType"),u=l.inject("globalProps"),f=l.inject("stringToBoolean"),d=l.inject("getFieldUiProps"),m=l.inject("disposeRequestData"),b=e,w=i,g=l.ref(!1),p=l.ref(!1),O=l.ref(null),C=l.ref([]),y=l.ref({}),E=l.ref({}),x=Z=>Z.formColumnCol==null?24:Z.formColumnCol?Z.formColumnCol:24/Z.formRow,k=Z=>["input","textarea"].includes(Z.fieldType)?"blur":(["select","multipleSelect","datetimerange","treeSelect","provinceCascade"].includes(Z.fieldType),"change"),P=async({node:Z,resolve:K},X)=>{const J=d(X),{label:fe,value:he,children:ye,isLeaf:z}={...xr,...J.treeProps||{}};if(Z[z])return K([]);const D=X.postRequestParams.filter(Re=>Re.submitType==="default").reduce((Re,qe)=>(Re[qe.submitName]=h(qe.paramsType,qe.submitValue),Re),{}),V=X.postRequestParams.filter(Re=>Re.submitType==="match").reduce((Re,qe)=>(Re[qe.submitName]=h(qe.paramsType,u.matchData[qe.submitValue][qe.submitName]),Re),{}),q=X.postRequestParams.filter(Re=>Re.submitType==="dynamic").map(Re=>{let qe={field:Re.submitName,operate:Re.submitMatchType,value:h(Re.paramsType,Re.submitValue)};return J.loadCode===Re.submitName&&(Z!=null&&Z.data.value)&&(qe.value=Z==null?void 0:Z.data.value),qe});let H={};Object.keys(D).length&&(H={...H,...D}),Object.keys(V).length&&(H={...H,...V}),q.length&&(H.dynamicFilters=q),J.loadCode&&Reflect.has(H,J.loadCode)&&(H[J.loadCode]=Z==null?void 0:Z.data.value);const{data:Ue}=await a({url:X.fieldRequestUrl,method:X.fieldRequestType||"GET",data:H}),Ri=(Ue||[]).map(Re=>({label:Re[fe],value:Re[he],children:[],isLeaf:Re[z]}));K(Ri)},N=Z=>{if(!["input","textarea"].includes(Z)){if(["multipleSelect","dateRange"].includes(Z))return[];if(["switch"].includes(Z))return!1}},_=(Z,K)=>{if(typeof Z=="string"&&["string"].includes(K))return Z.toString();if(["string"].includes(K))return Z.sort((X,J)=>X.sort-J.sort).join(";");if(["number"].includes(K))return Number(Z);if(["array"].includes(K))return Z.sort((X,J)=>X.sort-J.sort)},A=(Z,K=!1)=>{if(["multipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";").map(J=>K?{value:J}:J):[];if(["virtualizedMultipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";"):[];if(["dateRange","provinceCascade"].includes(Z.fieldType)){const J=Z.fieldKey.split("&");return w.data.rowData[Z.fieldKey]=J.map(fe=>w.data.rowData[fe]),w.data.rowData[Z.fieldKey]}let X=w.data.rowData[Z.fieldKey];if(["select"].includes(Z.fieldType)){const J=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][J["value-key"]?J["value-key"]:"value"]=="string"&&X!==null&&(X=K?{value:X.toString()}:X.toString())}if(["virtualizedSelect"].includes(Z.fieldType)){const J=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][J["value-key"]?J["value-key"]:"value"]=="string"&&X!==null&&(X=X.toString())}return(X==="true"||X==="false")&&(X=f(X)),X},S=Z=>a({url:w.data.dataItem.requestUrl,method:"post",data:Z});l.watch(()=>w.visible,async(Z,K)=>{var X,J;if(Z)try{g.value=!0;const fe=await m(w.data.formList,w.data.rowData,!1,!0);console.log("formList",(X=w.data)==null?void 0:X.formList),C.value=await Promise.all((((J=w.data)==null?void 0:J.formList)??[]).sort((he,ye)=>he.sort-ye.sort).map(async he=>{const ye=fe.find(q=>he.fieldName==q.fieldName&&he.fieldKey==q.fieldKey);ye&&(he.dataList=(ye==null?void 0:ye.dataList)??[]),["select","multipleSelect"].includes(he.fieldType)&&(y.value[`${he.fieldKey}ActImplicit`]=Object.keys(w.data.rowData).length&&he.isFormSetValue?A(he,!0):N(he.fieldType)),y.value[he.fieldKey]=Object.keys(w.data.rowData).length&&he.isFormSetValue?A(he):N(he.fieldType);const{isFieldCustom:z,customComponentName:D,customComponentUrl:V}=he.customFiledsComponentes;if(z&&!he.customFiledsComponentes[D]){const q=await c(V,D);he.customFiledsComponentes[D]=q}return he})),g.value=!1}catch(fe){console.error(fe),g.value=!1}});const M=Z=>{T(),Z()},T=()=>{C.value=[],O.value.resetFields(),b("update:visible",!1)},I=(Z,K)=>{const X=d(K),{fieldKey:J,fieldType:fe}=K;if(fe==="multipleSelect"){const he=Z.filter(z=>typeof z=="string"),ye=Z.filter(z=>typeof z!="string").map(z=>z.value);y.value[X.createFieldKey]=he.length?_(he,"string"):void 0,y.value[J]=ye.length?_(ye,"string"):void 0}else typeof Z=="string"?(y.value[X.createFieldKey]=Z,y.value[J]=void 0):(y.value[J]=Z.value,delete y.value[X.createFieldKey])},B=Z=>{Z&&Z.validate(K=>{if(K){const{dataItem:X,rowData:J}=w.data;let fe={...l.toRaw(y.value)};Object.keys(fe).forEach(z=>{if(z.includes("ActImplicit")){delete fe[z];return}const D=C.value.find(V=>V.fieldKey===z);z.includes("&")?z.split("&").forEach((q,H)=>{fe[q]=fe[z]?_(fe[z][H],D.fieldSubmitType):fe[z]}):Array.isArray(fe[z])&&D.fieldSubmitType=="string"&&(fe[z]=_(fe[z],"string"))});const he=X.submitFields.filter(z=>z.matchType=="default").reduce((z,D)=>(D.submitFieldType==="string"&&(z[D.submitFieldName]=D.matchFieldName.toString()),z),{}),ye=X.submitFields.filter(z=>z.matchType=="match").reduce((z,D)=>(Reflect.has(D,"submitFieldMatchOrigin")&&D.submitFieldMatchOrigin==="selections"?z[D.submitFieldName]=w.data.selections.map(V=>h(D.submitFieldType,V[D.matchFieldName])):Reflect.has(D,"submitFieldMatchOrigin")&&D.submitFieldMatchOrigin!="rowData"?Reflect.has(u.matchData,D.submitFieldMatchOrigin)&&(z[D.submitFieldName]=h(D.submitFieldType,u.matchData[D.submitFieldMatchOrigin][D.matchFieldName])):z[D.submitFieldName]=h(D.submitFieldType,J[D.matchFieldName]),z),{});S({...fe,...he,...ye}).then(z=>{try{Ne.ElNotification({title:o("act.tip"),message:o("act.saveSuccessfully"),type:"success",duration:2500}),T(),b("refresh",X)}catch(D){console.error(D)}p.value=!1}).catch(z=>{console.error(z),p.value=!1})}})},U=Z=>{const K=Object.keys(E.value).map(X=>{var J;return(J=E.value[X])==null?void 0:J.updateFormData(y.value)}).filter(X=>X);Promise.all([Z.validate(),...K]).then(X=>{X.every(J=>J)&&B(Z)}).catch(X=>(console.error(X),X))};return(Z,K)=>{var ki;const X=l.resolveComponent("el-input"),J=l.resolveComponent("el-option"),fe=l.resolveComponent("el-select"),he=l.resolveComponent("el-select-v2"),ye=l.resolveComponent("el-tree-select"),z=l.resolveComponent("el-date-picker"),D=l.resolveComponent("el-cascader"),V=l.resolveComponent("el-switch"),q=l.resolveComponent("el-form-item"),H=l.resolveComponent("el-col"),Ue=l.resolveComponent("el-row"),Ri=l.resolveComponent("el-form"),Re=l.resolveComponent("el-button"),qe=l.resolveComponent("el-dialog"),Wt=l.resolveDirective("loading"),Dt=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(qe,{"model-value":w.visible,title:w.title,top:"5vh",width:(ki=i.data.formConfig)==null?void 0:ki.dialogWidth,draggable:"",overflow:"","append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,"before-close":M},{footer:l.withCtx(()=>[l.createElementVNode("span",Hy,[l.createVNode(Re,{loading:p.value,onClick:T},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.cancel")),1)]),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(Re,{type:"primary",loading:p.value,onClick:K[1]||(K[1]=Vi=>U(O.value))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.save")),1)]),_:1},8,["loading"])),[[Dt]])])]),default:l.withCtx(()=>{var Vi,R;return[l.withDirectives((l.openBlock(),l.createBlock(Ri,{class:"a-form",ref_key:"formRef",ref:O,model:y.value,"label-suffix":":","label-width":(Vi=i.data.formConfig)==null?void 0:Vi.formLabelWidth,"label-position":(R=i.data.formConfig)==null?void 0:R.formLabelPosition},{default:l.withCtx(()=>[l.createVNode(Ue,{gutter:40},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,(Q,W)=>(l.openBlock(),l.createBlock(H,{span:x(Q),key:W},{default:l.withCtx(()=>[Q.customFiledsComponentes.isFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[Q.customFiledsComponentes[Q.customFiledsComponentes.customComponentName]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(Q.customFiledsComponentes[Q.customFiledsComponentes.customComponentName]),{key:0,ref_for:!0,ref:Y=>E.value[Q.customFiledsComponentes.customComponentName]=Y,formConfig:i.data.formConfig,item:Q,rowData:w.data.rowData,visible:w.visible,form:y.value,"onUpdate:form":K[0]||(K[0]=Y=>y.value=Y)},null,40,["formConfig","item","rowData","visible","form"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:W},[l.createElementVNode("span",Gy,"【"+l.toDisplayString(Q.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(o)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(q,{key:0,label:Q.fieldName,prop:["select","multipleSelect"].includes(Q.fieldType)?`${Q.fieldKey}ActImplicit`:Q.fieldKey,rules:[{required:Q.isFormFieldRequired,message:l.unref(o)("act.requiredMessage"),trigger:k(Q)}]},{default:l.withCtx(()=>[Q.fieldType==="input"?(l.openBlock(),l.createBlock(X,l.mergeProps({key:0,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,clearable:"",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):l.createCommentVNode("",!0),Q.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,clearable:"",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):Q.fieldType==="textarea"?(l.openBlock(),l.createBlock(X,l.mergeProps({key:2,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,rows:4,ref_for:!0},l.unref(d)(Q),{type:"textarea",disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):Q.fieldType==="selectIcon"?(l.openBlock(),l.createBlock(l.unref(n),l.mergeProps({key:3,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,icons:Q.dataList,placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Q.dataList,(Y,$e)=>(l.openBlock(),l.createBlock(J,{key:$e,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","icons","placeholder","disabled"])):["select","multipleSelect"].includes(Q.fieldType)?(l.openBlock(),l.createBlock(fe,l.mergeProps({key:4,modelValue:y.value[`${Q.fieldKey}ActImplicit`],"onUpdate:modelValue":Y=>y.value[`${Q.fieldKey}ActImplicit`]=Y,placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,clearable:"",filterable:"","value-key":"value",ref_for:!0},l.unref(d)(Q),{multiple:Q.fieldType==="multipleSelect",disabled:Q.isFormDisabled,onChange:Y=>I(Y,Q)}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Q.dataList,(Y,$e)=>(l.openBlock(),l.createBlock(J,{key:$e,label:Y.key,value:Y},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","disabled","onChange"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(Q.fieldType)?(l.openBlock(),l.createBlock(he,l.mergeProps({key:5,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,options:Q.dataList,props:{...l.unref(Fu)},placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled,multiple:Q.fieldType==="virtualizedMultipleSelect"}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled","multiple"])):Q.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(ye,l.mergeProps({key:6,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,data:Q.dataList,"default-expanded-keys":[y.value[Q.fieldKey]||null],placeholder:`请选择${Q.fieldName}`,props:{...l.unref(xr),...l.unref(d)(Q).treeProps||{}},"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","data","default-expanded-keys","placeholder","props"])):Q.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(ye,l.mergeProps({key:7,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`请选择${Q.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(Y,$e)=>P({node:Y,resolve:$e},Q),ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):Q.fieldType==="date"?(l.openBlock(),l.createBlock(z,l.mergeProps({key:8,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,type:"date",placeholder:`${l.unref(o)("act.selectPlaceholder")}${l.unref(o)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):Q.fieldType==="dateRange"?(l.openBlock(),l.createBlock(z,l.mergeProps({key:9,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,type:"daterange","start-placeholder":l.unref(o)("act.startTime"),"end-placeholder":l.unref(o)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","disabled"])):Q.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(D,l.mergeProps({key:10,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,options:Q.dataList,props:l.unref(Uu),clearable:"",filterable:"",placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled"])):Q.fieldType==="switch"?(l.openBlock(),l.createBlock(V,l.mergeProps({key:11,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,"active-value":!0,"inactive-value":!1,ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue"])):Q.fieldType==="upload"?(l.openBlock(),l.createBlock(l.unref(s),l.mergeProps({key:12,class:"form-upload",modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,request:l.unref(a),ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","request"])):Q.fieldType==="editor"?(l.openBlock(),l.createBlock(l.unref(r),l.mergeProps({key:13,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,disabled:Q.isFormDisabled,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","disabled","placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label","prop","rules"]))]),_:2},1032,["span"]))),128))]),_:1})]),_:1},8,["model","label-width","label-position"])),[[Wt,g.value]])]}),_:1},8,["model-value","title","width"])}}},[["__scopeId","data-v-4ca7d743"]])},Symbol.toStringTag,{value:"Module"})),WT="",Jy=["innerHTML"],e1={class:"dialog-footer"},t1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const{t}=Gt(),n=e,s=i,r=()=>({loading:!1});let o=l.reactive(r());l.watch(()=>s.visible,async(h,u)=>{h&&(o.loading=!0,o.loading=!1)});const a=h=>{c(),h()},c=()=>{n("update:visible",!1)};return(h,u)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:800,"append-to-body":"","destroy-on-close":"",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":a},{footer:l.withCtx(()=>[l.createElementVNode("span",e1,[l.createVNode(f,{onClick:c},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.cancel")),1)]),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("div",{innerHTML:i.data.editorContent},null,8,Jy)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-be1c5be6"]])},Symbol.toStringTag,{value:"Module"})),GT="",i1={class:"dialog-footer"},n1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"dialogConfigBtn",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Hu)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>WO)),s=rn.useRoute(),r=l.inject("apiPrefix"),o=l.inject("request"),a=e,c=i,h=l.computed(()=>s.params.key),u=()=>({btnLoading:!1});let f=l.reactive(u());const d=l.inject("createDefaultButtonItem"),m=l.inject("associationMenuList"),b=l.inject("conditionList")();let w=l.ref([]),g=l.ref(null),p=l.ref(d());const O=M=>o({url:`${r}/icons/getAllList`,method:"post",data:M}),C=async()=>{try{const{data:M}=await O({dynamicFilters:[{field:"type",operate:"Equal",value:"2"}]});w.value=M||[]}catch(M){console.error(M)}};l.watch(()=>c.visible,async(M,T)=>{if(M){await C();const I={...c.data};Object.keys(p.value).forEach(B=>{B=="submitFields"||B=="matchFields"?p.value[B]=[...I[B]||[]]:B=="isPromptVerificationSelectTable"?p.value[B]=I[B]??"1":p.value[B]=I[B]})}});const y=()=>{p.value.submitWay=void 0,p.value.customType=void 0,p.value.codeStr=void 0,p.value.customComponentName=void 0,p.value.customComponentUrl=void 0},E=()=>{p.value.submitFields.push({matchType:"match",submitFieldMatchOrigin:"rowData",submitFieldName:"",matchFieldName:"",submitFieldType:""})},x=M=>{p.value.submitFields.splice(M,1)},k=()=>{p.value.matchFields.push({matchType:"default",matchFieldName:"",matchCondition:"",fieldValue:"",spliceCondition:""})},P=M=>{p.value.matchFields.splice(M,1),p.value.matchFields.length===1&&(p.value.matchFields[0].spliceCondition="")},N=(M,T)=>{M.submitFieldMatchOrigin=T==="match"?"rowData":""},_=M=>{A(),M()},A=()=>{p.value=Object.assign(p.value,d()),g.value.resetFields(),a("update:visible",!1)},S=M=>{M&&M.validate(T=>{if(T)try{f.btnLoading=!0,a("refresh",{...p.value,submitFields:[...p.value.submitFields],matchFields:[...p.value.matchFields]},()=>{A()}),f.btnLoading=!1}catch(I){console.error(I),f.btnLoading=!1}})};return(M,T)=>{const I=l.resolveComponent("el-input"),B=l.resolveComponent("el-form-item"),U=l.resolveComponent("el-col"),Z=l.resolveComponent("el-option"),K=l.resolveComponent("el-select"),X=l.resolveComponent("el-row"),J=l.resolveComponent("el-button"),fe=l.resolveComponent("el-divider"),he=l.resolveComponent("el-switch"),ye=l.resolveComponent("el-form"),z=l.resolveComponent("el-dialog"),D=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(z,{"model-value":c.visible,title:c.title,top:"5vh",width:"1200",draggable:"",overflow:"","append-to-body":"","append-to":"body","close-on-click-modal":!1,"before-close":_},{footer:l.withCtx(()=>[l.createElementVNode("span",i1,[l.createVNode(J,{loading:l.unref(f).btnLoading,onClick:A},{default:l.withCtx(()=>T[19]||(T[19]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(J,{type:"primary",loading:l.unref(f).btnLoading,onClick:T[16]||(T[16]=V=>S(l.unref(g)))},{default:l.withCtx(()=>T[20]||(T[20]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[D]])])]),default:l.withCtx(()=>[l.createVNode(ye,{ref_key:"formRef",ref:g,model:l.unref(p),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(X,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮",prop:"btnName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).btnName,"onUpdate:modelValue":T[0]||(T[0]=V=>l.unref(p).btnName=V),disabled:"",placeholder:"请输入按钮名称"},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(p).permissionCode),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮图标",prop:"btnIcon"},{default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(p).btnIcon,"onUpdate:modelValue":T[1]||(T[1]=V=>l.unref(p).btnIcon=V),icons:l.unref(w),props:{value:"name",type:"btn"}},null,8,["modelValue","icons"])]),_:1})]),_:1}),l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"接口地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"requestUrl"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).requestUrl,"onUpdate:modelValue":T[2]||(T[2]=V=>l.unref(p).requestUrl=V),placeholder:"请输入接口地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮位置",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnPostion"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnPostion,"onUpdate:modelValue":T[3]||(T[3]=V=>l.unref(p).btnPostion=V),placeholder:"请选择按钮位置",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(dy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnType,"onUpdate:modelValue":T[4]||(T[4]=V=>l.unref(p).btnType=V),placeholder:"请选择按钮类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(fy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮别名",prop:"btnAlias"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).btnAlias,"onUpdate:modelValue":T[5]||(T[5]=V=>l.unref(p).btnAlias=V),placeholder:"请输入按钮别名",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮颜色",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnColor"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnColor,"onUpdate:modelValue":T[6]||(T[6]=V=>l.unref(p).btnColor=V),placeholder:"请选择按钮颜色",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(py),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(U,{key:0,span:12},{default:l.withCtx(()=>[!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(B,{key:0,label:"提交方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitWay"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).submitWay,"onUpdate:modelValue":T[7]||(T[7]=V=>l.unref(p).submitWay=V),placeholder:"请选择提交方式",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(my),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):l.createCommentVNode("",!0)]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["import","batchImport"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:1,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"导入提交文件字段",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"importFileName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).importFileName,"onUpdate:modelValue":T[8]||(T[8]=V=>l.unref(p).importFileName=V),placeholder:"请输入导入提交文件字段",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["messageBox","executeApi"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:2,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"是否提示校验选择表格",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"isPromptVerificationSelectTable"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).isPromptVerificationSelectTable,"onUpdate:modelValue":T[9]||(T[9]=V=>l.unref(p).isPromptVerificationSelectTable=V),placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Py),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1}),l.createVNode(fe,{"content-position":"left"},{default:l.withCtx(()=>[T[17]||(T[17]=l.createTextVNode(" 提交字段配置 ")),l.createVNode(J,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:E})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).submitFields,(V,q)=>(l.openBlock(),l.createBlock(X,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.submitFieldName,"onUpdate:modelValue":H=>V.submitFieldName=H,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:8},{default:l.withCtx(()=>[l.createVNode(B,{label:"方式","label-width":"80px",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{placeholder:"请输入",modelValue:V.matchFieldName,"onUpdate:modelValue":H=>V.matchFieldName=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchType,"onUpdate:modelValue":H=>V.matchType=H,placeholder:"请选择",style:{width:"120px"},onChange:H=>N(V,H)},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(_y),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),V.matchType==="match"?(l.openBlock(),l.createBlock(U,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配源",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldMatchOrigin"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.submitFieldMatchOrigin,"onUpdate:modelValue":H=>V.submitFieldMatchOrigin=H,placeholder:"请输入匹配源",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitFields."+q+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.submitFieldType,"onUpdate:modelValue":H=>V.submitFieldType=H,placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(gy),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(J,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>x(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(fe,{"content-position":"left"},{default:l.withCtx(()=>[T[18]||(T[18]=l.createTextVNode(" 匹配字段配置(表格操作列按钮显示/隐藏) ")),l.createVNode(J,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:k})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).matchFields,(V,q)=>(l.openBlock(),l.createBlock(X,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"matchFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{placeholder:"请输入",modelValue:V.matchFieldName,"onUpdate:modelValue":H=>V.matchFieldName=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchType,"onUpdate:modelValue":H=>V.matchType=H,placeholder:"请选择",style:{width:"180px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(by),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"matchFields."+q+".matchCondition"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchCondition,"onUpdate:modelValue":H=>V.matchCondition=H,placeholder:"请选择匹配条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"字段值",prop:"matchFields."+q+".fieldValue"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.fieldValue,"onUpdate:modelValue":H=>V.fieldValue=H,placeholder:"请输入字段值",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(J,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>P(q)},null,8,["onClick"])]),_:2},1024),q+1!==l.unref(p).matchFields.length?(l.openBlock(),l.createBlock(U,{key:0,span:24},{default:l.withCtx(()=>[l.createVNode(B,{class:"condition-box",label:"","label-width":"0",prop:"matchFields."+q+".spliceCondition"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.spliceCondition,"onUpdate:modelValue":H=>V.spliceCondition=H,placeholder:"请选择拼接条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Oy),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128)),l.createVNode(X,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义按钮",prop:"isCustomBtn"},{default:l.withCtx(()=>[l.createVNode(he,{modelValue:l.unref(p).isCustomBtn,"onUpdate:modelValue":T[10]||(T[10]=V=>l.unref(p).isCustomBtn=V),onChange:y},null,8,["modelValue"])]),_:1})]),_:1}),l.unref(p).isCustomBtn?(l.openBlock(),l.createBlock(U,{key:0,span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"customType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).customType,"onUpdate:modelValue":T[11]||(T[11]=V=>l.unref(p).customType=V),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(yy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"关联菜单"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).associationMenuId,"onUpdate:modelValue":T[12]||(T[12]=V=>l.unref(p).associationMenuId=V),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(m),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.name,value:V.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.unref(p).customType==="code"?(l.openBlock(),l.createBlock(X,{key:0,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"代码片段",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"codeStr"},{default:l.withCtx(()=>[l.createVNode(l.unref(n),{modelValue:l.unref(p).codeStr,"onUpdate:modelValue":T[13]||(T[13]=V=>l.unref(p).codeStr=V)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(p).customType==="component"?(l.openBlock(),l.createBlock(X,{key:1,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).customComponentName,"onUpdate:modelValue":T[14]||(T[14]=V=>l.unref(p).customComponentName=V),placeholder:"请输入组件名称",clearable:""},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(h.value),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:14},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentUrl"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).customComponentUrl,"onUpdate:modelValue":T[15]||(T[15]=V=>l.unref(p).customComponentUrl=V),placeholder:"请输入组件地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-325d2233"]])},Symbol.toStringTag,{value:"Module"})),JT="",s1={slot:"prepend"},r1={class:"dialog-footer"},o1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"dialogAddField",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>hT)),n=e,s=i,r=l.inject("pageKey")(),o=l.inject("conditionList")(),a=l.inject("configData")(),c=()=>({btnLoading:!1,showSiteComponentsParamsDialog:!1});let h=l.reactive(c());const u=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableQueryDefaultValue:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),f=Wu,d=l.ref(null),m=l.ref(u()),b=()=>["select","selectIcon","multipleSelect","treeSelect","provinceCascade","switch","virtualizedSelect","virtualizedMultipleSelect"].includes(m.value.fieldType),w=()=>m.value.useScenes.includes("tableSearch")&&m.value.fieldType!=="time",g=()=>m.value.useScenes.includes("tableShow"),p=()=>m.value.fieldType&&m.value.fieldType!=="implicit"&&m.value.useScenes.some(_=>!["tableSearch","tableShow"].some(A=>A==_));l.watch(()=>s.visible,async(_,A)=>{if(_){const S=(a.value.buttons||[]).filter(T=>T.permissionCode!=1001).map(T=>({key:T.btnName,value:T.permissionCode}));f.some(T=>{if(T.label==="表单配置")return T.options=S,!0});const{data:M}=s;if(!M.fieldName)return;Object.keys(m.value).forEach(T=>{if(T=="permissionCode")m.value[T]=M.unique;else if(T=="formCustomComponentes"){const I=M.useScenes.map(B=>M[T].find(Z=>Z.permissionCode==B)||{});m.value[T]=[...I]}else["postRequestParams","useScenes"].includes(T)?m.value[T]=[...M[T]||[]]:m.value[T]=M[T]})}});const O=()=>{m.value.postRequestParams.push({submitName:"",submitValue:"",submitType:"default",submitMatchType:"",paramsType:""})},C=_=>{m.value.postRequestParams.splice(_,1)},y=_=>{m.value.postRequestParams=[]},E=_=>{const A=f.find(M=>M.label==="表格配置").options,S=f.find(M=>M.label==="表单配置").options;m.value.formCustomComponentes=[...A,...S].filter(M=>_.includes(M.value)).map(M=>{const T=m.value.formCustomComponentes.find(I=>I.permissionCode==M.value);return{btnName:M.key,permissionCode:M.value,pageKey:r,customComponentName:(T==null?void 0:T.customComponentName)||void 0,customComponentUrl:(T==null?void 0:T.customComponentUrl)||void 0,isFieldCustom:(T==null?void 0:T.isFieldCustom)||!1}})},x=(_,A)=>{A.customComponentName=void 0,A.customComponentUrl=void 0},k=_=>{P(),_()},P=()=>{m.value=u(),d.value.resetFields(),n("update:visible",!1)},N=_=>{_&&_.validate(A=>{A&&(h.btnLoading=!0,m.value.formCustomComponentes.forEach(S=>{delete S.isFiledCustom}),n("refresh",JSON.parse(JSON.stringify(m.value)),()=>{P()}),h.btnLoading=!1)})};return(_,A)=>{const S=l.resolveComponent("el-input"),M=l.resolveComponent("el-form-item"),T=l.resolveComponent("el-col"),I=l.resolveComponent("el-option"),B=l.resolveComponent("el-select"),U=l.resolveComponent("el-button"),Z=l.resolveComponent("el-row"),K=l.resolveComponent("el-divider"),X=l.resolveComponent("el-option-group"),J=l.resolveComponent("el-switch"),fe=l.resolveComponent("el-input-number"),he=l.resolveComponent("el-form"),ye=l.resolveComponent("el-scrollbar"),z=l.resolveComponent("el-dialog"),D=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(z,{"model-value":s.visible,title:s.title,top:"5vh",width:"1400",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":k},{footer:l.withCtx(()=>[l.createElementVNode("span",r1,[l.createVNode(U,{onClick:P,loading:l.unref(h).btnLoading},{default:l.withCtx(()=>A[29]||(A[29]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(U,{type:"primary",loading:l.unref(h).btnLoading,onClick:A[22]||(A[22]=V=>N(d.value))},{default:l.withCtx(()=>A[30]||(A[30]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[D]])])]),default:l.withCtx(()=>[l.createVNode(ye,{ref:"configFieldsScroll","max-height":"800px"},{default:l.withCtx(()=>[l.createVNode(he,{ref_key:"formRef",ref:d,model:m.value,"label-suffix":":","label-width":"120px"},{default:l.withCtx(()=>[l.createVNode(Z,null,{default:l.withCtx(()=>[l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldName"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:m.value.fieldName,"onUpdate:modelValue":A[0]||(A[0]=V=>m.value.fieldName=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段key",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldKey"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:m.value.fieldKey,"onUpdate:modelValue":A[1]||(A[1]=V=>m.value.fieldKey=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段类型",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldType,"onUpdate:modelValue":A[2]||(A[2]=V=>m.value.fieldType=V),placeholder:"请选择",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(qu),V=>(l.openBlock(),l.createBlock(I,{key:V.value,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:4},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件参数",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(U,{type:"primary",onClick:A[3]||(A[3]=V=>l.unref(h).showSiteComponentsParamsDialog=!0)},{default:l.withCtx(()=>A[23]||(A[23]=[l.createTextVNode("设置props")])),_:1}),l.createVNode(l.unref(t),{modelValue:m.value.fieldUiProps,"onUpdate:modelValue":A[4]||(A[4]=V=>m.value.fieldUiProps=V),visible:l.unref(h).showSiteComponentsParamsDialog,"onUpdate:visible":A[5]||(A[5]=V=>l.unref(h).showSiteComponentsParamsDialog=V),title:"设置组件参数"},null,8,["modelValue","visible"])]),_:1})]),_:1})]),_:1}),b()?(l.openBlock(),l.createBlock(Z,{key:0},{default:l.withCtx(()=>[l.createVNode(T,{span:24},{default:l.withCtx(()=>[l.createVNode(M,{label:"数据源",prop:"fieldRequestUrl"},{default:l.withCtx(()=>[l.createVNode(S,{placeholder:"请输入",modelValue:m.value.fieldRequestUrl,"onUpdate:modelValue":A[7]||(A[7]=V=>m.value.fieldRequestUrl=V),clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldRequestType,"onUpdate:modelValue":A[6]||(A[6]=V=>m.value.fieldRequestType=V),placeholder:"请选择",style:{width:"150px"},onChange:y},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(wy),V=>(l.openBlock(),l.createBlock(I,{key:V.value,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),m.value.fieldRequestType=="POST"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>[A[24]||(A[24]=l.createTextVNode(" POST参数配置 ")),l.createVNode(U,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:O})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.postRequestParams,(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q},{default:l.withCtx(()=>[l.createVNode(T,{span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitName"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:V.submitName,"onUpdate:modelValue":H=>V.submitName=H,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(T,{span:8},{default:l.withCtx(()=>[l.createVNode(M,{label:"方式",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitValue"},{default:l.withCtx(()=>[l.createVNode(S,{placeholder:"请输入值",modelValue:V.submitValue,"onUpdate:modelValue":H=>V.submitValue=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:V.submitType,"onUpdate:modelValue":H=>V.submitType=H,placeholder:"请选择方式",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(ky),(H,Ue)=>(l.openBlock(),l.createBlock(I,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),V.submitType==="dynamic"?(l.openBlock(),l.createBlock(T,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitMatchType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:V.submitMatchType,"onUpdate:modelValue":H=>V.submitMatchType=H,placeholder:"请选择方式",clearable:"",filterable:"",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(H,Ue)=>(l.openBlock(),l.createBlock(I,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(T,{span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"postRequestParams."+q+".paramsType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:V.paramsType,"onUpdate:modelValue":H=>V.paramsType=H,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Xu),(H,Ue)=>(l.openBlock(),l.createBlock(I,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(T,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(U,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>C(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))],64)):l.createCommentVNode("",!0),l.createVNode(Z,null,{default:l.withCtx(()=>[l.createVNode(T,{span:24},{default:l.withCtx(()=>[l.createVNode(M,{label:"使用场景",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"useScenes"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.useScenes,"onUpdate:modelValue":A[8]||(A[8]=V=>m.value.useScenes=V),placeholder:"请选择",multiple:"",clearable:"",filterable:"",onChange:E},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f),V=>(l.openBlock(),l.createBlock(X,{key:V.label,label:V.label},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(V.options,q=>(l.openBlock(),l.createBlock(I,{key:q.key,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),w()?(l.openBlock(),l.createBlock(Z,{key:2},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[25]||(A[25]=[l.createTextVNode("查询模块")])),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"查询条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableQueryCondition"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableQueryCondition,"onUpdate:modelValue":A[9]||(A[9]=V=>m.value.tableQueryCondition=V),placeholder:"请选择查询条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"默认值",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"tableQueryDefaultValue"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:m.value.tableQueryDefaultValue,"onUpdate:modelValue":A[10]||(A[10]=V=>m.value.tableQueryDefaultValue=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),g()?(l.openBlock(),l.createBlock(Z,{key:3},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[26]||(A[26]=[l.createTextVNode("表格模块")])),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"列宽",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"tableCellWidth"},{default:l.withCtx(()=>[l.createVNode(S,{placeholder:"请输入",modelValue:m.value.tableCellWidth,"onUpdate:modelValue":A[12]||(A[12]=V=>m.value.tableCellWidth=V)},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellWidthType,"onUpdate:modelValue":A[11]||(A[11]=V=>m.value.tableCellWidthType=V),placeholder:"请选择",style:{width:"100px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ay),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"对齐方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellAlignType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellAlignType,"onUpdate:modelValue":A[13]||(A[13]=V=>m.value.tableCellAlignType=V),placeholder:"请选择对齐方式",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Sy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"内容类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellContentType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellContentType,"onUpdate:modelValue":A[14]||(A[14]=V=>m.value.tableCellContentType=V),placeholder:"请选择内容类型",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:"溢出隐藏",prop:"isTableCellOverflowTooltip"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isTableCellOverflowTooltip,"onUpdate:modelValue":A[15]||(A[15]=V=>m.value.isTableCellOverflowTooltip=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:"排序",prop:"isTableCellSort"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isTableCellSort,"onUpdate:modelValue":A[16]||(A[16]=V=>m.value.isTableCellSort=V)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),p()?(l.openBlock(),l.createBlock(Z,{key:4},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[27]||(A[27]=[l.createTextVNode("表单模块")])),_:1}),l.createVNode(T,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否必填",prop:"isFormFieldRequired"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormFieldRequired,"onUpdate:modelValue":A[17]||(A[17]=V=>m.value.isFormFieldRequired=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否回显",prop:"isFormSetValue"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormSetValue,"onUpdate:modelValue":A[18]||(A[18]=V=>m.value.isFormSetValue=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否禁用",prop:"isFormDisabled"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormDisabled,"onUpdate:modelValue":A[19]||(A[19]=V=>m.value.isFormDisabled=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"fieldSubmitType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldSubmitType,"onUpdate:modelValue":A[20]||(A[20]=V=>m.value.fieldSubmitType=V),placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(xy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"栅格数",prop:"formColumnCol"},{default:l.withCtx(()=>[l.createVNode(fe,{modelValue:m.value.formColumnCol,"onUpdate:modelValue":A[21]||(A[21]=V=>m.value.formColumnCol=V),max:24},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[28]||(A[28]=[l.createTextVNode("不同场景自定义字段组件")])),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.formCustomComponentes,(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q},{default:l.withCtx(()=>[l.createVNode(T,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:`${V.btnName}`,prop:`formCustomComponentes.${q}.isFieldCustom`},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:V.isFieldCustom,"onUpdate:modelValue":H=>V.isFieldCustom=H,onChange:H=>x(H,V)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["label","prop"])]),_:2},1024),V.isFieldCustom?(l.openBlock(),l.createBlock(T,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件名称","label-width":"220",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentName`},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:V.customComponentName,"onUpdate:modelValue":H=>V.customComponentName=H,placeholder:"请输入",clearable:""},{default:l.withCtx(()=>[l.createElementVNode("template",s1,[l.createTextVNode(l.toDisplayString(l.unref(r)),1)])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),V.isFieldCustom?(l.openBlock(),l.createBlock(T,{key:1,span:14},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentUrl`},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:V.customComponentUrl,"onUpdate:modelValue":H=>V.customComponentUrl=H,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["model"])]),_:1},512)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-6b2ebaa8"]])},Symbol.toStringTag,{value:"Module"})),Gu=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i,s=l.computed({get(){return n.modelValue},set(a){t("update:modelValue",a)}}),r=a=>{let c=a.charAt(0);return a=a.replace(/[^\d.]/g,""),a=a.replace(/^\./g,""),a=a.replace(/\.{2,}/g,"."),a=a.replace(".","$#$").replace(/\./g,"").replace("$#$","."),c=="-"&&(a="-"+a),a},o=a=>{s.value=r(a)};return(a,c)=>{const h=l.resolveComponent("el-input");return l.openBlock(),l.createBlock(h,l.mergeProps({modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),modelModifiers:{number:!0},placeholder:"Please input"},a.$attrs,{onInput:o}),null,16,["modelValue"])}}}},Symbol.toStringTag,{value:"Module"})),nE="",sE="",l1={class:"select-icon-container"},a1={class:"icon-list"},c1=["onClick"],h1={class:"icon-value",slot:"reference"},Hu=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{modelValue:{type:String,default:""},icons:{type:Array,default:()=>[]},props:{type:Object,default:()=>({value:"value",type:"btn"})}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i;let s=l.ref(!1),r=l.ref(-1),o=l.ref([]);const a=()=>r.value==-1?"":o.value[r.value];l.watch(()=>n.icons,(h,u)=>{h&&(o.value=(n.icons||[]).map(f=>{const{props:d}=n;return Reflect.has(f,d.value)?`${d.type}-${f[d.value]}`:`${d.type}-${f}`}))},{deep:!0,immediate:!0}),l.watch(()=>n.modelValue,(h,u)=>{if(!h){r.value=-1,t("update:modelValue","");return}const f=o.value.findIndex(d=>d===h);r.value=f},{deep:!0,immediate:!0});const c=(h,u)=>{r.value=u,t("update:modelValue",a()),s.value=!1};return(h,u)=>{const f=l.resolveComponent("a-svg-icon"),d=l.resolveComponent("el-button"),m=l.resolveComponent("el-popover");return l.openBlock(),l.createElementBlock("div",l1,[l.createVNode(m,{"popper-class":"select-icon-popover",placement:"bottom-start",visible:l.unref(s),"onUpdate:visible":u[0]||(u[0]=b=>l.isRef(s)?s.value=b:s=b),width:400,trigger:"click"},{reference:l.withCtx(()=>[l.createElementVNode("div",h1,[l.unref(r)>=0?(l.openBlock(),l.createBlock(f,{key:0,name:n.modelValue,width:"24",height:"24",color:"#000"},null,8,["name"])):l.createCommentVNode("",!0),l.createVNode(d,{class:"icon-btn",type:"primary"},{default:l.withCtx(()=>u[1]||(u[1]=[l.createTextVNode("选择图标")])),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("ul",a1,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(b,w)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["icon-item",{"icon-item-checked":l.unref(r)==w}]),key:w,onClick:g=>c(b,w)},[l.createVNode(f,{class:"icon-svg",name:b,width:"24",height:"24",color:"#999"},null,8,["name"])],10,c1))),128))])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-308d02d4"]])},Symbol.toStringTag,{value:"Module"}));let Ar;const u1=new Uint8Array(16);function f1(){if(!Ar&&(Ar=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ar))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ar(u1)}const ht=[];for(let i=0;i<256;++i)ht.push((i+256).toString(16).slice(1));function d1(i,e=0){return ht[i[e+0]]+ht[i[e+1]]+ht[i[e+2]]+ht[i[e+3]]+"-"+ht[i[e+4]]+ht[i[e+5]]+"-"+ht[i[e+6]]+ht[i[e+7]]+"-"+ht[i[e+8]]+ht[i[e+9]]+"-"+ht[i[e+10]]+ht[i[e+11]]+ht[i[e+12]]+ht[i[e+13]]+ht[i[e+14]]+ht[i[e+15]]}const Ku={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function p1(i,e,t){if(Ku.randomUUID&&!e&&!i)return Ku.randomUUID();i=i||{};const n=i.random||(i.rng||f1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=n[s];return e}return d1(n)}const aE="",m1={class:"upload-container"},g1={class:"el-upload__text"},O1={class:"tip-text"},_1={class:"file-list-l"},b1=["onMouseenter","onMouseleave"],y1={class:"el-file-operate"},w1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{request:{type:Function,required:!0,default:null},modelValue:{type:[Array,String],default:[]},action:{type:String,default:"/api/v1/utils/uploadFiles"},data:{type:Object,default:()=>({uploadFileType:1})},name:{type:String,default:"files"},multiple:{type:Boolean,default:!0},limit:{type:Number,default:9},accept:{type:String,default:"*"},tipText:{type:String,default:""},fileMaxSize:{type:Number,default:100},autoUpload:{type:Boolean,default:!0}},emits:["update:modelValue","delete"],setup(i,{expose:e,emit:t}){const{getAssetsFileName:n,getAssetsFilePath:s,downloadFile:r}=Iu(),{t:o}=Gt(),a=t,c=i,h={image:/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/,word:/(doc|docx)$/,pdf:/(pdf)$/,excel:/(xls|xlsx)$/};let u=l.ref(!1),f=l.ref({}),d=l.ref(!1),m=l.ref(null),b=null,w=l.computed({get(){return C(c.modelValue)},set(T){a("update:modelValue",T)}});const g=T=>{const I=(w.value||[]).map(Z=>Z.filePath);if(T==0)return I;let B=I.splice(T),U=I.splice(0,T);return B.concat(U)},p=T=>{const I=T.substring(T.lastIndexOf(".")+1);let B=null;return Object.keys(h).some(U=>{if(h[U].test(I))return B=U,!0}),B===null&&(B="file"),B},O=T=>T.map(I=>({uid:I.uid??p1(),name:n(I),filePath:I,fileType:p(I),status:"success"})),C=T=>{const I=Array.isArray(T)?T.map(B=>B.filePath):T?T.split(";"):[];return O(I||[])},y=({name:T})=>{const I=T.lastIndexOf("."),B=T.slice(I),U=c.accept.trim().split(",");let Z=!1;return U.includes(B)&&(Z=!0),Z=U.some(K=>K=="image/*"?h.image.test(B):K.startsWith(".")?T.endsWith(K):K===B),Z||Ne.ElNotification({title:`${o("act.tip")}`,message:`【${T}】${o("act.uploadErrorTip")}`,type:"warning",duration:2500}),Z},E=(T,I,B)=>{b&&(clearTimeout(b),b=null),b=setTimeout(()=>{T.call(this,I)},B)},x=T=>c.request({url:c.action,method:"POST",data:T,headers:{"Content-Type":"application/x-www-form-urlencoded"}}),k=async T=>{try{const I=T.filter(X=>X.status=="ready"&&y(X)),B=w.value.length+I.length;if(I.length===0){m.value.clearFiles();return}if(B>c.limit){Ne.ElNotification({title:`${o("act.tip")}`,message:`${o("act.uploadLimitTip")}`,type:"warning",duration:2500}),m.value.clearFiles();return}if(!c.autoUpload){const X=I.map(J=>({...J,filePath:null,status:"success"}));a("update:modelValue",X),m.value.clearFiles();return}u.value=!0;const U=new FormData;Object.keys(c.data).forEach(X=>{U.append(X,c.data[X])}),I.forEach(X=>{U.append(c.name,X.raw)});let{data:Z}=await x(U);const K=c.multiple?[...w.value.map(X=>X.filePath),...Z.filePaths||[]].join(";"):[...Z.filePaths||[]].join(";");m.value.clearFiles(),a("update:modelValue",K),u.value=!1}catch(I){m.value.clearFiles(),u.value=!1,console.error(I)}},P=(T,I)=>{E(k,I,500)},N=(T,I)=>{const B=f.value[`tooltipRef${I}`];d.value=B.scrollWidth<=Math.round(B.getBoundingClientRect().width)},_=({filePath:T,name:I,uid:B},U)=>{l.nextTick(()=>{document.querySelector(`.previewImage_${B}`).children[0].click()})},A=({filePath:T,name:I})=>{r(c.request,T)},S=(T,I)=>{w.value=w.value.filter((B,U)=>U!==I),a("delete",{data:T})};return e({clearFiles:()=>{w.value=[],m.value.clearFiles()}}),(T,I)=>{const B=l.resolveComponent("upload-filled"),U=l.resolveComponent("el-icon"),Z=l.resolveComponent("el-upload"),K=l.resolveComponent("el-image"),X=l.resolveComponent("el-tooltip"),J=l.resolveComponent("el-button"),fe=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",m1,[l.withDirectives((l.openBlock(),l.createBlock(Z,l.mergeProps({ref_key:"uploadRef",ref:m,action:"#",drag:"",accept:c.accept,multiple:c.multiple,"auto-upload":!1,"show-file-list":!1,"on-change":P},T.$attrs,{"element-loading-text":l.unref(o)("act.uploadLoading")}),{tip:l.withCtx(()=>[c.tipText?l.renderSlot(T.$slots,"default",{key:0},()=>[l.createElementVNode("p",O1,l.toDisplayString(c.tipText),1)],!0):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[l.createVNode(U,{class:"el-icon--upload"},{default:l.withCtx(()=>[l.createVNode(B)]),_:1}),l.createElementVNode("div",g1,[l.createTextVNode(l.toDisplayString(l.unref(o)("act.uploadText")),1),l.createElementVNode("em",null,l.toDisplayString(l.unref(o)("act.clickUpload")),1)])]),_:3},16,["accept","multiple","element-loading-text"])),[[fe,l.unref(u)]]),l.renderSlot(T.$slots,"default",{},()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(he,ye)=>(l.openBlock(),l.createElementBlock("div",{class:"file-list",key:he.uid},[l.createElementVNode("div",_1,[he.fileType==="image"?(l.openBlock(),l.createBlock(K,{key:0,class:l.normalizeClass(["file-list-image",{[`previewImage_${he.uid}`]:!0}]),fit:"cover","preview-src-list":g(ye),"preview-teleported":"",src:he.filePath},null,8,["class","preview-src-list","src"])):(l.openBlock(),l.createBlock(K,{key:1,class:"file-list-icon",src:l.unref(s)(`images/upload-${he.fileType}.png`)},null,8,["src"])),l.createVNode(X,{effect:"dark",content:he.name,placement:"bottom-start",disabled:l.unref(d)},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"el-file-name",ref_for:!0,ref:z=>l.unref(f)[`tooltipRef${ye}`]=z,onMouseenter:z=>N(z,ye),onMouseleave:z=>N(z,ye)},l.toDisplayString(he.name),41,b1)]),_:2},1032,["content","disabled"])]),l.createElementVNode("div",y1,[he.fileType==="image"?(l.openBlock(),l.createBlock(J,{key:0,type:"primary",size:"small",icon:l.unref(oy),circle:"",onClick:z=>_(he)},null,8,["icon","onClick"])):l.createCommentVNode("",!0),l.createVNode(J,{type:"primary",size:"small",icon:l.unref(iy),circle:"",onClick:z=>A(he)},null,8,["icon","onClick"]),l.createVNode(J,{type:"danger",size:"small",icon:l.unref(ey),circle:"",onClick:z=>S(he,ye)},null,8,["icon","onClick"])])]))),128))],!0)])}}},[["__scopeId","data-v-f839bee6"]])},Symbol.toStringTag,{value:"Module"}));var k1=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCommentChange","onCompositionEnd","onCompositionStart","onCompositionUpdate","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onInput","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],x1=function(i){return k1.map(function(e){return e.toLowerCase()}).indexOf(i.toLowerCase())!==-1},S1=function(i,e,t){Object.keys(e).filter(x1).forEach(function(n){var s=e[n];typeof s=="function"&&(n==="onInit"?s(i,t):t.on(n.substring(2),function(r){return s(r,t)}))})},C1=function(i,e,t,n){var s=i.modelEvents?i.modelEvents:null,r=Array.isArray(s)?s.join(" "):s;l.watch(n,function(o,a){t&&typeof o=="string"&&o!==a&&o!==t.getContent({format:i.outputFormat})&&t.setContent(o)}),t.on(r||"change input undo redo",function(){e.emit("update:modelValue",t.getContent({format:i.outputFormat}))})},A1=function(i,e,t,n,s,r){n.setContent(r()),t.attrs["onUpdate:modelValue"]&&C1(e,t,n,s),S1(i,t.attrs,n)},Ju=0,ef=function(i){var e=Date.now(),t=Math.floor(Math.random()*1e9);return Ju++,i+"_"+t+Ju+String(e)},Q1=function(i){return i!==null&&i.tagName.toLowerCase()==="textarea"},tf=function(i){return typeof i>"u"||i===""?[]:Array.isArray(i)?i:i.split(" ")},P1=function(i,e){return tf(i).concat(tf(e))},T1=function(i){return i==null},nf=function(){return{listeners:[],scriptId:ef("tiny-script"),scriptLoaded:!1}},E1=function(){var i=nf(),e=function(s,r,o,a){var c=r.createElement("script");c.referrerPolicy="origin",c.type="application/javascript",c.id=s,c.src=o;var h=function(){c.removeEventListener("load",h),a()};c.addEventListener("load",h),r.head&&r.head.appendChild(c)},t=function(s,r,o){i.scriptLoaded?o():(i.listeners.push(o),s.getElementById(i.scriptId)||e(i.scriptId,s,r,function(){i.listeners.forEach(function(a){return a()}),i.scriptLoaded=!0}))},n=function(){i=nf()};return{load:t,reinitialize:n}},$1=E1(),N1=function(){return typeof window<"u"?window:global},hn=function(){var i=N1();return i&&i.tinymce?i.tinymce:null},R1={apiKey:String,licenseKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(i){return i==="html"||i==="text"}}},oi=globalThis&&globalThis.__assign||function(){return oi=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s])}return i},oi.apply(this,arguments)},V1=function(i,e,t,n){return i(n||"div",{id:e,ref:t})},L1=function(i,e,t){return i("textarea",{id:e,visibility:"hidden",ref:t})},Ll={selector:void 0,target:void 0},M1=l.defineComponent({props:R1,setup:function(i,e){var t=i.init?oi(oi({},i.init),Ll):oi({},Ll),n=l.toRefs(i),s=n.disabled,r=n.modelValue,o=n.tagName,a=l.ref(null),c=null,h=i.id||ef("tiny-vue"),u=i.init&&i.init.inline||i.inline,f=!!e.attrs["onUpdate:modelValue"],d=!0,m=i.initialValue?i.initialValue:"",b="",w=function(O){return f?function(){return r!=null&&r.value?r.value:""}:function(){return O?m:b}},g=function(){var O=w(d),C=oi(oi({},t),{readonly:i.disabled,target:a.value,plugins:P1(t.plugins,i.plugins),toolbar:i.toolbar||t.toolbar,inline:u,license_key:i.licenseKey,setup:function(y){c=y,y.on("init",function(E){return A1(E,i,e,y,r,O)}),typeof t.setup=="function"&&t.setup(y)}});Q1(a.value)&&(a.value.style.visibility=""),hn().init(C),d=!1};l.watch(s,function(O){var C;c!==null&&(typeof((C=c.mode)===null||C===void 0?void 0:C.set)=="function"?c.mode.set(O?"readonly":"design"):c.setMode(O?"readonly":"design"))}),l.watch(o,function(O){var C;f||(b=c.getContent()),(C=hn())===null||C===void 0||C.remove(c),l.nextTick(function(){return g()})}),l.onMounted(function(){if(hn()!==null)g();else if(a.value&&a.value.ownerDocument){var O=i.cloudChannel?i.cloudChannel:"7",C=i.apiKey?i.apiKey:"no-api-key",y=T1(i.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/".concat(C,"/tinymce/").concat(O,"/tinymce.min.js"):i.tinymceScriptSrc;$1.load(a.value.ownerDocument,y,g)}}),l.onBeforeUnmount(function(){hn()!==null&&hn().remove(c)}),u||(l.onActivated(function(){d||g()}),l.onDeactivated(function(){var O;f||(b=c.getContent()),(O=hn())===null||O===void 0||O.remove(c)}));var p=function(O){var C;b=c.getContent(),(C=hn())===null||C===void 0||C.remove(c),t=oi(oi(oi({},t),O),Ll),l.nextTick(function(){return g()})};return e.expose({rerender:p,getEditor:function(){return c}}),function(){return u?V1(l.h,h,a,i.tagName):L1(l.h,h,a)}}});const uE="",B1={style:{height:"100%",overflow:"hidden"}},D1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String,default:""},value:{type:String,default:""},baseUrl:{type:String,default:""},width:{type:[Number,String],default:"100%"},height:{type:Number,default:500},disabled:{type:Boolean,default:!1},editableRoot:{type:Boolean,default:!0},placeholder:{type:String,default:"请输入"},plugins:{type:[String,Array],default:"importcss autoresize searchreplace autolink directionality code visualblocks visualchars fullscreen image link codesample table charmap nonbreaking anchor insertdatetime advlist lists wordcount charmap quickbars emoticons accordion"},toolbar:{type:[String,Array,Boolean],default:"undo redo | accordion accordionremove | blocks fontfamily fontsize| bold italic underline strikethrough ltr rtl | align numlist bullist | link image | table | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | anchor codesample"}},emits:["update:modelValue","setHtml"],setup(i,{expose:e,emit:t}){const n=t,s=i,r=l.ref("vue-tinymce-"+ +new Date+((Math.random()*1e3).toFixed(0)+"")),o=l.reactive({selector:"#"+r.value,language_url:"/tinymce/langs/zh_CN.js",language:"zh_CN",skin_url:"/tinymce/skins/ui/oxide",content_css:"/tinymce/skins/content/default/content.css",editable_root:s.editableRoot,width:s.width,max_height:s.height,branding:!1,promotion:!1,menubar:"edit view insert format tools table",paste_data_images:!0,image_dimensions:!1,plugins:s.plugins,toolbar:s.toolbar,convert_urls:!1,link_default_target:"_blank",link_context_toolbar:!0,quickbars_insert_toolbar:"",quickbars_image_toolbar:"alignleft aligncenter alignright | rotateleft rotateright | imageoptions",editimage_toolbar:"rotateleft rotateright | flipv fliph | editimage imageoptions",font_family_formats:"Arial=arial,helvetica,sans-serif; 宋体=SimSun; 微软雅黑=Microsoft Yahei; Impact=impact,chicago;",font_size_formats:"11px 12px 14px 16px 18px 24px 36px 48px 64px 72px",image_caption:!0,editimage_cors_hosts:["picsum.photos"],noneditable_class:"mceNonEditable",toolbar_mode:"wrap",content_style:"body {margin:12px; font-family:sans-serif; font-size:14px }p {margin:3px; line-height:24px;}",image_advtab:!0,importcss_append:!0,paste_webkit_styles:"all",paste_merge_formats:!0,nonbreaking_force_tab:!1,paste_auto_cleanup_on_paste:!1,file_picker_types:"file",quickbars_selection_toolbar:"bold italic | quicklink h2 h3 blockquote quickimage quicktable",images_upload_handler:function(u,f){}});console.log(o);const a=l.computed({get(){return s.modelValue},set(u){n("update:modelValue",u)}});return l.watch(()=>a.value,()=>{n("setHtml",hr.activeEditor.getContent({format:"text"}),a.value)}),l.onMounted(()=>{hr.init({})}),e({onGetContent:()=>hr.activeEditor.getContent(),onSetContent:u=>{hr.activeEditor.setContent(u)}}),(u,f)=>(l.openBlock(),l.createElementBlock("div",B1,[l.createVNode(l.unref(M1),{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=d=>a.value=d),init:o,disabled:i.disabled,placeholder:i.placeholder,id:r.value},null,8,["modelValue","init","disabled","placeholder","id"])]))}}},Symbol.toStringTag,{value:"Module"}));let Ml=[],sf=[];(()=>{let i="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(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<i.length;e++)(e%2?sf:Ml).push(t=t+i[e])})();function v1(i){if(i<768)return!1;for(let e=0,t=Ml.length;;){let n=e+t>>1;if(i<Ml[n])t=n;else if(i>=sf[n])e=n+1;else return!0;if(e==t)return!1}}function rf(i){return i>=127462&&i<=127487}const of=8205;function Z1(i,e,t=!0,n=!0){return(t?lf:I1)(i,e,n)}function lf(i,e,t){if(e==i.length)return e;e&&af(i.charCodeAt(e))&&cf(i.charCodeAt(e-1))&&e--;let n=Bl(i,e);for(e+=hf(n);e<i.length;){let s=Bl(i,e);if(n==of||s==of||t&&v1(s))e+=hf(s),n=s;else if(rf(s)){let r=0,o=e-2;for(;o>=0&&rf(Bl(i,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function I1(i,e,t){for(;e>0;){let n=lf(i,e-2,t);if(n<e)return n;e--}return 0}function Bl(i,e){let t=i.charCodeAt(e);if(!cf(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return af(n)?(t-55296<<10)+(n-56320)+65536:t}function af(i){return i>=56320&&i<57344}function cf(i){return i>=55296&&i<56320}function hf(i){return i<65536?1:2}class Ae{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,n){[e,t]=Rn(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(t,this.length,s,1),li.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Rn(this,e,t);let n=[];return this.decompose(e,t,n,0),li.from(n,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),n=this.length-this.scanIdentical(e,-1),s=new ms(this),r=new ms(e);for(let o=t,a=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(a+=s.value.length,s.done||a>=n)return!0}}iter(e=1){return new ms(this,e)}iterRange(e,t=this.length){return new ff(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new df(n)}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]?Ae.empty:e.length<=32?new ze(e):li.from(ze.split(e,[]))}}class ze extends Ae{constructor(e,t=U1(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.text[r],a=s+o.length;if((t?n:a)>=e)return new F1(s,a,n,o);s=a+1,n++}}decompose(e,t,n,s){let r=e<=0&&t>=this.length?this:new ze(uf(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=n.pop(),a=Qr(r.text,o.text.slice(),0,r.length);if(a.length<=32)n.push(new ze(a,o.length+r.length));else{let c=a.length>>1;n.push(new ze(a.slice(0,c)),new ze(a.slice(c)))}}else n.push(r)}replace(e,t,n){if(!(n instanceof ze))return super.replace(e,t,n);[e,t]=Rn(this,e,t);let s=Qr(this.text,Qr(n.text,uf(this.text,0,e)),t),r=this.length+n.length-(t-e);return s.length<=32?new ze(s,r):li.from(ze.split(s,[]),r)}sliceString(e,t=this.length,n=`
22
+ `){[e,t]=Rn(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let a=this.text[o],c=r+a.length;r>e&&o&&(s+=n),e<c&&t>r&&(s+=a.slice(Math.max(0,e-r),t-r)),r=c+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let r of e)n.push(r),s+=r.length+1,n.length==32&&(t.push(new ze(n,s)),n=[],s=-1);return s>-1&&t.push(new ze(n,s)),t}}class li extends Ae{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.children[r],a=s+o.length,c=n+o.lines-1;if((t?c:a)>=e)return o.lineInner(e,t,n,s);s=a+1,n=c+1}}decompose(e,t,n,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let a=this.children[r],c=o+a.length;if(e<=c&&t>=o){let h=s&((o<=e?1:0)|(c>=t?2:0));o>=e&&c<=t&&!h?n.push(a):a.decompose(e-o,t-o,n,h)}o=c+1}}replace(e,t,n){if([e,t]=Rn(this,e,t),n.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],a=r+o.length;if(e>=r&&t<=a){let c=o.replace(e-r,t-r,n),h=this.lines-o.lines+c.lines;if(c.lines<h>>5-1&&c.lines>h>>5+1){let u=this.children.slice();return u[s]=c,new li(u,this.length-(t-e)+n.length)}return super.replace(r,a,c)}r=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
23
+ `){[e,t]=Rn(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let a=this.children[r],c=o+a.length;o>e&&r&&(s+=n),e<c&&t>o&&(s+=a.sliceString(e-o,t-o,n)),o=c+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof li))return 0;let n=0,[s,r,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==a)return n;let c=this.children[s],h=e.children[r];if(c!=h)return n+c.scanIdentical(h,t);n+=c.length+1}}static from(e,t=e.reduce((n,s)=>n+s.length+1,-1)){let n=0;for(let m of e)n+=m.lines;if(n<32){let m=[];for(let b of e)b.flatten(m);return new ze(m,t)}let s=Math.max(32,n>>5),r=s<<1,o=s>>1,a=[],c=0,h=-1,u=[];function f(m){let b;if(m.lines>r&&m instanceof li)for(let w of m.children)f(w);else m.lines>o&&(c>o||!c)?(d(),a.push(m)):m instanceof ze&&c&&(b=u[u.length-1])instanceof ze&&m.lines+b.lines<=32?(c+=m.lines,h+=m.length+1,u[u.length-1]=new ze(b.text.concat(m.text),b.length+1+m.length)):(c+m.lines>s&&d(),c+=m.lines,h+=m.length+1,u.push(m))}function d(){c!=0&&(a.push(u.length==1?u[0]:li.from(u,h)),h=-1,c=u.length=0)}for(let m of e)f(m);return d(),a.length==1?a[0]:new li(a,t)}}Ae.empty=new ze([""],0);function U1(i){let e=-1;for(let t of i)e+=t.length+1;return e}function Qr(i,e,t=0,n=1e9){for(let s=0,r=0,o=!0;r<i.length&&s<=n;r++){let a=i[r],c=s+a.length;c>=t&&(c>n&&(a=a.slice(0,n-s)),s<t&&(a=a.slice(t-s)),o?(e[e.length-1]+=a,o=!1):e.push(a)),s=c+1}return e}function uf(i,e,t){return Qr(i,[""],e,t)}class ms{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 ze?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],r=this.offsets[n],o=r>>1,a=s instanceof ze?s.text.length:s.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
24
+ `,this;e--}else if(s instanceof ze){let c=s.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=s.children[o+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof ze?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ff{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new ms(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}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 n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),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 df{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ae.prototype[Symbol.iterator]=function(){return this.iter()},ms.prototype[Symbol.iterator]=ff.prototype[Symbol.iterator]=df.prototype[Symbol.iterator]=function(){return this});class F1{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}}function Rn(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}function ut(i,e,t=!0,n=!0){return Z1(i,e,t,n)}function j1(i){return i>=56320&&i<57344}function q1(i){return i>=55296&&i<56320}function Ct(i,e){let t=i.charCodeAt(e);if(!q1(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return j1(n)?(t-55296<<10)+(n-56320)+65536:t}function Dl(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}function ai(i){return i<65536?1:2}const vl=/\r\n?|\n/;var ft=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(ft||(ft={}));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 n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(n,s,r),s+=r):s+=o,n+=r}}iterChangedRanges(e,t=!1){Zl(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?e.push(n,s):e.push(s,n)}return new ci(e)}composeDesc(e){return this.empty?e:e.empty?this:pf(this,e)}mapDesc(e,t=!1){return e.empty?this:Il(this,e,t)}mapPos(e,t=-1,n=ft.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],c=this.sections[o++],h=s+a;if(c<0){if(h>e)return r+(e-s);r+=a}else{if(n!=ft.Simple&&h>=e&&(n==ft.TrackDel&&s<e&&h>e||n==ft.TrackBefore&&s<e||n==ft.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!a)return e==s||t<0?r:r+c;r+=c}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let n=0,s=0;n<this.sections.length&&s<=t;){let r=this.sections[n++],o=this.sections[n++],a=s+r;if(o>=0&&s<=t&&a>=e)return s<e&&a>t?"cover":!0;s=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+n+(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 ci(e)}static create(e){return new ci(e)}}class it 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 Zl(this,(t,n,s,r,o)=>e=e.replace(s,s+(n-t),o),!1),e}mapDesc(e,t=!1){return Il(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],a=t[s+1];if(a>=0){t[s]=a,t[s+1]=o;let c=s>>1;for(;n.length<c;)n.push(Ae.empty);n.push(o?e.slice(r,r+o):Ae.empty)}r+=o}return new it(t,n)}compose(e){return this.empty?e:e.empty?this:pf(this,e,!0)}map(e,t=!1){return e.empty?this:Il(this,e,t,!0)}iterChanges(e,t=!1){Zl(this,e,t)}get desc(){return ci.create(this.sections)}filter(e){let t=[],n=[],s=[],r=new gs(this);e:for(let o=0,a=0;;){let c=o==e.length?1e9:e[o++];for(;a<c||a==c&&r.len==0;){if(r.done)break e;let u=Math.min(r.len,c-a);gt(s,u,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;gt(t,u,f),f>0&&Fi(n,t,r.text),r.forward(u),a+=u}let h=e[o++];for(;a<h;){if(r.done)break e;let u=Math.min(r.len,h-a);gt(t,u,-1),gt(s,u,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(u),a+=u}}return{changes:new it(t,n),filtered:ci.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],s=this.sections[t+1];s<0?e.push(n):s==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let s=[],r=[],o=0,a=null;function c(u=!1){if(!u&&!s.length)return;o<t&&gt(s,t-o,-1);let f=new it(s,r);a=a?a.compose(f.map(a)):f,s=[],r=[],o=0}function h(u){if(Array.isArray(u))for(let f of u)h(f);else if(u instanceof it){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);c(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:m}=u;if(f>d||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let b=m?typeof m=="string"?Ae.of(m.split(n||vl)):m:Ae.empty,w=b.length;if(f==d&&w==0)return;f<o&&c(),f>o&&gt(s,f-o,-1),gt(s,d-f,w),Fi(r,s,b),o=d}}return h(e),c(!a),a}static empty(e){return new it(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;n.length<s;)n.push(Ae.empty);n[s]=Ae.of(r.slice(1)),t.push(r[0],n[s].length)}}}return new it(t,n)}static createSet(e,t){return new it(e,t)}}function gt(i,e,t,n=!1){if(e==0&&t<=0)return;let s=i.length-2;s>=0&&t<=0&&t==i[s+1]?i[s]+=e:s>=0&&e==0&&i[s]==0?i[s+1]+=t:n?(i[s]+=e,i[s+1]+=t):i.push(e,t)}function Fi(i,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<i.length)i[i.length-1]=i[i.length-1].append(t);else{for(;i.length<n;)i.push(Ae.empty);i.push(t)}}function Zl(i,e,t){let n=i.inserted;for(let s=0,r=0,o=0;o<i.sections.length;){let a=i.sections[o++],c=i.sections[o++];if(c<0)s+=a,r+=a;else{let h=s,u=r,f=Ae.empty;for(;h+=a,u+=c,c&&n&&(f=f.append(n[o-2>>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)a=i.sections[o++],c=i.sections[o++];e(s,h,r,u,f),s=h,r=u}}}function Il(i,e,t,n=!1){let s=[],r=n?[]:null,o=new gs(i),a=new gs(e);for(let c=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let h=Math.min(o.len,a.len);gt(s,h,-1),o.forward(h),a.forward(h)}else if(a.ins>=0&&(o.ins<0||c==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!t))){let h=a.len;for(gt(s,a.ins,-1);h;){let u=Math.min(o.len,h);o.ins>=0&&c<o.i&&o.len<=u&&(gt(s,0,o.ins),r&&Fi(r,s,o.text),c=o.i),o.forward(u),h-=u}a.next()}else if(o.ins>=0){let h=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);h+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;gt(s,h,c<o.i?o.ins:0),r&&c<o.i&&Fi(r,s,o.text),c=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return r?it.createSet(s,r):ci.create(s);throw new Error("Mismatched change set lengths")}}}function pf(i,e,t=!1){let n=[],s=t?[]:null,r=new gs(i),o=new gs(e);for(let a=!1;;){if(r.done&&o.done)return s?it.createSet(n,s):ci.create(n);if(r.ins==0)gt(n,r.len,0,a),r.next();else if(o.len==0&&!o.done)gt(n,0,o.ins,a),s&&Fi(s,n,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let c=Math.min(r.len2,o.len),h=n.length;if(r.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;gt(n,c,u,a),s&&u&&Fi(s,n,o.text)}else o.ins==-1?(gt(n,r.off?0:r.len,c,a),s&&Fi(s,n,r.textBit(c))):(gt(n,r.off?0:r.len,o.off?0:o.ins,a),s&&!o.off&&Fi(s,n,o.text));a=(r.ins>c||o.ins>=0&&o.len>c)&&(a||n.length>h),r.forward2(c),o.forward(c)}}}}class gs{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?Ae.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Ae.empty:t[n].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 un{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}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 n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new un(n,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return j.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return j.range(this.anchor,n)}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 j.range(e.anchor,e.head)}static create(e,t,n){return new un(e,t,n)}}class j{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:j.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new j([this.main],0)}addRange(e,t=!0){return j.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,j.create(n,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 j(e.ranges.map(t=>un.fromJSON(t)),e.main)}static single(e,t=e){return new j([j.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 n=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=n:r.from<n)return j.normalized(e.slice(),t);n=r.to}return new j(e,t)}static cursor(e,t=0,n,s){return un.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(s??16777215)<<6)}static range(e,t,n,s){let r=(n??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?un.create(t,e,48|r):un.create(e,t,(t>e?8:0)|r)}static normalized(e,t=0){let n=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(n);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let a=o.from,c=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?j.range(c,a):j.range(a,c))}}return new j(e,t)}}function mf(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ul=0;class ce{constructor(e,t,n,s,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=Ul++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new ce(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Fl),!!e.static,e.enables)}of(e){return new Pr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Pr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Pr(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function Fl(i,e){return i==e||i.length==e.length&&i.every((t,n)=>t===e[n])}class Pr{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=Ul++}dynamicSlot(e){var t;let n=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,a=this.type==2,c=!1,h=!1,u=[];for(let f of this.dependencies)f=="doc"?c=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||u.push(e[f.id]);return{create(f){return f.values[o]=n(f),1},update(f,d){if(c&&d.docChanged||h&&(d.docChanged||d.selection)||jl(f,u)){let m=n(f);if(a?!gf(m,f.values[o],s):!s(m,f.values[o]))return f.values[o]=m,1}return 0},reconfigure:(f,d)=>{let m,b=d.config.address[r];if(b!=null){let w=$r(d,b);if(this.dependencies.every(g=>g instanceof ce?d.facet(g)===f.facet(g):g instanceof rt?d.field(g,!1)==f.field(g,!1):!0)||(a?gf(m=n(f),w,s):s(m=n(f),w)))return f.values[o]=w,0}else m=n(f);return f.values[o]=m,1}}}}function gf(i,e,t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!t(i[n],e[n]))return!1;return!0}function jl(i,e){let t=!1;for(let n of e)bs(i,n)&1&&(t=!0);return t}function X1(i,e,t){let n=t.map(c=>i[c.id]),s=t.map(c=>c.type),r=n.filter(c=>!(c&1)),o=i[e.id]>>1;function a(c){let h=[];for(let u=0;u<n.length;u++){let f=$r(c,n[u]);if(s[u]==2)for(let d of f)h.push(d);else h.push(f)}return e.combine(h)}return{create(c){for(let h of n)bs(c,h);return c.values[o]=a(c),1},update(c,h){if(!jl(c,r))return 0;let u=a(c);return e.compare(u,c.values[o])?0:(c.values[o]=u,1)},reconfigure(c,h){let u=jl(c,n),f=h.config.facets[e.id],d=h.facet(e);if(f&&!u&&Fl(t,f))return c.values[o]=d,0;let m=a(c);return e.compare(m,d)?(c.values[o]=d,0):(c.values[o]=m,1)}}}const Tr=ce.define({static:!0});class rt{constructor(e,t,n,s,r){this.id=e,this.createF=t,this.updateF=n,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new rt(Ul++,e.create,e.update,e.compare||((n,s)=>n===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Tr).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,s)=>{let r=n.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(n.values[t]=o,1)},reconfigure:(n,s)=>{let r=n.facet(Tr),o=s.facet(Tr),a;return(a=r.find(c=>c.field==this))&&a!=o.find(c=>c.field==this)?(n.values[t]=a.create(n),1):s.config.address[this.id]!=null?(n.values[t]=s.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,Tr.of({field:this,create:e})]}get extension(){return this}}const fn={lowest:4,low:3,default:2,high:1,highest:0};function Os(i){return e=>new Of(e,i)}const ji={highest:Os(fn.highest),high:Os(fn.high),default:Os(fn.default),low:Os(fn.low),lowest:Os(fn.lowest)};class Of{constructor(e,t){this.inner=e,this.prec=t}}class _s{of(e){return new ql(this,e)}reconfigure(e){return _s.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ql{constructor(e,t){this.compartment=e,this.inner=t}}class Er{constructor(e,t,n,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.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,n){let s=[],r=Object.create(null),o=new Map;for(let d of W1(e,t,o))d instanceof rt?s.push(d):(r[d.facet.id]||(r[d.facet.id]=[])).push(d);let a=Object.create(null),c=[],h=[];for(let d of s)a[d.id]=h.length<<1,h.push(m=>d.slot(m));let u=n==null?void 0:n.config.facets;for(let d in r){let m=r[d],b=m[0].facet,w=u&&u[d]||[];if(m.every(g=>g.type==0))if(a[b.id]=c.length<<1|1,Fl(w,m))c.push(n.facet(b));else{let g=b.combine(m.map(p=>p.value));c.push(n&&b.compare(g,n.facet(b))?n.facet(b):g)}else{for(let g of m)g.type==0?(a[g.id]=c.length<<1|1,c.push(g.value)):(a[g.id]=h.length<<1,h.push(p=>g.dynamicSlot(p)));a[b.id]=h.length<<1,h.push(g=>X1(g,b,m))}}let f=h.map(d=>d(a));return new Er(e,o,f,a,c,r)}}function W1(i,e,t){let n=[[],[],[],[],[]],s=new Map;function r(o,a){let c=s.get(o);if(c!=null){if(c<=a)return;let h=n[c].indexOf(o);h>-1&&n[c].splice(h,1),o instanceof ql&&t.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let h of o)r(h,a);else if(o instanceof ql){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,a)}else if(o instanceof Of)r(o.inner,o.prec);else if(o instanceof rt)n[a].push(o),o.provides&&r(o.provides,a);else if(o instanceof Pr)n[a].push(o),o.facet.extensions&&r(o.facet.extensions,fn.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,a)}}return r(i,fn.default),n.reduce((o,a)=>o.concat(a))}function bs(i,e){if(e&1)return 2;let t=e>>1,n=i.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;i.status[t]=4;let s=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|s}function $r(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}const _f=ce.define(),Xl=ce.define({combine:i=>i.some(e=>e),static:!0}),bf=ce.define({combine:i=>i.length?i[0]:void 0,static:!0}),yf=ce.define(),wf=ce.define(),kf=ce.define(),xf=ce.define({combine:i=>i.length?i[0]:!1});class Ai{constructor(e,t){this.type=e,this.value=t}static define(){return new Y1}}class Y1{of(e){return new Ai(this,e)}}class z1{constructor(e){this.map=e}of(e){return new we(this,e)}}class we{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 we(this.type,t)}is(e){return this.type==e}static define(e={}){return new z1(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let s of e){let r=s.map(t);r&&n.push(r)}return n}}we.reconfigure=we.define(),we.appendConfig=we.define();class Ke{constructor(e,t,n,s,r,o){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&mf(n,t.newLength),r.some(a=>a.type==Ke.time)||(this.annotations=r.concat(Ke.time.of(Date.now())))}static create(e,t,n,s,r,o){return new Ke(e,t,n,s,r,o)}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(Ke.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Ke.time=Ai.define(),Ke.userEvent=Ai.define(),Ke.addToHistory=Ai.define(),Ke.remote=Ai.define();function G1(i,e){let t=[];for(let n=0,s=0;;){let r,o;if(n<i.length&&(s==e.length||e[s]>=i[n]))r=i[n++],o=i[n++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Sf(i,e,t){var n;let s,r,o;return t?(s=e.changes,r=it.empty(e.changes.length),o=i.changes.compose(e.changes)):(s=e.changes.map(i.changes),r=i.changes.mapDesc(e.changes,!0),o=i.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(n=i.selection)===null||n===void 0?void 0:n.map(s),effects:we.mapEffects(i.effects,s).concat(we.mapEffects(e.effects,r)),annotations:i.annotations.length?i.annotations.concat(e.annotations):e.annotations,scrollIntoView:i.scrollIntoView||e.scrollIntoView}}function Wl(i,e,t){let n=e.selection,s=Vn(e.annotations);return e.userEvent&&(s=s.concat(Ke.userEvent.of(e.userEvent))),{changes:e.changes instanceof it?e.changes:it.of(e.changes||[],t,i.facet(bf)),selection:n&&(n instanceof j?n:j.single(n.anchor,n.head)),effects:Vn(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function Cf(i,e,t){let n=Wl(i,e.length?e[0]:{},i.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;n=Sf(n,Wl(i,e[r],o?n.changes.newLength:i.doc.length),o)}let s=Ke.create(i,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return K1(t?H1(s):s)}function H1(i){let e=i.startState,t=!0;for(let s of e.facet(yf)){let r=s(i);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:G1(t,r))}if(t!==!0){let s,r;if(t===!1)r=i.changes.invertedDesc,s=it.empty(e.doc.length);else{let o=i.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}i=Ke.create(e,s,i.selection&&i.selection.map(r),we.mapEffects(i.effects,r),i.annotations,i.scrollIntoView)}let n=e.facet(wf);for(let s=n.length-1;s>=0;s--){let r=n[s](i);r instanceof Ke?i=r:Array.isArray(r)&&r.length==1&&r[0]instanceof Ke?i=r[0]:i=Cf(e,Vn(r),!1)}return i}function K1(i){let e=i.startState,t=e.facet(kf),n=i;for(let s=t.length-1;s>=0;s--){let r=t[s](i);r&&Object.keys(r).length&&(n=Sf(n,Wl(e,r,i.changes.newLength),!0))}return n==i?i:Ke.create(e,i.changes,i.selection,n.effects,n.annotations,n.scrollIntoView)}const J1=[];function Vn(i){return i==null?J1:Array.isArray(i)?i:[i]}var je=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(je||(je={}));const ew=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Yl;try{Yl=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function tw(i){if(Yl)return Yl.test(i);for(let e=0;e<i.length;e++){let t=i[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||ew.test(t)))return!0}return!1}function iw(i){return e=>{if(!/\S/.test(e))return je.Space;if(tw(e))return je.Word;for(let t=0;t<i.length;t++)if(e.indexOf(i[t])>-1)return je.Word;return je.Other}}class Se{constructor(e,t,n,s,r,o){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)bs(this,a<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return bs(this,n),$r(this,n)}update(...e){return Cf(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:s}=t;for(let a of e.effects)a.is(_s.reconfigure)?(t&&(s=new Map,t.compartments.forEach((c,h)=>s.set(h,c)),t=null),s.set(a.value.compartment,a.value.extension)):a.is(we.reconfigure)?(t=null,n=a.value):a.is(we.appendConfig)&&(t=null,n=Vn(n).concat(a.value));let r;t?r=e.startState.values.slice():(t=Er.resolve(n,s,this),r=new Se(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let o=e.startState.facet(Xl)?e.newSelection:e.newSelection.asSingle();new Se(t,e.newDoc,o,r,(a,c)=>c.update(a,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:j.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),s=this.changes(n.changes),r=[n.range],o=Vn(n.effects);for(let a=1;a<t.ranges.length;a++){let c=e(t.ranges[a]),h=this.changes(c.changes),u=h.map(s);for(let d=0;d<a;d++)r[d]=r[d].map(u);let f=s.mapDesc(h,!0);r.push(c.range.map(f)),s=s.compose(u),o=we.mapEffects(o,u).concat(we.mapEffects(Vn(c.effects),f))}return{changes:s,selection:j.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof it?e:it.of(e,this.doc.length,this.facet(Se.lineSeparator))}toText(e){return Ae.of(e.split(this.facet(Se.lineSeparator)||vl))}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:(bs(this,t),$r(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let s=e[n];s instanceof rt&&this.config.address[s.id]!=null&&(t[n]=s.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(n){for(let r in n)if(Object.prototype.hasOwnProperty.call(e,r)){let o=n[r],a=e[r];s.push(o.init(c=>o.spec.fromJSON(a,c)))}}return Se.create({doc:e.doc,selection:j.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Er.resolve(e.extensions||[],new Map),n=e.doc instanceof Ae?e.doc:Ae.of((e.doc||"").split(t.staticFacet(Se.lineSeparator)||vl)),s=e.selection?e.selection instanceof j?e.selection:j.single(e.selection.anchor,e.selection.head):j.single(0);return mf(s,n.length),t.staticFacet(Xl)||(s=s.asSingle()),new Se(t,n,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Se.tabSize)}get lineBreak(){return this.facet(Se.lineSeparator)||`
25
+ `}get readOnly(){return this.facet(xf)}phrase(e,...t){for(let n of this.facet(Se.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?n:t[r-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let r of this.facet(_f))for(let o of r(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return iw(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let c=ut(t,o,!1);if(r(t.slice(c,o))!=je.Word)break;o=c}for(;a<s;){let c=ut(t,a);if(r(t.slice(a,c))!=je.Word)break;a=c}return o==a?null:j.range(o+n,a+n)}}Se.allowMultipleSelections=Xl,Se.tabSize=ce.define({combine:i=>i.length?i[0]:4}),Se.lineSeparator=bf,Se.readOnly=xf,Se.phrases=ce.define({compare(i,e){let t=Object.keys(i),n=Object.keys(e);return t.length==n.length&&t.every(s=>i[s]==e[s])}}),Se.languageData=_f,Se.changeFilter=yf,Se.transactionFilter=wf,Se.transactionExtender=kf,_s.reconfigure=we.define();function hi(i,e,t={}){let n={};for(let s of i)for(let r of Object.keys(s)){let o=s[r],a=n[r];if(a===void 0)n[r]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(t,r))n[r]=t[r](a,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)n[s]===void 0&&(n[s]=e[s]);return n}class dn{eq(e){return this==e}range(e,t=e){return zl.create(e,t,this)}}dn.prototype.startSide=dn.prototype.endSide=0,dn.prototype.point=!1,dn.prototype.mapMode=ft.TrackDel;let zl=class HO{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new HO(e,t,n)}};function Gl(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}class Hl{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let r=n?this.to:this.from;for(let o=s,a=r.length;;){if(o==a)return o;let c=o+a>>1,h=r[c]-e||(n?this.value[c].endSide:this.value[c].startSide)-t;if(c==o)return h>=0?o:a;h>=0?a=c:o=c+1}}between(e,t,n,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let n=[],s=[],r=[],o=-1,a=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],u=this.from[c]+e,f=this.to[c]+e,d,m;if(u==f){let b=t.mapPos(u,h.startSide,h.mapMode);if(b==null||(d=m=b,h.startSide!=h.endSide&&(m=t.mapPos(u,h.endSide),m<d)))continue}else if(d=t.mapPos(u,h.startSide),m=t.mapPos(f,h.endSide),d>m||d==m&&h.startSide>0&&h.endSide<=0)continue;(m-d||h.endSide-h.startSide)<0||(o<0&&(o=d),h.point&&(a=Math.max(a,m-d)),n.push(h),s.push(d-o),r.push(m-o))}return{mapped:n.length?new Hl(s,r,n,a):null,pos:o}}}class Ee{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new Ee(e,t,n,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:n=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(Gl)),this.isEmpty)return t.length?Ee.of(t):this;let a=new Qf(this,null,-1).goto(0),c=0,h=[],u=new Qi;for(;a.value||c<t.length;)if(c<t.length&&(a.from-t[c].from||a.startSide-t[c].value.startSide)>=0){let f=t[c++];u.addInner(f.from,f.to,f.value)||h.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(a.chunkIndex)<t[c].from)&&(!o||s>this.chunkEnd(a.chunkIndex)||r<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||s>a.to||r<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||h.push(zl.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!h.length?Ee.empty:this.nextLayer.update({add:h,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],s=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],c=this.chunk[o],h=e.touchesRange(a,a+c.length);if(h===!1)s=Math.max(s,c.maxPoint),t.push(c),n.push(e.mapPos(a));else if(h===!0){let{mapped:u,pos:f}=c.map(a,e);u&&(s=Math.max(s,u.maxPoint),t.push(u),n.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new Ee(n,t,r||Ee.empty,s)}between(e,t,n){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return ys.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return ys.from(e).goto(t)}static compare(e,t,n,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),c=Af(o,a,n),h=new ws(o,c,r),u=new ws(a,c,r);n.iterGaps((f,d,m)=>Pf(h,f,u,d,m,s)),n.empty&&n.length==0&&Pf(h,0,u,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=1e9-1);let r=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),o=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let a=Af(r,o),c=new ws(r,a,0).goto(n),h=new ws(o,a,0).goto(n);for(;;){if(c.to!=h.to||!Jl(c.active,h.active)||c.point&&(!h.point||!c.point.eq(h.point)))return!1;if(c.to>s)return!0;c.next(),h.next()}}static spans(e,t,n,s,r=-1){let o=new ws(e,null,r).goto(t),a=t,c=o.openStart;for(;;){let h=Math.min(o.to,n);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<t?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,c);s.point(a,h,o.point,u,f,o.pointRank),c=Math.min(o.openEnd(h),u.length)}else h>a&&(s.span(a,h,o.active,c),c=o.openEnd(h));if(o.to>n)return c+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(e,t=!1){let n=new Qi;for(let s of e instanceof zl?[e]:t?nw(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return Ee.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=Ee.empty;s=s.nextLayer)t=new Ee(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}Ee.empty=new Ee([],[],null,-1);function nw(i){if(i.length>1)for(let e=i[0],t=1;t<i.length;t++){let n=i[t];if(Gl(e,n)>0)return i.slice().sort(Gl);e=n}return i}Ee.empty.nextLayer=Ee.empty;class Qi{finishChunk(e){this.chunks.push(new Hl(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,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Qi)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.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=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.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 n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Ee.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Ee.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Af(i,e,t){let n=new Map;for(let r of i)for(let o=0;o<r.chunk.length;o++)r.chunk[o].maxPoint<=0&&n.set(r.chunk[o],r.chunkPos[o]);let s=new Set;for(let r of e)for(let o=0;o<r.chunk.length;o++){let a=n.get(r.chunk[o]);a!=null&&(t?t.mapPos(a):a)==r.chunkPos[o]&&!(t!=null&&t.touchesRange(a,a+r.chunk[o].length))&&s.add(r.chunk[o])}return s}class Qf{constructor(e,t,n,s=0){this.layer=e,this.skip=t,this.minPoint=n,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,n){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++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||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],n=e+t.from[this.rangeIndex];if(this.from=n,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 ys{constructor(e){this.heap=e}static from(e,t=null,n=-1){let s=[];for(let r=0;r<e.length;r++)for(let o=e[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&s.push(new Qf(o,t,n,r));return s.length==1?s[0]:new ys(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)Kl(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)Kl(this.heap,n);(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(),Kl(this.heap,0)}}}function Kl(i,e){for(let t=i[e];;){let n=(e<<1)+1;if(n>=i.length)break;let s=i[n];if(n+1<i.length&&s.compare(i[n+1])>=0&&(s=i[n+1],n++),t.compare(s)<0)break;i[n]=t,i[e]=s,e=n}}class ws{constructor(e,t,n){this.minPoint=n,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=ys.from(e,t,n)}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){Nr(this.active,e),Nr(this.activeTo,e),Nr(this.activeRank,e),this.minActive=Tf(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:s,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||s-this.activeTo[t])>0;)t++;Rr(this.active,t,n),Rr(this.activeTo,t,s),Rr(this.activeRank,t,r),e&&Rr(e,t,this.cursor.from),this.minActive=Tf(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=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),n&&Nr(n,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=r,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=r.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let s=n.length-1;s>=0&&n[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Pf(i,e,t,n,s,r){i.goto(e),t.goto(n);let o=n+s,a=n,c=n-e;for(;;){let h=i.to+c-t.to,u=h||i.endSide-t.endSide,f=u<0?i.to+c:t.to,d=Math.min(f,o);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&Jl(i.activeForPoint(i.to),t.activeForPoint(t.to))||r.comparePoint(a,d,i.point,t.point):d>a&&!Jl(i.active,t.active)&&r.compareRange(a,d,i.active,t.active),f>o)break;(h||i.openEnd!=t.openEnd)&&r.boundChange&&r.boundChange(f),a=f,u<=0&&i.next(),u>=0&&t.next()}}function Jl(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(i[t]!=e[t]&&!i[t].eq(e[t]))return!1;return!0}function Nr(i,e){for(let t=e,n=i.length-1;t<n;t++)i[t]=i[t+1];i.pop()}function Rr(i,e,t){for(let n=i.length-1;n>=e;n--)i[n+1]=i[n];i[e]=t}function Tf(i,e){let t=-1,n=1e9;for(let s=0;s<e.length;s++)(e[s]-n||i[s].endSide-i[t].endSide)<0&&(t=s,n=e[s]);return t}function Ln(i,e,t=i.length){let n=0;for(let s=0;s<t&&s<i.length;)i.charCodeAt(s)==9?(n+=e-n%e,s++):(n++,s=ut(i,s));return n}function ea(i,e,t,n){for(let s=0,r=0;;){if(r>=e)return s;if(s==i.length)break;r+=i.charCodeAt(s)==9?t-r%t:1,s=ut(i,s)}return n===!0?-1:i.length}const ta="ͼ",Ef=typeof Symbol>"u"?"__"+ta:Symbol.for(ta),ia=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),$f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qi{constructor(e,t){this.rules=[];let{finish:n}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,a,c,h){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return c.push(o[0]+";");for(let m in a){let b=a[m];if(/&/.test(m))r(m.split(/,\s*/).map(w=>o.map(g=>w.replace(/&/,g))).reduce((w,g)=>w.concat(g)),b,c);else if(b&&typeof b=="object"){if(!f)throw new RangeError("The value of a property ("+m+") should be a primitive value.");r(s(m),b,u,d)}else b!=null&&u.push(m.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+b+";")}(u.length||d)&&c.push((n&&!f&&!h?o.map(n):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(`
26
+ `)}static newName(){let e=$f[Ef]||1;return $f[Ef]=e+1,ta+e.toString(36)}static mount(e,t,n){let s=e[ia],r=n&&n.nonce;s?r&&s.setNonce(r):s=new sw(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let Nf=new Map;class sw{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=Nf.get(n);if(r)return e[ia]=r;this.sheet=new s.CSSStyleSheet,Nf.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[ia]=this}mount(e,t){let n=this.sheet,s=0,r=0;for(let o=0;o<e.length;o++){let a=e[o],c=this.modules.indexOf(a);if(c<r&&c>-1&&(this.modules.splice(c,1),r--,c=-1),c==-1){if(this.modules.splice(r++,0,a),n)for(let h=0;h<a.rules.length;h++)n.insertRule(a.rules[h],s++)}else{for(;r<c;)s+=this.modules[r++].rules.length;s+=a.rules.length,r++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let c=0;c<this.modules.length;c++)o+=this.modules[c].getRules()+`
27
+ `;this.styleTag.textContent=o;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Xi={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:"'"},ks={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rw=typeof navigator<"u"&&/Mac/.test(navigator.platform),ow=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),dt=0;dt<10;dt++)Xi[48+dt]=Xi[96+dt]=String(dt);for(var dt=1;dt<=24;dt++)Xi[dt+111]="F"+dt;for(var dt=65;dt<=90;dt++)Xi[dt]=String.fromCharCode(dt+32),ks[dt]=String.fromCharCode(dt);for(var na in Xi)ks.hasOwnProperty(na)||(ks[na]=Xi[na]);function lw(i){var e=rw&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||ow&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?ks:Xi)[i.keyCode]||i.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 xs(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function sa(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function Vr(i,e){if(!e.anchorNode)return!1;try{return sa(i,e.anchorNode)}catch{return!1}}function Mn(i){return i.nodeType==3?mn(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function Ss(i,e,t,n){return t?Rf(i,e,t,n,-1)||Rf(i,e,t,n,1):!1}function pn(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function Lr(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName)}function Rf(i,e,t,n,s){for(;;){if(i==t&&e==n)return!0;if(e==(s<0?0:ui(i))){if(i.nodeName=="DIV")return!1;let r=i.parentNode;if(!r||r.nodeType!=1)return!1;e=pn(i)+(s<0?0:1),i=r}else if(i.nodeType==1){if(i=i.childNodes[e+(s<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=s<0?ui(i):0}else return!1}}function ui(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function Cs(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function aw(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function Vf(i,e){let t=e.width/i.offsetWidth,n=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-i.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function cw(i,e,t,n,s,r,o,a){let c=i.ownerDocument,h=c.defaultView||window;for(let u=i,f=!1;u&&!f;)if(u.nodeType==1){let d,m=u==c.body,b=1,w=1;if(m)d=aw(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:b,scaleY:w}=Vf(u,O)),d={left:O.left,right:O.left+u.clientWidth*b,top:O.top,bottom:O.top+u.clientHeight*w}}let g=0,p=0;if(s=="nearest")e.top<d.top?(p=-(d.top-e.top+o),t>0&&e.bottom>d.bottom+p&&(p=e.bottom-d.bottom+p+o)):e.bottom>d.bottom&&(p=e.bottom-d.bottom+o,t<0&&e.top-p<d.top&&(p=-(d.top+p-e.top+o)));else{let O=e.bottom-e.top,C=d.bottom-d.top;p=(s=="center"&&O<=C?e.top+O/2-C/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-C+o)-d.top}if(n=="nearest"?e.left<d.left?(g=-(d.left-e.left+r),t>0&&e.right>d.right+g&&(g=e.right-d.right+g+r)):e.right>d.right&&(g=e.right-d.right+r,t<0&&e.left<d.left+g&&(g=-(d.left+g-e.left+r))):g=(n=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:n=="start"==a?e.left-r:e.right-(d.right-d.left)+r)-d.left,g||p)if(m)h.scrollBy(g,p);else{let O=0,C=0;if(p){let y=u.scrollTop;u.scrollTop+=p/w,C=(u.scrollTop-y)*w}if(g){let y=u.scrollLeft;u.scrollLeft+=g/b,O=(u.scrollLeft-y)*b}e={left:e.left-O,top:e.top-C,right:e.right-O,bottom:e.bottom-C},O&&Math.abs(O-g)<1&&(n="nearest"),C&&Math.abs(C-p)<1&&(s="nearest")}if(m)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function hw(i){let e=i.ownerDocument,t,n;for(let s=i.parentNode;s&&!(s==e.body||t&&n);)if(s.nodeType==1)!n&&s.scrollHeight>s.clientHeight&&(n=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:n}}class uw{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:n}=e;this.set(t,Math.min(e.anchorOffset,t?ui(t):0),n,Math.min(e.focusOffset,n?ui(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let Bn=null;function Lf(i){if(i.setActive)return i.setActive();if(Bn)return i.focus(Bn);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(Bn==null?{get preventScroll(){return Bn={preventScroll:!0},!0}}:void 0),!Bn){Bn=!1;for(let t=0;t<e.length;){let n=e[t++],s=e[t++],r=e[t++];n.scrollTop!=s&&(n.scrollTop=s),n.scrollLeft!=r&&(n.scrollLeft=r)}}}let Mf;function mn(i,e,t=e){let n=Mf||(Mf=document.createRange());return n.setEnd(i,t),n.setStart(i,e),n}function Dn(i,e,t,n){let s={key:e,code:e,keyCode:t,which:t,cancelable:!0};n&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=n);let r=new KeyboardEvent("keydown",s);r.synthetic=!0,i.dispatchEvent(r);let o=new KeyboardEvent("keyup",s);return o.synthetic=!0,i.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function fw(i){for(;i;){if(i&&(i.nodeType==9||i.nodeType==11&&i.host))return i;i=i.assignedSlot||i.parentNode}return null}function Bf(i){for(;i.attributes.length;)i.removeAttributeNode(i.attributes[0])}function dw(i,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,ui(t));;)if(n){if(t.nodeType!=1)return!1;let s=t.childNodes[n-1];s.contentEditable=="false"?n--:(t=s,n=ui(t))}else{if(t==i)return!0;n=pn(t),t=t.parentNode}}function Df(i){return i.scrollTop>Math.max(1,i.scrollHeight-i.clientHeight-4)}function vf(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=ui(t)}else if(t.parentNode&&!Lr(t))n=pn(t),t=t.parentNode;else return null}}function Zf(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n<t.nodeValue.length)return{node:t,offset:n};if(t.nodeType==1&&n<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[n],n=0}else if(t.parentNode&&!Lr(t))n=pn(t)+1,t=t.parentNode;else return null}}class Ot{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new Ot(e.parentNode,pn(e),t)}static after(e,t){return new Ot(e.parentNode,pn(e)+1,t)}}const ra=[];class Be{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 n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,s=null,r;for(let o of this.children){if(o.flags&7){if(!o.dom&&(r=s?s.nextSibling:n.firstChild)){let a=Be.get(r);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(r)}o.sync(e,t),o.flags&=-8}if(r=s?s.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&r!=o.dom&&(t.written=!0),o.dom.parentNode==n)for(;r&&r!=o.dom;)r=If(r);else n.insertBefore(o.dom,r);s=o.dom}for(r=s?s.nextSibling:n.firstChild,r&&t&&t.node==n&&(t.written=!0);r;)r=If(r)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let s=ui(e)==0?0:t==0?-1:1;for(;;){let r=e.parentNode;if(r==this.dom)break;s==0&&r.firstChild!=r.lastChild&&(e==r.firstChild?s=-1:s=1),e=r}s<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Be.get(n);)n=n.nextSibling;if(!n)return this.length;for(let s=0,r=0;;s++){let o=this.children[s];if(o.dom==n)return r;r+=o.length+o.breakAfter}}domBoundsAround(e,t,n=0){let s=-1,r=-1,o=-1,a=-1;for(let c=0,h=n,u=n;c<this.children.length;c++){let f=this.children[c],d=h+f.length;if(h<e&&d>t)return f.domBoundsAround(e,t,h);if(d>=e&&s==-1&&(s=c,r=h),h>t&&f.dom.parentNode==this.dom){o=c,a=u;break}u=d,h=d+f.breakAfter}return{from:r,to:a<0?n+this.length:a,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].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,n=ra){this.markDirty();for(let s=e;s<t;s++){let r=this.children[s];r.parent==this&&n.indexOf(r)<0&&r.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let s=0;s<n.length;s++)n[s].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Uf(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,n,s,r,o){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}}Be.prototype.breakAfter=0;function If(i){let e=i.nextSibling;return i.parentNode.removeChild(i),e}class Uf{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,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 n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Ff(i,e,t,n,s,r,o,a,c){let{children:h}=i,u=h.length?h[e]:null,f=r.length?r[r.length-1]:null,d=f?f.breakAfter:o;if(!(e==n&&u&&!o&&!d&&r.length<2&&u.merge(t,s,r.length?f:null,t==0,a,c))){if(n<h.length){let m=h[n];m&&(s<m.length||m.breakAfter&&(f!=null&&f.breakAfter))?(e==n&&(m=m.split(s),s=0),!d&&f&&m.merge(0,s,f,!0,0,c)?r[r.length-1]=m:((s||m.children.length&&!m.children[0].length)&&m.merge(0,s,null,!1,0,c),r.push(m))):m!=null&&m.breakAfter&&(f?f.breakAfter=1:o=1),n++}for(u&&(u.breakAfter=o,t>0&&(!o&&r.length&&u.merge(t,u.length,r[0],!1,a,0)?u.breakAfter=r.shift().breakAfter:(t<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(t,u.length,null,!1,a,0),e++));e<n&&r.length;)if(h[n-1].become(r[r.length-1]))n--,r.pop(),c=r.length?0:a;else if(h[e].become(r[0]))e++,r.shift(),a=r.length?0:c;else break;!r.length&&e&&n<h.length&&!h[e-1].breakAfter&&h[n].merge(0,0,h[e-1],!1,a,c)&&e--,(e<n||r.length)&&i.replaceChildren(e,n,r)}}function jf(i,e,t,n,s,r){let o=i.childCursor(),{i:a,off:c}=o.findPos(t,1),{i:h,off:u}=o.findPos(e,-1),f=e-t;for(let d of n)f+=d.length;i.length+=f,Ff(i,h,u,a,c,n,0,s,r)}let At=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},oa=typeof document<"u"?document:{documentElement:{style:{}}};const la=/Edge\/(\d+)/.exec(At.userAgent),qf=/MSIE \d/.test(At.userAgent),aa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(At.userAgent),Mr=!!(qf||aa||la),Xf=!Mr&&/gecko\/(\d+)/i.test(At.userAgent),ca=!Mr&&/Chrome\/(\d+)/.exec(At.userAgent),Wf="webkitFontSmoothing"in oa.documentElement.style,Yf=!Mr&&/Apple Computer/.test(At.vendor),zf=Yf&&(/Mobile\/\w+/.test(At.userAgent)||At.maxTouchPoints>2);var oe={mac:zf||/Mac/.test(At.platform),windows:/Win/.test(At.platform),linux:/Linux|X11/.test(At.platform),ie:Mr,ie_version:qf?oa.documentMode||6:aa?+aa[1]:la?+la[1]:0,gecko:Xf,gecko_version:Xf?+(/Firefox\/(\d+)/.exec(At.userAgent)||[0,0])[1]:0,chrome:!!ca,chrome_version:ca?+ca[1]:0,ios:zf,android:/Android\b/.test(At.userAgent),webkit:Wf,safari:Yf,webkit_version:Wf?+(/\bAppleWebKit\/(\d+)/.exec(At.userAgent)||[0,0])[1]:0,tabSize:oa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const pw=256;class Ht extends Be{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,n){return this.flags&8||n&&(!(n instanceof Ht)||this.length-(t-e)+n.length>pw||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Ht(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 Ot(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return mw(this.dom,e,t)}}class Pi extends Be{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let s of t)s.setParent(this)}setAttrs(e){if(Bf(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,n,s,r,o){return n&&(!(n instanceof Pi&&n.mark.eq(this.mark))||e&&r<=0||t<this.length&&o<=0)?!1:(jf(this,e,t,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,s=-1,r=0;for(let a of this.children){let c=n+a.length;c>e&&t.push(n<e?a.split(e-n):a),s<0&&n>=e&&(s=r),n=c,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Pi(this.mark,t,o)}domAtPos(e){return Gf(this,e)}coordsAt(e,t){return Kf(this,e,t)}}function mw(i,e,t){let n=i.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;e==0&&t<0||e==n&&t>=0?oe.chrome||oe.gecko||(e?(s--,o=1):r<n&&(r++,o=-1)):t<0?s--:r<n&&r++;let a=mn(i,s,r).getClientRects();if(!a.length)return null;let c=a[(o?o<0:t>=0)?0:a.length-1];return oe.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(a,h=>h.width)||c),o?Cs(c,o<0):c||null}class Wi extends Be{static create(e,t,n){return new Wi(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Wi.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,n,s,r,o){return n&&(!(n instanceof Wi)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Wi&&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 Ae.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,s=this.posAtStart;return n?n.slice(s,s+this.length):Ae.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Ot.before(this.dom):Ot.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?s.length-1:0;r=s[a],!(e>0?a==0:a==s.length-1||r.top<r.bottom);a+=o?-1:1);return Cs(r,!o)}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 vn extends Be{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof vn&&e.side==this.side}split(){return new vn(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?Ot.before(this.dom):Ot.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ae.empty}get isHidden(){return!0}}Ht.prototype.children=Wi.prototype.children=vn.prototype.children=ra;function Gf(i,e){let t=i.dom,{children:n}=i,s=0;for(let r=0;s<n.length;s++){let o=n[s],a=r+o.length;if(!(a==r&&o.getSide()<=0)){if(e>r&&e<a&&o.dom.parentNode==t)return o.domAtPos(e-r);if(e<=r)break;r=a}}for(let r=s;r>0;r--){let o=n[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r<n.length;r++){let o=n[r];if(o.dom.parentNode==t)return o.domAtPos(0)}return new Ot(t,0)}function Hf(i,e,t){let n,{children:s}=i;t>0&&e instanceof Pi&&s.length&&(n=s[s.length-1])instanceof Pi&&n.mark.eq(e.mark)?Hf(n,e.children[0],t-1):(s.push(e),e.setParent(i)),i.length+=e.length}function Kf(i,e,t){let n=null,s=-1,r=null,o=-1;function a(h,u){for(let f=0,d=0;f<h.children.length&&d<=u;f++){let m=h.children[f],b=d+m.length;b>=u&&(m.children.length?a(m,u-d):(!r||r.isHidden&&t>0)&&(b>u||d==b&&m.getSide()>0)?(r=m,o=u-d):(d<u||d==b&&m.getSide()<0&&!m.isHidden)&&(n=m,s=u-d)),d=b}}a(i,e);let c=(t<0?n:r)||n||r;return c?c.coordsAt(Math.max(0,c==n?s:o),t):gw(i)}function gw(i){let e=i.dom.lastChild;if(!e)return i.dom.getBoundingClientRect();let t=Mn(e);return t[t.length-1]||null}function ha(i,e){for(let t in i)t=="class"&&e.class?e.class+=" "+i.class:t=="style"&&e.style?e.style+=";"+i.style:e[t]=i[t];return e}const Jf=Object.create(null);function Br(i,e,t){if(i==e)return!0;i||(i=Jf),e||(e=Jf);let n=Object.keys(i),s=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of n)if(r!=t&&(s.indexOf(r)==-1||i[r]!==e[r]))return!1;return!0}function ua(i,e,t){let n=!1;if(e)for(let s in e)t&&s in t||(n=!0,s=="style"?i.style.cssText="":i.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(n=!0,s=="style"?i.style.cssText=t[s]:i.setAttribute(s,t[s]));return n}function Ow(i){let e=Object.create(null);for(let t=0;t<i.attributes.length;t++){let n=i.attributes[t];e[n.name]=n.value}return e}class fi{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,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var wt=function(i){return i[i.Text=0]="Text",i[i.WidgetBefore=1]="WidgetBefore",i[i.WidgetAfter=2]="WidgetAfter",i[i.WidgetRange=3]="WidgetRange",i}(wt||(wt={}));class de extends dn{constructor(e,t,n,s){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=s}get heightRelevant(){return!1}static mark(e){return new As(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Yi(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:r,end:o}=ed(e,t);n=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Yi(e,n,s,t,e.widget||null,!0)}static line(e){return new Qs(e)}static set(e,t=!1){return Ee.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}de.none=Ee.empty;class As extends de{constructor(e){let{start:t,end:n}=ed(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof As&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&Br(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)}}As.prototype.point=!1;class Qs extends de{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Qs&&this.spec.class==e.spec.class&&Br(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)}}Qs.prototype.mapMode=ft.TrackBefore,Qs.prototype.point=!0;class Yi extends de{constructor(e,t,n,s,r,o){super(t,n,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?ft.TrackBefore:ft.TrackAfter:ft.TrackDel}get type(){return this.startSide!=this.endSide?wt.WidgetRange:this.startSide<=0?wt.WidgetBefore:wt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Yi&&_w(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)}}Yi.prototype.point=!0;function ed(i,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=i;return t==null&&(t=i.inclusive),n==null&&(n=i.inclusive),{start:t??e,end:n??e}}function _w(i,e){return i==e||!!(i&&e&&i.compare(e))}function Dr(i,e,t,n=0){let s=t.length-1;s>=0&&t[s]+n>=i?t[s]=Math.max(t[s],e):t.push(i,e)}class Je extends Be{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,s,r,o){if(n){if(!(n instanceof Je))return!1;this.dom||n.transferDOM(this)}return s&&this.setDeco(n?n.attrs:null),jf(this,e,t,n?n.children.slice():[],r,o),!0}split(e){let t=new Je;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:s}=this.childPos(e);s&&(t.append(this.children[n].split(s),0),this.children[n].merge(s,this.children[n].length,null,!1,0,0),n++);for(let r=n;r<this.children.length;r++)t.append(this.children[r],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,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){Br(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Hf(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=ha(t,this.attrs||{})),n&&(this.attrs=ha({class:n},this.attrs||{}))}domAtPos(e){return Gf(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(Bf(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&&(ua(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&&Be.get(s)instanceof Pi;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((n=Be.get(s))===null||n===void 0?void 0:n.isEditable)==!1&&(!oe.ios||!this.children.some(r=>r instanceof Ht))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Ht)||/[^ -~]/.test(n.text))return null;let s=Mn(n.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 n=Kf(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=n.bottom-n.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight<r){let o=(r-s.textHeight)/2;return{top:n.top+o,bottom:n.bottom-o,left:n.left,right:n.left}}}return n}become(e){return e instanceof Je&&this.children.length==0&&e.children.length==0&&Br(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,s=0;n<e.children.length;n++){let r=e.children[n],o=s+r.length;if(o>=t){if(r instanceof Je)return r;if(o>t)break}s=o+r.breakAfter}return null}}class Ti extends Be{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,s,r,o){return n&&(!(n instanceof Ti)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?Ot.before(this.dom):Ot.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new Ti(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return ra}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):Ae.empty}domBoundsAround(){return null}become(e){return e instanceof Ti&&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 n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof fa?null:Cs(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:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class fa extends fi{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 Ps{constructor(e,t,n,s){this.doc=e,this.pos=t,this.end=n,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 Ti&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Je),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(vr(new vn(-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 Ti)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){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=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(vr(new Ht(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}span(e,t,n,s){this.buildText(t-e,n,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,n,s,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof Yi){if(n.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 a=t-e;if(n instanceof Yi)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ti(n.widget||Zn.block,a,n));else{let c=Wi.create(n.widget||Zn.inline,a,a?0:n.startSide),h=this.atCursorPos&&!c.isEditable&&r<=s.length&&(e<t||n.startSide>0),u=!c.isEditable&&(e<t||r>s.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(vr(new vn(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(vr(c,s),r),this.atCursorPos=u,this.pendingBuffer=u?e<t||r>s.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,n,s,r){let o=new Ps(e,t,n,r);return o.openEnd=Ee.spans(s,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function vr(i,e){for(let t of e)i=new Pi(t,[i],i.length);return i}class Zn extends fi{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}}Zn.inline=new Zn("span"),Zn.block=new Zn("div");var Ze=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(Ze||(Ze={}));const gn=Ze.LTR,da=Ze.RTL;function td(i){let e=[];for(let t=0;t<i.length;t++)e.push(1<<+i[t]);return e}const bw=td("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),yw=td("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),pa=Object.create(null),di=[];for(let i of["()","[]","{}"]){let e=i.charCodeAt(0),t=i.charCodeAt(1);pa[e]=t,pa[t]=-e}function id(i){return i<=247?bw[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?yw[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8204?256:64336<=i&&i<=65023?4:1}const ww=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class zi{get dir(){return this.level%2?da:gn}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,s){let r=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(r<0||(s!=0?s<0?a.from<t:a.to>t:e[r].level>a.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function nd(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++){let n=i[t],s=e[t];if(n.from!=s.from||n.to!=s.to||n.direction!=s.direction||!nd(n.inner,s.inner))return!1}return!0}const De=[];function kw(i,e,t,n,s){for(let r=0;r<=n.length;r++){let o=r?n[r-1].to:e,a=r<n.length?n[r].from:t,c=r?256:s;for(let h=o,u=c,f=c;h<a;h++){let d=id(i.charCodeAt(h));d==512?d=u:d==8&&f==4&&(d=16),De[h]=d==4?2:d,d&7&&(f=d),u=d}for(let h=o,u=c,f=c;h<a;h++){let d=De[h];if(d==128)h<a-1&&u==De[h+1]&&u&24?d=De[h]=u:De[h]=256;else if(d==64){let m=h+1;for(;m<a&&De[m]==64;)m++;let b=h&&u==8||m<t&&De[m]==8?f==1?1:8:256;for(let w=h;w<m;w++)De[w]=b;h=m-1}else d==8&&f==1&&(De[h]=1);u=d,d&7&&(f=d)}}}function xw(i,e,t,n,s){let r=s==1?2:1;for(let o=0,a=0,c=0;o<=n.length;o++){let h=o?n[o-1].to:e,u=o<n.length?n[o].from:t;for(let f=h,d,m,b;f<u;f++)if(m=pa[d=i.charCodeAt(f)])if(m<0){for(let w=a-3;w>=0;w-=3)if(di[w+1]==-m){let g=di[w+2],p=g&2?s:g&4?g&1?r:s:0;p&&(De[f]=De[di[w]]=p),a=w;break}}else{if(di.length==189)break;di[a++]=f,di[a++]=d,di[a++]=c}else if((b=De[f])==2||b==1){let w=b==s;c=w?0:1;for(let g=a-3;g>=0;g-=3){let p=di[g+2];if(p&2)break;if(w)di[g+2]|=2;else{if(p&4)break;di[g+2]|=4}}}}}function Sw(i,e,t,n){for(let s=0,r=n;s<=t.length;s++){let o=s?t[s-1].to:i,a=s<t.length?t[s].from:e;for(let c=o;c<a;){let h=De[c];if(h==256){let u=c+1;for(;;)if(u==a){if(s==t.length)break;u=t[s++].to,a=s<t.length?t[s].from:e}else if(De[u]==256)u++;else break;let f=r==1,d=(u<e?De[u]:n)==1,m=f==d?f?1:2:n;for(let b=u,w=s,g=w?t[w-1].to:i;b>c;)b==g&&(b=t[--w].from,g=w?t[w-1].to:i),De[--b]=m;c=u}else r=h,c++}}}function ma(i,e,t,n,s,r,o){let a=n%2?2:1;if(n%2==s%2)for(let c=e,h=0;c<t;){let u=!0,f=!1;if(h==r.length||c<r[h].from){let w=De[c];w!=a&&(u=!1,f=w==16)}let d=!u&&a==1?[]:null,m=u?n:n+1,b=c;e:for(;;)if(h<r.length&&b==r[h].from){if(f)break e;let w=r[h];if(!u)for(let g=w.to,p=h+1;;){if(g==t)break e;if(p<r.length&&r[p].from==g)g=r[p++].to;else{if(De[g]==a)break e;break}}if(h++,d)d.push(w);else{w.from>c&&o.push(new zi(c,w.from,m));let g=w.direction==gn!=!(m%2);ga(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.to}b=w.to}else{if(b==t||(u?De[b]!=a:De[b]==a))break;b++}d?ma(i,c,b,n+1,s,d,o):c<b&&o.push(new zi(c,b,m)),c=b}else for(let c=t,h=r.length;c>e;){let u=!0,f=!1;if(!h||c>r[h-1].to){let w=De[c-1];w!=a&&(u=!1,f=w==16)}let d=!u&&a==1?[]:null,m=u?n:n+1,b=c;e:for(;;)if(h&&b==r[h-1].to){if(f)break e;let w=r[--h];if(!u)for(let g=w.from,p=h;;){if(g==e)break e;if(p&&r[p-1].to==g)g=r[--p].from;else{if(De[g-1]==a)break e;break}}if(d)d.push(w);else{w.to<c&&o.push(new zi(w.to,c,m));let g=w.direction==gn!=!(m%2);ga(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.from}b=w.from}else{if(b==e||(u?De[b-1]!=a:De[b-1]==a))break;b--}d?ma(i,b,c,n+1,s,d,o):b<c&&o.push(new zi(b,c,m)),c=b}}function ga(i,e,t,n,s,r,o){let a=e%2?2:1;kw(i,s,r,n,a),xw(i,s,r,n,a),Sw(s,r,n,a),ma(i,s,r,e,t,n,o)}function Cw(i,e,t){if(!i)return[new zi(0,0,e==da?1:0)];if(e==gn&&!t.length&&!ww.test(i))return sd(i.length);if(t.length)for(;i.length>De.length;)De[De.length]=256;let n=[],s=e==gn?0:1;return ga(i,s,s,t,0,i.length,n),n}function sd(i){return[new zi(0,i,0)]}let rd="";function Aw(i,e,t,n,s){var r;let o=n.head-i.from,a=zi.find(e,o,(r=n.bidiLevel)!==null&&r!==void 0?r:-1,n.assoc),c=e[a],h=c.side(s,t);if(o==h){let d=a+=s?1:-1;if(d<0||d>=e.length)return null;c=e[a=d],o=c.side(!s,t),h=c.side(s,t)}let u=ut(i.text,o,c.forward(s,t));(u<c.from||u>c.to)&&(u=h),rd=i.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return f&&u==h&&f.level+(s?0:1)<c.level?j.cursor(f.side(!s,t)+i.from,f.forward(s,t)?1:-1,f.level):j.cursor(u+i.from,c.forward(s,t)?-1:1,c.level)}function Qw(i,e,t){for(let n=e;n<t;n++){let s=id(i.charCodeAt(n));if(s==1)return gn;if(s==2||s==4)return da}return gn}const od=ce.define(),ld=ce.define(),ad=ce.define(),cd=ce.define(),Oa=ce.define(),hd=ce.define(),ud=ce.define(),_a=ce.define(),ba=ce.define(),fd=ce.define({combine:i=>i.some(e=>e)}),dd=ce.define({combine:i=>i.some(e=>e)}),pd=ce.define();class In{constructor(e,t="nearest",n="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new In(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 In(j.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Zr=we.define({map:(i,e)=>i.map(e)}),md=we.define();function Qt(i,e,t){let n=i.facet(cd);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Ei=ce.define({combine:i=>i.length?i[0]:!0});let Pw=0;const Ts=ce.define();class Ge{constructor(e,t,n,s,r){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:n,eventObservers:s,provide:r,decorations:o}=t||{};return new Ge(Pw++,e,n,s,a=>{let c=[Ts.of(a)];return o&&c.push(Es.of(h=>{let u=h.plugin(a);return u?o(u):de.none})),r&&c.push(r(a)),c})}static fromClass(e,t){return Ge.define(n=>new e(n),t)}}class ya{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(n){if(Qt(t.state,n,"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){Qt(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(n){Qt(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const gd=ce.define(),wa=ce.define(),Es=ce.define(),Od=ce.define(),ka=ce.define(),_d=ce.define();function bd(i,e){let t=i.state.facet(_d);if(!t.length)return t;let n=t.map(r=>r instanceof Function?r(i):r),s=[];return Ee.spans(n,e.from,e.to,{point(){},span(r,o,a,c){let h=r-e.from,u=o-e.from,f=s;for(let d=a.length-1;d>=0;d--,c--){let m=a[d].spec.bidiIsolate,b;if(m==null&&(m=Qw(e.text,h,u)),c>0&&f.length&&(b=f[f.length-1]).to==h&&b.direction==m)b.to=u,f=b.inner;else{let w={from:h,to:u,direction:m,inner:[]};f.push(w),f=w.inner}}}}),s}const yd=ce.define();function xa(i){let e=0,t=0,n=0,s=0;for(let r of i.state.facet(yd)){let o=r(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:n,bottom:s}}const $s=ce.define();class It{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new It(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,n=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>n.toA)){if(s.toA<n.fromA)break;n=n.join(s),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let s=0,r=0,o=0,a=0;;s++){let c=s==e.length?null:e[s],h=o-a,u=c?c.fromB:1e9;for(;r<t.length&&t[r]<u;){let f=t[r],d=t[r+1],m=Math.max(a,f),b=Math.min(u,d);if(m<=b&&new It(m+h,b+h,m,b).addToSet(n),d>u)break;r+=2}if(!c)return n;new It(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),o=c.toA,a=c.toB}}}class Ir{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=it.empty(this.startState.doc.length);for(let r of n)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,a,c)=>s.push(new It(r,o,a,c))),this.changedRanges=s}static create(e,t,n){return new Ir(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>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 wd extends Be{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=de.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 Je],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new It(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:h,toA:u})=>u<this.minWidthFrom||h>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:!Lw(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?Ew(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:u}=this.hasComposition;n=new It(h,u,e.changes.mapPos(h,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(oe.ie||oe.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),c=Rw(o,a,e.changes);return n=It.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);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 o=oe.chrome||oe.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof Ti&&o.widget instanceof fa&&r.push(o.dom);s.updateGaps(r)}updateChildren(e,t,n){let s=n?n.range.addToSet(e.slice()):e,r=this.childCursor(t);for(let o=s.length-1;;o--){let a=o>=0?s[o]:null;if(!a)break;let{fromA:c,toA:h,fromB:u,toB:f}=a,d,m,b,w;if(n&&n.range.fromB<f&&n.range.toB>u){let y=Ps.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),E=Ps.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);m=y.breakAtStart,b=y.openStart,w=E.openEnd;let x=this.compositionView(n);E.breakAtStart?x.breakAfter=1:E.content.length&&x.merge(x.length,x.length,E.content[0],!1,E.openStart,0)&&(x.breakAfter=E.content[0].breakAfter,E.content.shift()),y.content.length&&x.merge(0,0,y.content[y.content.length-1],!0,0,y.openEnd)&&y.content.pop(),d=y.content.concat(x).concat(E.content)}else({content:d,breakAtStart:m,openStart:b,openEnd:w}=Ps.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:p}=r.findPos(h,1),{i:O,off:C}=r.findPos(c,-1);Ff(this,O,C,g,p,d,m,b,w)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(md)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new Ht(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Pi(s,[t],t.length);let n=new Je;return n.append(t,0),n}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(o);let a=Be.get(r);a&&a!=o&&(a.dom=null),o.setDOM(r)},n=this.childPos(e.range.fromB,1),s=this.children[n.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)n=s.childPos(n.off,1),s=s.children[n.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,s=n==this.dom,r=!s&&!(this.view.state.facet(Ei)||this.dom.tabIndex>-1)&&Vr(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),h=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(oe.gecko&&a.empty&&!this.hasComposition&&Tw(c)){let f=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(f,c.node.childNodes[c.offset]||null)),c=h=new Ot(f,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!Ss(c.node,c.offset,u.anchorNode,u.anchorOffset)||!Ss(h.node,h.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{oe.android&&oe.chrome&&this.dom.contains(u.focusNode)&&Vw(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=xs(this.view.root);if(f)if(a.empty){if(oe.gecko){let d=$w(c.node,c.offset);if(d&&d!=3){let m=(d==1?vf:Zf)(c.node,c.offset);m&&(c=new Ot(m.node,m.offset))}}f.collapse(c.node,c.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(c.node,c.offset);try{f.extend(h.node,h.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([c,h]=[h,c]),d.setEnd(h.node,h.offset),d.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(d)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,h)),this.impreciseAnchor=c.precise?null:new Ot(u.anchorNode,u.anchorOffset),this.impreciseHead=h.precise?null:new Ot(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ss(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,n=xs(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=Je.find(this,t.head);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let c=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!c||!h||c.bottom>h.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.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&&n.collapse(s,r)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let s=e.offset;!n&&s<t.childNodes.length;s++){let r=Be.get(t.childNodes[s]);r instanceof Je&&(n=r.domAtPos(0))}for(let s=e.offset-1;!n&&s>=0;s--){let r=Be.get(t.childNodes[s]);r instanceof Je&&(n=r.domAtPos(r.length))}return n?new Ot(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Be.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let s=this.children[t];if(n<s.length||s instanceof Je)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,s=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],c=r-a.breakAfter,h=c-a.length;if(c<e)break;if(h<=e&&(h<e||a.covers(-1))&&(c>e||a.covers(1))&&(!n||a instanceof Je&&!(n instanceof Je&&t>=0)))n=a,s=h;else if(n&&h==e&&c==e&&a instanceof Ti&&Math.abs(t)<2){if(a.deco.startSide<0)break;o&&(n=null)}r=h}return n?n.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),s=this.children[t];if(!(s instanceof Je))return null;for(;s.children.length;){let{i:a,off:c}=s.childPos(n,1);for(;;a++){if(a==s.children.length)return null;if((s=s.children[a]).length)break}n=c}if(!(s instanceof Ht))return null;let r=ut(s.text,n);if(r==n)return null;let o=mn(s.dom,n,r).getClientRects();for(let a=0;a<o.length;a++){let c=o[a];if(a==o.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==Ze.LTR;for(let h=0,u=0;u<this.children.length;u++){let f=this.children[u],d=h+f.length;if(d>s)break;if(h>=n){let m=f.dom.getBoundingClientRect();if(t.push(m.height),o){let b=f.dom.lastChild,w=b?Mn(b):[];if(w.length){let g=w[w.length-1],p=c?g.right-m.left:m.right-g.left;p>a&&(a=p,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=d)}}}h=d+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Ze.RTL:Ze.LTR}measureTextSize(){for(let r of this.children)if(r instanceof Je){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,n,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 r=Mn(e.firstChild)[0];t=e.getBoundingClientRect().height,n=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Uf(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>n){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(de.replace({widget:new fa(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return de.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Es).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),n=!1,s=this.view.state.facet(Od).map((r,o)=>{let a=typeof r=="function";return a&&(n=!0),a?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(Ee.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 h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(pd))try{if(h(this.view,e.range,e))return!0}catch(u){Qt(this.view.state,u,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let r=xa(this.view),o={left:n.left-r.left,top:n.top-r.top,right:n.right+r.right,bottom:n.bottom+r.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;cw(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Ze.LTR)}}function Tw(i){return i.node.nodeType==1&&i.node.firstChild&&(i.offset==0||i.node.childNodes[i.offset-1].contentEditable=="false")&&(i.offset==i.node.childNodes.length||i.node.childNodes[i.offset].contentEditable=="false")}function kd(i,e){let t=i.observer.selectionRange;if(!t.focusNode)return null;let n=vf(t.focusNode,t.focusOffset),s=Zf(t.focusNode,t.focusOffset),r=n||s;if(s&&n&&s.node!=n.node){let a=Be.get(s.node);if(!a||a instanceof Ht&&a.text!=s.node.nodeValue)r=s;else if(i.docView.lastCompositionAfterCursor){let c=Be.get(n.node);!c||c instanceof Ht&&c.text!=n.node.nodeValue||(r=s)}}if(i.docView.lastCompositionAfterCursor=r!=n,!r)return null;let o=e-r.offset;return{from:o,to:o+r.node.nodeValue.length,node:r.node}}function Ew(i,e,t){let n=kd(i,t);if(!n)return null;let{node:s,from:r,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a)||i.state.doc.sliceString(n.from,n.to)!=a)return null;let c=e.invertedDesc,h=new It(c.mapPos(r),c.mapPos(o),r,o),u=[];for(let f=s.parentNode;;f=f.parentNode){let d=Be.get(f);if(d instanceof Pi)u.push({node:f,deco:d.mark});else{if(d instanceof Je||f.nodeName=="DIV"&&f.parentNode==i.contentDOM)return{range:h,text:s,marks:u,line:f};if(f!=i.contentDOM)u.push({node:f,deco:new As({inclusive:!0,attributes:Ow(f),tagName:f.tagName.toLowerCase()})});else return null}}}function $w(i,e){return i.nodeType!=1?0:(e&&i.childNodes[e-1].contentEditable=="false"?1:0)|(e<i.childNodes.length&&i.childNodes[e].contentEditable=="false"?2:0)}let Nw=class{constructor(){this.changes=[]}compareRange(e,t){Dr(e,t,this.changes)}comparePoint(e,t){Dr(e,t,this.changes)}boundChange(e){Dr(e,e,this.changes)}};function Rw(i,e,t){let n=new Nw;return Ee.compare(i,e,t,n),n.changes}function Vw(i,e){for(let t=i;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function Lw(i,e){let t=!1;return e&&i.iterChangedRanges((n,s)=>{n<e.to&&s>e.from&&(t=!0)}),t}function Mw(i,e,t=1){let n=i.charCategorizer(e),s=i.doc.lineAt(e),r=e-s.from;if(s.length==0)return j.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,a=r;t<0?o=ut(s.text,r,!1):a=ut(s.text,r);let c=n(s.text.slice(o,a));for(;o>0;){let h=ut(s.text,o,!1);if(n(s.text.slice(h,o))!=c)break;o=h}for(;a<s.length;){let h=ut(s.text,a);if(n(s.text.slice(a,h))!=c)break;a=h}return j.range(o+s.from,a+s.from)}function Bw(i,e){return e.left>i?e.left-i:Math.max(0,i-e.right)}function Dw(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function Sa(i,e){return i.top<e.bottom-1&&i.bottom>e.top+1}function xd(i,e){return e<i.top?{top:e,left:i.left,right:i.right,bottom:i.bottom}:i}function Sd(i,e){return e>i.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function Ca(i,e,t){let n,s,r,o,a=!1,c,h,u,f;for(let b=i.firstChild;b;b=b.nextSibling){let w=Mn(b);for(let g=0;g<w.length;g++){let p=w[g];s&&Sa(s,p)&&(p=xd(Sd(p,s.bottom),s.top));let O=Bw(e,p),C=Dw(t,p);if(O==0&&C==0)return b.nodeType==3?Cd(b,e,t):Ca(b,e,t);if(!n||o>C||o==C&&r>O){n=b,s=p,r=O,o=C;let y=C?t<p.top?-1:1:O?e<p.left?-1:1:0;a=!y||(y>0?g<w.length-1:g>0)}O==0?t>p.bottom&&(!u||u.bottom<p.bottom)?(c=b,u=p):t<p.top&&(!f||f.top>p.top)&&(h=b,f=p):u&&Sa(u,p)?u=Sd(u,p.bottom):f&&Sa(f,p)&&(f=xd(f,p.top))}}if(u&&u.bottom>=t?(n=c,s=u):f&&f.top<=t&&(n=h,s=f),!n)return{node:i,offset:0};let d=Math.max(s.left,Math.min(s.right,e));if(n.nodeType==3)return Cd(n,d,t);if(a&&n.contentEditable!="false")return Ca(n,d,t);let m=Array.prototype.indexOf.call(i.childNodes,n)+(e>=(s.left+s.right)/2?1:0);return{node:i,offset:m}}function Cd(i,e,t){let n=i.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;a<n;a++){let c=mn(i,a,a+1).getClientRects();for(let h=0;h<c.length;h++){let u=c[h];if(u.top==u.bottom)continue;o||(o=e-u.left);let f=(u.top>t?u.top-t:t-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f<r){let d=e>=(u.left+u.right)/2,m=d;if((oe.chrome||oe.gecko)&&mn(i,a).getBoundingClientRect().left==u.right&&(m=!d),f<=0)return{node:i,offset:a+(m?1:0)};s=a+(m?1:0),r=f}}}return{node:i,offset:s>-1?s:o>0?i.nodeValue.length:0}}function Ad(i,e,t,n=-1){var s,r;let o=i.contentDOM.getBoundingClientRect(),a=o.top+i.viewState.paddingTop,c,{docHeight:h}=i.viewState,{x:u,y:f}=e,d=f-a;if(d<0)return 0;if(d>h)return i.state.doc.length;for(let y=i.viewState.heightOracle.textHeight/2,E=!1;c=i.elementAtHeight(d),c.type!=wt.Text;)for(;d=n>0?c.bottom+y:c.top-y,!(d>=0&&d<=h);){if(E)return t?null:0;E=!0,n=-n}f=a+d;let m=c.from;if(m<i.viewport.from)return i.viewport.from==0?0:t?null:Qd(i,o,c,u,f);if(m>i.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:Qd(i,o,c,u,f);let b=i.dom.ownerDocument,w=i.root.elementFromPoint?i.root:b,g=w.elementFromPoint(u,f);g&&!i.contentDOM.contains(g)&&(g=null),g||(u=Math.max(o.left+1,Math.min(o.right-1,u)),g=w.elementFromPoint(u,f),g&&!i.contentDOM.contains(g)&&(g=null));let p,O=-1;if(g&&((s=i.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(b.caretPositionFromPoint){let y=b.caretPositionFromPoint(u,f);y&&({offsetNode:p,offset:O}=y)}else if(b.caretRangeFromPoint){let y=b.caretRangeFromPoint(u,f);y&&({startContainer:p,startOffset:O}=y,(!i.contentDOM.contains(p)||oe.safari&&vw(p,O,u)||oe.chrome&&Zw(p,O,u))&&(p=void 0))}p&&(O=Math.min(ui(p),O))}if(!p||!i.docView.dom.contains(p)){let y=Je.find(i.docView,m);if(!y)return d>c.top+c.height/2?c.to:c.from;({node:p,offset:O}=Ca(y.dom,u,f))}let C=i.docView.nearest(p);if(!C)return null;if(C.isWidget&&((r=C.dom)===null||r===void 0?void 0:r.nodeType)==1){let y=C.dom.getBoundingClientRect();return e.y<y.top||e.y<=y.bottom&&e.x<=(y.left+y.right)/2?C.posAtStart:C.posAtEnd}else return C.localPosFromDOM(p,O)+C.posAtStart}function Qd(i,e,t,n,s){let r=Math.round((n-e.left)*i.defaultCharacterWidth);if(i.lineWrapping&&t.height>i.defaultLineHeight*1.5){let a=i.viewState.heightOracle.textHeight,c=Math.floor((s-t.top-(i.defaultLineHeight-a)*.5)/a);r+=c*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+ea(o,r,i.state.tabSize)}function vw(i,e,t){let n;if(i.nodeType!=3||e!=(n=i.nodeValue.length))return!1;for(let s=i.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return mn(i,n-1,n).getBoundingClientRect().left>t}function Zw(i,e,t){if(e!=0)return!1;for(let s=i;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let n=i.nodeType==1?i.getBoundingClientRect():mn(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function Aa(i,e){let t=i.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==wt.Text))return n}return t}function Iw(i,e,t,n){let s=Aa(i,e.head),r=!n||s.type!=wt.Text||!(i.lineWrapping||s.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=i.dom.getBoundingClientRect(),a=i.textDirectionAt(s.from),c=i.posAtCoords({x:t==(a==Ze.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(c!=null)return j.cursor(c,t?-1:1)}return j.cursor(t?s.to:s.from,t?-1:1)}function Pd(i,e,t,n){let s=i.state.doc.lineAt(e.head),r=i.bidiSpans(s),o=i.textDirectionAt(s.from);for(let a=e,c=null;;){let h=Aw(s,r,o,a,t),u=rd;if(!h){if(s.number==(t?i.state.doc.lines:1))return a;u=`
28
+ `,s=i.state.doc.line(s.number+(t?1:-1)),r=i.bidiSpans(s),h=i.visualLineSide(s,!t)}if(c){if(!c(u))return a}else{if(!n)return h;c=n(u)}a=h}}function Uw(i,e,t){let n=i.state.charCategorizer(e),s=n(t);return r=>{let o=n(r);return s==je.Space&&(s=o),s==o}}function Fw(i,e,t,n){let s=e.head,r=t?1:-1;if(s==(t?i.state.doc.length:0))return j.cursor(s,e.assoc);let o=e.goalColumn,a,c=i.contentDOM.getBoundingClientRect(),h=i.coordsAtPos(s,e.assoc||-1),u=i.documentTop;if(h)o==null&&(o=h.left-c.left),a=r<0?h.top:h.bottom;else{let m=i.viewState.lineBlockAt(s);o==null&&(o=Math.min(c.right-c.left,i.defaultCharacterWidth*(s-m.from))),a=(r<0?m.top:m.bottom)+u}let f=c.left+o,d=n??i.viewState.heightOracle.textHeight>>1;for(let m=0;;m+=10){let b=a+(d+m)*r,w=Ad(i,{x:f,y:b},!1,r);if(b<c.top||b>c.bottom||(r<0?w<s:w>s)){let g=i.docView.coordsForChar(w),p=!g||b<g.top?-1:1;return j.cursor(w,p,void 0,o)}}}function Ur(i,e,t){for(;;){let n=0;for(let s of i)s.between(e-1,e+1,(r,o,a)=>{if(e>r&&e<o){let c=n||t||(e-r<o-e?-1:1);e=c<0?r:o,n=c}});if(!n)return e}}function Qa(i,e,t){let n=Ur(i.state.facet(ka).map(s=>s(i)),t.from,e.head>t.from?-1:1);return n==t.from?t:j.cursor(n,n<t.from?1:-1)}const Ns="￿";class jw{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Se.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Ns}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let s=e;;){this.findPointBefore(n,s);let r=this.text.length;this.readNode(s);let o=s.nextSibling;if(o==t)break;let a=Be.get(s),c=Be.get(o);(a&&c?a.breakAfter:(a?a.breakAfter:Lr(s))||Lr(o)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>r)&&this.lineBreak(),s=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,a;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=s.exec(t))&&(r=a.index,o=a[0].length),this.append(t.slice(n,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=o-1);n=r+o}}readNode(e){if(e.cmIgnore)return;let t=Be.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let s=n.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 n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(qw(e,n.node,n.offset)?t:0))}}function qw(i,e,t){for(;;){if(!e||t<ui(e))return!1;if(e==i)return!0;t=pn(e)+1,e=e.parentNode}}class Td{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Xw{constructor(e,t,n,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let a=r||o?[]:zw(e),c=new jw(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=Gw(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=r&&r.node==a.focusNode&&r.offset==a.focusOffset||!sa(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),h=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!sa(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((oe.ios||oe.chrome)&&e.state.selection.main.empty&&c!=h&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(c,h),d=Math.max(c,h),m=u.from-f,b=u.to-d;(m==0||m==1||f==0)&&(b==0||b==-1||d==e.state.doc.length)&&(c=0,h=e.state.doc.length)}this.newSel=j.single(h,c)}}}function Ed(i,e){let t,{newSel:n}=e,s=i.state.selection.main,r=i.inputState.lastKeyTime>Date.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,c=s.from,h=null;(r===8||oe.android&&e.text.length<a-o)&&(c=s.to,h="end");let u=Yw(i.state.doc.sliceString(o,a,Ns),e.text,c-o,h);u&&(oe.chrome&&r==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Ns+Ns&&u.toB--,t={from:o+u.from,to:o+u.toA,insert:Ae.of(e.text.slice(u.from,u.toB).split(Ns))})}else n&&(!i.hasFocus&&i.state.facet(Ei)||n.main.eq(s))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!s.empty&&n&&n.main.empty?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,s.to)}:(oe.mac||oe.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=j.single(n.main.anchor-1,n.main.head-1)),t={from:t.from,to:t.to,insert:Ae.of([t.insert.toString().replace("."," ")])}):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:i.state.doc.slice(s.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,s.to))}:oe.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
29
+ `&&i.lineWrapping&&(n&&(n=j.single(n.main.anchor-1,n.main.head-1)),t={from:s.from,to:s.to,insert:Ae.of([" "])}),t)return Pa(i,t,n,r);if(n&&!n.main.eq(s)){let o=!1,a="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),a=i.inputState.lastSelectionOrigin),i.dispatch({selection:n,scrollIntoView:o,userEvent:a}),!0}else return!1}function Pa(i,e,t,n=-1){if(oe.ios&&i.inputState.flushIOSKey(e))return!0;let s=i.state.selection.main;if(oe.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&i.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Dn(i.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&Dn(i.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Dn(i.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,a=()=>o||(o=Ww(i,e,t));return i.state.facet(hd).some(c=>c(i,e.from,e.to,r,a))||i.dispatch(a()),!0}function Ww(i,e,t){let n,s=i.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let a=r.from<e.from?s.sliceDoc(r.from,e.from):"",c=r.to>e.to?s.sliceDoc(e.to,r.to):"";n=s.replaceSelection(i.state.toText(a+e.insert.sliceString(0,void 0,i.state.lineBreak)+c))}else{let a=s.changes(e),c=t&&t.main.to<=a.newLength?t.main:void 0;if(s.selection.ranges.length>1&&i.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=i.state.sliceDoc(e.from,e.to),u,f=t&&kd(i,t.main.head);if(f){let b=e.insert.length-(e.to-e.from);u={from:f.from,to:f.to-b}}else u=i.state.doc.lineAt(r.head);let d=r.to-e.to,m=r.to-r.from;n=s.changeByRange(b=>{if(b.from==r.from&&b.to==r.to)return{changes:a,range:c||b.map(a)};let w=b.to-d,g=w-h.length;if(b.to-b.from!=m||i.state.sliceDoc(g,w)!=h||b.to>=u.from&&b.from<=u.to)return{range:b};let p=s.changes({from:g,to:w,insert:e.insert}),O=b.to-r.to;return{changes:p,range:c?j.range(Math.max(0,c.anchor+O),Math.max(0,c.head+O)):b.map(p)}})}else n={changes:a,selection:c&&s.selection.replaceRange(c)}}let o="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,o+=".compose",i.inputState.compositionFirstChange&&(o+=".start",i.inputState.compositionFirstChange=!1)),s.update(n,{userEvent:o,scrollIntoView:!0})}function Yw(i,e,t,n){let s=Math.min(i.length,e.length),r=0;for(;r<s&&i.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==s&&i.length==e.length)return null;let o=i.length,a=e.length;for(;o>0&&a>0&&i.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(n=="end"){let c=Math.max(0,r-Math.min(o,a));t-=o+c-r}if(o<r&&i.length<e.length){let c=t<=r&&t>=o?r-t:0;r-=c,a=r+(a-o),o=r}else if(a<r){let c=t<=r&&t>=a?r-t:0;r-=c,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}function zw(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}=i.observer.selectionRange;return t&&(e.push(new Td(t,n)),(s!=t||r!=n)&&e.push(new Td(s,r))),e}function Gw(i,e){if(i.length==0)return null;let t=i[0].pos,n=i.length==2?i[1].pos:t;return t>-1&&n>-1?j.single(t+e,n+e):null}class Hw{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,oe.safari&&e.contentDOM.addEventListener("input",()=>null),oe.gecko&&dk(e.contentDOM.ownerDocument)}handleEvent(e){!rk(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let s of n.observers)s(this.view,t);for(let s of n.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Kw(e),n=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,a=n[r];a&&o!=!a.handlers.length&&(s.removeEventListener(r,this.handleEvent),a=null),a||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in n)r!="scroll"&&!t[r]&&s.removeEventListener(r,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&&Rd.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),oe.android&&oe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return oe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Nd.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||Jw.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,Dn(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:oe.safari&&!oe.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 $d(i,e){return(t,n)=>{try{return e.call(i,n,t)}catch(s){Qt(t.state,s)}}}function Kw(i){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of i){let s=n.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push($d(n.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push($d(n.value,o))}}for(let n in Kt)t(n).handlers.push(Kt[n]);for(let n in Ut)t(n).observers.push(Ut[n]);return e}const Nd=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Jw="dthko",Rd=[16,17,18,20,91,92,224,225],Fr=6;function jr(i){return Math.max(0,i)*.7+8}function ek(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}class tk{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=hw(e.contentDOM),this.atoms=e.state.facet(ka).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Se.allowMultipleSelections)&&ik(e,t),this.dragging=sk(e,t)&&Ud(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&&ek(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,s=0,r=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=xa(this.view);e.clientX-c.left<=s+Fr?t=-jr(s-e.clientX):e.clientX+c.right>=o-Fr&&(t=jr(e.clientX-o)),e.clientY-c.top<=r+Fr?n=-jr(r-e.clientY):e.clientY+c.bottom>=a-Fr&&(n=jr(e.clientY-a)),this.setScrollSpeed(t,n)}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 n=0;n<e.ranges.length;n++){let s=e.ranges[n],r=null;if(s.empty){let o=Ur(this.atoms,s.from,0);o!=s.from&&(r=j.cursor(o,-1))}else{let o=Ur(this.atoms,s.from,-1),a=Ur(this.atoms,s.to,1);(o!=s.from||a!=s.to)&&(r=j.range(s.from==s.anchor?o:a,s.from==s.head?o:a))}r&&(t||(t=e.ranges.slice()),t[n]=r)}return t?j.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,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 ik(i,e){let t=i.state.facet(od);return t.length?t[0](e):oe.mac?e.metaKey:e.ctrlKey}function nk(i,e){let t=i.state.facet(ld);return t.length?t[0](e):oe.mac?!e.altKey:!e.ctrlKey}function sk(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let n=xs(i.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let r=0;r<s.length;r++){let o=s[r];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function rk(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Be.get(t))&&n.ignoreEvent(e))return!1;return!0}const Kt=Object.create(null),Ut=Object.create(null),Vd=oe.ie&&oe.ie_version<15||oe.ios&&oe.webkit_version<604;function ok(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),Ld(i,t.value)},50)}function qr(i,e,t){for(let n of i.facet(e))t=n(t,i);return t}function Ld(i,e){e=qr(i.state,_a,e);let{state:t}=i,n,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(Ta!=null&&t.selection.ranges.every(c=>c.empty)&&Ta==r.toString()){let c=-1;n=t.changeByRange(h=>{let u=t.doc.lineAt(h.from);if(u.from==c)return{range:h};c=u.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:f},range:j.cursor(h.from+f.length)}})}else o?n=t.changeByRange(c=>{let h=r.line(s++);return{changes:{from:c.from,to:c.to,insert:h.text},range:j.cursor(c.from+h.length)}}):n=t.replaceSelection(r);i.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Ut.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft},Kt.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1),Ut.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")},Ut.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")},Kt.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of i.state.facet(ad))if(t=n(i,e),t)break;if(!t&&e.button==0&&(t=ck(i,e)),t){let n=!i.hasFocus;i.inputState.startMouseSelection(new tk(i,e,t,n)),n&&i.observer.ignore(()=>{Lf(i.contentDOM);let r=i.root.activeElement;r&&!r.contains(i.contentDOM)&&r.blur()});let s=i.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function Md(i,e,t,n){if(n==1)return j.cursor(e,t);if(n==2)return Mw(i.state,e,t);{let s=Je.find(i.docView,e),r=i.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,a=s?s.posAtEnd:r.to;return a<i.state.doc.length&&a==r.to&&a++,j.range(o,a)}}let Bd=(i,e,t)=>e>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function lk(i,e,t,n){let s=Je.find(i.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Bd(t,n,o))return-1;let a=s.coordsAt(r,1);return a&&Bd(t,n,a)?1:o&&o.bottom>=n?-1:1}function Dd(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:lk(i,t,e.clientX,e.clientY)}}const ak=oe.ie&&oe.ie_version<=11;let vd=null,Zd=0,Id=0;function Ud(i){if(!ak)return i.detail;let e=vd,t=Id;return vd=i,Id=Date.now(),Zd=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(Zd+1)%3:1}function ck(i,e){let t=Dd(i,e),n=Ud(e),s=i.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,a){let c=Dd(i,r),h,u=Md(i,c.pos,c.bias,n);if(t.pos!=c.pos&&!o){let f=Md(i,t.pos,t.bias,n),d=Math.min(f.from,u.from),m=Math.max(f.to,u.to);u=d<u.from?j.range(d,m):j.range(m,d)}return o?s.replaceRange(s.main.extend(u.from,u.to)):a&&n==1&&s.ranges.length>1&&(h=hk(s,c.pos))?h:a?s.addRange(u):j.create([u])}}}function hk(i,e){for(let t=0;t<i.ranges.length;t++){let{from:n,to:s}=i.ranges[t];if(n<=e&&s>=e)return j.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}Kt.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let s=i.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=j.range(r,o))}}let{inputState:n}=i;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",qr(i.state,ba,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Kt.dragend=i=>(i.inputState.draggedContent=null,!1);function Fd(i,e,t,n){if(t=qr(i.state,_a,t),!t)return;let s=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=i.inputState,o=n&&r&&nk(i,e)?{from:r.from,to:r.to}:null,a={from:s,insert:t},c=i.state.changes(o?[o,a]:a);i.focus(),i.dispatch({changes:c,selection:{anchor:c.mapPos(s,-1),head:c.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}Kt.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),s=0,r=()=>{++s==t.length&&Fd(i,e,n.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let a=new FileReader;a.onerror=r,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(n[o]=a.result),r()},a.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return Fd(i,e,n,!0),!0}return!1},Kt.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=Vd?null:e.clipboardData;return t?(Ld(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(ok(i),!1)};function uk(i,e){let t=i.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),i.focus()},50)}function fk(i){let e=[],t=[],n=!1;for(let s of i.selection.ranges)s.empty||(e.push(i.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of i.selection.ranges){let o=i.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),s=o.number}n=!0}return{text:qr(i,ba,e.join(i.lineBreak)),ranges:t,linewise:n}}let Ta=null;Kt.copy=Kt.cut=(i,e)=>{let{text:t,ranges:n,linewise:s}=fk(i.state);if(!t&&!s)return!1;Ta=s?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let r=Vd?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(uk(i,t),!1)};const jd=Ai.define();function qd(i,e){let t=[];for(let n of i.facet(ud)){let s=n(i,e);s&&t.push(s)}return t?i.update({effects:t,annotations:jd.of(!0)}):null}function Xd(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=qd(i.state,e);t?i.dispatch(t):i.update([])}},10)}Ut.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),Xd(i)},Ut.blur=i=>{i.observer.clearSelectionRange(),Xd(i)},Ut.compositionstart=Ut.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))},Ut.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,oe.chrome&&oe.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))},Ut.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()},Kt.beforeinput=(i,e)=>{var t,n;if(e.inputType=="insertReplacementText"&&i.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let a=o[0],c=i.posAtDOM(a.startContainer,a.startOffset),h=i.posAtDOM(a.endContainer,a.endOffset);return Pa(i,{from:c,to:h,insert:i.state.toText(r)},null),!0}}let s;if(oe.chrome&&oe.android&&(s=Nd.find(r=>r.inputType==e.inputType))&&(i.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return oe.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),oe.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Ut.compositionend(i,e),20),!1};const Wd=new Set;function dk(i){Wd.has(i)||(Wd.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}const Yd=["pre-wrap","normal","pre-line","break-spaces"];let Un=!1;function zd(){Un=!1}class pk{constructor(e){this.lineWrapping=e,this.doc=Ae.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}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 Yd.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let s=e[n];s<0?n++:this.heightSamples[Math.floor(s*10)]||(t=!0,this.heightSamples[Math.floor(s*10)]=!0)}return t}refresh(e,t,n,s,r,o){let a=Yd.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=r,c){this.heightSamples={};for(let h=0;h<o.length;h++){let u=o[h];u<0?h++:this.heightSamples[Math.floor(u*10)]=!0}}return c}}class mk{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class pi{constructor(e,t,n,s,r){this.from=e,this.length=t,this.top=n,this.height=s,this._content=r}get type(){return typeof this._content=="number"?wt.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 Yi?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 pi(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ie=function(i){return i[i.ByPos=0]="ByPos",i[i.ByHeight=1]="ByHeight",i[i.ByPosNoHeight=2]="ByPosNoHeight",i}(Ie||(Ie={}));const Xr=.001;class kt{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}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)>Xr&&(Un=!0),this.height=e)}replace(e,t,n){return kt.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let r=this,o=n.doc;for(let a=s.length-1;a>=0;a--){let{fromA:c,toA:h,fromB:u,toB:f}=s[a],d=r.lineAt(c,Ie.ByPosNoHeight,n.setDoc(t),0,0),m=d.to>=h?d:r.lineAt(h,Ie.ByPosNoHeight,n,0,0);for(f+=m.to-h,h=m.to;a>0&&d.from<=s[a-1].toA;)c=s[a-1].fromA,u=s[a-1].fromB,a--,c<d.from&&(d=r.lineAt(c,Ie.ByPosNoHeight,n,0,0));u+=d.from-c,c=d.from;let b=Ea.build(n.setDoc(o),e,u,f);r=Wr(r,r.replace(c,h,b))}return r.updateHeight(n,0)}static empty(){return new Vt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,s=0,r=0;for(;;)if(t==n)if(s>r*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),n+=1+a.break,s-=a.size}else if(r>s*2){let a=e[n];a.break?e.splice(n,1,a.left,null,a.right):e.splice(n,1,a.left,a.right),n+=2+a.break,r-=a.size}else break;else if(s<r){let a=e[t++];a&&(s+=a.size)}else{let a=e[--n];a&&(r+=a.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,n++),new gk(kt.of(e.slice(0,t)),o,kt.of(e.slice(n)))}}function Wr(i,e){return i==e?i:(i.constructor!=e.constructor&&(Un=!0),e)}kt.prototype.size=1;class Gd extends kt{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,s){return new pi(s,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,s,r){return this.blockAt(0,n,s,r)}forEachLine(e,t,n,s,r,o){e<=r+this.length&&t>=r&&o(this.blockAt(0,n,s,r))}updateHeight(e,t=0,n=!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 Vt extends Gd{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,s){return new pi(s,this.length,n,this.height,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof Vt||s instanceof pt&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof pt?s=new Vt(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):kt.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(n||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 pt extends kt{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-n+1,o,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*r);o=c/r,this.length>r+1&&(a=(this.height-c)/(this.length-r-1))}else o=this.height/r;return{firstLine:n,lastLine:s,perLine:o,perChar:a}}blockAt(e,t,n,s){let{firstLine:r,lastLine:o,perLine:a,perChar:c}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),u=t.doc.lineAt(h),f=a+u.length*c,d=Math.max(n,e-f/2);return new pi(u.from,u.length,d,f,0)}else{let h=Math.max(0,Math.min(o-r,Math.floor((e-n)/a))),{from:u,length:f}=t.doc.line(r+h);return new pi(u,f,n+a*h,a,0)}}lineAt(e,t,n,s,r){if(t==Ie.ByHeight)return this.blockAt(e,n,s,r);if(t==Ie.ByPosNoHeight){let{from:m,to:b}=n.doc.lineAt(e);return new pi(m,b-m,0,0,0)}let{firstLine:o,perLine:a,perChar:c}=this.heightMetrics(n,r),h=n.doc.lineAt(e),u=a+h.length*c,f=h.number-o,d=s+a*f+c*(h.from-r-f);return new pi(h.from,h.length,Math.max(s,Math.min(d,s+this.height-u)),u,0)}forEachLine(e,t,n,s,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:a,perLine:c,perChar:h}=this.heightMetrics(n,r);for(let u=e,f=s;u<=t;){let d=n.doc.lineAt(u);if(u==e){let b=d.number-a;f+=c*b+h*(e-r-b)}let m=c+h*d.length;o(new pi(d.from,d.length,f,m,0)),f+=m,u=d.to+1}}replace(e,t,n){let s=this.length-t;if(s>0){let r=n[n.length-1];r instanceof pt?n[n.length-1]=new pt(r.length+s):n.push(null,new pt(s-1))}if(e>0){let r=n[0];r instanceof pt?n[0]=new pt(e+r.length):n.unshift(new pt(e-1),null)}return kt.of(n)}decomposeLeft(e,t){t.push(new pt(e-1),null)}decomposeRight(e,t){t.push(null,new pt(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],a=Math.max(t,s.from),c=-1;for(s.from>t&&o.push(new pt(s.from-t-1).updateHeight(e,t));a<=r&&s.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=s.heights[s.index++];c==-1?c=f:Math.abs(f-c)>=Xr&&(c=-2);let d=new Vt(u,f);d.outdated=!1,o.push(d),a+=u+1}a<=r&&o.push(null,new pt(r-a).updateHeight(e,a));let h=kt.of(o);return(c<0||Math.abs(h.height-this.height)>=Xr||Math.abs(c-this.heightMetrics(e,t).perLine)>=Xr)&&(Un=!0),Wr(this,h)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class gk extends kt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let r=n+this.left.height;return e<r?this.left.blockAt(e,t,n,s):this.right.blockAt(e,t,r,s+this.left.length+this.break)}lineAt(e,t,n,s,r){let o=s+this.left.height,a=r+this.left.length+this.break,c=t==Ie.ByHeight?e<o:e<a,h=c?this.left.lineAt(e,t,n,s,r):this.right.lineAt(e,t,n,o,a);if(this.break||(c?h.to<a:h.from>a))return h;let u=t==Ie.ByPosNoHeight?Ie.ByPosNoHeight:Ie.ByPos;return c?h.join(this.right.lineAt(a,u,n,o,a)):this.left.lineAt(a,u,n,s,r).join(h)}forEachLine(e,t,n,s,r,o){let a=s+this.left.height,c=r+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,s,r,o),t>=c&&this.right.forEachLine(e,t,n,a,c,o);else{let h=this.lineAt(c,Ie.ByPos,n,s,r);e<h.from&&this.left.forEachLine(e,h.from-1,n,s,r,o),h.to>=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,n,a,c,o)}}replace(e,t,n){let s=this.left.length+this.break;if(t<s)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,n));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let a of n)r.push(a);if(e>0&&Hd(r,o-1),t<this.length){let a=r.length;this.decomposeRight(t,r),Hd(r,a)}return kt.of(r)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,s=n+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e<n&&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?kt.of(this.break?[e,null,t]:[e,t]):(this.left=Wr(this.left,e),this.right=Wr(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,n=!1,s){let{left:r,right:o}=this,a=t+r.length+this.break,c=null;return s&&s.from<=t+r.length&&s.more?c=r=r.updateHeight(e,t,n,s):r.updateHeight(e,t,n),s&&s.from<=a+o.length&&s.more?c=o=o.updateHeight(e,a,n,s):o.updateHeight(e,a,n),c?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Hd(i,e){let t,n;i[e]==null&&(t=i[e-1])instanceof pt&&(n=i[e+1])instanceof pt&&i.splice(e-1,3,new pt(t.length+1+n.length))}const Ok=5;class Ea{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 n=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Vt?s.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Vt(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let s=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new Gd(o,s,n)):(o||r||s>=Ok)&&this.addLineDeco(s,r,o)}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 Vt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new pt(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Vt)return e;let t=new Vt(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,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Vt)&&!this.isCovered?this.nodes.push(new Vt(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let s of this.nodes)s instanceof Vt&&s.updateHeight(this.oracle,n),n+=s?s.length:1;return this.nodes}static build(e,t,n,s){let r=new Ea(n,e);return Ee.spans(t,n,s,r,0),r.finish(n)}}function _k(i,e,t){let n=new bk;return Ee.compare(i,e,t,n,0),n.changes}class bk{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,s){(e<t||n&&n.heightRelevant||s&&s.heightRelevant)&&Dr(e,t,this.changes,5)}}function yk(i,e){let t=i.getBoundingClientRect(),n=i.ownerDocument,s=n.defaultView||window,r=Math.max(0,t.left),o=Math.min(s.innerWidth,t.right),a=Math.max(0,t.top),c=Math.min(s.innerHeight,t.bottom);for(let h=i.parentNode;h&&h!=n.body;)if(h.nodeType==1){let u=h,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();r=Math.max(r,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),c=Math.min(h==i.parentNode?s.innerHeight:c,d.bottom)}h=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,c)-(t.top+e)}}function wk(i){let e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function kk(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class $a{constructor(e,t,n,s){this.from=e,this.to=t,this.size=n,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let s=e[n],r=t[n];if(s.from!=r.from||s.to!=r.to||s.size!=r.size)return!1}return!0}draw(e,t){return de.replace({widget:new xk(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class xk extends fi{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 Kd{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=Jd,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ze.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(wa).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new pk(t),this.stateDeco=e.facet(Es).filter(n=>typeof n!="function"),this.heightMap=kt.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle.setDoc(e.doc),[new It(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=de.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Yr(r,o))}}return this.viewports=e.sort((n,s)=>n.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Jd:new Na(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(Rs(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Es).filter(u=>typeof u!="function");let s=e.changedRanges,r=It.extendWithRanges(s,_k(n,this.stateDeco,e?e.changes:it.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);zd(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Un)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!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(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(dd)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),s=this.heightOracle,r=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Ze.RTL:Ze.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),a=t.getBoundingClientRect(),c=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let h=0,u=0;if(a.width&&a.height){let{scaleX:y,scaleY:E}=Vf(t,a);(y>.005&&Math.abs(this.scaleX-y)>.005||E>.005&&Math.abs(this.scaleY-E)>.005)&&(this.scaleX=y,this.scaleY=E,h|=16,o=c=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let m=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=m&&(this.scrollAnchorHeight=-1,this.scrollTop=m),this.scrolledToBottom=Df(e.scrollDOM);let b=(this.printing?kk:yk)(t,this.paddingTop),w=b.top-this.pixelViewport.top,g=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let p=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(p!=this.inView&&(this.inView=p,p&&(c=!0)),!this.inView&&!this.scrollTarget&&!wk(e.dom))return 0;let O=a.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let y=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(y)&&(o=!0),o||s.lineWrapping&&Math.abs(O-this.contentDOMWidth)>s.charWidth){let{lineHeight:E,charWidth:x,textHeight:k}=e.docView.measureTextSize();o=E>0&&s.refresh(r,E,x,k,O/x,y),o&&(e.docView.minWidth=0,h|=16)}w>0&&g>0?u=Math.max(w,g):w<0&&g<0&&(u=Math.min(w,g)),zd();for(let E of this.viewports){let x=E.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(E);this.heightMap=(o?kt.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle,[new It(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new mk(E.from,x))}Un&&(h|=2)}let C=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return C&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),h|=this.updateForViewport()),(h&2||C)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,c=new Yr(s.lineAt(o-n*1e3,Ie.ByHeight,r,0,0).from,s.lineAt(a+(1-n)*1e3,Ie.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(h<c.from||h>c.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,Ie.ByPos,r,0,0),d;t.y=="center"?d=(f.top+f.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&h<c.from?d=f.top:d=f.bottom-u,c=new Yr(s.lineAt(d-1e3/2,Ie.ByHeight,r,0,0).from,s.lineAt(d+u+1e3/2,Ie.ByHeight,r,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),s=t.mapPos(e.to,1);return new Yr(this.heightMap.lineAt(n,Ie.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,Ie.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,Ie.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,Ie.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||s<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||r>=a+Math.max(10,Math.min(n,250)))&&s>o-2*1e3&&r<a+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let s of e)t.touchesRange(s.from,s.to)||n.push(new $a(t.mapPos(s.from),t.mapPos(s.to),s.size,s.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,s=n?1e4:2e3,r=s>>1,o=s<<1;if(this.defaultTextDirection!=Ze.LTR&&!n)return[];let a=[],c=(u,f,d,m)=>{if(f-u<r)return;let b=this.state.selection.main,w=[b.from];b.empty||w.push(b.to);for(let p of w)if(p>u&&p<f){c(u,p-10,d,m),c(p+10,f,d,m);return}let g=Ck(e,p=>p.from>=d.from&&p.to<=d.to&&Math.abs(p.from-u)<r&&Math.abs(p.to-f)<r&&!w.some(O=>p.from<O&&p.to>O));if(!g){if(f<d.to&&t&&n&&t.visibleRanges.some(C=>C.from<=f&&C.to>=f)){let C=t.moveToLineBoundary(j.cursor(f),!1,!0).head;C>u&&(f=C)}let p=this.gapSize(d,u,f,m),O=n||p<2e6?p:2e6;g=new $a(u,f,p,O)}a.push(g)},h=u=>{if(u.length<o||u.type!=wt.Text)return;let f=Sk(u.from,u.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,m,b;if(n){let w=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,p;if(d!=null){let O=Gr(f,d),C=((this.visibleBottom-this.visibleTop)/2+w)/u.height;g=O-C,p=O+C}else g=(this.visibleTop-u.top-w)/u.height,p=(this.visibleBottom-u.top+w)/u.height;m=zr(f,g),b=zr(f,p)}else{let w=f.total*this.heightOracle.charWidth,g=s*this.heightOracle.charWidth,p=0;if(w>2e6)for(let x of e)x.from>=u.from&&x.from<u.to&&x.size!=x.displaySize&&x.from*this.heightOracle.charWidth+p<this.pixelViewport.left&&(p=x.size-x.displaySize);let O=this.pixelViewport.left+p,C=this.pixelViewport.right+p,y,E;if(d!=null){let x=Gr(f,d),k=((C-O)/2+g)/w;y=x-k,E=x+k}else y=(O-g)/w,E=(C+g)/w;m=zr(f,y),b=zr(f,E)}m>u.from&&c(u.from,m,u,f),b<u.to&&c(b,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(h):h(u);return a}gapSize(e,t,n,s){let r=Gr(s,n)-Gr(s,t);return this.heightOracle.lineWrapping?e.height*r:s.total*this.heightOracle.charWidth*r}updateLineGaps(e){$a.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=de.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Ee.spans(t,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let s=0;if(n.length!=this.visibleRanges.length)s=12;else for(let r=0;r<n.length&&!(s&8);r++){let o=this.visibleRanges[r],a=n[r];(o.from!=a.from||o.to!=a.to)&&(s|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(s|=8))}return this.visibleRanges=n,s}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Rs(this.heightMap.lineAt(e,Ie.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)||Rs(this.heightMap.lineAt(this.scaler.fromDOM(e),Ie.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 Rs(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 Yr{constructor(e,t){this.from=e,this.to=t}}function Sk(i,e,t){let n=[],s=i,r=0;return Ee.spans(t,i,e,{span(){},point(o,a){o>s&&(n.push({from:s,to:o}),r+=o-s),s=a}},20),s<e&&(n.push({from:s,to:e}),r+=e-s),{total:r,ranges:n}}function zr({total:i,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(i*t);for(let s=0;;s++){let{from:r,to:o}=e[s],a=o-r;if(n<=a)return r+n;n-=a}}function Gr(i,e){let t=0;for(let{from:n,to:s}of i.ranges){if(e<=s){t+=e-n;break}t+=s-n}return t/i.total}function Ck(i,e){for(let t of i)if(e(t))return t}const Jd={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}};class Na{constructor(e,t,n){let s=0,r=0,o=0;this.viewports=n.map(({from:a,to:c})=>{let h=t.lineAt(a,Ie.ByPos,e,0,0).top,u=t.lineAt(c,Ie.ByPos,e,0,0).bottom;return s+=u-h,{from:a,to:c,top:h,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let a of this.viewports)a.domTop=o+(a.top-r)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),r=a.bottom}toDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return s+(e-n)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);n=r.bottom,s=r.domBottom}}fromDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return n+(e-s)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);n=r.bottom,s=r.domBottom}}eq(e){return e instanceof Na?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function Rs(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),n=e.toDOM(i.bottom);return new pi(i.from,i.length,t,n-t,Array.isArray(i._content)?i._content.map(s=>Rs(s,e)):i._content)}const Hr=ce.define({combine:i=>i.join(" ")}),Ra=ce.define({combine:i=>i.indexOf(!0)>-1}),Va=qi.newName(),ep=qi.newName(),tp=qi.newName(),ip={"&light":"."+ep,"&dark":"."+tp};function La(i,e,t){return new qi(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,s=>{if(s=="&")return i;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):i+" "+n}})}const Ak=La("."+Va,{"&":{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:"#ddd"},".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":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".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"}},ip),Qk={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ma=oe.ie&&oe.ie_version<=11;class Pk{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new uw,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 n of t)this.queue.push(n);(oe.ie&&oe.ie_version<=11||oe.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(oe.chrome&&oe.chrome_version<126)&&(this.editContext=new Ek(e),e.state.facet(Ei)&&(e.contentDOM.editContext=this.editContext.editContext)),Ma&&(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,n)=>t!=e[n]))){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:n}=this,s=this.selectionRange;if(n.state.facet(Ei)?n.root.activeElement!=this.dom:!Vr(this.dom,s))return;let r=s.anchorNode&&n.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(oe.ie&&oe.ie_version<=11||oe.android&&oe.chrome)&&!n.state.selection.main.empty&&s.focusNode&&Ss(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=xs(e.root);if(!t)return!1;let n=oe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Tk(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let s=Vr(this.dom,n);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&dw(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),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 n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.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,Qk),Ma&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ma&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let s=()=>{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Dn(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.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,n=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:s}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),s=this.selectionChanged&&Vr(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 r=new Xw(this.view,e,t,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}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 n=this.view.state,s=Ed(this.view,t);return this.view.state==n&&(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 n=np(t,e.previousSibling||e.target.previousSibling,-1),s=np(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):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(Ei)!=e.state.facet(Ei)&&(e.view.contentDOM.editContext=e.state.facet(Ei)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.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 np(i,e,t){for(;e;){let n=Be.get(e);if(n&&n.parent==i)return n;let s=e.parentNode;e=s!=i.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function sp(i,e){let t=e.startContainer,n=e.startOffset,s=e.endContainer,r=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor);return Ss(o.node,o.offset,s,r)&&([t,n,s,r]=[s,r,t,n]),{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}}function Tk(i,e){if(e.getComposedRanges){let s=e.getComposedRanges(i.root)[0];if(s)return sp(i,s)}let t=null;function n(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",n,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",n,!0),t?sp(i,t):null}class Ek{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=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=n=>{let s=e.state.selection.main,{anchor:r,head:o}=s,a=this.toEditorPos(n.updateRangeStart),c=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let h={from:a,to:c,insert:Ae.of(n.text.split(`
30
+ `))};if(h.from==this.from&&r<this.from?h.from=r:h.to==this.to&&r>this.to&&(h.to=r),h.from==h.to&&!h.insert.length){let u=j.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));u.main.eq(s)||e.dispatch({selection:u,userEvent:"select"});return}if((oe.mac||oe.android)&&h.from==o-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:c,insert:Ae.of([n.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let u=this.to-this.from+(h.to-h.from+h.insert.length);Pa(e,h,j.single(this.toEditorPos(n.selectionStart,u),this.toEditorPos(n.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=n=>{let s=[],r=null;for(let o=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);o<a;o++){let c=e.coordsForChar(o);r=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||r||new DOMRect,s.push(r)}t.updateCharacterBounds(n.rangeStart,s)},this.handlers.textformatupdate=n=>{let s=[];for(let r of n.getTextFormats()){let o=r.underlineStyle,a=r.underlineThickness;if(o!="None"&&a!="None"){let c=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(c<h){let u=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;s.push(de.mark({attributes:{style:u}}).range(c,h))}}}e.dispatch({effects:md.of(de.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let s=xs(n.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,a,c,h)=>{if(n)return;let u=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=u,this.to+=u;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+h.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=u}t+=u}),s&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(n=>!n.isUserEvent("input.type")&&n.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(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)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}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,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,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,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class se{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:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(s=>s.forEach(r=>n(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||fw(e.parent)||document,this.viewState=new Kd(e.state||Se.create(e)),e.scrollTo&&e.scrollTo.is(Zr)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ts).map(s=>new ya(s));for(let s of this.plugins)s.update(this);this.observer=new Pk(this),this.inputState=new Hw(this),this.inputState.ensureHandlers(this.plugins),this.docView=new wd(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 Ke?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,n=!1,s,r=this.state;for(let d of e){if(d.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=d.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,a=0,c=null;e.some(d=>d.annotation(jd))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=qd(r,o),c||(a=1));let h=this.observer.delayedAndroidKey,u=null;if(h?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(u=null)):this.observer.clear(),r.facet(Se.phrases)!=this.state.facet(Se.phrases))return this.setState(r);s=Ir.create(this,r,e),s.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:m}=d.state.selection;f=new In(m.empty?m:j.cursor(m.head,m.head>m.anchor?-1:1))}for(let m of d.effects)m.is(Zr)&&(f=m.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Kr.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet($s)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Hr)!=s.state.facet(Hr)&&(this.viewState.mustMeasureContent=!0),(t||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let d of this.state.facet(Oa))try{d(s)}catch(m){Qt(this.state,m,"update listener")}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Ed(this,u)&&h.force&&Dn(this.contentDOM,h.key,h.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 n of this.plugins)n.destroy(this);this.viewState=new Kd(e),this.plugins=e.facet(Ts).map(n=>new ya(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new wd(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(Ts),n=e.state.facet(Ts);if(t!=n){let s=[];for(let r of n){let o=t.indexOf(r);if(o<0)s.push(new ya(r));else{let a=this.plugins[o];a.mustUpdate=e,s.push(a)}}for(let r of this.plugins)r.mustUpdate!=e&&r.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!=n&&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(n){Qt(this.state,n,"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,n=this.scrollDOM,s=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(Df(n))r=-1,o=this.viewState.heightMap.height;else{let m=this.viewState.scrollAnchorAt(s);r=m.from,o=m.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let u=h.map(m=>{try{return m.read(this)}catch(b){return Qt(this.state,b),rp}}),f=Ir.create(this,this.state,[]),d=!1;f.flags|=c,t?t.flags|=c:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let m=0;m<h.length;m++)if(u[m]!=rp)try{let b=h[m];b.write&&b.write(u[m],this)}catch(b){Qt(this.state,b)}if(d&&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,o=-1;continue}else{let b=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(b>1||b<-1){s=s+b,n.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(Oa))a(t)}get themeClasses(){return Va+" "+(this.state.facet(Ra)?tp:ep)+" "+this.state.facet(Hr)}updateAttrs(){let e=op(this,gd,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ei)?"true":"false",class:"cm-content",style:`${oe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),op(this,wa,t);let n=this.observer.ignore(()=>{let s=ua(this.contentDOM,this.contentAttrs,t),r=ua(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let s of n.effects)if(s.is(se.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet($s);let e=this.state.facet(se.cspNonce);qi.mount(this.root,this.styleModules.concat(Ak).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(n=>n.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,n){return Qa(this,e,Pd(this,e,t,n))}moveByGroup(e,t){return Qa(this,e,Pd(this,e,t,n=>Uw(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=n[t?n.length-1:0];return j.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,n=!0){return Iw(this,e,t,n)}moveVertically(e,t,n){return Qa(this,e,Fw(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Ad(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[zi.find(r,e-s.from,-1,t)];return Cs(n,o.dir==Ze.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(fd)||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>$k)return sd(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||nd(r.isolates,n=bd(this,e))))return r.order;n||(n=bd(this,e));let s=Cw(e.text,t,n);return this.bidiCache.push(new Kr(e.from,e.to,t,n,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||oe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Lf(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 Zr.of(new In(typeof e=="number"?j.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Zr.of(new In(j.cursor(n.from),"start","start",n.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 Ge.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ge.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=qi.newName(),s=[Hr.of(n),$s.of(La(`.${n}`,e))];return t&&t.dark&&s.push(Ra.of(!0)),s}static baseTheme(e){return ji.lowest($s.of(La("."+Va,e,ip)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),s=n&&Be.get(n)||Be.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}se.styleModule=$s,se.inputHandler=hd,se.clipboardInputFilter=_a,se.clipboardOutputFilter=ba,se.scrollHandler=pd,se.focusChangeEffect=ud,se.perLineTextDirection=fd,se.exceptionSink=cd,se.updateListener=Oa,se.editable=Ei,se.mouseSelectionStyle=ad,se.dragMovesSelection=ld,se.clickAddsSelectionRange=od,se.decorations=Es,se.outerDecorations=Od,se.atomicRanges=ka,se.bidiIsolatedRanges=_d,se.scrollMargins=yd,se.darkTheme=Ra,se.cspNonce=ce.define({combine:i=>i.length?i[0]:""}),se.contentAttributes=wa,se.editorAttributes=gd,se.lineWrapping=se.contentAttributes.of({class:"cm-lineWrapping"}),se.announce=we.define();const $k=4096,rp={};class Kr{constructor(e,t,n,s,r,o){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:Ze.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let o=e[r];o.dir==s&&!t.touchesRange(o.from,o.to)&&n.push(new Kr(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function op(i,e,t){for(let n=i.state.facet(e),s=n.length-1;s>=0;s--){let r=n[s],o=typeof r=="function"?r(i):r;o&&ha(o,t)}return t}const Nk=oe.mac?"mac":oe.windows?"win":oe.linux?"linux":"key";function Rk(i,e){const t=i.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let s,r,o,a;for(let c=0;c<t.length-1;++c){const h=t[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))s=!0;else if(/^(c|ctrl|control)$/i.test(h))r=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?a=!0:r=!0;else throw new Error("Unrecognized modifier name: "+h)}return s&&(n="Alt-"+n),r&&(n="Ctrl-"+n),a&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function Jr(i,e,t){return e.altKey&&(i="Alt-"+i),e.ctrlKey&&(i="Ctrl-"+i),e.metaKey&&(i="Meta-"+i),t!==!1&&e.shiftKey&&(i="Shift-"+i),i}const Vk=ji.default(se.domEventHandlers({keydown(i,e){return cp(ap(e.state),i,e,"editor")}})),Vs=ce.define({enables:Vk}),lp=new WeakMap;function ap(i){let e=i.facet(Vs),t=lp.get(e);return t||lp.set(e,t=Bk(e.reduce((n,s)=>n.concat(s),[]))),t}function Lk(i,e,t){return cp(ap(i.state),e,i,t)}let Gi=null;const Mk=4e3;function Bk(i,e=Nk){let t=Object.create(null),n=Object.create(null),s=(o,a)=>{let c=n[o];if(c==null)n[o]=a;else if(c!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,a,c,h,u)=>{var f,d;let m=t[o]||(t[o]=Object.create(null)),b=a.split(/ (?!$)/).map(p=>Rk(p,e));for(let p=1;p<b.length;p++){let O=b.slice(0,p).join(" ");s(O,!0),m[O]||(m[O]={preventDefault:!0,stopPropagation:!1,run:[C=>{let y=Gi={view:C,prefix:O,scope:o};return setTimeout(()=>{Gi==y&&(Gi=null)},Mk),!0}]})}let w=b.join(" ");s(w,!1);let g=m[w]||(m[w]={preventDefault:!1,stopPropagation:!1,run:((d=(f=m._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});c&&g.run.push(c),h&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let o of i){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of a){let u=t[h]||(t[h]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(m=>f(m,Ba))}let c=o[e]||o.key;if(c)for(let h of a)r(h,c,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+c,o.shift,o.preventDefault,o.stopPropagation)}return t}let Ba=null;function cp(i,e,t,n){Ba=e;let s=lw(e),r=Ct(s,0),o=ai(r)==s.length&&s!=" ",a="",c=!1,h=!1,u=!1;Gi&&Gi.view==t&&Gi.scope==n&&(a=Gi.prefix+" ",Rd.indexOf(e.keyCode)<0&&(h=!0,Gi=null));let f=new Set,d=g=>{if(g){for(let p of g.run)if(!f.has(p)&&(f.add(p),p(t)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),h=!0)}return!1},m=i[n],b,w;return m&&(d(m[a+Jr(s,e,!o)])?c=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(oe.windows&&e.ctrlKey&&e.altKey)&&(b=Xi[e.keyCode])&&b!=s?(d(m[a+Jr(b,e,!0)])||e.shiftKey&&(w=ks[e.keyCode])!=s&&w!=b&&d(m[a+Jr(w,e,!1)]))&&(c=!0):o&&e.shiftKey&&d(m[a+Jr(s,e,!0)])&&(c=!0),!c&&d(m._any)&&(c=!0)),h&&(c=!0),c&&u&&e.stopPropagation(),Ba=null,c}class Ls{constructor(e,t,n,s,r){this.className=e,this.left=t,this.top=n,this.width=s,this.height=r}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,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let r=hp(e);return[new Ls(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Dk(e,t,n)}}function hp(i){let e=i.scrollDOM.getBoundingClientRect();return{left:(i.textDirection==Ze.LTR?e.left:e.right-i.scrollDOM.clientWidth*i.scaleX)-i.scrollDOM.scrollLeft*i.scaleX,top:e.top-i.scrollDOM.scrollTop*i.scaleY}}function up(i,e,t,n){let s=i.coordsAtPos(e,t*2);if(!s)return n;let r=i.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,a=i.posAtCoords({x:r.left+1,y:o}),c=i.posAtCoords({x:r.right-1,y:o});return a==null||c==null?n:{from:Math.max(n.from,Math.min(a,c)),to:Math.min(n.to,Math.max(a,c))}}function Dk(i,e,t){if(t.to<=i.viewport.from||t.from>=i.viewport.to)return[];let n=Math.max(t.from,i.viewport.from),s=Math.min(t.to,i.viewport.to),r=i.textDirection==Ze.LTR,o=i.contentDOM,a=o.getBoundingClientRect(),c=hp(i),h=o.querySelector(".cm-line"),u=h&&window.getComputedStyle(h),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),m=Aa(i,n),b=Aa(i,s),w=m.type==wt.Text?m:null,g=b.type==wt.Text?b:null;if(w&&(i.lineWrapping||m.widgetLineBreaks)&&(w=up(i,n,1,w)),g&&(i.lineWrapping||b.widgetLineBreaks)&&(g=up(i,s,-1,g)),w&&g&&w.from==g.from&&w.to==g.to)return O(C(t.from,t.to,w));{let E=w?C(t.from,null,w):y(m,!1),x=g?C(null,t.to,g):y(b,!0),k=[];return(w||m).to<(g||b).from-(w&&g?1:0)||m.widgetLineBreaks>1&&E.bottom+i.defaultLineHeight/2<x.top?k.push(p(f,E.bottom,d,x.top)):E.bottom<x.top&&i.elementAtHeight((E.bottom+x.top)/2).type==wt.Text&&(E.bottom=x.top=(E.bottom+x.top)/2),O(E).concat(k).concat(O(x))}function p(E,x,k,P){return new Ls(e,E-c.left,x-c.top,k-E,P-x)}function O({top:E,bottom:x,horizontal:k}){let P=[];for(let N=0;N<k.length;N+=2)P.push(p(k[N],E,k[N+1],x));return P}function C(E,x,k){let P=1e9,N=-1e9,_=[];function A(T,I,B,U,Z){let K=i.coordsAtPos(T,T==k.to?-2:2),X=i.coordsAtPos(B,B==k.from?2:-2);!K||!X||(P=Math.min(K.top,X.top,P),N=Math.max(K.bottom,X.bottom,N),Z==Ze.LTR?_.push(r&&I?f:K.left,r&&U?d:X.right):_.push(!r&&U?f:X.left,!r&&I?d:K.right))}let S=E??k.from,M=x??k.to;for(let T of i.visibleRanges)if(T.to>S&&T.from<M)for(let I=Math.max(T.from,S),B=Math.min(T.to,M);;){let U=i.state.doc.lineAt(I);for(let Z of i.bidiSpans(U)){let K=Z.from+U.from,X=Z.to+U.from;if(K>=B)break;X>I&&A(Math.max(K,I),E==null&&K<=S,Math.min(X,B),x==null&&X>=M,Z.dir)}if(I=U.to+1,I>=B)break}return _.length==0&&A(S,E==null,M,x==null,i.textDirection),{top:P,bottom:N,horizontal:_}}function y(E,x){let k=a.top+(x?E.top:E.bottom);return{top:k,bottom:k,horizontal:[]}}}function vk(i,e){return i.constructor==e.constructor&&i.eq(e)}class Zk{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(eo)!=e.state.facet(eo)&&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,n=e.facet(eo);for(;t<n.length&&n[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,n)=>!vk(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const eo=ce.define();function fp(i){return[Ge.define(e=>new Zk(e,i)),eo.of(i)]}const dp=!(oe.ios&&oe.webkit&&oe.webkit_version<534),Ms=ce.define({combine(i){return hi(i,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Ik(i={}){return[Ms.of(i),Uk,Fk,jk,dd.of(!0)]}function pp(i){return i.startState.facet(Ms)!=i.state.facet(Ms)}const Uk=fp({above:!0,markers(i){let{state:e}=i,t=e.facet(Ms),n=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||dp:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=s.empty?s:j.cursor(s.head,s.head>s.anchor?-1:1);for(let c of Ls.forRange(i,o,a))n.push(c)}}return n},update(i,e){i.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=pp(i);return t&&mp(i.state,e),i.docChanged||i.selectionSet||t},mount(i,e){mp(e.state,i)},class:"cm-cursorLayer"});function mp(i,e){e.style.animationDuration=i.facet(Ms).cursorBlinkRate+"ms"}const Fk=fp({above:!1,markers(i){return i.state.selection.ranges.map(e=>e.empty?[]:Ls.forRange(i,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(i,e){return i.docChanged||i.selectionSet||i.viewportChanged||pp(i)},class:"cm-selectionLayer"}),Da={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};dp&&(Da[".cm-line"].caretColor=Da[".cm-content"].caretColor="transparent !important");const jk=ji.highest(se.theme(Da)),gp=we.define({map(i,e){return i==null?null:e.mapPos(i)}}),Bs=rt.define({create(){return null},update(i,e){return i!=null&&(i=e.changes.mapPos(i)),e.effects.reduce((t,n)=>n.is(gp)?n.value:t,i)}}),qk=Ge.fromClass(class{constructor(i){this.view=i,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(i){var e;let t=i.state.field(Bs);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"),(i.startState.field(Bs)!=t||i.docChanged||i.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:i}=this,e=i.state.field(Bs),t=e!=null&&i.coordsAtPos(e);if(!t)return null;let n=i.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+i.scrollDOM.scrollLeft*i.scaleX,top:t.top-n.top+i.scrollDOM.scrollTop*i.scaleY,height:t.bottom-t.top}}drawCursor(i){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;i?(this.cursor.style.left=i.left/e+"px",this.cursor.style.top=i.top/t+"px",this.cursor.style.height=i.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(i){this.view.state.field(Bs)!=i&&this.view.dispatch({effects:gp.of(i)})}},{eventObservers:{dragover(i){this.setDropPos(this.view.posAtCoords({x:i.clientX,y:i.clientY}))},dragleave(i){(i.target==this.view.contentDOM||!this.view.contentDOM.contains(i.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Xk(){return[Bs,qk]}function Op(i,e,t,n,s){e.lastIndex=0;for(let r=i.iterRange(t,n),o=t,a;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;a=e.exec(r.value);)s(o+a.index,a)}function Wk(i,e){let t=i.visibleRanges;if(t.length==1&&t[0].from==i.viewport.from&&t[0].to==i.viewport.to)return t;let n=[];for(let{from:s,to:r}of t)s=Math.max(i.state.doc.lineAt(s).from,s-e),r=Math.min(i.state.doc.lineAt(r).to,r+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}class Yk{constructor(e){const{regexp:t,decoration:n,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(a,c,h,u)=>s(u,h,h+a[0].length,a,c);else if(typeof n=="function")this.addMatch=(a,c,h,u)=>{let f=n(a,c,h);f&&u(h,h+a[0].length,f)};else if(n)this.addMatch=(a,c,h,u)=>u(h,h+a[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Qi,n=t.add.bind(t);for(let{from:s,to:r}of Wk(e,this.maxLength))Op(e.state.doc,this.regexp,s,r,(o,a)=>this.addMatch(a,e,o,n));return t.finish()}updateDeco(e,t){let n=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),s=Math.max(c,s))}),e.viewportMoved||s-n>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),n,s):t}updateRange(e,t,n,s){for(let r of e.visibleRanges){let o=Math.max(r.from,n),a=Math.min(r.to,s);if(a>o){let c=e.state.doc.lineAt(o),h=c.to<a?e.state.doc.lineAt(a):c,u=Math.max(r.from,c.from),f=Math.min(r.to,h.to);if(this.boundary){for(;o>c.from;o--)if(this.boundary.test(c.text[o-1-c.from])){u=o;break}for(;a<h.to;a++)if(this.boundary.test(h.text[a-h.from])){f=a;break}}let d=[],m,b=(w,g,p)=>d.push(p.range(w,g));if(c==h)for(this.regexp.lastIndex=u-c.from;(m=this.regexp.exec(c.text))&&m.index<f-c.from;)this.addMatch(m,e,m.index+c.from,b);else Op(e.state.doc,this.regexp,u,f,(w,g)=>this.addMatch(g,e,w,b));t=t.update({filterFrom:u,filterTo:f,filter:(w,g)=>w<u||g>f,add:d})}}return t}}const va=/x/.unicode!=null?"gu":"g",zk=new RegExp(`[\0-\b
31
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,va),Gk={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 Za=null;function Hk(){var i;if(Za==null&&typeof document<"u"&&document.body){let e=document.body.style;Za=((i=e.tabSize)!==null&&i!==void 0?i:e.MozTabSize)!=null}return Za||!1}const to=ce.define({combine(i){let e=hi(i,{render:null,specialChars:zk,addSpecialChars:null});return(e.replaceTabs=!Hk())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,va)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,va)),e}});function Kk(i={}){return[to.of(i),Jk()]}let _p=null;function Jk(){return _p||(_p=Ge.fromClass(class{constructor(i){this.view=i,this.decorations=de.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(i.state.facet(to)),this.decorations=this.decorator.createDeco(i)}makeDecorator(i){return new Yk({regexp:i.specialChars,decoration:(e,t,n)=>{let{doc:s}=t.state,r=Ct(e[0],0);if(r==9){let o=s.lineAt(n),a=t.state.tabSize,c=Ln(o.text,a,n-o.from);return de.replace({widget:new nx((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=de.replace({widget:new ix(i,r)}))},boundary:i.replaceTabs?void 0:/[^]/})}update(i){let e=i.state.facet(to);i.startState.facet(to)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(i.view)):this.decorations=this.decorator.updateDeco(i,this.decorations)}},{decorations:i=>i.decorations}))}const ex="•";function tx(i){return i>=32?ex:i==10?"␤":String.fromCharCode(9216+i)}class ix extends fi{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=tx(this.code),n=e.state.phrase("Control character")+" "+(Gk[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,n,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=n,r.setAttribute("aria-label",n),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class nx extends fi{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 sx(){return ox}const rx=de.line({class:"cm-activeLine"}),ox=Ge.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.docChanged||i.selectionSet)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=-1,t=[];for(let n of i.state.selection.ranges){let s=i.lineBlockAt(n.head);s.from>e&&(t.push(rx.range(s.from)),e=s.from)}return de.set(t)}},{decorations:i=>i.decorations});class lx extends fi{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Mn(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),s=Cs(t[0],n.direction!="rtl"),r=parseInt(n.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function ax(i){return Ge.fromClass(class{constructor(e){this.view=e,this.placeholder=i?de.set([de.widget({widget:new lx(i),side:1}).range(0)]):de.none}get decorations(){return this.view.state.doc.length?de.none:this.placeholder}},{decorations:e=>e.decorations})}const Ia=2e3;function cx(i,e,t){let n=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Ia||t.off>Ia||e.col<0||t.col<0){let o=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let c=n;c<=s;c++){let h=i.doc.line(c);h.length<=a&&r.push(j.range(h.from+o,h.to+a))}}else{let o=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let c=n;c<=s;c++){let h=i.doc.line(c),u=ea(h.text,o,i.tabSize,!0);if(u<0)r.push(j.cursor(h.to));else{let f=ea(h.text,a,i.tabSize);r.push(j.range(h.from+u,h.from+f))}}}return r}function hx(i,e){let t=i.coordsAtPos(i.viewport.from);return t?Math.round(Math.abs((t.left-e)/i.defaultCharacterWidth)):-1}function bp(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1),n=i.state.doc.lineAt(t),s=t-n.from,r=s>Ia?-1:s==n.length?hx(i,e.clientX):Ln(n.text,i.state.tabSize,t-n.from);return{line:n.number,col:r,off:s}}function ux(i,e){let t=bp(i,e),n=i.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},n=n.map(s.changes)}},get(s,r,o){let a=bp(i,s);if(!a)return n;let c=cx(i.state,t,a);return c.length?o?j.create(c.concat(n.ranges)):j.create(c):n}}:null}function fx(i){let e=(i==null?void 0:i.eventFilter)||(t=>t.altKey&&t.button==0);return se.mouseSelectionStyle.of((t,n)=>e(n)?ux(t,n):null)}const dx={Alt:[18,i=>!!i.altKey],Control:[17,i=>!!i.ctrlKey],Shift:[16,i=>!!i.shiftKey],Meta:[91,i=>!!i.metaKey]},px={style:"cursor: crosshair"};function mx(i={}){let[e,t]=dx[i.key||"Alt"],n=Ge.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[n,se.contentAttributes.of(s=>{var r;return!((r=s.plugin(n))===null||r===void 0)&&r.isDown?px:null})]}const Ds="-10000px";class yp{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=n(o,r))}update(e,t){var n;let s=e.state.facet(this.facet),r=s.filter(c=>c);if(s===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let o=[],a=t?[]:null;for(let c=0;c<r.length;c++){let h=r[c],u=-1;if(h){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==h.create&&(u=f)}if(u<0)o[c]=this.createTooltipView(h,c?o[c-1]:null),a&&(a[c]=!!h.above);else{let f=o[c]=this.tooltipViews[u];a&&(a[c]=t[u]),f.update&&f.update(e)}}}for(let c of this.tooltipViews)o.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(a.forEach((c,h)=>t[h]=c),t.length=a.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function gx(i){let{win:e}=i;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Ua=ce.define({combine:i=>{var e,t,n;return{position:oe.ios?"absolute":((e=i.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=i.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=i.find(s=>s.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||gx}}}),wp=new WeakMap,Fa=Ge.fromClass(class{constructor(i){this.view=i,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=i.state.facet(Ua);this.position=e.position,this.parent=e.parent,this.classes=i.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 yp(i,ja,(t,n)=>this.createTooltip(t,n),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(),i.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 i of this.manager.tooltipViews)this.intersectionObserver.observe(i.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(i){i.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(i,this.above);e&&this.observeIntersection();let t=e||i.geometryChanged,n=i.state.facet(Ua);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(i,e){let t=i.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),i.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Ds,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var i,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(i=n.destroy)===null||i===void 0||i.call(n);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 i=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(oe.gecko)t=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==Ds&&r.style.left=="0px"){let o=r.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(t||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(i=r.width/this.parent.offsetWidth,e=r.height/this.parent.offsetHeight)}else({scaleX:i,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=xa(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Ua).tooltipSpace(this.view),scaleX:i,scaleY:e,makeAbsolute:t}}writeMeasure(i){var e;if(i.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:n,scaleX:s,scaleY:r}=i,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:u}=h,f=i.pos[a],d=i.size[a];if(!f||c.clip!==!1&&(f.bottom<=Math.max(t.top,n.top)||f.top>=Math.min(t.bottom,n.bottom)||f.right<Math.max(t.left,n.left)-.1||f.left>Math.min(t.right,n.right)+.1)){u.style.top=Ds;continue}let m=c.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,b=m?7:0,w=d.right-d.left,g=(e=wp.get(h))!==null&&e!==void 0?e:d.bottom-d.top,p=h.offset||_x,O=this.view.textDirection==Ze.LTR,C=d.width>n.right-n.left?O?n.left:n.right-d.width:O?Math.max(n.left,Math.min(f.left-(m?14:0)+p.x,n.right-w)):Math.min(Math.max(n.left,f.left-w+(m?14:0)-p.x),n.right-w),y=this.above[a];!c.strictSide&&(y?f.top-g-b-p.y<n.top:f.bottom+g+b+p.y>n.bottom)&&y==n.bottom-f.bottom>f.top-n.top&&(y=this.above[a]=!y);let E=(y?f.top-n.top:n.bottom-f.bottom)-b;if(E<g&&h.resize!==!1){if(E<this.view.defaultLineHeight){u.style.top=Ds;continue}wp.set(h,g),u.style.height=(g=E)/r+"px"}else u.style.height&&(u.style.height="");let x=y?f.top-g-b-p.y:f.bottom+b+p.y,k=C+w;if(h.overlap!==!0)for(let P of o)P.left<k&&P.right>C&&P.top<x+g&&P.bottom>x&&(x=y?P.top-g-2-b:P.bottom+b+2);if(this.position=="absolute"?(u.style.top=(x-i.parent.top)/r+"px",kp(u,(C-i.parent.left)/s)):(u.style.top=x/r+"px",kp(u,C/s)),m){let P=f.left+(O?p.x:-p.x)-(C+14-7);m.style.left=P/s+"px"}h.overlap!==!0&&o.push({left:C,top:x,right:k,bottom:x+g}),u.classList.toggle("cm-tooltip-above",y),u.classList.toggle("cm-tooltip-below",!y),h.positioned&&h.positioned(i.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 i of this.manager.tooltipViews)i.dom.style.top=Ds}},{eventObservers:{scroll(){this.maybeMeasure()}}});function kp(i,e){let t=parseInt(i.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(i.style.left=e+"px")}const Ox=se.baseTheme({".cm-tooltip":{zIndex:500,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"}}}),_x={x:0,y:0},ja=ce.define({enables:[Fa,Ox]}),io=ce.define({combine:i=>i.reduce((e,t)=>e.concat(t),[])});class no{static create(e){return new no(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new yp(e,io,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}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 n of this.manager.tooltipViews){let s=n[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)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 bx=ja.compute([io],i=>{let e=i.facet(io);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:no.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class yx{constructor(e,t,n,s,r){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=r,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,n=e.docView.nearest(t.target);if(!n)return;let s,r=1;if(n instanceof Wi)s=n.posAtStart;else{if(s=e.posAtCoords(t),s==null)return;let a=e.coordsAtPos(s);if(!a||t.y<a.top||t.y>a.bottom||t.x<a.left-e.defaultCharacterWidth||t.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(s)).find(u=>u.from<=s&&u.to>=s),h=c&&c.dir==Ze.RTL?-1:1;r=t.x<a.left?-h:h}let o=this.source(e,s,r);if(o!=null&&o.then){let a=this.pending={pos:s};o.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>Qt(e.state,c,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Fa),t=e?e.manager.tooltips.findIndex(n=>n.create==no.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;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:s,tooltip:r}=this;if(s.length&&r&&!wx(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,a=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!kx(this.view,o,a,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:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.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 so=4;function wx(i,e){let{left:t,right:n,top:s,bottom:r}=i.getBoundingClientRect(),o;if(o=i.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();s=Math.min(a.top,s),r=Math.max(a.bottom,r)}return e.clientX>=t-so&&e.clientX<=n+so&&e.clientY>=s-so&&e.clientY<=r+so}function kx(i,e,t,n,s,r){let o=i.scrollDOM.getBoundingClientRect(),a=i.documentTop+i.documentPadding.top+i.contentHeight;if(o.left>n||o.right<n||o.top>s||Math.min(o.bottom,a)<s)return!1;let c=i.posAtCoords({x:n,y:s},!1);return c>=e&&c<=t}function xx(i,e={}){let t=we.define(),n=rt.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let a of s){let c=r.changes.mapPos(a.pos,-1,ft.TrackDel);if(c!=null){let h=Object.assign(Object.create(null),a);h.pos=c,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(Sx)&&(s=[]);return s},provide:s=>io.from(s)});return{active:n,extension:[n,Ge.define(s=>new yx(s,i,n,t,e.hoverTime||300)),bx]}}function xp(i,e){let t=i.plugin(Fa);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const Sx=we.define(),Sp=ce.define({combine(i){let e,t;for(let n of i)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function vs(i,e){let t=i.plugin(Cp),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const Cp=Ge.fromClass(class{constructor(i){this.input=i.state.facet(Zs),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(i));let e=i.state.facet(Sp);this.top=new ro(i,!0,e.topContainer),this.bottom=new ro(i,!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(i){let e=i.state.facet(Sp);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ro(i.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ro(i.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=i.state.facet(Zs);if(t!=this.input){let n=t.filter(c=>c),s=[],r=[],o=[],a=[];for(let c of n){let h=this.specs.indexOf(c),u;h<0?(u=c(i.view),a.push(u)):(u=this.panels[h],u.update&&u.update(i)),s.push(u),(u.top?r:o).push(u)}this.specs=n,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let n of this.panels)n.update&&n.update(i)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:i=>se.scrollMargins.of(e=>{let t=e.plugin(i);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class ro{constructor(e,t,n){this.view=e,this.top=t,this.container=n,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=Ap(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Ap(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 Ap(i){let e=i.nextSibling;return i.remove(),e}const Zs=ce.define({enables:Cp});class $i extends dn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}$i.prototype.elementClass="",$i.prototype.toDOM=void 0,$i.prototype.mapMode=ft.TrackBefore,$i.prototype.startSide=$i.prototype.endSide=-1,$i.prototype.point=!0;const oo=ce.define(),Cx=ce.define(),Ax={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ee.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Is=ce.define();function Qx(i){return[Qp(),Is.of(Object.assign(Object.assign({},Ax),i))]}const qa=ce.define({combine:i=>i.some(e=>e)});function Qp(i){let e=[Px];return i&&i.fixed===!1&&e.push(qa.of(!0)),e}const Px=Ge.fromClass(class{constructor(i){this.view=i,this.prevViewport=i.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=i.state.facet(Is).map(e=>new Tp(i,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!i.state.facet(qa),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),i.scrollDOM.insertBefore(this.dom,i.contentDOM)}update(i){if(this.updateGutters(i)){let e=this.prevViewport,t=i.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}i.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(qa)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=i.view.viewport}syncGutters(i){let e=this.dom.nextSibling;i&&this.dom.remove();let t=Ee.iter(this.view.state.facet(oo),this.view.viewport.from),n=[],s=this.gutters.map(r=>new Tx(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(r.type)){let o=!0;for(let a of r.type)if(a.type==wt.Text&&o){Xa(t,n,a.from);for(let c of s)c.line(this.view,a,n);o=!1}else if(a.widget)for(let c of s)c.widget(this.view,a)}else if(r.type==wt.Text){Xa(t,n,r.from);for(let o of s)o.line(this.view,r,n)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();i&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(i){let e=i.startState.facet(Is),t=i.state.facet(Is),n=i.docChanged||i.heightChanged||i.viewportChanged||!Ee.eq(i.startState.facet(oo),i.state.facet(oo),i.view.viewport.from,i.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(i)&&(n=!0);else{n=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new Tp(this.view,r)):(this.gutters[o].update(i),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return n}destroy(){for(let i of this.gutters)i.destroy();this.dom.remove()}},{provide:i=>se.scrollMargins.of(e=>{let t=e.plugin(i);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Ze.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function Pp(i){return Array.isArray(i)?i:[i]}function Xa(i,e,t){for(;i.value&&i.from<=t;)i.from==t&&e.push(i.value),i.next()}class Tx{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Ee.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let a=new Ep(e,o,r,n);s.elements.push(a),s.dom.appendChild(a.dom)}else s.elements[this.i].update(e,o,r,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];Xa(this.cursor,s,t.from),n.length&&(s=s.concat(n));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),s=n?[n]:null;for(let r of e.state.facet(Cx)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Tp{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 n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let c=r.getBoundingClientRect();o=(c.top+c.bottom)/2}else o=s.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,s)&&s.preventDefault()});this.markers=Pp(t.markers(e)),t.initialSpacer&&(this.spacer=new Ep(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=Pp(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let n=e.view.viewport;return!Ee.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Ep{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),Ex(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let n="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let a=o,c=r<t.length?t[r++]:null,h=!1;if(c){let u=c.elementClass;u&&(n+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(c)){a=f,h=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(s);let f=s.nextSibling;s.remove(),s=f}}if(!c)break;c.toDOM&&(h?s=s.nextSibling:this.dom.insertBefore(c.toDOM(e),s)),h&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function Ex(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(!i[t].compare(e[t]))return!1;return!0}const $x=ce.define(),Nx=ce.define(),Fn=ce.define({combine(i){return hi(i,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let s in t){let r=n[s],o=t[s];n[s]=r?(a,c,h)=>r(a,c,h)||o(a,c,h):o}return n}})}});class Wa extends $i{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ya(i,e){return i.state.facet(Fn).formatNumber(e,i.state)}const Rx=Is.compute([Fn],i=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet($x)},lineMarker(e,t,n){return n.some(s=>s.toDOM)?null:new Wa(Ya(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let s of e.state.facet(Nx)){let r=s(e,t,n);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Fn)!=e.state.facet(Fn),initialSpacer(e){return new Wa(Ya(e,$p(e.state.doc.lines)))},updateSpacer(e,t){let n=Ya(t.view,$p(t.view.state.doc.lines));return n==e.number?e:new Wa(n)},domEventHandlers:i.facet(Fn).domEventHandlers}));function Vx(i={}){return[Fn.of(i),Qp(),Rx]}function $p(i){let e=9;for(;e<i;)e=e*10+9;return e}const Lx=new class extends $i{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Mx=oo.compute(["selection"],i=>{let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head).from;s>t&&(t=s,e.push(Lx.range(s)))}return Ee.of(e)});function Bx(){return Mx}const Np=1024;let Dx=0;class za{constructor(e,t){this.from=e,this.to=t}}class xe{constructor(e={}){this.id=Dx++,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=Pt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}xe.closedBy=new xe({deserialize:i=>i.split(" ")}),xe.openedBy=new xe({deserialize:i=>i.split(" ")}),xe.group=new xe({deserialize:i=>i.split(" ")}),xe.isolate=new xe({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}}),xe.contextHash=new xe({perNode:!0}),xe.lookAhead=new xe({perNode:!0}),xe.mounted=new xe({perNode:!0});class lo{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[xe.mounted.id]}}const vx=Object.create(null);class Pt{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):vx,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Pt(e.name||"",t,e.id,n);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[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(xe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return n=>{for(let s=n.prop(xe.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?n.name:s[r]];if(o)return o}}}}Pt.none=new Pt("",Object.create(null),0,8);class Ga{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 n of this.types){let s=null;for(let r of e){let o=r(n);o&&(s||(s=Object.assign({},n.props)),s[o[0].id]=o[1])}t.push(s?new Pt(n.name,s,n.id,n.flags):n)}return new Ga(t)}}const ao=new WeakMap,Rp=new WeakMap;var nt;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays"})(nt||(nt={}));class et{constructor(e,t,n,s,r){if(this.type=e,this.children=t,this.positions=n,this.length=s,this.props=null,r&&r.length){this.props=Object.create(null);for(let[o,a]of r)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=lo.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let s=n.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 Ja(this.topNode,e)}cursorAt(e,t=0,n=0){let s=ao.get(this)||this.topNode,r=new Ja(s);return r.moveTo(e,t),ao.set(this,r._tree),r}get topNode(){return new Tt(this,0,0,null)}resolve(e,t=0){let n=Us(ao.get(this)||this.topNode,e,t,!1);return ao.set(this,n),n}resolveInner(e,t=0){let n=Us(Rp.get(this)||this.topNode,e,t,!0);return Rp.set(this,n),n}resolveStack(e,t=0){return Ux(this,e,t)}iterate(e){let{enter:t,leave:n,from:s=0,to:r=this.length}=e,o=e.mode||0,a=(o&nt.IncludeAnonymous)>0;for(let c=this.cursor(o|nt.IncludeAnonymous);;){let h=!1;if(c.from<=r&&c.to>=s&&(!a&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&n&&(a||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;h=!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:tc(Pt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,s)=>new et(this.type,t,n,s,this.propValues),e.makeTree||((t,n,s)=>new et(Pt.none,t,n,s)))}static build(e){return Fx(e)}}et.empty=new et(Pt.none,[],[],0);class Ha{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 Ha(this.buffer,this.index)}}class Hi{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Pt.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],n=this.buffer[e+3],s=this.set.types[t],r=s.name;if(/\W/.test(r)&&!s.isError&&(r=JSON.stringify(r)),e+=4,n==e)return r;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return r+"("+o.join(",")+")"}findChild(e,t,n,s,r){let{buffer:o}=this,a=-1;for(let c=e;c!=t&&!(Vp(r,s,o[c+1],o[c+2])&&(a=c,n>0));c=o[c+3]);return a}slice(e,t,n){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let a=e,c=0;a<t;){r[c++]=s[a++],r[c++]=s[a++]-n;let h=r[c++]=s[a++]-n;r[c++]=s[a++]-e,o=Math.max(o,h)}return new Hi(r,o,this.set)}}function Vp(i,e,t,n){switch(i){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function Us(i,e,t,n){for(var s;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to<e);){let o=!n&&i instanceof Tt&&i.index<0?null:i.parent;if(!o)return i;i=o}let r=n?0:nt.IgnoreOverlays;if(n)for(let o=i,a=o.parent;a;o=a,a=o.parent)o instanceof Tt&&o.index<0&&((s=a.enter(e,t,r))===null||s===void 0?void 0:s.from)!=o.from&&(i=a);for(;;){let o=i.enter(e,t,r);if(!o)return i;i=o}}class Lp{cursor(e=0){return new Ja(this,e)}getChild(e,t=null,n=null){let s=Mp(this,e,t,n);return s.length?s[0]:null}getChildren(e,t=null,n=null){return Mp(this,e,t,n)}resolve(e,t=0){return Us(this,e,t,!1)}resolveInner(e,t=0){return Us(this,e,t,!0)}matchContext(e){return Ka(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let s=t.lastChild;if(!s||s.to!=t.to)break;s.type.isError&&s.from==s.to?(n=t,t=s.prevSibling):t=s}return n}get node(){return this}get next(){return this.parent}}class Tt extends Lp{constructor(e,t,n,s){super(),this._tree=e,this.from=t,this.index=n,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,n,s,r=0){for(let o=this;;){for(let{children:a,positions:c}=o._tree,h=t>0?a.length:-1;e!=h;e+=t){let u=a[e],f=c[e]+o.from;if(Vp(s,n,f,f+u.length)){if(u instanceof Hi){if(r&nt.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,t,n-f,s);if(d>-1)return new mi(new Zx(o,u,e,f),null,d)}else if(r&nt.IncludeAnonymous||!u.type.isAnonymous||ec(u)){let d;if(!(r&nt.IgnoreMounts)&&(d=lo.get(u))&&!d.overlay)return new Tt(d.tree,f,e,o);let m=new Tt(u,f,e,o);return r&nt.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(t<0?u.children.length-1:0,t,n,s)}}}if(r&nt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))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,n=0){let s;if(!(n&nt.IgnoreOverlays)&&(s=lo.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:a}of s.overlay)if((t>0?o<=r:o<r)&&(t<0?a>=r:a>r))return new Tt(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}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 Mp(i,e,t,n){let s=i.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(n!=null&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return n==null?r:[]}}function Ka(i,e,t=e.length-1){for(let n=i;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class Zx{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class mi extends Lp{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,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return r<0?null:new mi(this.context,this,r)}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,n=0){if(n&nt.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new mi(this.context,this,r)}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 mi(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 mi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,s=this.index+4,r=n.buffer[this.index+3];if(r>s){let o=n.buffer[this.index+1];e.push(n.slice(s,r,o)),t.push(0)}return new et(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Bp(i){if(!i.length)return null;let e=0,t=i[0];for(let r=1;r<i.length;r++){let o=i[r];(o.from>t.from||o.to<t.to)&&(t=o,e=r)}let n=t instanceof Tt&&t.index<0?null:t.parent,s=i.slice();return n?s[e]=n:s.splice(e,1),new Ix(s,t)}class Ix{constructor(e,t){this.heads=e,this.node=t}get next(){return Bp(this.heads)}}function Ux(i,e,t){let n=i.resolveInner(e,t),s=null;for(let r=n instanceof Tt?n:n.context.parent;r;r=r.parent)if(r.index<0){let o=r.parent;(s||(s=[n])).push(o.resolve(e,t)),r=o}else{let o=lo.get(r.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Tt(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[n])).push(Us(a,e,t,!1))}}return s?Bp(s):n}class Ja{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 Tt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.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:n,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=n+s.buffer[e+1],this.to=n+s.buffer[e+2],!0}yield(e){return e?e instanceof Tt?(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,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}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,n=this.mode){return this.buffer?n&nt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&nt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&nt.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,n=this.stack.length-1;if(e<0){let s=n<0?0:this.stack[n]+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<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<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,n,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let r=0;r<this.index;r++)if(s.buffer.buffer[r+3]<this.index)return!1;({index:t,parent:n}=s)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let a=n._tree.children[r];if(this.mode&nt.IncludeAnonymous||a instanceof Hi||!a.type.isAnonymous||ec(a))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,n=0;if(e&&e.context==this.buffer)e:for(let s=this.index,r=this.stack.length;r>=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,n=r+1;break e}s=this.stack[--r]}for(let s=n;s<this.stack.length;s++)t=new mi(this.buffer,t,this.stack[s]);return this.bufferNode=new mi(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&t&&t(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(e){if(!this.buffer)return Ka(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let s=e.length-1,r=this.stack.length-1;s>=0;r--){if(r<0)return Ka(this._tree,e,s);let o=n[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function ec(i){return i.children.some(e=>e instanceof Hi||!e.type.isAnonymous||ec(e))}function Fx(i){var e;let{buffer:t,nodeSet:n,maxBufferLength:s=Np,reused:r=[],minRepeatType:o=n.types.length}=i,a=Array.isArray(t)?new Ha(t,t.length):t,c=n.types,h=0,u=0;function f(E,x,k,P,N,_){let{id:A,start:S,end:M,size:T}=a,I=u,B=h;for(;T<0;)if(a.next(),T==-1){let J=r[A];k.push(J),P.push(S-E);return}else if(T==-3){h=A;return}else if(T==-4){u=A;return}else throw new RangeError(`Unrecognized record size: ${T}`);let U=c[A],Z,K,X=S-E;if(M-S<=s&&(K=g(a.pos-x,N))){let J=new Uint16Array(K.size-K.skip),fe=a.pos-K.size,he=J.length;for(;a.pos>fe;)he=p(K.start,J,he);Z=new Hi(J,M-K.start,n),X=K.start-E}else{let J=a.pos-T;a.next();let fe=[],he=[],ye=A>=o?A:-1,z=0,D=M;for(;a.pos>J;)ye>=0&&a.id==ye&&a.size>=0?(a.end<=D-s&&(b(fe,he,S,z,a.end,D,ye,I,B),z=fe.length,D=a.end),a.next()):_>2500?d(S,J,fe,he):f(S,J,fe,he,ye,_+1);if(ye>=0&&z>0&&z<fe.length&&b(fe,he,S,z,S,D,ye,I,B),fe.reverse(),he.reverse(),ye>-1&&z>0){let V=m(U,B);Z=tc(U,fe,he,0,fe.length,0,M-S,V,V)}else Z=w(U,fe,he,M-S,I-M,B)}k.push(Z),P.push(X)}function d(E,x,k,P){let N=[],_=0,A=-1;for(;a.pos>x;){let{id:S,start:M,end:T,size:I}=a;if(I>4)a.next();else{if(A>-1&&M<A)break;A<0&&(A=T-s),N.push(S,M,T),_++,a.next()}}if(_){let S=new Uint16Array(_*4),M=N[N.length-2];for(let T=N.length-3,I=0;T>=0;T-=3)S[I++]=N[T],S[I++]=N[T+1]-M,S[I++]=N[T+2]-M,S[I++]=I;k.push(new Hi(S,N[2]-M,n)),P.push(M-E)}}function m(E,x){return(k,P,N)=>{let _=0,A=k.length-1,S,M;if(A>=0&&(S=k[A])instanceof et){if(!A&&S.type==E&&S.length==N)return S;(M=S.prop(xe.lookAhead))&&(_=P[A]+S.length+M)}return w(E,k,P,N,_,x)}}function b(E,x,k,P,N,_,A,S,M){let T=[],I=[];for(;E.length>P;)T.push(E.pop()),I.push(x.pop()+k-N);E.push(w(n.types[A],T,I,_-N,S-_,M)),x.push(N-k)}function w(E,x,k,P,N,_,A){if(_){let S=[xe.contextHash,_];A=A?[S].concat(A):[S]}if(N>25){let S=[xe.lookAhead,N];A=A?[S].concat(A):[S]}return new et(E,x,k,P,A)}function g(E,x){let k=a.fork(),P=0,N=0,_=0,A=k.end-s,S={size:0,start:0,skip:0};e:for(let M=k.pos-E;k.pos>M;){let T=k.size;if(k.id==x&&T>=0){S.size=P,S.start=N,S.skip=_,_+=4,P+=4,k.next();continue}let I=k.pos-T;if(T<0||I<M||k.start<A)break;let B=k.id>=o?4:0,U=k.start;for(k.next();k.pos>I;){if(k.size<0)if(k.size==-3)B+=4;else break e;else k.id>=o&&(B+=4);k.next()}N=U,P+=T,_+=B}return(x<0||P==E)&&(S.size=P,S.start=N,S.skip=_),S.size>4?S:void 0}function p(E,x,k){let{id:P,start:N,end:_,size:A}=a;if(a.next(),A>=0&&P<o){let S=k;if(A>4){let M=a.pos-(A-4);for(;a.pos>M;)k=p(E,x,k)}x[--k]=S,x[--k]=_-E,x[--k]=N-E,x[--k]=P}else A==-3?h=P:A==-4&&(u=P);return k}let O=[],C=[];for(;a.pos>0;)f(i.start||0,i.bufferStart||0,O,C,-1,0);let y=(e=i.length)!==null&&e!==void 0?e:O.length?C[0]+O[0].length:0;return new et(c[i.topID],O.reverse(),C.reverse(),y)}const Dp=new WeakMap;function co(i,e){if(!i.isAnonymous||e instanceof Hi||e.type!=i)return 1;let t=Dp.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=i||!(n instanceof et)){t=1;break}t+=co(i,n)}Dp.set(e,t)}return t}function tc(i,e,t,n,s,r,o,a,c){let h=0;for(let b=n;b<s;b++)h+=co(i,e[b]);let u=Math.ceil(h*1.5/8),f=[],d=[];function m(b,w,g,p,O){for(let C=g;C<p;){let y=C,E=w[C],x=co(i,b[C]);for(C++;C<p;C++){let k=co(i,b[C]);if(x+k>=u)break;x+=k}if(C==y+1){if(x>u){let k=b[y];m(k.children,k.positions,0,k.children.length,w[y]+O);continue}f.push(b[y])}else{let k=w[C-1]+b[C-1].length-E;f.push(tc(i,b,w,y,C,E,k,null,c))}d.push(E+O-r)}}return m(e,t,n,s,0),(a||c)(f,d,o)}class jx{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof mi?this.setBuffer(e.context.buffer,e.index,t):e instanceof Tt&&this.map.set(e.tree,t)}get(e){return e instanceof mi?this.getBuffer(e.context.buffer,e.index):e instanceof Tt?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 On{constructor(e,t,n,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new On(0,e.length,e,0,!1,n)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let a=0,c=0,h=0;;a++){let u=a<t.length?t[a]:null,f=u?u.fromA:1e9;if(f-c>=n)for(;o&&o.from<f;){let d=o;if(c>=d.from||f<=d.to||h){let m=Math.max(d.from,c)-h,b=Math.min(d.to,f)-h;d=m>=b?null:new On(m,b,d.tree,d.offset+h,a>0,!!u)}if(d&&s.push(d),o.to>f)break;o=r<e.length?e[r++]:null}if(!u)break;c=u.toA,h=u.toA-u.toB}return s}}class vp{startParse(e,t,n){return typeof e=="string"&&(e=new qx(e)),n=n?n.length?n.map(s=>new za(s.from,s.to)):[new za(0,0)]:[new za(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let r=s.advance();if(r)return r}}}class qx{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 xe({perNode:!0});let Xx=0;class Ft{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=Xx++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof Ft&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new Ft(n,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new ho(e);return n=>n.modified.indexOf(t)>-1?n:ho.get(n.base||n,n.modified.concat(t).sort((s,r)=>s.id-r.id))}}let Wx=0;class ho{constructor(e){this.name=e,this.instances=[],this.id=Wx++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(a=>a.base==e&&Yx(t,a.modified));if(n)return n;let s=[],r=new Ft(e.name,s,e,t);for(let a of t)a.instances.push(r);let o=zx(t);for(let a of e.set)if(!a.modified.length)for(let c of o)s.push(ho.get(a,c));return r}}function Yx(i,e){return i.length==e.length&&i.every((t,n)=>t==e[n])}function zx(i){let e=[[]];for(let t=0;t<i.length;t++)for(let n=0,s=e.length;n<s;n++)e.push(e[n].concat(i[t]));return e.sort((t,n)=>n.length-t.length)}function Zp(i){let e=Object.create(null);for(let t in i){let n=i[t];Array.isArray(n)||(n=[n]);for(let s of t.split(" "))if(s){let r=[],o=2,a=s;for(let f=0;;){if(a=="..."&&f>0&&f+3==s.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+s);if(r.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==s.length)break;let m=s[f++];if(f==s.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);a=s.slice(f)}let c=r.length-1,h=r[c];if(!h)throw new RangeError("Invalid path: "+s);let u=new uo(n,o,c>0?r.slice(0,c):null);e[h]=u.sort(e[h])}}return Ip.add(e)}const Ip=new xe;class uo{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,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}}uo.empty=new uo([],2,null);function Up(i,e){let t=Object.create(null);for(let r of i)if(!Array.isArray(r.tag))t[r.tag.id]=r.class;else for(let o of r.tag)t[o.id]=r.class;let{scope:n,all:s=null}=e||{};return{style:r=>{let o=s;for(let a of r)for(let c of a.set){let h=t[c.id];if(h){o=o?o+" "+h:h;break}}return o},scope:n}}function Gx(i,e){let t=null;for(let n of i){let s=n.style(e);s&&(t=t?t+" "+s:s)}return t}function Hx(i,e,t,n=0,s=i.length){let r=new Kx(n,Array.isArray(e)?e:[e],t);r.highlightRange(i.cursor(),n,s,"",r.highlighters),r.flush(s)}class Kx{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,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,n,s,r){let{type:o,from:a,to:c}=e;if(a>=n||c<=t)return;o.isTop&&(r=this.highlighters.filter(m=>!m.scope||m.scope(o)));let h=s,u=Jx(e)||uo.empty,f=Gx(r,u.tags);if(f&&(h&&(h+=" "),h+=f,u.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,a),h),u.opaque)return;let d=e.tree&&e.tree.prop(xe.mounted);if(d&&d.overlay){let m=e.node.enter(d.overlay[0].from+a,1),b=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),w=e.firstChild();for(let g=0,p=a;;g++){let O=g<d.overlay.length?d.overlay[g]:null,C=O?O.from+a:c,y=Math.max(t,p),E=Math.min(n,C);if(y<E&&w)for(;e.from<E&&(this.highlightRange(e,y,E,s,r),this.startSpan(Math.min(E,e.to),h),!(e.to>=C||!e.nextSibling())););if(!O||C>n)break;p=O.to+a,p>t&&(this.highlightRange(m.cursor(),Math.max(t,O.from+a),Math.min(n,p),"",b),this.startSpan(Math.min(n,p),h))}w&&e.parent()}else if(e.firstChild()){d&&(s="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,s,r),this.startSpan(Math.min(n,e.to),h)}while(e.nextSibling());e.parent()}}}function Jx(i){let e=i.type.prop(Ip);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}const ie=Ft.define,fo=ie(),Ki=ie(),Fp=ie(Ki),jp=ie(Ki),Ji=ie(),po=ie(Ji),ic=ie(Ji),gi=ie(),_n=ie(gi),Oi=ie(),_i=ie(),nc=ie(),Fs=ie(nc),mo=ie(),L={comment:fo,lineComment:ie(fo),blockComment:ie(fo),docComment:ie(fo),name:Ki,variableName:ie(Ki),typeName:Fp,tagName:ie(Fp),propertyName:jp,attributeName:ie(jp),className:ie(Ki),labelName:ie(Ki),namespace:ie(Ki),macroName:ie(Ki),literal:Ji,string:po,docString:ie(po),character:ie(po),attributeValue:ie(po),number:ic,integer:ie(ic),float:ie(ic),bool:ie(Ji),regexp:ie(Ji),escape:ie(Ji),color:ie(Ji),url:ie(Ji),keyword:Oi,self:ie(Oi),null:ie(Oi),atom:ie(Oi),unit:ie(Oi),modifier:ie(Oi),operatorKeyword:ie(Oi),controlKeyword:ie(Oi),definitionKeyword:ie(Oi),moduleKeyword:ie(Oi),operator:_i,derefOperator:ie(_i),arithmeticOperator:ie(_i),logicOperator:ie(_i),bitwiseOperator:ie(_i),compareOperator:ie(_i),updateOperator:ie(_i),definitionOperator:ie(_i),typeOperator:ie(_i),controlOperator:ie(_i),punctuation:nc,separator:ie(nc),bracket:Fs,angleBracket:ie(Fs),squareBracket:ie(Fs),paren:ie(Fs),brace:ie(Fs),content:gi,heading:_n,heading1:ie(_n),heading2:ie(_n),heading3:ie(_n),heading4:ie(_n),heading5:ie(_n),heading6:ie(_n),contentSeparator:ie(gi),list:ie(gi),quote:ie(gi),emphasis:ie(gi),strong:ie(gi),link:ie(gi),monospace:ie(gi),strikethrough:ie(gi),inserted:ie(),deleted:ie(),changed:ie(),invalid:ie(),meta:mo,documentMeta:ie(mo),annotation:ie(mo),processingInstruction:ie(mo),definition:Ft.defineModifier("definition"),constant:Ft.defineModifier("constant"),function:Ft.defineModifier("function"),standard:Ft.defineModifier("standard"),local:Ft.defineModifier("local"),special:Ft.defineModifier("special")};for(let i in L){let e=L[i];e instanceof Ft&&(e.name=i)}Up([{tag:L.link,class:"tok-link"},{tag:L.heading,class:"tok-heading"},{tag:L.emphasis,class:"tok-emphasis"},{tag:L.strong,class:"tok-strong"},{tag:L.keyword,class:"tok-keyword"},{tag:L.atom,class:"tok-atom"},{tag:L.bool,class:"tok-bool"},{tag:L.url,class:"tok-url"},{tag:L.labelName,class:"tok-labelName"},{tag:L.inserted,class:"tok-inserted"},{tag:L.deleted,class:"tok-deleted"},{tag:L.literal,class:"tok-literal"},{tag:L.string,class:"tok-string"},{tag:L.number,class:"tok-number"},{tag:[L.regexp,L.escape,L.special(L.string)],class:"tok-string2"},{tag:L.variableName,class:"tok-variableName"},{tag:L.local(L.variableName),class:"tok-variableName tok-local"},{tag:L.definition(L.variableName),class:"tok-variableName tok-definition"},{tag:L.special(L.variableName),class:"tok-variableName2"},{tag:L.definition(L.propertyName),class:"tok-propertyName tok-definition"},{tag:L.typeName,class:"tok-typeName"},{tag:L.namespace,class:"tok-namespace"},{tag:L.className,class:"tok-className"},{tag:L.macroName,class:"tok-macroName"},{tag:L.propertyName,class:"tok-propertyName"},{tag:L.operator,class:"tok-operator"},{tag:L.comment,class:"tok-comment"},{tag:L.meta,class:"tok-meta"},{tag:L.invalid,class:"tok-invalid"},{tag:L.punctuation,class:"tok-punctuation"}]);var sc;const jn=new xe;function qp(i){return ce.define({combine:i?e=>e.concat(i):void 0})}const rc=new xe;class Jt{constructor(e,t,n=[],s=""){this.data=e,this.name=s,Se.prototype.hasOwnProperty("tree")||Object.defineProperty(Se.prototype,"tree",{get(){return st(this)}}),this.parser=t,this.extension=[en.of(this),Se.languageData.of((r,o,a)=>{let c=Xp(r,o,a),h=c.type.prop(jn);if(!h)return[];let u=r.facet(h),f=c.type.prop(rc);if(f){let d=c.resolve(o-c.from,a);for(let m of f)if(m.test(d,r)){let b=r.facet(m.facet);return m.type=="replace"?b:b.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return Xp(e,t,n).type.prop(jn)==this.data}findRegions(e){let t=e.facet(en);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],s=(r,o)=>{if(r.prop(jn)==this.data){n.push({from:o,to:o+r.length});return}let a=r.prop(xe.mounted);if(a){if(a.tree.prop(jn)==this.data){if(a.overlay)for(let c of a.overlay)n.push({from:c.from+o,to:c.to+o});else n.push({from:o,to:o+r.length});return}else if(a.overlay){let c=n.length;if(s(a.tree,a.overlay[0].from+o),n.length>c)return}}for(let c=0;c<r.children.length;c++){let h=r.children[c];h instanceof et&&s(h,r.positions[c]+o)}};return s(st(e),0),n}get allowsNesting(){return!0}}Jt.setState=we.define();function Xp(i,e,t){let n=i.facet(en),s=st(i).topNode;if(!n||n.allowsNesting)for(let r=s;r;r=r.enter(e,t,nt.ExcludeBuffers))r.type.isTop&&(s=r);return s}class go extends Jt{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=qp(e.languageData);return new go(t,e.parser.configure({props:[jn.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new go(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function st(i){let e=i.field(Jt.state,!1);return e?e.tree:et.empty}class eS{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 n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let js=null;class Oo{constructor(e,t,n=[],s,r,o,a,c){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Oo(e,t,[],et.empty,0,n,[],null)}startParse(){return this.parser.startParse(new eS(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=et.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;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(On.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n: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(On.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=js;js=this;try{return e()}finally{js=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Wp(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:s,treeLen:r,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,u,f,d)=>c.push({fromA:h,toA:u,fromB:f,toB:d})),n=On.applyChanges(n,c),s=et.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let h of this.skipped){let u=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);u<f&&a.push({from:u,to:f})}}}return new Oo(this.parser,t,n,s,r,o,a,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 n=0;n<this.skipped.length;n++){let{from:s,to:r}=this.skipped[n];s<e.to&&r>e.from&&(this.fragments=Wp(this.fragments,s,r),this.skipped.splice(n--,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 vp{createParse(t,n,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let c=js;if(c){for(let h of s)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=o,new et(Pt.none,[],[],o-r)},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 js}}function Wp(i,e,t){return On.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}class qn{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),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new qn(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=Oo.create(e.facet(en).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new qn(n)}}Jt.state=rt.define({create:qn.init,update(i,e){for(let t of e.effects)if(t.is(Jt.setState))return t.value;return e.startState.facet(en)!=e.state.facet(en)?qn.init(e.state):i.apply(e)}});let Yp=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Yp=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const oc=typeof navigator<"u"&&(!((sc=navigator.scheduling)===null||sc===void 0)&&sc.isInputPending)?()=>navigator.scheduling.isInputPending():null,tS=Ge.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(Jt.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(Jt.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Yp(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:n,viewport:{to:s}}=this.view,r=n.field(Jt.state);if(r.tree==r.context.tree&&r.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!oc?Math.max(25,e.timeRemaining()-5):1e9),a=r.context.treeLen<s&&n.doc.length>s+1e3,c=r.context.work(()=>oc&&oc()||Date.now()>o,s+(a?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Jt.setState.of(new qn(r.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Qt(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()}}}),en=ce.define({combine(i){return i.length?i[0]:null},enables:i=>[Jt.state,tS,se.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});class iS{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const nS=ce.define(),qs=ce.define({combine:i=>{if(!i.length)return" ";let e=i[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(i[0]));return e}});function _o(i){let e=i.facet(qs);return e.charCodeAt(0)==9?i.tabSize*e.length:e.length}function Xs(i,e){let t="",n=i.tabSize,s=i.facet(qs)[0];if(s==" "){for(;e>=n;)t+=" ",e-=n;s=" "}for(let r=0;r<e;r++)t+=s;return t}function lc(i,e){i instanceof Se&&(i=new bo(i));for(let n of i.state.facet(nS)){let s=n(i,e);if(s!==void 0)return s}let t=st(i.state);return t.length>=e?sS(i,t,e):null}class bo{constructor(e,t={}){this.state=e,this.options=t,this.unit=_o(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=n.from&&s<=n.to?r&&s==e?{text:"",from:e}:(t<0?s<e:s<=e)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(e,t);return n.slice(e-s,Math.min(n.length,e+100-s))}column(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.countColumn(n,e-s),o=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return o>-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return Ln(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const zp=new xe;function sS(i,e,t){let n=e.resolveStack(t),s=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(s!=n.node){let r=[];for(let o=s;o&&!(o.from==n.node.from&&o.type==n.node.type);o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)n={node:r[o],next:n}}return Gp(n,i,t)}function Gp(i,e,t){for(let n=i;n;n=n.next){let s=oS(n.node);if(s)return s(ac.create(e,t,n))}return 0}function rS(i){return i.pos==i.options.simulateBreak&&i.options.simulateDoubleBreak}function oS(i){let e=i.type.prop(zp);if(e)return e;let t=i.firstChild,n;if(t&&(n=t.type.prop(xe.closedBy))){let s=i.lastChild,r=s&&n.indexOf(s.name)>-1;return o=>Hp(o,!0,1,void 0,r&&!rS(o)?s.from:void 0)}return i.parent==null?lS:null}function lS(){return 0}class ac extends bo{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new ac(e,t,n)}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 n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(aS(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Gp(this.context.next,this.base,this.pos)}}function aS(i,e){for(let t=e;t;t=t.parent)if(i==t)return!0;return!1}function cS(i){let e=i.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let s=i.options.simulateBreak,r=i.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let a=t.to;;){let c=e.childAfter(a);if(!c||c==n)return null;if(!c.type.isSkipped){if(c.from>=o)return null;let h=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+h}}a=c.to}}function hS({closing:i,align:e=!0,units:t=1}){return n=>Hp(n,e,t,i)}function Hp(i,e,t,n,s){let r=i.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==i.pos+o,c=e?cS(i):null;return c?a?i.column(c.from):i.column(c.to):i.baseIndent+(a?0:i.unit*t)}const uS=i=>i.baseIndent;function cc({except:i,units:e=1}={}){return t=>{let n=i&&i.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const fS=200;function dS(){return Se.transactionFilter.of(i=>{if(!i.docChanged||!i.isUserEvent("input.type")&&!i.isUserEvent("input.complete"))return i;let e=i.startState.languageDataAt("indentOnInput",i.startState.selection.main.head);if(!e.length)return i;let t=i.newDoc,{head:n}=i.newSelection.main,s=t.lineAt(n);if(n>s.from+fS)return i;let r=t.sliceString(s.from,n);if(!e.some(h=>h.test(r)))return i;let{state:o}=i,a=-1,c=[];for(let{head:h}of o.selection.ranges){let u=o.doc.lineAt(h);if(u.from==a)continue;a=u.from;let f=lc(o,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],m=Xs(o,f);d!=m&&c.push({from:u.from,to:u.from+d.length,insert:m})}return c.length?[i,{changes:c,sequential:!0}]:i})}const pS=ce.define(),Kp=new xe;function mS(i){let e=i.firstChild,t=i.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?i.to:t.from}:null}function gS(i,e,t){let n=st(i);if(n.length<t)return null;let s=n.resolveStack(t,1),r=null;for(let o=s;o;o=o.next){let a=o.node;if(a.to<=t||a.from>t)continue;if(r&&a.from<e)break;let c=a.type.prop(Kp);if(c&&(a.to<n.length-50||n.length==i.doc.length||!OS(a))){let h=c(a,i);h&&h.from<=t&&h.from>=e&&h.to>t&&(r=h)}}return r}function OS(i){let e=i.lastChild;return e&&e.to==i.to&&e.type.isError}function yo(i,e,t){for(let n of i.facet(pS)){let s=n(i,e,t);if(s)return s}return gS(i,e,t)}function Jp(i,e){let t=e.mapPos(i.from,1),n=e.mapPos(i.to,-1);return t>=n?void 0:{from:t,to:n}}const wo=we.define({map:Jp}),Ws=we.define({map:Jp});function em(i){let e=[];for(let{head:t}of i.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(i.lineBlockAt(t));return e}const bn=rt.define({create(){return de.none},update(i,e){i=i.map(e.changes);for(let t of e.effects)if(t.is(wo)&&!_S(i,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(hc),s=n?de.replace({widget:new xS(n(e.state,t.value))}):rm;i=i.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(Ws)&&(i=i.update({filter:(n,s)=>t.value.from!=n||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;i.between(n,n,(s,r)=>{s<n&&r>n&&(t=!0)}),t&&(i=i.update({filterFrom:n,filterTo:n,filter:(s,r)=>r<=n||s>=n}))}return i},provide:i=>se.decorations.from(i),toJSON(i,e){let t=[];return i.between(0,e.doc.length,(n,s)=>{t.push(n,s)}),t},fromJSON(i){if(!Array.isArray(i)||i.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<i.length;){let n=i[t++],s=i[t++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");e.push(rm.range(n,s))}return de.set(e,!0)}});function ko(i,e,t){var n;let s=null;return(n=i.field(bn,!1))===null||n===void 0||n.between(e,t,(r,o)=>{(!s||s.from>r)&&(s={from:r,to:o})}),s}function _S(i,e,t){let n=!1;return i.between(e,e,(s,r)=>{s==e&&r==t&&(n=!0)}),n}function tm(i,e){return i.field(bn,!1)?e:e.concat(we.appendConfig.of(nm()))}const bS=i=>{for(let e of em(i)){let t=yo(i.state,e.from,e.to);if(t)return i.dispatch({effects:tm(i.state,[wo.of(t),im(i,t)])}),!0}return!1},yS=i=>{if(!i.state.field(bn,!1))return!1;let e=[];for(let t of em(i)){let n=ko(i.state,t.from,t.to);n&&e.push(Ws.of(n),im(i,n,!1))}return e.length&&i.dispatch({effects:e}),e.length>0};function im(i,e,t=!0){let n=i.state.doc.lineAt(e.from).number,s=i.state.doc.lineAt(e.to).number;return se.announce.of(`${i.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${i.state.phrase("to")} ${s}.`)}const wS=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:bS},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:yS},{key:"Ctrl-Alt-[",run:i=>{let{state:e}=i,t=[];for(let n=0;n<e.doc.length;){let s=i.lineBlockAt(n),r=yo(e,s.from,s.to);r&&t.push(wo.of(r)),n=(r?i.lineBlockAt(r.to):s).to+1}return t.length&&i.dispatch({effects:tm(i.state,t)}),!!t.length}},{key:"Ctrl-Alt-]",run:i=>{let e=i.state.field(bn,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,i.state.doc.length,(n,s)=>{t.push(Ws.of({from:n,to:s}))}),i.dispatch({effects:t}),!0}}],kS={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},hc=ce.define({combine(i){return hi(i,kS)}});function nm(i){let e=[bn,AS];return i&&e.push(hc.of(i)),e}function sm(i,e){let{state:t}=i,n=t.facet(hc),s=o=>{let a=i.lineBlockAt(i.posAtDOM(o.target)),c=ko(i.state,a.from,a.to);c&&i.dispatch({effects:Ws.of(c)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(i,s,e);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const rm=de.replace({widget:new class extends fi{toDOM(i){return sm(i,null)}}});class xS extends fi{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return sm(e,this.value)}}const SS={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class uc extends $i{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 CS(i={}){let e=Object.assign(Object.assign({},SS),i),t=new uc(e,!0),n=new uc(e,!1),s=Ge.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(en)!=o.state.facet(en)||o.startState.field(bn,!1)!=o.state.field(bn,!1)||st(o.startState)!=st(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new Qi;for(let c of o.viewportLineBlocks){let h=ko(o.state,c.from,c.to)?n:yo(o.state,c.from,c.to)?t:null;h&&a.add(c.from,c.from,h)}return a.finish()}}),{domEventHandlers:r}=e;return[s,Qx({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(s))===null||a===void 0?void 0:a.markers)||Ee.empty},initialSpacer(){return new uc(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,a,c)=>{if(r.click&&r.click(o,a,c))return!0;let h=ko(o.state,a.from,a.to);if(h)return o.dispatch({effects:Ws.of(h)}),!0;let u=yo(o.state,a.from,a.to);return u?(o.dispatch({effects:wo.of(u)}),!0):!1}})}),nm()]}const AS=se.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 Ys{constructor(e,t){this.specs=e;let n;function s(a){let c=qi.newName();return(n||(n=Object.create(null)))["."+c]=a,c}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof Jt?a=>a.prop(jn)==o.data:o?a=>a==o:void 0,this.style=Up(e.map(a=>({tag:a.tag,class:a.class||s(Object.assign({},a,{tag:null}))})),{all:r}).style,this.module=n?new qi(n):null,this.themeType=t.themeType}static define(e,t){return new Ys(e,t||{})}}const fc=ce.define(),om=ce.define({combine(i){return i.length?[i[0]]:null}});function dc(i){let e=i.facet(fc);return e.length?e:i.facet(om)}function lm(i,e){let t=[PS],n;return i instanceof Ys&&(i.module&&t.push(se.styleModule.of(i.module)),n=i.themeType),e!=null&&e.fallback?t.push(om.of(i)):n?t.push(fc.computeN([se.darkTheme],s=>s.facet(se.darkTheme)==(n=="dark")?[i]:[])):t.push(fc.of(i)),t}class QS{constructor(e){this.markCache=Object.create(null),this.tree=st(e.state),this.decorations=this.buildDeco(e,dc(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=st(e.state),n=dc(e.state),s=n!=dc(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!s&&t.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return de.none;let n=new Qi;for(let{from:s,to:r}of e.visibleRanges)Hx(this.tree,t,(o,a,c)=>{n.add(o,a,this.markCache[c]||(this.markCache[c]=de.mark({class:c})))},s,r);return n.finish()}}const PS=ji.high(Ge.fromClass(QS,{decorations:i=>i.decorations})),TS=Ys.define([{tag:L.meta,color:"#404740"},{tag:L.link,textDecoration:"underline"},{tag:L.heading,textDecoration:"underline",fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strong,fontWeight:"bold"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.keyword,color:"#708"},{tag:[L.atom,L.bool,L.url,L.contentSeparator,L.labelName],color:"#219"},{tag:[L.literal,L.inserted],color:"#164"},{tag:[L.string,L.deleted],color:"#a11"},{tag:[L.regexp,L.escape,L.special(L.string)],color:"#e40"},{tag:L.definition(L.variableName),color:"#00f"},{tag:L.local(L.variableName),color:"#30a"},{tag:[L.typeName,L.namespace],color:"#085"},{tag:L.className,color:"#167"},{tag:[L.special(L.variableName),L.macroName],color:"#256"},{tag:L.definition(L.propertyName),color:"#00c"},{tag:L.comment,color:"#940"},{tag:L.invalid,color:"#f00"}]),ES=se.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),am=1e4,cm="()[]{}",hm=ce.define({combine(i){return hi(i,{afterCursor:!0,brackets:cm,maxScanDistance:am,renderMatch:RS})}}),$S=de.mark({class:"cm-matchingBracket"}),NS=de.mark({class:"cm-nonmatchingBracket"});function RS(i){let e=[],t=i.matched?$S:NS;return e.push(t.range(i.start.from,i.start.to)),i.end&&e.push(t.range(i.end.from,i.end.to)),e}const VS=[rt.define({create(){return de.none},update(i,e){if(!e.docChanged&&!e.selection)return i;let t=[],n=e.state.facet(hm);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=bi(e.state,s.head,-1,n)||s.head>0&&bi(e.state,s.head-1,1,n)||n.afterCursor&&(bi(e.state,s.head,1,n)||s.head<e.state.doc.length&&bi(e.state,s.head+1,-1,n));r&&(t=t.concat(n.renderMatch(r,e.state)))}return de.set(t,!0)},provide:i=>se.decorations.from(i)}),ES];function LS(i={}){return[hm.of(i),VS]}const MS=new xe;function pc(i,e,t){let n=i.prop(e<0?xe.openedBy:xe.closedBy);if(n)return n;if(i.name.length==1){let s=t.indexOf(i.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function mc(i){let e=i.type.prop(MS);return e?e(i.node):i}function bi(i,e,t,n={}){let s=n.maxScanDistance||am,r=n.brackets||cm,o=st(i),a=o.resolveInner(e,t);for(let c=a;c;c=c.parent){let h=pc(c.type,t,r);if(h&&c.from<c.to){let u=mc(c);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return BS(i,e,t,c,u,h,r)}}return DS(i,e,t,o,a.type,s,r)}function BS(i,e,t,n,s,r,o){let a=n.parent,c={from:s.from,to:s.to},h=0,u=a==null?void 0:a.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(h==0&&r.indexOf(u.type.name)>-1&&u.from<u.to){let f=mc(u);return{start:c,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(pc(u.type,t,o))h++;else if(pc(u.type,-t,o)){if(h==0){let f=mc(u);return{start:c,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}h--}}while(t<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function DS(i,e,t,n,s,r,o){let a=t<0?i.sliceDoc(e-1,e):i.sliceDoc(e,e+1),c=o.indexOf(a);if(c<0||c%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},u=i.doc.iterRange(e,t>0?i.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=r;){let m=u.value;t<0&&(d+=m.length);let b=e+d*t;for(let w=t>0?0:m.length-1,g=t>0?m.length:-1;w!=g;w+=t){let p=o.indexOf(m[w]);if(!(p<0||n.resolveInner(b+w,1).type!=s))if(p%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:b+w,to:b+w+1},matched:p>>1==c>>1};f--}}t>0&&(d+=m.length)}return u.done?{start:h,matched:!1}:null}const vS=Object.create(null),um=[Pt.none],fm=[],dm=Object.create(null),ZS=Object.create(null);for(let[i,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"]])ZS[i]=IS(vS,e);function gc(i,e){fm.indexOf(i)>-1||(fm.push(i),console.warn(e))}function IS(i,e){let t=[];for(let a of e.split(" ")){let c=[];for(let h of a.split(".")){let u=i[h]||L[h];u?typeof u=="function"?c.length?c=c.map(u):gc(h,`Modifier ${h} used at start of tag`):c.length?gc(h,`Tag ${h} used as modifier`):c=Array.isArray(u)?u:[u]:gc(h,`Unknown highlighting tag ${h}`)}for(let h of c)t.push(h)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+t.map(a=>a.id),r=dm[s];if(r)return r.id;let o=dm[s]=Pt.define({id:um.length,name:n,props:[Zp({[n]:t})]});return um.push(o),o.id}Ze.RTL,Ze.LTR;const US=i=>{let{state:e}=i,t=e.doc.lineAt(e.selection.main.from),n=_c(i.state,t.from);return n.line?FS(i):n.block?qS(i):!1};function Oc(i,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=i(e,t);return s?(n(t.update(s)),!0):!1}}const FS=Oc(YS,0),jS=Oc(pm,0),qS=Oc((i,e)=>pm(i,e,WS(e)),0);function _c(i,e){let t=i.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const zs=50;function XS(i,{open:e,close:t},n,s){let r=i.sliceDoc(n-zs,n),o=i.sliceDoc(s,s+zs),a=/\s*$/.exec(r)[0].length,c=/^\s*/.exec(o)[0].length,h=r.length-a;if(r.slice(h-e.length,h)==e&&o.slice(c,c+t.length)==t)return{open:{pos:n-a,margin:a&&1},close:{pos:s+c,margin:c&&1}};let u,f;s-n<=2*zs?u=f=i.sliceDoc(n,s):(u=i.sliceDoc(n,n+zs),f=i.sliceDoc(s-zs,s));let d=/^\s*/.exec(u)[0].length,m=/\s*$/.exec(f)[0].length,b=f.length-m-t.length;return u.slice(d,d+e.length)==e&&f.slice(b,b+t.length)==t?{open:{pos:n+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:s-m-t.length,margin:/\s/.test(f.charAt(b-1))?1:0}}:null}function WS(i){let e=[];for(let t of i.selection.ranges){let n=i.doc.lineAt(t.from),s=t.to<=n.to?n:i.doc.lineAt(t.to);s.from>n.from&&s.from==t.to&&(s=t.to==n.to+1?n:i.doc.lineAt(t.to-1));let r=e.length-1;r>=0&&e[r].to>n.from?e[r].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}function pm(i,e,t=e.selection.ranges){let n=t.map(r=>_c(e,r.from).block);if(!n.every(r=>r))return null;let s=t.map((r,o)=>XS(e,n[o],r.from,r.to));if(i!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:n[o].open+" "},{from:r.to,insert:" "+n[o].close}]))};if(i!=1&&s.some(r=>r)){let r=[];for(let o=0,a;o<s.length;o++)if(a=s[o]){let c=n[o],{open:h,close:u}=a;r.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:u.pos-u.margin,to:u.pos+c.close.length})}return{changes:r}}return null}function YS(i,e,t=e.selection.ranges){let n=[],s=-1;for(let{from:r,to:o}of t){let a=n.length,c=1e9,h=_c(e,r).line;if(h){for(let u=r;u<=o;){let f=e.doc.lineAt(u);if(f.from>s&&(r==o||o>f.from)){s=f.from;let d=/^\s*/.exec(f.text)[0].length,m=d==f.length,b=f.text.slice(d,d+h.length)==h?d:-1;d<f.text.length&&d<c&&(c=d),n.push({line:f,comment:b,token:h,indent:d,empty:m,single:!1})}u=f.to+1}if(c<1e9)for(let u=a;u<n.length;u++)n[u].indent<n[u].line.text.length&&(n[u].indent=c);n.length==a+1&&(n[a].single=!0)}}if(i!=2&&n.some(r=>r.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:a,token:c,indent:h,empty:u,single:f}of n)(f||!u)&&r.push({from:a.from+h,insert:c+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(i!=1&&n.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:a,token:c}of n)if(a>=0){let h=o.from+a,u=h+c.length;o.text[u-o.from]==" "&&u++,r.push({from:h,to:u})}return{changes:r}}return null}const bc=Ai.define(),zS=Ai.define(),GS=ce.define(),mm=ce.define({combine(i){return hi(i,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),gm=rt.define({create(){return yi.empty},update(i,e){let t=e.state.facet(mm),n=e.annotation(bc);if(n){let c=Et.fromTransaction(e,n.selection),h=n.side,u=h==0?i.undone:i.done;return c?u=So(u,u.length,t.minDepth,c):u=bm(u,e.startState.selection),new yi(h==0?n.rest:u,h==0?u:n.rest)}let s=e.annotation(zS);if((s=="full"||s=="before")&&(i=i.isolate()),e.annotation(Ke.addToHistory)===!1)return e.changes.empty?i:i.addMapping(e.changes.desc);let r=Et.fromTransaction(e),o=e.annotation(Ke.time),a=e.annotation(Ke.userEvent);return r?i=i.addChanges(r,o,a,t,e):e.selection&&(i=i.addSelection(e.startState.selection,o,a,t.newGroupDelay)),(s=="full"||s=="after")&&(i=i.isolate()),i},toJSON(i){return{done:i.done.map(e=>e.toJSON()),undone:i.undone.map(e=>e.toJSON())}},fromJSON(i){return new yi(i.done.map(Et.fromJSON),i.undone.map(Et.fromJSON))}});function HS(i={}){return[gm,mm.of(i),se.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?Om:e.inputType=="historyRedo"?yc:null;return n?(e.preventDefault(),n(t)):!1}})]}function xo(i,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let s=t.field(gm,!1);if(!s)return!1;let r=s.pop(i,t,e);return r?(n(r),!0):!1}}const Om=xo(0,!1),yc=xo(1,!1),KS=xo(0,!0),JS=xo(1,!0);class Et{constructor(e,t,n,s,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Et(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;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:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Et(e.changes&&it.fromJSON(e.changes),[],e.mapped&&ci.fromJSON(e.mapped),e.startSelection&&j.fromJSON(e.startSelection),e.selectionsAfter.map(j.fromJSON))}static fromTransaction(e,t){let n=jt;for(let s of e.startState.facet(GS)){let r=s(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new Et(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,jt)}static selection(e){return new Et(void 0,jt,void 0,void 0,e)}}function So(i,e,t,n){let s=e+1>t+20?e-t-1:0,r=i.slice(s,e);return r.push(n),r}function eC(i,e){let t=[],n=!1;return i.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,a)=>{for(let c=0;c<t.length;){let h=t[c++],u=t[c++];a>=h&&o<=u&&(n=!0)}}),n}function tC(i,e){return i.ranges.length==e.ranges.length&&i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function _m(i,e){return i.length?e.length?i.concat(e):i:e}const jt=[],iC=200;function bm(i,e){if(i.length){let t=i[i.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-iC));return n.length&&n[n.length-1].eq(e)?i:(n.push(e),So(i,i.length-1,1e9,t.setSelAfter(n)))}else return[Et.selection([e])]}function nC(i){let e=i[i.length-1],t=i.slice();return t[i.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function wc(i,e){if(!i.length)return i;let t=i.length,n=jt;for(;t;){let s=sC(i[t-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let r=i.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,n=s.selectionsAfter}return n.length?[Et.selection(n)]:jt}function sC(i,e,t){let n=_m(i.selectionsAfter.length?i.selectionsAfter.map(a=>a.map(e)):jt,t);if(!i.changes)return Et.selection(n);let s=i.changes.map(e),r=e.mapDesc(i.changes,!0),o=i.mapped?i.mapped.composeDesc(r):r;return new Et(s,we.mapEffects(i.effects,e),o,i.startSelection.map(r),n)}const rC=/^(input\.type|delete)($|\.)/;class yi{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new yi(this.done,this.undone):this}addChanges(e,t,n,s,r){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||rC.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime<s.newGroupDelay&&s.joinToEvent(r,eC(a.changes,e.changes))||n=="input.type.compose")?o=So(o,o.length-1,s.minDepth,new Et(e.changes.compose(a.changes),_m(we.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,jt)):o=So(o,o.length,s.minDepth,e),new yi(o,jt,t,n)}addSelection(e,t,n,s){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:jt;return r.length>0&&t-this.prevTime<s&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&tC(r[r.length-1],e)?this:new yi(bm(this.done,e),this.undone,t,n)}addMapping(e){return new yi(wc(this.done,e),wc(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let s=e==0?this.done:this.undone;if(s.length==0)return null;let r=s[s.length-1],o=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:bc.of({side:e,rest:nC(s),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let a=s.length==1?jt:s.slice(0,s.length-1);return r.mapped&&(a=wc(a,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:bc.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}yi.empty=new yi(jt,jt);const oC=[{key:"Mod-z",run:Om,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:yc,preventDefault:!0},{linux:"Ctrl-Shift-z",run:yc,preventDefault:!0},{key:"Mod-u",run:KS,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:JS,preventDefault:!0}];function Xn(i,e){return j.create(i.ranges.map(e),i.mainIndex)}function wi(i,e){return i.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ei({state:i,dispatch:e},t){let n=Xn(i.selection,t);return n.eq(i.selection,!0)?!1:(e(wi(i,n)),!0)}function Co(i,e){return j.cursor(e?i.to:i.from)}function ym(i,e){return ei(i,t=>t.empty?i.moveByChar(t,e):Co(t,e))}function _t(i){return i.textDirectionAt(i.state.selection.main.head)==Ze.LTR}const wm=i=>ym(i,!_t(i)),km=i=>ym(i,_t(i));function xm(i,e){return ei(i,t=>t.empty?i.moveByGroup(t,e):Co(t,e))}const lC=i=>xm(i,!_t(i)),aC=i=>xm(i,_t(i));function cC(i,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(i.sliceDoc(e.from,e.to)))||e.firstChild}function Ao(i,e,t){let n=st(i).resolveInner(e.head),s=t?xe.closedBy:xe.openedBy;for(let c=e.head;;){let h=t?n.childAfter(c):n.childBefore(c);if(!h)break;cC(i,h,s)?n=h:c=t?h.to:h.from}let r=n.type.prop(s),o,a;return r&&(o=t?bi(i,n.from,1):bi(i,n.to,-1))&&o.matched?a=t?o.end.to:o.end.from:a=t?n.to:n.from,j.cursor(a,t?-1:1)}const hC=i=>ei(i,e=>Ao(i.state,e,!_t(i))),uC=i=>ei(i,e=>Ao(i.state,e,_t(i)));function Sm(i,e){return ei(i,t=>{if(!t.empty)return Co(t,e);let n=i.moveVertically(t,e);return n.head!=t.head?n:i.moveToLineBoundary(t,e)})}const Cm=i=>Sm(i,!1),Am=i=>Sm(i,!0);function Qm(i){let e=i.scrollDOM.clientHeight<i.scrollDOM.scrollHeight-2,t=0,n=0,s;if(e){for(let r of i.state.facet(se.scrollMargins)){let o=r(i);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(n=Math.max(o==null?void 0:o.bottom,n))}s=i.scrollDOM.clientHeight-t-n}else s=(i.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:n,selfScroll:e,height:Math.max(i.defaultLineHeight,s-5)}}function Pm(i,e){let t=Qm(i),{state:n}=i,s=Xn(n.selection,o=>o.empty?i.moveVertically(o,e,t.height):Co(o,e));if(s.eq(n.selection))return!1;let r;if(t.selfScroll){let o=i.coordsAtPos(n.selection.main.head),a=i.scrollDOM.getBoundingClientRect(),c=a.top+t.marginTop,h=a.bottom-t.marginBottom;o&&o.top>c&&o.bottom<h&&(r=se.scrollIntoView(s.main.head,{y:"start",yMargin:o.top-c}))}return i.dispatch(wi(n,s),{effects:r}),!0}const Tm=i=>Pm(i,!1),kc=i=>Pm(i,!0);function tn(i,e,t){let n=i.lineBlockAt(e.head),s=i.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?n.to:n.from)&&(s=i.moveToLineBoundary(e,t,!1)),!t&&s.head==n.from&&n.length){let r=/^\s*/.exec(i.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;r&&e.head!=n.from+r&&(s=j.cursor(n.from+r))}return s}const fC=i=>ei(i,e=>tn(i,e,!0)),dC=i=>ei(i,e=>tn(i,e,!1)),pC=i=>ei(i,e=>tn(i,e,!_t(i))),mC=i=>ei(i,e=>tn(i,e,_t(i))),gC=i=>ei(i,e=>j.cursor(i.lineBlockAt(e.head).from,1)),OC=i=>ei(i,e=>j.cursor(i.lineBlockAt(e.head).to,-1));function _C(i,e,t){let n=!1,s=Xn(i.selection,r=>{let o=bi(i,r.head,-1)||bi(i,r.head,1)||r.head>0&&bi(i,r.head-1,1)||r.head<i.doc.length&&bi(i,r.head+1,-1);if(!o||!o.end)return r;n=!0;let a=o.start.from==r.head?o.end.to:o.end.from;return t?j.range(r.anchor,a):j.cursor(a)});return n?(e(wi(i,s)),!0):!1}const bC=({state:i,dispatch:e})=>_C(i,e,!1);function qt(i,e){let t=Xn(i.state.selection,n=>{let s=e(n);return j.range(n.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(i.state.selection)?!1:(i.dispatch(wi(i.state,t)),!0)}function Em(i,e){return qt(i,t=>i.moveByChar(t,e))}const $m=i=>Em(i,!_t(i)),Nm=i=>Em(i,_t(i));function Rm(i,e){return qt(i,t=>i.moveByGroup(t,e))}const yC=i=>Rm(i,!_t(i)),wC=i=>Rm(i,_t(i)),kC=i=>qt(i,e=>Ao(i.state,e,!_t(i))),xC=i=>qt(i,e=>Ao(i.state,e,_t(i)));function Vm(i,e){return qt(i,t=>i.moveVertically(t,e))}const Lm=i=>Vm(i,!1),Mm=i=>Vm(i,!0);function Bm(i,e){return qt(i,t=>i.moveVertically(t,e,Qm(i).height))}const Dm=i=>Bm(i,!1),vm=i=>Bm(i,!0),SC=i=>qt(i,e=>tn(i,e,!0)),CC=i=>qt(i,e=>tn(i,e,!1)),AC=i=>qt(i,e=>tn(i,e,!_t(i))),QC=i=>qt(i,e=>tn(i,e,_t(i))),PC=i=>qt(i,e=>j.cursor(i.lineBlockAt(e.head).from)),TC=i=>qt(i,e=>j.cursor(i.lineBlockAt(e.head).to)),Zm=({state:i,dispatch:e})=>(e(wi(i,{anchor:0})),!0),Im=({state:i,dispatch:e})=>(e(wi(i,{anchor:i.doc.length})),!0),Um=({state:i,dispatch:e})=>(e(wi(i,{anchor:i.selection.main.anchor,head:0})),!0),Fm=({state:i,dispatch:e})=>(e(wi(i,{anchor:i.selection.main.anchor,head:i.doc.length})),!0),EC=({state:i,dispatch:e})=>(e(i.update({selection:{anchor:0,head:i.doc.length},userEvent:"select"})),!0),$C=({state:i,dispatch:e})=>{let t=Po(i).map(({from:n,to:s})=>j.range(n,Math.min(s+1,i.doc.length)));return e(i.update({selection:j.create(t),userEvent:"select"})),!0},NC=({state:i,dispatch:e})=>{let t=Xn(i.selection,n=>{let s=st(i),r=s.resolveStack(n.from,1);if(n.empty){let o=s.resolveStack(n.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:a}=o;if((a.from<n.from&&a.to>=n.to||a.to>n.to&&a.from<=n.from)&&o.next)return j.range(a.to,a.from)}return n});return t.eq(i.selection)?!1:(e(wi(i,t)),!0)},RC=({state:i,dispatch:e})=>{let t=i.selection,n=null;return t.ranges.length>1?n=j.create([t.main]):t.main.empty||(n=j.create([j.cursor(t.main.head)])),n?(e(wi(i,n)),!0):!1};function Gs(i,e){if(i.state.readOnly)return!1;let t="delete.selection",{state:n}=i,s=n.changeByRange(r=>{let{from:o,to:a}=r;if(o==a){let c=e(r);c<o?(t="delete.backward",c=Qo(i,c,!1)):c>o&&(t="delete.forward",c=Qo(i,c,!0)),o=Math.min(o,c),a=Math.max(a,c)}else o=Qo(i,o,!1),a=Qo(i,a,!0);return o==a?{range:r}:{changes:{from:o,to:a},range:j.cursor(o,o<r.head?-1:1)}});return s.changes.empty?!1:(i.dispatch(n.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?se.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function Qo(i,e,t){if(i instanceof se)for(let n of i.state.facet(se.atomicRanges).map(s=>s(i)))n.between(e,e,(s,r)=>{s<e&&r>e&&(e=t?r:s)});return e}const jm=(i,e,t)=>Gs(i,n=>{let s=n.from,{state:r}=i,o=r.doc.lineAt(s),a,c;if(t&&!e&&s>o.from&&s<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,s-o.from))){if(a[a.length-1]==" ")return s-1;let h=Ln(a,r.tabSize),u=h%_o(r)||_o(r);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)s--;c=s}else c=ut(o.text,s-o.from,e,e)+o.from,c==s&&o.number!=(e?r.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,s-o.from))&&(c=ut(o.text,c-o.from,!1,!1)+o.from);return c}),xc=i=>jm(i,!1,!0),qm=i=>jm(i,!0,!1),Xm=(i,e)=>Gs(i,t=>{let n=t.head,{state:s}=i,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let a=null;;){if(n==(e?r.to:r.from)){n==t.head&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let c=ut(r.text,n-r.from,e)+r.from,h=r.text.slice(Math.min(n,c)-r.from,Math.max(n,c)-r.from),u=o(h);if(a!=null&&u!=a)break;(h!=" "||n!=t.head)&&(a=u),n=c}return n}),Wm=i=>Xm(i,!1),VC=i=>Xm(i,!0),LC=i=>Gs(i,e=>{let t=i.lineBlockAt(e.head).to;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),MC=i=>Gs(i,e=>{let t=i.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),BC=i=>Gs(i,e=>{let t=i.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),DC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Ae.of(["",""])},range:j.cursor(n.from)}));return e(i.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},vC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>{if(!n.empty||n.from==0||n.from==i.doc.length)return{range:n};let s=n.from,r=i.doc.lineAt(s),o=s==r.from?s-1:ut(r.text,s-r.from,!1)+r.from,a=s==r.to?s+1:ut(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:a,insert:i.doc.slice(s,a).append(i.doc.slice(o,s))},range:j.cursor(a)}});return t.changes.empty?!1:(e(i.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Po(i){let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.from),r=i.doc.lineAt(n.to);if(!n.empty&&n.to==r.from&&(r=i.doc.lineAt(n.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});t=r.number+1}return e}function Ym(i,e,t){if(i.readOnly)return!1;let n=[],s=[];for(let r of Po(i)){if(t?r.to==i.doc.length:r.from==0)continue;let o=i.doc.lineAt(t?r.to+1:r.from-1),a=o.length+1;if(t){n.push({from:r.to,to:o.to},{from:r.from,insert:o.text+i.lineBreak});for(let c of r.ranges)s.push(j.range(Math.min(i.doc.length,c.anchor+a),Math.min(i.doc.length,c.head+a)))}else{n.push({from:o.from,to:r.from},{from:r.to,insert:i.lineBreak+o.text});for(let c of r.ranges)s.push(j.range(c.anchor-a,c.head-a))}}return n.length?(e(i.update({changes:n,scrollIntoView:!0,selection:j.create(s,i.selection.mainIndex),userEvent:"move.line"})),!0):!1}const ZC=({state:i,dispatch:e})=>Ym(i,e,!1),IC=({state:i,dispatch:e})=>Ym(i,e,!0);function zm(i,e,t){if(i.readOnly)return!1;let n=[];for(let s of Po(i))t?n.push({from:s.from,insert:i.doc.slice(s.from,s.to)+i.lineBreak}):n.push({from:s.to,insert:i.lineBreak+i.doc.slice(s.from,s.to)});return e(i.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const UC=({state:i,dispatch:e})=>zm(i,e,!1),FC=({state:i,dispatch:e})=>zm(i,e,!0),jC=i=>{if(i.state.readOnly)return!1;let{state:e}=i,t=e.changes(Po(e).map(({from:s,to:r})=>(s>0?s--:r<e.doc.length&&r++,{from:s,to:r}))),n=Xn(e.selection,s=>{let r;if(i.lineWrapping){let o=i.lineBlockAt(s.head),a=i.coordsAtPos(s.head,s.assoc||1);a&&(r=o.bottom+i.documentTop-a.bottom+i.defaultLineHeight/2)}return i.moveVertically(s,!0,r)}).map(t);return i.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function qC(i,e){if(/\(\)|\[\]|\{\}/.test(i.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=st(i).resolveInner(e),n=t.childBefore(e),s=t.childAfter(e),r;return n&&s&&n.to<=e&&s.from>=e&&(r=n.type.prop(xe.closedBy))&&r.indexOf(s.name)>-1&&i.doc.lineAt(n.to).from==i.doc.lineAt(s.from).from&&!/\S/.test(i.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const Gm=Hm(!1),XC=Hm(!0);function Hm(i){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>{let{from:r,to:o}=s,a=e.doc.lineAt(r),c=!i&&r==o&&qC(e,r);i&&(r=o=(o<=a.to?a:e.doc.lineAt(o)).to);let h=new bo(e,{simulateBreak:r,simulateDoubleBreak:!!c}),u=lc(h,r);for(u==null&&(u=Ln(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;c?{from:r,to:o}=c:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let f=["",Xs(e,u)];return c&&f.push(Xs(e,h.lineIndent(a.from,-1))),{changes:{from:r,to:o,insert:Ae.of(f)},range:j.cursor(r+1+f[1].length)}});return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Sc(i,e){let t=-1;return i.changeByRange(n=>{let s=[];for(let o=n.from;o<=n.to;){let a=i.doc.lineAt(o);a.number>t&&(n.empty||n.to>a.from)&&(e(a,s,n),t=a.number),o=a.to+1}let r=i.changes(s);return{changes:s,range:j.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}})}const WC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=Object.create(null),n=new bo(i,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Sc(i,(r,o,a)=>{let c=lc(n,r.from);if(c==null)return;/\S/.test(r.text)||(c=0);let h=/^\s*/.exec(r.text)[0],u=Xs(i,c);(h!=u||a.from<r.from+h.length)&&(t[r.from]=c,o.push({from:r.from,to:r.from+h.length,insert:u}))});return s.changes.empty||e(i.update(s,{userEvent:"indent"})),!0},Km=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(Sc(i,(t,n)=>{n.push({from:t.from,insert:i.facet(qs)})}),{userEvent:"input.indent"})),!0),Jm=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(Sc(i,(t,n)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Ln(s,i.tabSize),o=0,a=Xs(i,Math.max(0,r-_o(i)));for(;o<s.length&&o<a.length&&s.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+s.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),YC=i=>(i.setTabFocusMode(),!0),zC=[{key:"Ctrl-b",run:wm,shift:$m,preventDefault:!0},{key:"Ctrl-f",run:km,shift:Nm},{key:"Ctrl-p",run:Cm,shift:Lm},{key:"Ctrl-n",run:Am,shift:Mm},{key:"Ctrl-a",run:gC,shift:PC},{key:"Ctrl-e",run:OC,shift:TC},{key:"Ctrl-d",run:qm},{key:"Ctrl-h",run:xc},{key:"Ctrl-k",run:LC},{key:"Ctrl-Alt-h",run:Wm},{key:"Ctrl-o",run:DC},{key:"Ctrl-t",run:vC},{key:"Ctrl-v",run:kc}],GC=[{key:"ArrowLeft",run:wm,shift:$m,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:lC,shift:yC,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:pC,shift:AC,preventDefault:!0},{key:"ArrowRight",run:km,shift:Nm,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:aC,shift:wC,preventDefault:!0},{mac:"Cmd-ArrowRight",run:mC,shift:QC,preventDefault:!0},{key:"ArrowUp",run:Cm,shift:Lm,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Zm,shift:Um},{mac:"Ctrl-ArrowUp",run:Tm,shift:Dm},{key:"ArrowDown",run:Am,shift:Mm,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Im,shift:Fm},{mac:"Ctrl-ArrowDown",run:kc,shift:vm},{key:"PageUp",run:Tm,shift:Dm},{key:"PageDown",run:kc,shift:vm},{key:"Home",run:dC,shift:CC,preventDefault:!0},{key:"Mod-Home",run:Zm,shift:Um},{key:"End",run:fC,shift:SC,preventDefault:!0},{key:"Mod-End",run:Im,shift:Fm},{key:"Enter",run:Gm,shift:Gm},{key:"Mod-a",run:EC},{key:"Backspace",run:xc,shift:xc},{key:"Delete",run:qm},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Wm},{key:"Mod-Delete",mac:"Alt-Delete",run:VC},{mac:"Mod-Backspace",run:MC},{mac:"Mod-Delete",run:BC}].concat(zC.map(i=>({mac:i.key,run:i.run,shift:i.shift}))),HC=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:hC,shift:kC},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:uC,shift:xC},{key:"Alt-ArrowUp",run:ZC},{key:"Shift-Alt-ArrowUp",run:UC},{key:"Alt-ArrowDown",run:IC},{key:"Shift-Alt-ArrowDown",run:FC},{key:"Escape",run:RC},{key:"Mod-Enter",run:XC},{key:"Alt-l",mac:"Ctrl-l",run:$C},{key:"Mod-i",run:NC,preventDefault:!0},{key:"Mod-[",run:Jm},{key:"Mod-]",run:Km},{key:"Mod-Alt-\\",run:WC},{key:"Shift-Mod-k",run:jC},{key:"Shift-Mod-\\",run:bC},{key:"Mod-/",run:US},{key:"Alt-A",run:jS},{key:"Ctrl-m",mac:"Shift-Alt-m",run:YC}].concat(GC),KC={key:"Tab",run:Km,shift:Jm};function ve(){var i=arguments[0];typeof i=="string"&&(i=document.createElement(i));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n];typeof s=="string"?i.setAttribute(n,s):s!=null&&(i[n]=s)}e++}for(;e<arguments.length;e++)eg(i,arguments[e]);return i}function eg(i,e){if(typeof e=="string")i.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)i.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)eg(i,e[t]);else throw new RangeError("Unsupported child node: "+e)}const tg=typeof String.prototype.normalize=="function"?i=>i.normalize("NFKD"):i=>i;class Wn{constructor(e,t,n=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=r?a=>r(tg(a)):tg,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 Ct(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=Dl(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ai(e);let s=this.normalize(t);if(s.length)for(let r=0,o=n;;r++){let a=s.charCodeAt(r),c=this.match(a,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(c)return this.value=c,this;break}o==n&&r<t.length&&t.charCodeAt(r)==a&&o++}}}match(e,t,n){let s=null;for(let r=0;r<this.matches.length;r+=2){let o=this.matches[r],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?s={from:this.matches[r+1],to:n}:(this.matches[r]++,a=!0)),a||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?s={from:t,to:n}:this.matches.push(1,t)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}typeof Symbol<"u"&&(Wn.prototype[Symbol.iterator]=function(){return this});const ig={from:-1,to:-1,match:/.*/.exec("")},Cc="gm"+(/x/.unicode==null?"":"u");class ng{constructor(e,t,n,s=0,r=e.length){if(this.text=e,this.to=r,this.curLine="",this.done=!1,this.value=ig,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new sg(e,t,n,s,r);this.re=new RegExp(t,Cc+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.iter=e.iter();let o=e.lineAt(s);this.curLineStart=o.from,this.matchPos=To(e,s),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 n=this.curLineStart+t.index,s=n+t[0].length;if(this.matchPos=To(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<s||n>this.value.to)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,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 Ac=new WeakMap;class Yn{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let s=Ac.get(e);if(!s||s.from>=n||s.to<=t){let a=new Yn(t,e.sliceString(t,n));return Ac.set(e,a),a}if(s.from==t&&s.to==n)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to<n&&(r+=e.sliceString(s.to,n)),Ac.set(e,new Yn(o,r)),new Yn(t,r.slice(t-o,n-o))}}class sg{constructor(e,t,n,s,r){this.text=e,this.to=r,this.done=!1,this.value=ig,this.matchPos=To(e,s),this.re=new RegExp(t,Cc+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.flat=Yn.get(e,s,this.chunkEnd(s+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 n=this.flat.from+t.index,s=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this.matchPos=To(this.text,s+(n==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Yn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(ng.prototype[Symbol.iterator]=sg.prototype[Symbol.iterator]=function(){return this});function JC(i){try{return new RegExp(i,Cc),!0}catch{return!1}}function To(i,e){if(e>=i.length)return e;let t=i.lineAt(e),n;for(;e<t.to&&(n=t.text.charCodeAt(e-t.from))>=56320&&n<57344;)e++;return e}function Qc(i){let e=String(i.state.doc.lineAt(i.state.selection.main.head).number),t=ve("input",{class:"cm-textfield",name:"line",value:e}),n=ve("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),i.dispatch({effects:Eo.of(!1)}),i.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},ve("label",i.state.phrase("Go to line"),": ",t)," ",ve("button",{class:"cm-button",type:"submit"},i.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=i,a=o.doc.lineAt(o.selection.main.head),[,c,h,u,f]=r,d=u?+u.slice(1):0,m=h?+h:a.number;if(h&&f){let g=m/100;c&&(g=g*(c=="-"?-1:1)+a.number/o.doc.lines),m=Math.round(o.doc.lines*g)}else h&&c&&(m=m*(c=="-"?-1:1)+a.number);let b=o.doc.line(Math.max(1,Math.min(o.doc.lines,m))),w=j.cursor(b.from+Math.max(0,Math.min(d,b.length)));i.dispatch({effects:[Eo.of(!1),se.scrollIntoView(w.from,{y:"center"})],selection:w}),i.focus()}return{dom:n}}const Eo=we.define(),rg=rt.define({create(){return!0},update(i,e){for(let t of e.effects)t.is(Eo)&&(i=t.value);return i},provide:i=>Zs.from(i,e=>e?Qc:null)}),eA=i=>{let e=vs(i,Qc);if(!e){let t=[Eo.of(!0)];i.state.field(rg,!1)==null&&t.push(we.appendConfig.of([rg,tA])),i.dispatch({effects:t}),e=vs(i,Qc)}return e&&e.dom.querySelector("input").select(),!0},tA=se.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),iA={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},og=ce.define({combine(i){return hi(i,iA,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function nA(i){let e=[aA,lA];return i&&e.push(og.of(i)),e}const sA=de.mark({class:"cm-selectionMatch"}),rA=de.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function lg(i,e,t,n){return(t==0||i(e.sliceDoc(t-1,t))!=je.Word)&&(n==e.doc.length||i(e.sliceDoc(n,n+1))!=je.Word)}function oA(i,e,t,n){return i(e.sliceDoc(t,t+1))==je.Word&&i(e.sliceDoc(n-1,n))==je.Word}const lA=Ge.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.selectionSet||i.docChanged||i.viewportChanged)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=i.state.facet(og),{state:t}=i,n=t.selection;if(n.ranges.length>1)return de.none;let s=n.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return de.none;let c=t.wordAt(s.head);if(!c)return de.none;o=t.charCategorizer(s.head),r=t.sliceDoc(c.from,c.to)}else{let c=s.to-s.from;if(c<e.minSelectionLength||c>200)return de.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(lg(o,t,s.from,s.to)&&oA(o,t,s.from,s.to)))return de.none}else if(r=t.sliceDoc(s.from,s.to),!r)return de.none}let a=[];for(let c of i.visibleRanges){let h=new Wn(t.doc,r,c.from,c.to);for(;!h.next().done;){let{from:u,to:f}=h.value;if((!o||lg(o,t,u,f))&&(s.empty&&u<=s.from&&f>=s.to?a.push(rA.range(u,f)):(u>=s.to||f<=s.from)&&a.push(sA.range(u,f)),a.length>e.maxMatches))return de.none}}return de.set(a)}},{decorations:i=>i.decorations}),aA=se.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),cA=({state:i,dispatch:e})=>{let{selection:t}=i,n=j.create(t.ranges.map(s=>i.wordAt(s.head)||j.cursor(s.head)),t.mainIndex);return n.eq(t)?!1:(e(i.update({selection:n})),!0)};function hA(i,e){let{main:t,ranges:n}=i.selection,s=i.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,a=new Wn(i.doc,e,n[n.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Wn(i.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(c=>c.from==a.value.from))continue;if(r){let c=i.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const uA=({state:i,dispatch:e})=>{let{ranges:t}=i.selection;if(t.some(r=>r.from===r.to))return cA({state:i,dispatch:e});let n=i.sliceDoc(t[0].from,t[0].to);if(i.selection.ranges.some(r=>i.sliceDoc(r.from,r.to)!=n))return!1;let s=hA(i,n);return s?(e(i.update({selection:i.selection.addRange(j.range(s.from,s.to),!1),effects:se.scrollIntoView(s.to)})),!0):!1},zn=ce.define({combine(i){return hi(i,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new xA(e),scrollToMatch:e=>se.scrollIntoView(e)})}});class ag{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||JC(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?`
32
+ `:n=="r"?"\r":n=="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 mA(this):new dA(this)}getCursor(e,t=0,n){let s=e.doc?e:Se.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Hn(this,s,t,n):Gn(this,s,t,n)}}class cg{constructor(e){this.spec=e}}function Gn(i,e,t,n){return new Wn(e.doc,i.unquoted,t,n,i.caseSensitive?void 0:s=>s.toLowerCase(),i.wholeWord?fA(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function fA(i,e){return(t,n,s,r)=>((r>t||r+s.length<n)&&(r=Math.max(0,t-2),s=i.sliceString(r,Math.min(i.length,n+2))),(e($o(s,t-r))!=je.Word||e(No(s,t-r))!=je.Word)&&(e(No(s,n-r))!=je.Word||e($o(s,n-r))!=je.Word))}class dA extends cg{constructor(e){super(e)}nextMatch(e,t,n){let s=Gn(this.spec,e,n,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Gn(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==n?null:s.value}prevMatchInRange(e,t,n){for(let s=n;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Gn(this.spec,e,r,s),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(r==t)return null;s-=1e4}}prevMatch(e,t,n){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=n)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Gn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Gn(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Hn(i,e,t,n){return new ng(e.doc,i.search,{ignoreCase:!i.caseSensitive,test:i.wholeWord?pA(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function $o(i,e){return i.slice(ut(i,e,!1),e)}function No(i,e){return i.slice(e,ut(i,e))}function pA(i){return(e,t,n)=>!n[0].length||(i($o(n.input,n.index))!=je.Word||i(No(n.input,n.index))!=je.Word)&&(i(No(n.input,n.index+n[0].length))!=je.Word||i($o(n.input,n.index+n[0].length))!=je.Word)}class mA extends cg{nextMatch(e,t,n){let s=Hn(this.spec,e,n,e.doc.length).next();return s.done&&(s=Hn(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let s=1;;s++){let r=Math.max(t,n-s*1e4),o=Hn(this.spec,e,r,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(r==t||a.from>r+10))return a;if(r==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n<e.match.length?e.match[n]:t)}matchAll(e,t){let n=Hn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Hn(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Hs=we.define(),Pc=we.define(),nn=rt.define({create(i){return new Tc($c(i).create(),null)},update(i,e){for(let t of e.effects)t.is(Hs)?i=new Tc(t.value.create(),i.panel):t.is(Pc)&&(i=new Tc(i.query,t.value?Ec:null));return i},provide:i=>Zs.from(i,e=>e.panel)});class Tc{constructor(e,t){this.query=e,this.panel=t}}const gA=de.mark({class:"cm-searchMatch"}),OA=de.mark({class:"cm-searchMatch cm-searchMatch-selected"}),_A=Ge.fromClass(class{constructor(i){this.view=i,this.decorations=this.highlight(i.state.field(nn))}update(i){let e=i.state.field(nn);(e!=i.startState.field(nn)||i.docChanged||i.selectionSet||i.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:i,panel:e}){if(!e||!i.spec.valid)return de.none;let{view:t}=this,n=new Qi;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:a,to:c}=r[s];for(;s<o-1&&c>r[s+1].from-2*250;)c=r[++s].to;i.highlight(t.state,a,c,(h,u)=>{let f=t.state.selection.ranges.some(d=>d.from==h&&d.to==u);n.add(h,u,f?OA:gA)})}return n.finish()}},{decorations:i=>i.decorations});function Ks(i){return e=>{let t=e.state.field(nn,!1);return t&&t.query.spec.valid?i(e,t):dg(e)}}const Ro=Ks((i,{query:e})=>{let{to:t}=i.state.selection.main,n=e.nextMatch(i.state,t,t);if(!n)return!1;let s=j.single(n.from,n.to),r=i.state.facet(zn);return i.dispatch({selection:s,effects:[Nc(i,n),r.scrollToMatch(s.main,i)],userEvent:"select.search"}),fg(i),!0}),Vo=Ks((i,{query:e})=>{let{state:t}=i,{from:n}=t.selection.main,s=e.prevMatch(t,n,n);if(!s)return!1;let r=j.single(s.from,s.to),o=i.state.facet(zn);return i.dispatch({selection:r,effects:[Nc(i,s),o.scrollToMatch(r.main,i)],userEvent:"select.search"}),fg(i),!0}),bA=Ks((i,{query:e})=>{let t=e.matchAll(i.state,1e3);return!t||!t.length?!1:(i.dispatch({selection:j.create(t.map(n=>j.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),yA=({state:i,dispatch:e})=>{let t=i.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:s}=t.main,r=[],o=0;for(let a=new Wn(i.doc,i.sliceDoc(n,s));!a.next().done;){if(r.length>1e3)return!1;a.value.from==n&&(o=r.length),r.push(j.range(a.value.from,a.value.to))}return e(i.update({selection:j.create(r,o),userEvent:"select.search.matches"})),!0},hg=Ks((i,{query:e})=>{let{state:t}=i,{from:n,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,n,n);if(!r)return!1;let o=r,a=[],c,h,u=[];if(o.from==n&&o.to==s&&(h=t.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:h}),o=e.nextMatch(t,o.from,o.to),u.push(se.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))),o){let f=a.length==0||a[0].from>=r.to?0:r.to-r.from-h.length;c=j.single(o.from-f,o.to-f),u.push(Nc(i,o)),u.push(t.facet(zn).scrollToMatch(c.main,i))}return i.dispatch({changes:a,selection:c,effects:u,userEvent:"input.replace"}),!0}),wA=Ks((i,{query:e})=>{if(i.state.readOnly)return!1;let t=e.matchAll(i.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let n=i.state.phrase("replaced $ matches",t.length)+".";return i.dispatch({changes:t,effects:se.announce.of(n),userEvent:"input.replace.all"}),!0});function Ec(i){return i.state.facet(zn).createPanel(i)}function $c(i,e){var t,n,s,r,o;let a=i.selection.main,c=a.empty||a.to>a.from+100?"":i.sliceDoc(a.from,a.to);if(e&&!c)return e;let h=i.facet(zn);return new ag({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function ug(i){let e=vs(i,Ec);return e&&e.dom.querySelector("[main-field]")}function fg(i){let e=ug(i);e&&e==i.root.activeElement&&e.select()}const dg=i=>{let e=i.state.field(nn,!1);if(e&&e.panel){let t=ug(i);if(t&&t!=i.root.activeElement){let n=$c(i.state,e.query.spec);n.valid&&i.dispatch({effects:Hs.of(n)}),t.focus(),t.select()}}else i.dispatch({effects:[Pc.of(!0),e?Hs.of($c(i.state,e.query.spec)):we.appendConfig.of(CA)]});return!0},pg=i=>{let e=i.state.field(nn,!1);if(!e||!e.panel)return!1;let t=vs(i,Ec);return t&&t.dom.contains(i.root.activeElement)&&i.focus(),i.dispatch({effects:Pc.of(!1)}),!0},kA=[{key:"Mod-f",run:dg,scope:"editor search-panel"},{key:"F3",run:Ro,shift:Vo,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Ro,shift:Vo,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:pg,scope:"editor search-panel"},{key:"Mod-Shift-l",run:yA},{key:"Mod-Alt-g",run:eA},{key:"Mod-d",run:uA,preventDefault:!0}];class xA{constructor(e){this.view=e;let t=this.query=e.state.field(nn).query.spec;this.commit=this.commit.bind(this),this.searchField=ve("input",{value:t.search,placeholder:Lt(e,"Find"),"aria-label":Lt(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ve("input",{value:t.replace,placeholder:Lt(e,"Replace"),"aria-label":Lt(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ve("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=ve("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=ve("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(s,r,o){return ve("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=ve("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,n("next",()=>Ro(e),[Lt(e,"next")]),n("prev",()=>Vo(e),[Lt(e,"previous")]),n("select",()=>bA(e),[Lt(e,"all")]),ve("label",null,[this.caseField,Lt(e,"match case")]),ve("label",null,[this.reField,Lt(e,"regexp")]),ve("label",null,[this.wordField,Lt(e,"by word")]),...e.state.readOnly?[]:[ve("br"),this.replaceField,n("replace",()=>hg(e),[Lt(e,"replace")]),n("replaceAll",()=>wA(e),[Lt(e,"replace all")])],ve("button",{name:"close",onclick:()=>pg(e),"aria-label":Lt(e,"close"),type:"button"},["×"])])}commit(){let e=new ag({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:Hs.of(e)}))}keydown(e){Lk(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Vo:Ro)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),hg(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(Hs)&&!n.value.eq(this.query)&&this.setQuery(n.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(zn).top}}function Lt(i,e){return i.state.phrase(e)}const Lo=30,Mo=/[\s\.,:;?!]/;function Nc(i,{from:e,to:t}){let n=i.state.doc.lineAt(e),s=i.state.doc.lineAt(t).to,r=Math.max(n.from,e-Lo),o=Math.min(s,t+Lo),a=i.state.sliceDoc(r,o);if(r!=n.from){for(let c=0;c<Lo;c++)if(!Mo.test(a[c+1])&&Mo.test(a[c])){a=a.slice(c);break}}if(o!=s){for(let c=a.length-1;c>a.length-Lo;c--)if(!Mo.test(a[c-1])&&Mo.test(a[c])){a=a.slice(0,c);break}}return se.announce.of(`${i.state.phrase("current match")}. ${a} ${i.state.phrase("on line")} ${n.number}.`)}const SA=se.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"}}),CA=[nn,ji.low(_A),SA];class mg{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=st(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),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),r=s.search(bg(e,!1));return r<0?null:{from:n+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function gg(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function AA(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let r=1;r<s.length;r++)t[s[r]]=!0}let n=gg(e)+gg(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function Og(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:AA(e);return s=>{let r=s.matchBefore(n);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function QA(i,e){return t=>{for(let n=st(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class _g{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function yn(i){return i.selection.main.from}function bg(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",r=n[n.length-1]!="$";return!s&&!r?i:new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const Rc=Ai.define();function PA(i,e,t,n){let{main:s}=i.selection,r=t-s.from,o=n-s.from;return Object.assign(Object.assign({},i.changeByRange(a=>{if(a!=s&&t!=n&&i.sliceDoc(a.from+r,a.from+o)!=i.sliceDoc(t,n))return{range:a};let c=i.toText(e);return{changes:{from:a.from+r,to:n==s.from?a.to:a.from+o,insert:c},range:j.cursor(a.from+r+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const yg=new WeakMap;function TA(i){if(!Array.isArray(i))return i;let e=yg.get(i);return e||yg.set(i,e=Og(i)),e}const Bo=we.define(),Js=we.define();class EA{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 n=Ct(e,t),s=ai(n);this.chars.push(n);let r=e.slice(t,t+s),o=r.toUpperCase();this.folded.push(Ct(o==r?r.toLowerCase():o,0)),t+=s}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:n,any:s,precise:r,byWord:o}=this;if(t.length==1){let O=Ct(e,0),C=ai(O),y=C==e.length?0:-100;if(O!=t[0])if(O==n[0])y+=-200;else return null;return this.ret(y,[0,C])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,h=0;if(a<0){for(let O=0,C=Math.min(e.length,200);O<C&&h<c;){let y=Ct(e,O);(y==t[h]||y==n[h])&&(s[h++]=O),O+=ai(y)}if(h<c)return null}let u=0,f=0,d=!1,m=0,b=-1,w=-1,g=/[a-z]/.test(e),p=!0;for(let O=0,C=Math.min(e.length,200),y=0;O<C&&f<c;){let E=Ct(e,O);a<0&&(u<c&&E==t[u]&&(r[u++]=O),m<c&&(E==t[m]||E==n[m]?(m==0&&(b=O),w=O+1,m++):m=0));let x,k=E<255?E>=48&&E<=57||E>=97&&E<=122?2:E>=65&&E<=90?1:0:(x=Dl(E))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!O||k==1&&g||y==0&&k!=0)&&(t[f]==E||n[f]==E&&(d=!0)?o[f++]=O:o.length&&(p=!1)),y=k,O+=ai(E)}return f==c&&o[0]==0&&p?this.result(-100+(d?-200:0),o,e):m==c&&b==0?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):m==c?this.ret(-200+-700-e.length,[b,w]):f==c?this.result(-100+(d?-200:0)+-700+(p?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],r=0;for(let o of t){let a=o+(this.astral?ai(Ct(n,o)):1);r&&s[r-1]==o?s[r-1]=a:(s[r++]=o,s[r++]=a)}return this.ret(e-n.length,s)}}class $A{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),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const ot=ce.define({combine(i){return hi(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:NA,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)=>n=>wg(e(n),t(n)),optionClass:(e,t)=>n=>wg(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function wg(i,e){return i?e?i+" "+e:i:e}function NA(i,e,t,n,s,r){let o=i.textDirection==Ze.RTL,a=o,c=!1,h="top",u,f,d=e.left-s.left,m=s.right-e.right,b=n.right-n.left,w=n.bottom-n.top;if(a&&d<Math.min(b,m)?a=!1:!a&&m<Math.min(b,d)&&(a=!0),b<=(a?d:m))u=Math.max(s.top,Math.min(t.top,s.bottom-w))-e.top,f=Math.min(400,a?d:m);else{c=!0,f=Math.min(400,(o?e.right:s.right-e.left)-30);let O=s.bottom-e.bottom;O>=w||O>e.top?u=t.bottom-e.top:(h="bottom",u=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,p=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${u/g}px; max-width: ${f/p}px`,class:"cm-completionInfo-"+(c?o?"left-narrow":"right-narrow":a?"left":"right")}}function RA(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let a=t.displayLabel||t.label,c=0;for(let h=0;h<r.length;){let u=r[h++],f=r[h++];u>c&&o.appendChild(document.createTextNode(a.slice(c,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",c=f}return c<a.length&&o.appendChild(document.createTextNode(a.slice(c))),o},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function Vc(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.floor((i-e)/t);return{from:i-(n+1)*t,to:i-n*t}}class VA{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,a=e.state.facet(ot);this.optionContent=RA(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Vc(r.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:h}=e.state.field(t).open;for(let u=c.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<h.length){this.applyCompletion(e,h[+f[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ot).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:Js.of(null)})}),this.showOptions(r,s.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 n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:r,selected:o,disabled:a}=n.open;(!s.open||s.open.options!=r)&&(this.range=Vc(r.length,o,e.state.facet(ot).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),a!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);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=Vc(t.options.length,t.selected,this.view.state.facet(ot).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:s}=n;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(n);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,n)}).catch(o=>Qt(this.view.state,o,"completion info")):this.addInfoPane(r,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;n.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&MA(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(ot).positionInfo(this.view,t,s,n,r,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,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions"));let r=null;for(let o=n.from;o<n.to;o++){let{completion:a,match:c}=e[o],{section:h}=a;if(h){let d=typeof h=="string"?h:h.name;if(d!=r&&(o>n.from||n.from==0))if(r=d,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let m=s.appendChild(document.createElement("completion-section"));m.textContent=d}}const u=s.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let m=d(a,this.view.state,this.view,c);m&&u.appendChild(m)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function LA(i,e){return t=>new VA(t,i,e)}function MA(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function kg(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function BA(i,e){let t=[],n=null,s=h=>{t.push(h);let{section:u}=h.completion;if(u){n||(n=[]);let f=typeof u=="string"?u:u.name;n.some(d=>d.name==f)||n.push(typeof u=="string"?{name:f}:u)}},r=e.facet(ot);for(let h of i)if(h.hasResult()){let u=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new _g(f,h.source,u?u(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),d,m=r.filterStrict?new $A(f):new EA(f);for(let b of h.result.options)if(d=m.match(b.label)){let w=b.displayLabel?u?u(b,d.matched):[]:d.matched;s(new _g(b,h.source,w,d.score+(b.boost||0)))}}}if(n){let h=Object.create(null),u=0,f=(d,m)=>{var b,w;return((b=d.rank)!==null&&b!==void 0?b:1e9)-((w=m.rank)!==null&&w!==void 0?w:1e9)||(d.name<m.name?-1:1)};for(let d of n.sort(f))u-=1e5,h[d.name]=u;for(let d of t){let{section:m}=d.completion;m&&(d.score+=h[typeof m=="string"?m:m.name])}}let o=[],a=null,c=r.compareCompletions;for(let h of t.sort((u,f)=>f.score-u.score||c(u.completion,f.completion))){let u=h.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?o.push(h):kg(h.completion)>kg(a)&&(o[o.length-1]=h),a=h.completion}return o}class Kn{constructor(e,t,n,s,r,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Kn(this.options,xg(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,r,o){if(s&&!o&&e.some(h=>h.isPending))return s.setDisabled();let a=BA(e,t);if(!a.length)return s&&e.some(h=>h.isPending)?s.setDisabled():null;let c=t.facet(ot).selectOnOpen?0:-1;if(s&&s.selected!=c&&s.selected!=-1){let h=s.options[s.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==h){c=u;break}}return new Kn(a,xg(n,c),{pos:e.reduce((h,u)=>u.hasResult()?Math.min(h,u.from):h,1e8),create:FA,above:r.aboveCursor},s?s.timestamp:Date.now(),c,!1)}map(e){return new Kn(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new Kn(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Do{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Do(IA,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(ot),r=(n.override||t.languageDataAt("autocomplete",yn(t)).map(TA)).map(c=>(this.active.find(u=>u.source==c)||new Xt(c,this.active.some(u=>u.state!=0)?1:0)).update(e,n));r.length==this.active.length&&r.every((c,h)=>c==this.active[h])&&(r=this.active);let o=this.open,a=e.effects.some(c=>c.is(Lc));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!DA(r,this.active)||a?o=Kn.build(r,t,this.id,o,n,a):o&&o.disabled&&!r.some(c=>c.isPending)&&(o=null),!o&&r.every(c=>!c.isPending)&&r.some(c=>c.hasResult())&&(r=r.map(c=>c.hasResult()?new Xt(c.source,0):c));for(let c of e.effects)c.is(Cg)&&(o=o&&o.setSelected(c.value,this.id));return r==this.active&&o==this.open?this:new Do(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?vA:ZA}}function DA(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,r=n==e.length;if(s||r)return s==r;if(i[t++].result!=e[n++].result)return!1}}const vA={"aria-autocomplete":"list"},ZA={};function xg(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const IA=[];function Sg(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation(Rc);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class Xt{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=Sg(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new Xt(s.source,0)),n&4&&s.state==0&&(s=new Xt(this.source,1)),s=s.updateFor(e,n);for(let r of e.effects)if(r.is(Bo))s=new Xt(s.source,1,r.value);else if(r.is(Js))s=new Xt(s.source,0);else if(r.is(Lc))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(yn(e.state))}}class Jn extends Xt{constructor(e,t,n,s,r,o){super(e,3,t),this.limit=n,this.result=s,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=yn(e.state);if(a>o||!s||t&2&&(yn(e.startState)==this.from||a<this.limit))return new Xt(this.source,t&4?1:0);let c=e.changes.mapPos(this.limit);return UA(s.validFor,e.state,r,o)?new Jn(this.source,this.explicit,c,s,r,o):s.update&&(s=s.update(s,r,o,new mg(e.state,a,!1)))?new Jn(this.source,this.explicit,c,s,s.from,(n=s.to)!==null&&n!==void 0?n:yn(e.state)):new Xt(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Jn(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Xt(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function UA(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):bg(i,!0).test(s)}const Lc=we.define({map(i,e){return i.map(t=>t.map(e))}}),Cg=we.define(),$t=rt.define({create(){return Do.start()},update(i,e){return i.update(e)},provide:i=>[ja.from(i,e=>e.tooltip),se.contentAttributes.from(i,e=>e.attrs)]});function Mc(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field($t).active.find(s=>s.source==e.source);return n instanceof Jn?(typeof t=="string"?i.dispatch(Object.assign(Object.assign({},PA(i.state,t,n.from,n.to)),{annotations:Rc.of(e.completion)})):t(i,e.completion,n.from,n.to),!0):!1}const FA=LA($t,Mc);function vo(i,e="option"){return t=>{let n=t.state.field($t,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(ot).interactionDelay)return!1;let s=1,r;e=="page"&&(r=xp(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));let{length:o}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:Cg.of(a)}),!0}}const jA=i=>{let e=i.state.field($t,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(ot).interactionDelay?!1:Mc(i,e.open.options[e.open.selected])},Ag=i=>i.state.field($t,!1)?(i.dispatch({effects:Bo.of(!0)}),!0):!1,qA=i=>{let e=i.state.field($t,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:Js.of(null)}),!0)};class XA{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const WA=50,YA=1e3,zA=Ge.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field($t).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field($t),t=i.state.facet(ot);if(!i.selectionSet&&!i.docChanged&&i.startState.field($t)==e)return;let n=i.transactions.some(r=>{let o=Sg(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;r<this.running.length;r++){let o=this.running[r];if(n||o.context.abortOnDocChange&&i.docChanged||o.updates.length+i.transactions.length>WA&&Date.now()-o.time>YA){for(let a of o.context.abortListeners)try{a()}catch(c){Qt(this.view.state,c)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(r=>r.effects.some(o=>o.is(Bo)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.isPending&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of i.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field($t);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ot).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=yn(e),n=new mg(e,t,i.explicit,this.view),s=new XA(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Js.of(null)}),Qt(this.view.state,r)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ot).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ot),n=this.view.state.field($t);for(let s=0;s<this.running.length;s++){let r=this.running[s];if(r.done===void 0)continue;if(this.running.splice(s--,1),r.done){let a=yn(r.updates.length?r.updates[0].startState:this.view.state),c=Math.min(a,r.done.from+(r.active.explicit?0:1)),h=new Jn(r.active.source,r.active.explicit,c,r.done,r.done.from,(i=r.done.to)!==null&&i!==void 0?i:a);for(let u of r.updates)h=h.update(u,t);if(h.hasResult()){e.push(h);continue}}let o=n.active.find(a=>a.source==r.active.source);if(o&&o.isPending)if(r.done==null){let a=new Xt(r.active.source,0);for(let c of r.updates)a=a.update(c,t);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Lc.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field($t,!1);if(e&&e.tooltip&&this.view.state.facet(ot).closeOnBlur){let t=e.open&&xp(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Js.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Bo.of(!1)}),20),this.composing=0}}}),GA=typeof navigator=="object"&&/Win/.test(navigator.platform),HA=ji.highest(se.domEventHandlers({keydown(i,e){let t=e.state.field($t,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(GA&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(o=>o.source==n.source),r=n.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(i.key)>-1&&Mc(e,n),!1}})),Qg=se.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 KA{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class Bc{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,ft.TrackDel),n=e.mapPos(this.to,1,ft.TrackDel);return t==null||n==null?null:new Bc(this.field,t,n)}}class Dc{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let c of this.lines){if(n.length){let h=o,u=/^\t*/.exec(c)[0].length;for(let f=0;f<u;f++)h+=e.facet(qs);s.push(t+h.length-u),c=h+c.slice(u)}n.push(c),t+=c.length+1}let a=this.fieldPositions.map(c=>new Bc(c.field,s[c.line]+c.from,s[c.line]+c.to));return{text:n,ranges:a}}static parse(e){let t=[],n=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let a=r[1]?+r[1]:null,c=r[2]||r[3]||"",h=-1,u=c.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:u&&t[f].name==u)&&(h=f);if(h<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:u}),h=f;for(let d of s)d.field>=h&&d.field++}s.push(new KA(h,n.length,r.index,r.index+u.length)),o=o.slice(0,r.index)+c+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(a,c,h)=>{for(let u of s)u.line==n.length&&u.from>h&&(u.from--,u.to--);return c}),n.push(o)}return new Dc(n,s)}}let JA=de.widget({widget:new class extends fi{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),eQ=de.mark({class:"cm-snippetField"});class es{constructor(e,t){this.ranges=e,this.active=t,this.deco=de.set(e.map(n=>(n.from==n.to?JA:eQ).range(n.from,n.to)))}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new es(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const er=we.define({map(i,e){return i&&i.map(e)}}),tQ=we.define(),tr=rt.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(er))return t.value;if(t.is(tQ)&&i)return new es(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>se.decorations.from(i,e=>e?e.deco:de.none)});function vc(i,e){return j.create(i.filter(t=>t.field==e).map(t=>j.range(t.from,t.to)))}function iQ(i){let e=Dc.parse(i);return(t,n,s,r)=>{let{text:o,ranges:a}=e.instantiate(t.state,s),{main:c}=t.state.selection,h={changes:{from:s,to:r==c.from?c.to:r,insert:Ae.of(o)},scrollIntoView:!0,annotations:n?[Rc.of(n),Ke.userEvent.of("input.complete")]:void 0};if(a.length&&(h.selection=vc(a,0)),a.some(u=>u.field>0)){let u=new es(a,0),f=h.effects=[er.of(u)];t.state.field(tr,!1)===void 0&&f.push(we.appendConfig.of([tr,sQ,rQ,Qg]))}t.dispatch(t.state.update(h))}}function Pg(i){return({state:e,dispatch:t})=>{let n=e.field(tr,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,r=i>0&&!n.ranges.some(o=>o.field==s+i);return t(e.update({selection:vc(n.ranges,s),effects:er.of(r?null:new es(n.ranges,s)),scrollIntoView:!0})),!0}}const nQ=[{key:"Tab",run:Pg(1),shift:Pg(-1)},{key:"Escape",run:({state:i,dispatch:e})=>i.field(tr,!1)?(e(i.update({effects:er.of(null)})),!0):!1}],Tg=ce.define({combine(i){return i.length?i[0]:nQ}}),sQ=ji.highest(Vs.compute([Tg],i=>i.facet(Tg)));function Nt(i,e){return Object.assign(Object.assign({},e),{apply:iQ(i)})}const rQ=se.domEventHandlers({mousedown(i,e){let t=e.state.field(tr,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=n&&r.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:vc(t.ranges,s.field),effects:er.of(t.ranges.some(r=>r.field>s.field)?new es(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),ir={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},wn=we.define({map(i,e){let t=e.mapPos(i,-1,ft.TrackAfter);return t??void 0}}),Zc=new class extends dn{};Zc.startSide=1,Zc.endSide=-1;const Eg=rt.define({create(){return Ee.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(wn)&&(i=i.update({add:[Zc.range(t.value,t.value+1)]}));return i}});function oQ(){return[aQ,Eg]}const Ic="()[]{}<>";function $g(i){for(let e=0;e<Ic.length;e+=2)if(Ic.charCodeAt(e)==i)return Ic.charAt(e+1);return Dl(i<128?i:i+1)}function Ng(i,e){return i.languageDataAt("closeBrackets",e)[0]||ir}const lQ=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),aQ=se.inputHandler.of((i,e,t,n)=>{if((lQ?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&ai(Ct(n,0))==1||e!=s.from||t!=s.to)return!1;let r=hQ(i.state,n);return r?(i.dispatch(r),!0):!1}),cQ=[{key:"Backspace",run:({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=Ng(i,i.selection.main.head).brackets||ir.brackets,s=null,r=i.changeByRange(o=>{if(o.empty){let a=uQ(i.doc,o.head);for(let c of n)if(c==a&&Zo(i.doc,o.head)==$g(Ct(c,0)))return{changes:{from:o.head-c.length,to:o.head+c.length},range:j.cursor(o.head-c.length)}}return{range:s=o}});return s||e(i.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s}}];function hQ(i,e){let t=Ng(i,i.selection.main.head),n=t.brackets||ir.brackets;for(let s of n){let r=$g(Ct(s,0));if(e==s)return r==s?pQ(i,s,n.indexOf(s+s+s)>-1,t):fQ(i,s,r,t.before||ir.before);if(e==r&&Rg(i,i.selection.main.from))return dQ(i,s,r)}return null}function Rg(i,e){let t=!1;return i.field(Eg).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function Zo(i,e){let t=i.sliceString(e,e+2);return t.slice(0,ai(Ct(t,0)))}function uQ(i,e){let t=i.sliceString(e-2,e);return ai(Ct(t,0))==t.length?t:t.slice(1)}function fQ(i,e,t,n){let s=null,r=i.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:wn.of(o.to+e.length),range:j.range(o.anchor+e.length,o.head+e.length)};let a=Zo(i.doc,o.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:o.head},effects:wn.of(o.head+e.length),range:j.cursor(o.head+e.length)}:{range:s=o}});return s?null:i.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function dQ(i,e,t){let n=null,s=i.changeByRange(r=>r.empty&&Zo(i.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:j.cursor(r.head+t.length)}:n={range:r});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function pQ(i,e,t,n){let s=n.stringPrefixes||ir.stringPrefixes,r=null,o=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:wn.of(a.to+e.length),range:j.range(a.anchor+e.length,a.head+e.length)};let c=a.head,h=Zo(i.doc,c),u;if(h==e){if(Vg(i,c))return{changes:{insert:e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)};if(Rg(i,c)){let d=t&&i.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+d.length,insert:d},range:j.cursor(c+d.length)}}}else{if(t&&i.sliceDoc(c-2*e.length,c)==e+e&&(u=Lg(i,c-2*e.length,s))>-1&&Vg(i,u))return{changes:{insert:e+e+e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)};if(i.charCategorizer(c)(h)!=je.Word&&Lg(i,c,s)>-1&&!mQ(i,c,e,s))return{changes:{insert:e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)}}return{range:r=a}});return r?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Vg(i,e){let t=st(i).resolveInner(e+1);return t.parent&&t.from==e}function mQ(i,e,t,n){let s=st(i).resolveInner(e,-1),r=n.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),c=a.indexOf(t);if(!c||c>-1&&n.indexOf(a.slice(0,c))>-1){let u=s.firstChild;for(;u&&u.from==s.from&&u.to-u.from>t.length+c;){if(i.sliceDoc(u.to-t.length,u.to)==t)return!1;u=u.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function Lg(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=je.Word)return e;for(let s of t){let r=e-s.length;if(i.sliceDoc(r,e)==s&&n(i.sliceDoc(r-1,r))!=je.Word)return r}return-1}function gQ(i={}){return[HA,$t,ot.of(i),zA,OQ,Qg]}const Mg=[{key:"Ctrl-Space",run:Ag},{mac:"Alt-`",run:Ag},{key:"Escape",run:qA},{key:"ArrowDown",run:vo(!0)},{key:"ArrowUp",run:vo(!1)},{key:"PageDown",run:vo(!0,"page")},{key:"PageUp",run:vo(!1,"page")},{key:"Enter",run:jA}],OQ=ji.highest(Vs.computeN([ot],i=>i.facet(ot).defaultKeymap?[Mg]:[]));class Bg{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class kn{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=e,r=n.facet(nr).markerFilter;r&&(s=r(s,n));let o=e.slice().sort((f,d)=>f.from-d.from||f.to-d.to),a=new Qi,c=[],h=0;for(let f=0;;){let d=f==o.length?null:o[f];if(!d&&!c.length)break;let m,b;for(c.length?(m=h,b=c.reduce((g,p)=>Math.min(g,p.to),d&&d.from>m?d.from:1e8)):(m=d.from,b=d.to,c.push(d),f++);f<o.length;){let g=o[f];if(g.from==m&&(g.to>g.from||g.to==m))c.push(g),f++,b=Math.min(g.to,b);else{b=Math.min(g.from,b);break}}let w=TQ(c);if(c.some(g=>g.from==g.to||g.from==g.to-1&&n.doc.lineAt(g.from).to==g.from))a.add(m,m,de.widget({widget:new CQ(w),diagnostics:c.slice()}));else{let g=c.reduce((p,O)=>O.markClass?p+" "+O.markClass:p,"");a.add(m,b,de.mark({class:"cm-lintRange cm-lintRange-"+w+g,diagnostics:c.slice(),inclusiveEnd:c.some(p=>p.to>b)}))}h=b;for(let g=0;g<c.length;g++)c[g].to<=h&&c.splice(g--,1)}let u=a.finish();return new kn(u,t,ts(u))}}function ts(i,e=null,t=0){let n=null;return i.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!n)n=new Bg(s,r,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(n.diagnostic)<0)return!1;n=new Bg(n.from,r,n.diagnostic)}}),n}function _Q(i,e){let t=e.pos,n=e.end||t,s=i.state.facet(nr).hideOn(i,t,n);if(s!=null)return s;let r=i.startState.doc.lineAt(e.pos);return!!(i.effects.some(o=>o.is(Dg))||i.changes.touchesRange(r.from,Math.max(r.to,n)))}function bQ(i,e){return i.field(Mt,!1)?e:e.concat(we.appendConfig.of(EQ))}const Dg=we.define(),Uc=we.define(),vg=we.define(),Mt=rt.define({create(){return new kn(de.none,null,null)},update(i,e){if(e.docChanged&&i.diagnostics.size){let t=i.diagnostics.map(e.changes),n=null,s=i.panel;if(i.selected){let r=e.changes.mapPos(i.selected.from,1);n=ts(t,i.selected.diagnostic,r)||ts(t,null,r)}!t.size&&s&&e.state.facet(nr).autoPanel&&(s=null),i=new kn(t,s,n)}for(let t of e.effects)if(t.is(Dg)){let n=e.state.facet(nr).autoPanel?t.value.length?sr.open:null:i.panel;i=kn.init(t.value,n,e.state)}else t.is(Uc)?i=new kn(i.diagnostics,t.value?sr.open:null,i.selected):t.is(vg)&&(i=new kn(i.diagnostics,i.panel,t.value));return i},provide:i=>[Zs.from(i,e=>e.panel),se.decorations.from(i,e=>e.diagnostics)]}),yQ=de.mark({class:"cm-lintRange cm-lintRange-active"});function wQ(i,e,t){let{diagnostics:n}=i.state.field(Mt),s,r=-1,o=-1;n.between(e-(t<0?1:0),e+(t>0?1:0),(c,h,{spec:u})=>{if(e>=c&&e<=h&&(c==h||(e>c||t>0)&&(e<h||t<0)))return s=u.diagnostics,r=c,o=h,!1});let a=i.state.facet(nr).tooltipFilter;return s&&a&&(s=a(s,i.state)),s?{pos:r,end:o,above:i.state.doc.lineAt(r).to<o,create(){return{dom:kQ(i,s)}}}:null}function kQ(i,e){return ve("ul",{class:"cm-tooltip-lint"},e.map(t=>Ug(i,t,!1)))}const xQ=i=>{let e=i.state.field(Mt,!1);(!e||!e.panel)&&i.dispatch({effects:bQ(i.state,[Uc.of(!0)])});let t=vs(i,sr.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},Zg=i=>{let e=i.state.field(Mt,!1);return!e||!e.panel?!1:(i.dispatch({effects:Uc.of(!1)}),!0)},SQ=[{key:"Mod-Shift-m",run:xQ,preventDefault:!0},{key:"F8",run:i=>{let e=i.state.field(Mt,!1);if(!e)return!1;let t=i.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(i.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)}}],nr=ce.define({combine(i){return Object.assign({sources:i.map(e=>e.source).filter(e=>e!=null)},hi(i.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function Ig(i){let e=[];if(i)e:for(let{name:t}of i){for(let n=0;n<t.length;n++){let s=t[n];if(/[a-zA-Z]/.test(s)&&!e.some(r=>r.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Ug(i,e,t){var n;let s=t?Ig(e.actions):[];return ve("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ve("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(i):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((r,o)=>{let a=!1,c=d=>{if(d.preventDefault(),a)return;a=!0;let m=ts(i.state.field(Mt).diagnostics,e);m&&r.apply(i,m.from,m.to)},{name:h}=r,u=s[o]?h.indexOf(s[o]):-1,f=u<0?h:[h.slice(0,u),ve("u",h.slice(u,u+1)),h.slice(u+1)];return ve("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${h}${u<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&ve("div",{class:"cm-diagnosticSource"},e.source))}class CQ extends fi{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return ve("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Fg{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ug(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class sr{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)Zg(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=Ig(r.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==s.keyCode){let c=ts(this.view.state.field(Mt).diagnostics,r);c&&r.actions[a].apply(e,c.from,c.to)}}else return;s.preventDefault()},n=s=>{for(let r=0;r<this.items.length;r++)this.items[r].dom.contains(s.target)&&this.moveSelection(r)};this.list=ve("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=ve("div",{class:"cm-panel-lint"},this.list,ve("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Zg(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Mt).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(Mt),n=0,s=!1,r=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:h})=>{for(let u of h.diagnostics){if(o.has(u))continue;o.add(u);let f=-1,d;for(let m=n;m<this.items.length;m++)if(this.items[m].diagnostic==u){f=m;break}f<0?(d=new Fg(this.view,u),this.items.splice(n,0,d),s=!0):(d=this.items[f],f>n&&(this.items.splice(n,f-n),s=!0)),t&&d.diagnostic==t.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),r=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();this.items.length==0&&(this.items.push(new Fg(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let h=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/h:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Mt),n=ts(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:vg.of(n)})}static open(e){return new sr(e)}}function AQ(i,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(i)}</svg>')`}function Io(i){return AQ(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${i}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const QQ=se.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:Io("#d11")},".cm-lintRange-warning":{backgroundImage:Io("orange")},".cm-lintRange-info":{backgroundImage:Io("#999")},".cm-lintRange-hint":{backgroundImage:Io("#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}}});function PQ(i){return i=="error"?4:i=="warning"?3:i=="info"?2:1}function TQ(i){let e="hint",t=1;for(let n of i){let s=PQ(n.severity);s>t&&(t=s,e=n.severity)}return e}const EQ=[Mt,se.decorations.compute([Mt],i=>{let{selected:e,panel:t}=i.field(Mt);return!e||!t||e.from==e.to?de.none:de.set([yQ.range(e.from,e.to)])}),xx(wQ,{hideOn:_Q}),QQ],$Q=(()=>[Vx(),Bx(),Kk(),HS(),CS(),Ik(),Xk(),Se.allowMultipleSelections.of(!0),dS(),lm(TS,{fallback:!0}),LS(),oQ(),gQ(),fx(),mx(),sx(),nA(),Vs.of([...cQ,...HC,...kA,...oC,...wS,...Mg,...SQ])])();/*!
33
33
  * VueCodemirror v6.1.1
34
34
  * Copyright (c) Surmon. All rights reserved.
35
35
  * Released under the MIT License.
36
36
  * Surmon
37
- */var $Q=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[EQ]}),NQ=Symbol("vue-codemirror-global-config"),St,RQ=function(i){var e=i.onUpdate,t=i.onChange,n=i.onFocus,s=i.onBlur,r=function(o,a){var c={};for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&a.indexOf(h)<0&&(c[h]=o[h]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var u=0;for(h=Object.getOwnPropertySymbols(o);u<h.length;u++)a.indexOf(h[u])<0&&Object.prototype.propertyIsEnumerable.call(o,h[u])&&(c[h[u]]=o[h[u]])}return c}(i,["onUpdate","onChange","onFocus","onBlur"]);return Se.create({doc:r.doc,selection:r.selection,extensions:(Array.isArray(r.extensions)?r.extensions:[r.extensions]).concat([se.updateListener.of(function(o){e(o),o.docChanged&&t(o.state.doc.toString(),o),o.focusChanged&&(o.view.hasFocus?n(o):s(o))})])})},is=function(i){var e=new Os;return{compartment:e,run:function(t){e.get(i.state)?i.dispatch({effects:e.reconfigure(t)}):i.dispatch({effects:we.appendConfig.of(e.of(t))})}}},Fg=function(i,e){var t=is(i),n=t.compartment,s=t.run;return function(r){var o=n.get(i.state);s(r??o!==e?e:[])}},Io={type:Boolean,default:void 0},VQ={autofocus:Io,disabled:Io,indentWithTab:Io,tabSize:Number,placeholder:String,style:Object,autoDestroy:Io,phrases:Object,root:Object,extensions:Array,selection:Object},LQ={modelValue:{type:String,default:""}},MQ=Object.assign(Object.assign({},VQ),LQ);(function(i){i.Change="change",i.Update="update",i.Focus="focus",i.Blur="blur",i.Ready="ready",i.ModelUpdate="update:modelValue"})(St||(St={}));var xn={};xn[St.Change]=function(i,e){return!0},xn[St.Update]=function(i){return!0},xn[St.Focus]=function(i){return!0},xn[St.Blur]=function(i){return!0},xn[St.Ready]=function(i){return!0};var jg={};jg[St.ModelUpdate]=xn[St.Change];var BQ=Object.assign(Object.assign({},xn),jg),DQ=l.defineComponent({name:"VueCodemirror",props:Object.assign({},MQ),emits:Object.assign({},BQ),setup:function(i,e){var t=l.shallowRef(),n=l.shallowRef(),s=l.shallowRef(),r=Object.assign(Object.assign({},$Q),l.inject(NQ,{})),o=l.computed(function(){var a={};return Object.keys(l.toRaw(i)).forEach(function(c){var h;c!=="modelValue"&&(a[c]=(h=i[c])!==null&&h!==void 0?h:r[c])}),a});return l.onMounted(function(){var a;n.value=RQ({doc:i.modelValue,selection:o.value.selection,extensions:(a=r.extensions)!==null&&a!==void 0?a:[],onFocus:function(h){return e.emit(St.Focus,h)},onBlur:function(h){return e.emit(St.Blur,h)},onUpdate:function(h){return e.emit(St.Update,h)},onChange:function(h,u){h!==i.modelValue&&(e.emit(St.Change,h,u),e.emit(St.ModelUpdate,h,u))}}),s.value=function(h){return new se(Object.assign({},h))}({state:n.value,parent:t.value,root:o.value.root});var c=function(h){var u=function(){return h.state.doc.toString()},f=is(h).run,d=Fg(h,[se.editable.of(!1),Se.readOnly.of(!0)]),m=Fg(h,Rs.of([HC])),b=is(h).run,w=is(h).run,g=is(h).run,p=is(h).run;return{focus:function(){return h.focus()},getDoc:u,setDoc:function(O){O!==u()&&h.dispatch({changes:{from:0,to:h.state.doc.length,insert:O}})},reExtensions:f,toggleDisabled:d,toggleIndentWithTab:m,setTabSize:function(O){b([Se.tabSize.of(O),js.of(" ".repeat(O))])},setPhrases:function(O){w([Se.phrases.of(O)])},setPlaceholder:function(O){g(lx(O))},setStyle:function(O){O===void 0&&(O={}),p(se.theme({"&":Object.assign({},O)}))}}}(s.value);l.watch(function(){return i.modelValue},function(h){h!==c.getDoc()&&c.setDoc(h)}),l.watch(function(){return i.extensions},function(h){return c.reExtensions(h||[])},{immediate:!0}),l.watch(function(){return o.value.disabled},function(h){return c.toggleDisabled(h)},{immediate:!0}),l.watch(function(){return o.value.indentWithTab},function(h){return c.toggleIndentWithTab(h)},{immediate:!0}),l.watch(function(){return o.value.tabSize},function(h){return c.setTabSize(h)},{immediate:!0}),l.watch(function(){return o.value.phrases},function(h){return c.setPhrases(h||{})},{immediate:!0}),l.watch(function(){return o.value.placeholder},function(h){return c.setPlaceholder(h)},{immediate:!0}),l.watch(function(){return o.value.style},function(h){return c.setStyle(h)},{immediate:!0}),o.value.autofocus&&c.focus(),e.emit(St.Ready,{state:n.value,view:s.value,container:t.value})}),l.onBeforeUnmount(function(){o.value.autoDestroy&&s.value&&function(a){a.destroy()}(s.value)}),function(){return l.h("div",{class:"v-codemirror",style:{display:"contents"},ref:t})}}}),vQ=DQ;class Uo{constructor(e,t,n,s,r,o,a,c,h,u=0,f){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=r,this.score=o,this.buffer=a,this.bufferBase=c,this.curContext=h,this.lookAhead=u,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,n=0){let s=e.parser.context;return new Uo(e,[],t,n,n,0,[],0,s?new qg(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 n=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=r.dynamicPrecedence(s);if(a&&(this.score+=a),n==0){this.pushState(r.getGoto(this.state,s,!0),this.reducePos),s<r.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let c=this.stack.length-(n-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,u=this.reducePos-h;u>=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=u));let f=c?this.stack[c-1]:0,d=this.bufferBase+this.buffer.length-f;if(s<r.minRepeatTerm||e&131072){let m=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,h,m,d+4,!0)}if(e&262144)this.state=this.stack[c];else{let m=this.stack[c-3];this.state=r.getGoto(m,s,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(s,h)}storeNode(e,t,n,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t){o.buffer[a-2]=n;return}}}if(!r||this.pos==n)this.buffer.push(e,t,n,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let c=o;c>0&&this.buffer[c-2]>n;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,s,4)}}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,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 n=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Uo(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new ZQ(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}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 r=0,o;r<t.length;r+=2)(o=t[r+1])!=this.state&&this.p.parser.hasAction(o,e)&&s.push(t[r],o);if(this.stack.length<120)for(let r=0;s.length<8&&r<t.length;r+=2){let o=t[r+1];s.some((a,c)=>c&1&&a==o)||s.push(t[r],o)}t=s}let n=[];for(let s=0;s<t.length&&n.length<4;s+=2){let r=t[s+1];if(r==this.state)continue;let o=this.split();o.pushState(r,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[s],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,s=t&65535,r=this.stack.length-n*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}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=[],n=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-r;if(a>1){let c=o&65535,h=this.stack.length-a*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return a<<19|65536|c}}else{let a=n(o,r+1);if(a!=null)return a}})};return n(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 qg(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 qg{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class ZQ{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Fo{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Fo(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 Fo(this.stack,this.pos,this.index)}}function sr(i,e=Uint16Array){if(typeof i!="string")return i;let t=null;for(let n=0,s=0;n<i.length;){let r=0;for(;;){let o=i.charCodeAt(n++),a=!1;if(o==126){r=65535;break}o>=92&&o--,o>=34&&o--;let c=o-32;if(c>=46&&(c-=46,a=!0),r+=c,a)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class jo{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Xg=new jo;class IQ{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Xg,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 n=this.range,s=this.rangeIndex,r=this.pos+e;for(;r<n.from;){if(!s)return null;let o=this.ranges[--s];r-=n.from-o.to,n=o}for(;t<0?r>n.to:r>=n.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-n.to,n=o}return r}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,n,s;if(t>=0&&t<this.chunk.length)n=this.pos+e,s=this.chunk.charCodeAt(t);else{let r=this.resolveOffset(e,1);if(r==null)return-1;if(n=r,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=n;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}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=Xg,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 n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class ns{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;Wg(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}ns.prototype.contextual=ns.prototype.fallback=ns.prototype.extend=!1;class Ic{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?sr(e):e}token(e,t){let n=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(Wg(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(n,e.token),e.acceptToken(this.elseToken,s))}}Ic.prototype.contextual=ns.prototype.fallback=ns.prototype.extend=!1;class rr{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Wg(i,e,t,n,s,r){let o=0,a=1<<n,{dialect:c}=t.p.parser;e:for(;a&i[o];){let h=i[o+1];for(let m=o+3;m<h;m+=2)if((i[m+1]&a)>0){let b=i[m];if(c.allows(b)&&(e.token.value==-1||e.token.value==b||UQ(b,e.token.value,s,r))){e.acceptToken(b);break}}let u=e.next,f=0,d=i[o+2];if(e.next<0&&d>f&&i[h+d*3-3]==65535){o=i[h+d*3-1];continue e}for(;f<d;){let m=f+d>>1,b=h+m+(m<<1),w=i[b],g=i[b+1]||65536;if(u<w)d=m;else if(u>=g)f=m+1;else{o=i[b+2],e.advance();continue e}}break}}function Yg(i,e,t){for(let n=e,s;(s=i[n])!=65535;n++)if(s==t)return n-e;return-1}function UQ(i,e,t,n){let s=Yg(t,n,e);return s<0||Yg(t,n,i)<s}const vt=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let Uc=null;function zg(i,e,t){let n=i.cursor(st.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(i.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:i.length}}class FQ{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?zg(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?zg(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 n=this.trees[t],s=this.index[t];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=n.children[s],o=this.start[t]+n.positions[s];if(o>e)return this.nextStart=o,null;if(r instanceof tt){if(o==e){if(o<this.safeFrom)return null;let a=o+r.length;if(a<=this.safeTo){let c=r.prop(xe.lookAhead);if(!c||a+c<this.fragment.to)return r}}this.index[t]++,o+r.length>=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class jQ{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new jo)}getActions(e){let t=0,n=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<r.length;h++){if(!(1<<h&o))continue;let u=r[h],f=this.tokens[h];if(!(n&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(c=Math.max(f.lookAhead,c)),f.value!=0)){let d=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!u.extend&&(n=f,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!n&&e.pos==this.stream.end&&(n=new jo,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new jo,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){let{parser:r}=n.p;for(let o=0;o<r.specialized.length;o++)if(r.specialized[o]==e.value){let a=r.specializers[o](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,n,s){for(let r=0;r<s;r+=3)if(this.actions[r]==e)return s;return this.actions[s++]=e,this.actions[s++]=t,this.actions[s++]=n,s}addActions(e,t,n,s){let{state:r}=e,{parser:o}=e.p,{data:a}=o;for(let c=0;c<2;c++)for(let h=o.stateSlot(r,c?2:1);;h+=3){if(a[h]==65535)if(a[h+1]==1)h=Vi(a,h+2);else{s==0&&a[h+1]==2&&(s=this.putAction(Vi(a,h+2),t,n,s));break}a[h]==t&&(s=this.putAction(Vi(a,h+1),t,n,s))}return s}}class qQ{constructor(e,t,n,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 IQ(t,s),this.tokens=new jQ(e,this.stream),this.topTerm=e.top[1];let{from:r}=s[0];this.stacks=[Uo.start(this,e.top[0],r)],this.fragments=n.length&&this.stream.end-r>e.bufferLength*4?new FQ(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>t)n.push(a);else{if(this.advanceStack(a,n,e))continue;{s||(s=[],r=[]),s.push(a);let c=this.tokens.getMainToken(a);r.push(c.value,c.end)}}break}}if(!n.length){let o=s&&YQ(s);if(o)return vt&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw vt&&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 o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,n);if(o)return vt&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((a,c)=>c.score-a.score);n.length>o;)n.pop();n.some(a=>a.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o<n.length-1;o++){let a=n[o];for(let c=o+1;c<n.length;c++){let h=n[c];if(a.sameState(h)||a.buffer.length>500&&h.buffer.length>500)if((a.score-h.score||a.buffer.length-h.buffer.length)>0)n.splice(c--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o<n.length;o++)n[o].pos<this.minStackPos&&(this.minStackPos=n[o].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,n){let s=e.pos,{parser:r}=this,o=vt?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,u=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!h||(f.prop(xe.contextHash)||0)==u))return e.useNode(f,d),vt&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof tt)||f.children.length==0||f.positions[0]>0)break;let m=f.children[0];if(m instanceof tt&&f.positions[0]==0)f=m;else break}}let a=r.stateSlot(e.state,4);if(a>0)return e.reduce(a),vt&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let u=c[h++],f=c[h++],d=c[h++],m=h==c.length||!n,b=m?e:e.split(),w=this.tokens.mainToken;if(b.apply(u,f,w?w.start:b.pos,d),vt&&console.log(o+this.stackID(b)+` (via ${u&65536?`reduce of ${r.getName(u&65535)}`:"shift"} for ${r.getName(f)} @ ${s}${b==e?"":", split"})`),m)return!0;b.pos>s?t.push(b):n.push(b)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Gg(e,t),!0}}runRecovery(e,t,n){let s=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o],c=t[o<<1],h=t[(o<<1)+1],u=vt?this.stackID(a)+" -> ":"";if(a.deadEnd&&(r||(r=!0,a.restart(),vt&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let f=a.split(),d=u;for(let m=0;f.forceReduce()&&m<10&&(vt&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));m++)vt&&(d=this.stackID(f)+" -> ");for(let m of a.recoverByInsert(c))vt&&console.log(u+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,n);this.stream.end>a.pos?(h==a.pos&&(h++,c=0),a.recoverByDelete(c,h),vt&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),Gg(a,n)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(e){return e.close(),tt.build({buffer:Fo.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=(Uc||(Uc=new WeakMap)).get(e);return t||Uc.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Gg(i,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==i.pos&&n.sameState(i)){e[t].score<i.score&&(e[t]=i);return}}e.push(i)}class XQ{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}const Fc=i=>i;class WQ{constructor(e){this.start=e.start,this.shift=e.shift||Fc,this.reduce=e.reduce||Fc,this.reuse=e.reuse||Fc,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class qo extends Dp{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 a=0;a<e.repeatNodeCount;a++)t.push("");let n=Object.keys(e.topRules).map(a=>e.topRules[a][1]),s=[];for(let a=0;a<t.length;a++)s.push([]);function r(a,c,h){s[a].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=xe[c]);for(let h=1;h<a.length;){let u=a[h++];if(u>=0)r(u,c,a[h++]);else{let f=a[h+-u];for(let d=-u;d>0;d--)r(a[h++],c,f);h++}}}this.nodeSet=new Ya(t.map((a,c)=>Tt.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:s[c],top:n.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=$p;let o=sr(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(Hg),this.states=sr(e.states,Uint32Array),this.data=sr(e.stateData),this.goto=sr(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ns(o,a):a),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,n){let s=new qQ(this,e,t,n);for(let r of this.wrappers)s=r(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],a=o&1,c=s[r++];if(a&&n)return c;for(let h=r+(o>>1);r<h;r++)if(s[r]==e)return c;if(a)return-1}}hasAction(e,t){let n=this.data;for(let s=0;s<2;s++)for(let r=this.stateSlot(e,s?2:1),o;;r+=3){if((o=n[r])==65535)if(n[r+1]==1)o=n[r=Vi(n,r+2)];else{if(n[r+1]==2)return Vi(n,r+2);break}if(o==t||o==0)return Vi(n,r+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,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),s=n?t(n):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Vi(this.data,r+2);else break;s=t(Vi(this.data,r+1))}return s}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=Vi(this.data,n+2);else break;if(!(this.data[n+2]&1)){let s=this.data[n+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[n],s)}}return t}configure(e){let t=Object.assign(Object.create(qo.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let s=e.tokenizers.find(r=>r.from==n);return s?s.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let r=e.specializers.find(a=>a.from==n.external);if(!r)return n;let o=Object.assign(Object.assign({},n),{external:r.to});return t.specializers[s]=Hg(o),o})),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),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(n[o]=!0)}let s=null;for(let r=0;r<t.length;r++)if(!n[r])for(let o=this.dialects[t[r]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new XQ(e,n,s)}static deserialize(e){return new qo(e)}}function Vi(i,e){return i[e]|i[e+1]<<16}function YQ(i){let e=null;for(let t of i){let n=t.p.stoppedAt;(t.pos==t.p.stream.end||n!=null&&t.pos>n)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Hg(i){if(i.external){let e=i.extend?1:0;return(t,n)=>i.external(t,n)<<1|e}return i.get}const zQ=314,GQ=315,Kg=1,HQ=2,KQ=3,JQ=4,eP=316,tP=318,iP=319,nP=5,sP=6,rP=0,jc=[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],Jg=125,oP=59,qc=47,lP=42,aP=43,cP=45,hP=60,uP=44,fP=63,dP=46,pP=91,mP=new WQ({start:!1,shift(i,e){return e==nP||e==sP||e==tP?i:e==iP},strict:!1}),gP=new rr((i,e)=>{let{next:t}=i;(t==Jg||t==-1||e.context)&&i.acceptToken(eP)},{contextual:!0,fallback:!0}),OP=new rr((i,e)=>{let{next:t}=i,n;jc.indexOf(t)>-1||t==qc&&((n=i.peek(1))==qc||n==lP)||t!=Jg&&t!=oP&&t!=-1&&!e.context&&i.acceptToken(zQ)},{contextual:!0}),_P=new rr((i,e)=>{i.next==pP&&!e.context&&i.acceptToken(GQ)},{contextual:!0}),bP=new rr((i,e)=>{let{next:t}=i;if(t==aP||t==cP){if(i.advance(),t==i.next){i.advance();let n=!e.context&&e.canShift(Kg);i.acceptToken(n?Kg:HQ)}}else t==fP&&i.peek(1)==dP&&(i.advance(),i.advance(),(i.next<48||i.next>57)&&i.acceptToken(KQ))},{contextual:!0});function Xc(i,e){return i>=65&&i<=90||i>=97&&i<=122||i==95||i>=192||!e&&i>=48&&i<=57}const yP=new rr((i,e)=>{if(i.next!=hP||!e.dialectEnabled(rP)||(i.advance(),i.next==qc))return;let t=0;for(;jc.indexOf(i.next)>-1;)i.advance(),t++;if(Xc(i.next,!0)){for(i.advance(),t++;Xc(i.next,!1);)i.advance(),t++;for(;jc.indexOf(i.next)>-1;)i.advance(),t++;if(i.next==uP)return;for(let n=0;;n++){if(n==7){if(!Xc(i.next,!0))return;break}if(i.next!="extends".charCodeAt(n))break;i.advance(),t++}}i.acceptToken(JQ,-t)}),wP=vp({"get set async static":L.modifier,"for while do if else switch try catch finally return throw break continue default case":L.controlKeyword,"in of await yield void typeof delete instanceof":L.operatorKeyword,"let var const using function class extends":L.definitionKeyword,"import export from":L.moduleKeyword,"with debugger as new":L.keyword,TemplateString:L.special(L.string),super:L.atom,BooleanLiteral:L.bool,this:L.self,null:L.null,Star:L.modifier,VariableName:L.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":L.function(L.variableName),VariableDefinition:L.definition(L.variableName),Label:L.labelName,PropertyName:L.propertyName,PrivatePropertyName:L.special(L.propertyName),"CallExpression/MemberExpression/PropertyName":L.function(L.propertyName),"FunctionDeclaration/VariableDefinition":L.function(L.definition(L.variableName)),"ClassDeclaration/VariableDefinition":L.definition(L.className),"NewExpression/VariableName":L.className,PropertyDefinition:L.definition(L.propertyName),PrivatePropertyDefinition:L.definition(L.special(L.propertyName)),UpdateOp:L.updateOperator,"LineComment Hashbang":L.lineComment,BlockComment:L.blockComment,Number:L.number,String:L.string,Escape:L.escape,ArithOp:L.arithmeticOperator,LogicOp:L.logicOperator,BitOp:L.bitwiseOperator,CompareOp:L.compareOperator,RegExp:L.regexp,Equals:L.definitionOperator,Arrow:L.function(L.punctuation),": Spread":L.punctuation,"( )":L.paren,"[ ]":L.squareBracket,"{ }":L.brace,"InterpolationStart InterpolationEnd":L.special(L.brace),".":L.derefOperator,", ;":L.separator,"@":L.meta,TypeName:L.typeName,TypeDefinition:L.definition(L.typeName),"type enum interface implements namespace module declare":L.definitionKeyword,"abstract global Privacy readonly override":L.modifier,"is keyof unique infer asserts":L.operatorKeyword,JSXAttributeValue:L.attributeValue,JSXText:L.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":L.angleBracket,"JSXIdentifier JSXNameSpacedName":L.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":L.attributeName,"JSXBuiltin/JSXIdentifier":L.standard(L.tagName)}),kP={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},xP={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},SP={__proto__:null,"<":189},CP=qo.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O'#GzO;zQ`O'#G{O;zQ`O'#G}O9aQ`O'#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Q8|6iQ9Q6rQ9[<|Q9b=VQ9c=WQ:c9SQ:y9}Q;R:aQ;x#SR=g=sR#[WR'X!el!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sS'T!e-WU*g$|*X*lS-T'U']S0O*h*nQ0W*oQ2m-^Q4m0UR4r0XR(y#xQ!fQT-_'^-`]!qQ!r'^-`1g5qQ#p]R'g;wR)d$dY!uQ'^-`1g5qQ'i!rS's!v!yS'u!z5sS-o'j'kQ-q'lR2{-pT#kZ%dS#jZ%dS%jm,jU(e#h#i#lS.T(f(gQ.X(hQ0n+ZQ3Q.UU3R.V.W.YS6x3S3TR9T6yd#^W#W#Z%g(R([*W+W.O/hr#gZm#h#i#l%d(f(g(h+Z.U.V.W.Y3S3T6yS*Z$x*_Q/o*[Q1|,jQ2d-QQ4W/kQ6g2[Q7i4XQ8{6hT=_'V+XV#aW%g*WU#`W%g*WS(S#W([U(X#Z+W/hS-V'V+XT-y(R.OV'[!e%h*XQ$lfR)v$qT)k$l)lR3}/PT*]$x*_T*e${*WQ0q+cQ1_,QQ3V.aQ5j1aQ5u1iQ6}3ZQ8g5xQ9W6|Q:Q8fQ:d9VQ:|:SQ;U:fQ;`:}R;c;VnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&j!VR,c&gtmOXst!U!V!Z#d%l&g&p&r&s&u,n,s2S2VR,j&mT%km,jR1c,SR,b&eQ&T|R+z&UR+p&OT&n!W&qT&o!W&qT2U,s2V",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList const 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 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 asserts 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:378,context:mP,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",159,"JSXStartCloseTag"],["closedBy",-2,24,167,">",38,"InterpolationEnd",48,"]",59,"}",72,")",164,"JSXEndTag"]],propSources:[wP],skippedNodes:[0,5,6,276],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(Up(X!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(X!bOY&}YZ&cZw&}w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~!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(a~~",141,338),new Ic("j~RQYZXz{^~^O(O~~aP!P!Qd~iO(P~~",25,321)],topRules:{Script:[0,7],SingleExpression:[1,274],SingleClassItem:[2,275]},dialects:{jsx:0,ts:15091},dynamicPrecedences:{78:1,80:1,92:1,168:1,198:1},specialized:[{term:325,get:i=>kP[i]||-1},{term:341,get:i=>xP[i]||-1},{term:93,get:i=>SP[i]||-1}],tokenPrec:15116}),eO=[Rt("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Rt("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Rt("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Rt("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Rt("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Rt(`try {
37
+ */var NQ=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[$Q]}),RQ=Symbol("vue-codemirror-global-config"),xt,VQ=function(i){var e=i.onUpdate,t=i.onChange,n=i.onFocus,s=i.onBlur,r=function(o,a){var c={};for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&a.indexOf(h)<0&&(c[h]=o[h]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var u=0;for(h=Object.getOwnPropertySymbols(o);u<h.length;u++)a.indexOf(h[u])<0&&Object.prototype.propertyIsEnumerable.call(o,h[u])&&(c[h[u]]=o[h[u]])}return c}(i,["onUpdate","onChange","onFocus","onBlur"]);return Se.create({doc:r.doc,selection:r.selection,extensions:(Array.isArray(r.extensions)?r.extensions:[r.extensions]).concat([se.updateListener.of(function(o){e(o),o.docChanged&&t(o.state.doc.toString(),o),o.focusChanged&&(o.view.hasFocus?n(o):s(o))})])})},is=function(i){var e=new _s;return{compartment:e,run:function(t){e.get(i.state)?i.dispatch({effects:e.reconfigure(t)}):i.dispatch({effects:we.appendConfig.of(e.of(t))})}}},jg=function(i,e){var t=is(i),n=t.compartment,s=t.run;return function(r){var o=n.get(i.state);s(r??o!==e?e:[])}},Uo={type:Boolean,default:void 0},LQ={autofocus:Uo,disabled:Uo,indentWithTab:Uo,tabSize:Number,placeholder:String,style:Object,autoDestroy:Uo,phrases:Object,root:Object,extensions:Array,selection:Object},MQ={modelValue:{type:String,default:""}},BQ=Object.assign(Object.assign({},LQ),MQ);(function(i){i.Change="change",i.Update="update",i.Focus="focus",i.Blur="blur",i.Ready="ready",i.ModelUpdate="update:modelValue"})(xt||(xt={}));var xn={};xn[xt.Change]=function(i,e){return!0},xn[xt.Update]=function(i){return!0},xn[xt.Focus]=function(i){return!0},xn[xt.Blur]=function(i){return!0},xn[xt.Ready]=function(i){return!0};var qg={};qg[xt.ModelUpdate]=xn[xt.Change];var DQ=Object.assign(Object.assign({},xn),qg),vQ=l.defineComponent({name:"VueCodemirror",props:Object.assign({},BQ),emits:Object.assign({},DQ),setup:function(i,e){var t=l.shallowRef(),n=l.shallowRef(),s=l.shallowRef(),r=Object.assign(Object.assign({},NQ),l.inject(RQ,{})),o=l.computed(function(){var a={};return Object.keys(l.toRaw(i)).forEach(function(c){var h;c!=="modelValue"&&(a[c]=(h=i[c])!==null&&h!==void 0?h:r[c])}),a});return l.onMounted(function(){var a;n.value=VQ({doc:i.modelValue,selection:o.value.selection,extensions:(a=r.extensions)!==null&&a!==void 0?a:[],onFocus:function(h){return e.emit(xt.Focus,h)},onBlur:function(h){return e.emit(xt.Blur,h)},onUpdate:function(h){return e.emit(xt.Update,h)},onChange:function(h,u){h!==i.modelValue&&(e.emit(xt.Change,h,u),e.emit(xt.ModelUpdate,h,u))}}),s.value=function(h){return new se(Object.assign({},h))}({state:n.value,parent:t.value,root:o.value.root});var c=function(h){var u=function(){return h.state.doc.toString()},f=is(h).run,d=jg(h,[se.editable.of(!1),Se.readOnly.of(!0)]),m=jg(h,Vs.of([KC])),b=is(h).run,w=is(h).run,g=is(h).run,p=is(h).run;return{focus:function(){return h.focus()},getDoc:u,setDoc:function(O){O!==u()&&h.dispatch({changes:{from:0,to:h.state.doc.length,insert:O}})},reExtensions:f,toggleDisabled:d,toggleIndentWithTab:m,setTabSize:function(O){b([Se.tabSize.of(O),qs.of(" ".repeat(O))])},setPhrases:function(O){w([Se.phrases.of(O)])},setPlaceholder:function(O){g(ax(O))},setStyle:function(O){O===void 0&&(O={}),p(se.theme({"&":Object.assign({},O)}))}}}(s.value);l.watch(function(){return i.modelValue},function(h){h!==c.getDoc()&&c.setDoc(h)}),l.watch(function(){return i.extensions},function(h){return c.reExtensions(h||[])},{immediate:!0}),l.watch(function(){return o.value.disabled},function(h){return c.toggleDisabled(h)},{immediate:!0}),l.watch(function(){return o.value.indentWithTab},function(h){return c.toggleIndentWithTab(h)},{immediate:!0}),l.watch(function(){return o.value.tabSize},function(h){return c.setTabSize(h)},{immediate:!0}),l.watch(function(){return o.value.phrases},function(h){return c.setPhrases(h||{})},{immediate:!0}),l.watch(function(){return o.value.placeholder},function(h){return c.setPlaceholder(h)},{immediate:!0}),l.watch(function(){return o.value.style},function(h){return c.setStyle(h)},{immediate:!0}),o.value.autofocus&&c.focus(),e.emit(xt.Ready,{state:n.value,view:s.value,container:t.value})}),l.onBeforeUnmount(function(){o.value.autoDestroy&&s.value&&function(a){a.destroy()}(s.value)}),function(){return l.h("div",{class:"v-codemirror",style:{display:"contents"},ref:t})}}}),ZQ=vQ;class Fo{constructor(e,t,n,s,r,o,a,c,h,u=0,f){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=r,this.score=o,this.buffer=a,this.bufferBase=c,this.curContext=h,this.lookAhead=u,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,n=0){let s=e.parser.context;return new Fo(e,[],t,n,n,0,[],0,s?new Xg(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 n=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=r.dynamicPrecedence(s);if(a&&(this.score+=a),n==0){this.pushState(r.getGoto(this.state,s,!0),this.reducePos),s<r.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let c=this.stack.length-(n-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,u=this.reducePos-h;u>=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=u));let f=c?this.stack[c-1]:0,d=this.bufferBase+this.buffer.length-f;if(s<r.minRepeatTerm||e&131072){let m=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,h,m,d+4,!0)}if(e&262144)this.state=this.stack[c];else{let m=this.stack[c-3];this.state=r.getGoto(m,s,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(s,h)}storeNode(e,t,n,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t){o.buffer[a-2]=n;return}}}if(!r||this.pos==n)this.buffer.push(e,t,n,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let c=o;c>0&&this.buffer[c-2]>n;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,s,4)}}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,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 n=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Fo(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new IQ(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}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 r=0,o;r<t.length;r+=2)(o=t[r+1])!=this.state&&this.p.parser.hasAction(o,e)&&s.push(t[r],o);if(this.stack.length<120)for(let r=0;s.length<8&&r<t.length;r+=2){let o=t[r+1];s.some((a,c)=>c&1&&a==o)||s.push(t[r],o)}t=s}let n=[];for(let s=0;s<t.length&&n.length<4;s+=2){let r=t[s+1];if(r==this.state)continue;let o=this.split();o.pushState(r,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[s],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,s=t&65535,r=this.stack.length-n*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}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=[],n=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-r;if(a>1){let c=o&65535,h=this.stack.length-a*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return a<<19|65536|c}}else{let a=n(o,r+1);if(a!=null)return a}})};return n(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 Xg(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 Xg{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class IQ{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class jo{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new jo(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 jo(this.stack,this.pos,this.index)}}function rr(i,e=Uint16Array){if(typeof i!="string")return i;let t=null;for(let n=0,s=0;n<i.length;){let r=0;for(;;){let o=i.charCodeAt(n++),a=!1;if(o==126){r=65535;break}o>=92&&o--,o>=34&&o--;let c=o-32;if(c>=46&&(c-=46,a=!0),r+=c,a)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class qo{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Wg=new qo;class UQ{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Wg,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 n=this.range,s=this.rangeIndex,r=this.pos+e;for(;r<n.from;){if(!s)return null;let o=this.ranges[--s];r-=n.from-o.to,n=o}for(;t<0?r>n.to:r>=n.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-n.to,n=o}return r}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,n,s;if(t>=0&&t<this.chunk.length)n=this.pos+e,s=this.chunk.charCodeAt(t);else{let r=this.resolveOffset(e,1);if(r==null)return-1;if(n=r,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=n;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}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=Wg,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 n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class ns{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;Yg(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}ns.prototype.contextual=ns.prototype.fallback=ns.prototype.extend=!1;class Fc{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?rr(e):e}token(e,t){let n=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(Yg(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(n,e.token),e.acceptToken(this.elseToken,s))}}Fc.prototype.contextual=ns.prototype.fallback=ns.prototype.extend=!1;class or{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Yg(i,e,t,n,s,r){let o=0,a=1<<n,{dialect:c}=t.p.parser;e:for(;a&i[o];){let h=i[o+1];for(let m=o+3;m<h;m+=2)if((i[m+1]&a)>0){let b=i[m];if(c.allows(b)&&(e.token.value==-1||e.token.value==b||FQ(b,e.token.value,s,r))){e.acceptToken(b);break}}let u=e.next,f=0,d=i[o+2];if(e.next<0&&d>f&&i[h+d*3-3]==65535){o=i[h+d*3-1];continue e}for(;f<d;){let m=f+d>>1,b=h+m+(m<<1),w=i[b],g=i[b+1]||65536;if(u<w)d=m;else if(u>=g)f=m+1;else{o=i[b+2],e.advance();continue e}}break}}function zg(i,e,t){for(let n=e,s;(s=i[n])!=65535;n++)if(s==t)return n-e;return-1}function FQ(i,e,t,n){let s=zg(t,n,e);return s<0||zg(t,n,i)<s}const Bt=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let jc=null;function Gg(i,e,t){let n=i.cursor(nt.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(i.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:i.length}}class jQ{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?Gg(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Gg(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 n=this.trees[t],s=this.index[t];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=n.children[s],o=this.start[t]+n.positions[s];if(o>e)return this.nextStart=o,null;if(r instanceof et){if(o==e){if(o<this.safeFrom)return null;let a=o+r.length;if(a<=this.safeTo){let c=r.prop(xe.lookAhead);if(!c||a+c<this.fragment.to)return r}}this.index[t]++,o+r.length>=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class qQ{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new qo)}getActions(e){let t=0,n=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<r.length;h++){if(!(1<<h&o))continue;let u=r[h],f=this.tokens[h];if(!(n&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(c=Math.max(f.lookAhead,c)),f.value!=0)){let d=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!u.extend&&(n=f,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!n&&e.pos==this.stream.end&&(n=new qo,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new qo,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){let{parser:r}=n.p;for(let o=0;o<r.specialized.length;o++)if(r.specialized[o]==e.value){let a=r.specializers[o](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,n,s){for(let r=0;r<s;r+=3)if(this.actions[r]==e)return s;return this.actions[s++]=e,this.actions[s++]=t,this.actions[s++]=n,s}addActions(e,t,n,s){let{state:r}=e,{parser:o}=e.p,{data:a}=o;for(let c=0;c<2;c++)for(let h=o.stateSlot(r,c?2:1);;h+=3){if(a[h]==65535)if(a[h+1]==1)h=Ni(a,h+2);else{s==0&&a[h+1]==2&&(s=this.putAction(Ni(a,h+2),t,n,s));break}a[h]==t&&(s=this.putAction(Ni(a,h+1),t,n,s))}return s}}class XQ{constructor(e,t,n,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 UQ(t,s),this.tokens=new qQ(e,this.stream),this.topTerm=e.top[1];let{from:r}=s[0];this.stacks=[Fo.start(this,e.top[0],r)],this.fragments=n.length&&this.stream.end-r>e.bufferLength*4?new jQ(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>t)n.push(a);else{if(this.advanceStack(a,n,e))continue;{s||(s=[],r=[]),s.push(a);let c=this.tokens.getMainToken(a);r.push(c.value,c.end)}}break}}if(!n.length){let o=s&&zQ(s);if(o)return Bt&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Bt&&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 o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,n);if(o)return Bt&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((a,c)=>c.score-a.score);n.length>o;)n.pop();n.some(a=>a.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o<n.length-1;o++){let a=n[o];for(let c=o+1;c<n.length;c++){let h=n[c];if(a.sameState(h)||a.buffer.length>500&&h.buffer.length>500)if((a.score-h.score||a.buffer.length-h.buffer.length)>0)n.splice(c--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o<n.length;o++)n[o].pos<this.minStackPos&&(this.minStackPos=n[o].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,n){let s=e.pos,{parser:r}=this,o=Bt?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,u=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!h||(f.prop(xe.contextHash)||0)==u))return e.useNode(f,d),Bt&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof et)||f.children.length==0||f.positions[0]>0)break;let m=f.children[0];if(m instanceof et&&f.positions[0]==0)f=m;else break}}let a=r.stateSlot(e.state,4);if(a>0)return e.reduce(a),Bt&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let u=c[h++],f=c[h++],d=c[h++],m=h==c.length||!n,b=m?e:e.split(),w=this.tokens.mainToken;if(b.apply(u,f,w?w.start:b.pos,d),Bt&&console.log(o+this.stackID(b)+` (via ${u&65536?`reduce of ${r.getName(u&65535)}`:"shift"} for ${r.getName(f)} @ ${s}${b==e?"":", split"})`),m)return!0;b.pos>s?t.push(b):n.push(b)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Hg(e,t),!0}}runRecovery(e,t,n){let s=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o],c=t[o<<1],h=t[(o<<1)+1],u=Bt?this.stackID(a)+" -> ":"";if(a.deadEnd&&(r||(r=!0,a.restart(),Bt&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let f=a.split(),d=u;for(let m=0;f.forceReduce()&&m<10&&(Bt&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));m++)Bt&&(d=this.stackID(f)+" -> ");for(let m of a.recoverByInsert(c))Bt&&console.log(u+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,n);this.stream.end>a.pos?(h==a.pos&&(h++,c=0),a.recoverByDelete(c,h),Bt&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),Hg(a,n)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(e){return e.close(),et.build({buffer:jo.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=(jc||(jc=new WeakMap)).get(e);return t||jc.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Hg(i,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==i.pos&&n.sameState(i)){e[t].score<i.score&&(e[t]=i);return}}e.push(i)}class WQ{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}const qc=i=>i;class YQ{constructor(e){this.start=e.start,this.shift=e.shift||qc,this.reduce=e.reduce||qc,this.reuse=e.reuse||qc,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Xo extends vp{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 a=0;a<e.repeatNodeCount;a++)t.push("");let n=Object.keys(e.topRules).map(a=>e.topRules[a][1]),s=[];for(let a=0;a<t.length;a++)s.push([]);function r(a,c,h){s[a].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=xe[c]);for(let h=1;h<a.length;){let u=a[h++];if(u>=0)r(u,c,a[h++]);else{let f=a[h+-u];for(let d=-u;d>0;d--)r(a[h++],c,f);h++}}}this.nodeSet=new Ga(t.map((a,c)=>Pt.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:s[c],top:n.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Np;let o=rr(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(Kg),this.states=rr(e.states,Uint32Array),this.data=rr(e.stateData),this.goto=rr(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ns(o,a):a),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,n){let s=new XQ(this,e,t,n);for(let r of this.wrappers)s=r(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],a=o&1,c=s[r++];if(a&&n)return c;for(let h=r+(o>>1);r<h;r++)if(s[r]==e)return c;if(a)return-1}}hasAction(e,t){let n=this.data;for(let s=0;s<2;s++)for(let r=this.stateSlot(e,s?2:1),o;;r+=3){if((o=n[r])==65535)if(n[r+1]==1)o=n[r=Ni(n,r+2)];else{if(n[r+1]==2)return Ni(n,r+2);break}if(o==t||o==0)return Ni(n,r+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,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),s=n?t(n):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ni(this.data,r+2);else break;s=t(Ni(this.data,r+1))}return s}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=Ni(this.data,n+2);else break;if(!(this.data[n+2]&1)){let s=this.data[n+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[n],s)}}return t}configure(e){let t=Object.assign(Object.create(Xo.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let s=e.tokenizers.find(r=>r.from==n);return s?s.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let r=e.specializers.find(a=>a.from==n.external);if(!r)return n;let o=Object.assign(Object.assign({},n),{external:r.to});return t.specializers[s]=Kg(o),o})),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),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(n[o]=!0)}let s=null;for(let r=0;r<t.length;r++)if(!n[r])for(let o=this.dialects[t[r]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new WQ(e,n,s)}static deserialize(e){return new Xo(e)}}function Ni(i,e){return i[e]|i[e+1]<<16}function zQ(i){let e=null;for(let t of i){let n=t.p.stoppedAt;(t.pos==t.p.stream.end||n!=null&&t.pos>n)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Kg(i){if(i.external){let e=i.extend?1:0;return(t,n)=>i.external(t,n)<<1|e}return i.get}const GQ=314,HQ=315,Jg=1,KQ=2,JQ=3,eP=4,tP=316,iP=318,nP=319,sP=5,rP=6,oP=0,Xc=[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],eO=125,lP=59,Wc=47,aP=42,cP=43,hP=45,uP=60,fP=44,dP=63,pP=46,mP=91,gP=new YQ({start:!1,shift(i,e){return e==sP||e==rP||e==iP?i:e==nP},strict:!1}),OP=new or((i,e)=>{let{next:t}=i;(t==eO||t==-1||e.context)&&i.acceptToken(tP)},{contextual:!0,fallback:!0}),_P=new or((i,e)=>{let{next:t}=i,n;Xc.indexOf(t)>-1||t==Wc&&((n=i.peek(1))==Wc||n==aP)||t!=eO&&t!=lP&&t!=-1&&!e.context&&i.acceptToken(GQ)},{contextual:!0}),bP=new or((i,e)=>{i.next==mP&&!e.context&&i.acceptToken(HQ)},{contextual:!0}),yP=new or((i,e)=>{let{next:t}=i;if(t==cP||t==hP){if(i.advance(),t==i.next){i.advance();let n=!e.context&&e.canShift(Jg);i.acceptToken(n?Jg:KQ)}}else t==dP&&i.peek(1)==pP&&(i.advance(),i.advance(),(i.next<48||i.next>57)&&i.acceptToken(JQ))},{contextual:!0});function Yc(i,e){return i>=65&&i<=90||i>=97&&i<=122||i==95||i>=192||!e&&i>=48&&i<=57}const wP=new or((i,e)=>{if(i.next!=uP||!e.dialectEnabled(oP)||(i.advance(),i.next==Wc))return;let t=0;for(;Xc.indexOf(i.next)>-1;)i.advance(),t++;if(Yc(i.next,!0)){for(i.advance(),t++;Yc(i.next,!1);)i.advance(),t++;for(;Xc.indexOf(i.next)>-1;)i.advance(),t++;if(i.next==fP)return;for(let n=0;;n++){if(n==7){if(!Yc(i.next,!0))return;break}if(i.next!="extends".charCodeAt(n))break;i.advance(),t++}}i.acceptToken(eP,-t)}),kP=Zp({"get set async static":L.modifier,"for while do if else switch try catch finally return throw break continue default case":L.controlKeyword,"in of await yield void typeof delete instanceof":L.operatorKeyword,"let var const using function class extends":L.definitionKeyword,"import export from":L.moduleKeyword,"with debugger as new":L.keyword,TemplateString:L.special(L.string),super:L.atom,BooleanLiteral:L.bool,this:L.self,null:L.null,Star:L.modifier,VariableName:L.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":L.function(L.variableName),VariableDefinition:L.definition(L.variableName),Label:L.labelName,PropertyName:L.propertyName,PrivatePropertyName:L.special(L.propertyName),"CallExpression/MemberExpression/PropertyName":L.function(L.propertyName),"FunctionDeclaration/VariableDefinition":L.function(L.definition(L.variableName)),"ClassDeclaration/VariableDefinition":L.definition(L.className),"NewExpression/VariableName":L.className,PropertyDefinition:L.definition(L.propertyName),PrivatePropertyDefinition:L.definition(L.special(L.propertyName)),UpdateOp:L.updateOperator,"LineComment Hashbang":L.lineComment,BlockComment:L.blockComment,Number:L.number,String:L.string,Escape:L.escape,ArithOp:L.arithmeticOperator,LogicOp:L.logicOperator,BitOp:L.bitwiseOperator,CompareOp:L.compareOperator,RegExp:L.regexp,Equals:L.definitionOperator,Arrow:L.function(L.punctuation),": Spread":L.punctuation,"( )":L.paren,"[ ]":L.squareBracket,"{ }":L.brace,"InterpolationStart InterpolationEnd":L.special(L.brace),".":L.derefOperator,", ;":L.separator,"@":L.meta,TypeName:L.typeName,TypeDefinition:L.definition(L.typeName),"type enum interface implements namespace module declare":L.definitionKeyword,"abstract global Privacy readonly override":L.modifier,"is keyof unique infer asserts":L.operatorKeyword,JSXAttributeValue:L.attributeValue,JSXText:L.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":L.angleBracket,"JSXIdentifier JSXNameSpacedName":L.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":L.attributeName,"JSXBuiltin/JSXIdentifier":L.standard(L.tagName)}),xP={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},SP={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},CP={__proto__:null,"<":189},AP=Xo.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O'#G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3OQ7V3dQ7W<qQ7a<sQ7b<{Q8`5mQ8|6iQ9Q6rQ9[<|Q9b=VQ9c=WQ:c9SQ:y9}Q;R:aQ;x#SR=g=sR#[WR'X!el!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sS'T!e-WU*g$|*X*lS-T'U']S0O*h*nQ0W*oQ2m-^Q4m0UR4r0XR(y#xQ!fQT-_'^-`]!qQ!r'^-`1g5qQ#p]R'g;wR)d$dY!uQ'^-`1g5qQ'i!rS's!v!yS'u!z5sS-o'j'kQ-q'lR2{-pT#kZ%dS#jZ%dS%jm,jU(e#h#i#lS.T(f(gQ.X(hQ0n+ZQ3Q.UU3R.V.W.YS6x3S3TR9T6yd#^W#W#Z%g(R([*W+W.O/hr#gZm#h#i#l%d(f(g(h+Z.U.V.W.Y3S3T6yS*Z$x*_Q/o*[Q1|,jQ2d-QQ4W/kQ6g2[Q7i4XQ8{6hT=_'V+XV#aW%g*WU#`W%g*WS(S#W([U(X#Z+W/hS-V'V+XT-y(R.OV'[!e%h*XQ$lfR)v$qT)k$l)lR3}/PT*]$x*_T*e${*WQ0q+cQ1_,QQ3V.aQ5j1aQ5u1iQ6}3ZQ8g5xQ9W6|Q:Q8fQ:d9VQ:|:SQ;U:fQ;`:}R;c;VnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&j!VR,c&gtmOXst!U!V!Z#d%l&g&p&r&s&u,n,s2S2VR,j&mT%km,jR1c,SR,b&eQ&T|R+z&UR+p&OT&n!W&qT&o!W&qT2U,s2V",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList const 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 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 asserts 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:378,context:gP,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",159,"JSXStartCloseTag"],["closedBy",-2,24,167,">",38,"InterpolationEnd",48,"]",59,"}",72,")",164,"JSXEndTag"]],propSources:[kP],skippedNodes:[0,5,6,276],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(Up(X!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;=`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#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!S~~!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(a~~",141,338),new Fc("j~RQYZXz{^~^O(O~~aP!P!Qd~iO(P~~",25,321)],topRules:{Script:[0,7],SingleExpression:[1,274],SingleClassItem:[2,275]},dialects:{jsx:0,ts:15091},dynamicPrecedences:{78:1,80:1,92:1,168:1,198:1},specialized:[{term:325,get:i=>xP[i]||-1},{term:341,get:i=>SP[i]||-1},{term:93,get:i=>CP[i]||-1}],tokenPrec:15116}),tO=[Nt("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Nt("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Nt("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Nt("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Nt("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Nt(`try {
38
38
  \${}
39
39
  } catch (\${error}) {
40
40
  \${}
41
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),Rt("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Rt(`if (\${}) {
41
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),Nt("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Nt(`if (\${}) {
42
42
  \${}
43
43
  } else {
44
44
  \${}
45
- }`,{label:"if",detail:"/ else block",type:"keyword"}),Rt(`class \${name} {
45
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),Nt(`class \${name} {
46
46
  constructor(\${params}) {
47
47
  \${}
48
48
  }
49
- }`,{label:"class",detail:"definition",type:"keyword"}),Rt('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Rt('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],AP=eO.concat([Rt("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Rt("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Rt("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),tO=new Fx,iO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function or(i){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,i),!0}}const QP=["FunctionDeclaration"],PP={FunctionDeclaration:or("function"),ClassDeclaration:or("class"),ClassExpression:()=>!0,EnumDeclaration:or("constant"),TypeAliasDeclaration:or("type"),NamespaceDeclaration:or("namespace"),VariableDefinition(i,e){i.matchContext(QP)||e(i,"variable")},TypeDefinition(i,e){e(i,"type")},__proto__:null};function nO(i,e){let t=tO.get(e);if(t)return t;let n=[],s=!0;function r(o,a){let c=i.sliceString(o.from,o.to);n.push({label:c,type:a})}return e.cursor(st.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let a=PP[o.name];if(a&&a(o,r)||iO.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of nO(i,o.node))n.push(a);return!1}}),tO.set(e,n),n}const sO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,rO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function TP(i){let e=rt(i.state).resolveInner(i.pos,-1);if(rO.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&sO.test(i.state.sliceDoc(e.from,e.to));if(!t&&!i.explicit)return null;let n=[];for(let s=e;s;s=s.parent)iO.has(s.name)&&(n=n.concat(nO(i.state.doc,s)));return{options:n,from:t?e.from:i.pos,validFor:sO}}const Sn=mo.define({name:"javascript",parser:CP.configure({props:[Yp.add({IfStatement:lc({except:/^\s*({|else\b)/}),TryStatement:lc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:hS,SwitchBody:i=>{let e=i.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return i.baseIndent+(t?0:n?1:2)*i.unit},Block:cS({closing:"}"}),ArrowFunction:i=>i.baseIndent+i.unit,"TemplateString BlockComment":()=>null,"Statement Property":lc({except:/^{/}),JSXElement(i){let e=/^\s*<\//.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},JSXEscape(i){let e=/\s*\}/.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},"JSXOpenTag JSXSelfClosingTag"(i){return i.column(i.node.from)+i.unit}}),Hp.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":pS,BlockComment(i){return{from:i.from+2,to:i.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),oO={test:i=>/^JSX/.test(i.name),facet:jp({commentTokens:{block:{open:"{/*",close:"*/}"}}})},EP=Sn.configure({dialect:"ts"},"typescript"),$P=Sn.configure({dialect:"jsx",props:[nc.add(i=>i.isTop?[oO]:void 0)]}),NP=Sn.configure({dialect:"jsx ts",props:[nc.add(i=>i.isTop?[oO]:void 0)]},"typescript");let lO=i=>({label:i,type:"keyword"});const aO="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(lO),RP=aO.concat(["declare","implements","private","protected","public"].map(lO));function VP(i={}){let e=i.jsx?i.typescript?NP:$P:i.typescript?EP:Sn,t=i.typescript?AP.concat(RP):eO.concat(aO);return new tS(e,[Sn.data.of({autocomplete:AA(rO,gg(t))}),Sn.data.of({autocomplete:TP}),i.jsx?BP:[]])}function LP(i){for(;;){if(i.name=="JSXOpenTag"||i.name=="JSXSelfClosingTag"||i.name=="JSXFragmentTag")return i;if(i.name=="JSXEscape"||!i.parent)return null;i=i.parent}}function cO(i,e,t=i.length){for(let n=e==null?void 0:e.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return i.sliceString(n.from,Math.min(n.to,t));return""}const MP=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),BP=se.inputHandler.of((i,e,t,n,s)=>{if((MP?i.composing:i.compositionStarted)||i.state.readOnly||e!=t||n!=">"&&n!="/"||!Sn.isActiveAt(i.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange(c=>{var h;let{head:u}=c,f=rt(o).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=n||f.name=="JSXAttributeValue"&&f.to>u)){if(n==">"&&f.name=="JSXFragmentTag")return{range:c,changes:{from:u,insert:"</>"}};if(n=="/"&&f.name=="JSXStartCloseTag"){let m=f.parent,b=m.parent;if(b&&m.from==u-2&&((d=cO(o.doc,b.firstChild,u))||((h=b.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let w=`${d}>`;return{range:j.cursor(u+w.length,-1),changes:{from:u,insert:w}}}}else if(n==">"){let m=LP(f);if(m&&m.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=cO(o.doc,m,u)))return{range:c,changes:{from:u,insert:`</${d}>`}}}}return{range:c}});return a.changes.empty?!1:(i.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),DP="#e5c07b",hO="#e06c75",vP="#56b6c2",ZP="#ffffff",Xo="#abb2bf",Wc="#7d8799",IP="#61afef",UP="#98c379",uO="#d19a66",FP="#c678dd",jP="#21252b",fO="#2c313a",dO="#282c34",Yc="#353a42",qP="#3E4451",pO="#528bff",XP=se.theme({"&":{color:Xo,backgroundColor:dO},".cm-content":{caretColor:pO},".cm-cursor, .cm-dropCursor":{borderLeftColor:pO},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:qP},".cm-panels":{backgroundColor:jP,color:Xo},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:dO,color:Wc,border:"none"},".cm-activeLineGutter":{backgroundColor:fO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Yc},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Yc,borderBottomColor:Yc},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:fO,color:Xo}}},{dark:!0}),WP=Ws.define([{tag:L.keyword,color:FP},{tag:[L.name,L.deleted,L.character,L.propertyName,L.macroName],color:hO},{tag:[L.function(L.variableName),L.labelName],color:IP},{tag:[L.color,L.constant(L.name),L.standard(L.name)],color:uO},{tag:[L.definition(L.name),L.separator],color:Xo},{tag:[L.typeName,L.className,L.number,L.changed,L.annotation,L.modifier,L.self,L.namespace],color:DP},{tag:[L.operator,L.operatorKeyword,L.url,L.escape,L.regexp,L.link,L.special(L.string)],color:vP},{tag:[L.meta,L.comment],color:Wc},{tag:L.strong,fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.link,color:Wc,textDecoration:"underline"},{tag:L.heading,fontWeight:"bold",color:hO},{tag:[L.atom,L.bool,L.special(L.variableName)],color:uO},{tag:[L.processingInstruction,L.string,L.inserted],color:UP},{tag:L.invalid,color:ZP}]),YP=[XP,om(WP)];function zP(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var mO={exports:{}},lr={},Wo={exports:{}},zc={},Gc={},gO;function Hc(){if(gO)return Gc;gO=1;function i(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}i.prototype.clone_empty=function(){var n=new i(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},i.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},i.prototype.has_match=function(n){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(n))return!0;return!1},i.prototype.set_indent=function(n,s){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},i.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},i.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},i.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},i.prototype.is_empty=function(){return this.__items.length===0},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(n){this.__items.push(n);var s=n.lastIndexOf(`
49
+ }`,{label:"class",detail:"definition",type:"keyword"}),Nt('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Nt('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],QP=tO.concat([Nt("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Nt("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Nt("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),iO=new jx,nO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function lr(i){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,i),!0}}const PP=["FunctionDeclaration"],TP={FunctionDeclaration:lr("function"),ClassDeclaration:lr("class"),ClassExpression:()=>!0,EnumDeclaration:lr("constant"),TypeAliasDeclaration:lr("type"),NamespaceDeclaration:lr("namespace"),VariableDefinition(i,e){i.matchContext(PP)||e(i,"variable")},TypeDefinition(i,e){e(i,"type")},__proto__:null};function sO(i,e){let t=iO.get(e);if(t)return t;let n=[],s=!0;function r(o,a){let c=i.sliceString(o.from,o.to);n.push({label:c,type:a})}return e.cursor(nt.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let a=TP[o.name];if(a&&a(o,r)||nO.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of sO(i,o.node))n.push(a);return!1}}),iO.set(e,n),n}const rO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,oO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function EP(i){let e=st(i.state).resolveInner(i.pos,-1);if(oO.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&rO.test(i.state.sliceDoc(e.from,e.to));if(!t&&!i.explicit)return null;let n=[];for(let s=e;s;s=s.parent)nO.has(s.name)&&(n=n.concat(sO(i.state.doc,s)));return{options:n,from:t?e.from:i.pos,validFor:rO}}const Sn=go.define({name:"javascript",parser:AP.configure({props:[zp.add({IfStatement:cc({except:/^\s*({|else\b)/}),TryStatement:cc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:uS,SwitchBody:i=>{let e=i.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return i.baseIndent+(t?0:n?1:2)*i.unit},Block:hS({closing:"}"}),ArrowFunction:i=>i.baseIndent+i.unit,"TemplateString BlockComment":()=>null,"Statement Property":cc({except:/^{/}),JSXElement(i){let e=/^\s*<\//.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},JSXEscape(i){let e=/\s*\}/.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},"JSXOpenTag JSXSelfClosingTag"(i){return i.column(i.node.from)+i.unit}}),Kp.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":mS,BlockComment(i){return{from:i.from+2,to:i.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),lO={test:i=>/^JSX/.test(i.name),facet:qp({commentTokens:{block:{open:"{/*",close:"*/}"}}})},$P=Sn.configure({dialect:"ts"},"typescript"),NP=Sn.configure({dialect:"jsx",props:[rc.add(i=>i.isTop?[lO]:void 0)]}),RP=Sn.configure({dialect:"jsx ts",props:[rc.add(i=>i.isTop?[lO]:void 0)]},"typescript");let aO=i=>({label:i,type:"keyword"});const cO="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(aO),VP=cO.concat(["declare","implements","private","protected","public"].map(aO));function LP(i={}){let e=i.jsx?i.typescript?RP:NP:i.typescript?$P:Sn,t=i.typescript?QP.concat(VP):tO.concat(cO);return new iS(e,[Sn.data.of({autocomplete:QA(oO,Og(t))}),Sn.data.of({autocomplete:EP}),i.jsx?DP:[]])}function MP(i){for(;;){if(i.name=="JSXOpenTag"||i.name=="JSXSelfClosingTag"||i.name=="JSXFragmentTag")return i;if(i.name=="JSXEscape"||!i.parent)return null;i=i.parent}}function hO(i,e,t=i.length){for(let n=e==null?void 0:e.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return i.sliceString(n.from,Math.min(n.to,t));return""}const BP=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),DP=se.inputHandler.of((i,e,t,n,s)=>{if((BP?i.composing:i.compositionStarted)||i.state.readOnly||e!=t||n!=">"&&n!="/"||!Sn.isActiveAt(i.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange(c=>{var h;let{head:u}=c,f=st(o).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=n||f.name=="JSXAttributeValue"&&f.to>u)){if(n==">"&&f.name=="JSXFragmentTag")return{range:c,changes:{from:u,insert:"</>"}};if(n=="/"&&f.name=="JSXStartCloseTag"){let m=f.parent,b=m.parent;if(b&&m.from==u-2&&((d=hO(o.doc,b.firstChild,u))||((h=b.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let w=`${d}>`;return{range:j.cursor(u+w.length,-1),changes:{from:u,insert:w}}}}else if(n==">"){let m=MP(f);if(m&&m.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=hO(o.doc,m,u)))return{range:c,changes:{from:u,insert:`</${d}>`}}}}return{range:c}});return a.changes.empty?!1:(i.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),vP="#e5c07b",uO="#e06c75",ZP="#56b6c2",IP="#ffffff",Wo="#abb2bf",zc="#7d8799",UP="#61afef",FP="#98c379",fO="#d19a66",jP="#c678dd",qP="#21252b",dO="#2c313a",pO="#282c34",Gc="#353a42",XP="#3E4451",mO="#528bff",WP=se.theme({"&":{color:Wo,backgroundColor:pO},".cm-content":{caretColor:mO},".cm-cursor, .cm-dropCursor":{borderLeftColor:mO},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:XP},".cm-panels":{backgroundColor:qP,color:Wo},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:pO,color:zc,border:"none"},".cm-activeLineGutter":{backgroundColor:dO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Gc},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Gc,borderBottomColor:Gc},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:dO,color:Wo}}},{dark:!0}),YP=Ys.define([{tag:L.keyword,color:jP},{tag:[L.name,L.deleted,L.character,L.propertyName,L.macroName],color:uO},{tag:[L.function(L.variableName),L.labelName],color:UP},{tag:[L.color,L.constant(L.name),L.standard(L.name)],color:fO},{tag:[L.definition(L.name),L.separator],color:Wo},{tag:[L.typeName,L.className,L.number,L.changed,L.annotation,L.modifier,L.self,L.namespace],color:vP},{tag:[L.operator,L.operatorKeyword,L.url,L.escape,L.regexp,L.link,L.special(L.string)],color:ZP},{tag:[L.meta,L.comment],color:zc},{tag:L.strong,fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.link,color:zc,textDecoration:"underline"},{tag:L.heading,fontWeight:"bold",color:uO},{tag:[L.atom,L.bool,L.special(L.variableName)],color:fO},{tag:[L.processingInstruction,L.string,L.inserted],color:FP},{tag:L.invalid,color:IP}]),zP=[WP,lm(YP)];function GP(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var gO={exports:{}},ar={},Yo={exports:{}},Hc={},Kc={},OO;function Jc(){if(OO)return Kc;OO=1;function i(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}i.prototype.clone_empty=function(){var n=new i(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},i.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},i.prototype.has_match=function(n){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(n))return!0;return!1},i.prototype.set_indent=function(n,s){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},i.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},i.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},i.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},i.prototype.is_empty=function(){return this.__items.length===0},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(n){this.__items.push(n);var s=n.lastIndexOf(`
50
50
  `);s!==-1?this.__character_count=n.length-s:this.__character_count+=n.length},i.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},i.prototype.toString=function(){var n="";return this.is_empty()?this.__parent.indent_empty_lines&&(n=this.__parent.get_indent_string(this.__indent_count)):(n=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),n+=this.__items.join("")),n};function e(n,s){this.__cache=[""],this.__indent_size=n.indent_size,this.__indent_string=n.indent_char,n.indent_with_tabs||(this.__indent_string=new Array(n.indent_size+1).join(n.indent_char)),s=s||"",n.indent_level>0&&(s=new Array(n.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}e.prototype.get_indent_size=function(n,s){var r=this.__base_string_length;return s=s||0,n<0&&(r=0),r+=n*this.__indent_size,r+=s,r},e.prototype.get_indent_string=function(n,s){var r=this.__base_string;return s=s||0,n<0&&(n=0,r=""),s+=n*this.__indent_size,this.__ensure_cache(s),r+=this.__cache[s],r},e.prototype.__ensure_cache=function(n){for(;n>=this.__cache.length;)this.__add_column()},e.prototype.__add_column=function(){var n=this.__cache.length,s=0,r="";this.__indent_size&&n>=this.__indent_size&&(s=Math.floor(n/this.__indent_size),n-=s*this.__indent_size,r=new Array(s+1).join(this.__indent_string)),n&&(r+=new Array(n+1).join(" ")),this.__cache.push(r)};function t(n,s){this.__indent_cache=new e(n,s),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return t.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},t.prototype.get_line_number=function(){return this.__lines.length},t.prototype.get_indent_string=function(n,s){return this.__indent_cache.get_indent_string(n,s)},t.prototype.get_indent_size=function(n,s){return this.__indent_cache.get_indent_size(n,s)},t.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},t.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},t.prototype.get_code=function(n){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
51
51
  `&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
52
52
  `);return n!==`
53
- `&&(r=r.replace(/[\n]/g,n)),r},t.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},t.prototype.set_indent=function(n,s){return n=n||0,s=s||0,this.next_line.set_indent(n,s),this.__lines.length>1?(this.current_line.set_indent(n,s),!0):(this.current_line.set_indent(),!1)},t.prototype.add_raw_token=function(n){for(var s=0;s<n.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},t.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},t.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},t.prototype.remove_indent=function(n){for(var s=this.__lines.length;n<s;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},t.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},t.prototype.just_added_newline=function(){return this.current_line.is_empty()},t.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},t.prototype.ensure_empty_line_above=function(n,s){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(n)!==0&&o.item(-1)!==s){this.__lines.splice(r+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},Gc.Output=t,Gc}var Kc={},OO;function _O(){if(OO)return Kc;OO=1;function i(e,t,n,s){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}return Kc.Token=i,Kc}var Jc={},bO;function yO(){return bO||(bO=1,function(i){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",r="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",o="(?:"+r+"|["+e+n+"])",a="(?:"+r+"|["+t+n+s+"])*";i.identifier=new RegExp(o+a,"g"),i.identifierStart=new RegExp(o),i.identifierMatch=new RegExp("(?:"+r+"|["+t+n+s+"])+"),i.newline=/[\n\r\u2028\u2029]/,i.lineBreak=new RegExp(`\r
54
- |`+i.newline.source),i.allLineBreaks=new RegExp(i.lineBreak.source,"g")}(Jc)),Jc}var eh={},ar={},wO;function th(){if(wO)return ar;wO=1;function i(n,s){this.raw_options=e(n,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}i.prototype._get_array=function(n,s){var r=this.raw_options[n],o=s||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},i.prototype._get_boolean=function(n,s){var r=this.raw_options[n],o=r===void 0?!!s:!!r;return o},i.prototype._get_characters=function(n,s){var r=this.raw_options[n],o=s||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
53
+ `&&(r=r.replace(/[\n]/g,n)),r},t.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},t.prototype.set_indent=function(n,s){return n=n||0,s=s||0,this.next_line.set_indent(n,s),this.__lines.length>1?(this.current_line.set_indent(n,s),!0):(this.current_line.set_indent(),!1)},t.prototype.add_raw_token=function(n){for(var s=0;s<n.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},t.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},t.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},t.prototype.remove_indent=function(n){for(var s=this.__lines.length;n<s;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},t.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},t.prototype.just_added_newline=function(){return this.current_line.is_empty()},t.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},t.prototype.ensure_empty_line_above=function(n,s){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(n)!==0&&o.item(-1)!==s){this.__lines.splice(r+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},Kc.Output=t,Kc}var eh={},_O;function bO(){if(_O)return eh;_O=1;function i(e,t,n,s){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}return eh.Token=i,eh}var th={},yO;function wO(){return yO||(yO=1,function(i){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",r="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",o="(?:"+r+"|["+e+n+"])",a="(?:"+r+"|["+t+n+s+"])*";i.identifier=new RegExp(o+a,"g"),i.identifierStart=new RegExp(o),i.identifierMatch=new RegExp("(?:"+r+"|["+t+n+s+"])+"),i.newline=/[\n\r\u2028\u2029]/,i.lineBreak=new RegExp(`\r
54
+ |`+i.newline.source),i.allLineBreaks=new RegExp(i.lineBreak.source,"g")}(th)),th}var ih={},cr={},kO;function nh(){if(kO)return cr;kO=1;function i(n,s){this.raw_options=e(n,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}i.prototype._get_array=function(n,s){var r=this.raw_options[n],o=s||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},i.prototype._get_boolean=function(n,s){var r=this.raw_options[n],o=r===void 0?!!s:!!r;return o},i.prototype._get_characters=function(n,s){var r=this.raw_options[n],o=s||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
55
55
  `).replace(/\\t/," ")),o},i.prototype._get_number=function(n,s){var r=this.raw_options[n];s=parseInt(s,10),isNaN(s)&&(s=0);var o=parseInt(r,10);return isNaN(o)&&(o=s),o},i.prototype._get_selection=function(n,s,r){var o=this._get_selection_list(n,s,r);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+n+`' can only be one of the following values:
56
56
  `+s+`
57
57
  You passed in: '`+this.raw_options[n]+"'");return o[0]},i.prototype._get_selection_list=function(n,s,r){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[s[0]],!this._is_valid_selection(r,s))throw new Error("Invalid Default Value!");var o=this._get_array(n,r);if(!this._is_valid_selection(o,s))throw new Error("Invalid Option Value: The option '"+n+`' can contain only the following values:
58
58
  `+s+`
59
- You passed in: '`+this.raw_options[n]+"'");return o},i.prototype._is_valid_selection=function(n,s){return n.length&&s.length&&!n.some(function(r){return s.indexOf(r)===-1})};function e(n,s){var r={};n=t(n);var o;for(o in n)o!==s&&(r[o]=n[o]);if(s&&n[s])for(o in n[s])r[o]=n[s][o];return r}function t(n){var s={},r;for(r in n){var o=r.replace(/-/g,"_");s[o]=n[r]}return s}return ar.Options=i,ar.normalizeOpts=t,ar.mergeOpts=e,ar}var kO;function xO(){if(kO)return eh;kO=1;var i=th().Options,e=["before-newline","after-newline","preserve-newline"];function t(n){i.call(this,n,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<r.length;o++)r[o]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=r[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",e),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return t.prototype=new i,eh.Options=t,eh}var ss={},ih={},SO;function nh(){if(SO)return ih;SO=1;var i=RegExp.prototype.hasOwnProperty("sticky");function e(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}return e.prototype.restart=function(){this.__position=0},e.prototype.back=function(){this.__position>0&&(this.__position-=1)},e.prototype.hasNext=function(){return this.__position<this.__input_length},e.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},e.prototype.peek=function(t){var n=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(n=this.__input.charAt(t)),n},e.prototype.__match=function(t,n){t.lastIndex=n;var s=t.exec(this.__input);return s&&!(i&&t.sticky)&&s.index!==n&&(s=null),s},e.prototype.test=function(t,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(t,n):!1},e.prototype.testChar=function(t,n){var s=this.peek(n);return t.lastIndex=0,s!==null&&t.test(s)},e.prototype.match=function(t){var n=this.__match(t,this.__position);return n?this.__position+=n[0].length:n=null,n},e.prototype.read=function(t,n,s){var r="",o;return t&&(o=this.match(t),o&&(r+=o[0])),n&&(o||!t)&&(r+=this.readUntil(n,s)),r},e.prototype.readUntil=function(t,n){var s="",r=this.__position;t.lastIndex=this.__position;var o=t.exec(this.__input);return o?(r=o.index,n&&(r+=o[0].length)):r=this.__input_length,s=this.__input.substring(this.__position,r),this.__position=r,s},e.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},e.prototype.get_regexp=function(t,n){var s=null,r="g";return n&&i&&(r="y"),typeof t=="string"&&t!==""?s=new RegExp(t,r):t&&(s=new RegExp(t.source,r)),s},e.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},e.prototype.peekUntilAfter=function(t){var n=this.__position,s=this.readUntilAfter(t);return this.__position=n,s},e.prototype.lookBack=function(t){var n=this.__position-1;return n>=t.length&&this.__input.substring(n-t.length,n).toLowerCase()===t},ih.InputScanner=e,ih}var Yo={},sh={},CO;function GP(){if(CO)return sh;CO=1;function i(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return this.__tokens_length===0},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},i.prototype.peek=function(e){var t=null;return e=e||0,e+=this.__position,e>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},i.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},sh.TokenStream=i,sh}var rh={},oh={},AO;function zo(){if(AO)return oh;AO=1;function i(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return i.prototype.read=function(){var e=this._input.read(this._starting_pattern);return(!this._starting_pattern||e)&&(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},oh.Pattern=i,oh}var QO;function HP(){if(QO)return rh;QO=1;var i=zo().Pattern;function e(t,n){i.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return e.prototype=new i,e.prototype.__set_whitespace_patterns=function(t,n){t+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},e.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(t===" ")this.whitespace_before_token=" ";else if(t){var n=this.__split(this._newline_regexp,t);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return t},e.prototype.matching=function(t,n){var s=this._create();return s.__set_whitespace_patterns(t,n),s._update(),s},e.prototype._create=function(){return new e(this._input,this)},e.prototype.__split=function(t,n){t.lastIndex=0;for(var s=0,r=[],o=t.exec(n);o;)r.push(n.substring(s,o.index)),s=o.index+o[0].length,o=t.exec(n);return s<n.length?r.push(n.substring(s,n.length)):r.push(""),r},rh.WhitespacePattern=e,rh}var PO;function Go(){if(PO)return Yo;PO=1;var i=nh().InputScanner,e=_O().Token,t=GP().TokenStream,n=HP().WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(o,a){this._input=new i(o),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};return r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new t,this._reset();for(var o,a=new e(s.START,""),c=null,h=[],u=new t;a.type!==s.EOF;){for(o=this._get_next_token(a,c);this._is_comment(o);)u.add(o),o=this._get_next_token(a,c);u.isEmpty()||(o.comments_before=u,u=new t),o.parent=c,this._is_opening(o)?(h.push(c),c=o):c&&this._is_closing(o,c)&&(o.opened=c,c.closed=o,c=h.pop(),o.parent=c),o.previous=a,a.next=o,this.__tokens.add(o),a=o}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(o,a){this._readWhitespace();var c=this._input.read(/.+/g);return c?this._create_token(s.RAW,c):this._create_token(s.EOF,"")},r.prototype._is_comment=function(o){return!1},r.prototype._is_opening=function(o){return!1},r.prototype._is_closing=function(o,a){return!1},r.prototype._create_token=function(o,a){var c=new e(o,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return c},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},Yo.Tokenizer=r,Yo.TOKEN=s,Yo}var lh={},TO;function ah(){if(TO)return lh;TO=1;function i(e,t){e=typeof e=="string"?e:e.source,t=typeof t=="string"?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return i.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},i.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},lh.Directives=i,lh}var ch={},EO;function $O(){if(EO)return ch;EO=1;var i=zo().Pattern,e={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function t(n,s){i.call(this,n,s),this.__template_pattern=null,this._disabled=Object.assign({},e),this._excluded=Object.assign({},e),s&&(this.__template_pattern=this._input.get_regexp(s.__template_pattern),this._excluded=Object.assign(this._excluded,s._excluded),this._disabled=Object.assign(this._disabled,s._disabled));var r=new i(n);this.__patterns={handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:r.starting_with(/{{{/).until_after(/}}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),php:r.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}return t.prototype=new i,t.prototype._create=function(){return new t(this._input,this)},t.prototype._update=function(){this.__set_templated_pattern()},t.prototype.disable=function(n){var s=this._create();return s._disabled[n]=!0,s._update(),s},t.prototype.read_options=function(n){var s=this._create();for(var r in e)s._disabled[r]=n.templating.indexOf(r)===-1;return s._update(),s},t.prototype.exclude=function(n){var s=this._create();return s._excluded[n]=!0,s._update(),s},t.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),n+=s,s=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},t.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},t.prototype._read_template=function(){var n="",s=this._input.peek();if(s==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(n=n||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},ch.TemplatablePattern=t,ch}var NO;function Ho(){if(NO)return ss;NO=1;var i=nh().InputScanner,e=Go().Tokenizer,t=Go().TOKEN,n=ah().Directives,s=yO(),r=zo().Pattern,o=$O().TemplatablePattern;function a(k,C){return C.indexOf(k)!==-1}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},h=new n(/\/\*/,/\*\//),u=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,f=/[0-9]/,d=/[^\d\.]/,m=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),b="\\?\\.(?!\\d) "+b,b=b.replace(/ /g,"|");var w=new RegExp(b),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),p=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),O=new RegExp("^(?:"+p.join("|")+")$"),S,y=function(k,C){e.call(this,k,C),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var T=new r(this._input),N=new o(this._input).read_options(this._options);this.__patterns={template:N,identifier:N.starting_with(s.identifier).matching(s.identifierMatch),number:T.matching(u),punct:T.matching(w),comment:T.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:T.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:T.matching(/<!--/),html_comment_end:T.matching(/-->/),include:T.starting_with(/#include/).until_after(s.lineBreak),shebang:T.starting_with(/#!/).until_after(s.lineBreak),xml:T.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:N.until(/['\\\n\r\u2028\u2029]/),double_quote:N.until(/["\\\n\r\u2028\u2029]/),template_text:N.until(/[`\\$]/),template_expression:N.until(/[`}\\]/)}};y.prototype=new e,y.prototype._is_comment=function(k){return k.type===c.COMMENT||k.type===c.BLOCK_COMMENT||k.type===c.UNKNOWN},y.prototype._is_opening=function(k){return k.type===c.START_BLOCK||k.type===c.START_EXPR},y.prototype._is_closing=function(k,C){return(k.type===c.END_BLOCK||k.type===c.END_EXPR)&&C&&(k.text==="]"&&C.text==="["||k.text===")"&&C.text==="("||k.text==="}"&&C.text==="{")},y.prototype._reset=function(){S=!1},y.prototype._get_next_token=function(k,C){var T=null;this._readWhitespace();var N=this._input.peek();return N===null?this._create_token(c.EOF,""):(T=T||this._read_non_javascript(N),T=T||this._read_string(N),T=T||this._read_pair(N,this._input.peek(1)),T=T||this._read_word(k),T=T||this._read_singles(N),T=T||this._read_comment(N),T=T||this._read_regexp(N,k),T=T||this._read_xml(N,k),T=T||this._read_punctuation(),T=T||this._create_token(c.UNKNOWN,this._input.next()),T)},y.prototype._read_word=function(k){var C;if(C=this.__patterns.identifier.read(),C!=="")return C=C.replace(s.allLineBreaks,`
60
- `),!(k.type===c.DOT||k.type===c.RESERVED&&(k.text==="set"||k.text==="get"))&&O.test(C)?(C==="in"||C==="of")&&(k.type===c.WORD||k.type===c.STRING)?this._create_token(c.OPERATOR,C):this._create_token(c.RESERVED,C):this._create_token(c.WORD,C);if(C=this.__patterns.number.read(),C!=="")return this._create_token(c.WORD,C)},y.prototype._read_singles=function(k){var C=null;return k==="("||k==="["?C=this._create_token(c.START_EXPR,k):k===")"||k==="]"?C=this._create_token(c.END_EXPR,k):k==="{"?C=this._create_token(c.START_BLOCK,k):k==="}"?C=this._create_token(c.END_BLOCK,k):k===";"?C=this._create_token(c.SEMICOLON,k):k==="."&&d.test(this._input.peek(1))?C=this._create_token(c.DOT,k):k===","&&(C=this._create_token(c.COMMA,k)),C&&this._input.next(),C},y.prototype._read_pair=function(k,C){var T=null;return k==="#"&&C==="{"&&(T=this._create_token(c.START_BLOCK,k+C)),T&&(this._input.next(),this._input.next()),T},y.prototype._read_punctuation=function(){var k=this.__patterns.punct.read();if(k!=="")return k==="="?this._create_token(c.EQUALS,k):k==="?."?this._create_token(c.DOT,k):this._create_token(c.OPERATOR,k)},y.prototype._read_non_javascript=function(k){var C="";if(k==="#"){if(this._is_first_token()&&(C=this.__patterns.shebang.read(),C))return this._create_token(c.UNKNOWN,C.trim()+`
61
- `);if(C=this.__patterns.include.read(),C)return this._create_token(c.UNKNOWN,C.trim()+`
62
- `);k=this._input.next();var T="#";if(this._input.hasNext()&&this._input.testChar(f)){do k=this._input.next(),T+=k;while(this._input.hasNext()&&k!=="#"&&k!=="=");return k==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(T+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(T+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,T)}this._input.back()}else if(k==="<"&&this._is_first_token()){if(C=this.__patterns.html_comment_start.read(),C){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)C+=this._input.next();return S=!0,this._create_token(c.COMMENT,C)}}else if(S&&k==="-"&&(C=this.__patterns.html_comment_end.read(),C))return S=!1,this._create_token(c.COMMENT,C);return null},y.prototype._read_comment=function(k){var C=null;if(k==="/"){var T="";if(this._input.peek(1)==="*"){T=this.__patterns.block_comment.read();var N=h.get_directives(T);N&&N.ignore==="start"&&(T+=h.readIgnored(this._input)),T=T.replace(s.allLineBreaks,`
63
- `),C=this._create_token(c.BLOCK_COMMENT,T),C.directives=N}else this._input.peek(1)==="/"&&(T=this.__patterns.comment.read(),C=this._create_token(c.COMMENT,T))}return C},y.prototype._read_string=function(k){if(k==="`"||k==="'"||k==='"'){var C=this._input.next();return this.has_char_escapes=!1,k==="`"?C+=this._read_string_recursive("`",!0,"${"):C+=this._read_string_recursive(k),this.has_char_escapes&&this._options.unescape_strings&&(C=Q(C)),this._input.peek()===k&&(C+=this._input.next()),C=C.replace(s.allLineBreaks,`
64
- `),this._create_token(c.STRING,C)}return null},y.prototype._allow_regexp_or_xml=function(k){return k.type===c.RESERVED&&a(k.text,["return","case","throw","else","do","typeof","yield"])||k.type===c.END_EXPR&&k.text===")"&&k.opened.previous.type===c.RESERVED&&a(k.opened.previous.text,["if","while","for"])||a(k.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},y.prototype._read_regexp=function(k,C){if(k==="/"&&this._allow_regexp_or_xml(C)){for(var T=this._input.next(),N=!1,_=!1;this._input.hasNext()&&(N||_||this._input.peek()!==k)&&!this._input.testChar(s.newline);)T+=this._input.peek(),N?N=!1:(N=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===k&&(T+=this._input.next(),T+=this._input.read(s.identifier)),this._create_token(c.STRING,T)}return null},y.prototype._read_xml=function(k,C){if(this._options.e4x&&k==="<"&&this._allow_regexp_or_xml(C)){var T="",N=this.__patterns.xml.read_match();if(N){for(var _=N[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),A=_.indexOf("{")===0,x=0;N;){var M=!!N[1],E=N[2],I=!!N[N.length-1]||E.slice(0,8)==="![CDATA[";if(!I&&(E===_||A&&E.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(M?--x:++x),T+=N[0],x<=0)break;N=this.__patterns.xml.read_match()}return N||(T+=this._input.match(/[\s\S]*/g)[0]),T=T.replace(s.allLineBreaks,`
65
- `),this._create_token(c.STRING,T)}}return null};function Q(k){for(var C="",T=0,N=new i(k),_=null;N.hasNext();)if(_=N.match(/([\s]|[^\\]|\\\\)+/g),_&&(C+=_[0]),N.peek()==="\\"){if(N.next(),N.peek()==="x")_=N.match(/x([0-9A-Fa-f]{2})/g);else if(N.peek()==="u")_=N.match(/u([0-9A-Fa-f]{4})/g),_||(_=N.match(/u\{([0-9A-Fa-f]+)\}/g));else{C+="\\",N.hasNext()&&(C+=N.next());continue}if(!_||(T=parseInt(_[1],16),T>126&&T<=255&&_[0].indexOf("x")===0))return k;T>=0&&T<32||T>1114111?C+="\\"+_[0]:T===34||T===39||T===92?C+="\\"+String.fromCharCode(T):C+=String.fromCharCode(T)}return C}return y.prototype._read_string_recursive=function(k,C,T){var N,_;k==="'"?_=this.__patterns.single_quote:k==='"'?_=this.__patterns.double_quote:k==="`"?_=this.__patterns.template_text:k==="}"&&(_=this.__patterns.template_expression);for(var A=_.read(),x="";this._input.hasNext();){if(x=this._input.next(),x===k||!C&&s.newline.test(x)){this._input.back();break}else x==="\\"&&this._input.hasNext()?(N=this._input.peek(),N==="x"||N==="u"?this.has_char_escapes=!0:N==="\r"&&this._input.peek(1)===`
66
- `&&this._input.next(),x+=this._input.next()):T&&(T==="${"&&x==="$"&&this._input.peek()==="{"&&(x+=this._input.next()),T===x&&(k==="`"?x+=this._read_string_recursive("}",C,"`"):x+=this._read_string_recursive("`",C,"${"),this._input.hasNext()&&(x+=this._input.next())));x+=_.read(),A+=x}return A},ss.Tokenizer=y,ss.TOKEN=c,ss.positionable_operators=m.slice(),ss.line_starters=g.slice(),ss}var RO;function KP(){if(RO)return zc;RO=1;var i=Hc().Output,e=_O().Token,t=yO(),n=xO().Options,s=Ho().Tokenizer,r=Ho().line_starters,o=Ho().positionable_operators,a=Ho().TOKEN;function c(_,A){return A.indexOf(_)!==-1}function h(_){return _.replace(/^\s+/g,"")}function u(_){for(var A={},x=0;x<_.length;x++)A[_[x].replace(/-/g,"_")]=_[x];return A}function f(_,A){return _&&_.type===a.RESERVED&&_.text===A}function d(_,A){return _&&_.type===a.RESERVED&&c(_.text,A)}var m=["case","return","do","if","throw","else","await","break","continue","async"],b=["before-newline","after-newline","preserve-newline"],w=u(b),g=[w.before_newline,w.preserve_newline],p={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function O(_,A){A.multiline_frame||A.mode===p.ForInitializer||A.mode===p.Conditional||_.remove_indent(A.start_line_index)}function S(_){_=_.replace(t.allLineBreaks,`
67
- `);for(var A=[],x=_.indexOf(`
68
- `);x!==-1;)A.push(_.substring(0,x)),_=_.substring(x+1),x=_.indexOf(`
69
- `);return _.length&&A.push(_),A}function y(_){return _===p.ArrayLiteral}function Q(_){return c(_,[p.Expression,p.ForInitializer,p.Conditional])}function k(_,A){for(var x=0;x<_.length;x++){var M=_[x].trim();if(M.charAt(0)!==A)return!1}return!0}function C(_,A){for(var x=0,M=_.length,E;x<M;x++)if(E=_[x],E&&E.indexOf(A)!==0)return!1;return!0}function T(_,A){A=A||{},this._source_text=_||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new n(A)}T.prototype.create_flags=function(_,A){var x=0;_&&(x=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>x&&(x=_.line_indent_level));var M={mode:A,parent:_,last_token:_?_.last_token:new e(a.START_BLOCK,""),last_word:_?_.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:x,alignment:0,line_indent_level:_?_.line_indent_level:x,start_line_index:this._output.get_line_number(),ternary_depth:0};return M},T.prototype._reset=function(_){var A=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new i(this._options,A),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p.BlockStatement);var x=new s(_,this._options);return this._tokens=x.tokenize(),_},T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,A=this._reset(this._source_text),x=this._options.eol;this._options.eol==="auto"&&(x=`
70
- `,A&&t.lineBreak.test(A||"")&&(x=A.match(t.lineBreak)[0]));for(var M=this._tokens.next();M;)this.handle_token(M),this._last_last_text=this._flags.last_token.text,this._flags.last_token=M,M=this._tokens.next();return _=this._output.get_code(x),_},T.prototype.handle_token=function(_,A){_.type===a.START_EXPR?this.handle_start_expr(_):_.type===a.END_EXPR?this.handle_end_expr(_):_.type===a.START_BLOCK?this.handle_start_block(_):_.type===a.END_BLOCK?this.handle_end_block(_):_.type===a.WORD?this.handle_word(_):_.type===a.RESERVED?this.handle_word(_):_.type===a.SEMICOLON?this.handle_semicolon(_):_.type===a.STRING?this.handle_string(_):_.type===a.EQUALS?this.handle_equals(_):_.type===a.OPERATOR?this.handle_operator(_):_.type===a.COMMA?this.handle_comma(_):_.type===a.BLOCK_COMMENT?this.handle_block_comment(_,A):_.type===a.COMMENT?this.handle_comment(_,A):_.type===a.DOT?this.handle_dot(_):_.type===a.EOF?this.handle_eof(_):_.type===a.UNKNOWN?this.handle_unknown(_,A):this.handle_unknown(_,A)},T.prototype.handle_whitespace_and_comments=function(_,A){var x=_.newlines,M=this._options.keep_array_indentation&&y(this._flags.mode);if(_.comments_before)for(var E=_.comments_before.next();E;)this.handle_whitespace_and_comments(E,A),this.handle_token(E,A),E=_.comments_before.next();if(M)for(var I=0;I<x;I+=1)this.print_newline(I>0,A);else if(this._options.max_preserve_newlines&&x>this._options.max_preserve_newlines&&(x=this._options.max_preserve_newlines),this._options.preserve_newlines&&x>1){this.print_newline(!1,A);for(var B=1;B<x;B+=1)this.print_newline(!0,A)}};var N=["async","break","continue","return","throw","yield"];return T.prototype.allow_wrap_or_preserved_newline=function(_,A){if(A=A===void 0?!1:A,!this._output.just_added_newline()){var x=this._options.preserve_newlines&&_.newlines||A,M=c(this._flags.last_token.text,o)||c(_.text,o);if(M){var E=c(this._flags.last_token.text,o)&&c(this._options.operator_position,g)||c(_.text,o);x=x&&E}if(x)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(d(this._flags.last_token,N))return;this._output.set_wrap_point()}}},T.prototype.print_newline=function(_,A){if(!A&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var x=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(x,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},T.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||y(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},T.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var A=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(A),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},T.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},T.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},T.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},T.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===p.Statement&&O(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},T.prototype.start_of_object_property=function(){return this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"]))},T.prototype.start_of_statement=function(_){var A=!1;return A=A||d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD,A=A||f(this._flags.last_token,"do"),A=A||!(this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement)&&d(this._flags.last_token,N)&&!_.newlines,A=A||f(this._flags.last_token,"else")&&!(f(_,"if")&&!_.comments_before),A=A||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===p.ForInitializer||this._previous_flags.mode===p.Conditional),A=A||this._flags.last_token.type===a.WORD&&this._flags.mode===p.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==a.WORD&&_.type!==a.RESERVED,A=A||this._flags.mode===p.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"])),A?(this.set_mode(p.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,d(_,["do","for","if","while"])),!0):!1},T.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var A=p.Expression;if(_.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){d(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(A),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}A=p.ArrayLiteral,y(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,A=p.ForInitializer):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,A=p.Conditional):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(c(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var x=this._tokens.peek(-3);if(this._options.space_after_named_function&&x){var M=this._tokens.peek(-4);d(x,["async","function"])||x.text==="*"&&d(M,["async","function"])?this._output.space_before_token=!0:this._flags.mode===p.ObjectLiteral?(x.text==="{"||x.text===","||x.text==="*"&&(M.text==="{"||M.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(_);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(A),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},T.prototype.handle_end_expr=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&y(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(_),this.restore_mode(),O(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===p.Conditional&&(this._previous_flags.mode=p.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},T.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var A=this._tokens.peek(),x=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(p.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p.BlockStatement):x&&(c(x.text,[":",","])&&c(A.type,[a.STRING,a.WORD,a.RESERVED])||c(A.text,["get","set","..."])&&c(x.type,[a.WORD,a.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(x.text,[":",","])?this.set_mode(p.BlockStatement):this.set_mode(p.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(p.BlockStatement):c(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(p.ObjectLiteral):this.set_mode(p.BlockStatement),this._flags.last_token&&d(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var M=!A.comments_before&&A.text==="}",E=M&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var I=0,B=null;this._flags.inline_frame=!0;do if(I+=1,B=this._tokens.peek(I-1),B.newlines){this._flags.inline_frame=!1;break}while(B.type!==a.EOF&&!(B.type===a.END_BLOCK&&B.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(E||this._flags.last_token.type===a.EQUALS||d(this._flags.last_token,m)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(y(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(c(this._flags.last_token.type,[a.START_BLOCK,a.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!M&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},T.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===p.Statement;)this.restore_mode();var A=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!A?this._output.space_before_token=!0:this._options.brace_style==="expand"?A||this.print_newline():A||(y(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(_)},T.prototype.handle_word=function(_){if(_.type===a.RESERVED){if(c(_.text,["set","get"])&&this._flags.mode!==p.ObjectLiteral)_.type=a.WORD;else if(_.text==="import"&&c(this._tokens.peek().text,["(","."]))_.type=a.WORD;else if(c(_.text,["as","from"])&&!this._flags.import_block)_.type=a.WORD;else if(this._flags.mode===p.ObjectLiteral){var A=this._tokens.peek();A.text===":"&&(_.type=a.WORD)}}if(this.start_of_statement(_)?d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!Q(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!d(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(f(_,"while")){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&f(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===p.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(_,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&!this.start_of_object_property()&&!(c(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===p.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(_),f(_,"function")){(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(c(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,N)?this._output.space_before_token=!0:f(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Q(this._flags.mode)||y(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var x="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?x="SPACE":d(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?x="NEWLINE":(x="SPACE",this._output.space_before_token=!0):x="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===p.BlockStatement?x="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&Q(this._flags.mode)?x="SPACE":this._flags.last_token.type===a.STRING?x="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","]))?x="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?x="SPACE":x="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,x="NEWLINE"),d(_,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?x="SPACE":x="NEWLINE"),d(_,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===p.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var M=this._output.current_line;M.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else x==="NEWLINE"?d(this._flags.last_token,m)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&d(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!d(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(f(_,"if")&&f(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(_,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&y(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():x==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===a.WORD||_.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===a.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&f(_,"from")&&(this._flags.import_block=!1))},T.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var A=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(A,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},T.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},T.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},T.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(Q(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)):this._flags.mode===p.ObjectLiteral||this._flags.mode===p.Statement&&this._flags.parent.mode===p.ObjectLiteral?(this._flags.mode===p.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},T.prototype.handle_operator=function(_){var A=_.text==="*"&&(d(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),x=c(_.text,["-","+"])&&(c(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||c(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var M=!A;this.handle_whitespace_and_comments(_,M)}if(_.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(c(_.text,["-","+"])&&this.start_of_object_property()){this.print_token(_);return}if(this._flags.last_token.type===a.OPERATOR&&c(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var E=!0,I=!0,B=!1;if(_.text===":"?this._flags.ternary_depth===0?E=!1:(this._flags.ternary_depth-=1,B=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!x&&!A&&this._options.preserve_newlines&&c(_.text,o)){var U=_.text===":",Z=U&&B,K=U&&!B;switch(this._options.operator_position){case w.before_newline:this._output.space_before_token=!K,this.print_token(_),(!U||Z)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case w.after_newline:this._output.space_before_token=!0,!U||Z?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case w.preserve_newline:K||this.allow_wrap_or_preserved_newline(_),E=!(this._output.just_added_newline()||K),this._output.space_before_token=E,this.print_token(_),this._output.space_before_token=!0;return}}if(A){this.allow_wrap_or_preserved_newline(_),E=!1;var W=this._tokens.peek();I=W&&c(W.type,[a.WORD,a.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),E=this._flags.last_token.type===a.START_BLOCK,I=!1;else if(c(_.text,["--","++","!","~"])||x){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),E=!1,I=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var J=d(this._flags.last_token,m)&&_.newlines;J&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(J,!0)}this._flags.last_token.text===";"&&Q(this._flags.mode)&&(E=!0),this._flags.last_token.type===a.RESERVED?E=!0:this._flags.last_token.type===a.END_EXPR?E=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===a.OPERATOR&&(E=c(_.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(_.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(I=!0)),(this._flags.mode===p.BlockStatement&&!this._flags.inline_frame||this._flags.mode===p.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||E,this.print_token(_),this._output.space_before_token=I},T.prototype.handle_block_comment=function(_,A){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,A),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!t.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,A)},T.prototype.print_block_commment=function(_,A){var x=S(_.text),M,E=!1,I=!1,B=_.whitespace_before,U=B.length;if(this.print_newline(!1,A),this.print_token_line_indentation(_),this._output.add_token(x[0]),this.print_newline(!1,A),x.length>1){for(x=x.slice(1),E=k(x,"*"),I=C(x,B),E&&(this._flags.alignment=1),M=0;M<x.length;M++)E?(this.print_token_line_indentation(_),this._output.add_token(h(x[M]))):I&&x[M]?(this.print_token_line_indentation(_),this._output.add_token(x[M].substring(U))):(this._output.current_line.set_indent(-1),this._output.add_token(x[M])),this.print_newline(!1,A);this._flags.alignment=0}},T.prototype.handle_comment=function(_,A){_.newlines?this.print_newline(!1,A):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,A)},T.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),d(this._flags.last_token,m)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(_)},T.prototype.handle_unknown=function(_,A){this.print_token(_),_.text[_.text.length-1]===`
71
- `&&this.print_newline(!1,A)},T.prototype.handle_eof=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},zc.Beautifier=T,zc}var VO;function JP(){if(VO)return Wo.exports;VO=1;var i=KP().Beautifier,e=xO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return Wo.exports=t,Wo.exports.defaultOptions=function(){return new e},Wo.exports}var Ko={exports:{}},hh={},uh={},LO;function MO(){if(LO)return uh;LO=1;var i=th().Options;function e(t){i.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<s.length;r++)s[r]!=="expand"?this.brace_style="collapse":this.brace_style=s[r]}return e.prototype=new i,uh.Options=e,uh}var BO;function eT(){if(BO)return hh;BO=1;var i=MO().Options,e=Hc().Output,t=nh().InputScanner,n=ah().Directives,s=new n(/\/\*/,/\*\//),r=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,c=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,u=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(d,m){this._source_text=d||"",this._options=new i(m),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return f.prototype.eatString=function(d){var m="";for(this._ch=this._input.next();this._ch;){if(m+=this._ch,this._ch==="\\")m+=this._input.next();else if(d.indexOf(this._ch)!==-1||this._ch===`
59
+ You passed in: '`+this.raw_options[n]+"'");return o},i.prototype._is_valid_selection=function(n,s){return n.length&&s.length&&!n.some(function(r){return s.indexOf(r)===-1})};function e(n,s){var r={};n=t(n);var o;for(o in n)o!==s&&(r[o]=n[o]);if(s&&n[s])for(o in n[s])r[o]=n[s][o];return r}function t(n){var s={},r;for(r in n){var o=r.replace(/-/g,"_");s[o]=n[r]}return s}return cr.Options=i,cr.normalizeOpts=t,cr.mergeOpts=e,cr}var xO;function SO(){if(xO)return ih;xO=1;var i=nh().Options,e=["before-newline","after-newline","preserve-newline"];function t(n){i.call(this,n,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<r.length;o++)r[o]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=r[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",e),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return t.prototype=new i,ih.Options=t,ih}var ss={},sh={},CO;function rh(){if(CO)return sh;CO=1;var i=RegExp.prototype.hasOwnProperty("sticky");function e(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}return e.prototype.restart=function(){this.__position=0},e.prototype.back=function(){this.__position>0&&(this.__position-=1)},e.prototype.hasNext=function(){return this.__position<this.__input_length},e.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},e.prototype.peek=function(t){var n=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(n=this.__input.charAt(t)),n},e.prototype.__match=function(t,n){t.lastIndex=n;var s=t.exec(this.__input);return s&&!(i&&t.sticky)&&s.index!==n&&(s=null),s},e.prototype.test=function(t,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(t,n):!1},e.prototype.testChar=function(t,n){var s=this.peek(n);return t.lastIndex=0,s!==null&&t.test(s)},e.prototype.match=function(t){var n=this.__match(t,this.__position);return n?this.__position+=n[0].length:n=null,n},e.prototype.read=function(t,n,s){var r="",o;return t&&(o=this.match(t),o&&(r+=o[0])),n&&(o||!t)&&(r+=this.readUntil(n,s)),r},e.prototype.readUntil=function(t,n){var s="",r=this.__position;t.lastIndex=this.__position;var o=t.exec(this.__input);return o?(r=o.index,n&&(r+=o[0].length)):r=this.__input_length,s=this.__input.substring(this.__position,r),this.__position=r,s},e.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},e.prototype.get_regexp=function(t,n){var s=null,r="g";return n&&i&&(r="y"),typeof t=="string"&&t!==""?s=new RegExp(t,r):t&&(s=new RegExp(t.source,r)),s},e.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},e.prototype.peekUntilAfter=function(t){var n=this.__position,s=this.readUntilAfter(t);return this.__position=n,s},e.prototype.lookBack=function(t){var n=this.__position-1;return n>=t.length&&this.__input.substring(n-t.length,n).toLowerCase()===t},sh.InputScanner=e,sh}var zo={},oh={},AO;function HP(){if(AO)return oh;AO=1;function i(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return this.__tokens_length===0},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},i.prototype.peek=function(e){var t=null;return e=e||0,e+=this.__position,e>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},i.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},oh.TokenStream=i,oh}var lh={},ah={},QO;function Go(){if(QO)return ah;QO=1;function i(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return i.prototype.read=function(){var e=this._input.read(this._starting_pattern);return(!this._starting_pattern||e)&&(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},ah.Pattern=i,ah}var PO;function KP(){if(PO)return lh;PO=1;var i=Go().Pattern;function e(t,n){i.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return e.prototype=new i,e.prototype.__set_whitespace_patterns=function(t,n){t+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},e.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(t===" ")this.whitespace_before_token=" ";else if(t){var n=this.__split(this._newline_regexp,t);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return t},e.prototype.matching=function(t,n){var s=this._create();return s.__set_whitespace_patterns(t,n),s._update(),s},e.prototype._create=function(){return new e(this._input,this)},e.prototype.__split=function(t,n){t.lastIndex=0;for(var s=0,r=[],o=t.exec(n);o;)r.push(n.substring(s,o.index)),s=o.index+o[0].length,o=t.exec(n);return s<n.length?r.push(n.substring(s,n.length)):r.push(""),r},lh.WhitespacePattern=e,lh}var TO;function Ho(){if(TO)return zo;TO=1;var i=rh().InputScanner,e=bO().Token,t=HP().TokenStream,n=KP().WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(o,a){this._input=new i(o),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};return r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new t,this._reset();for(var o,a=new e(s.START,""),c=null,h=[],u=new t;a.type!==s.EOF;){for(o=this._get_next_token(a,c);this._is_comment(o);)u.add(o),o=this._get_next_token(a,c);u.isEmpty()||(o.comments_before=u,u=new t),o.parent=c,this._is_opening(o)?(h.push(c),c=o):c&&this._is_closing(o,c)&&(o.opened=c,c.closed=o,c=h.pop(),o.parent=c),o.previous=a,a.next=o,this.__tokens.add(o),a=o}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(o,a){this._readWhitespace();var c=this._input.read(/.+/g);return c?this._create_token(s.RAW,c):this._create_token(s.EOF,"")},r.prototype._is_comment=function(o){return!1},r.prototype._is_opening=function(o){return!1},r.prototype._is_closing=function(o,a){return!1},r.prototype._create_token=function(o,a){var c=new e(o,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return c},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},zo.Tokenizer=r,zo.TOKEN=s,zo}var ch={},EO;function hh(){if(EO)return ch;EO=1;function i(e,t){e=typeof e=="string"?e:e.source,t=typeof t=="string"?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return i.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},i.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},ch.Directives=i,ch}var uh={},$O;function NO(){if($O)return uh;$O=1;var i=Go().Pattern,e={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function t(n,s){i.call(this,n,s),this.__template_pattern=null,this._disabled=Object.assign({},e),this._excluded=Object.assign({},e),s&&(this.__template_pattern=this._input.get_regexp(s.__template_pattern),this._excluded=Object.assign(this._excluded,s._excluded),this._disabled=Object.assign(this._disabled,s._disabled));var r=new i(n);this.__patterns={handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:r.starting_with(/{{{/).until_after(/}}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),php:r.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}return t.prototype=new i,t.prototype._create=function(){return new t(this._input,this)},t.prototype._update=function(){this.__set_templated_pattern()},t.prototype.disable=function(n){var s=this._create();return s._disabled[n]=!0,s._update(),s},t.prototype.read_options=function(n){var s=this._create();for(var r in e)s._disabled[r]=n.templating.indexOf(r)===-1;return s._update(),s},t.prototype.exclude=function(n){var s=this._create();return s._excluded[n]=!0,s._update(),s},t.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),n+=s,s=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},t.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},t.prototype._read_template=function(){var n="",s=this._input.peek();if(s==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(n=n||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},uh.TemplatablePattern=t,uh}var RO;function Ko(){if(RO)return ss;RO=1;var i=rh().InputScanner,e=Ho().Tokenizer,t=Ho().TOKEN,n=hh().Directives,s=wO(),r=Go().Pattern,o=NO().TemplatablePattern;function a(x,k){return k.indexOf(x)!==-1}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},h=new n(/\/\*/,/\*\//),u=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,f=/[0-9]/,d=/[^\d\.]/,m=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),b="\\?\\.(?!\\d) "+b,b=b.replace(/ /g,"|");var w=new RegExp(b),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),p=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),O=new RegExp("^(?:"+p.join("|")+")$"),C,y=function(x,k){e.call(this,x,k),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var P=new r(this._input),N=new o(this._input).read_options(this._options);this.__patterns={template:N,identifier:N.starting_with(s.identifier).matching(s.identifierMatch),number:P.matching(u),punct:P.matching(w),comment:P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:P.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:P.matching(/<!--/),html_comment_end:P.matching(/-->/),include:P.starting_with(/#include/).until_after(s.lineBreak),shebang:P.starting_with(/#!/).until_after(s.lineBreak),xml:P.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:N.until(/['\\\n\r\u2028\u2029]/),double_quote:N.until(/["\\\n\r\u2028\u2029]/),template_text:N.until(/[`\\$]/),template_expression:N.until(/[`}\\]/)}};y.prototype=new e,y.prototype._is_comment=function(x){return x.type===c.COMMENT||x.type===c.BLOCK_COMMENT||x.type===c.UNKNOWN},y.prototype._is_opening=function(x){return x.type===c.START_BLOCK||x.type===c.START_EXPR},y.prototype._is_closing=function(x,k){return(x.type===c.END_BLOCK||x.type===c.END_EXPR)&&k&&(x.text==="]"&&k.text==="["||x.text===")"&&k.text==="("||x.text==="}"&&k.text==="{")},y.prototype._reset=function(){C=!1},y.prototype._get_next_token=function(x,k){var P=null;this._readWhitespace();var N=this._input.peek();return N===null?this._create_token(c.EOF,""):(P=P||this._read_non_javascript(N),P=P||this._read_string(N),P=P||this._read_pair(N,this._input.peek(1)),P=P||this._read_word(x),P=P||this._read_singles(N),P=P||this._read_comment(N),P=P||this._read_regexp(N,x),P=P||this._read_xml(N,x),P=P||this._read_punctuation(),P=P||this._create_token(c.UNKNOWN,this._input.next()),P)},y.prototype._read_word=function(x){var k;if(k=this.__patterns.identifier.read(),k!=="")return k=k.replace(s.allLineBreaks,`
60
+ `),!(x.type===c.DOT||x.type===c.RESERVED&&(x.text==="set"||x.text==="get"))&&O.test(k)?(k==="in"||k==="of")&&(x.type===c.WORD||x.type===c.STRING)?this._create_token(c.OPERATOR,k):this._create_token(c.RESERVED,k):this._create_token(c.WORD,k);if(k=this.__patterns.number.read(),k!=="")return this._create_token(c.WORD,k)},y.prototype._read_singles=function(x){var k=null;return x==="("||x==="["?k=this._create_token(c.START_EXPR,x):x===")"||x==="]"?k=this._create_token(c.END_EXPR,x):x==="{"?k=this._create_token(c.START_BLOCK,x):x==="}"?k=this._create_token(c.END_BLOCK,x):x===";"?k=this._create_token(c.SEMICOLON,x):x==="."&&d.test(this._input.peek(1))?k=this._create_token(c.DOT,x):x===","&&(k=this._create_token(c.COMMA,x)),k&&this._input.next(),k},y.prototype._read_pair=function(x,k){var P=null;return x==="#"&&k==="{"&&(P=this._create_token(c.START_BLOCK,x+k)),P&&(this._input.next(),this._input.next()),P},y.prototype._read_punctuation=function(){var x=this.__patterns.punct.read();if(x!=="")return x==="="?this._create_token(c.EQUALS,x):x==="?."?this._create_token(c.DOT,x):this._create_token(c.OPERATOR,x)},y.prototype._read_non_javascript=function(x){var k="";if(x==="#"){if(this._is_first_token()&&(k=this.__patterns.shebang.read(),k))return this._create_token(c.UNKNOWN,k.trim()+`
61
+ `);if(k=this.__patterns.include.read(),k)return this._create_token(c.UNKNOWN,k.trim()+`
62
+ `);x=this._input.next();var P="#";if(this._input.hasNext()&&this._input.testChar(f)){do x=this._input.next(),P+=x;while(this._input.hasNext()&&x!=="#"&&x!=="=");return x==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(P+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(P+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,P)}this._input.back()}else if(x==="<"&&this._is_first_token()){if(k=this.__patterns.html_comment_start.read(),k){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)k+=this._input.next();return C=!0,this._create_token(c.COMMENT,k)}}else if(C&&x==="-"&&(k=this.__patterns.html_comment_end.read(),k))return C=!1,this._create_token(c.COMMENT,k);return null},y.prototype._read_comment=function(x){var k=null;if(x==="/"){var P="";if(this._input.peek(1)==="*"){P=this.__patterns.block_comment.read();var N=h.get_directives(P);N&&N.ignore==="start"&&(P+=h.readIgnored(this._input)),P=P.replace(s.allLineBreaks,`
63
+ `),k=this._create_token(c.BLOCK_COMMENT,P),k.directives=N}else this._input.peek(1)==="/"&&(P=this.__patterns.comment.read(),k=this._create_token(c.COMMENT,P))}return k},y.prototype._read_string=function(x){if(x==="`"||x==="'"||x==='"'){var k=this._input.next();return this.has_char_escapes=!1,x==="`"?k+=this._read_string_recursive("`",!0,"${"):k+=this._read_string_recursive(x),this.has_char_escapes&&this._options.unescape_strings&&(k=E(k)),this._input.peek()===x&&(k+=this._input.next()),k=k.replace(s.allLineBreaks,`
64
+ `),this._create_token(c.STRING,k)}return null},y.prototype._allow_regexp_or_xml=function(x){return x.type===c.RESERVED&&a(x.text,["return","case","throw","else","do","typeof","yield"])||x.type===c.END_EXPR&&x.text===")"&&x.opened.previous.type===c.RESERVED&&a(x.opened.previous.text,["if","while","for"])||a(x.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},y.prototype._read_regexp=function(x,k){if(x==="/"&&this._allow_regexp_or_xml(k)){for(var P=this._input.next(),N=!1,_=!1;this._input.hasNext()&&(N||_||this._input.peek()!==x)&&!this._input.testChar(s.newline);)P+=this._input.peek(),N?N=!1:(N=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===x&&(P+=this._input.next(),P+=this._input.read(s.identifier)),this._create_token(c.STRING,P)}return null},y.prototype._read_xml=function(x,k){if(this._options.e4x&&x==="<"&&this._allow_regexp_or_xml(k)){var P="",N=this.__patterns.xml.read_match();if(N){for(var _=N[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),A=_.indexOf("{")===0,S=0;N;){var M=!!N[1],T=N[2],I=!!N[N.length-1]||T.slice(0,8)==="![CDATA[";if(!I&&(T===_||A&&T.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(M?--S:++S),P+=N[0],S<=0)break;N=this.__patterns.xml.read_match()}return N||(P+=this._input.match(/[\s\S]*/g)[0]),P=P.replace(s.allLineBreaks,`
65
+ `),this._create_token(c.STRING,P)}}return null};function E(x){for(var k="",P=0,N=new i(x),_=null;N.hasNext();)if(_=N.match(/([\s]|[^\\]|\\\\)+/g),_&&(k+=_[0]),N.peek()==="\\"){if(N.next(),N.peek()==="x")_=N.match(/x([0-9A-Fa-f]{2})/g);else if(N.peek()==="u")_=N.match(/u([0-9A-Fa-f]{4})/g),_||(_=N.match(/u\{([0-9A-Fa-f]+)\}/g));else{k+="\\",N.hasNext()&&(k+=N.next());continue}if(!_||(P=parseInt(_[1],16),P>126&&P<=255&&_[0].indexOf("x")===0))return x;P>=0&&P<32||P>1114111?k+="\\"+_[0]:P===34||P===39||P===92?k+="\\"+String.fromCharCode(P):k+=String.fromCharCode(P)}return k}return y.prototype._read_string_recursive=function(x,k,P){var N,_;x==="'"?_=this.__patterns.single_quote:x==='"'?_=this.__patterns.double_quote:x==="`"?_=this.__patterns.template_text:x==="}"&&(_=this.__patterns.template_expression);for(var A=_.read(),S="";this._input.hasNext();){if(S=this._input.next(),S===x||!k&&s.newline.test(S)){this._input.back();break}else S==="\\"&&this._input.hasNext()?(N=this._input.peek(),N==="x"||N==="u"?this.has_char_escapes=!0:N==="\r"&&this._input.peek(1)===`
66
+ `&&this._input.next(),S+=this._input.next()):P&&(P==="${"&&S==="$"&&this._input.peek()==="{"&&(S+=this._input.next()),P===S&&(x==="`"?S+=this._read_string_recursive("}",k,"`"):S+=this._read_string_recursive("`",k,"${"),this._input.hasNext()&&(S+=this._input.next())));S+=_.read(),A+=S}return A},ss.Tokenizer=y,ss.TOKEN=c,ss.positionable_operators=m.slice(),ss.line_starters=g.slice(),ss}var VO;function JP(){if(VO)return Hc;VO=1;var i=Jc().Output,e=bO().Token,t=wO(),n=SO().Options,s=Ko().Tokenizer,r=Ko().line_starters,o=Ko().positionable_operators,a=Ko().TOKEN;function c(_,A){return A.indexOf(_)!==-1}function h(_){return _.replace(/^\s+/g,"")}function u(_){for(var A={},S=0;S<_.length;S++)A[_[S].replace(/-/g,"_")]=_[S];return A}function f(_,A){return _&&_.type===a.RESERVED&&_.text===A}function d(_,A){return _&&_.type===a.RESERVED&&c(_.text,A)}var m=["case","return","do","if","throw","else","await","break","continue","async"],b=["before-newline","after-newline","preserve-newline"],w=u(b),g=[w.before_newline,w.preserve_newline],p={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function O(_,A){A.multiline_frame||A.mode===p.ForInitializer||A.mode===p.Conditional||_.remove_indent(A.start_line_index)}function C(_){_=_.replace(t.allLineBreaks,`
67
+ `);for(var A=[],S=_.indexOf(`
68
+ `);S!==-1;)A.push(_.substring(0,S)),_=_.substring(S+1),S=_.indexOf(`
69
+ `);return _.length&&A.push(_),A}function y(_){return _===p.ArrayLiteral}function E(_){return c(_,[p.Expression,p.ForInitializer,p.Conditional])}function x(_,A){for(var S=0;S<_.length;S++){var M=_[S].trim();if(M.charAt(0)!==A)return!1}return!0}function k(_,A){for(var S=0,M=_.length,T;S<M;S++)if(T=_[S],T&&T.indexOf(A)!==0)return!1;return!0}function P(_,A){A=A||{},this._source_text=_||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new n(A)}P.prototype.create_flags=function(_,A){var S=0;_&&(S=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>S&&(S=_.line_indent_level));var M={mode:A,parent:_,last_token:_?_.last_token:new e(a.START_BLOCK,""),last_word:_?_.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:S,alignment:0,line_indent_level:_?_.line_indent_level:S,start_line_index:this._output.get_line_number(),ternary_depth:0};return M},P.prototype._reset=function(_){var A=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new i(this._options,A),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p.BlockStatement);var S=new s(_,this._options);return this._tokens=S.tokenize(),_},P.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,A=this._reset(this._source_text),S=this._options.eol;this._options.eol==="auto"&&(S=`
70
+ `,A&&t.lineBreak.test(A||"")&&(S=A.match(t.lineBreak)[0]));for(var M=this._tokens.next();M;)this.handle_token(M),this._last_last_text=this._flags.last_token.text,this._flags.last_token=M,M=this._tokens.next();return _=this._output.get_code(S),_},P.prototype.handle_token=function(_,A){_.type===a.START_EXPR?this.handle_start_expr(_):_.type===a.END_EXPR?this.handle_end_expr(_):_.type===a.START_BLOCK?this.handle_start_block(_):_.type===a.END_BLOCK?this.handle_end_block(_):_.type===a.WORD?this.handle_word(_):_.type===a.RESERVED?this.handle_word(_):_.type===a.SEMICOLON?this.handle_semicolon(_):_.type===a.STRING?this.handle_string(_):_.type===a.EQUALS?this.handle_equals(_):_.type===a.OPERATOR?this.handle_operator(_):_.type===a.COMMA?this.handle_comma(_):_.type===a.BLOCK_COMMENT?this.handle_block_comment(_,A):_.type===a.COMMENT?this.handle_comment(_,A):_.type===a.DOT?this.handle_dot(_):_.type===a.EOF?this.handle_eof(_):_.type===a.UNKNOWN?this.handle_unknown(_,A):this.handle_unknown(_,A)},P.prototype.handle_whitespace_and_comments=function(_,A){var S=_.newlines,M=this._options.keep_array_indentation&&y(this._flags.mode);if(_.comments_before)for(var T=_.comments_before.next();T;)this.handle_whitespace_and_comments(T,A),this.handle_token(T,A),T=_.comments_before.next();if(M)for(var I=0;I<S;I+=1)this.print_newline(I>0,A);else if(this._options.max_preserve_newlines&&S>this._options.max_preserve_newlines&&(S=this._options.max_preserve_newlines),this._options.preserve_newlines&&S>1){this.print_newline(!1,A);for(var B=1;B<S;B+=1)this.print_newline(!0,A)}};var N=["async","break","continue","return","throw","yield"];return P.prototype.allow_wrap_or_preserved_newline=function(_,A){if(A=A===void 0?!1:A,!this._output.just_added_newline()){var S=this._options.preserve_newlines&&_.newlines||A,M=c(this._flags.last_token.text,o)||c(_.text,o);if(M){var T=c(this._flags.last_token.text,o)&&c(this._options.operator_position,g)||c(_.text,o);S=S&&T}if(S)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(d(this._flags.last_token,N))return;this._output.set_wrap_point()}}},P.prototype.print_newline=function(_,A){if(!A&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var S=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(S,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},P.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||y(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},P.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var A=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(A),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},P.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===p.Statement&&O(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.start_of_object_property=function(){return this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"]))},P.prototype.start_of_statement=function(_){var A=!1;return A=A||d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD,A=A||f(this._flags.last_token,"do"),A=A||!(this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement)&&d(this._flags.last_token,N)&&!_.newlines,A=A||f(this._flags.last_token,"else")&&!(f(_,"if")&&!_.comments_before),A=A||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===p.ForInitializer||this._previous_flags.mode===p.Conditional),A=A||this._flags.last_token.type===a.WORD&&this._flags.mode===p.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==a.WORD&&_.type!==a.RESERVED,A=A||this._flags.mode===p.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"])),A?(this.set_mode(p.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,d(_,["do","for","if","while"])),!0):!1},P.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var A=p.Expression;if(_.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){d(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(A),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}A=p.ArrayLiteral,y(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,A=p.ForInitializer):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,A=p.Conditional):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(c(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var S=this._tokens.peek(-3);if(this._options.space_after_named_function&&S){var M=this._tokens.peek(-4);d(S,["async","function"])||S.text==="*"&&d(M,["async","function"])?this._output.space_before_token=!0:this._flags.mode===p.ObjectLiteral?(S.text==="{"||S.text===","||S.text==="*"&&(M.text==="{"||M.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(_);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(A),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},P.prototype.handle_end_expr=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&y(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(_),this.restore_mode(),O(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===p.Conditional&&(this._previous_flags.mode=p.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},P.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var A=this._tokens.peek(),S=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(p.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p.BlockStatement):S&&(c(S.text,[":",","])&&c(A.type,[a.STRING,a.WORD,a.RESERVED])||c(A.text,["get","set","..."])&&c(S.type,[a.WORD,a.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(S.text,[":",","])?this.set_mode(p.BlockStatement):this.set_mode(p.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(p.BlockStatement):c(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(p.ObjectLiteral):this.set_mode(p.BlockStatement),this._flags.last_token&&d(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var M=!A.comments_before&&A.text==="}",T=M&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var I=0,B=null;this._flags.inline_frame=!0;do if(I+=1,B=this._tokens.peek(I-1),B.newlines){this._flags.inline_frame=!1;break}while(B.type!==a.EOF&&!(B.type===a.END_BLOCK&&B.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(T||this._flags.last_token.type===a.EQUALS||d(this._flags.last_token,m)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(y(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(c(this._flags.last_token.type,[a.START_BLOCK,a.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!M&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},P.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===p.Statement;)this.restore_mode();var A=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!A?this._output.space_before_token=!0:this._options.brace_style==="expand"?A||this.print_newline():A||(y(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(_)},P.prototype.handle_word=function(_){if(_.type===a.RESERVED){if(c(_.text,["set","get"])&&this._flags.mode!==p.ObjectLiteral)_.type=a.WORD;else if(_.text==="import"&&c(this._tokens.peek().text,["(","."]))_.type=a.WORD;else if(c(_.text,["as","from"])&&!this._flags.import_block)_.type=a.WORD;else if(this._flags.mode===p.ObjectLiteral){var A=this._tokens.peek();A.text===":"&&(_.type=a.WORD)}}if(this.start_of_statement(_)?d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!E(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!d(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(f(_,"while")){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&f(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===p.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(_,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&!this.start_of_object_property()&&!(c(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===p.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(_),f(_,"function")){(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(c(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,N)?this._output.space_before_token=!0:f(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(E(this._flags.mode)||y(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var S="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?S="SPACE":d(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?S="NEWLINE":(S="SPACE",this._output.space_before_token=!0):S="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===p.BlockStatement?S="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&E(this._flags.mode)?S="SPACE":this._flags.last_token.type===a.STRING?S="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","]))?S="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?S="SPACE":S="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,S="NEWLINE"),d(_,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?S="SPACE":S="NEWLINE"),d(_,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===p.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var M=this._output.current_line;M.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else S==="NEWLINE"?d(this._flags.last_token,m)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&d(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!d(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(f(_,"if")&&f(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(_,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&y(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():S==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===a.WORD||_.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===a.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&f(_,"from")&&(this._flags.import_block=!1))},P.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var A=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(A,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},P.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},P.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},P.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(E(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)):this._flags.mode===p.ObjectLiteral||this._flags.mode===p.Statement&&this._flags.parent.mode===p.ObjectLiteral?(this._flags.mode===p.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},P.prototype.handle_operator=function(_){var A=_.text==="*"&&(d(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),S=c(_.text,["-","+"])&&(c(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||c(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var M=!A;this.handle_whitespace_and_comments(_,M)}if(_.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(c(_.text,["-","+"])&&this.start_of_object_property()){this.print_token(_);return}if(this._flags.last_token.type===a.OPERATOR&&c(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var T=!0,I=!0,B=!1;if(_.text===":"?this._flags.ternary_depth===0?T=!1:(this._flags.ternary_depth-=1,B=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!S&&!A&&this._options.preserve_newlines&&c(_.text,o)){var U=_.text===":",Z=U&&B,K=U&&!B;switch(this._options.operator_position){case w.before_newline:this._output.space_before_token=!K,this.print_token(_),(!U||Z)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case w.after_newline:this._output.space_before_token=!0,!U||Z?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case w.preserve_newline:K||this.allow_wrap_or_preserved_newline(_),T=!(this._output.just_added_newline()||K),this._output.space_before_token=T,this.print_token(_),this._output.space_before_token=!0;return}}if(A){this.allow_wrap_or_preserved_newline(_),T=!1;var X=this._tokens.peek();I=X&&c(X.type,[a.WORD,a.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),T=this._flags.last_token.type===a.START_BLOCK,I=!1;else if(c(_.text,["--","++","!","~"])||S){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),T=!1,I=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var J=d(this._flags.last_token,m)&&_.newlines;J&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(J,!0)}this._flags.last_token.text===";"&&E(this._flags.mode)&&(T=!0),this._flags.last_token.type===a.RESERVED?T=!0:this._flags.last_token.type===a.END_EXPR?T=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===a.OPERATOR&&(T=c(_.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(_.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(I=!0)),(this._flags.mode===p.BlockStatement&&!this._flags.inline_frame||this._flags.mode===p.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||T,this.print_token(_),this._output.space_before_token=I},P.prototype.handle_block_comment=function(_,A){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,A),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!t.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,A)},P.prototype.print_block_commment=function(_,A){var S=C(_.text),M,T=!1,I=!1,B=_.whitespace_before,U=B.length;if(this.print_newline(!1,A),this.print_token_line_indentation(_),this._output.add_token(S[0]),this.print_newline(!1,A),S.length>1){for(S=S.slice(1),T=x(S,"*"),I=k(S,B),T&&(this._flags.alignment=1),M=0;M<S.length;M++)T?(this.print_token_line_indentation(_),this._output.add_token(h(S[M]))):I&&S[M]?(this.print_token_line_indentation(_),this._output.add_token(S[M].substring(U))):(this._output.current_line.set_indent(-1),this._output.add_token(S[M])),this.print_newline(!1,A);this._flags.alignment=0}},P.prototype.handle_comment=function(_,A){_.newlines?this.print_newline(!1,A):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,A)},P.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),d(this._flags.last_token,m)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(_)},P.prototype.handle_unknown=function(_,A){this.print_token(_),_.text[_.text.length-1]===`
71
+ `&&this.print_newline(!1,A)},P.prototype.handle_eof=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},Hc.Beautifier=P,Hc}var LO;function eT(){if(LO)return Yo.exports;LO=1;var i=JP().Beautifier,e=SO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return Yo.exports=t,Yo.exports.defaultOptions=function(){return new e},Yo.exports}var Jo={exports:{}},fh={},dh={},MO;function BO(){if(MO)return dh;MO=1;var i=nh().Options;function e(t){i.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<s.length;r++)s[r]!=="expand"?this.brace_style="collapse":this.brace_style=s[r]}return e.prototype=new i,dh.Options=e,dh}var DO;function tT(){if(DO)return fh;DO=1;var i=BO().Options,e=Jc().Output,t=rh().InputScanner,n=hh().Directives,s=new n(/\/\*/,/\*\//),r=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,c=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,u=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(d,m){this._source_text=d||"",this._options=new i(m),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return f.prototype.eatString=function(d){var m="";for(this._ch=this._input.next();this._ch;){if(m+=this._ch,this._ch==="\\")m+=this._input.next();else if(d.indexOf(this._ch)!==-1||this._ch===`
72
72
  `)break;this._ch=this._input.next()}return m},f.prototype.eatWhitespace=function(d){for(var m=a.test(this._input.peek()),b=0;a.test(this._input.peek());)this._ch=this._input.next(),d&&this._ch===`
73
73
  `&&(b===0||b<this._options.max_preserve_newlines)&&(b++,this._output.add_new_line(!0));return m},f.prototype.foundNestedPseudoClass=function(){for(var d=0,m=1,b=this._input.peek(m);b;){if(b==="{")return!0;if(b==="(")d+=1;else if(b===")"){if(d===0)return!1;d-=1}else if(b===";"||b==="}")return!1;m++,b=this._input.peek(m)}return!1},f.prototype.print_string=function(d){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(d)},f.prototype.preserveSingleSpace=function(d){d&&(this._output.space_before_token=!0)},f.prototype.indent=function(){this._indentLevel++},f.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var d=this._source_text,m=this._options.eol;m==="auto"&&(m=`
74
74
  `,d&&r.test(d||"")&&(m=d.match(r)[0])),d=d.replace(o,`
75
- `);var b=d.match(/^[\t ]*/)[0];this._output=new e(this._options,b),this._input=new t(d),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var w=0,g=!1,p=!1,O=!1,S=!1,y=!1,Q=this._ch,k=!1,C,T,N;C=this._input.read(c),T=C!=="",N=Q,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),Q=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var _=this._input.read(h),A=s.get_directives(_);A&&A.ignore==="start"&&(_+=s.readIgnored(this._input)),this.print_string(_),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(u)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(T),this.print_string(this._ch);var x=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);x.match(/[ :]$/)&&(x=this.eatString(": ").replace(/\s+$/,""),this.print_string(x),this._output.space_before_token=!0),w===0&&x.indexOf(":")!==-1&&(p=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(T),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var M=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);M.match(/[ :]$/)&&(M=this.eatString(": ").replace(/\s+$/,""),this.print_string(M),this._output.space_before_token=!0),w===0&&M.indexOf(":")!==-1?(p=!0,this.indent()):M in this.NESTED_AT_RULE?(this._nestedLevel+=1,M in this.CONDITIONAL_GROUP_RULE&&(O=!0)):w===0&&!p&&(S=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(T),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")p&&(p=!1,this.outdent()),S=!1,O?(O=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(N==="("?this._output.space_before_token=!1:N!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),N==="{"&&this._output.trim(!0),p&&(this.outdent(),p=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var E=0;E<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;E++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[E])){k=!0;break}(g||O)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!S&&w===0?(this.print_string(":"),p||(p=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var I=N==='"'||N==="'";this.preserveSingleSpace(I||T),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")k=!1,w===0?(p&&(this.outdent(),p=!1),S=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),w++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),w&&(w--,this.outdent()));else{var B=!1;this._input.lookBack("with")&&(B=!0),this.preserveSingleSpace(T||B),this.print_string(this._ch),p&&N==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),w++,this.indent())}else if(this._ch===")")w&&(w--,this.outdent()),y&&this._input.peek()===";"&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!p||y)&&w===0&&!S?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!p&&w===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(T),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var U=N==='"'||N==="'";this.preserveSingleSpace(U||T),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
76
- `&&k&&this._output.add_new_line()}var Z=this._output.get_code(m);return Z},hh.Beautifier=f,hh}var DO;function tT(){if(DO)return Ko.exports;DO=1;var i=eT().Beautifier,e=MO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return Ko.exports=t,Ko.exports.defaultOptions=function(){return new e},Ko.exports}var Jo={exports:{}},fh={},dh={},vO;function ZO(){if(vO)return dh;vO=1;var i=th().Options;function e(t){i.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return e.prototype=new i,dh.Options=e,dh}var el={},IO;function UO(){if(IO)return el;IO=1;var i=Go().Tokenizer,e=Go().TOKEN,t=ah().Directives,n=$O().TemplatablePattern,s=zo().Pattern,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},o=new t(/<\!--/,/-->/),a=function(c,h){i.call(this,c,h),this._current_tag_name="";var u=new n(this._input).read_options(this._options),f=new s(this._input);if(this.__patterns={word:u.until(/[\n\r\t <]/),word_control_flow_close_excluded:u.until(/[\n\r\t <}]/),single_quote:u.until_after(/'/),double_quote:u.until_after(/"/),attribute:u.until(/[\n\r\t =>]|\/>/),element_name:u.until(/[\n\r\t >\/]/),angular_control_flow_start:f.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),handlebars_open:f.until(/[\n\r\t }]/),handlebars_raw_close:f.until(/}}/),comment:f.starting_with(/<!--/).until_after(/-->/),cdata:f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:f.starting_with(/<!\[/).until_after(/]>/),processing:f.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var d=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=f.matching(d).until_after(d)}};return a.prototype=new i,a.prototype._is_comment=function(c){return!1},a.prototype._is_opening=function(c){return c.type===r.TAG_OPEN||c.type===r.CONTROL_FLOW_OPEN},a.prototype._is_closing=function(c,h){return c.type===r.TAG_CLOSE&&h&&((c.text===">"||c.text==="/>")&&h.text[0]==="<"||c.text==="}}"&&h.text[0]==="{"&&h.text[1]==="{")||c.type===r.CONTROL_FLOW_CLOSE&&c.text==="}"&&h.text.endsWith("{")},a.prototype._reset=function(){this._current_tag_name=""},a.prototype._get_next_token=function(c,h){var u=null;this._readWhitespace();var f=this._input.peek();return f===null?this._create_token(r.EOF,""):(u=u||this._read_open_handlebars(f,h),u=u||this._read_attribute(f,c,h),u=u||this._read_close(f,h),u=u||this._read_script_and_style(f,c),u=u||this._read_control_flows(f,h),u=u||this._read_raw_content(f,c,h),u=u||this._read_content_word(f,h),u=u||this._read_comment_or_cdata(f),u=u||this._read_processing(f),u=u||this._read_open(f,h),u=u||this._create_token(r.UNKNOWN,this._input.next()),u)},a.prototype._read_comment_or_cdata=function(c){var h=null,u=null,f=null;if(c==="<"){var d=this._input.peek(1);d==="!"&&(u=this.__patterns.comment.read(),u?(f=o.get_directives(u),f&&f.ignore==="start"&&(u+=o.readIgnored(this._input))):u=this.__patterns.cdata.read()),u&&(h=this._create_token(r.COMMENT,u),h.directives=f)}return h},a.prototype._read_processing=function(c){var h=null,u=null,f=null;if(c==="<"){var d=this._input.peek(1);(d==="!"||d==="?")&&(u=this.__patterns.conditional_comment.read(),u=u||this.__patterns.processing.read()),u&&(h=this._create_token(r.COMMENT,u),h.directives=f)}return h},a.prototype._read_open=function(c,h){var u=null,f=null;return(!h||h.type===r.CONTROL_FLOW_OPEN)&&c==="<"&&(u=this._input.next(),this._input.peek()==="/"&&(u+=this._input.next()),u+=this.__patterns.element_name.read(),f=this._create_token(r.TAG_OPEN,u)),f},a.prototype._read_open_handlebars=function(c,h){var u=null,f=null;return(!h||h.type===r.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&c==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(u=this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars.read(),f=this._create_token(r.COMMENT,u)):(u=this.__patterns.handlebars_open.read(),f=this._create_token(r.TAG_OPEN,u))),f},a.prototype._read_control_flows=function(c,h){var u="",f=null;if(!this._options.templating.includes("angular"))return f;if(c==="@"){if(u=this.__patterns.angular_control_flow_start.read(),u==="")return f;for(var d=u.endsWith("(")?1:0,m=0;!(u.endsWith("{")&&d===m);){var b=this._input.next();if(b===null)break;b==="("?d++:b===")"&&m++,u+=b}f=this._create_token(r.CONTROL_FLOW_OPEN,u)}else c==="}"&&h&&h.type===r.CONTROL_FLOW_OPEN&&(u=this._input.next(),f=this._create_token(r.CONTROL_FLOW_CLOSE,u));return f},a.prototype._read_close=function(c,h){var u=null,f=null;return h&&h.type===r.TAG_OPEN&&(h.text[0]==="<"&&(c===">"||c==="/"&&this._input.peek(1)===">")?(u=this._input.next(),c==="/"&&(u+=this._input.next()),f=this._create_token(r.TAG_CLOSE,u)):h.text[0]==="{"&&c==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),f=this._create_token(r.TAG_CLOSE,"}}"))),f},a.prototype._read_attribute=function(c,h,u){var f=null,d="";if(u&&u.text[0]==="<")if(c==="=")f=this._create_token(r.EQUALS,this._input.next());else if(c==='"'||c==="'"){var m=this._input.next();c==='"'?m+=this.__patterns.double_quote.read():m+=this.__patterns.single_quote.read(),f=this._create_token(r.VALUE,m)}else d=this.__patterns.attribute.read(),d&&(h.type===r.EQUALS?f=this._create_token(r.VALUE,d):f=this._create_token(r.ATTRIBUTE,d));return f},a.prototype._is_content_unformatted=function(c){return this._options.void_elements.indexOf(c)===-1&&(this._options.content_unformatted.indexOf(c)!==-1||this._options.unformatted.indexOf(c)!==-1)},a.prototype._read_raw_content=function(c,h,u){var f="";if(u&&u.text[0]==="{")f=this.__patterns.handlebars_raw_close.read();else if(h.type===r.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var d=h.opened.text.substr(1).toLowerCase();this._is_content_unformatted(d)&&(f=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig")))}return f?this._create_token(r.TEXT,f):null},a.prototype._read_script_and_style=function(c,h){if(h.type===r.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var u=h.opened.text.substr(1).toLowerCase();if(u==="script"||u==="style"){var f=this._read_comment_or_cdata(c);if(f)return f.type=r.TEXT,f;var d=this._input.readUntil(new RegExp("</"+u+"[\\n\\r\\t ]*?>","ig"));if(d)return this._create_token(r.TEXT,d)}}return null},a.prototype._read_content_word=function(c,h){var u="";return this._options.unformatted_content_delimiter&&c===this._options.unformatted_content_delimiter[0]&&(u=this.__patterns.unformatted_content_delimiter.read()),u||(u=h&&h.type===r.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),u?this._create_token(r.TEXT,u):null},el.Tokenizer=a,el.TOKEN=r,el}var FO;function iT(){if(FO)return fh;FO=1;var i=ZO().Options,e=Hc().Output,t=UO().Tokenizer,n=UO().TOKEN,s=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,o=function(g,p){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=g.max_preserve_newlines,this.preserve_newlines=g.preserve_newlines,this._output=new e(g,p)};o.prototype.current_line_has_match=function(g){return this._output.current_line.has_match(g)},o.prototype.set_space_before_token=function(g,p){this._output.space_before_token=g,this._output.non_breaking_space=p},o.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},o.prototype.add_raw_token=function(g){this._output.add_raw_token(g)},o.prototype.print_preserved_newlines=function(g){var p=0;g.type!==n.TEXT&&g.previous.type!==n.TEXT&&(p=g.newlines?1:0),this.preserve_newlines&&(p=g.newlines<this.max_preserve_newlines+1?g.newlines:this.max_preserve_newlines+1);for(var O=0;O<p;O++)this.print_newline(O>0);return p!==0},o.prototype.traverse_whitespace=function(g){return g.whitespace_before||g.newlines?(this.print_preserved_newlines(g)||(this._output.space_before_token=!0),!0):!1},o.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},o.prototype.print_newline=function(g){this._output.add_new_line(g)},o.prototype.print_token=function(g){g.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(g.text))},o.prototype.indent=function(){this.indent_level++},o.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},o.prototype.get_full_indent=function(g){return g=this.indent_level+(g||0),g<1?"":this._output.get_indent_string(g)};var a=function(g){for(var p=null,O=g.next;O.type!==n.EOF&&g.closed!==O;){if(O.type===n.ATTRIBUTE&&O.text==="type"){O.next&&O.next.type===n.EQUALS&&O.next.next&&O.next.next.type===n.VALUE&&(p=O.next.next.text);break}O=O.next}return p},c=function(g,p){var O=null,S=null;return p.closed?(g==="script"?O="text/javascript":g==="style"&&(O="text/css"),O=a(p)||O,O.search("text/css")>-1?S="css":O.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?S="javascript":O.search(/(text|application|dojo)\/(x-)?(html)/)>-1?S="html":O.search(/test\/null/)>-1&&(S="null"),S):null};function h(g,p){return p.indexOf(g)!==-1}function u(g,p,O){this.parent=g||null,this.tag=p?p.tag_name:"",this.indent_level=O||0,this.parser_token=p||null}function f(g){this._printer=g,this._current_frame=null}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(g){var p=new u(this._current_frame,g,this._printer.indent_level);this._current_frame=p},f.prototype._try_pop_frame=function(g){var p=null;return g&&(p=g.parser_token,this._printer.indent_level=g.indent_level,this._current_frame=g.parent),p},f.prototype._get_frame=function(g,p){for(var O=this._current_frame;O&&g.indexOf(O.tag)===-1;){if(p&&p.indexOf(O.tag)!==-1){O=null;break}O=O.parent}return O},f.prototype.try_pop=function(g,p){var O=this._get_frame([g],p);return this._try_pop_frame(O)},f.prototype.indent_to_tag=function(g){var p=this._get_frame(g);p&&(this._printer.indent_level=p.indent_level)};function d(g,p,O,S){this._source_text=g||"",p=p||{},this._js_beautify=O,this._css_beautify=S,this._tag_stack=null;var y=new i(p,"html");this._options=y,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g=this._source_text,p=this._options.eol;this._options.eol==="auto"&&(p=`
75
+ `);var b=d.match(/^[\t ]*/)[0];this._output=new e(this._options,b),this._input=new t(d),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var w=0,g=!1,p=!1,O=!1,C=!1,y=!1,E=this._ch,x=!1,k,P,N;k=this._input.read(c),P=k!=="",N=E,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),E=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var _=this._input.read(h),A=s.get_directives(_);A&&A.ignore==="start"&&(_+=s.readIgnored(this._input)),this.print_string(_),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(u)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(P),this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),w===0&&S.indexOf(":")!==-1&&(p=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(P),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var M=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);M.match(/[ :]$/)&&(M=this.eatString(": ").replace(/\s+$/,""),this.print_string(M),this._output.space_before_token=!0),w===0&&M.indexOf(":")!==-1?(p=!0,this.indent()):M in this.NESTED_AT_RULE?(this._nestedLevel+=1,M in this.CONDITIONAL_GROUP_RULE&&(O=!0)):w===0&&!p&&(C=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")p&&(p=!1,this.outdent()),C=!1,O?(O=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(N==="("?this._output.space_before_token=!1:N!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),N==="{"&&this._output.trim(!0),p&&(this.outdent(),p=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var T=0;T<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;T++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[T])){x=!0;break}(g||O)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!C&&w===0?(this.print_string(":"),p||(p=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var I=N==='"'||N==="'";this.preserveSingleSpace(I||P),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")x=!1,w===0?(p&&(this.outdent(),p=!1),C=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),w++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),w&&(w--,this.outdent()));else{var B=!1;this._input.lookBack("with")&&(B=!0),this.preserveSingleSpace(P||B),this.print_string(this._ch),p&&N==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),w++,this.indent())}else if(this._ch===")")w&&(w--,this.outdent()),y&&this._input.peek()===";"&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!p||y)&&w===0&&!C?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!p&&w===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(P),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var U=N==='"'||N==="'";this.preserveSingleSpace(U||P),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
76
+ `&&x&&this._output.add_new_line()}var Z=this._output.get_code(m);return Z},fh.Beautifier=f,fh}var vO;function iT(){if(vO)return Jo.exports;vO=1;var i=tT().Beautifier,e=BO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return Jo.exports=t,Jo.exports.defaultOptions=function(){return new e},Jo.exports}var el={exports:{}},ph={},mh={},ZO;function IO(){if(ZO)return mh;ZO=1;var i=nh().Options;function e(t){i.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return e.prototype=new i,mh.Options=e,mh}var tl={},UO;function FO(){if(UO)return tl;UO=1;var i=Ho().Tokenizer,e=Ho().TOKEN,t=hh().Directives,n=NO().TemplatablePattern,s=Go().Pattern,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},o=new t(/<\!--/,/-->/),a=function(c,h){i.call(this,c,h),this._current_tag_name="";var u=new n(this._input).read_options(this._options),f=new s(this._input);if(this.__patterns={word:u.until(/[\n\r\t <]/),word_control_flow_close_excluded:u.until(/[\n\r\t <}]/),single_quote:u.until_after(/'/),double_quote:u.until_after(/"/),attribute:u.until(/[\n\r\t =>]|\/>/),element_name:u.until(/[\n\r\t >\/]/),angular_control_flow_start:f.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),handlebars_open:f.until(/[\n\r\t }]/),handlebars_raw_close:f.until(/}}/),comment:f.starting_with(/<!--/).until_after(/-->/),cdata:f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:f.starting_with(/<!\[/).until_after(/]>/),processing:f.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var d=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=f.matching(d).until_after(d)}};return a.prototype=new i,a.prototype._is_comment=function(c){return!1},a.prototype._is_opening=function(c){return c.type===r.TAG_OPEN||c.type===r.CONTROL_FLOW_OPEN},a.prototype._is_closing=function(c,h){return c.type===r.TAG_CLOSE&&h&&((c.text===">"||c.text==="/>")&&h.text[0]==="<"||c.text==="}}"&&h.text[0]==="{"&&h.text[1]==="{")||c.type===r.CONTROL_FLOW_CLOSE&&c.text==="}"&&h.text.endsWith("{")},a.prototype._reset=function(){this._current_tag_name=""},a.prototype._get_next_token=function(c,h){var u=null;this._readWhitespace();var f=this._input.peek();return f===null?this._create_token(r.EOF,""):(u=u||this._read_open_handlebars(f,h),u=u||this._read_attribute(f,c,h),u=u||this._read_close(f,h),u=u||this._read_script_and_style(f,c),u=u||this._read_control_flows(f,h),u=u||this._read_raw_content(f,c,h),u=u||this._read_content_word(f,h),u=u||this._read_comment_or_cdata(f),u=u||this._read_processing(f),u=u||this._read_open(f,h),u=u||this._create_token(r.UNKNOWN,this._input.next()),u)},a.prototype._read_comment_or_cdata=function(c){var h=null,u=null,f=null;if(c==="<"){var d=this._input.peek(1);d==="!"&&(u=this.__patterns.comment.read(),u?(f=o.get_directives(u),f&&f.ignore==="start"&&(u+=o.readIgnored(this._input))):u=this.__patterns.cdata.read()),u&&(h=this._create_token(r.COMMENT,u),h.directives=f)}return h},a.prototype._read_processing=function(c){var h=null,u=null,f=null;if(c==="<"){var d=this._input.peek(1);(d==="!"||d==="?")&&(u=this.__patterns.conditional_comment.read(),u=u||this.__patterns.processing.read()),u&&(h=this._create_token(r.COMMENT,u),h.directives=f)}return h},a.prototype._read_open=function(c,h){var u=null,f=null;return(!h||h.type===r.CONTROL_FLOW_OPEN)&&c==="<"&&(u=this._input.next(),this._input.peek()==="/"&&(u+=this._input.next()),u+=this.__patterns.element_name.read(),f=this._create_token(r.TAG_OPEN,u)),f},a.prototype._read_open_handlebars=function(c,h){var u=null,f=null;return(!h||h.type===r.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&c==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(u=this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars.read(),f=this._create_token(r.COMMENT,u)):(u=this.__patterns.handlebars_open.read(),f=this._create_token(r.TAG_OPEN,u))),f},a.prototype._read_control_flows=function(c,h){var u="",f=null;if(!this._options.templating.includes("angular"))return f;if(c==="@"){if(u=this.__patterns.angular_control_flow_start.read(),u==="")return f;for(var d=u.endsWith("(")?1:0,m=0;!(u.endsWith("{")&&d===m);){var b=this._input.next();if(b===null)break;b==="("?d++:b===")"&&m++,u+=b}f=this._create_token(r.CONTROL_FLOW_OPEN,u)}else c==="}"&&h&&h.type===r.CONTROL_FLOW_OPEN&&(u=this._input.next(),f=this._create_token(r.CONTROL_FLOW_CLOSE,u));return f},a.prototype._read_close=function(c,h){var u=null,f=null;return h&&h.type===r.TAG_OPEN&&(h.text[0]==="<"&&(c===">"||c==="/"&&this._input.peek(1)===">")?(u=this._input.next(),c==="/"&&(u+=this._input.next()),f=this._create_token(r.TAG_CLOSE,u)):h.text[0]==="{"&&c==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),f=this._create_token(r.TAG_CLOSE,"}}"))),f},a.prototype._read_attribute=function(c,h,u){var f=null,d="";if(u&&u.text[0]==="<")if(c==="=")f=this._create_token(r.EQUALS,this._input.next());else if(c==='"'||c==="'"){var m=this._input.next();c==='"'?m+=this.__patterns.double_quote.read():m+=this.__patterns.single_quote.read(),f=this._create_token(r.VALUE,m)}else d=this.__patterns.attribute.read(),d&&(h.type===r.EQUALS?f=this._create_token(r.VALUE,d):f=this._create_token(r.ATTRIBUTE,d));return f},a.prototype._is_content_unformatted=function(c){return this._options.void_elements.indexOf(c)===-1&&(this._options.content_unformatted.indexOf(c)!==-1||this._options.unformatted.indexOf(c)!==-1)},a.prototype._read_raw_content=function(c,h,u){var f="";if(u&&u.text[0]==="{")f=this.__patterns.handlebars_raw_close.read();else if(h.type===r.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var d=h.opened.text.substr(1).toLowerCase();this._is_content_unformatted(d)&&(f=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig")))}return f?this._create_token(r.TEXT,f):null},a.prototype._read_script_and_style=function(c,h){if(h.type===r.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var u=h.opened.text.substr(1).toLowerCase();if(u==="script"||u==="style"){var f=this._read_comment_or_cdata(c);if(f)return f.type=r.TEXT,f;var d=this._input.readUntil(new RegExp("</"+u+"[\\n\\r\\t ]*?>","ig"));if(d)return this._create_token(r.TEXT,d)}}return null},a.prototype._read_content_word=function(c,h){var u="";return this._options.unformatted_content_delimiter&&c===this._options.unformatted_content_delimiter[0]&&(u=this.__patterns.unformatted_content_delimiter.read()),u||(u=h&&h.type===r.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),u?this._create_token(r.TEXT,u):null},tl.Tokenizer=a,tl.TOKEN=r,tl}var jO;function nT(){if(jO)return ph;jO=1;var i=IO().Options,e=Jc().Output,t=FO().Tokenizer,n=FO().TOKEN,s=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,o=function(g,p){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=g.max_preserve_newlines,this.preserve_newlines=g.preserve_newlines,this._output=new e(g,p)};o.prototype.current_line_has_match=function(g){return this._output.current_line.has_match(g)},o.prototype.set_space_before_token=function(g,p){this._output.space_before_token=g,this._output.non_breaking_space=p},o.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},o.prototype.add_raw_token=function(g){this._output.add_raw_token(g)},o.prototype.print_preserved_newlines=function(g){var p=0;g.type!==n.TEXT&&g.previous.type!==n.TEXT&&(p=g.newlines?1:0),this.preserve_newlines&&(p=g.newlines<this.max_preserve_newlines+1?g.newlines:this.max_preserve_newlines+1);for(var O=0;O<p;O++)this.print_newline(O>0);return p!==0},o.prototype.traverse_whitespace=function(g){return g.whitespace_before||g.newlines?(this.print_preserved_newlines(g)||(this._output.space_before_token=!0),!0):!1},o.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},o.prototype.print_newline=function(g){this._output.add_new_line(g)},o.prototype.print_token=function(g){g.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(g.text))},o.prototype.indent=function(){this.indent_level++},o.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},o.prototype.get_full_indent=function(g){return g=this.indent_level+(g||0),g<1?"":this._output.get_indent_string(g)};var a=function(g){for(var p=null,O=g.next;O.type!==n.EOF&&g.closed!==O;){if(O.type===n.ATTRIBUTE&&O.text==="type"){O.next&&O.next.type===n.EQUALS&&O.next.next&&O.next.next.type===n.VALUE&&(p=O.next.next.text);break}O=O.next}return p},c=function(g,p){var O=null,C=null;return p.closed?(g==="script"?O="text/javascript":g==="style"&&(O="text/css"),O=a(p)||O,O.search("text/css")>-1?C="css":O.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?C="javascript":O.search(/(text|application|dojo)\/(x-)?(html)/)>-1?C="html":O.search(/test\/null/)>-1&&(C="null"),C):null};function h(g,p){return p.indexOf(g)!==-1}function u(g,p,O){this.parent=g||null,this.tag=p?p.tag_name:"",this.indent_level=O||0,this.parser_token=p||null}function f(g){this._printer=g,this._current_frame=null}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(g){var p=new u(this._current_frame,g,this._printer.indent_level);this._current_frame=p},f.prototype._try_pop_frame=function(g){var p=null;return g&&(p=g.parser_token,this._printer.indent_level=g.indent_level,this._current_frame=g.parent),p},f.prototype._get_frame=function(g,p){for(var O=this._current_frame;O&&g.indexOf(O.tag)===-1;){if(p&&p.indexOf(O.tag)!==-1){O=null;break}O=O.parent}return O},f.prototype.try_pop=function(g,p){var O=this._get_frame([g],p);return this._try_pop_frame(O)},f.prototype.indent_to_tag=function(g){var p=this._get_frame(g);p&&(this._printer.indent_level=p.indent_level)};function d(g,p,O,C){this._source_text=g||"",p=p||{},this._js_beautify=O,this._css_beautify=C,this._tag_stack=null;var y=new i(p,"html");this._options=y,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g=this._source_text,p=this._options.eol;this._options.eol==="auto"&&(p=`
77
77
  `,g&&s.test(g)&&(p=g.match(s)[0])),g=g.replace(r,`
78
- `);var O=g.match(/^[\t ]*/)[0],S={text:"",type:""},y=new m(this._options),Q=new o(this._options,O),k=new t(g,this._options).tokenize();this._tag_stack=new f(Q);for(var C=null,T=k.next();T.type!==n.EOF;)T.type===n.TAG_OPEN||T.type===n.COMMENT?(C=this._handle_tag_open(Q,T,y,S,k),y=C):T.type===n.ATTRIBUTE||T.type===n.EQUALS||T.type===n.VALUE||T.type===n.TEXT&&!y.tag_complete?C=this._handle_inside_tag(Q,T,y,S):T.type===n.TAG_CLOSE?C=this._handle_tag_close(Q,T,y):T.type===n.TEXT?C=this._handle_text(Q,T,y):T.type===n.CONTROL_FLOW_OPEN?C=this._handle_control_flow_open(Q,T):T.type===n.CONTROL_FLOW_CLOSE?C=this._handle_control_flow_close(Q,T):Q.add_raw_token(T),S=C,T=k.next();var N=Q._output.get_code(p);return N},d.prototype._handle_control_flow_open=function(g,p){var O={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),g.indent(),O},d.prototype._handle_control_flow_close=function(g,p){var O={text:p.text,type:p.type};return g.deindent(),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),O},d.prototype._handle_tag_close=function(g,p,O){var S={text:p.text,type:p.type};return g.alignment_size=0,O.tag_complete=!0,g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),O.is_unformatted?g.add_raw_token(p):(O.tag_start_char==="<"&&(g.set_space_before_token(p.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&O.has_wrapped_attrs&&g.print_newline(!1)),g.print_token(p)),O.indent_content&&!(O.is_unformatted||O.is_content_unformatted)&&(g.indent(),O.indent_content=!1),!O.is_inline_element&&!(O.is_unformatted||O.is_content_unformatted)&&g.set_wrap_point(),S},d.prototype._handle_inside_tag=function(g,p,O,S){var y=O.has_wrapped_attrs,Q={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),O.is_unformatted?g.add_raw_token(p):O.tag_start_char==="{"&&p.type===n.TEXT?g.print_preserved_newlines(p)?(p.newlines=0,g.add_raw_token(p)):g.print_token(p):(p.type===n.ATTRIBUTE?g.set_space_before_token(!0):(p.type===n.EQUALS||p.type===n.VALUE&&p.previous.type===n.EQUALS)&&g.set_space_before_token(!1),p.type===n.ATTRIBUTE&&O.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(g.traverse_whitespace(p),y=y||p.newlines!==0),this._is_wrap_attributes_force&&O.attr_count>=this._options.wrap_attributes_min_attrs&&(S.type!==n.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(g.print_newline(!1),y=!0)),g.print_token(p),y=y||g.previous_token_wrapped(),O.has_wrapped_attrs=y),Q},d.prototype._handle_text=function(g,p,O){var S={text:p.text,type:"TK_CONTENT"};return O.custom_beautifier_name?this._print_custom_beatifier_text(g,p,O):O.is_unformatted||O.is_content_unformatted?g.add_raw_token(p):(g.traverse_whitespace(p),g.print_token(p)),S},d.prototype._print_custom_beatifier_text=function(g,p,O){var S=this;if(p.text!==""){var y=p.text,Q,k=1,C="",T="";O.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Q=this._js_beautify:O.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Q=this._css_beautify:O.custom_beautifier_name==="html"&&(Q=function(E,I){var B=new d(E,I,S._js_beautify,S._css_beautify);return B.beautify()}),this._options.indent_scripts==="keep"?k=0:this._options.indent_scripts==="separate"&&(k=-g.indent_level);var N=g.get_full_indent(k);if(y=y.replace(/\n[ \t]*$/,""),O.custom_beautifier_name!=="html"&&y[0]==="<"&&y.match(/^(<!--|<!\[CDATA\[)/)){var _=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(y);if(!_){g.add_raw_token(p);return}C=N+_[1]+`
79
- `,y=_[4],_[5]&&(T=N+_[5]),y=y.replace(/\n[ \t]*$/,""),(_[2]||_[3].indexOf(`
80
- `)!==-1)&&(_=_[3].match(/[ \t]+$/),_&&(p.whitespace_before=_[0]))}if(y)if(Q){var A=function(){this.eol=`
81
- `};A.prototype=this._options.raw_options;var x=new A;y=Q(N+y,x)}else{var M=p.whitespace_before;M&&(y=y.replace(new RegExp(`
78
+ `);var O=g.match(/^[\t ]*/)[0],C={text:"",type:""},y=new m(this._options),E=new o(this._options,O),x=new t(g,this._options).tokenize();this._tag_stack=new f(E);for(var k=null,P=x.next();P.type!==n.EOF;)P.type===n.TAG_OPEN||P.type===n.COMMENT?(k=this._handle_tag_open(E,P,y,C,x),y=k):P.type===n.ATTRIBUTE||P.type===n.EQUALS||P.type===n.VALUE||P.type===n.TEXT&&!y.tag_complete?k=this._handle_inside_tag(E,P,y,C):P.type===n.TAG_CLOSE?k=this._handle_tag_close(E,P,y):P.type===n.TEXT?k=this._handle_text(E,P,y):P.type===n.CONTROL_FLOW_OPEN?k=this._handle_control_flow_open(E,P):P.type===n.CONTROL_FLOW_CLOSE?k=this._handle_control_flow_close(E,P):E.add_raw_token(P),C=k,P=x.next();var N=E._output.get_code(p);return N},d.prototype._handle_control_flow_open=function(g,p){var O={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),g.indent(),O},d.prototype._handle_control_flow_close=function(g,p){var O={text:p.text,type:p.type};return g.deindent(),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),O},d.prototype._handle_tag_close=function(g,p,O){var C={text:p.text,type:p.type};return g.alignment_size=0,O.tag_complete=!0,g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),O.is_unformatted?g.add_raw_token(p):(O.tag_start_char==="<"&&(g.set_space_before_token(p.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&O.has_wrapped_attrs&&g.print_newline(!1)),g.print_token(p)),O.indent_content&&!(O.is_unformatted||O.is_content_unformatted)&&(g.indent(),O.indent_content=!1),!O.is_inline_element&&!(O.is_unformatted||O.is_content_unformatted)&&g.set_wrap_point(),C},d.prototype._handle_inside_tag=function(g,p,O,C){var y=O.has_wrapped_attrs,E={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),O.is_unformatted?g.add_raw_token(p):O.tag_start_char==="{"&&p.type===n.TEXT?g.print_preserved_newlines(p)?(p.newlines=0,g.add_raw_token(p)):g.print_token(p):(p.type===n.ATTRIBUTE?g.set_space_before_token(!0):(p.type===n.EQUALS||p.type===n.VALUE&&p.previous.type===n.EQUALS)&&g.set_space_before_token(!1),p.type===n.ATTRIBUTE&&O.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(g.traverse_whitespace(p),y=y||p.newlines!==0),this._is_wrap_attributes_force&&O.attr_count>=this._options.wrap_attributes_min_attrs&&(C.type!==n.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(g.print_newline(!1),y=!0)),g.print_token(p),y=y||g.previous_token_wrapped(),O.has_wrapped_attrs=y),E},d.prototype._handle_text=function(g,p,O){var C={text:p.text,type:"TK_CONTENT"};return O.custom_beautifier_name?this._print_custom_beatifier_text(g,p,O):O.is_unformatted||O.is_content_unformatted?g.add_raw_token(p):(g.traverse_whitespace(p),g.print_token(p)),C},d.prototype._print_custom_beatifier_text=function(g,p,O){var C=this;if(p.text!==""){var y=p.text,E,x=1,k="",P="";O.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?E=this._js_beautify:O.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?E=this._css_beautify:O.custom_beautifier_name==="html"&&(E=function(T,I){var B=new d(T,I,C._js_beautify,C._css_beautify);return B.beautify()}),this._options.indent_scripts==="keep"?x=0:this._options.indent_scripts==="separate"&&(x=-g.indent_level);var N=g.get_full_indent(x);if(y=y.replace(/\n[ \t]*$/,""),O.custom_beautifier_name!=="html"&&y[0]==="<"&&y.match(/^(<!--|<!\[CDATA\[)/)){var _=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(y);if(!_){g.add_raw_token(p);return}k=N+_[1]+`
79
+ `,y=_[4],_[5]&&(P=N+_[5]),y=y.replace(/\n[ \t]*$/,""),(_[2]||_[3].indexOf(`
80
+ `)!==-1)&&(_=_[3].match(/[ \t]+$/),_&&(p.whitespace_before=_[0]))}if(y)if(E){var A=function(){this.eol=`
81
+ `};A.prototype=this._options.raw_options;var S=new A;y=E(N+y,S)}else{var M=p.whitespace_before;M&&(y=y.replace(new RegExp(`
82
82
  (`+M+")?","g"),`
83
83
  `)),y=N+y.replace(/\n/g,`
84
- `+N)}C&&(y?y=C+y+`
85
- `+T:y=C+T),g.print_newline(!1),y&&(p.text=y,p.whitespace_before="",p.newlines=0,g.add_raw_token(p),g.print_newline(!0))}},d.prototype._handle_tag_open=function(g,p,O,S,y){var Q=this._get_tag_open_token(p);if((O.is_unformatted||O.is_content_unformatted)&&!O.is_empty_element&&p.type===n.TAG_OPEN&&!Q.is_start_tag?(g.add_raw_token(p),Q.start_tag_token=this._tag_stack.try_pop(Q.tag_name)):(g.traverse_whitespace(p),this._set_tag_position(g,p,Q,O,S),Q.is_inline_element||g.set_wrap_point(),g.print_token(p)),Q.is_start_tag&&this._is_wrap_attributes_force){var k=0,C;do C=y.peek(k),C.type===n.ATTRIBUTE&&(Q.attr_count+=1),k+=1;while(C.type!==n.EOF&&C.type!==n.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(Q.alignment_size=p.text.length+1),!Q.tag_complete&&!Q.is_unformatted&&(g.alignment_size=Q.alignment_size),Q};var m=function(g,p,O){if(this.parent=p||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!O)this.tag_complete=!0;else{var S;this.tag_start_char=O.text[0],this.text=O.text,this.tag_start_char==="<"?(S=O.text.match(/^<([^\s>]*)/),this.tag_check=S?S[1]:""):(S=O.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=S?S[1]:"",(O.text.startsWith("{{#>")||O.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&O.next!==null?this.tag_check=O.next.text.split(" ")[0]:this.tag_check=O.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),O.type===n.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||O.closed&&O.closed.text==="/>";var y=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(y=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!g.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(y)))}};d.prototype._get_tag_open_token=function(g){var p=new m(this._options,this._tag_stack.get_parser_token(),g);return p.alignment_size=this._options.wrap_attributes_indent_size,p.is_end_tag=p.is_end_tag||h(p.tag_check,this._options.void_elements),p.is_empty_element=p.tag_complete||p.is_start_tag&&p.is_end_tag,p.is_unformatted=!p.tag_complete&&h(p.tag_check,this._options.unformatted),p.is_content_unformatted=!p.is_empty_element&&h(p.tag_check,this._options.content_unformatted),p.is_inline_element=h(p.tag_name,this._options.inline)||this._options.inline_custom_elements&&p.tag_name.includes("-")||p.tag_start_char==="{",p},d.prototype._set_tag_position=function(g,p,O,S,y){if(O.is_empty_element||(O.is_end_tag?O.start_tag_token=this._tag_stack.try_pop(O.tag_name):(this._do_optional_end_element(O)&&(O.is_inline_element||g.print_newline(!1)),this._tag_stack.record_tag(O),(O.tag_name==="script"||O.tag_name==="style")&&!(O.is_unformatted||O.is_content_unformatted)&&(O.custom_beautifier_name=c(O.tag_check,p)))),h(O.tag_check,this._options.extra_liners)&&(g.print_newline(!1),g._output.just_added_blankline()||g.print_newline(!0)),O.is_empty_element){if(O.tag_start_char==="{"&&O.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),O.indent_content=!0;var Q=g.current_line_has_match(/{{#if/);Q||g.print_newline(!1)}O.tag_name==="!--"&&y.type===n.TAG_CLOSE&&S.is_end_tag&&O.text.indexOf(`
86
- `)===-1||(O.is_inline_element||O.is_unformatted||g.print_newline(!1),this._calcluate_parent_multiline(g,O))}else if(O.is_end_tag){var k=!1;k=O.start_tag_token&&O.start_tag_token.multiline_content,k=k||!O.is_inline_element&&!(S.is_inline_element||S.is_unformatted)&&!(y.type===n.TAG_CLOSE&&O.start_tag_token===S)&&y.type!=="TK_CONTENT",(O.is_content_unformatted||O.is_unformatted)&&(k=!1),k&&g.print_newline(!1)}else O.indent_content=!O.custom_beautifier_name,O.tag_start_char==="<"&&(O.tag_name==="html"?O.indent_content=this._options.indent_inner_html:O.tag_name==="head"?O.indent_content=this._options.indent_head_inner_html:O.tag_name==="body"&&(O.indent_content=this._options.indent_body_inner_html)),!(O.is_inline_element||O.is_unformatted)&&(y.type!=="TK_CONTENT"||O.is_content_unformatted)&&g.print_newline(!1),this._calcluate_parent_multiline(g,O)},d.prototype._calcluate_parent_multiline=function(g,p){p.parent&&g._output.just_added_newline()&&!((p.is_inline_element||p.is_unformatted)&&p.parent.is_inline_element)&&(p.parent.multiline_content=!0)};var b=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],w=["a","audio","del","ins","map","noscript","video"];return d.prototype._do_optional_end_element=function(g){var p=null;if(!(g.is_empty_element||!g.is_start_tag||!g.parent)){if(g.tag_name==="body")p=p||this._tag_stack.try_pop("head");else if(g.tag_name==="li")p=p||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(g.tag_name==="dd"||g.tag_name==="dt")p=p||this._tag_stack.try_pop("dt",["dl"]),p=p||this._tag_stack.try_pop("dd",["dl"]);else if(g.parent.tag_name==="p"&&b.indexOf(g.tag_name)!==-1){var O=g.parent.parent;(!O||w.indexOf(O.tag_name)===-1)&&(p=p||this._tag_stack.try_pop("p"))}else g.tag_name==="rp"||g.tag_name==="rt"?(p=p||this._tag_stack.try_pop("rt",["ruby","rtc"]),p=p||this._tag_stack.try_pop("rp",["ruby","rtc"])):g.tag_name==="optgroup"?p=p||this._tag_stack.try_pop("optgroup",["select"]):g.tag_name==="option"?p=p||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):g.tag_name==="colgroup"?p=p||this._tag_stack.try_pop("caption",["table"]):g.tag_name==="thead"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"])):g.tag_name==="tbody"||g.tag_name==="tfoot"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("thead",["table"]),p=p||this._tag_stack.try_pop("tbody",["table"])):g.tag_name==="tr"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(g.tag_name==="th"||g.tag_name==="td")&&(p=p||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),p=p||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return g.parent=this._tag_stack.get_parser_token(),p}},fh.Beautifier=d,fh}var jO;function nT(){if(jO)return Jo.exports;jO=1;var i=iT().Beautifier,e=ZO().Options;function t(n,s,r,o){var a=new i(n,s,r,o);return a.beautify()}return Jo.exports=t,Jo.exports.defaultOptions=function(){return new e},Jo.exports}var qO;function sT(){if(qO)return lr;qO=1;var i=JP(),e=tT(),t=nT();function n(s,r,o,a){return o=o||i,a=a||e,t(s,r,o,a)}return n.defaultOptions=t.defaultOptions,lr.js=i,lr.css=e,lr.html=n,lr}(function(i){function e(t,n,s){var r=function(o,a){return t.js_beautify(o,a)};return r.js=t.js_beautify,r.css=n.css_beautify,r.html=s.html_beautify,r.js_beautify=t.js_beautify,r.css_beautify=n.css_beautify,r.html_beautify=s.html_beautify,r}(function(t){var n=sT();n.js_beautify=n.js,n.css_beautify=n.css,n.html_beautify=n.html,t.exports=e(n,n,n)})(i)})(mO);var rT=mO.exports;const oT=zP(rT),bE="",lT={class:"act-code-mirror"},XO=Object.freeze(Object.defineProperty({__proto__:null,default:ht({__name:"index",props:{modelValue:{type:String,default:""},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"300px"},theme:{type:String,default:"vs-dark"},editorOption:{type:Object,default:()=>({})}},emits:["update:modelValue","blur"],setup(i,{emit:e}){const{t}=Ht(),n=e,s=i,r=l.computed(()=>({width:typeof s.width=="string"?s.width:s.width+"px",height:typeof s.height=="string"?s.height:s.height+"px"})),o=l.ref(!1),a=l.ref(),c=[VP(),YP],h=(f,d)=>{n("update:modelValue",d)};l.watch(()=>s.modelValue,(f,d)=>{a.value=f},{immediate:!0});const u=()=>{o.value=!0;try{a.value=oT.js(a.value,{indent_size:2})}catch(f){console.error("代码格式化失败:",f)}finally{o.value=!1}};return(f,d)=>{const m=l.resolveComponent("el-button"),b=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",lT,[l.withDirectives((l.openBlock(),l.createBlock(m,{class:"format-code-btn",type:"primary",loading:o.value,onClick:d[0]||(d[0]=w=>u(f.formRef))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.formatCode")),1)]),_:1},8,["loading"])),[[b]]),l.createVNode(l.unref(vQ),{class:"code",modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=w=>a.value=w),style:l.normalizeStyle(r.value),extensions:c,autofocus:!1,disabled:!1,onChange:d[2]||(d[2]=w=>h("change",w))},null,8,["modelValue","style"])])}}},[["__scopeId","data-v-451d513f"]])},Symbol.toStringTag,{value:"Module"})),aT={class:"dialog-footer"},cT=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"dialogSiteComponentsParams",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},modelValue:{type:String,default:""}},emits:["update:visible","refresh","update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>XO)),n=e,s=i;let r=l.ref();l.watch(()=>s.visible,async(h,u)=>{h&&(r.value=s.modelValue)});const o=h=>{a(),h()},a=()=>{r.value="",n("update:visible",!1)},c=()=>{n("update:modelValue",r.value),n("update:visible",!1)};return(h,u)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:"800",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":o},{footer:l.withCtx(()=>[l.createElementVNode("span",aT,[l.createVNode(f,{onClick:a},{default:l.withCtx(()=>u[2]||(u[2]=[l.createTextVNode("取消")])),_:1}),l.createVNode(f,{type:"primary",onClick:u[1]||(u[1]=m=>c())},{default:l.withCtx(()=>u[3]||(u[3]=[l.createTextVNode("保存")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(r),"onUpdate:modelValue":u[0]||(u[0]=m=>l.isRef(r)?r.value=m:r=m),height:600},null,8,["modelValue"])]),_:1},8,["model-value","title"])}}}},Symbol.toStringTag,{value:"Module"}));Zt.ActPlus=vy,Zt.actPlusComponents=Zy,Zt.changeActI18n=Iy,Object.defineProperty(Zt,Symbol.toStringTag,{value:"Module"})});
84
+ `+N)}k&&(y?y=k+y+`
85
+ `+P:y=k+P),g.print_newline(!1),y&&(p.text=y,p.whitespace_before="",p.newlines=0,g.add_raw_token(p),g.print_newline(!0))}},d.prototype._handle_tag_open=function(g,p,O,C,y){var E=this._get_tag_open_token(p);if((O.is_unformatted||O.is_content_unformatted)&&!O.is_empty_element&&p.type===n.TAG_OPEN&&!E.is_start_tag?(g.add_raw_token(p),E.start_tag_token=this._tag_stack.try_pop(E.tag_name)):(g.traverse_whitespace(p),this._set_tag_position(g,p,E,O,C),E.is_inline_element||g.set_wrap_point(),g.print_token(p)),E.is_start_tag&&this._is_wrap_attributes_force){var x=0,k;do k=y.peek(x),k.type===n.ATTRIBUTE&&(E.attr_count+=1),x+=1;while(k.type!==n.EOF&&k.type!==n.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(E.alignment_size=p.text.length+1),!E.tag_complete&&!E.is_unformatted&&(g.alignment_size=E.alignment_size),E};var m=function(g,p,O){if(this.parent=p||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!O)this.tag_complete=!0;else{var C;this.tag_start_char=O.text[0],this.text=O.text,this.tag_start_char==="<"?(C=O.text.match(/^<([^\s>]*)/),this.tag_check=C?C[1]:""):(C=O.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=C?C[1]:"",(O.text.startsWith("{{#>")||O.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&O.next!==null?this.tag_check=O.next.text.split(" ")[0]:this.tag_check=O.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),O.type===n.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||O.closed&&O.closed.text==="/>";var y=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(y=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!g.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(y)))}};d.prototype._get_tag_open_token=function(g){var p=new m(this._options,this._tag_stack.get_parser_token(),g);return p.alignment_size=this._options.wrap_attributes_indent_size,p.is_end_tag=p.is_end_tag||h(p.tag_check,this._options.void_elements),p.is_empty_element=p.tag_complete||p.is_start_tag&&p.is_end_tag,p.is_unformatted=!p.tag_complete&&h(p.tag_check,this._options.unformatted),p.is_content_unformatted=!p.is_empty_element&&h(p.tag_check,this._options.content_unformatted),p.is_inline_element=h(p.tag_name,this._options.inline)||this._options.inline_custom_elements&&p.tag_name.includes("-")||p.tag_start_char==="{",p},d.prototype._set_tag_position=function(g,p,O,C,y){if(O.is_empty_element||(O.is_end_tag?O.start_tag_token=this._tag_stack.try_pop(O.tag_name):(this._do_optional_end_element(O)&&(O.is_inline_element||g.print_newline(!1)),this._tag_stack.record_tag(O),(O.tag_name==="script"||O.tag_name==="style")&&!(O.is_unformatted||O.is_content_unformatted)&&(O.custom_beautifier_name=c(O.tag_check,p)))),h(O.tag_check,this._options.extra_liners)&&(g.print_newline(!1),g._output.just_added_blankline()||g.print_newline(!0)),O.is_empty_element){if(O.tag_start_char==="{"&&O.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),O.indent_content=!0;var E=g.current_line_has_match(/{{#if/);E||g.print_newline(!1)}O.tag_name==="!--"&&y.type===n.TAG_CLOSE&&C.is_end_tag&&O.text.indexOf(`
86
+ `)===-1||(O.is_inline_element||O.is_unformatted||g.print_newline(!1),this._calcluate_parent_multiline(g,O))}else if(O.is_end_tag){var x=!1;x=O.start_tag_token&&O.start_tag_token.multiline_content,x=x||!O.is_inline_element&&!(C.is_inline_element||C.is_unformatted)&&!(y.type===n.TAG_CLOSE&&O.start_tag_token===C)&&y.type!=="TK_CONTENT",(O.is_content_unformatted||O.is_unformatted)&&(x=!1),x&&g.print_newline(!1)}else O.indent_content=!O.custom_beautifier_name,O.tag_start_char==="<"&&(O.tag_name==="html"?O.indent_content=this._options.indent_inner_html:O.tag_name==="head"?O.indent_content=this._options.indent_head_inner_html:O.tag_name==="body"&&(O.indent_content=this._options.indent_body_inner_html)),!(O.is_inline_element||O.is_unformatted)&&(y.type!=="TK_CONTENT"||O.is_content_unformatted)&&g.print_newline(!1),this._calcluate_parent_multiline(g,O)},d.prototype._calcluate_parent_multiline=function(g,p){p.parent&&g._output.just_added_newline()&&!((p.is_inline_element||p.is_unformatted)&&p.parent.is_inline_element)&&(p.parent.multiline_content=!0)};var b=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],w=["a","audio","del","ins","map","noscript","video"];return d.prototype._do_optional_end_element=function(g){var p=null;if(!(g.is_empty_element||!g.is_start_tag||!g.parent)){if(g.tag_name==="body")p=p||this._tag_stack.try_pop("head");else if(g.tag_name==="li")p=p||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(g.tag_name==="dd"||g.tag_name==="dt")p=p||this._tag_stack.try_pop("dt",["dl"]),p=p||this._tag_stack.try_pop("dd",["dl"]);else if(g.parent.tag_name==="p"&&b.indexOf(g.tag_name)!==-1){var O=g.parent.parent;(!O||w.indexOf(O.tag_name)===-1)&&(p=p||this._tag_stack.try_pop("p"))}else g.tag_name==="rp"||g.tag_name==="rt"?(p=p||this._tag_stack.try_pop("rt",["ruby","rtc"]),p=p||this._tag_stack.try_pop("rp",["ruby","rtc"])):g.tag_name==="optgroup"?p=p||this._tag_stack.try_pop("optgroup",["select"]):g.tag_name==="option"?p=p||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):g.tag_name==="colgroup"?p=p||this._tag_stack.try_pop("caption",["table"]):g.tag_name==="thead"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"])):g.tag_name==="tbody"||g.tag_name==="tfoot"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("thead",["table"]),p=p||this._tag_stack.try_pop("tbody",["table"])):g.tag_name==="tr"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(g.tag_name==="th"||g.tag_name==="td")&&(p=p||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),p=p||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return g.parent=this._tag_stack.get_parser_token(),p}},ph.Beautifier=d,ph}var qO;function sT(){if(qO)return el.exports;qO=1;var i=nT().Beautifier,e=IO().Options;function t(n,s,r,o){var a=new i(n,s,r,o);return a.beautify()}return el.exports=t,el.exports.defaultOptions=function(){return new e},el.exports}var XO;function rT(){if(XO)return ar;XO=1;var i=eT(),e=iT(),t=sT();function n(s,r,o,a){return o=o||i,a=a||e,t(s,r,o,a)}return n.defaultOptions=t.defaultOptions,ar.js=i,ar.css=e,ar.html=n,ar}(function(i){function e(t,n,s){var r=function(o,a){return t.js_beautify(o,a)};return r.js=t.js_beautify,r.css=n.css_beautify,r.html=s.html_beautify,r.js_beautify=t.js_beautify,r.css_beautify=n.css_beautify,r.html_beautify=s.html_beautify,r}(function(t){var n=rT();n.js_beautify=n.js,n.css_beautify=n.css,n.html_beautify=n.html,t.exports=e(n,n,n)})(i)})(gO);var oT=gO.exports;const lT=GP(oT),wE="",aT={class:"act-code-mirror"},WO=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{modelValue:{type:String,default:""},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"300px"},theme:{type:String,default:"vs-dark"},editorOption:{type:Object,default:()=>({})}},emits:["update:modelValue","blur"],setup(i,{emit:e}){const{t}=Gt(),n=e,s=i,r=l.computed(()=>({width:typeof s.width=="string"?s.width:s.width+"px",height:typeof s.height=="string"?s.height:s.height+"px"})),o=l.ref(!1),a=l.ref(),c=[LP(),zP],h=(f,d)=>{n("update:modelValue",d)};l.watch(()=>s.modelValue,(f,d)=>{a.value=f},{immediate:!0});const u=()=>{o.value=!0;try{a.value=lT.js(a.value,{indent_size:2})}catch(f){console.error("代码格式化失败:",f)}finally{o.value=!1}};return(f,d)=>{const m=l.resolveComponent("el-button"),b=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",aT,[l.withDirectives((l.openBlock(),l.createBlock(m,{class:"format-code-btn",type:"primary",loading:o.value,onClick:d[0]||(d[0]=w=>u(f.formRef))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.formatCode")),1)]),_:1},8,["loading"])),[[b]]),l.createVNode(l.unref(ZQ),{class:"code",modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=w=>a.value=w),style:l.normalizeStyle(r.value),extensions:c,autofocus:!1,disabled:!1,onChange:d[2]||(d[2]=w=>h("change",w))},null,8,["modelValue","style"])])}}},[["__scopeId","data-v-451d513f"]])},Symbol.toStringTag,{value:"Module"})),cT={class:"dialog-footer"},hT=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"dialogSiteComponentsParams",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},modelValue:{type:String,default:""}},emits:["update:visible","refresh","update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>WO)),n=e,s=i;let r=l.ref();l.watch(()=>s.visible,async(h,u)=>{h&&(r.value=s.modelValue)});const o=h=>{a(),h()},a=()=>{r.value="",n("update:visible",!1)},c=()=>{n("update:modelValue",r.value),n("update:visible",!1)};return(h,u)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:"800",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":o},{footer:l.withCtx(()=>[l.createElementVNode("span",cT,[l.createVNode(f,{onClick:a},{default:l.withCtx(()=>u[2]||(u[2]=[l.createTextVNode("取消")])),_:1}),l.createVNode(f,{type:"primary",onClick:u[1]||(u[1]=m=>c())},{default:l.withCtx(()=>u[3]||(u[3]=[l.createTextVNode("保存")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(r),"onUpdate:modelValue":u[0]||(u[0]=m=>l.isRef(r)?r.value=m:r=m),height:600},null,8,["modelValue"])]),_:1},8,["model-value","title"])}}}},Symbol.toStringTag,{value:"Module"}));vt.ActPlus=Zy,vt.actPlusComponents=Iy,vt.changeActI18n=Uy,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});