@squirrel-cloud/ui-vue 0.2.36 → 0.2.38

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.
@@ -54,4 +54,4 @@
54
54
  `:">",o},du.prototype.renderInline=function(u,e,t){let n="";const r=this.rules;for(let o=0,s=u.length;o<s;o++){const i=u[o].type;typeof r[i]<"u"?n+=r[i](u,o,e,t,this):n+=this.renderToken(u,o,e)}return n},du.prototype.renderInlineAsText=function(u,e,t){let n="";for(let r=0,o=u.length;r<o;r++)switch(u[r].type){case"text":n+=u[r].content;break;case"image":n+=this.renderInlineAsText(u[r].children,e,t);break;case"html_inline":case"html_block":n+=u[r].content;break;case"softbreak":case"hardbreak":n+=`
55
55
  `;break}return n},du.prototype.render=function(u,e,t){let n="";const r=this.rules;for(let o=0,s=u.length;o<s;o++){const i=u[o].type;i==="inline"?n+=this.renderInline(u[o].children,e,t):typeof r[i]<"u"?n+=r[i](u,o,e,t,this):n+=this.renderToken(u,o,e,t)}return n};function N(){this.__rules__=[],this.__cache__=null}N.prototype.__find__=function(u){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===u)return e;return-1},N.prototype.__compile__=function(){const u=this,e=[""];u.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(n){e.indexOf(n)<0&&e.push(n)})}),u.__cache__={},e.forEach(function(t){u.__cache__[t]=[],u.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||u.__cache__[t].push(n.fn))})})},N.prototype.at=function(u,e,t){const n=this.__find__(u),r=t||{};if(n===-1)throw new Error("Parser rule not found: "+u);this.__rules__[n].fn=e,this.__rules__[n].alt=r.alt||[],this.__cache__=null},N.prototype.before=function(u,e,t,n){const r=this.__find__(u),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(r,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},N.prototype.after=function(u,e,t,n){const r=this.__find__(u),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(r+1,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null},N.prototype.push=function(u,e,t){const n=t||{};this.__rules__.push({name:u,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null},N.prototype.enable=function(u,e){Array.isArray(u)||(u=[u]);const t=[];return u.forEach(function(n){const r=this.__find__(n);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!0,t.push(n)},this),this.__cache__=null,t},N.prototype.enableOnly=function(u,e){Array.isArray(u)||(u=[u]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(u,e)},N.prototype.disable=function(u,e){Array.isArray(u)||(u=[u]);const t=[];return u.forEach(function(n){const r=this.__find__(n);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!1,t.push(n)},this),this.__cache__=null,t},N.prototype.getRules=function(u){return this.__cache__===null&&this.__compile__(),this.__cache__[u]||[]};function Qe(u,e,t){this.src=u,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}Qe.prototype.Token=v;const Jn=/\r\n?|\n/g,Xn=/\0/g;function Qn(u){let e;e=u.src.replace(Jn,`
56
56
  `),e=e.replace(Xn,"�"),u.src=e}function Yn(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function Kn(u){const e=u.tokens;for(let t=0,n=e.length;t<n;t++){const r=e[t];r.type==="inline"&&u.md.inline.parse(r.content,u.md,u.env,r.children)}}function ur(u){return/^<a[>\s]/i.test(u)}function er(u){return/^<\/a\s*>/i.test(u)}function tr(u){const e=u.tokens;if(u.md.options.linkify)for(let t=0,n=e.length;t<n;t++){if(e[t].type!=="inline"||!u.md.linkify.pretest(e[t].content))continue;let r=e[t].children,o=0;for(let s=r.length-1;s>=0;s--){const i=r[s];if(i.type==="link_close"){for(s--;r[s].level!==i.level&&r[s].type!=="link_open";)s--;continue}if(i.type==="html_inline"&&(ur(i.content)&&o>0&&o--,er(i.content)&&o++),!(o>0)&&i.type==="text"&&u.md.linkify.test(i.content)){const a=i.content;let l=u.md.linkify.match(a);const f=[];let d=i.level,b=0;l.length>0&&l[0].index===0&&s>0&&r[s-1].type==="text_special"&&(l=l.slice(1));for(let h=0;h<l.length;h++){const p=l[h].url,g=u.md.normalizeLink(p);if(!u.md.validateLink(g))continue;let y=l[h].text;l[h].schema?l[h].schema==="mailto:"&&!/^mailto:/i.test(y)?y=u.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=u.md.normalizeLinkText(y):y=u.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const E=l[h].index;if(E>b){const _=new u.Token("text","",0);_.content=a.slice(b,E),_.level=d,f.push(_)}const k=new u.Token("link_open","a",1);k.attrs=[["href",g]],k.level=d++,k.markup="linkify",k.info="auto",f.push(k);const C=new u.Token("text","",0);C.content=y,C.level=d,f.push(C);const m=new u.Token("link_close","a",-1);m.level=--d,m.markup="linkify",m.info="auto",f.push(m),b=l[h].lastIndex}if(b<a.length){const h=new u.Token("text","",0);h.content=a.slice(b),h.level=d,f.push(h)}e[t].children=r=Je(r,s,f)}}}}const Ye=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,nr=/\((c|tm|r)\)/i,rr=/\((c|tm|r)\)/ig,or={c:"©",r:"®",tm:"™"};function cr(u,e){return or[e.toLowerCase()]}function ir(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&(n.content=n.content.replace(rr,cr)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function sr(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&Ye.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function ar(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(nr.test(u.tokens[e].content)&&ir(u.tokens[e].children),Ye.test(u.tokens[e].content)&&sr(u.tokens[e].children))}const lr=/['"]/,Ke=/['"]/g,ut="’";function Nu(u,e,t){return u.slice(0,e)+t+u.slice(e+1)}function fr(u,e){let t;const n=[];for(let r=0;r<u.length;r++){const o=u[r],s=u[r].level;for(t=n.length-1;t>=0&&!(n[t].level<=s);t--);if(n.length=t+1,o.type!=="text")continue;let i=o.content,a=0,l=i.length;u:for(;a<l;){Ke.lastIndex=a;const f=Ke.exec(i);if(!f)break;let d=!0,b=!0;a=f.index+1;const h=f[0]==="'";let p=32;if(f.index-1>=0)p=i.charCodeAt(f.index-1);else for(t=r-1;t>=0&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t--)if(u[t].content){p=u[t].content.charCodeAt(u[t].content.length-1);break}let g=32;if(a<l)g=i.charCodeAt(a);else for(t=r+1;t<u.length&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t++)if(u[t].content){g=u[t].content.charCodeAt(0);break}const y=wu(p)||Eu(String.fromCharCode(p)),E=wu(g)||Eu(String.fromCharCode(g)),k=Cu(p),C=Cu(g);if(C?d=!1:E&&(k||y||(d=!1)),k?b=!1:y&&(C||E||(b=!1)),g===34&&f[0]==='"'&&p>=48&&p<=57&&(b=d=!1),d&&b&&(d=y,b=E),!d&&!b){h&&(o.content=Nu(o.content,f.index,ut));continue}if(b)for(t=n.length-1;t>=0;t--){let m=n[t];if(n[t].level<s)break;if(m.single===h&&n[t].level===s){m=n[t];let _,x;h?(_=e.md.options.quotes[2],x=e.md.options.quotes[3]):(_=e.md.options.quotes[0],x=e.md.options.quotes[1]),o.content=Nu(o.content,f.index,x),u[m.token].content=Nu(u[m.token].content,m.pos,_),a+=x.length-1,m.token===r&&(a+=_.length-1),i=o.content,l=i.length,n.length=t;continue u}}d?n.push({token:r,pos:f.index,single:h,level:s}):b&&h&&(o.content=Nu(o.content,f.index,ut))}}}function dr(u){if(u.md.options.typographer)for(let e=u.tokens.length-1;e>=0;e--)u.tokens[e].type!=="inline"||!lr.test(u.tokens[e].content)||fr(u.tokens[e].children,u)}function pr(u){let e,t;const n=u.tokens,r=n.length;for(let o=0;o<r;o++){if(n[o].type!=="inline")continue;const s=n[o].children,i=s.length;for(e=0;e<i;e++)s[e].type==="text_special"&&(s[e].type="text");for(e=t=0;e<i;e++)s[e].type==="text"&&e+1<i&&s[e+1].type==="text"?s[e+1].content=s[e].content+s[e+1].content:(e!==t&&(s[t]=s[e]),t++);e!==t&&(s.length=t)}}const ce=[["normalize",Qn],["block",Yn],["inline",Kn],["linkify",tr],["replacements",ar],["smartquotes",dr],["text_join",pr]];function ie(){this.ruler=new N;for(let u=0;u<ce.length;u++)this.ruler.push(ce[u][0],ce[u][1])}ie.prototype.process=function(u){const e=this.ruler.getRules("");for(let t=0,n=e.length;t<n;t++)e[t](u)},ie.prototype.State=Qe;function W(u,e,t,n){this.src=u,this.md=e,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let o=0,s=0,i=0,a=0,l=r.length,f=!1;s<l;s++){const d=r.charCodeAt(s);if(!f)if(S(d)){i++,d===9?a+=4-a%4:a++;continue}else f=!0;(d===10||s===l-1)&&(d!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(i),this.sCount.push(a),this.bsCount.push(0),f=!1,i=0,a=0,o=s+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}W.prototype.push=function(u,e,t){const n=new v(u,e,t);return n.block=!0,t<0&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},W.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},W.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},W.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const n=this.src.charCodeAt(e);if(!S(n))break}return e},W.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!S(this.src.charCodeAt(--e)))return e+1;return e},W.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},W.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},W.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const o=new Array(t-e);for(let s=0,i=e;i<t;i++,s++){let a=0;const l=this.bMarks[i];let f=l,d;for(i+1<t||r?d=this.eMarks[i]+1:d=this.eMarks[i];f<d&&a<n;){const b=this.src.charCodeAt(f);if(S(b))b===9?a+=4-(a+this.bsCount[i])%4:a++;else if(f-l<this.tShift[i])a++;else break;f++}a>n?o[s]=new Array(a-n+1).join(" ")+this.src.slice(f,d):o[s]=this.src.slice(f,d)}return o.join("")},W.prototype.Token=v;const hr=65536;function se(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];return u.src.slice(t,n)}function et(u){const e=[],t=u.length;let n=0,r=u.charCodeAt(n),o=!1,s=0,i="";for(;n<t;)r===124&&(o?(i+=u.substring(s,n-1),s=n):(e.push(i+u.substring(s,n)),i="",s=n+1)),o=r===92,n++,r=u.charCodeAt(n);return e.push(i+u.substring(s)),e}function br(u,e,t,n){if(e+2>t)return!1;let r=e+1;if(u.sCount[r]<u.blkIndent||u.sCount[r]-u.blkIndent>=4)return!1;let o=u.bMarks[r]+u.tShift[r];if(o>=u.eMarks[r])return!1;const s=u.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=u.eMarks[r])return!1;const i=u.src.charCodeAt(o++);if(i!==124&&i!==45&&i!==58&&!S(i)||s===45&&S(i))return!1;for(;o<u.eMarks[r];){const m=u.src.charCodeAt(o);if(m!==124&&m!==45&&m!==58&&!S(m))return!1;o++}let a=se(u,e+1),l=a.split("|");const f=[];for(let m=0;m<l.length;m++){const _=l[m].trim();if(!_){if(m===0||m===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(_))return!1;_.charCodeAt(_.length-1)===58?f.push(_.charCodeAt(0)===58?"center":"right"):_.charCodeAt(0)===58?f.push("left"):f.push("")}if(a=se(u,e).trim(),a.indexOf("|")===-1||u.sCount[e]-u.blkIndent>=4)return!1;l=et(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==f.length)return!1;if(n)return!0;const b=u.parentType;u.parentType="table";const h=u.md.block.ruler.getRules("blockquote"),p=u.push("table_open","table",1),g=[e,0];p.map=g;const y=u.push("thead_open","thead",1);y.map=[e,e+1];const E=u.push("tr_open","tr",1);E.map=[e,e+1];for(let m=0;m<l.length;m++){const _=u.push("th_open","th",1);f[m]&&(_.attrs=[["style","text-align:"+f[m]]]);const x=u.push("inline","",0);x.content=l[m].trim(),x.children=[],u.push("th_close","th",-1)}u.push("tr_close","tr",-1),u.push("thead_close","thead",-1);let k,C=0;for(r=e+2;r<t&&!(u.sCount[r]<u.blkIndent);r++){let m=!1;for(let x=0,w=h.length;x<w;x++)if(h[x](u,r,t,!0)){m=!0;break}if(m||(a=se(u,r).trim(),!a)||u.sCount[r]-u.blkIndent>=4||(l=et(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),C+=d-l.length,C>hr))break;if(r===e+2){const x=u.push("tbody_open","tbody",1);x.map=k=[e+2,0]}const _=u.push("tr_open","tr",1);_.map=[r,r+1];for(let x=0;x<d;x++){const w=u.push("td_open","td",1);f[x]&&(w.attrs=[["style","text-align:"+f[x]]]);const D=u.push("inline","",0);D.content=l[x]?l[x].trim():"",D.children=[],u.push("td_close","td",-1)}u.push("tr_close","tr",-1)}return k&&(u.push("tbody_close","tbody",-1),k[1]=r),u.push("table_close","table",-1),g[1]=r,u.parentType=b,u.line=r,!0}function mr(u,e,t){if(u.sCount[e]-u.blkIndent<4)return!1;let n=e+1,r=n;for(;n<t;){if(u.isEmpty(n)){n++;continue}if(u.sCount[n]-u.blkIndent>=4){n++,r=n;continue}break}u.line=r;const o=u.push("code_block","code",0);return o.content=u.getLines(e,r,4+u.blkIndent,!1)+`
57
- `,o.map=[e,u.line],!0}function xr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||r+3>o)return!1;const s=u.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let i=r;r=u.skipChars(r,s);let a=r-i;if(a<3)return!1;const l=u.src.slice(i,r),f=u.src.slice(r,o);if(s===96&&f.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let d=e,b=!1;for(;d++,!(d>=t||(r=i=u.bMarks[d]+u.tShift[d],o=u.eMarks[d],r<o&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(r)===s&&!(u.sCount[d]-u.blkIndent>=4)&&(r=u.skipChars(r,s),!(r-i<a)&&(r=u.skipSpaces(r),!(r<o)))){b=!0;break}a=u.sCount[e],u.line=d+(b?1:0);const h=u.push("fence","code",0);return h.info=f,h.content=u.getLines(e+1,d,a,!0),h.markup=l,h.map=[e,u.line],!0}function gr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];const s=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==62)return!1;if(n)return!0;const i=[],a=[],l=[],f=[],d=u.md.block.ruler.getRules("blockquote"),b=u.parentType;u.parentType="blockquote";let h=!1,p;for(p=e;p<t;p++){const C=u.sCount[p]<u.blkIndent;if(r=u.bMarks[p]+u.tShift[p],o=u.eMarks[p],r>=o)break;if(u.src.charCodeAt(r++)===62&&!C){let _=u.sCount[p]+1,x,w;u.src.charCodeAt(r)===32?(r++,_++,w=!1,x=!0):u.src.charCodeAt(r)===9?(x=!0,(u.bsCount[p]+_)%4===3?(r++,_++,w=!1):w=!0):x=!1;let D=_;for(i.push(u.bMarks[p]),u.bMarks[p]=r;r<o;){const z=u.src.charCodeAt(r);if(S(z))z===9?D+=4-(D+u.bsCount[p]+(w?1:0))%4:D++;else break;r++}h=r>=o,a.push(u.bsCount[p]),u.bsCount[p]=u.sCount[p]+1+(x?1:0),l.push(u.sCount[p]),u.sCount[p]=D-_,f.push(u.tShift[p]),u.tShift[p]=r-u.bMarks[p];continue}if(h)break;let m=!1;for(let _=0,x=d.length;_<x;_++)if(d[_](u,p,t,!0)){m=!0;break}if(m){u.lineMax=p,u.blkIndent!==0&&(i.push(u.bMarks[p]),a.push(u.bsCount[p]),f.push(u.tShift[p]),l.push(u.sCount[p]),u.sCount[p]-=u.blkIndent);break}i.push(u.bMarks[p]),a.push(u.bsCount[p]),f.push(u.tShift[p]),l.push(u.sCount[p]),u.sCount[p]=-1}const g=u.blkIndent;u.blkIndent=0;const y=u.push("blockquote_open","blockquote",1);y.markup=">";const E=[e,0];y.map=E,u.md.block.tokenize(u,e,p);const k=u.push("blockquote_close","blockquote",-1);k.markup=">",u.lineMax=s,u.parentType=b,E[1]=u.line;for(let C=0;C<f.length;C++)u.bMarks[C+e]=i[C],u.tShift[C+e]=f[C],u.sCount[C+e]=l[C],u.bsCount[C+e]=a[C];return u.blkIndent=g,!0}function _r(u,e,t,n){const r=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let o=u.bMarks[e]+u.tShift[e];const s=u.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let i=1;for(;o<r;){const l=u.src.charCodeAt(o++);if(l!==s&&!S(l))return!1;l===s&&i++}if(i<3)return!1;if(n)return!0;u.line=e+1;const a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(i+1).join(String.fromCharCode(s)),!0}function tt(u,e){const t=u.eMarks[e];let n=u.bMarks[e]+u.tShift[e];const r=u.src.charCodeAt(n++);if(r!==42&&r!==45&&r!==43)return-1;if(n<t){const o=u.src.charCodeAt(n);if(!S(o))return-1}return n}function nt(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];let r=t;if(r+1>=n)return-1;let o=u.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=n)return-1;if(o=u.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<n&&(o=u.src.charCodeAt(r),!S(o))?-1:r}function kr(u,e){const t=u.level+2;for(let n=e+2,r=u.tokens.length-2;n<r;n++)u.tokens[n].level===t&&u.tokens[n].type==="paragraph_open"&&(u.tokens[n+2].hidden=!0,u.tokens[n].hidden=!0,n+=2)}function yr(u,e,t,n){let r,o,s,i,a=e,l=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let f=!1;n&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(f=!0);let d,b,h;if((h=nt(u,a))>=0){if(d=!0,s=u.bMarks[a]+u.tShift[a],b=Number(u.src.slice(s,h-1)),f&&b!==1)return!1}else if((h=tt(u,a))>=0)d=!1;else return!1;if(f&&u.skipSpaces(h)>=u.eMarks[a])return!1;if(n)return!0;const p=u.src.charCodeAt(h-1),g=u.tokens.length;d?(i=u.push("ordered_list_open","ol",1),b!==1&&(i.attrs=[["start",b]])):i=u.push("bullet_list_open","ul",1);const y=[a,0];i.map=y,i.markup=String.fromCharCode(p);let E=!1;const k=u.md.block.ruler.getRules("list"),C=u.parentType;for(u.parentType="list";a<t;){o=h,r=u.eMarks[a];const m=u.sCount[a]+h-(u.bMarks[a]+u.tShift[a]);let _=m;for(;o<r;){const j=u.src.charCodeAt(o);if(j===9)_+=4-(_+u.bsCount[a])%4;else if(j===32)_++;else break;o++}const x=o;let w;x>=r?w=1:w=_-m,w>4&&(w=1);const D=m+w;i=u.push("list_item_open","li",1),i.markup=String.fromCharCode(p);const z=[a,0];i.map=z,d&&(i.info=u.src.slice(s,h-1));const A=u.tight,q=u.tShift[a],ou=u.sCount[a],ku=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=D,u.tight=!0,u.tShift[a]=x-u.bMarks[a],u.sCount[a]=_,x>=r&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,t):u.md.block.tokenize(u,a,t,!0),(!u.tight||E)&&(l=!1),E=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=ku,u.tShift[a]=q,u.sCount[a]=ou,u.tight=A,i=u.push("list_item_close","li",-1),i.markup=String.fromCharCode(p),a=u.line,z[1]=a,a>=t||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let P=!1;for(let j=0,B=k.length;j<B;j++)if(k[j](u,a,t,!0)){P=!0;break}if(P)break;if(d){if(h=nt(u,a),h<0)break;s=u.bMarks[a]+u.tShift[a]}else if(h=tt(u,a),h<0)break;if(p!==u.src.charCodeAt(h-1))break}return d?i=u.push("ordered_list_close","ol",-1):i=u.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(p),y[1]=a,u.line=a,u.parentType=C,l&&kr(u,g),!0}function Cr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e],s=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==91)return!1;function i(k){const C=u.lineMax;if(k>=C||u.isEmpty(k))return null;let m=!1;if(u.sCount[k]-u.blkIndent>3&&(m=!0),u.sCount[k]<0&&(m=!0),!m){const w=u.md.block.ruler.getRules("reference"),D=u.parentType;u.parentType="reference";let z=!1;for(let A=0,q=w.length;A<q;A++)if(w[A](u,k,C,!0)){z=!0;break}if(u.parentType=D,z)return null}const _=u.bMarks[k]+u.tShift[k],x=u.eMarks[k];return u.src.slice(_,x+1)}let a=u.src.slice(r,o+1);o=a.length;let l=-1;for(r=1;r<o;r++){const k=a.charCodeAt(r);if(k===91)return!1;if(k===93){l=r;break}else if(k===10){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}else if(k===92&&(r++,r<o&&a.charCodeAt(r)===10)){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}}if(l<0||a.charCodeAt(l+1)!==58)return!1;for(r=l+2;r<o;r++){const k=a.charCodeAt(r);if(k===10){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}else if(!S(k))break}const f=u.md.helpers.parseLinkDestination(a,r,o);if(!f.ok)return!1;const d=u.md.normalizeLink(f.str);if(!u.md.validateLink(d))return!1;r=f.pos;const b=r,h=s,p=r;for(;r<o;r++){const k=a.charCodeAt(r);if(k===10){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}else if(!S(k))break}let g=u.md.helpers.parseLinkTitle(a,r,o);for(;g.can_continue;){const k=i(s);if(k===null)break;a+=k,r=o,o=a.length,s++,g=u.md.helpers.parseLinkTitle(a,r,o,g)}let y;for(r<o&&p!==r&&g.ok?(y=g.str,r=g.pos):(y="",r=b,s=h);r<o;){const k=a.charCodeAt(r);if(!S(k))break;r++}if(r<o&&a.charCodeAt(r)!==10&&y)for(y="",r=b,s=h;r<o;){const k=a.charCodeAt(r);if(!S(k))break;r++}if(r<o&&a.charCodeAt(r)!==10)return!1;const E=Iu(a.slice(1,l));return E?(n||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[E]>"u"&&(u.env.references[E]={title:y,href:d}),u.line=s),!0):!1}const Er=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wr="[a-zA-Z_:][a-zA-Z0-9:._-]*",Dr="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",rt="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+wr+"(?:\\s*=\\s*"+Dr+")?)")+"*\\s*\\/?>",ot="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ar="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Fr="<[?][\\s\\S]*?[?]>",Br="<![A-Za-z][^>]*>",Sr="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",zr=new RegExp("^(?:"+rt+"|"+ot+"|"+Ar+"|"+Fr+"|"+Br+"|"+Sr+")"),qr=new RegExp("^(?:"+rt+"|"+ot+")"),pu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Er.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(qr.source+"\\s*$"),/^$/,!1]];function Mr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(r)!==60)return!1;let s=u.src.slice(r,o),i=0;for(;i<pu.length&&!pu[i][0].test(s);i++);if(i===pu.length)return!1;if(n)return pu[i][2];let a=e+1;if(!pu[i][1].test(s)){for(;a<t&&!(u.sCount[a]<u.blkIndent);a++)if(r=u.bMarks[a]+u.tShift[a],o=u.eMarks[a],s=u.src.slice(r,o),pu[i][1].test(s)){s.length!==0&&a++;break}}u.line=a;const l=u.push("html_block","",0);return l.map=[e,a],l.content=u.getLines(e,a,u.blkIndent,!0),!0}function Tr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let s=u.src.charCodeAt(r);if(s!==35||r>=o)return!1;let i=1;for(s=u.src.charCodeAt(++r);s===35&&r<o&&i<=6;)i++,s=u.src.charCodeAt(++r);if(i>6||r<o&&!S(s))return!1;if(n)return!0;o=u.skipSpacesBack(o,r);const a=u.skipCharsBack(o,35,r);a>r&&S(u.src.charCodeAt(a-1))&&(o=a),u.line=e+1;const l=u.push("heading_open","h"+String(i),1);l.markup="########".slice(0,i),l.map=[e,u.line];const f=u.push("inline","",0);f.content=u.src.slice(r,o).trim(),f.map=[e,u.line],f.children=[];const d=u.push("heading_close","h"+String(i),-1);return d.markup="########".slice(0,i),!0}function Rr(u,e,t){const n=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;const r=u.parentType;u.parentType="paragraph";let o=0,s,i=e+1;for(;i<t&&!u.isEmpty(i);i++){if(u.sCount[i]-u.blkIndent>3)continue;if(u.sCount[i]>=u.blkIndent){let h=u.bMarks[i]+u.tShift[i];const p=u.eMarks[i];if(h<p&&(s=u.src.charCodeAt(h),(s===45||s===61)&&(h=u.skipChars(h,s),h=u.skipSpaces(h),h>=p))){o=s===61?1:2;break}}if(u.sCount[i]<0)continue;let b=!1;for(let h=0,p=n.length;h<p;h++)if(n[h](u,i,t,!0)){b=!0;break}if(b)break}if(!o)return!1;const a=u.getLines(e,i,u.blkIndent,!1).trim();u.line=i+1;const l=u.push("heading_open","h"+String(o),1);l.markup=String.fromCharCode(s),l.map=[e,u.line];const f=u.push("inline","",0);f.content=a,f.map=[e,u.line-1],f.children=[];const d=u.push("heading_close","h"+String(o),-1);return d.markup=String.fromCharCode(s),u.parentType=r,!0}function Lr(u,e,t){const n=u.md.block.ruler.getRules("paragraph"),r=u.parentType;let o=e+1;for(u.parentType="paragraph";o<t&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3||u.sCount[o]<0)continue;let l=!1;for(let f=0,d=n.length;f<d;f++)if(n[f](u,o,t,!0)){l=!0;break}if(l)break}const s=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o;const i=u.push("paragraph_open","p",1);i.map=[e,u.line];const a=u.push("inline","",0);return a.content=s,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=r,!0}const $u=[["table",br,["paragraph","reference"]],["code",mr],["fence",xr,["paragraph","reference","blockquote","list"]],["blockquote",gr,["paragraph","reference","blockquote","list"]],["hr",_r,["paragraph","reference","blockquote","list"]],["list",yr,["paragraph","reference","blockquote"]],["reference",Cr],["html_block",Mr,["paragraph","reference","blockquote"]],["heading",Tr,["paragraph","reference","blockquote"]],["lheading",Rr],["paragraph",Lr]];function Ou(){this.ruler=new N;for(let u=0;u<$u.length;u++)this.ruler.push($u[u][0],$u[u][1],{alt:($u[u][2]||[]).slice()})}Ou.prototype.tokenize=function(u,e,t){const n=this.ruler.getRules(""),r=n.length,o=u.md.options.maxNesting;let s=e,i=!1;for(;s<t&&(u.line=s=u.skipEmptyLines(s),!(s>=t||u.sCount[s]<u.blkIndent));){if(u.level>=o){u.line=t;break}const a=u.line;let l=!1;for(let f=0;f<r;f++)if(l=n[f](u,s,t,!1),l){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");u.tight=!i,u.isEmpty(u.line-1)&&(i=!0),s=u.line,s<t&&u.isEmpty(s)&&(i=!0,s++,u.line=s)}},Ou.prototype.parse=function(u,e,t,n){if(!u)return;const r=new this.State(u,e,t,n);this.tokenize(r,r.line,r.lineMax)},Ou.prototype.State=W;function Du(u,e,t,n){this.src=u,this.env=t,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Du.prototype.pushPending=function(){const u=new v("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u},Du.prototype.push=function(u,e,t){this.pending&&this.pushPending();const n=new v(u,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(r),n},Du.prototype.scanDelims=function(u,e){const t=this.posMax,n=this.src.charCodeAt(u),r=u>0?this.src.charCodeAt(u-1):32;let o=u;for(;o<t&&this.src.charCodeAt(o)===n;)o++;const s=o-u,i=o<t?this.src.charCodeAt(o):32,a=wu(r)||Eu(String.fromCharCode(r)),l=wu(i)||Eu(String.fromCharCode(i)),f=Cu(r),d=Cu(i),b=!d&&(!l||f||a),h=!f&&(!a||d||l);return{can_open:b&&(e||!h||a),can_close:h&&(e||!b||l),length:s}},Du.prototype.Token=v;function Ir(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Nr(u,e){let t=u.pos;for(;t<u.posMax&&!Ir(u.src.charCodeAt(t));)t++;return t===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,t)),u.pos=t,!0)}const $r=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Or(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;const t=u.pos,n=u.posMax;if(t+3>n||u.src.charCodeAt(t)!==58||u.src.charCodeAt(t+1)!==47||u.src.charCodeAt(t+2)!==47)return!1;const r=u.pending.match($r);if(!r)return!1;const o=r[1],s=u.md.linkify.matchAtStart(u.src.slice(t-o.length));if(!s)return!1;let i=s.url;if(i.length<=o.length)return!1;i=i.replace(/\*+$/,"");const a=u.md.normalizeLink(i);if(!u.md.validateLink(a))return!1;if(!e){u.pending=u.pending.slice(0,-o.length);const l=u.push("link_open","a",1);l.attrs=[["href",a]],l.markup="linkify",l.info="auto";const f=u.push("text","",0);f.content=u.md.normalizeLinkText(i);const d=u.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return u.pos+=i.length-o.length,!0}function Pr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==10)return!1;const n=u.pending.length-1,r=u.posMax;if(!e)if(n>=0&&u.pending.charCodeAt(n)===32)if(n>=1&&u.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&u.pending.charCodeAt(o-1)===32;)o--;u.pending=u.pending.slice(0,o),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(t++;t<r&&S(u.src.charCodeAt(t));)t++;return u.pos=t,!0}const ae=[];for(let u=0;u<256;u++)ae.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){ae[u.charCodeAt(0)]=1});function vr(u,e){let t=u.pos;const n=u.posMax;if(u.src.charCodeAt(t)!==92||(t++,t>=n))return!1;let r=u.src.charCodeAt(t);if(r===10){for(e||u.push("hardbreak","br",0),t++;t<n&&(r=u.src.charCodeAt(t),!!S(r));)t++;return u.pos=t,!0}let o=u.src[t];if(r>=55296&&r<=56319&&t+1<n){const i=u.src.charCodeAt(t+1);i>=56320&&i<=57343&&(o+=u.src[t+1],t++)}const s="\\"+o;if(!e){const i=u.push("text_special","",0);r<256&&ae[r]!==0?i.content=o:i.content=s,i.markup=s,i.info="escape"}return u.pos=t+1,!0}function Vr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=u.posMax;for(;t<o&&u.src.charCodeAt(t)===96;)t++;const s=u.src.slice(r,t),i=s.length;if(u.backticksScanned&&(u.backticks[i]||0)<=r)return e||(u.pending+=s),u.pos+=i,!0;let a=t,l;for(;(l=u.src.indexOf("`",a))!==-1;){for(a=l+1;a<o&&u.src.charCodeAt(a)===96;)a++;const f=a-l;if(f===i){if(!e){const d=u.push("code_inline","code",0);d.markup=s,d.content=u.src.slice(t,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[f]=l}return u.backticksScanned=!0,e||(u.pending+=s),u.pos+=i,!0}function jr(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==126)return!1;const r=u.scanDelims(u.pos,!0);let o=r.length;const s=String.fromCharCode(n);if(o<2)return!1;let i;o%2&&(i=u.push("text","",0),i.content=s,o--);for(let a=0;a<o;a+=2)i=u.push("text","",0),i.content=s+s,u.delimiters.push({marker:n,length:0,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return u.pos+=r.length,!0}function ct(u,e){let t;const n=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];if(s.marker!==126||s.end===-1)continue;const i=e[s.end];t=u.tokens[s.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=u.tokens[i.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",u.tokens[i.token-1].type==="text"&&u.tokens[i.token-1].content==="~"&&n.push(i.token-1)}for(;n.length;){const o=n.pop();let s=o+1;for(;s<u.tokens.length&&u.tokens[s].type==="s_close";)s++;s--,o!==s&&(t=u.tokens[s],u.tokens[s]=u.tokens[o],u.tokens[o]=t)}}function Hr(u){const e=u.tokens_meta,t=u.tokens_meta.length;ct(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&ct(u,e[n].delimiters)}const it={tokenize:jr,postProcess:Hr};function Ur(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==95&&n!==42)return!1;const r=u.scanDelims(u.pos,n===42);for(let o=0;o<r.length;o++){const s=u.push("text","",0);s.content=String.fromCharCode(n),u.delimiters.push({marker:n,length:r.length,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return u.pos+=r.length,!0}function st(u,e){const t=e.length;for(let n=t-1;n>=0;n--){const r=e[n];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],s=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),a=u.tokens[r.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?i+i:i,a.content="";const l=u.tokens[o.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?i+i:i,l.content="",s&&(u.tokens[e[n-1].token].content="",u.tokens[e[r.end+1].token].content="",n--)}}function Zr(u){const e=u.tokens_meta,t=u.tokens_meta.length;st(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&st(u,e[n].delimiters)}const at={tokenize:Ur,postProcess:Zr};function Wr(u,e){let t,n,r,o,s="",i="",a=u.pos,l=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;const f=u.pos,d=u.posMax,b=u.pos+1,h=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(h<0)return!1;let p=h+1;if(p<d&&u.src.charCodeAt(p)===40){for(l=!1,p++;p<d&&(t=u.src.charCodeAt(p),!(!S(t)&&t!==10));p++);if(p>=d)return!1;if(a=p,r=u.md.helpers.parseLinkDestination(u.src,p,u.posMax),r.ok){for(s=u.md.normalizeLink(r.str),u.md.validateLink(s)?p=r.pos:s="",a=p;p<d&&(t=u.src.charCodeAt(p),!(!S(t)&&t!==10));p++);if(r=u.md.helpers.parseLinkTitle(u.src,p,u.posMax),p<d&&a!==p&&r.ok)for(i=r.str,p=r.pos;p<d&&(t=u.src.charCodeAt(p),!(!S(t)&&t!==10));p++);}(p>=d||u.src.charCodeAt(p)!==41)&&(l=!0),p++}if(l){if(typeof u.env.references>"u")return!1;if(p<d&&u.src.charCodeAt(p)===91?(a=p+1,p=u.md.helpers.parseLinkLabel(u,p),p>=0?n=u.src.slice(a,p++):p=h+1):p=h+1,n||(n=u.src.slice(b,h)),o=u.env.references[Iu(n)],!o)return u.pos=f,!1;s=o.href,i=o.title}if(!e){u.pos=b,u.posMax=h;const g=u.push("link_open","a",1),y=[["href",s]];g.attrs=y,i&&y.push(["title",i]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=p,u.posMax=d,!0}function Gr(u,e){let t,n,r,o,s,i,a,l,f="";const d=u.pos,b=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;const h=u.pos+2,p=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(p<0)return!1;if(o=p+1,o<b&&u.src.charCodeAt(o)===40){for(o++;o<b&&(t=u.src.charCodeAt(o),!(!S(t)&&t!==10));o++);if(o>=b)return!1;for(l=o,i=u.md.helpers.parseLinkDestination(u.src,o,u.posMax),i.ok&&(f=u.md.normalizeLink(i.str),u.md.validateLink(f)?o=i.pos:f=""),l=o;o<b&&(t=u.src.charCodeAt(o),!(!S(t)&&t!==10));o++);if(i=u.md.helpers.parseLinkTitle(u.src,o,u.posMax),o<b&&l!==o&&i.ok)for(a=i.str,o=i.pos;o<b&&(t=u.src.charCodeAt(o),!(!S(t)&&t!==10));o++);else a="";if(o>=b||u.src.charCodeAt(o)!==41)return u.pos=d,!1;o++}else{if(typeof u.env.references>"u")return!1;if(o<b&&u.src.charCodeAt(o)===91?(l=o+1,o=u.md.helpers.parseLinkLabel(u,o),o>=0?r=u.src.slice(l,o++):o=p+1):o=p+1,r||(r=u.src.slice(h,p)),s=u.env.references[Iu(r)],!s)return u.pos=d,!1;f=s.href,a=s.title}if(!e){n=u.src.slice(h,p);const g=[];u.md.inline.parse(n,u.md,u.env,g);const y=u.push("image","img",0),E=[["src",f],["alt",""]];y.attrs=E,y.children=g,y.content=n,a&&E.push(["title",a])}return u.pos=o,u.posMax=b,!0}const Jr=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Xr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Qr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==60)return!1;const n=u.pos,r=u.posMax;for(;;){if(++t>=r)return!1;const s=u.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}const o=u.src.slice(n+1,t);if(Xr.test(o)){const s=u.md.normalizeLink(o);if(!u.md.validateLink(s))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}if(Jr.test(o)){const s=u.md.normalizeLink("mailto:"+o);if(!u.md.validateLink(s))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}return!1}function Yr(u){return/^<a[>\s]/i.test(u)}function Kr(u){return/^<\/a\s*>/i.test(u)}function uo(u){const e=u|32;return e>=97&&e<=122}function eo(u,e){if(!u.md.options.html)return!1;const t=u.posMax,n=u.pos;if(u.src.charCodeAt(n)!==60||n+2>=t)return!1;const r=u.src.charCodeAt(n+1);if(r!==33&&r!==63&&r!==47&&!uo(r))return!1;const o=u.src.slice(n).match(zr);if(!o)return!1;if(!e){const s=u.push("html_inline","",0);s.content=o[0],Yr(s.content)&&u.linkLevel++,Kr(s.content)&&u.linkLevel--}return u.pos+=o[0].length,!0}const to=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,no=/^&([a-z][a-z0-9]{1,31});/i;function ro(u,e){const t=u.pos,n=u.posMax;if(u.src.charCodeAt(t)!==38||t+1>=n)return!1;if(u.src.charCodeAt(t+1)===35){const o=u.src.slice(t).match(to);if(o){if(!e){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),i=u.push("text_special","",0);i.content=oe(s)?Lu(s):Lu(65533),i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}else{const o=u.src.slice(t).match(no);if(o){const s=Ge(o[0]);if(s!==o[0]){if(!e){const i=u.push("text_special","",0);i.content=s,i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}}return!1}function lt(u){const e={},t=u.length;if(!t)return;let n=0,r=-2;const o=[];for(let s=0;s<t;s++){const i=u[s];if(o.push(0),(u[n].marker!==i.marker||r!==i.token-1)&&(n=s),r=i.token,i.length=i.length||0,!i.close)continue;e.hasOwnProperty(i.marker)||(e[i.marker]=[-1,-1,-1,-1,-1,-1]);const a=e[i.marker][(i.open?3:0)+i.length%3];let l=n-o[n]-1,f=l;for(;l>a;l-=o[l]+1){const d=u[l];if(d.marker===i.marker&&d.open&&d.end<0){let b=!1;if((d.close||i.open)&&(d.length+i.length)%3===0&&(d.length%3!==0||i.length%3!==0)&&(b=!0),!b){const h=l>0&&!u[l-1].open?o[l-1]+1:0;o[s]=s-l+h,o[l]=h,i.open=!1,d.end=s,d.close=!1,f=-1,r=-2;break}}}f!==-1&&(e[i.marker][(i.open?3:0)+(i.length||0)%3]=f)}}function oo(u){const e=u.tokens_meta,t=u.tokens_meta.length;lt(u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&lt(e[n].delimiters)}function co(u){let e,t,n=0;const r=u.tokens,o=u.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&n--,r[e].level=n,r[e].nesting>0&&n++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const le=[["text",Nr],["linkify",Or],["newline",Pr],["escape",vr],["backticks",Vr],["strikethrough",it.tokenize],["emphasis",at.tokenize],["link",Wr],["image",Gr],["autolink",Qr],["html_inline",eo],["entity",ro]],fe=[["balance_pairs",oo],["strikethrough",it.postProcess],["emphasis",at.postProcess],["fragments_join",co]];function Au(){this.ruler=new N;for(let u=0;u<le.length;u++)this.ruler.push(le[u][0],le[u][1]);this.ruler2=new N;for(let u=0;u<fe.length;u++)this.ruler2.push(fe[u][0],fe[u][1])}Au.prototype.skipToken=function(u){const e=u.pos,t=this.ruler.getRules(""),n=t.length,r=u.md.options.maxNesting,o=u.cache;if(typeof o[e]<"u"){u.pos=o[e];return}let s=!1;if(u.level<r){for(let i=0;i<n;i++)if(u.level++,s=t[i](u,!0),u.level--,s){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;s||u.pos++,o[e]=u.pos},Au.prototype.tokenize=function(u){const e=this.ruler.getRules(""),t=e.length,n=u.posMax,r=u.md.options.maxNesting;for(;u.pos<n;){const o=u.pos;let s=!1;if(u.level<r){for(let i=0;i<t;i++)if(s=e[i](u,!1),s){if(o>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(u.pos>=n)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()},Au.prototype.parse=function(u,e,t,n){const r=new this.State(u,e,t,n);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let i=0;i<s;i++)o[i](r)},Au.prototype.State=Du;function io(u){const e={};u=u||{},e.src_Any=je.source,e.src_Cc=He.source,e.src_Z=Ze.source,e.src_P=ee.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function de(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){u[n]=t[n]})}),u}function Pu(u){return Object.prototype.toString.call(u)}function so(u){return Pu(u)==="[object String]"}function ao(u){return Pu(u)==="[object Object]"}function lo(u){return Pu(u)==="[object RegExp]"}function ft(u){return Pu(u)==="[object Function]"}function fo(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const dt={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function po(u){return Object.keys(u||{}).reduce(function(e,t){return e||dt.hasOwnProperty(t)},!1)}const ho={"http:":{validate:function(u,e,t){const n=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){const n=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){const n=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},bo="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",mo="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function xo(u){u.__index__=-1,u.__text_cache__=""}function go(u){return function(e,t){const n=e.slice(t);return u.test(n)?n.match(u)[0].length:0}}function pt(){return function(u,e){e.normalize(u)}}function vu(u){const e=u.re=io(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(bo),t.push(e.src_xn),e.src_tlds=t.join("|");function n(i){return i.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const r=[];u.__compiled__={};function o(i,a){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+a)}Object.keys(u.__schemas__).forEach(function(i){const a=u.__schemas__[i];if(a===null)return;const l={validate:null,link:null};if(u.__compiled__[i]=l,ao(a)){lo(a.validate)?l.validate=go(a.validate):ft(a.validate)?l.validate=a.validate:o(i,a),ft(a.normalize)?l.normalize=a.normalize:a.normalize?o(i,a):l.normalize=pt();return}if(so(a)){r.push(i);return}o(i,a)}),r.forEach(function(i){u.__compiled__[u.__schemas__[i]]&&(u.__compiled__[i].validate=u.__compiled__[u.__schemas__[i]].validate,u.__compiled__[i].normalize=u.__compiled__[u.__schemas__[i]].normalize)}),u.__compiled__[""]={validate:null,normalize:pt()};const s=Object.keys(u.__compiled__).filter(function(i){return i.length>0&&u.__compiled__[i]}).map(fo).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),xo(u)}function _o(u,e){const t=u.__index__,n=u.__last_index__,r=u.__text_cache__.slice(t,n);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=r,this.text=r,this.url=r}function pe(u,e){const t=new _o(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function $(u,e){if(!(this instanceof $))return new $(u,e);e||po(u)&&(e=u,u={}),this.__opts__=de({},dt,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=de({},ho,u),this.__compiled__={},this.__tlds__=mo,this.__tlds_replaced__=!1,this.re={},vu(this)}$.prototype.add=function(e,t){return this.__schemas__[e]=t,vu(this),this},$.prototype.set=function(e){return this.__opts__=de(this.__opts__,e),this},$.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,o,s,i,a,l,f;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(t=a.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],a.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=e.indexOf("@"),f>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=i))),this.__index__>=0},$.prototype.pretest=function(e){return this.re.pretest.test(e)},$.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},$.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(pe(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(pe(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},$.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,pe(this,0)):null},$.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,r,o){return n!==o[r-1]}).reverse(),vu(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,vu(this),this)},$.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},$.prototype.onCompile=function(){};const hu=2147483647,G=36,he=1,Fu=26,ko=38,yo=700,ht=72,bt=128,mt="-",Co=/^xn--/,Eo=/[^\0-\x7F]/,wo=/[\x2E\u3002\uFF0E\uFF61]/g,Do={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},be=G-he,J=Math.floor,me=String.fromCharCode;function nu(u){throw new RangeError(Do[u])}function Ao(u,e){const t=[];let n=u.length;for(;n--;)t[n]=e(u[n]);return t}function xt(u,e){const t=u.split("@");let n="";t.length>1&&(n=t[0]+"@",u=t[1]),u=u.replace(wo,".");const r=u.split("."),o=Ao(r,e).join(".");return n+o}function gt(u){const e=[];let t=0;const n=u.length;for(;t<n;){const r=u.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){const o=u.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const Fo=u=>String.fromCodePoint(...u),Bo=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:G},_t=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},kt=function(u,e,t){let n=0;for(u=t?J(u/yo):u>>1,u+=J(u/e);u>be*Fu>>1;n+=G)u=J(u/be);return J(n+(be+1)*u/(u+ko))},yt=function(u){const e=[],t=u.length;let n=0,r=bt,o=ht,s=u.lastIndexOf(mt);s<0&&(s=0);for(let i=0;i<s;++i)u.charCodeAt(i)>=128&&nu("not-basic"),e.push(u.charCodeAt(i));for(let i=s>0?s+1:0;i<t;){const a=n;for(let f=1,d=G;;d+=G){i>=t&&nu("invalid-input");const b=Bo(u.charCodeAt(i++));b>=G&&nu("invalid-input"),b>J((hu-n)/f)&&nu("overflow"),n+=b*f;const h=d<=o?he:d>=o+Fu?Fu:d-o;if(b<h)break;const p=G-h;f>J(hu/p)&&nu("overflow"),f*=p}const l=e.length+1;o=kt(n-a,l,a==0),J(n/l)>hu-r&&nu("overflow"),r+=J(n/l),n%=l,e.splice(n++,0,r)}return String.fromCodePoint(...e)},Ct=function(u){const e=[];u=gt(u);const t=u.length;let n=bt,r=0,o=ht;for(const a of u)a<128&&e.push(me(a));const s=e.length;let i=s;for(s&&e.push(mt);i<t;){let a=hu;for(const f of u)f>=n&&f<a&&(a=f);const l=i+1;a-n>J((hu-r)/l)&&nu("overflow"),r+=(a-n)*l,n=a;for(const f of u)if(f<n&&++r>hu&&nu("overflow"),f===n){let d=r;for(let b=G;;b+=G){const h=b<=o?he:b>=o+Fu?Fu:b-o;if(d<h)break;const p=d-h,g=G-h;e.push(me(_t(h+p%g,0))),d=J(p/g)}e.push(me(_t(d,0))),o=kt(r,l,i===s),r=0,++i}++r,++n}return e.join("")},Et={version:"2.3.1",ucs2:{decode:gt,encode:Fo},decode:yt,encode:Ct,toASCII:function(u){return xt(u,function(e){return Eo.test(e)?"xn--"+Ct(e):e})},toUnicode:function(u){return xt(u,function(e){return Co.test(e)?yt(e.slice(4).toLowerCase()):e})}},So={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},zo=/^(vbscript|javascript|file|data):/,qo=/^data:image\/(gif|png|jpeg|webp);/;function Mo(u){const e=u.trim().toLowerCase();return zo.test(e)?qo.test(e):!0}const wt=["http:","https:","mailto:"];function To(u){const e=ue(u,!0);if(e.hostname&&(!e.protocol||wt.indexOf(e.protocol)>=0))try{e.hostname=Et.toASCII(e.hostname)}catch{}return yu(Ku(e))}function Ro(u){const e=ue(u,!0);if(e.hostname&&(!e.protocol||wt.indexOf(e.protocol)>=0))try{e.hostname=Et.toUnicode(e.hostname)}catch{}return lu(Ku(e),lu.defaultChars+"%")}function V(u,e){if(!(this instanceof V))return new V(u,e);e||re(u)||(e=u||{},u="default"),this.inline=new Au,this.block=new Ou,this.core=new ie,this.renderer=new du,this.linkify=new $,this.validateLink=Mo,this.normalizeLink=To,this.normalizeLinkText=Ro,this.utils=Hn,this.helpers=Ru({},Gn),this.options={},this.configure(u),e&&this.set(e)}V.prototype.set=function(u){return Ru(this.options,u),this},V.prototype.configure=function(u){const e=this;if(re(u)){const t=u;if(u=So[t],!u)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(t){u.components[t].rules&&e[t].ruler.enableOnly(u.components[t].rules),u.components[t].rules2&&e[t].ruler2.enableOnly(u.components[t].rules2)}),this},V.prototype.enable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},V.prototype.disable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},V.prototype.use=function(u){const e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this},V.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");const t=new this.core.State(u,this,e);return this.core.process(t),t.tokens},V.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)},V.prototype.parseInline=function(u,e){const t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},V.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};function Lo(){function u(r,o){const s=new V({html:!0,typographer:!0});return s.use(nn),o&&o.forEach(i=>s.use(i)),s.parse(r,"")}function e(r){const o=n(r)??[];return c.h("article",{class:"sq-article"},t(o))}function t(r){if(r)return r.map(o=>typeof o=="string"?o:c.h(o.tag,o.attrs,t(o.children)))}function n(r){const o=[],s={children:[]};let i=s;return r.forEach(a=>{var g,y,E,k,C,m,_,x,w,D,z;const{type:l,children:f,content:d,attrs:b,tag:h,hidden:p}=a;switch(l){case"heading_open":case"paragraph_open":case"bullet_list_open":case"ordered_list_open":case"list_item_open":case"table_open":case"thead_open":case"tbody_open":case"tr_open":case"th_open":case"td_open":case"blockquote_open":case"strong_open":case"em_open":case"s_open":case"link_open":{if(p)break;const A={tag:h,children:[],attrs:b?Object.fromEntries(b):{}};if(l==="link_open"){const q=a.attrGet("href")??"",ou=document.location.origin;q!=null&&q.startsWith("http")&&!q.includes(ou)&&(A.attrs.target="_blank",A.attrs.rel="noopener noreferrer",A.attrs.dataOuter="",(g=A.children)==null||g.push({tag:N0}))}if(l==="table_open"){const q={tag:"div",children:[],attrs:{class:"sq-article-table"}};(y=i.children)==null||y.push(q),o.push(i),i=q}(E=i.children)==null||E.push(A),o.push(i),i=A;break}case"heading_close":case"paragraph_close":case"bullet_list_close":case"ordered_list_close":case"list_item_close":case"table_close":case"thead_close":case"tbody_close":case"tr_close":case"th_close":case"td_close":case"blockquote_close":case"strong_close":case"em_close":case"s_close":case"link_close":{if(p)break;i=o.pop();break}case"code_inline":{(k=i.children)==null||k.push({tag:"code",children:[d],attrs:b?Object.fromEntries(b):{}});break}case"inline":{if(f){const A=n(f);(C=i.children)==null||C.push(...A??[])}else(m=i.children)==null||m.push(d);break}case"text":{(_=i.children)==null||_.push(d);break}case"image":{(x=i.children)==null||x.push({tag:h,children:[],attrs:b?Object.fromEntries(b):{}});break}case"hr":{(w=i.children)==null||w.push({tag:h});break}case"input":{(D=i.children)==null||D.push({tag:h,children:[],attrs:b?Object.fromEntries(b):{}});break}case"html_inline":{if(d.startsWith("</"))i=o.pop();else{const A=d.replace("<","").replace(">",""),q={tag:A,children:[]};A==="blur"&&(q.tag="span",q.attrs={"data-blur":""}),(z=i.children)==null||z.push(q),o.push(i),i=q}break}}}),s.children}return{md2tokens:u,tokens2vueh:e}}function Io(){function u(e,t=100){let n;return function(...r){n||(n=setTimeout(()=>{e.apply(this,r),n=void 0},t))}}return{throttle:u}}const{md2tokens:No,tokens2vueh:$o}=Lo(),Oo=c.defineComponent({props:{text:{type:String,required:!0},md:{type:Boolean,default:!0},plugins:{type:Object}},setup(u){return()=>{if(!u.md)return c.h("article",{class:"sq-article",innerHTML:u.text});const e=No(u.text,u.plugins);return $o(e)}}}),Po=["src","alt"],vo=["textContent"],Vo=c.defineComponent({name:"sq-avatar",__name:"avatar",props:{img:{},alt:{},randomColor:{type:Boolean,default:!0},round:{type:Boolean,default:!0},size:{default:"md"}},setup(u){const e=u,t=c.ref(!0),n=c.computed(()=>{const i=[];return e.size!=="md"&&i.push(`sq-avatar--${e.size}`),e.round&&i.push("is-round"),i}),r=c.computed(()=>{if(!e.randomColor)return;const{getRandomColor:i}=en();return{"--avatar-bg-color":i()}}),o=c.computed(()=>e.alt.charAt(0).toUpperCase());function s(){t.value=!1}return(i,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-avatar",n.value]),style:c.normalizeStyle(r.value)},[e.img&&t.value?(c.openBlock(),c.createElementBlock("img",{key:0,src:e.img,alt:e.alt,onError:s},null,40,Po)):(c.openBlock(),c.createElementBlock("span",{key:1,textContent:c.toDisplayString(o.value)},null,8,vo))],6))}}),jo={class:"sq-backtop"},Ho=c.defineComponent({name:"sq-backtop",__name:"backtop",props:{progress:{type:Boolean,default:!0},icon:{default:r0},transition:{default:"sq-rotate-in-left"},visibilityHeight:{default:100},target:{default:"#app"},progressProps:{}},setup(u){const{throttle:e}=Io(),t=e(a),n=new ResizeObserver(l),r=u,o=c.ref(100),s=c.ref(0),i=c.computed(()=>s.value>r.visibilityHeight);c.onMounted(()=>{var b;l(),t(),window.addEventListener("scroll",t);const d=document.querySelector(r.target)??document.body;n.observe(d),(b=window.visualViewport)==null||b.addEventListener("resize",l)}),c.onBeforeUnmount(()=>{var d;window.removeEventListener("scroll",t),n.disconnect(),(d=window.visualViewport)==null||d.removeEventListener("resize",l)});function a(){s.value=window.scrollY}function l(){const d=(document.scrollingElement??document.body).scrollHeight,b=window.innerHeight;o.value=d-b}function f(){window.scrollTo({top:0,behavior:"smooth"})}return(d,b)=>(c.openBlock(),c.createBlock(c.Transition,{name:r.transition},{default:c.withCtx(()=>{var h,p,g;return[c.withDirectives(c.createElementVNode("div",jo,[c.createElementVNode("div",{class:"sq-backtop-wrap",onClick:f},[r.progress?(c.openBlock(),c.createBlock(c.unref(Ut),{key:0,theme:"circle",label:!1,value:s.value,max:o.value,type:(h=r.progressProps)==null?void 0:h.type,stroke:(p=r.progressProps)==null?void 0:p.stroke,color:(g=r.progressProps)==null?void 0:g.color},null,8,["value","max","type","stroke","color"])):c.createCommentVNode("",!0),c.renderSlot(d.$slots,"default",{},()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.icon)))])])],512),[[c.vShow,i.value]])]}),_:3},8,["name"]))}});function Uo(u){const{getOption:e}=Yu(),t=c.inject(Su,void 0),n=c.inject(xe,void 0),r=c.computed(()=>c.unref(n)?void 0:u.text),o=c.computed(()=>{var l,f;return e((l=c.unref(n))==null?void 0:l.size,u.size,(f=c.unref(t))==null?void 0:f.size,"md")}),s=c.computed(()=>{var l;return e((l=c.unref(n))==null?void 0:l.type,u.type)}),i=c.computed(()=>{var l,f;return e((l=c.unref(n))==null?void 0:l.round,u.round,(f=c.unref(t))==null?void 0:f.round)}),a=c.computed(()=>{var l,f;return e((l=c.unref(t))==null?void 0:l.disabled,(f=c.unref(n))==null?void 0:f.disabled,u.disabled)});return{btnTextType:r,btnSize:o,btnType:s,btnRound:i,btnDisabled:a}}function Zo(u){const{getOption:e}=Yu(),t=c.inject(Su,void 0),n=c.inject(Vu,void 0),r=c.computed(()=>{var a;return e(u.size,(a=c.unref(t))==null?void 0:a.size,"md")}),o=c.computed(()=>{var a;return e(u.round,(a=c.unref(t))==null?void 0:a.round)}),s=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.disabled,u.disabled)}),i=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.readonly,u.readonly)});return{inputSize:r,inputRound:o,inputDisabled:s,inputReadonly:i,id:n}}function Wo(u){const{getOption:e}=Yu(),t=c.inject(Su,void 0),n=c.inject(Vu,void 0),r=c.computed(()=>{var a;return e(u.size,(a=c.unref(t))==null?void 0:a.size,"md")}),o=c.computed(()=>{var a;return e(u.round,(a=c.unref(t))==null?void 0:a.round)}),s=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.disabled,u.disabled)}),i=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.readonly,u.readonly)});return{textareaSize:r,textareaRound:o,textareaDisabled:s,textareaReadonly:i,id:n}}const Go=["disabled","form","type"],Bu=c.defineComponent({name:"sq-button",__name:"button",props:{type:{},round:{type:Boolean,default:void 0},text:{type:Boolean},icon:{},loading:{type:Boolean},form:{},bg:{type:Boolean},nativeType:{default:"button"},disabled:{type:Boolean,default:void 0},size:{}},emits:["click"],setup(u,{emit:e}){const t=e,n=u,{btnTextType:r,btnSize:o,btnType:s,btnRound:i,btnDisabled:a}=Uo(n),l=c.computed(()=>{const b=[],h=c.unref(o),p=c.unref(s),g=c.unref(i),y=c.unref(r);return h!=="md"&&b.push(`sq-button--${h}`),p&&b.push(`is-${p}`),g&&b.push("is-round"),y&&b.push("is-text"),y&&n.bg&&b.push("has-bg"),b}),f=c.computed(()=>n.loading?v0:n.icon),d=c.computed(()=>n.loading||c.unref(a));return(b,h)=>(c.openBlock(),c.createElementBlock("button",{class:c.normalizeClass(["sq-button",l.value]),disabled:d.value,form:n.form,type:n.nativeType,onClick:h[0]||(h[0]=p=>t("click",p))},[c.createVNode(c.unref(_u),{size:c.unref(o)==="lg"?"md":c.unref(o)},{default:c.withCtx(()=>[f.value?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(f.value),{key:0})):c.createCommentVNode("",!0),c.renderSlot(b.$slots,"default")]),_:3},8,["size"])],10,Go))}}),Jo={class:"sq-button-group"},Xo=c.defineComponent({name:"sq-button-group",__name:"button-group",props:{size:{default:"md"},type:{},round:{type:Boolean},disabled:{type:Boolean}},setup(u){const e=u;return c.provide(xe,c.ref({size:c.toRef(e,"size"),type:c.toRef(e,"type"),round:c.toRef(e,"round"),disabled:c.toRef(e,"disabled")})),(t,n)=>(c.openBlock(),c.createElementBlock("div",Jo,[c.renderSlot(t.$slots,"default")]))}}),xe=Symbol("button-group-context-keys"),Qo={class:"sq-card"},Yo={key:0,class:"sq-card-header"},Ko=["textContent"],uc={key:1,class:"sq-card-footer"},ec=c.defineComponent({name:"sq-card",__name:"card",props:{title:{},decorative:{type:Boolean,default:!1}},setup(u){const e=c.useSlots(),t=u;return(n,r)=>(c.openBlock(),c.createElementBlock("section",Qo,[t.title||c.unref(e).title?(c.openBlock(),c.createElementBlock("div",Yo,[c.createElementVNode("h2",{class:c.normalizeClass({"has-decorative":t.decorative}),textContent:c.toDisplayString(t.title)},null,10,Ko),c.renderSlot(n.$slots,"title")])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default"),c.unref(e).footer?(c.openBlock(),c.createElementBlock("div",uc,[c.renderSlot(n.$slots,"footer")])):c.createCommentVNode("",!0)]))}}),tc=["textContent","for"],nc={class:"sq-form-item-content"},rc=["textContent"],oc=c.defineComponent({name:"sq-form-item",__name:"form-item",props:{label:{},labelWidth:{},isRequired:{type:Boolean},showLabel:{type:Boolean},type:{},errorMsg:{}},setup(u){const{nextId:e}=un(),t=u,n=c.ref(`sq-id-${e()}`);c.provide(Vu,n);const r=c.computed(()=>{const o=[];return t.isRequired&&o.push("is-required"),o});return(o,s)=>(c.openBlock(),c.createElementBlock("div",{class:"sq-form-item",style:c.normalizeStyle({"--form-label-width":t.labelWidth})},[t.label||t.showLabel?(c.openBlock(),c.createElementBlock("label",{key:0,class:c.normalizeClass(["sq-form-item-label",r.value]),textContent:c.toDisplayString(t.label),for:t.type!=="custom"?n.value:void 0},null,10,tc)):c.createCommentVNode("",!0),c.createElementVNode("div",nc,[c.renderSlot(o.$slots,"default"),c.createVNode(c.Transition,{appear:"",name:"sq-fade"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("span",{class:"sq-form-item-check",textContent:c.toDisplayString(t.errorMsg)},null,8,rc),[[c.vShow,t.errorMsg]])]),_:1})])],4))}}),cc=c.defineComponent({name:"sq-form",__name:"form",props:c.mergeModels({round:{type:Boolean},showStatusIcon:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},labelWidth:{},size:{default:"md"},step:{},showMessage:{type:Boolean,default:!0},hideRequiredAsterisk:{type:Boolean},config:{}},{formData:{required:!0},formDataModifiers:{}}),emits:c.mergeModels(["validate"],["update:formData"]),setup(u,{expose:e,emit:t}){let n={};const r=t,o=u;c.provide(Su,c.ref({size:c.toRef(o,"size"),round:c.toRef(o,"round"),disabled:c.toRef(o,"disabled"),readonly:c.toRef(o,"readonly")}));const s=c.useModel(u,"formData"),i=c.ref({}),a=c.ref([]),l=c.computed(()=>{const m=[];return o.size!=="md"&&m.push(`sq-form--${o.size}`),m}),f=c.computed(()=>{const m=o.step;return m===void 0?o.config:o.config.filter(_=>_.step===void 0?_:Array.isArray(_.step)?_.step.includes(m):_.step===m)});c.onMounted(()=>{n=structuredClone(c.toRaw(s.value))});function d(m){var _;return!o.hideRequiredAsterisk&&((_=m.rule)==null?void 0:_.required)}async function b(m,_,x,w=!0){if(!x)return;const D=x.trigger??"change";if(_&&Array.isArray(D)&&!D.includes(_))return;if(_&&D!==_)return;const z=s.value[m];let A=!1;return x.validateFunc?A=await p(m,z,x,_):typeof z=="string"&&(A=g(m,z,x)),w&&r("validate",m,A,c.toRaw(a.value)),A}function h(m){return i.value[m]?"error":a.value.includes(m)?"success":void 0}async function p(m,_,x,w){const D=await x.validateFunc(_,w);return D===!0?E(m):D===!1?y(m,"字段验证失败"):D?y(m,D):E(m),D===!0||typeof D=="string"&&!D}function g(m,_,x){return x.required&&!_?(y(m,x.requiredText??"字段必填"),!1):x.pattern&&_&&!x.pattern.test(_)?(y(m,x.patternText??"字段验证失败"),!1):(E(m),!0)}function y(m,_){a.value=a.value.filter(x=>x!==m),i.value[m]=_}function E(m){a.value.push(m),delete i.value[m]}function k(){s.value=structuredClone(n),i.value={},a.value=[],r("validate","SQFORM",!1,c.toRaw(a.value))}function C(m=!0){const x=(m?o.config:f.value).filter(w=>w.type!=="custom"&&w.rule&&!a.value.includes(w.binding)).map(w=>{const D=w;return b(D.binding,void 0,D.rule,!1)});return Promise.all(x).then(w=>(r("validate","SQFORM",!w.includes(!1),c.toRaw(a.value)),w))}return e({resetFields:k,validate:C}),(m,_)=>(c.openBlock(),c.createElementBlock("form",{class:c.normalizeClass(["sq-form",l.value]),style:c.normalizeStyle({"--form-label-width":o.labelWidth})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(f.value,(x,w)=>(c.openBlock(),c.createBlock(oc,{class:c.normalizeClass(x.itemClass),type:x.type,key:w,"label-width":x.labelWidth,label:x.label,"show-label":x.showLabel,"is-required":d(x),"error-msg":o.showMessage?i.value[x.binding]:""},{default:c.withCtx(()=>[x.type==="input"?(c.openBlock(),c.createBlock(c.unref(Dt),c.mergeProps({key:0,ref_for:!0},x.props,{name:x.name,"show-status-icon":o.showStatusIcon,status:h(x.binding),value:s.value[x.binding],"onUpdate:value":D=>s.value[x.binding]=D,onChange:D=>b(x.binding,"change",x.rule),onInput:D=>b(x.binding,"input",x.rule),onBlur:D=>b(x.binding,"blur",x.rule)}),null,16,["name","show-status-icon","status","value","onUpdate:value","onChange","onInput","onBlur"])):x.type==="textarea"?(c.openBlock(),c.createBlock(c.unref(Zt),c.mergeProps({key:1,ref_for:!0},x.props,{name:x.name,status:h(x.binding),value:s.value[x.binding],"onUpdate:value":D=>s.value[x.binding]=D,onChange:D=>b(x.binding,"change",x.rule),onInput:D=>b(x.binding,"input",x.rule),onBlur:D=>b(x.binding,"blur",x.rule)}),null,16,["name","status","value","onUpdate:value","onChange","onInput","onBlur"])):c.renderSlot(m.$slots,x.slot,{key:2})]),_:2},1032,["class","type","label-width","label","show-label","is-required","error-msg"]))),128))],6))}}),Su=Symbol("form-context-keys"),Vu=Symbol("form-item-id-keys"),ic={key:0,class:"sq-input-prefix"},sc=["id","disabled","readonly","placeholder","type","maxlength","minlength","autocomplete","name","autofocus","form","inputmode"],ac={class:"sq-input-suffix"},Dt=c.defineComponent({name:"sq-input",__name:"input",props:c.mergeModels({status:{},round:{type:Boolean,default:void 0},showStatusIcon:{type:Boolean},prefixIcon:{},suffixIcon:{},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},clearable:{type:Boolean},placeholder:{},maxlength:{},minlength:{},autocomplete:{default:"off"},name:{},form:{},inputmode:{},autofocus:{type:Boolean},type:{default:"text"},size:{}},{value:{default:""},valueModifiers:{}}),emits:c.mergeModels(["focus","blur","input","change"],["update:value"]),setup(u,{expose:e,emit:t}){const n=c.useSlots(),r=t,o=u,{inputSize:s,inputRound:i,inputDisabled:a,inputReadonly:l,id:f}=Zo(o),d=c.useModel(u,"value"),b=c.ref(!1),h=c.ref(!1),p=c.shallowRef(null),g=c.computed(()=>{const B=[],L=c.unref(s),M=c.unref(i),K=c.unref(a);return L!=="md"&&B.push(`sq-input--${L}`),o.status&&B.push(`is-${o.status}`),M&&B.push("is-round"),K&&B.push("is-disabled"),B}),y=c.computed(()=>c.unref(h)?z0:U0),E=c.computed(()=>c.unref(h)?"text":o.type),k=c.computed(()=>n.prefix||o.prefixIcon),C=c.computed(()=>c.unref(b)&&c.unref(d).length),m=c.computed(()=>c.unref(C)&&o.clearable),_=c.computed(()=>c.unref(C)&&o.type==="password"),x=c.computed(()=>{const B=o.showStatusIcon&&o.status;return n.suffix||B||o.suffixIcon}),w=c.computed(()=>c.unref(_)||c.unref(m)||c.unref(x)),D=c.computed(()=>{if(o.showStatusIcon&&o.status)switch(o.status){case"success":return s0;case"warn":return J0;case"error":return _0}return o.suffixIcon});function z(B){r("focus",B),!c.unref(l)&&(b.value=!0)}function A(B){r("blur",B),!c.unref(l)&&(b.value=!1)}function q(){setTimeout(P)}function ou(){d.value=""}function ku(){h.value=!h.value}function P(){var B;(B=p.value)==null||B.focus()}function j(){var B;b.value=!1,(B=p.value)==null||B.blur()}return e({focus:P,blur:j}),(B,L)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-input",g.value]),onMousedown:q},[k.value?(c.openBlock(),c.createElementBlock("span",ic,[c.renderSlot(B.$slots,"prefix",{},()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(o.prefixIcon)))])])):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":L[0]||(L[0]=M=>d.value=M),id:c.unref(f),class:"sq-input-inner",disabled:c.unref(a),readonly:c.unref(l),placeholder:o.placeholder,type:E.value,maxlength:o.maxlength,minlength:o.minlength,autocomplete:o.autocomplete,name:o.name,autofocus:o.autofocus,form:o.form,inputmode:o.inputmode,ref_key:"inputRef",ref:p,onFocus:z,onBlur:A,onInput:L[1]||(L[1]=M=>r("input",M)),onChange:L[2]||(L[2]=M=>r("change",M))},null,40,sc),[[c.vModelDynamic,d.value]]),c.withDirectives(c.createElementVNode("span",ac,[c.withDirectives((c.openBlock(),c.createBlock(c.resolveDynamicComponent(y.value),{class:"sq-input-suffix-pwd",onMousedown:ku},null,544)),[[c.vShow,_.value]]),c.withDirectives(c.createVNode(c.unref(b0),{class:"sq-input-suffix-clear",onMousedown:ou},null,512),[[c.vShow,m.value]]),c.renderSlot(B.$slots,"suffix",{},()=>[D.value?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(D.value),{key:0,class:c.normalizeClass({"sq-input-suffix-status":o.showStatusIcon})},null,8,["class"])):c.createCommentVNode("",!0)])],512),[[c.vShow,w.value]])],34))}}),lc=["id"],fc=["textContent"],dc=c.defineComponent({name:"sq-message",__name:"message",props:{message:{},type:{default:"info"},offsetTop:{},onDestroy:{},onClose:{},closeAfter:{default:3e3},id:{}},setup(u,{expose:e}){const t=u,n=c.ref(!0),r=c.computed(()=>{switch(t.type){case"primary":case"info":return qe;case"success":return Se;case"warn":return Me;case"error":return ze;default:return}});c.onMounted(()=>{setTimeout(o,t.closeAfter)});function o(){n.value=!1}return e({close:o}),(s,i)=>(c.openBlock(),c.createBlock(c.Transition,{appear:"",name:"sq-zoom-top",onBeforeLeave:t.onClose,onAfterLeave:t.onDestroy},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(["sq-message",`is-${t.type}`]),id:t.id,style:c.normalizeStyle({top:`${t.offsetTop}px`})},[c.createVNode(c.unref(_u),{class:"sq-message-main"},{default:c.withCtx(()=>[t.type&&r.value?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.value),{key:0,class:"sq-message-icon"})):c.createCommentVNode("",!0),c.createElementVNode("div",{class:"sq-message-content",textContent:c.toDisplayString(t.message)},null,8,fc)]),_:1}),i[0]||(i[0]=c.createElementVNode("div",{class:"sq-message-progress"},null,-1))],14,lc),[[c.vShow,n.value]])]),_:1},8,["onBeforeLeave","onAfterLeave"]))}}),{nextZIndex:pc}=Le(),cu=[],hc=["primary","success","info","warn","error"],bc=document.documentElement,mc=getComputedStyle(bc),ge=parseInt(mc.getPropertyValue("--sq-padding-md"));let xc=0;const _e=(u={})=>{const e=`sq-message-${xc++}`;let t=document.querySelector(".sq-message-wrap");t||(t=document.createElement("div"),t.classList.add("sq-message-wrap"),document.body.appendChild(t)),t.style.zIndex=pc().toString();let n=ge;cu.forEach(l=>{var f;n+=(((f=l.vm.el)==null?void 0:f.offsetHeight)||0)+ge});const r={type:"info",...u,offsetTop:n,id:e},o=document.createElement("div"),s=r.onClose;r.onClose=()=>{s==null||s();const l=cu.findIndex(h=>h.vm.component.props.id===a.component.props.id),d=cu.splice(l,1)[0].vm.el.offsetHeight;if(!(cu.length<1))for(let h=l;h<cu.length;h++){const p=cu[h];let g=Number(parseInt(p.vm.el.style.top));g-=d,g-=ge,p.vm.component.props.offsetTop=g}};const i=r.onDestroy;r.onDestroy=()=>{i==null||i(),c.render(null,o)};const a=c.createVNode(dc,r);return c.render(a,o),cu.push({vm:a}),t.appendChild(o.firstElementChild),{close:()=>{var l,f;(f=(l=a.component)==null?void 0:l.exposed)==null||f.close()}}};hc.forEach(u=>{_e[u]=(e={})=>(typeof e=="string"&&(e={message:e}),_e({...e,type:u}))});const gc=_e,_c=c.defineComponent({name:"sq-pagination-prev",__name:"pagination-prev",props:c.mergeModels({disabled:{type:Boolean},size:{}},{current:{required:!0},currentModifiers:{}}),emits:["update:current"],setup(u){const e=u,t=c.useModel(u,"current"),n=r=>{t.value+=r};return(r,o)=>(c.openBlock(),c.createBlock(c.unref(Bu),{icon:c.unref(Xt),size:e.size,disabled:t.value===1||e.disabled,onClick:o[0]||(o[0]=s=>n(-1))},null,8,["icon","size","disabled"]))}}),kc=c.defineComponent({name:"sq-pagination-prev",__name:"pagination-next",props:c.mergeModels({disabled:{type:Boolean},size:{}},{current:{required:!0},currentModifiers:{}}),emits:["update:current"],setup(u){const e=u,t=c.useModel(u,"current"),n=r=>{t.value+=r};return(r,o)=>(c.openBlock(),c.createBlock(c.unref(Bu),{icon:c.unref(u0),size:e.size,disabled:t.value===1||e.disabled,onClick:o[0]||(o[0]=s=>n(1))},null,8,["icon","size","disabled"]))}}),yc={class:"sq-pagination-pager"},Cc=c.defineComponent({__name:"pagination-pager",props:c.mergeModels({disabled:{type:Boolean},size:{},list:{}},{current:{required:!0},currentModifiers:{}}),emits:["update:current"],setup(u){const e=u,t=c.useModel(u,"current"),n=r=>{t.value=r};return(r,o)=>(c.openBlock(),c.createElementBlock("div",yc,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.list,s=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[s?(c.openBlock(),c.createBlock(c.unref(Bu),{key:0,type:t.value===s?"primary":void 0,size:e.size,disabled:e.disabled,onClick:i=>n(s)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s),1)]),_:2},1032,["type","size","disabled","onClick"])):(c.openBlock(),c.createBlock(c.unref(Bu),{key:1,icon:c.unref(A0),size:e.size,disabled:""},null,8,["icon","size"]))],64))),128))]))}}),Ec={class:"sq-pagination"},wc=c.defineComponent({name:"sq-pagination",__name:"pagination",props:c.mergeModels({total:{default:0},disabled:{type:Boolean,default:!1},size:{},layout:{},pagerCount:{default:5}},{current:{default:1},currentModifiers:{},pageSize:{default:10},pageSizeModifiers:{}}),emits:["update:current","update:pageSize"],setup(u){const e=u,t=c.useModel(u,"current"),n=c.useModel(u,"pageSize"),r=c.computed(()=>Math.ceil(e.total/n.value)||1),o=c.computed(()=>{const i=[],a=Math.floor(e.pagerCount/2)-1;let l=t.value-a,f=t.value+a;l<2&&(l=2,f=l+a*2),f>r.value-1&&(f=r.value-1,l=f-a*2);for(let d=1;d<=r.value;d++)d===1||d===r.value||d>=l&&d<=f?i.push(d):(d===l-1||d===f+1)&&i.push(0);return i}),s=c.computed(()=>{const i=e.layout??["prev","pager","next"],a=[];for(const l of i)switch(l){case"prev":a.push(_c);break;case"pager":a.push(Cc);break;case"next":a.push(kc);break}return a});return(i,a)=>(c.openBlock(),c.createElementBlock("div",Ec,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,(l,f)=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(l),{key:f,size:e.size,disabled:e.disabled,list:o.value,current:t.value,"onUpdate:current":a[0]||(a[0]=d=>t.value=d)},null,40,["size","disabled","list","current"]))),128))]))}}),ke=Math.min,bu=Math.max,ju=Math.round,Hu=Math.floor,X=u=>({x:u,y:u}),Dc={left:"right",right:"left",bottom:"top",top:"bottom"},Ac={start:"end",end:"start"};function ye(u,e){return typeof u=="function"?u(e):u}function mu(u){return u.split("-")[0]}function Uu(u){return u.split("-")[1]}function Fc(u){return u==="x"?"y":"x"}function At(u){return u==="y"?"height":"width"}const Bc=new Set(["top","bottom"]);function iu(u){return Bc.has(mu(u))?"y":"x"}function Ft(u){return Fc(iu(u))}function Sc(u,e,t){t===void 0&&(t=!1);const n=Uu(u),r=Ft(u),o=At(r);let s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Zu(s)),[s,Zu(s)]}function zc(u){const e=Zu(u);return[Ce(u),e,Ce(e)]}function Ce(u){return u.replace(/start|end/g,e=>Ac[e])}const Bt=["left","right"],St=["right","left"],qc=["top","bottom"],Mc=["bottom","top"];function Tc(u,e,t){switch(u){case"top":case"bottom":return t?e?St:Bt:e?Bt:St;case"left":case"right":return e?qc:Mc;default:return[]}}function Rc(u,e,t,n){const r=Uu(u);let o=Tc(mu(u),t==="start",n);return r&&(o=o.map(s=>s+"-"+r),e&&(o=o.concat(o.map(Ce)))),o}function Zu(u){return u.replace(/left|right|bottom|top/g,e=>Dc[e])}function Lc(u){return{top:0,right:0,bottom:0,left:0,...u}}function Ic(u){return typeof u!="number"?Lc(u):{top:u,right:u,bottom:u,left:u}}function Wu(u){const{x:e,y:t,width:n,height:r}=u;return{width:n,height:r,top:t,left:e,right:e+n,bottom:t+r,x:e,y:t}}function zt(u,e,t){let{reference:n,floating:r}=u;const o=iu(e),s=Ft(e),i=At(s),a=mu(e),l=o==="y",f=n.x+n.width/2-r.width/2,d=n.y+n.height/2-r.height/2,b=n[i]/2-r[i]/2;let h;switch(a){case"top":h={x:f,y:n.y-r.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-r.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Uu(e)){case"start":h[s]-=b*(t&&l?-1:1);break;case"end":h[s]+=b*(t&&l?-1:1);break}return h}const Nc=async(u,e,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:s}=t,i=o.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:u,floating:e,strategy:r}),{x:f,y:d}=zt(l,n,a),b=n,h={},p=0;for(let g=0;g<i.length;g++){const{name:y,fn:E}=i[g],{x:k,y:C,data:m,reset:_}=await E({x:f,y:d,initialPlacement:n,placement:b,strategy:r,middlewareData:h,rects:l,platform:s,elements:{reference:u,floating:e}});f=k??f,d=C??d,h={...h,[y]:{...h[y],...m}},_&&p<=50&&(p++,typeof _=="object"&&(_.placement&&(b=_.placement),_.rects&&(l=_.rects===!0?await s.getElementRects({reference:u,floating:e,strategy:r}):_.rects),{x:f,y:d}=zt(l,b,a)),g=-1)}return{x:f,y:d,placement:b,strategy:r,middlewareData:h}};async function $c(u,e){var t;e===void 0&&(e={});const{x:n,y:r,platform:o,rects:s,elements:i,strategy:a}=u,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:b=!1,padding:h=0}=ye(e,u),p=Ic(h),y=i[b?d==="floating"?"reference":"floating":d],E=Wu(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(y)))==null||t?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:l,rootBoundary:f,strategy:a})),k=d==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),m=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},_=Wu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:k,offsetParent:C,strategy:a}):k);return{top:(E.top-_.top+p.top)/m.y,bottom:(_.bottom-E.bottom+p.bottom)/m.y,left:(E.left-_.left+p.left)/m.x,right:(_.right-E.right+p.right)/m.x}}const Oc=function(u){return u===void 0&&(u={}),{name:"flip",options:u,async fn(e){var t,n;const{placement:r,middlewareData:o,rects:s,initialPlacement:i,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:b,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=ye(u,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const E=mu(r),k=iu(i),C=mu(i)===i,m=await(a.isRTL==null?void 0:a.isRTL(l.floating)),_=b||(C||!g?[Zu(i)]:zc(i)),x=p!=="none";!b&&x&&_.push(...Rc(i,g,p,m));const w=[i,..._],D=await $c(e,y),z=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&z.push(D[E]),d){const P=Sc(r,s,m);z.push(D[P[0]],D[P[1]])}if(A=[...A,{placement:r,overflows:z}],!z.every(P=>P<=0)){var q,ou;const P=(((q=o.flip)==null?void 0:q.index)||0)+1,j=w[P];if(j&&(!(d==="alignment"?k!==iu(j):!1)||A.every(M=>iu(M.placement)===k?M.overflows[0]>0:!0)))return{data:{index:P,overflows:A},reset:{placement:j}};let B=(ou=A.filter(L=>L.overflows[0]<=0).sort((L,M)=>L.overflows[1]-M.overflows[1])[0])==null?void 0:ou.placement;if(!B)switch(h){case"bestFit":{var ku;const L=(ku=A.filter(M=>{if(x){const K=iu(M.placement);return K===k||K==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(K=>K>0).reduce((K,Ri)=>K+Ri,0)]).sort((M,K)=>M[1]-K[1])[0])==null?void 0:ku[0];L&&(B=L);break}case"initialPlacement":B=i;break}if(r!==B)return{reset:{placement:B}}}return{}}}},Pc=new Set(["left","top"]);async function vc(u,e){const{placement:t,platform:n,elements:r}=u,o=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=mu(t),i=Uu(t),a=iu(t)==="y",l=Pc.has(s)?-1:1,f=o&&a?-1:1,d=ye(e,u);let{mainAxis:b,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof p=="number"&&(h=i==="end"?p*-1:p),a?{x:h*f,y:b*l}:{x:b*l,y:h*f}}const Vc=function(u){return u===void 0&&(u=0),{name:"offset",options:u,async fn(e){var t,n;const{x:r,y:o,placement:s,middlewareData:i}=e,a=await vc(e,u);return s===((t=i.offset)==null?void 0:t.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:r+a.x,y:o+a.y,data:{...a,placement:s}}}}};function Gu(){return typeof window<"u"}function su(u){return Ee(u)?(u.nodeName||"").toLowerCase():"#document"}function O(u){var e;return(u==null||(e=u.ownerDocument)==null?void 0:e.defaultView)||window}function Q(u){var e;return(e=(Ee(u)?u.ownerDocument:u.document)||window.document)==null?void 0:e.documentElement}function Ee(u){return Gu()?u instanceof Node||u instanceof O(u).Node:!1}function H(u){return Gu()?u instanceof Element||u instanceof O(u).Element:!1}function Y(u){return Gu()?u instanceof HTMLElement||u instanceof O(u).HTMLElement:!1}function qt(u){return!Gu()||typeof ShadowRoot>"u"?!1:u instanceof ShadowRoot||u instanceof O(u).ShadowRoot}const jc=new Set(["inline","contents"]);function zu(u){const{overflow:e,overflowX:t,overflowY:n,display:r}=U(u);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!jc.has(r)}const Hc=new Set(["table","td","th"]);function Uc(u){return Hc.has(su(u))}const Zc=[":popover-open",":modal"];function Ju(u){return Zc.some(e=>{try{return u.matches(e)}catch{return!1}})}const Wc=["transform","translate","scale","rotate","perspective"],Gc=["transform","translate","scale","rotate","perspective","filter"],Jc=["paint","layout","strict","content"];function we(u){const e=De(),t=H(u)?U(u):u;return Wc.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||Gc.some(n=>(t.willChange||"").includes(n))||Jc.some(n=>(t.contain||"").includes(n))}function Xc(u){let e=ru(u);for(;Y(e)&&!xu(e);){if(we(e))return e;if(Ju(e))return null;e=ru(e)}return null}function De(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qc=new Set(["html","body","#document"]);function xu(u){return Qc.has(su(u))}function U(u){return O(u).getComputedStyle(u)}function Xu(u){return H(u)?{scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}:{scrollLeft:u.scrollX,scrollTop:u.scrollY}}function ru(u){if(su(u)==="html")return u;const e=u.assignedSlot||u.parentNode||qt(u)&&u.host||Q(u);return qt(e)?e.host:e}function Mt(u){const e=ru(u);return xu(e)?u.ownerDocument?u.ownerDocument.body:u.body:Y(e)&&zu(e)?e:Mt(e)}function qu(u,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Mt(u),o=r===((n=u.ownerDocument)==null?void 0:n.body),s=O(r);if(o){const i=Ae(s);return e.concat(s,s.visualViewport||[],zu(r)?r:[],i&&t?qu(i):[])}return e.concat(r,qu(r,[],t))}function Ae(u){return u.parent&&Object.getPrototypeOf(u.parent)?u.frameElement:null}function Tt(u){const e=U(u);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const r=Y(u),o=r?u.offsetWidth:t,s=r?u.offsetHeight:n,i=ju(t)!==o||ju(n)!==s;return i&&(t=o,n=s),{width:t,height:n,$:i}}function Fe(u){return H(u)?u:u.contextElement}function gu(u){const e=Fe(u);if(!Y(e))return X(1);const t=e.getBoundingClientRect(),{width:n,height:r,$:o}=Tt(e);let s=(o?ju(t.width):t.width)/n,i=(o?ju(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Yc=X(0);function Rt(u){const e=O(u);return!De()||!e.visualViewport?Yc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Kc(u,e,t){return e===void 0&&(e=!1),!t||e&&t!==O(u)?!1:e}function au(u,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=u.getBoundingClientRect(),o=Fe(u);let s=X(1);e&&(n?H(n)&&(s=gu(n)):s=gu(u));const i=Kc(o,t,n)?Rt(o):X(0);let a=(r.left+i.x)/s.x,l=(r.top+i.y)/s.y,f=r.width/s.x,d=r.height/s.y;if(o){const b=O(o),h=n&&H(n)?O(n):n;let p=b,g=Ae(p);for(;g&&n&&h!==p;){const y=gu(g),E=g.getBoundingClientRect(),k=U(g),C=E.left+(g.clientLeft+parseFloat(k.paddingLeft))*y.x,m=E.top+(g.clientTop+parseFloat(k.paddingTop))*y.y;a*=y.x,l*=y.y,f*=y.x,d*=y.y,a+=C,l+=m,p=O(g),g=Ae(p)}}return Wu({width:f,height:d,x:a,y:l})}function Qu(u,e){const t=Xu(u).scrollLeft;return e?e.left+t:au(Q(u)).left+t}function Lt(u,e){const t=u.getBoundingClientRect(),n=t.left+e.scrollLeft-Qu(u,t),r=t.top+e.scrollTop;return{x:n,y:r}}function ui(u){let{elements:e,rect:t,offsetParent:n,strategy:r}=u;const o=r==="fixed",s=Q(n),i=e?Ju(e.floating):!1;if(n===s||i&&o)return t;let a={scrollLeft:0,scrollTop:0},l=X(1);const f=X(0),d=Y(n);if((d||!d&&!o)&&((su(n)!=="body"||zu(s))&&(a=Xu(n)),Y(n))){const h=au(n);l=gu(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const b=s&&!d&&!o?Lt(s,a):X(0);return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-a.scrollLeft*l.x+f.x+b.x,y:t.y*l.y-a.scrollTop*l.y+f.y+b.y}}function ei(u){return Array.from(u.getClientRects())}function ti(u){const e=Q(u),t=Xu(u),n=u.ownerDocument.body,r=bu(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=bu(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Qu(u);const i=-t.scrollTop;return U(n).direction==="rtl"&&(s+=bu(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:s,y:i}}const It=25;function ni(u,e){const t=O(u),n=Q(u),r=t.visualViewport;let o=n.clientWidth,s=n.clientHeight,i=0,a=0;if(r){o=r.width,s=r.height;const f=De();(!f||f&&e==="fixed")&&(i=r.offsetLeft,a=r.offsetTop)}const l=Qu(n);if(l<=0){const f=n.ownerDocument,d=f.body,b=getComputedStyle(d),h=f.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,p=Math.abs(n.clientWidth-d.clientWidth-h);p<=It&&(o-=p)}else l<=It&&(o+=l);return{width:o,height:s,x:i,y:a}}const ri=new Set(["absolute","fixed"]);function oi(u,e){const t=au(u,!0,e==="fixed"),n=t.top+u.clientTop,r=t.left+u.clientLeft,o=Y(u)?gu(u):X(1),s=u.clientWidth*o.x,i=u.clientHeight*o.y,a=r*o.x,l=n*o.y;return{width:s,height:i,x:a,y:l}}function Nt(u,e,t){let n;if(e==="viewport")n=ni(u,t);else if(e==="document")n=ti(Q(u));else if(H(e))n=oi(e,t);else{const r=Rt(u);n={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Wu(n)}function $t(u,e){const t=ru(u);return t===e||!H(t)||xu(t)?!1:U(t).position==="fixed"||$t(t,e)}function ci(u,e){const t=e.get(u);if(t)return t;let n=qu(u,[],!1).filter(i=>H(i)&&su(i)!=="body"),r=null;const o=U(u).position==="fixed";let s=o?ru(u):u;for(;H(s)&&!xu(s);){const i=U(s),a=we(s);!a&&i.position==="fixed"&&(r=null),(o?!a&&!r:!a&&i.position==="static"&&!!r&&ri.has(r.position)||zu(s)&&!a&&$t(u,s))?n=n.filter(f=>f!==s):r=i,s=ru(s)}return e.set(u,n),n}function ii(u){let{element:e,boundary:t,rootBoundary:n,strategy:r}=u;const s=[...t==="clippingAncestors"?Ju(e)?[]:ci(e,this._c):[].concat(t),n],i=s[0],a=s.reduce((l,f)=>{const d=Nt(e,f,r);return l.top=bu(d.top,l.top),l.right=ke(d.right,l.right),l.bottom=ke(d.bottom,l.bottom),l.left=bu(d.left,l.left),l},Nt(e,i,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function si(u){const{width:e,height:t}=Tt(u);return{width:e,height:t}}function ai(u,e,t){const n=Y(e),r=Q(e),o=t==="fixed",s=au(u,!0,o,e);let i={scrollLeft:0,scrollTop:0};const a=X(0);function l(){a.x=Qu(r)}if(n||!n&&!o)if((su(e)!=="body"||zu(r))&&(i=Xu(e)),n){const h=au(e,!0,o,e);a.x=h.x+e.clientLeft,a.y=h.y+e.clientTop}else r&&l();o&&!n&&r&&l();const f=r&&!n&&!o?Lt(r,i):X(0),d=s.left+i.scrollLeft-a.x-f.x,b=s.top+i.scrollTop-a.y-f.y;return{x:d,y:b,width:s.width,height:s.height}}function Be(u){return U(u).position==="static"}function Ot(u,e){if(!Y(u)||U(u).position==="fixed")return null;if(e)return e(u);let t=u.offsetParent;return Q(u)===t&&(t=t.ownerDocument.body),t}function Pt(u,e){const t=O(u);if(Ju(u))return t;if(!Y(u)){let r=ru(u);for(;r&&!xu(r);){if(H(r)&&!Be(r))return r;r=ru(r)}return t}let n=Ot(u,e);for(;n&&Uc(n)&&Be(n);)n=Ot(n,e);return n&&xu(n)&&Be(n)&&!we(n)?t:n||Xc(u)||t}const li=async function(u){const e=this.getOffsetParent||Pt,t=this.getDimensions,n=await t(u.floating);return{reference:ai(u.reference,await e(u.floating),u.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fi(u){return U(u).direction==="rtl"}const di={convertOffsetParentRelativeRectToViewportRelativeRect:ui,getDocumentElement:Q,getClippingRect:ii,getOffsetParent:Pt,getElementRects:li,getClientRects:ei,getDimensions:si,getScale:gu,isElement:H,isRTL:fi};function vt(u,e){return u.x===e.x&&u.y===e.y&&u.width===e.width&&u.height===e.height}function pi(u,e){let t=null,n;const r=Q(u);function o(){var i;clearTimeout(n),(i=t)==null||i.disconnect(),t=null}function s(i,a){i===void 0&&(i=!1),a===void 0&&(a=1),o();const l=u.getBoundingClientRect(),{left:f,top:d,width:b,height:h}=l;if(i||e(),!b||!h)return;const p=Hu(d),g=Hu(r.clientWidth-(f+b)),y=Hu(r.clientHeight-(d+h)),E=Hu(f),C={rootMargin:-p+"px "+-g+"px "+-y+"px "+-E+"px",threshold:bu(0,ke(1,a))||1};let m=!0;function _(x){const w=x[0].intersectionRatio;if(w!==a){if(!m)return s();w?s(!1,w):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!vt(l,u.getBoundingClientRect())&&s(),m=!1}try{t=new IntersectionObserver(_,{...C,root:r.ownerDocument})}catch{t=new IntersectionObserver(_,C)}t.observe(u)}return s(!0),o}function hi(u,e,t,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,l=Fe(u),f=r||o?[...l?qu(l):[],...qu(e)]:[];f.forEach(E=>{r&&E.addEventListener("scroll",t,{passive:!0}),o&&E.addEventListener("resize",t)});const d=l&&i?pi(l,t):null;let b=-1,h=null;s&&(h=new ResizeObserver(E=>{let[k]=E;k&&k.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(e)})),t()}),l&&!a&&h.observe(l),h.observe(e));let p,g=a?au(u):null;a&&y();function y(){const E=au(u);g&&!vt(g,E)&&t(),g=E,p=requestAnimationFrame(y)}return t(),()=>{var E;f.forEach(k=>{r&&k.removeEventListener("scroll",t),o&&k.removeEventListener("resize",t)}),d==null||d(),(E=h)==null||E.disconnect(),h=null,a&&cancelAnimationFrame(p)}}const bi=Vc,mi=Oc,xi=(u,e,t)=>{const n=new Map,r={platform:di,...t},o={...r.platform,_c:n};return Nc(u,e,{...r,platform:o})};function gi(u){return u!=null&&typeof u=="object"&&"$el"in u}function Vt(u){if(gi(u)){const e=u.$el;return Ee(e)&&su(e)==="#comment"?null:e}return u}function Mu(u){return typeof u=="function"?u():c.unref(u)}function jt(u){return typeof window>"u"?1:(u.ownerDocument.defaultView||window).devicePixelRatio||1}function Ht(u,e){const t=jt(u);return Math.round(e*t)/t}function _i(u,e,t){t===void 0&&(t={});const n=t.whileElementsMounted,r=c.computed(()=>{var w;return(w=Mu(t.open))!=null?w:!0}),o=c.computed(()=>Mu(t.middleware)),s=c.computed(()=>{var w;return(w=Mu(t.placement))!=null?w:"bottom"}),i=c.computed(()=>{var w;return(w=Mu(t.strategy))!=null?w:"absolute"}),a=c.computed(()=>{var w;return(w=Mu(t.transform))!=null?w:!0}),l=c.computed(()=>Vt(u.value)),f=c.computed(()=>Vt(e.value)),d=c.ref(0),b=c.ref(0),h=c.ref(i.value),p=c.ref(s.value),g=c.shallowRef({}),y=c.ref(!1),E=c.computed(()=>{const w={position:h.value,left:"0",top:"0"};if(!f.value)return w;const D=Ht(f.value,d.value),z=Ht(f.value,b.value);return a.value?{...w,transform:"translate("+D+"px, "+z+"px)",...jt(f.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:D+"px",top:z+"px"}});let k;function C(){if(l.value==null||f.value==null)return;const w=r.value;xi(l.value,f.value,{middleware:o.value,placement:s.value,strategy:i.value}).then(D=>{d.value=D.x,b.value=D.y,h.value=D.strategy,p.value=D.placement,g.value=D.middlewareData,y.value=w!==!1})}function m(){typeof k=="function"&&(k(),k=void 0)}function _(){if(m(),n===void 0){C();return}if(l.value!=null&&f.value!=null){k=n(l.value,f.value,C);return}}function x(){r.value||(y.value=!1)}return c.watch([o,s,i,r],C,{flush:"sync"}),c.watch([l,f],_,{flush:"sync"}),c.watch(r,x,{flush:"sync"}),c.getCurrentScope()&&c.onScopeDispose(m),{x:c.shallowReadonly(d),y:c.shallowReadonly(b),strategy:c.shallowReadonly(h),placement:c.shallowReadonly(p),middlewareData:c.shallowReadonly(g),isPositioned:c.shallowReadonly(y),floatingStyles:E,update:C}}const ki=c.defineComponent({name:"sq-popover",__name:"popover",props:c.mergeModels({placement:{default:"top"},offset:{default:10},teleported:{type:Boolean,default:!0},trigger:{default:"hover"},showAfter:{default:0},hideAfter:{default:300},disabled:{type:Boolean},transition:{default:"sq-fade"},popoverClass:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(u){const{nextZIndex:e}=Le();let t;const n=u,r=c.useModel(u,"visible"),o=c.ref(0),s=c.shallowRef(null),i=c.shallowRef(null),{floatingStyles:a}=_i(s,i,{placement:n.placement,whileElementsMounted:hi,transform:!1,middleware:[bi(n.offset),mi()]});c.watch(r,g=>{g&&(o.value=e())}),c.onBeforeUnmount(()=>{p(),document.removeEventListener("click",h)});function l(){n.trigger!=="hover"||n.disabled||(p(),t=setTimeout(()=>{b(!1)},n.showAfter))}function f(){n.trigger==="hover"&&(p(),t=setTimeout(()=>{h()},n.hideAfter))}function d(g){n.trigger==="click"&&!n.disabled&&!r.value&&(g.stopPropagation(),b())}function b(g=!0){r.value=!0,g&&document.addEventListener("click",h)}function h(){r.value=!1,document.removeEventListener("click",h)}function p(){t&&(clearTimeout(t),t=void 0)}return(g,y)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("span",{class:c.normalizeClass(["sq-popover-trigger",g.$attrs.class]),style:c.normalizeStyle(g.$attrs.style),ref_key:"triggerRef",ref:s,onMouseenter:l,onMouseleave:f,onClick:d},[c.renderSlot(g.$slots,"reference")],38),(c.openBlock(),c.createBlock(c.Teleport,{to:"body",disabled:!n.teleported},[c.createVNode(c.Transition,{name:n.transition},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(["sq-popover",g.popoverClass]),style:c.normalizeStyle({...c.unref(a),zIndex:o.value}),ref_key:"popverRef",ref:i,onClick:y[0]||(y[0]=c.withModifiers(()=>{},["stop"]))},[c.renderSlot(g.$slots,"default")],6),[[c.vShow,r.value]])]),_:3},8,["name"])],8,["disabled"]))],64))}}),yi={key:0,viewBox:"0 0 100 100",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Ci={key:1,class:"sq-progress-label"},Ei=["textContent"],Ut=c.defineComponent({name:"sq-progress",__name:"progress",props:{value:{},min:{default:0},max:{default:100},stroke:{default:4},color:{},type:{default:"primary"},theme:{default:"line"},label:{type:Boolean,default:!0}},setup(u){const e=new ResizeObserver(l),t=u,n=c.ref(100),r=c.shallowRef(null),o=c.computed(()=>{const f=[];return t.color||f.push(`is-${t.type}`),t.theme!=="line"&&f.push(`is-${t.theme}`),f}),s=c.computed(()=>{const f=t.max-t.min;return(t.value-t.min)*100/f}),i=c.computed(()=>`${Math.round(s.value*10)/10} %`),a=c.computed(()=>{const f={};if(f["--progress-stroke"]=`${t.stroke}px`,t.theme==="line")f["--progress-value"]=`${s.value}%`;else if(r.value){const d=100/n.value*t.stroke,b=(100-d)/2,h=Math.PI*b*2,p=s.value/100;f["--progress-circle-r"]=`${b}px`,f["--progress-circle-l"]=`${h}px`,f["--progress-circle-stroke"]=`${d}px`,f["--progress-value"]=`${h*p}`,s.value===0&&(f["--progress-circle-opaciry"]="0")}if(t.color){const b=typeof t.color=="string"?t.color:t.color(s.value);f["--progress-color"]=b}return f});c.onMounted(()=>{e.observe(r.value)}),c.onBeforeUnmount(()=>{e.disconnect()});function l(){n.value=r.value.getBoundingClientRect().width}return(f,d)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-progress",o.value]),ref_key:"progressRef",ref:r,style:c.normalizeStyle(a.value)},[t.theme==="circle"?(c.openBlock(),c.createElementBlock("svg",yi,[...d[0]||(d[0]=[c.createElementVNode("circle",{class:"sq-progress-track",cx:"50",cy:"50"},null,-1),c.createElementVNode("circle",{class:"sq-progress-path",cx:"50",cy:"50"},null,-1)])])):c.createCommentVNode("",!0),t.theme==="circle"&&t.label?(c.openBlock(),c.createElementBlock("div",Ci,[c.renderSlot(f.$slots,"default",{percentage:s.value},()=>[c.createElementVNode("span",{textContent:c.toDisplayString(i.value)},null,8,Ei)])])):c.createCommentVNode("",!0)],6))}}),wi=c.defineComponent({name:"sq-tag",__name:"tag",props:{type:{},theme:{default:"plain"},round:{type:Boolean},size:{default:"md"}},setup(u){const e=u,t=c.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-tag--${e.size}`),e.theme!=="plain"&&e.type&&r.push(`is-${e.theme}`),e.type&&r.push(`is-${e.type}`),e.round&&r.push("is-round"),r}),n=c.computed(()=>e.size==="lg"?"md":"sm");return(r,o)=>(c.openBlock(),c.createBlock(c.unref(_u),{class:c.normalizeClass(["sq-tag",t.value]),size:n.value},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["class","size"]))}}),Di=c.defineComponent({name:"sq-check-tag",__name:"check-tag",props:{checked:{type:Boolean,default:!1},theme:{default:"plain"},type:{default:"primary"},round:{type:Boolean},size:{default:"md"}},emits:["change"],setup(u,{emit:e}){const t=e,n=u,r=c.computed(()=>{const s=[];return n.size!=="md"&&s.push(`sq-tag--${n.size}`),n.theme!=="plain"&&s.push(`is-${n.theme}`),n.type&&s.push(`is-${n.type}`),n.round&&s.push("is-round"),n.checked&&s.push("is-checked"),s}),o=c.computed(()=>n.size==="lg"?"md":"sm");return(s,i)=>(c.openBlock(),c.createBlock(c.unref(_u),{class:c.normalizeClass(["sq-check-tag",r.value]),size:o.value,onClick:i[0]||(i[0]=a=>t("change",!n.checked))},{default:c.withCtx(()=>[c.renderSlot(s.$slots,"default")]),_:3},8,["class","size"]))}}),_u=c.defineComponent({name:"sq-text",__name:"text",props:{rowNum:{default:1},ellipsis:{type:Boolean,default:!1},size:{default:"md"}},setup(u){const e=u,t=c.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-text--${e.size}`),e.ellipsis&&r.push(e.rowNum>1?"multi-line":"single-line"),r}),n=c.computed(()=>e.ellipsis?`--row-num: ${e.rowNum}`:"");return(r,o)=>(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(["sq-text",t.value]),style:c.normalizeStyle(n.value)},[c.renderSlot(r.$slots,"default")],6))}}),Ai=["id","rows","cols","disabled","readonly","placeholder","maxlength","minlength","autocomplete","name","autofocus","form","inputmode"],Zt=c.defineComponent({name:"sq-textarea",__name:"textarea",props:c.mergeModels({resize:{default:"both"},rows:{default:2},cols:{default:30},status:{},round:{type:Boolean},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},placeholder:{},maxlength:{},minlength:{},autocomplete:{default:"off"},name:{},form:{},inputmode:{},autofocus:{type:Boolean},type:{},size:{}},{value:{default:""},valueModifiers:{}}),emits:c.mergeModels(["focus","blur","input","change"],["update:value"]),setup(u,{expose:e,emit:t}){const n=t,r=u,{textareaSize:o,textareaRound:s,textareaDisabled:i,textareaReadonly:a,id:l}=Wo(r),f=c.useModel(u,"value"),d=c.shallowRef(null),b=c.computed(()=>{const y=[],E=c.unref(o),k=c.unref(s),C=c.unref(i);return E!=="md"&&y.push(`sq-textarea--${E}`),r.status&&y.push(`is-${r.status}`),k&&y.push("is-round"),C&&y.push("is-disabled"),y}),h=c.computed(()=>c.unref(i)||c.unref(a)?"none":r.resize);function p(){var y;(y=d.value)==null||y.focus()}function g(){var y;(y=d.value)==null||y.blur()}return e({focus:p,blur:g}),(y,E)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-textarea",b.value])},[c.withDirectives(c.createElementVNode("textarea",{"onUpdate:modelValue":E[0]||(E[0]=k=>f.value=k),class:"sq-textarea-inner",id:c.unref(l),style:c.normalizeStyle({resize:h.value}),rows:r.rows,cols:r.cols,disabled:c.unref(i),readonly:c.unref(a),placeholder:r.placeholder,maxlength:r.maxlength,minlength:r.minlength,autocomplete:r.autocomplete,name:r.name,autofocus:r.autofocus,form:r.form,inputmode:r.inputmode,ref_key:"textareaRef",ref:d,onFocus:E[1]||(E[1]=k=>n("focus",k)),onBlur:E[2]||(E[2]=k=>n("blur",k)),onInput:E[3]||(E[3]=k=>n("input",k)),onChange:E[4]||(E[4]=k=>n("change",k))},null,44,Ai),[[c.vModelText,f.value]])],2))}}),Fi=c.defineComponent({name:"sq-timeline",__name:"timeline",props:{align:{default:"left"}},setup(u){const e=u,t=c.computed(()=>{const n=[];return n.push(`align-${e.align}`),n});return(n,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-timeline",t.value])},[c.renderSlot(n.$slots,"default")],2))}}),Bi={class:"sq-timeline-dot"},Si={class:"sq-timeline-content"},zi=["textContent"],qi=["textContent"],Mi={class:"content-info"},Ti=c.defineComponent({name:"sq-timeline-item",__name:"timeline-item",props:{color:{},type:{},icon:{},hollow:{type:Boolean},timestamp:{},theme:{default:"card"},title:{}},setup(u){const e=u,t=c.computed(()=>{const r=[];return e.theme!=="card"&&r.push(`is-${e.theme}`),e.type&&r.push(`is-${e.type}`),e.hollow&&r.push("is-hollow"),r}),n=c.computed(()=>{const r={};return e.color&&(r["--timeline-dot-color"]=e.color),r});return(r,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-timeline-item",t.value]),style:c.normalizeStyle(n.value)},[c.createElementVNode("span",Bi,[e.icon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.icon),{key:0})):c.createCommentVNode("",!0)]),c.createElementVNode("div",Si,[e.title?(c.openBlock(),c.createElementBlock("h2",{key:0,class:"content-title",textContent:c.toDisplayString(e.title)},null,8,zi)):c.createCommentVNode("",!0),e.timestamp?(c.openBlock(),c.createElementBlock("span",{key:1,class:"content-time",textContent:c.toDisplayString(e.timestamp)},null,8,qi)):c.createCommentVNode("",!0),c.createElementVNode("div",Mi,[c.renderSlot(r.$slots,"default")])])],6))}});F.ButtonGroupContextKeys=xe,F.FormContextKeys=Su,F.FormItemIdKeys=Vu,F.SqAlert=K0,F.SqArticle=Oo,F.SqAvatar=Vo,F.SqBacktop=Ho,F.SqButton=Bu,F.SqButtonGroup=Xo,F.SqCard=ec,F.SqCheckTag=Di,F.SqForm=cc,F.SqInput=Dt,F.SqMessage=gc,F.SqPagination=wc,F.SqPopover=ki,F.SqProgress=Ut,F.SqTag=wi,F.SqText=_u,F.SqTextarea=Zt,F.SqTimeline=Fi,F.SqTimelineItem=Ti,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
57
+ `,o.map=[e,u.line],!0}function xr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||r+3>o)return!1;const s=u.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let i=r;r=u.skipChars(r,s);let a=r-i;if(a<3)return!1;const l=u.src.slice(i,r),f=u.src.slice(r,o);if(s===96&&f.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let d=e,b=!1;for(;d++,!(d>=t||(r=i=u.bMarks[d]+u.tShift[d],o=u.eMarks[d],r<o&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(r)===s&&!(u.sCount[d]-u.blkIndent>=4)&&(r=u.skipChars(r,s),!(r-i<a)&&(r=u.skipSpaces(r),!(r<o)))){b=!0;break}a=u.sCount[e],u.line=d+(b?1:0);const h=u.push("fence","code",0);return h.info=f,h.content=u.getLines(e+1,d,a,!0),h.markup=l,h.map=[e,u.line],!0}function gr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];const s=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==62)return!1;if(n)return!0;const i=[],a=[],l=[],f=[],d=u.md.block.ruler.getRules("blockquote"),b=u.parentType;u.parentType="blockquote";let h=!1,p;for(p=e;p<t;p++){const C=u.sCount[p]<u.blkIndent;if(r=u.bMarks[p]+u.tShift[p],o=u.eMarks[p],r>=o)break;if(u.src.charCodeAt(r++)===62&&!C){let _=u.sCount[p]+1,x,w;u.src.charCodeAt(r)===32?(r++,_++,w=!1,x=!0):u.src.charCodeAt(r)===9?(x=!0,(u.bsCount[p]+_)%4===3?(r++,_++,w=!1):w=!0):x=!1;let D=_;for(i.push(u.bMarks[p]),u.bMarks[p]=r;r<o;){const q=u.src.charCodeAt(r);if(S(q))q===9?D+=4-(D+u.bsCount[p]+(w?1:0))%4:D++;else break;r++}h=r>=o,a.push(u.bsCount[p]),u.bsCount[p]=u.sCount[p]+1+(x?1:0),l.push(u.sCount[p]),u.sCount[p]=D-_,f.push(u.tShift[p]),u.tShift[p]=r-u.bMarks[p];continue}if(h)break;let m=!1;for(let _=0,x=d.length;_<x;_++)if(d[_](u,p,t,!0)){m=!0;break}if(m){u.lineMax=p,u.blkIndent!==0&&(i.push(u.bMarks[p]),a.push(u.bsCount[p]),f.push(u.tShift[p]),l.push(u.sCount[p]),u.sCount[p]-=u.blkIndent);break}i.push(u.bMarks[p]),a.push(u.bsCount[p]),f.push(u.tShift[p]),l.push(u.sCount[p]),u.sCount[p]=-1}const g=u.blkIndent;u.blkIndent=0;const y=u.push("blockquote_open","blockquote",1);y.markup=">";const E=[e,0];y.map=E,u.md.block.tokenize(u,e,p);const k=u.push("blockquote_close","blockquote",-1);k.markup=">",u.lineMax=s,u.parentType=b,E[1]=u.line;for(let C=0;C<f.length;C++)u.bMarks[C+e]=i[C],u.tShift[C+e]=f[C],u.sCount[C+e]=l[C],u.bsCount[C+e]=a[C];return u.blkIndent=g,!0}function _r(u,e,t,n){const r=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let o=u.bMarks[e]+u.tShift[e];const s=u.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let i=1;for(;o<r;){const l=u.src.charCodeAt(o++);if(l!==s&&!S(l))return!1;l===s&&i++}if(i<3)return!1;if(n)return!0;u.line=e+1;const a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(i+1).join(String.fromCharCode(s)),!0}function tt(u,e){const t=u.eMarks[e];let n=u.bMarks[e]+u.tShift[e];const r=u.src.charCodeAt(n++);if(r!==42&&r!==45&&r!==43)return-1;if(n<t){const o=u.src.charCodeAt(n);if(!S(o))return-1}return n}function nt(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];let r=t;if(r+1>=n)return-1;let o=u.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=n)return-1;if(o=u.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<n&&(o=u.src.charCodeAt(r),!S(o))?-1:r}function kr(u,e){const t=u.level+2;for(let n=e+2,r=u.tokens.length-2;n<r;n++)u.tokens[n].level===t&&u.tokens[n].type==="paragraph_open"&&(u.tokens[n+2].hidden=!0,u.tokens[n].hidden=!0,n+=2)}function yr(u,e,t,n){let r,o,s,i,a=e,l=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let f=!1;n&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(f=!0);let d,b,h;if((h=nt(u,a))>=0){if(d=!0,s=u.bMarks[a]+u.tShift[a],b=Number(u.src.slice(s,h-1)),f&&b!==1)return!1}else if((h=tt(u,a))>=0)d=!1;else return!1;if(f&&u.skipSpaces(h)>=u.eMarks[a])return!1;if(n)return!0;const p=u.src.charCodeAt(h-1),g=u.tokens.length;d?(i=u.push("ordered_list_open","ol",1),b!==1&&(i.attrs=[["start",b]])):i=u.push("bullet_list_open","ul",1);const y=[a,0];i.map=y,i.markup=String.fromCharCode(p);let E=!1;const k=u.md.block.ruler.getRules("list"),C=u.parentType;for(u.parentType="list";a<t;){o=h,r=u.eMarks[a];const m=u.sCount[a]+h-(u.bMarks[a]+u.tShift[a]);let _=m;for(;o<r;){const j=u.src.charCodeAt(o);if(j===9)_+=4-(_+u.bsCount[a])%4;else if(j===32)_++;else break;o++}const x=o;let w;x>=r?w=1:w=_-m,w>4&&(w=1);const D=m+w;i=u.push("list_item_open","li",1),i.markup=String.fromCharCode(p);const q=[a,0];i.map=q,d&&(i.info=u.src.slice(s,h-1));const A=u.tight,z=u.tShift[a],ou=u.sCount[a],ku=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=D,u.tight=!0,u.tShift[a]=x-u.bMarks[a],u.sCount[a]=_,x>=r&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,t):u.md.block.tokenize(u,a,t,!0),(!u.tight||E)&&(l=!1),E=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=ku,u.tShift[a]=z,u.sCount[a]=ou,u.tight=A,i=u.push("list_item_close","li",-1),i.markup=String.fromCharCode(p),a=u.line,q[1]=a,a>=t||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let P=!1;for(let j=0,B=k.length;j<B;j++)if(k[j](u,a,t,!0)){P=!0;break}if(P)break;if(d){if(h=nt(u,a),h<0)break;s=u.bMarks[a]+u.tShift[a]}else if(h=tt(u,a),h<0)break;if(p!==u.src.charCodeAt(h-1))break}return d?i=u.push("ordered_list_close","ol",-1):i=u.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(p),y[1]=a,u.line=a,u.parentType=C,l&&kr(u,g),!0}function Cr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e],s=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==91)return!1;function i(k){const C=u.lineMax;if(k>=C||u.isEmpty(k))return null;let m=!1;if(u.sCount[k]-u.blkIndent>3&&(m=!0),u.sCount[k]<0&&(m=!0),!m){const w=u.md.block.ruler.getRules("reference"),D=u.parentType;u.parentType="reference";let q=!1;for(let A=0,z=w.length;A<z;A++)if(w[A](u,k,C,!0)){q=!0;break}if(u.parentType=D,q)return null}const _=u.bMarks[k]+u.tShift[k],x=u.eMarks[k];return u.src.slice(_,x+1)}let a=u.src.slice(r,o+1);o=a.length;let l=-1;for(r=1;r<o;r++){const k=a.charCodeAt(r);if(k===91)return!1;if(k===93){l=r;break}else if(k===10){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}else if(k===92&&(r++,r<o&&a.charCodeAt(r)===10)){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}}if(l<0||a.charCodeAt(l+1)!==58)return!1;for(r=l+2;r<o;r++){const k=a.charCodeAt(r);if(k===10){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}else if(!S(k))break}const f=u.md.helpers.parseLinkDestination(a,r,o);if(!f.ok)return!1;const d=u.md.normalizeLink(f.str);if(!u.md.validateLink(d))return!1;r=f.pos;const b=r,h=s,p=r;for(;r<o;r++){const k=a.charCodeAt(r);if(k===10){const C=i(s);C!==null&&(a+=C,o=a.length,s++)}else if(!S(k))break}let g=u.md.helpers.parseLinkTitle(a,r,o);for(;g.can_continue;){const k=i(s);if(k===null)break;a+=k,r=o,o=a.length,s++,g=u.md.helpers.parseLinkTitle(a,r,o,g)}let y;for(r<o&&p!==r&&g.ok?(y=g.str,r=g.pos):(y="",r=b,s=h);r<o;){const k=a.charCodeAt(r);if(!S(k))break;r++}if(r<o&&a.charCodeAt(r)!==10&&y)for(y="",r=b,s=h;r<o;){const k=a.charCodeAt(r);if(!S(k))break;r++}if(r<o&&a.charCodeAt(r)!==10)return!1;const E=Iu(a.slice(1,l));return E?(n||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[E]>"u"&&(u.env.references[E]={title:y,href:d}),u.line=s),!0):!1}const Er=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wr="[a-zA-Z_:][a-zA-Z0-9:._-]*",Dr="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",rt="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+wr+"(?:\\s*=\\s*"+Dr+")?)")+"*\\s*\\/?>",ot="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ar="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Fr="<[?][\\s\\S]*?[?]>",Br="<![A-Za-z][^>]*>",Sr="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",zr=new RegExp("^(?:"+rt+"|"+ot+"|"+Ar+"|"+Fr+"|"+Br+"|"+Sr+")"),qr=new RegExp("^(?:"+rt+"|"+ot+")"),pu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Er.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(qr.source+"\\s*$"),/^$/,!1]];function Mr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(r)!==60)return!1;let s=u.src.slice(r,o),i=0;for(;i<pu.length&&!pu[i][0].test(s);i++);if(i===pu.length)return!1;if(n)return pu[i][2];let a=e+1;if(!pu[i][1].test(s)){for(;a<t&&!(u.sCount[a]<u.blkIndent);a++)if(r=u.bMarks[a]+u.tShift[a],o=u.eMarks[a],s=u.src.slice(r,o),pu[i][1].test(s)){s.length!==0&&a++;break}}u.line=a;const l=u.push("html_block","",0);return l.map=[e,a],l.content=u.getLines(e,a,u.blkIndent,!0),!0}function Tr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let s=u.src.charCodeAt(r);if(s!==35||r>=o)return!1;let i=1;for(s=u.src.charCodeAt(++r);s===35&&r<o&&i<=6;)i++,s=u.src.charCodeAt(++r);if(i>6||r<o&&!S(s))return!1;if(n)return!0;o=u.skipSpacesBack(o,r);const a=u.skipCharsBack(o,35,r);a>r&&S(u.src.charCodeAt(a-1))&&(o=a),u.line=e+1;const l=u.push("heading_open","h"+String(i),1);l.markup="########".slice(0,i),l.map=[e,u.line];const f=u.push("inline","",0);f.content=u.src.slice(r,o).trim(),f.map=[e,u.line],f.children=[];const d=u.push("heading_close","h"+String(i),-1);return d.markup="########".slice(0,i),!0}function Rr(u,e,t){const n=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;const r=u.parentType;u.parentType="paragraph";let o=0,s,i=e+1;for(;i<t&&!u.isEmpty(i);i++){if(u.sCount[i]-u.blkIndent>3)continue;if(u.sCount[i]>=u.blkIndent){let h=u.bMarks[i]+u.tShift[i];const p=u.eMarks[i];if(h<p&&(s=u.src.charCodeAt(h),(s===45||s===61)&&(h=u.skipChars(h,s),h=u.skipSpaces(h),h>=p))){o=s===61?1:2;break}}if(u.sCount[i]<0)continue;let b=!1;for(let h=0,p=n.length;h<p;h++)if(n[h](u,i,t,!0)){b=!0;break}if(b)break}if(!o)return!1;const a=u.getLines(e,i,u.blkIndent,!1).trim();u.line=i+1;const l=u.push("heading_open","h"+String(o),1);l.markup=String.fromCharCode(s),l.map=[e,u.line];const f=u.push("inline","",0);f.content=a,f.map=[e,u.line-1],f.children=[];const d=u.push("heading_close","h"+String(o),-1);return d.markup=String.fromCharCode(s),u.parentType=r,!0}function Lr(u,e,t){const n=u.md.block.ruler.getRules("paragraph"),r=u.parentType;let o=e+1;for(u.parentType="paragraph";o<t&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3||u.sCount[o]<0)continue;let l=!1;for(let f=0,d=n.length;f<d;f++)if(n[f](u,o,t,!0)){l=!0;break}if(l)break}const s=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o;const i=u.push("paragraph_open","p",1);i.map=[e,u.line];const a=u.push("inline","",0);return a.content=s,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=r,!0}const $u=[["table",br,["paragraph","reference"]],["code",mr],["fence",xr,["paragraph","reference","blockquote","list"]],["blockquote",gr,["paragraph","reference","blockquote","list"]],["hr",_r,["paragraph","reference","blockquote","list"]],["list",yr,["paragraph","reference","blockquote"]],["reference",Cr],["html_block",Mr,["paragraph","reference","blockquote"]],["heading",Tr,["paragraph","reference","blockquote"]],["lheading",Rr],["paragraph",Lr]];function Ou(){this.ruler=new N;for(let u=0;u<$u.length;u++)this.ruler.push($u[u][0],$u[u][1],{alt:($u[u][2]||[]).slice()})}Ou.prototype.tokenize=function(u,e,t){const n=this.ruler.getRules(""),r=n.length,o=u.md.options.maxNesting;let s=e,i=!1;for(;s<t&&(u.line=s=u.skipEmptyLines(s),!(s>=t||u.sCount[s]<u.blkIndent));){if(u.level>=o){u.line=t;break}const a=u.line;let l=!1;for(let f=0;f<r;f++)if(l=n[f](u,s,t,!1),l){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");u.tight=!i,u.isEmpty(u.line-1)&&(i=!0),s=u.line,s<t&&u.isEmpty(s)&&(i=!0,s++,u.line=s)}},Ou.prototype.parse=function(u,e,t,n){if(!u)return;const r=new this.State(u,e,t,n);this.tokenize(r,r.line,r.lineMax)},Ou.prototype.State=W;function Du(u,e,t,n){this.src=u,this.env=t,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Du.prototype.pushPending=function(){const u=new v("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u},Du.prototype.push=function(u,e,t){this.pending&&this.pushPending();const n=new v(u,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(r),n},Du.prototype.scanDelims=function(u,e){const t=this.posMax,n=this.src.charCodeAt(u),r=u>0?this.src.charCodeAt(u-1):32;let o=u;for(;o<t&&this.src.charCodeAt(o)===n;)o++;const s=o-u,i=o<t?this.src.charCodeAt(o):32,a=wu(r)||Eu(String.fromCharCode(r)),l=wu(i)||Eu(String.fromCharCode(i)),f=Cu(r),d=Cu(i),b=!d&&(!l||f||a),h=!f&&(!a||d||l);return{can_open:b&&(e||!h||a),can_close:h&&(e||!b||l),length:s}},Du.prototype.Token=v;function Ir(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Nr(u,e){let t=u.pos;for(;t<u.posMax&&!Ir(u.src.charCodeAt(t));)t++;return t===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,t)),u.pos=t,!0)}const $r=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Or(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;const t=u.pos,n=u.posMax;if(t+3>n||u.src.charCodeAt(t)!==58||u.src.charCodeAt(t+1)!==47||u.src.charCodeAt(t+2)!==47)return!1;const r=u.pending.match($r);if(!r)return!1;const o=r[1],s=u.md.linkify.matchAtStart(u.src.slice(t-o.length));if(!s)return!1;let i=s.url;if(i.length<=o.length)return!1;i=i.replace(/\*+$/,"");const a=u.md.normalizeLink(i);if(!u.md.validateLink(a))return!1;if(!e){u.pending=u.pending.slice(0,-o.length);const l=u.push("link_open","a",1);l.attrs=[["href",a]],l.markup="linkify",l.info="auto";const f=u.push("text","",0);f.content=u.md.normalizeLinkText(i);const d=u.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return u.pos+=i.length-o.length,!0}function Pr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==10)return!1;const n=u.pending.length-1,r=u.posMax;if(!e)if(n>=0&&u.pending.charCodeAt(n)===32)if(n>=1&&u.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&u.pending.charCodeAt(o-1)===32;)o--;u.pending=u.pending.slice(0,o),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(t++;t<r&&S(u.src.charCodeAt(t));)t++;return u.pos=t,!0}const ae=[];for(let u=0;u<256;u++)ae.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){ae[u.charCodeAt(0)]=1});function vr(u,e){let t=u.pos;const n=u.posMax;if(u.src.charCodeAt(t)!==92||(t++,t>=n))return!1;let r=u.src.charCodeAt(t);if(r===10){for(e||u.push("hardbreak","br",0),t++;t<n&&(r=u.src.charCodeAt(t),!!S(r));)t++;return u.pos=t,!0}let o=u.src[t];if(r>=55296&&r<=56319&&t+1<n){const i=u.src.charCodeAt(t+1);i>=56320&&i<=57343&&(o+=u.src[t+1],t++)}const s="\\"+o;if(!e){const i=u.push("text_special","",0);r<256&&ae[r]!==0?i.content=o:i.content=s,i.markup=s,i.info="escape"}return u.pos=t+1,!0}function Vr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=u.posMax;for(;t<o&&u.src.charCodeAt(t)===96;)t++;const s=u.src.slice(r,t),i=s.length;if(u.backticksScanned&&(u.backticks[i]||0)<=r)return e||(u.pending+=s),u.pos+=i,!0;let a=t,l;for(;(l=u.src.indexOf("`",a))!==-1;){for(a=l+1;a<o&&u.src.charCodeAt(a)===96;)a++;const f=a-l;if(f===i){if(!e){const d=u.push("code_inline","code",0);d.markup=s,d.content=u.src.slice(t,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[f]=l}return u.backticksScanned=!0,e||(u.pending+=s),u.pos+=i,!0}function jr(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==126)return!1;const r=u.scanDelims(u.pos,!0);let o=r.length;const s=String.fromCharCode(n);if(o<2)return!1;let i;o%2&&(i=u.push("text","",0),i.content=s,o--);for(let a=0;a<o;a+=2)i=u.push("text","",0),i.content=s+s,u.delimiters.push({marker:n,length:0,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return u.pos+=r.length,!0}function ct(u,e){let t;const n=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];if(s.marker!==126||s.end===-1)continue;const i=e[s.end];t=u.tokens[s.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=u.tokens[i.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",u.tokens[i.token-1].type==="text"&&u.tokens[i.token-1].content==="~"&&n.push(i.token-1)}for(;n.length;){const o=n.pop();let s=o+1;for(;s<u.tokens.length&&u.tokens[s].type==="s_close";)s++;s--,o!==s&&(t=u.tokens[s],u.tokens[s]=u.tokens[o],u.tokens[o]=t)}}function Hr(u){const e=u.tokens_meta,t=u.tokens_meta.length;ct(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&ct(u,e[n].delimiters)}const it={tokenize:jr,postProcess:Hr};function Ur(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==95&&n!==42)return!1;const r=u.scanDelims(u.pos,n===42);for(let o=0;o<r.length;o++){const s=u.push("text","",0);s.content=String.fromCharCode(n),u.delimiters.push({marker:n,length:r.length,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return u.pos+=r.length,!0}function st(u,e){const t=e.length;for(let n=t-1;n>=0;n--){const r=e[n];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],s=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),a=u.tokens[r.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?i+i:i,a.content="";const l=u.tokens[o.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?i+i:i,l.content="",s&&(u.tokens[e[n-1].token].content="",u.tokens[e[r.end+1].token].content="",n--)}}function Zr(u){const e=u.tokens_meta,t=u.tokens_meta.length;st(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&st(u,e[n].delimiters)}const at={tokenize:Ur,postProcess:Zr};function Wr(u,e){let t,n,r,o,s="",i="",a=u.pos,l=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;const f=u.pos,d=u.posMax,b=u.pos+1,h=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(h<0)return!1;let p=h+1;if(p<d&&u.src.charCodeAt(p)===40){for(l=!1,p++;p<d&&(t=u.src.charCodeAt(p),!(!S(t)&&t!==10));p++);if(p>=d)return!1;if(a=p,r=u.md.helpers.parseLinkDestination(u.src,p,u.posMax),r.ok){for(s=u.md.normalizeLink(r.str),u.md.validateLink(s)?p=r.pos:s="",a=p;p<d&&(t=u.src.charCodeAt(p),!(!S(t)&&t!==10));p++);if(r=u.md.helpers.parseLinkTitle(u.src,p,u.posMax),p<d&&a!==p&&r.ok)for(i=r.str,p=r.pos;p<d&&(t=u.src.charCodeAt(p),!(!S(t)&&t!==10));p++);}(p>=d||u.src.charCodeAt(p)!==41)&&(l=!0),p++}if(l){if(typeof u.env.references>"u")return!1;if(p<d&&u.src.charCodeAt(p)===91?(a=p+1,p=u.md.helpers.parseLinkLabel(u,p),p>=0?n=u.src.slice(a,p++):p=h+1):p=h+1,n||(n=u.src.slice(b,h)),o=u.env.references[Iu(n)],!o)return u.pos=f,!1;s=o.href,i=o.title}if(!e){u.pos=b,u.posMax=h;const g=u.push("link_open","a",1),y=[["href",s]];g.attrs=y,i&&y.push(["title",i]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=p,u.posMax=d,!0}function Gr(u,e){let t,n,r,o,s,i,a,l,f="";const d=u.pos,b=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;const h=u.pos+2,p=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(p<0)return!1;if(o=p+1,o<b&&u.src.charCodeAt(o)===40){for(o++;o<b&&(t=u.src.charCodeAt(o),!(!S(t)&&t!==10));o++);if(o>=b)return!1;for(l=o,i=u.md.helpers.parseLinkDestination(u.src,o,u.posMax),i.ok&&(f=u.md.normalizeLink(i.str),u.md.validateLink(f)?o=i.pos:f=""),l=o;o<b&&(t=u.src.charCodeAt(o),!(!S(t)&&t!==10));o++);if(i=u.md.helpers.parseLinkTitle(u.src,o,u.posMax),o<b&&l!==o&&i.ok)for(a=i.str,o=i.pos;o<b&&(t=u.src.charCodeAt(o),!(!S(t)&&t!==10));o++);else a="";if(o>=b||u.src.charCodeAt(o)!==41)return u.pos=d,!1;o++}else{if(typeof u.env.references>"u")return!1;if(o<b&&u.src.charCodeAt(o)===91?(l=o+1,o=u.md.helpers.parseLinkLabel(u,o),o>=0?r=u.src.slice(l,o++):o=p+1):o=p+1,r||(r=u.src.slice(h,p)),s=u.env.references[Iu(r)],!s)return u.pos=d,!1;f=s.href,a=s.title}if(!e){n=u.src.slice(h,p);const g=[];u.md.inline.parse(n,u.md,u.env,g);const y=u.push("image","img",0),E=[["src",f],["alt",""]];y.attrs=E,y.children=g,y.content=n,a&&E.push(["title",a])}return u.pos=o,u.posMax=b,!0}const Jr=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Xr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Qr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==60)return!1;const n=u.pos,r=u.posMax;for(;;){if(++t>=r)return!1;const s=u.src.charCodeAt(t);if(s===60)return!1;if(s===62)break}const o=u.src.slice(n+1,t);if(Xr.test(o)){const s=u.md.normalizeLink(o);if(!u.md.validateLink(s))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}if(Jr.test(o)){const s=u.md.normalizeLink("mailto:"+o);if(!u.md.validateLink(s))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",s]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}return!1}function Yr(u){return/^<a[>\s]/i.test(u)}function Kr(u){return/^<\/a\s*>/i.test(u)}function uo(u){const e=u|32;return e>=97&&e<=122}function eo(u,e){if(!u.md.options.html)return!1;const t=u.posMax,n=u.pos;if(u.src.charCodeAt(n)!==60||n+2>=t)return!1;const r=u.src.charCodeAt(n+1);if(r!==33&&r!==63&&r!==47&&!uo(r))return!1;const o=u.src.slice(n).match(zr);if(!o)return!1;if(!e){const s=u.push("html_inline","",0);s.content=o[0],Yr(s.content)&&u.linkLevel++,Kr(s.content)&&u.linkLevel--}return u.pos+=o[0].length,!0}const to=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,no=/^&([a-z][a-z0-9]{1,31});/i;function ro(u,e){const t=u.pos,n=u.posMax;if(u.src.charCodeAt(t)!==38||t+1>=n)return!1;if(u.src.charCodeAt(t+1)===35){const o=u.src.slice(t).match(to);if(o){if(!e){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),i=u.push("text_special","",0);i.content=oe(s)?Lu(s):Lu(65533),i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}else{const o=u.src.slice(t).match(no);if(o){const s=Ge(o[0]);if(s!==o[0]){if(!e){const i=u.push("text_special","",0);i.content=s,i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}}return!1}function lt(u){const e={},t=u.length;if(!t)return;let n=0,r=-2;const o=[];for(let s=0;s<t;s++){const i=u[s];if(o.push(0),(u[n].marker!==i.marker||r!==i.token-1)&&(n=s),r=i.token,i.length=i.length||0,!i.close)continue;e.hasOwnProperty(i.marker)||(e[i.marker]=[-1,-1,-1,-1,-1,-1]);const a=e[i.marker][(i.open?3:0)+i.length%3];let l=n-o[n]-1,f=l;for(;l>a;l-=o[l]+1){const d=u[l];if(d.marker===i.marker&&d.open&&d.end<0){let b=!1;if((d.close||i.open)&&(d.length+i.length)%3===0&&(d.length%3!==0||i.length%3!==0)&&(b=!0),!b){const h=l>0&&!u[l-1].open?o[l-1]+1:0;o[s]=s-l+h,o[l]=h,i.open=!1,d.end=s,d.close=!1,f=-1,r=-2;break}}}f!==-1&&(e[i.marker][(i.open?3:0)+(i.length||0)%3]=f)}}function oo(u){const e=u.tokens_meta,t=u.tokens_meta.length;lt(u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&lt(e[n].delimiters)}function co(u){let e,t,n=0;const r=u.tokens,o=u.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&n--,r[e].level=n,r[e].nesting>0&&n++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const le=[["text",Nr],["linkify",Or],["newline",Pr],["escape",vr],["backticks",Vr],["strikethrough",it.tokenize],["emphasis",at.tokenize],["link",Wr],["image",Gr],["autolink",Qr],["html_inline",eo],["entity",ro]],fe=[["balance_pairs",oo],["strikethrough",it.postProcess],["emphasis",at.postProcess],["fragments_join",co]];function Au(){this.ruler=new N;for(let u=0;u<le.length;u++)this.ruler.push(le[u][0],le[u][1]);this.ruler2=new N;for(let u=0;u<fe.length;u++)this.ruler2.push(fe[u][0],fe[u][1])}Au.prototype.skipToken=function(u){const e=u.pos,t=this.ruler.getRules(""),n=t.length,r=u.md.options.maxNesting,o=u.cache;if(typeof o[e]<"u"){u.pos=o[e];return}let s=!1;if(u.level<r){for(let i=0;i<n;i++)if(u.level++,s=t[i](u,!0),u.level--,s){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;s||u.pos++,o[e]=u.pos},Au.prototype.tokenize=function(u){const e=this.ruler.getRules(""),t=e.length,n=u.posMax,r=u.md.options.maxNesting;for(;u.pos<n;){const o=u.pos;let s=!1;if(u.level<r){for(let i=0;i<t;i++)if(s=e[i](u,!1),s){if(o>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(u.pos>=n)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()},Au.prototype.parse=function(u,e,t,n){const r=new this.State(u,e,t,n);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let i=0;i<s;i++)o[i](r)},Au.prototype.State=Du;function io(u){const e={};u=u||{},e.src_Any=je.source,e.src_Cc=He.source,e.src_Z=Ze.source,e.src_P=ee.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function de(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){u[n]=t[n]})}),u}function Pu(u){return Object.prototype.toString.call(u)}function so(u){return Pu(u)==="[object String]"}function ao(u){return Pu(u)==="[object Object]"}function lo(u){return Pu(u)==="[object RegExp]"}function ft(u){return Pu(u)==="[object Function]"}function fo(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const dt={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function po(u){return Object.keys(u||{}).reduce(function(e,t){return e||dt.hasOwnProperty(t)},!1)}const ho={"http:":{validate:function(u,e,t){const n=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){const n=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){const n=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},bo="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",mo="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function xo(u){u.__index__=-1,u.__text_cache__=""}function go(u){return function(e,t){const n=e.slice(t);return u.test(n)?n.match(u)[0].length:0}}function pt(){return function(u,e){e.normalize(u)}}function vu(u){const e=u.re=io(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(bo),t.push(e.src_xn),e.src_tlds=t.join("|");function n(i){return i.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const r=[];u.__compiled__={};function o(i,a){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+a)}Object.keys(u.__schemas__).forEach(function(i){const a=u.__schemas__[i];if(a===null)return;const l={validate:null,link:null};if(u.__compiled__[i]=l,ao(a)){lo(a.validate)?l.validate=go(a.validate):ft(a.validate)?l.validate=a.validate:o(i,a),ft(a.normalize)?l.normalize=a.normalize:a.normalize?o(i,a):l.normalize=pt();return}if(so(a)){r.push(i);return}o(i,a)}),r.forEach(function(i){u.__compiled__[u.__schemas__[i]]&&(u.__compiled__[i].validate=u.__compiled__[u.__schemas__[i]].validate,u.__compiled__[i].normalize=u.__compiled__[u.__schemas__[i]].normalize)}),u.__compiled__[""]={validate:null,normalize:pt()};const s=Object.keys(u.__compiled__).filter(function(i){return i.length>0&&u.__compiled__[i]}).map(fo).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+s+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),xo(u)}function _o(u,e){const t=u.__index__,n=u.__last_index__,r=u.__text_cache__.slice(t,n);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=r,this.text=r,this.url=r}function pe(u,e){const t=new _o(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function $(u,e){if(!(this instanceof $))return new $(u,e);e||po(u)&&(e=u,u={}),this.__opts__=de({},dt,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=de({},ho,u),this.__compiled__={},this.__tlds__=mo,this.__tlds_replaced__=!1,this.re={},vu(this)}$.prototype.add=function(e,t){return this.__schemas__[e]=t,vu(this),this},$.prototype.set=function(e){return this.__opts__=de(this.__opts__,e),this},$.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,o,s,i,a,l,f;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(t=a.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],a.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=e.indexOf("@"),f>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(s=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=i))),this.__index__>=0},$.prototype.pretest=function(e){return this.re.pretest.test(e)},$.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},$.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(pe(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(pe(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},$.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,pe(this,0)):null},$.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,r,o){return n!==o[r-1]}).reverse(),vu(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,vu(this),this)},$.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},$.prototype.onCompile=function(){};const hu=2147483647,G=36,he=1,Fu=26,ko=38,yo=700,ht=72,bt=128,mt="-",Co=/^xn--/,Eo=/[^\0-\x7F]/,wo=/[\x2E\u3002\uFF0E\uFF61]/g,Do={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},be=G-he,J=Math.floor,me=String.fromCharCode;function nu(u){throw new RangeError(Do[u])}function Ao(u,e){const t=[];let n=u.length;for(;n--;)t[n]=e(u[n]);return t}function xt(u,e){const t=u.split("@");let n="";t.length>1&&(n=t[0]+"@",u=t[1]),u=u.replace(wo,".");const r=u.split("."),o=Ao(r,e).join(".");return n+o}function gt(u){const e=[];let t=0;const n=u.length;for(;t<n;){const r=u.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){const o=u.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const Fo=u=>String.fromCodePoint(...u),Bo=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:G},_t=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},kt=function(u,e,t){let n=0;for(u=t?J(u/yo):u>>1,u+=J(u/e);u>be*Fu>>1;n+=G)u=J(u/be);return J(n+(be+1)*u/(u+ko))},yt=function(u){const e=[],t=u.length;let n=0,r=bt,o=ht,s=u.lastIndexOf(mt);s<0&&(s=0);for(let i=0;i<s;++i)u.charCodeAt(i)>=128&&nu("not-basic"),e.push(u.charCodeAt(i));for(let i=s>0?s+1:0;i<t;){const a=n;for(let f=1,d=G;;d+=G){i>=t&&nu("invalid-input");const b=Bo(u.charCodeAt(i++));b>=G&&nu("invalid-input"),b>J((hu-n)/f)&&nu("overflow"),n+=b*f;const h=d<=o?he:d>=o+Fu?Fu:d-o;if(b<h)break;const p=G-h;f>J(hu/p)&&nu("overflow"),f*=p}const l=e.length+1;o=kt(n-a,l,a==0),J(n/l)>hu-r&&nu("overflow"),r+=J(n/l),n%=l,e.splice(n++,0,r)}return String.fromCodePoint(...e)},Ct=function(u){const e=[];u=gt(u);const t=u.length;let n=bt,r=0,o=ht;for(const a of u)a<128&&e.push(me(a));const s=e.length;let i=s;for(s&&e.push(mt);i<t;){let a=hu;for(const f of u)f>=n&&f<a&&(a=f);const l=i+1;a-n>J((hu-r)/l)&&nu("overflow"),r+=(a-n)*l,n=a;for(const f of u)if(f<n&&++r>hu&&nu("overflow"),f===n){let d=r;for(let b=G;;b+=G){const h=b<=o?he:b>=o+Fu?Fu:b-o;if(d<h)break;const p=d-h,g=G-h;e.push(me(_t(h+p%g,0))),d=J(p/g)}e.push(me(_t(d,0))),o=kt(r,l,i===s),r=0,++i}++r,++n}return e.join("")},Et={version:"2.3.1",ucs2:{decode:gt,encode:Fo},decode:yt,encode:Ct,toASCII:function(u){return xt(u,function(e){return Eo.test(e)?"xn--"+Ct(e):e})},toUnicode:function(u){return xt(u,function(e){return Co.test(e)?yt(e.slice(4).toLowerCase()):e})}},So={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},zo=/^(vbscript|javascript|file|data):/,qo=/^data:image\/(gif|png|jpeg|webp);/;function Mo(u){const e=u.trim().toLowerCase();return zo.test(e)?qo.test(e):!0}const wt=["http:","https:","mailto:"];function To(u){const e=ue(u,!0);if(e.hostname&&(!e.protocol||wt.indexOf(e.protocol)>=0))try{e.hostname=Et.toASCII(e.hostname)}catch{}return yu(Ku(e))}function Ro(u){const e=ue(u,!0);if(e.hostname&&(!e.protocol||wt.indexOf(e.protocol)>=0))try{e.hostname=Et.toUnicode(e.hostname)}catch{}return lu(Ku(e),lu.defaultChars+"%")}function V(u,e){if(!(this instanceof V))return new V(u,e);e||re(u)||(e=u||{},u="default"),this.inline=new Au,this.block=new Ou,this.core=new ie,this.renderer=new du,this.linkify=new $,this.validateLink=Mo,this.normalizeLink=To,this.normalizeLinkText=Ro,this.utils=Hn,this.helpers=Ru({},Gn),this.options={},this.configure(u),e&&this.set(e)}V.prototype.set=function(u){return Ru(this.options,u),this},V.prototype.configure=function(u){const e=this;if(re(u)){const t=u;if(u=So[t],!u)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(t){u.components[t].rules&&e[t].ruler.enableOnly(u.components[t].rules),u.components[t].rules2&&e[t].ruler2.enableOnly(u.components[t].rules2)}),this},V.prototype.enable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},V.prototype.disable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},V.prototype.use=function(u){const e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this},V.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");const t=new this.core.State(u,this,e);return this.core.process(t),t.tokens},V.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)},V.prototype.parseInline=function(u,e){const t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},V.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};function Lo(){function u(r,o){const s=new V({html:!0,typographer:!0});return s.use(nn),o&&o.forEach(i=>s.use(i)),s.parse(r,"")}function e(r){const o=n(r)??[];return c.h("article",{class:"sq-article"},t(o))}function t(r){if(r)return r.map(o=>typeof o=="string"?o:c.h(o.tag,o.attrs,t(o.children)))}function n(r){const o=[],s={children:[]};let i=s;return r.forEach(a=>{var g,y,E,k,C,m,_,x,w,D,q;const{type:l,children:f,content:d,attrs:b,tag:h,hidden:p}=a;switch(l){case"heading_open":case"paragraph_open":case"bullet_list_open":case"ordered_list_open":case"list_item_open":case"table_open":case"thead_open":case"tbody_open":case"tr_open":case"th_open":case"td_open":case"blockquote_open":case"strong_open":case"em_open":case"s_open":case"link_open":{if(p)break;const A={tag:h,children:[],attrs:b?Object.fromEntries(b):{}};if(l==="link_open"){const z=a.attrGet("href")??"",ou=document.location.origin;z!=null&&z.startsWith("http")&&!z.includes(ou)&&(A.attrs.target="_blank",A.attrs.rel="noopener noreferrer",A.attrs.dataOuter="",(g=A.children)==null||g.push({tag:N0}))}if(l==="table_open"){const z={tag:"div",children:[],attrs:{class:"sq-article-table"}};(y=i.children)==null||y.push(z),o.push(i),i=z}(E=i.children)==null||E.push(A),o.push(i),i=A;break}case"heading_close":case"paragraph_close":case"bullet_list_close":case"ordered_list_close":case"list_item_close":case"table_close":case"thead_close":case"tbody_close":case"tr_close":case"th_close":case"td_close":case"blockquote_close":case"strong_close":case"em_close":case"s_close":case"link_close":{if(p)break;i=o.pop();break}case"code_inline":{(k=i.children)==null||k.push({tag:"code",children:[d],attrs:b?Object.fromEntries(b):{}});break}case"inline":{if(f){const A=n(f);(C=i.children)==null||C.push(...A??[])}else(m=i.children)==null||m.push(d);break}case"text":{(_=i.children)==null||_.push(d);break}case"image":{(x=i.children)==null||x.push({tag:h,children:[],attrs:b?Object.fromEntries(b):{}});break}case"hr":{(w=i.children)==null||w.push({tag:h});break}case"input":{(D=i.children)==null||D.push({tag:h,children:[],attrs:b?Object.fromEntries(b):{}});break}case"html_inline":{if(d.startsWith("</"))i=o.pop();else{const A=d.replace("<","").replace(">",""),z={tag:A,children:[]};A==="blur"&&(z.tag="span",z.attrs={"data-blur":""}),(q=i.children)==null||q.push(z),o.push(i),i=z}break}}}),s.children}return{md2tokens:u,tokens2vueh:e}}function Io(){function u(e,t=100){let n;return function(...r){n||(n=setTimeout(()=>{e.apply(this,r),n=void 0},t))}}return{throttle:u}}const{md2tokens:No,tokens2vueh:$o}=Lo(),Oo=c.defineComponent({props:{text:{type:String,required:!0},md:{type:Boolean,default:!0},plugins:{type:Object}},setup(u){return()=>{if(!u.md)return c.h("article",{class:"sq-article",innerHTML:u.text});const e=No(u.text,u.plugins);return $o(e)}}}),Po=["src","alt"],vo=["textContent"],Vo=c.defineComponent({name:"sq-avatar",__name:"avatar",props:{img:{},alt:{},randomColor:{type:Boolean,default:!0},round:{type:Boolean,default:!0},size:{default:"md"}},setup(u){const e=u,t=c.ref(!0),n=c.computed(()=>{const i=[];return e.size!=="md"&&i.push(`sq-avatar--${e.size}`),e.round&&i.push("is-round"),i}),r=c.computed(()=>{if(!e.randomColor)return;const{getRandomColor:i}=en();return{"--avatar-bg-color":i()}}),o=c.computed(()=>e.alt.charAt(0).toUpperCase());function s(){t.value=!1}return(i,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-avatar",n.value]),style:c.normalizeStyle(r.value)},[e.img&&t.value?(c.openBlock(),c.createElementBlock("img",{key:0,src:e.img,alt:e.alt,onError:s},null,40,Po)):(c.openBlock(),c.createElementBlock("span",{key:1,textContent:c.toDisplayString(o.value)},null,8,vo))],6))}}),jo={class:"sq-backtop"},Ho=c.defineComponent({name:"sq-backtop",__name:"backtop",props:{progress:{type:Boolean,default:!0},icon:{default:r0},transition:{default:"sq-rotate-in-left"},visibilityHeight:{default:100},target:{default:"#app"},progressProps:{}},setup(u){const{throttle:e}=Io(),t=e(a),n=new ResizeObserver(l),r=u,o=c.ref(100),s=c.ref(0),i=c.computed(()=>s.value>r.visibilityHeight);c.onMounted(()=>{var b;l(),t(),window.addEventListener("scroll",t);const d=document.querySelector(r.target)??document.body;n.observe(d),(b=window.visualViewport)==null||b.addEventListener("resize",l)}),c.onBeforeUnmount(()=>{var d;window.removeEventListener("scroll",t),n.disconnect(),(d=window.visualViewport)==null||d.removeEventListener("resize",l)});function a(){s.value=window.scrollY}function l(){const d=(document.scrollingElement??document.body).scrollHeight,b=window.innerHeight;o.value=d-b}function f(){window.scrollTo({top:0,behavior:"smooth"})}return(d,b)=>(c.openBlock(),c.createBlock(c.Transition,{name:r.transition},{default:c.withCtx(()=>{var h,p,g;return[c.withDirectives(c.createElementVNode("div",jo,[c.createElementVNode("div",{class:"sq-backtop-wrap",onClick:f},[r.progress?(c.openBlock(),c.createBlock(c.unref(Ut),{key:0,theme:"circle",label:!1,value:s.value,max:o.value,type:(h=r.progressProps)==null?void 0:h.type,stroke:(p=r.progressProps)==null?void 0:p.stroke,color:(g=r.progressProps)==null?void 0:g.color},null,8,["value","max","type","stroke","color"])):c.createCommentVNode("",!0),c.renderSlot(d.$slots,"default",{},()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.icon)))])])],512),[[c.vShow,i.value]])]}),_:3},8,["name"]))}});function Uo(u){const{getOption:e}=Yu(),t=c.inject(Su,void 0),n=c.inject(xe,void 0),r=c.computed(()=>c.unref(n)?void 0:u.text),o=c.computed(()=>{var l,f;return e((l=c.unref(n))==null?void 0:l.size,u.size,(f=c.unref(t))==null?void 0:f.size,"md")}),s=c.computed(()=>{var l;return e((l=c.unref(n))==null?void 0:l.type,u.type)}),i=c.computed(()=>{var l,f;return e((l=c.unref(n))==null?void 0:l.round,u.round,(f=c.unref(t))==null?void 0:f.round)}),a=c.computed(()=>{var l,f;return e((l=c.unref(t))==null?void 0:l.disabled,(f=c.unref(n))==null?void 0:f.disabled,u.disabled)});return{btnTextType:r,btnSize:o,btnType:s,btnRound:i,btnDisabled:a}}function Zo(u){const{getOption:e}=Yu(),t=c.inject(Su,void 0),n=c.inject(Vu,void 0),r=c.computed(()=>{var a;return e(u.size,(a=c.unref(t))==null?void 0:a.size,"md")}),o=c.computed(()=>{var a;return e(u.round,(a=c.unref(t))==null?void 0:a.round)}),s=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.disabled,u.disabled)}),i=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.readonly,u.readonly)});return{inputSize:r,inputRound:o,inputDisabled:s,inputReadonly:i,id:n}}function Wo(u){const{getOption:e}=Yu(),t=c.inject(Su,void 0),n=c.inject(Vu,void 0),r=c.computed(()=>{var a;return e(u.size,(a=c.unref(t))==null?void 0:a.size,"md")}),o=c.computed(()=>{var a;return e(u.round,(a=c.unref(t))==null?void 0:a.round)}),s=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.disabled,u.disabled)}),i=c.computed(()=>{var a;return e((a=c.unref(t))==null?void 0:a.readonly,u.readonly)});return{textareaSize:r,textareaRound:o,textareaDisabled:s,textareaReadonly:i,id:n}}const Go=["disabled","form","type"],Bu=c.defineComponent({name:"sq-button",__name:"button",props:{type:{},round:{type:Boolean,default:void 0},text:{type:Boolean},icon:{},loading:{type:Boolean},form:{},bg:{type:Boolean},nativeType:{default:"button"},disabled:{type:Boolean,default:void 0},size:{}},emits:["click"],setup(u,{emit:e}){const t=e,n=u,{btnTextType:r,btnSize:o,btnType:s,btnRound:i,btnDisabled:a}=Uo(n),l=c.computed(()=>{const b=[],h=c.unref(o),p=c.unref(s),g=c.unref(i),y=c.unref(r);return h!=="md"&&b.push(`sq-button--${h}`),p&&b.push(`is-${p}`),g&&b.push("is-round"),y&&b.push("is-text"),y&&n.bg&&b.push("has-bg"),b}),f=c.computed(()=>n.loading?v0:n.icon),d=c.computed(()=>n.loading||c.unref(a));return(b,h)=>(c.openBlock(),c.createElementBlock("button",{class:c.normalizeClass(["sq-button",l.value]),disabled:d.value,form:n.form,type:n.nativeType,onClick:h[0]||(h[0]=p=>t("click",p))},[c.createVNode(c.unref(_u),{size:c.unref(o)==="lg"?"md":c.unref(o)},{default:c.withCtx(()=>[f.value?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(f.value),{key:0})):c.createCommentVNode("",!0),c.renderSlot(b.$slots,"default")]),_:3},8,["size"])],10,Go))}}),Jo={class:"sq-button-group"},Xo=c.defineComponent({name:"sq-button-group",__name:"button-group",props:{size:{default:"md"},type:{},round:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},setup(u){const e=u;return c.provide(xe,c.ref({size:c.toRef(e,"size"),type:c.toRef(e,"type"),round:c.toRef(e,"round"),disabled:c.toRef(e,"disabled")})),(t,n)=>(c.openBlock(),c.createElementBlock("div",Jo,[c.renderSlot(t.$slots,"default")]))}}),xe=Symbol("button-group-context-keys"),Qo={class:"sq-card"},Yo={key:0,class:"sq-card-header"},Ko=["textContent"],uc={key:1,class:"sq-card-footer"},ec=c.defineComponent({name:"sq-card",__name:"card",props:{title:{},decorative:{type:Boolean,default:!1}},setup(u){const e=c.useSlots(),t=u;return(n,r)=>(c.openBlock(),c.createElementBlock("section",Qo,[t.title||c.unref(e).title?(c.openBlock(),c.createElementBlock("div",Yo,[c.createElementVNode("h2",{class:c.normalizeClass({"has-decorative":t.decorative}),textContent:c.toDisplayString(t.title)},null,10,Ko),c.renderSlot(n.$slots,"title")])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default"),c.unref(e).footer?(c.openBlock(),c.createElementBlock("div",uc,[c.renderSlot(n.$slots,"footer")])):c.createCommentVNode("",!0)]))}}),tc=["textContent","for"],nc={class:"sq-form-item-content"},rc=["textContent"],oc=c.defineComponent({name:"sq-form-item",__name:"form-item",props:{label:{},labelWidth:{},isRequired:{type:Boolean},showLabel:{type:Boolean},type:{},errorMsg:{}},setup(u){const{nextId:e}=un(),t=u,n=c.ref(`sq-id-${e()}`);c.provide(Vu,n);const r=c.computed(()=>{const o=[];return t.isRequired&&o.push("is-required"),o});return(o,s)=>(c.openBlock(),c.createElementBlock("div",{class:"sq-form-item",style:c.normalizeStyle({"--form-label-width":t.labelWidth})},[t.label||t.showLabel?(c.openBlock(),c.createElementBlock("label",{key:0,class:c.normalizeClass(["sq-form-item-label",r.value]),textContent:c.toDisplayString(t.label),for:t.type!=="custom"?n.value:void 0},null,10,tc)):c.createCommentVNode("",!0),c.createElementVNode("div",nc,[c.renderSlot(o.$slots,"default"),c.createVNode(c.Transition,{appear:"",name:"sq-fade"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("span",{class:"sq-form-item-check",textContent:c.toDisplayString(t.errorMsg)},null,8,rc),[[c.vShow,t.errorMsg]])]),_:1})])],4))}}),cc=c.defineComponent({name:"sq-form",__name:"form",props:c.mergeModels({round:{type:Boolean,default:void 0},showStatusIcon:{type:Boolean},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},labelWidth:{},size:{default:"md"},step:{},showMessage:{type:Boolean,default:!0},hideRequiredAsterisk:{type:Boolean},config:{}},{formData:{required:!0},formDataModifiers:{}}),emits:c.mergeModels(["validate"],["update:formData"]),setup(u,{expose:e,emit:t}){let n={};const r=t,o=u;c.provide(Su,c.ref({size:c.toRef(o,"size"),round:c.toRef(o,"round"),disabled:c.toRef(o,"disabled"),readonly:c.toRef(o,"readonly")}));const s=c.useModel(u,"formData"),i=c.ref({}),a=c.ref([]),l=c.computed(()=>{const m=[];return o.size!=="md"&&m.push(`sq-form--${o.size}`),m}),f=c.computed(()=>{const m=o.step;return m===void 0?o.config:o.config.filter(_=>_.step===void 0?_:Array.isArray(_.step)?_.step.includes(m):_.step===m)});c.onMounted(()=>{n=structuredClone(c.toRaw(s.value))});function d(m){var _;return!o.hideRequiredAsterisk&&((_=m.rule)==null?void 0:_.required)}async function b(m,_,x,w=!0){if(!x)return;const D=x.trigger??"change",q=Array.isArray(D)?"array":"string";if(_){if(q==="array"&&!D.includes(_))return;if(q==="string"&&D!==_)return}const A=s.value[m];console.log(m,_,x,A);let z=!1;return x.validateFunc?z=await p(m,A,x,_):typeof A=="string"&&(z=g(m,A,x)),w&&r("validate",m,z,c.toRaw(a.value)),z}function h(m){return i.value[m]?"error":a.value.includes(m)?"success":void 0}async function p(m,_,x,w){const D=await x.validateFunc(_,w);return D===!0?E(m):D===!1?y(m,"字段验证失败"):D?y(m,D):E(m),D===!0||typeof D=="string"&&!D}function g(m,_,x){return x.required&&!_?(y(m,x.requiredText??"字段必填"),!1):x.pattern&&_&&!x.pattern.test(_)?(y(m,x.patternText??"字段验证失败"),!1):(E(m),!0)}function y(m,_){a.value=a.value.filter(x=>x!==m),i.value[m]=_}function E(m){a.value.push(m),delete i.value[m]}function k(){s.value=structuredClone(n),i.value={},a.value=[],r("validate","SQFORM",!1,c.toRaw(a.value))}function C(m=!0){const x=(m?o.config:f.value).filter(w=>w.type!=="custom"&&w.rule&&!a.value.includes(w.binding)).map(w=>{const D=w;return b(D.binding,void 0,D.rule,!1)});return Promise.all(x).then(w=>(r("validate","SQFORM",!w.includes(!1),c.toRaw(a.value)),w))}return e({resetFields:k,validate:C}),(m,_)=>(c.openBlock(),c.createElementBlock("form",{class:c.normalizeClass(["sq-form",l.value]),style:c.normalizeStyle({"--form-label-width":o.labelWidth})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(f.value,(x,w)=>(c.openBlock(),c.createBlock(oc,{class:c.normalizeClass(x.itemClass),type:x.type,key:w,"label-width":x.labelWidth,label:x.label,"show-label":x.showLabel,"is-required":d(x),"error-msg":o.showMessage?i.value[x.binding]:""},{default:c.withCtx(()=>[x.type==="input"?(c.openBlock(),c.createBlock(c.unref(Dt),c.mergeProps({key:0,ref_for:!0},x.props,{name:x.name,"show-status-icon":o.showStatusIcon,status:h(x.binding),value:s.value[x.binding],"onUpdate:value":D=>s.value[x.binding]=D,onChange:D=>b(x.binding,"change",x.rule),onInput:D=>b(x.binding,"input",x.rule),onBlur:D=>b(x.binding,"blur",x.rule)}),null,16,["name","show-status-icon","status","value","onUpdate:value","onChange","onInput","onBlur"])):x.type==="textarea"?(c.openBlock(),c.createBlock(c.unref(Zt),c.mergeProps({key:1,ref_for:!0},x.props,{name:x.name,status:h(x.binding),value:s.value[x.binding],"onUpdate:value":D=>s.value[x.binding]=D,onChange:D=>b(x.binding,"change",x.rule),onInput:D=>b(x.binding,"input",x.rule),onBlur:D=>b(x.binding,"blur",x.rule)}),null,16,["name","status","value","onUpdate:value","onChange","onInput","onBlur"])):c.renderSlot(m.$slots,x.slot,{key:2})]),_:2},1032,["class","type","label-width","label","show-label","is-required","error-msg"]))),128))],6))}}),Su=Symbol("form-context-keys"),Vu=Symbol("form-item-id-keys"),ic={key:0,class:"sq-input-prefix"},sc=["id","disabled","readonly","placeholder","type","maxlength","minlength","autocomplete","name","autofocus","form","inputmode"],ac={class:"sq-input-suffix"},Dt=c.defineComponent({name:"sq-input",__name:"input",props:c.mergeModels({status:{},round:{type:Boolean,default:void 0},showStatusIcon:{type:Boolean},prefixIcon:{},suffixIcon:{},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},clearable:{type:Boolean},placeholder:{},maxlength:{},minlength:{},autocomplete:{default:"off"},name:{},form:{},inputmode:{},autofocus:{type:Boolean},type:{default:"text"},size:{}},{value:{default:""},valueModifiers:{}}),emits:c.mergeModels(["focus","blur","input","change"],["update:value"]),setup(u,{expose:e,emit:t}){const n=c.useSlots(),r=t,o=u,{inputSize:s,inputRound:i,inputDisabled:a,inputReadonly:l,id:f}=Zo(o),d=c.useModel(u,"value"),b=c.ref(!1),h=c.ref(!1),p=c.shallowRef(null),g=c.computed(()=>{const B=[],L=c.unref(s),M=c.unref(i),K=c.unref(a);return L!=="md"&&B.push(`sq-input--${L}`),o.status&&B.push(`is-${o.status}`),M&&B.push("is-round"),K&&B.push("is-disabled"),B}),y=c.computed(()=>c.unref(h)?z0:U0),E=c.computed(()=>c.unref(h)?"text":o.type),k=c.computed(()=>n.prefix||o.prefixIcon),C=c.computed(()=>c.unref(b)&&c.unref(d).length),m=c.computed(()=>c.unref(C)&&o.clearable),_=c.computed(()=>c.unref(C)&&o.type==="password"),x=c.computed(()=>{const B=o.showStatusIcon&&o.status;return n.suffix||B||o.suffixIcon}),w=c.computed(()=>c.unref(_)||c.unref(m)||c.unref(x)),D=c.computed(()=>{if(o.showStatusIcon&&o.status)switch(o.status){case"success":return s0;case"warn":return J0;case"error":return _0}return o.suffixIcon});function q(B){r("focus",B),!c.unref(l)&&(b.value=!0)}function A(B){r("blur",B),!c.unref(l)&&(b.value=!1)}function z(){setTimeout(P)}function ou(){d.value=""}function ku(){h.value=!h.value}function P(){var B;(B=p.value)==null||B.focus()}function j(){var B;b.value=!1,(B=p.value)==null||B.blur()}return e({focus:P,blur:j}),(B,L)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-input",g.value]),onMousedown:z},[k.value?(c.openBlock(),c.createElementBlock("span",ic,[c.renderSlot(B.$slots,"prefix",{},()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(o.prefixIcon)))])])):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":L[0]||(L[0]=M=>d.value=M),id:c.unref(f),class:"sq-input-inner",disabled:c.unref(a),readonly:c.unref(l),placeholder:o.placeholder,type:E.value,maxlength:o.maxlength,minlength:o.minlength,autocomplete:o.autocomplete,name:o.name,autofocus:o.autofocus,form:o.form,inputmode:o.inputmode,ref_key:"inputRef",ref:p,onFocus:q,onBlur:A,onInput:L[1]||(L[1]=M=>r("input",M)),onChange:L[2]||(L[2]=M=>r("change",M))},null,40,sc),[[c.vModelDynamic,d.value]]),c.withDirectives(c.createElementVNode("span",ac,[c.withDirectives((c.openBlock(),c.createBlock(c.resolveDynamicComponent(y.value),{class:"sq-input-suffix-pwd",onMousedown:ku},null,544)),[[c.vShow,_.value]]),c.withDirectives(c.createVNode(c.unref(b0),{class:"sq-input-suffix-clear",onMousedown:ou},null,512),[[c.vShow,m.value]]),c.renderSlot(B.$slots,"suffix",{},()=>[D.value?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(D.value),{key:0,class:c.normalizeClass({"sq-input-suffix-status":o.showStatusIcon})},null,8,["class"])):c.createCommentVNode("",!0)])],512),[[c.vShow,w.value]])],34))}}),lc=["id"],fc=["textContent"],dc=c.defineComponent({name:"sq-message",__name:"message",props:{message:{},type:{default:"info"},offsetTop:{},onDestroy:{},onClose:{},closeAfter:{default:3e3},id:{}},setup(u,{expose:e}){const t=u,n=c.ref(!0),r=c.computed(()=>{switch(t.type){case"primary":case"info":return qe;case"success":return Se;case"warn":return Me;case"error":return ze;default:return}});c.onMounted(()=>{setTimeout(o,t.closeAfter)});function o(){n.value=!1}return e({close:o}),(s,i)=>(c.openBlock(),c.createBlock(c.Transition,{appear:"",name:"sq-zoom-top",onBeforeLeave:t.onClose,onAfterLeave:t.onDestroy},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(["sq-message",`is-${t.type}`]),id:t.id,style:c.normalizeStyle({top:`${t.offsetTop}px`})},[c.createVNode(c.unref(_u),{class:"sq-message-main"},{default:c.withCtx(()=>[t.type&&r.value?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.value),{key:0,class:"sq-message-icon"})):c.createCommentVNode("",!0),c.createElementVNode("div",{class:"sq-message-content",textContent:c.toDisplayString(t.message)},null,8,fc)]),_:1}),i[0]||(i[0]=c.createElementVNode("div",{class:"sq-message-progress"},null,-1))],14,lc),[[c.vShow,n.value]])]),_:1},8,["onBeforeLeave","onAfterLeave"]))}}),{nextZIndex:pc}=Le(),cu=[],hc=["primary","success","info","warn","error"],bc=document.documentElement,mc=getComputedStyle(bc),ge=parseInt(mc.getPropertyValue("--sq-padding-md"));let xc=0;const _e=(u={})=>{const e=`sq-message-${xc++}`;let t=document.querySelector(".sq-message-wrap");t||(t=document.createElement("div"),t.classList.add("sq-message-wrap"),document.body.appendChild(t)),t.style.zIndex=pc().toString();let n=ge;cu.forEach(l=>{var f;n+=(((f=l.vm.el)==null?void 0:f.offsetHeight)||0)+ge});const r={type:"info",...u,offsetTop:n,id:e},o=document.createElement("div"),s=r.onClose;r.onClose=()=>{s==null||s();const l=cu.findIndex(h=>h.vm.component.props.id===a.component.props.id),d=cu.splice(l,1)[0].vm.el.offsetHeight;if(!(cu.length<1))for(let h=l;h<cu.length;h++){const p=cu[h];let g=Number(parseInt(p.vm.el.style.top));g-=d,g-=ge,p.vm.component.props.offsetTop=g}};const i=r.onDestroy;r.onDestroy=()=>{i==null||i(),c.render(null,o)};const a=c.createVNode(dc,r);return c.render(a,o),cu.push({vm:a}),t.appendChild(o.firstElementChild),{close:()=>{var l,f;(f=(l=a.component)==null?void 0:l.exposed)==null||f.close()}}};hc.forEach(u=>{_e[u]=(e={})=>(typeof e=="string"&&(e={message:e}),_e({...e,type:u}))});const gc=_e,_c=c.defineComponent({name:"sq-pagination-prev",__name:"pagination-prev",props:c.mergeModels({disabled:{type:Boolean},size:{}},{current:{required:!0},currentModifiers:{}}),emits:["update:current"],setup(u){const e=u,t=c.useModel(u,"current"),n=r=>{t.value+=r};return(r,o)=>(c.openBlock(),c.createBlock(c.unref(Bu),{icon:c.unref(Xt),size:e.size,disabled:t.value===1||e.disabled,onClick:o[0]||(o[0]=s=>n(-1))},null,8,["icon","size","disabled"]))}}),kc=c.defineComponent({name:"sq-pagination-prev",__name:"pagination-next",props:c.mergeModels({disabled:{type:Boolean},size:{}},{current:{required:!0},currentModifiers:{}}),emits:["update:current"],setup(u){const e=u,t=c.useModel(u,"current"),n=r=>{t.value+=r};return(r,o)=>(c.openBlock(),c.createBlock(c.unref(Bu),{icon:c.unref(u0),size:e.size,disabled:t.value===1||e.disabled,onClick:o[0]||(o[0]=s=>n(1))},null,8,["icon","size","disabled"]))}}),yc={class:"sq-pagination-pager"},Cc=c.defineComponent({__name:"pagination-pager",props:c.mergeModels({disabled:{type:Boolean},size:{},list:{}},{current:{required:!0},currentModifiers:{}}),emits:["update:current"],setup(u){const e=u,t=c.useModel(u,"current"),n=r=>{t.value=r};return(r,o)=>(c.openBlock(),c.createElementBlock("div",yc,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.list,s=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[s?(c.openBlock(),c.createBlock(c.unref(Bu),{key:0,type:t.value===s?"primary":void 0,size:e.size,disabled:e.disabled,onClick:i=>n(s)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s),1)]),_:2},1032,["type","size","disabled","onClick"])):(c.openBlock(),c.createBlock(c.unref(Bu),{key:1,icon:c.unref(A0),size:e.size,disabled:""},null,8,["icon","size"]))],64))),128))]))}}),Ec={class:"sq-pagination"},wc=c.defineComponent({name:"sq-pagination",__name:"pagination",props:c.mergeModels({total:{default:0},disabled:{type:Boolean,default:!1},size:{},layout:{},pagerCount:{default:5}},{current:{default:1},currentModifiers:{},pageSize:{default:10},pageSizeModifiers:{}}),emits:["update:current","update:pageSize"],setup(u){const e=u,t=c.useModel(u,"current"),n=c.useModel(u,"pageSize"),r=c.computed(()=>Math.ceil(e.total/n.value)||1),o=c.computed(()=>{const i=[],a=Math.floor(e.pagerCount/2)-1;let l=t.value-a,f=t.value+a;l<2&&(l=2,f=l+a*2),f>r.value-1&&(f=r.value-1,l=f-a*2);for(let d=1;d<=r.value;d++)d===1||d===r.value||d>=l&&d<=f?i.push(d):(d===l-1||d===f+1)&&i.push(0);return i}),s=c.computed(()=>{const i=e.layout??["prev","pager","next"],a=[];for(const l of i)switch(l){case"prev":a.push(_c);break;case"pager":a.push(Cc);break;case"next":a.push(kc);break}return a});return(i,a)=>(c.openBlock(),c.createElementBlock("div",Ec,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,(l,f)=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(l),{key:f,size:e.size,disabled:e.disabled,list:o.value,current:t.value,"onUpdate:current":a[0]||(a[0]=d=>t.value=d)},null,40,["size","disabled","list","current"]))),128))]))}}),ke=Math.min,bu=Math.max,ju=Math.round,Hu=Math.floor,X=u=>({x:u,y:u}),Dc={left:"right",right:"left",bottom:"top",top:"bottom"},Ac={start:"end",end:"start"};function ye(u,e){return typeof u=="function"?u(e):u}function mu(u){return u.split("-")[0]}function Uu(u){return u.split("-")[1]}function Fc(u){return u==="x"?"y":"x"}function At(u){return u==="y"?"height":"width"}const Bc=new Set(["top","bottom"]);function iu(u){return Bc.has(mu(u))?"y":"x"}function Ft(u){return Fc(iu(u))}function Sc(u,e,t){t===void 0&&(t=!1);const n=Uu(u),r=Ft(u),o=At(r);let s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Zu(s)),[s,Zu(s)]}function zc(u){const e=Zu(u);return[Ce(u),e,Ce(e)]}function Ce(u){return u.replace(/start|end/g,e=>Ac[e])}const Bt=["left","right"],St=["right","left"],qc=["top","bottom"],Mc=["bottom","top"];function Tc(u,e,t){switch(u){case"top":case"bottom":return t?e?St:Bt:e?Bt:St;case"left":case"right":return e?qc:Mc;default:return[]}}function Rc(u,e,t,n){const r=Uu(u);let o=Tc(mu(u),t==="start",n);return r&&(o=o.map(s=>s+"-"+r),e&&(o=o.concat(o.map(Ce)))),o}function Zu(u){return u.replace(/left|right|bottom|top/g,e=>Dc[e])}function Lc(u){return{top:0,right:0,bottom:0,left:0,...u}}function Ic(u){return typeof u!="number"?Lc(u):{top:u,right:u,bottom:u,left:u}}function Wu(u){const{x:e,y:t,width:n,height:r}=u;return{width:n,height:r,top:t,left:e,right:e+n,bottom:t+r,x:e,y:t}}function zt(u,e,t){let{reference:n,floating:r}=u;const o=iu(e),s=Ft(e),i=At(s),a=mu(e),l=o==="y",f=n.x+n.width/2-r.width/2,d=n.y+n.height/2-r.height/2,b=n[i]/2-r[i]/2;let h;switch(a){case"top":h={x:f,y:n.y-r.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-r.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Uu(e)){case"start":h[s]-=b*(t&&l?-1:1);break;case"end":h[s]+=b*(t&&l?-1:1);break}return h}const Nc=async(u,e,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:s}=t,i=o.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:u,floating:e,strategy:r}),{x:f,y:d}=zt(l,n,a),b=n,h={},p=0;for(let g=0;g<i.length;g++){const{name:y,fn:E}=i[g],{x:k,y:C,data:m,reset:_}=await E({x:f,y:d,initialPlacement:n,placement:b,strategy:r,middlewareData:h,rects:l,platform:s,elements:{reference:u,floating:e}});f=k??f,d=C??d,h={...h,[y]:{...h[y],...m}},_&&p<=50&&(p++,typeof _=="object"&&(_.placement&&(b=_.placement),_.rects&&(l=_.rects===!0?await s.getElementRects({reference:u,floating:e,strategy:r}):_.rects),{x:f,y:d}=zt(l,b,a)),g=-1)}return{x:f,y:d,placement:b,strategy:r,middlewareData:h}};async function $c(u,e){var t;e===void 0&&(e={});const{x:n,y:r,platform:o,rects:s,elements:i,strategy:a}=u,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:b=!1,padding:h=0}=ye(e,u),p=Ic(h),y=i[b?d==="floating"?"reference":"floating":d],E=Wu(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(y)))==null||t?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:l,rootBoundary:f,strategy:a})),k=d==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),m=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},_=Wu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:k,offsetParent:C,strategy:a}):k);return{top:(E.top-_.top+p.top)/m.y,bottom:(_.bottom-E.bottom+p.bottom)/m.y,left:(E.left-_.left+p.left)/m.x,right:(_.right-E.right+p.right)/m.x}}const Oc=function(u){return u===void 0&&(u={}),{name:"flip",options:u,async fn(e){var t,n;const{placement:r,middlewareData:o,rects:s,initialPlacement:i,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:b,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=ye(u,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const E=mu(r),k=iu(i),C=mu(i)===i,m=await(a.isRTL==null?void 0:a.isRTL(l.floating)),_=b||(C||!g?[Zu(i)]:zc(i)),x=p!=="none";!b&&x&&_.push(...Rc(i,g,p,m));const w=[i,..._],D=await $c(e,y),q=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&q.push(D[E]),d){const P=Sc(r,s,m);q.push(D[P[0]],D[P[1]])}if(A=[...A,{placement:r,overflows:q}],!q.every(P=>P<=0)){var z,ou;const P=(((z=o.flip)==null?void 0:z.index)||0)+1,j=w[P];if(j&&(!(d==="alignment"?k!==iu(j):!1)||A.every(M=>iu(M.placement)===k?M.overflows[0]>0:!0)))return{data:{index:P,overflows:A},reset:{placement:j}};let B=(ou=A.filter(L=>L.overflows[0]<=0).sort((L,M)=>L.overflows[1]-M.overflows[1])[0])==null?void 0:ou.placement;if(!B)switch(h){case"bestFit":{var ku;const L=(ku=A.filter(M=>{if(x){const K=iu(M.placement);return K===k||K==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(K=>K>0).reduce((K,Ri)=>K+Ri,0)]).sort((M,K)=>M[1]-K[1])[0])==null?void 0:ku[0];L&&(B=L);break}case"initialPlacement":B=i;break}if(r!==B)return{reset:{placement:B}}}return{}}}},Pc=new Set(["left","top"]);async function vc(u,e){const{placement:t,platform:n,elements:r}=u,o=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=mu(t),i=Uu(t),a=iu(t)==="y",l=Pc.has(s)?-1:1,f=o&&a?-1:1,d=ye(e,u);let{mainAxis:b,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof p=="number"&&(h=i==="end"?p*-1:p),a?{x:h*f,y:b*l}:{x:b*l,y:h*f}}const Vc=function(u){return u===void 0&&(u=0),{name:"offset",options:u,async fn(e){var t,n;const{x:r,y:o,placement:s,middlewareData:i}=e,a=await vc(e,u);return s===((t=i.offset)==null?void 0:t.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:r+a.x,y:o+a.y,data:{...a,placement:s}}}}};function Gu(){return typeof window<"u"}function su(u){return Ee(u)?(u.nodeName||"").toLowerCase():"#document"}function O(u){var e;return(u==null||(e=u.ownerDocument)==null?void 0:e.defaultView)||window}function Q(u){var e;return(e=(Ee(u)?u.ownerDocument:u.document)||window.document)==null?void 0:e.documentElement}function Ee(u){return Gu()?u instanceof Node||u instanceof O(u).Node:!1}function H(u){return Gu()?u instanceof Element||u instanceof O(u).Element:!1}function Y(u){return Gu()?u instanceof HTMLElement||u instanceof O(u).HTMLElement:!1}function qt(u){return!Gu()||typeof ShadowRoot>"u"?!1:u instanceof ShadowRoot||u instanceof O(u).ShadowRoot}const jc=new Set(["inline","contents"]);function zu(u){const{overflow:e,overflowX:t,overflowY:n,display:r}=U(u);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!jc.has(r)}const Hc=new Set(["table","td","th"]);function Uc(u){return Hc.has(su(u))}const Zc=[":popover-open",":modal"];function Ju(u){return Zc.some(e=>{try{return u.matches(e)}catch{return!1}})}const Wc=["transform","translate","scale","rotate","perspective"],Gc=["transform","translate","scale","rotate","perspective","filter"],Jc=["paint","layout","strict","content"];function we(u){const e=De(),t=H(u)?U(u):u;return Wc.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||Gc.some(n=>(t.willChange||"").includes(n))||Jc.some(n=>(t.contain||"").includes(n))}function Xc(u){let e=ru(u);for(;Y(e)&&!xu(e);){if(we(e))return e;if(Ju(e))return null;e=ru(e)}return null}function De(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qc=new Set(["html","body","#document"]);function xu(u){return Qc.has(su(u))}function U(u){return O(u).getComputedStyle(u)}function Xu(u){return H(u)?{scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}:{scrollLeft:u.scrollX,scrollTop:u.scrollY}}function ru(u){if(su(u)==="html")return u;const e=u.assignedSlot||u.parentNode||qt(u)&&u.host||Q(u);return qt(e)?e.host:e}function Mt(u){const e=ru(u);return xu(e)?u.ownerDocument?u.ownerDocument.body:u.body:Y(e)&&zu(e)?e:Mt(e)}function qu(u,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Mt(u),o=r===((n=u.ownerDocument)==null?void 0:n.body),s=O(r);if(o){const i=Ae(s);return e.concat(s,s.visualViewport||[],zu(r)?r:[],i&&t?qu(i):[])}return e.concat(r,qu(r,[],t))}function Ae(u){return u.parent&&Object.getPrototypeOf(u.parent)?u.frameElement:null}function Tt(u){const e=U(u);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const r=Y(u),o=r?u.offsetWidth:t,s=r?u.offsetHeight:n,i=ju(t)!==o||ju(n)!==s;return i&&(t=o,n=s),{width:t,height:n,$:i}}function Fe(u){return H(u)?u:u.contextElement}function gu(u){const e=Fe(u);if(!Y(e))return X(1);const t=e.getBoundingClientRect(),{width:n,height:r,$:o}=Tt(e);let s=(o?ju(t.width):t.width)/n,i=(o?ju(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Yc=X(0);function Rt(u){const e=O(u);return!De()||!e.visualViewport?Yc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Kc(u,e,t){return e===void 0&&(e=!1),!t||e&&t!==O(u)?!1:e}function au(u,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=u.getBoundingClientRect(),o=Fe(u);let s=X(1);e&&(n?H(n)&&(s=gu(n)):s=gu(u));const i=Kc(o,t,n)?Rt(o):X(0);let a=(r.left+i.x)/s.x,l=(r.top+i.y)/s.y,f=r.width/s.x,d=r.height/s.y;if(o){const b=O(o),h=n&&H(n)?O(n):n;let p=b,g=Ae(p);for(;g&&n&&h!==p;){const y=gu(g),E=g.getBoundingClientRect(),k=U(g),C=E.left+(g.clientLeft+parseFloat(k.paddingLeft))*y.x,m=E.top+(g.clientTop+parseFloat(k.paddingTop))*y.y;a*=y.x,l*=y.y,f*=y.x,d*=y.y,a+=C,l+=m,p=O(g),g=Ae(p)}}return Wu({width:f,height:d,x:a,y:l})}function Qu(u,e){const t=Xu(u).scrollLeft;return e?e.left+t:au(Q(u)).left+t}function Lt(u,e){const t=u.getBoundingClientRect(),n=t.left+e.scrollLeft-Qu(u,t),r=t.top+e.scrollTop;return{x:n,y:r}}function ui(u){let{elements:e,rect:t,offsetParent:n,strategy:r}=u;const o=r==="fixed",s=Q(n),i=e?Ju(e.floating):!1;if(n===s||i&&o)return t;let a={scrollLeft:0,scrollTop:0},l=X(1);const f=X(0),d=Y(n);if((d||!d&&!o)&&((su(n)!=="body"||zu(s))&&(a=Xu(n)),Y(n))){const h=au(n);l=gu(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const b=s&&!d&&!o?Lt(s,a):X(0);return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-a.scrollLeft*l.x+f.x+b.x,y:t.y*l.y-a.scrollTop*l.y+f.y+b.y}}function ei(u){return Array.from(u.getClientRects())}function ti(u){const e=Q(u),t=Xu(u),n=u.ownerDocument.body,r=bu(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=bu(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Qu(u);const i=-t.scrollTop;return U(n).direction==="rtl"&&(s+=bu(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:s,y:i}}const It=25;function ni(u,e){const t=O(u),n=Q(u),r=t.visualViewport;let o=n.clientWidth,s=n.clientHeight,i=0,a=0;if(r){o=r.width,s=r.height;const f=De();(!f||f&&e==="fixed")&&(i=r.offsetLeft,a=r.offsetTop)}const l=Qu(n);if(l<=0){const f=n.ownerDocument,d=f.body,b=getComputedStyle(d),h=f.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,p=Math.abs(n.clientWidth-d.clientWidth-h);p<=It&&(o-=p)}else l<=It&&(o+=l);return{width:o,height:s,x:i,y:a}}const ri=new Set(["absolute","fixed"]);function oi(u,e){const t=au(u,!0,e==="fixed"),n=t.top+u.clientTop,r=t.left+u.clientLeft,o=Y(u)?gu(u):X(1),s=u.clientWidth*o.x,i=u.clientHeight*o.y,a=r*o.x,l=n*o.y;return{width:s,height:i,x:a,y:l}}function Nt(u,e,t){let n;if(e==="viewport")n=ni(u,t);else if(e==="document")n=ti(Q(u));else if(H(e))n=oi(e,t);else{const r=Rt(u);n={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Wu(n)}function $t(u,e){const t=ru(u);return t===e||!H(t)||xu(t)?!1:U(t).position==="fixed"||$t(t,e)}function ci(u,e){const t=e.get(u);if(t)return t;let n=qu(u,[],!1).filter(i=>H(i)&&su(i)!=="body"),r=null;const o=U(u).position==="fixed";let s=o?ru(u):u;for(;H(s)&&!xu(s);){const i=U(s),a=we(s);!a&&i.position==="fixed"&&(r=null),(o?!a&&!r:!a&&i.position==="static"&&!!r&&ri.has(r.position)||zu(s)&&!a&&$t(u,s))?n=n.filter(f=>f!==s):r=i,s=ru(s)}return e.set(u,n),n}function ii(u){let{element:e,boundary:t,rootBoundary:n,strategy:r}=u;const s=[...t==="clippingAncestors"?Ju(e)?[]:ci(e,this._c):[].concat(t),n],i=s[0],a=s.reduce((l,f)=>{const d=Nt(e,f,r);return l.top=bu(d.top,l.top),l.right=ke(d.right,l.right),l.bottom=ke(d.bottom,l.bottom),l.left=bu(d.left,l.left),l},Nt(e,i,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function si(u){const{width:e,height:t}=Tt(u);return{width:e,height:t}}function ai(u,e,t){const n=Y(e),r=Q(e),o=t==="fixed",s=au(u,!0,o,e);let i={scrollLeft:0,scrollTop:0};const a=X(0);function l(){a.x=Qu(r)}if(n||!n&&!o)if((su(e)!=="body"||zu(r))&&(i=Xu(e)),n){const h=au(e,!0,o,e);a.x=h.x+e.clientLeft,a.y=h.y+e.clientTop}else r&&l();o&&!n&&r&&l();const f=r&&!n&&!o?Lt(r,i):X(0),d=s.left+i.scrollLeft-a.x-f.x,b=s.top+i.scrollTop-a.y-f.y;return{x:d,y:b,width:s.width,height:s.height}}function Be(u){return U(u).position==="static"}function Ot(u,e){if(!Y(u)||U(u).position==="fixed")return null;if(e)return e(u);let t=u.offsetParent;return Q(u)===t&&(t=t.ownerDocument.body),t}function Pt(u,e){const t=O(u);if(Ju(u))return t;if(!Y(u)){let r=ru(u);for(;r&&!xu(r);){if(H(r)&&!Be(r))return r;r=ru(r)}return t}let n=Ot(u,e);for(;n&&Uc(n)&&Be(n);)n=Ot(n,e);return n&&xu(n)&&Be(n)&&!we(n)?t:n||Xc(u)||t}const li=async function(u){const e=this.getOffsetParent||Pt,t=this.getDimensions,n=await t(u.floating);return{reference:ai(u.reference,await e(u.floating),u.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fi(u){return U(u).direction==="rtl"}const di={convertOffsetParentRelativeRectToViewportRelativeRect:ui,getDocumentElement:Q,getClippingRect:ii,getOffsetParent:Pt,getElementRects:li,getClientRects:ei,getDimensions:si,getScale:gu,isElement:H,isRTL:fi};function vt(u,e){return u.x===e.x&&u.y===e.y&&u.width===e.width&&u.height===e.height}function pi(u,e){let t=null,n;const r=Q(u);function o(){var i;clearTimeout(n),(i=t)==null||i.disconnect(),t=null}function s(i,a){i===void 0&&(i=!1),a===void 0&&(a=1),o();const l=u.getBoundingClientRect(),{left:f,top:d,width:b,height:h}=l;if(i||e(),!b||!h)return;const p=Hu(d),g=Hu(r.clientWidth-(f+b)),y=Hu(r.clientHeight-(d+h)),E=Hu(f),C={rootMargin:-p+"px "+-g+"px "+-y+"px "+-E+"px",threshold:bu(0,ke(1,a))||1};let m=!0;function _(x){const w=x[0].intersectionRatio;if(w!==a){if(!m)return s();w?s(!1,w):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!vt(l,u.getBoundingClientRect())&&s(),m=!1}try{t=new IntersectionObserver(_,{...C,root:r.ownerDocument})}catch{t=new IntersectionObserver(_,C)}t.observe(u)}return s(!0),o}function hi(u,e,t,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,l=Fe(u),f=r||o?[...l?qu(l):[],...qu(e)]:[];f.forEach(E=>{r&&E.addEventListener("scroll",t,{passive:!0}),o&&E.addEventListener("resize",t)});const d=l&&i?pi(l,t):null;let b=-1,h=null;s&&(h=new ResizeObserver(E=>{let[k]=E;k&&k.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(e)})),t()}),l&&!a&&h.observe(l),h.observe(e));let p,g=a?au(u):null;a&&y();function y(){const E=au(u);g&&!vt(g,E)&&t(),g=E,p=requestAnimationFrame(y)}return t(),()=>{var E;f.forEach(k=>{r&&k.removeEventListener("scroll",t),o&&k.removeEventListener("resize",t)}),d==null||d(),(E=h)==null||E.disconnect(),h=null,a&&cancelAnimationFrame(p)}}const bi=Vc,mi=Oc,xi=(u,e,t)=>{const n=new Map,r={platform:di,...t},o={...r.platform,_c:n};return Nc(u,e,{...r,platform:o})};function gi(u){return u!=null&&typeof u=="object"&&"$el"in u}function Vt(u){if(gi(u)){const e=u.$el;return Ee(e)&&su(e)==="#comment"?null:e}return u}function Mu(u){return typeof u=="function"?u():c.unref(u)}function jt(u){return typeof window>"u"?1:(u.ownerDocument.defaultView||window).devicePixelRatio||1}function Ht(u,e){const t=jt(u);return Math.round(e*t)/t}function _i(u,e,t){t===void 0&&(t={});const n=t.whileElementsMounted,r=c.computed(()=>{var w;return(w=Mu(t.open))!=null?w:!0}),o=c.computed(()=>Mu(t.middleware)),s=c.computed(()=>{var w;return(w=Mu(t.placement))!=null?w:"bottom"}),i=c.computed(()=>{var w;return(w=Mu(t.strategy))!=null?w:"absolute"}),a=c.computed(()=>{var w;return(w=Mu(t.transform))!=null?w:!0}),l=c.computed(()=>Vt(u.value)),f=c.computed(()=>Vt(e.value)),d=c.ref(0),b=c.ref(0),h=c.ref(i.value),p=c.ref(s.value),g=c.shallowRef({}),y=c.ref(!1),E=c.computed(()=>{const w={position:h.value,left:"0",top:"0"};if(!f.value)return w;const D=Ht(f.value,d.value),q=Ht(f.value,b.value);return a.value?{...w,transform:"translate("+D+"px, "+q+"px)",...jt(f.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:D+"px",top:q+"px"}});let k;function C(){if(l.value==null||f.value==null)return;const w=r.value;xi(l.value,f.value,{middleware:o.value,placement:s.value,strategy:i.value}).then(D=>{d.value=D.x,b.value=D.y,h.value=D.strategy,p.value=D.placement,g.value=D.middlewareData,y.value=w!==!1})}function m(){typeof k=="function"&&(k(),k=void 0)}function _(){if(m(),n===void 0){C();return}if(l.value!=null&&f.value!=null){k=n(l.value,f.value,C);return}}function x(){r.value||(y.value=!1)}return c.watch([o,s,i,r],C,{flush:"sync"}),c.watch([l,f],_,{flush:"sync"}),c.watch(r,x,{flush:"sync"}),c.getCurrentScope()&&c.onScopeDispose(m),{x:c.shallowReadonly(d),y:c.shallowReadonly(b),strategy:c.shallowReadonly(h),placement:c.shallowReadonly(p),middlewareData:c.shallowReadonly(g),isPositioned:c.shallowReadonly(y),floatingStyles:E,update:C}}const ki=c.defineComponent({name:"sq-popover",__name:"popover",props:c.mergeModels({placement:{default:"top"},offset:{default:10},teleported:{type:Boolean,default:!0},trigger:{default:"hover"},showAfter:{default:0},hideAfter:{default:300},disabled:{type:Boolean},transition:{default:"sq-fade"},popoverClass:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(u){const{nextZIndex:e}=Le();let t;const n=u,r=c.useModel(u,"visible"),o=c.ref(0),s=c.shallowRef(null),i=c.shallowRef(null),{floatingStyles:a}=_i(s,i,{placement:n.placement,whileElementsMounted:hi,transform:!1,middleware:[bi(n.offset),mi()]});c.watch(r,g=>{g&&(o.value=e())}),c.onBeforeUnmount(()=>{p(),document.removeEventListener("click",h)});function l(){n.trigger!=="hover"||n.disabled||(p(),t=setTimeout(()=>{b(!1)},n.showAfter))}function f(){n.trigger==="hover"&&(p(),t=setTimeout(()=>{h()},n.hideAfter))}function d(g){n.trigger==="click"&&!n.disabled&&!r.value&&(g.stopPropagation(),b())}function b(g=!0){r.value=!0,g&&document.addEventListener("click",h)}function h(){r.value=!1,document.removeEventListener("click",h)}function p(){t&&(clearTimeout(t),t=void 0)}return(g,y)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("span",{class:c.normalizeClass(["sq-popover-trigger",g.$attrs.class]),style:c.normalizeStyle(g.$attrs.style),ref_key:"triggerRef",ref:s,onMouseenter:l,onMouseleave:f,onClick:d},[c.renderSlot(g.$slots,"reference")],38),(c.openBlock(),c.createBlock(c.Teleport,{to:"body",disabled:!n.teleported},[c.createVNode(c.Transition,{name:n.transition},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(["sq-popover",g.popoverClass]),style:c.normalizeStyle({...c.unref(a),zIndex:o.value}),ref_key:"popverRef",ref:i,onClick:y[0]||(y[0]=c.withModifiers(()=>{},["stop"]))},[c.renderSlot(g.$slots,"default")],6),[[c.vShow,r.value]])]),_:3},8,["name"])],8,["disabled"]))],64))}}),yi={key:0,viewBox:"0 0 100 100",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Ci={key:1,class:"sq-progress-label"},Ei=["textContent"],Ut=c.defineComponent({name:"sq-progress",__name:"progress",props:{value:{},min:{default:0},max:{default:100},stroke:{default:4},color:{},type:{default:"primary"},theme:{default:"line"},label:{type:Boolean,default:!0}},setup(u){const e=new ResizeObserver(l),t=u,n=c.ref(100),r=c.shallowRef(null),o=c.computed(()=>{const f=[];return t.color||f.push(`is-${t.type}`),t.theme!=="line"&&f.push(`is-${t.theme}`),f}),s=c.computed(()=>{const f=t.max-t.min;return(t.value-t.min)*100/f}),i=c.computed(()=>`${Math.round(s.value*10)/10} %`),a=c.computed(()=>{const f={};if(f["--progress-stroke"]=`${t.stroke}px`,t.theme==="line")f["--progress-value"]=`${s.value}%`;else if(r.value){const d=100/n.value*t.stroke,b=(100-d)/2,h=Math.PI*b*2,p=s.value/100;f["--progress-circle-r"]=`${b}px`,f["--progress-circle-l"]=`${h}px`,f["--progress-circle-stroke"]=`${d}px`,f["--progress-value"]=`${h*p}`,s.value===0&&(f["--progress-circle-opaciry"]="0")}if(t.color){const b=typeof t.color=="string"?t.color:t.color(s.value);f["--progress-color"]=b}return f});c.onMounted(()=>{e.observe(r.value)}),c.onBeforeUnmount(()=>{e.disconnect()});function l(){n.value=r.value.getBoundingClientRect().width}return(f,d)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-progress",o.value]),ref_key:"progressRef",ref:r,style:c.normalizeStyle(a.value)},[t.theme==="circle"?(c.openBlock(),c.createElementBlock("svg",yi,[...d[0]||(d[0]=[c.createElementVNode("circle",{class:"sq-progress-track",cx:"50",cy:"50"},null,-1),c.createElementVNode("circle",{class:"sq-progress-path",cx:"50",cy:"50"},null,-1)])])):c.createCommentVNode("",!0),t.theme==="circle"&&t.label?(c.openBlock(),c.createElementBlock("div",Ci,[c.renderSlot(f.$slots,"default",{percentage:s.value},()=>[c.createElementVNode("span",{textContent:c.toDisplayString(i.value)},null,8,Ei)])])):c.createCommentVNode("",!0)],6))}}),wi=c.defineComponent({name:"sq-tag",__name:"tag",props:{type:{},theme:{default:"plain"},round:{type:Boolean},size:{default:"md"}},setup(u){const e=u,t=c.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-tag--${e.size}`),e.theme!=="plain"&&e.type&&r.push(`is-${e.theme}`),e.type&&r.push(`is-${e.type}`),e.round&&r.push("is-round"),r}),n=c.computed(()=>e.size==="lg"?"md":"sm");return(r,o)=>(c.openBlock(),c.createBlock(c.unref(_u),{class:c.normalizeClass(["sq-tag",t.value]),size:n.value},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["class","size"]))}}),Di=c.defineComponent({name:"sq-check-tag",__name:"check-tag",props:{checked:{type:Boolean,default:!1},theme:{default:"plain"},type:{default:"primary"},round:{type:Boolean},size:{default:"md"}},emits:["change"],setup(u,{emit:e}){const t=e,n=u,r=c.computed(()=>{const s=[];return n.size!=="md"&&s.push(`sq-tag--${n.size}`),n.theme!=="plain"&&s.push(`is-${n.theme}`),n.type&&s.push(`is-${n.type}`),n.round&&s.push("is-round"),n.checked&&s.push("is-checked"),s}),o=c.computed(()=>n.size==="lg"?"md":"sm");return(s,i)=>(c.openBlock(),c.createBlock(c.unref(_u),{class:c.normalizeClass(["sq-check-tag",r.value]),size:o.value,onClick:i[0]||(i[0]=a=>t("change",!n.checked))},{default:c.withCtx(()=>[c.renderSlot(s.$slots,"default")]),_:3},8,["class","size"]))}}),_u=c.defineComponent({name:"sq-text",__name:"text",props:{rowNum:{default:1},ellipsis:{type:Boolean,default:!1},size:{default:"md"}},setup(u){const e=u,t=c.computed(()=>{const r=[];return e.size!=="md"&&r.push(`sq-text--${e.size}`),e.ellipsis&&r.push(e.rowNum>1?"multi-line":"single-line"),r}),n=c.computed(()=>e.ellipsis?`--row-num: ${e.rowNum}`:"");return(r,o)=>(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(["sq-text",t.value]),style:c.normalizeStyle(n.value)},[c.renderSlot(r.$slots,"default")],6))}}),Ai=["id","rows","cols","disabled","readonly","placeholder","maxlength","minlength","autocomplete","name","autofocus","form","inputmode"],Zt=c.defineComponent({name:"sq-textarea",__name:"textarea",props:c.mergeModels({resize:{default:"both"},rows:{default:2},cols:{default:30},status:{},round:{type:Boolean},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},placeholder:{},maxlength:{},minlength:{},autocomplete:{default:"off"},name:{},form:{},inputmode:{},autofocus:{type:Boolean},type:{},size:{}},{value:{default:""},valueModifiers:{}}),emits:c.mergeModels(["focus","blur","input","change"],["update:value"]),setup(u,{expose:e,emit:t}){const n=t,r=u,{textareaSize:o,textareaRound:s,textareaDisabled:i,textareaReadonly:a,id:l}=Wo(r),f=c.useModel(u,"value"),d=c.shallowRef(null),b=c.computed(()=>{const y=[],E=c.unref(o),k=c.unref(s),C=c.unref(i);return E!=="md"&&y.push(`sq-textarea--${E}`),r.status&&y.push(`is-${r.status}`),k&&y.push("is-round"),C&&y.push("is-disabled"),y}),h=c.computed(()=>c.unref(i)||c.unref(a)?"none":r.resize);function p(){var y;(y=d.value)==null||y.focus()}function g(){var y;(y=d.value)==null||y.blur()}return e({focus:p,blur:g}),(y,E)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-textarea",b.value])},[c.withDirectives(c.createElementVNode("textarea",{"onUpdate:modelValue":E[0]||(E[0]=k=>f.value=k),class:"sq-textarea-inner",id:c.unref(l),style:c.normalizeStyle({resize:h.value}),rows:r.rows,cols:r.cols,disabled:c.unref(i),readonly:c.unref(a),placeholder:r.placeholder,maxlength:r.maxlength,minlength:r.minlength,autocomplete:r.autocomplete,name:r.name,autofocus:r.autofocus,form:r.form,inputmode:r.inputmode,ref_key:"textareaRef",ref:d,onFocus:E[1]||(E[1]=k=>n("focus",k)),onBlur:E[2]||(E[2]=k=>n("blur",k)),onInput:E[3]||(E[3]=k=>n("input",k)),onChange:E[4]||(E[4]=k=>n("change",k))},null,44,Ai),[[c.vModelText,f.value]])],2))}}),Fi=c.defineComponent({name:"sq-timeline",__name:"timeline",props:{align:{default:"left"}},setup(u){const e=u,t=c.computed(()=>{const n=[];return n.push(`align-${e.align}`),n});return(n,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-timeline",t.value])},[c.renderSlot(n.$slots,"default")],2))}}),Bi={class:"sq-timeline-dot"},Si={class:"sq-timeline-content"},zi=["textContent"],qi=["textContent"],Mi={class:"content-info"},Ti=c.defineComponent({name:"sq-timeline-item",__name:"timeline-item",props:{color:{},type:{},icon:{},hollow:{type:Boolean},timestamp:{},theme:{default:"card"},title:{}},setup(u){const e=u,t=c.computed(()=>{const r=[];return e.theme!=="card"&&r.push(`is-${e.theme}`),e.type&&r.push(`is-${e.type}`),e.hollow&&r.push("is-hollow"),r}),n=c.computed(()=>{const r={};return e.color&&(r["--timeline-dot-color"]=e.color),r});return(r,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["sq-timeline-item",t.value]),style:c.normalizeStyle(n.value)},[c.createElementVNode("span",Bi,[e.icon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.icon),{key:0})):c.createCommentVNode("",!0)]),c.createElementVNode("div",Si,[e.title?(c.openBlock(),c.createElementBlock("h2",{key:0,class:"content-title",textContent:c.toDisplayString(e.title)},null,8,zi)):c.createCommentVNode("",!0),e.timestamp?(c.openBlock(),c.createElementBlock("span",{key:1,class:"content-time",textContent:c.toDisplayString(e.timestamp)},null,8,qi)):c.createCommentVNode("",!0),c.createElementVNode("div",Mi,[c.renderSlot(r.$slots,"default")])])],6))}});F.ButtonGroupContextKeys=xe,F.FormContextKeys=Su,F.FormItemIdKeys=Vu,F.SqAlert=K0,F.SqArticle=Oo,F.SqAvatar=Vo,F.SqBacktop=Ho,F.SqButton=Bu,F.SqButtonGroup=Xo,F.SqCard=ec,F.SqCheckTag=Di,F.SqForm=cc,F.SqInput=Dt,F.SqMessage=gc,F.SqPagination=wc,F.SqPopover=ki,F.SqProgress=Ut,F.SqTag=wi,F.SqText=_u,F.SqTextarea=Zt,F.SqTimeline=Fi,F.SqTimelineItem=Ti,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@squirrel-cloud/ui-vue",
3
3
  "description": "松鼠的坚果屋前端VUE框架",
4
4
  "license": "GPL-3.0",
5
- "version": "0.2.36",
5
+ "version": "0.2.38",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "files": [