@quidgest/chatbot 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/components/ChatBot/ChatBot.vue.d.ts +53 -0
  2. package/dist/components/ChatBot/types.d.ts +48 -0
  3. package/dist/components/ChatBotInput/ChatBotInput.vue.d.ts +17 -0
  4. package/dist/components/ChatBotInput/index.d.ts +5 -0
  5. package/dist/components/ChatBotInput/types.d.ts +28 -0
  6. package/dist/components/ChatBotMessage/ChatBotMessage.vue.d.ts +41 -0
  7. package/dist/components/ChatBotMessage/ChatBotMessageButtons.vue.d.ts +21 -0
  8. package/dist/components/ChatBotMessage/index.d.ts +6 -0
  9. package/dist/components/ChatBotMessage/types.d.ts +46 -0
  10. package/dist/components/ChatToolBar/ChatToolBar.vue.d.ts +39 -0
  11. package/dist/components/ChatToolBar/index.d.ts +5 -0
  12. package/dist/components/ChatToolBar/types.d.ts +16 -0
  13. package/dist/components/FieldPreview/FieldPreview.vue.d.ts +17 -0
  14. package/dist/components/FieldPreview/index.d.ts +5 -0
  15. package/dist/components/FieldPreview/types.d.ts +7 -0
  16. package/dist/components/MarkdownRender/MarkdownRender.vue.d.ts +13 -0
  17. package/dist/components/MarkdownRender/index.d.ts +5 -0
  18. package/dist/components/MarkdownRender/types.d.ts +7 -0
  19. package/dist/composables/useChatApi.d.ts +23 -0
  20. package/dist/composables/useChatMessages.d.ts +11 -0
  21. package/dist/composables/useSSE.d.ts +10 -0
  22. package/dist/composables/useTexts.d.ts +26 -0
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +27 -47
  25. package/dist/index.mjs +2651 -8663
  26. package/dist/style.css +1 -1
  27. package/dist/utils/helper.d.ts +1 -0
  28. package/package.json +5 -5
  29. package/src/assets/chatbot_profile.svg +1 -0
  30. package/src/assets/styles/styles.scss +10 -42
  31. package/src/components/ChatBot/ChatBot.vue +375 -0
  32. package/src/components/ChatBot/types.ts +55 -0
  33. package/src/components/ChatBotInput/ChatBotInput.vue +195 -0
  34. package/src/components/ChatBotInput/index.ts +5 -0
  35. package/src/components/ChatBotInput/types.ts +33 -0
  36. package/src/components/ChatBotMessage/ChatBotMessage.vue +139 -0
  37. package/src/components/ChatBotMessage/ChatBotMessageButtons.vue +169 -0
  38. package/src/components/ChatBotMessage/index.ts +8 -0
  39. package/src/components/ChatBotMessage/types.ts +70 -0
  40. package/src/components/ChatToolBar/ChatToolBar.vue +82 -0
  41. package/src/components/ChatToolBar/index.ts +5 -0
  42. package/src/components/ChatToolBar/types.ts +18 -0
  43. package/src/components/FieldPreview/FieldPreview.vue +78 -0
  44. package/src/components/FieldPreview/field-preview.scss +34 -0
  45. package/src/components/FieldPreview/index.ts +5 -0
  46. package/src/components/FieldPreview/types.ts +7 -0
  47. package/src/components/MarkdownRender/MarkdownRender.vue +25 -0
  48. package/src/components/MarkdownRender/index.ts +5 -0
  49. package/src/components/MarkdownRender/markdown-render.scss +24 -0
  50. package/src/components/MarkdownRender/types.ts +7 -0
  51. package/src/components/PulseDots/PulseDots.vue +24 -0
  52. package/src/components/PulseDots/pulse-dots.scss +37 -0
  53. package/src/composables/useChatApi.ts +156 -0
  54. package/src/composables/useChatMessages.ts +58 -0
  55. package/src/composables/useSSE.ts +90 -0
  56. package/src/composables/useTexts.ts +32 -0
  57. package/src/index.ts +1 -1
  58. package/src/utils/helper.ts +12 -0
  59. package/dist/components/CBMessage.vue.d.ts +0 -95
  60. package/dist/components/ChatBot.vue.d.ts +0 -65
  61. package/dist/components/index.d.ts +0 -4
  62. package/dist/types/chatbot.type.d.ts +0 -14
  63. package/dist/types/message.type.d.ts +0 -34
  64. package/dist/types/texts.type.d.ts +0 -3
  65. package/src/assets/chatbot.png +0 -0
  66. package/src/components/CBMessage.vue +0 -276
  67. package/src/components/ChatBot.vue +0 -496
  68. package/src/components/PulseDots.vue +0 -15
  69. package/src/components/index.ts +0 -4
  70. package/src/types/chatbot.type.ts +0 -15
  71. package/src/types/message.type.ts +0 -55
  72. package/src/types/texts.type.ts +0 -3
  73. /package/dist/components/{PulseDots.vue.d.ts → PulseDots/PulseDots.vue.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -1,66 +1,46 @@
1
- (function(a,Ee){typeof exports=="object"&&typeof module<"u"?module.exports=Ee(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ee):(a=typeof globalThis<"u"?globalThis:a||self,a.ChatBotFrontend=Ee(a.vue))})(this,function(a){"use strict";function Ee(t,e){return function(){return t.apply(e,arguments)}}const{toString:Oo}=Object.prototype,{getPrototypeOf:Dt}=Object,{iterator:We,toStringTag:xr}=Symbol,Je=(t=>e=>{const r=Oo.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),re=t=>(t=t.toLowerCase(),e=>Je(e)===t),Qe=t=>e=>typeof e===t,{isArray:_e}=Array,Fe=Qe("undefined");function Po(t){return t!==null&&!Fe(t)&&t.constructor!==null&&!Fe(t.constructor)&&J(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ar=re("ArrayBuffer");function Uo(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ar(t.buffer),e}const zo=Qe("string"),J=Qe("function"),Er=Qe("number"),Ye=t=>t!==null&&typeof t=="object",Mo=t=>t===!0||t===!1,Xe=t=>{if(Je(t)!=="object")return!1;const e=Dt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(xr in t)&&!(We in t)},Vo=re("Date"),jo=re("File"),Go=re("Blob"),$o=re("FileList"),Ho=t=>Ye(t)&&J(t.pipe),Zo=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||J(t.append)&&((e=Je(t))==="formdata"||e==="object"&&J(t.toString)&&t.toString()==="[object FormData]"))},Wo=re("URLSearchParams"),[Jo,Qo,Yo,Xo]=["ReadableStream","Request","Response","Headers"].map(re),Ko=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ie(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),_e(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const s=r?Object.getOwnPropertyNames(t):Object.keys(t),c=s.length;let i;for(n=0;n<c;n++)i=s[n],e.call(null,t[i],i,t)}}function _r(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}const he=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cr=t=>!Fe(t)&&t!==he;function qt(){const{caseless:t}=Cr(this)&&this||{},e={},r=(n,o)=>{const s=t&&_r(e,o)||o;Xe(e[s])&&Xe(n)?e[s]=qt(e[s],n):Xe(n)?e[s]=qt({},n):_e(n)?e[s]=n.slice():e[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Ie(arguments[n],r);return e}const es=(t,e,r,{allOwnKeys:n}={})=>(Ie(e,(o,s)=>{r&&J(o)?t[s]=Ee(o,r):t[s]=o},{allOwnKeys:n}),t),ts=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),rs=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},ns=(t,e,r,n)=>{let o,s,c;const i={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)c=o[s],(!n||n(c,t,e))&&!i[c]&&(e[c]=t[c],i[c]=!0);t=r!==!1&&Dt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},os=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},ss=t=>{if(!t)return null;if(_e(t))return t;let e=t.length;if(!Er(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},cs=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Dt(Uint8Array)),is=(t,e)=>{const n=(t&&t[We]).call(t);let o;for(;(o=n.next())&&!o.done;){const s=o.value;e.call(t,s[0],s[1])}},as=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},ls=re("HTMLFormElement"),us=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Dr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ds=re("RegExp"),qr=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Ie(r,(o,s)=>{let c;(c=e(o,s,t))!==!1&&(n[s]=c||o)}),Object.defineProperties(t,n)},ps=t=>{qr(t,(e,r)=>{if(J(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(J(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},fs=(t,e)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return _e(t)?n(t):n(String(t).split(e)),r},hs=()=>{},ms=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function gs(t){return!!(t&&J(t.append)&&t[xr]==="FormData"&&t[We])}const bs=t=>{const e=new Array(10),r=(n,o)=>{if(Ye(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const s=_e(n)?[]:{};return Ie(n,(c,i)=>{const l=r(c,o+1);!Fe(l)&&(s[i]=l)}),e[o]=void 0,s}}return n};return r(t,0)},ys=re("AsyncFunction"),ws=t=>t&&(Ye(t)||J(t))&&J(t.then)&&J(t.catch),Sr=((t,e)=>t?setImmediate:e?((r,n)=>(he.addEventListener("message",({source:o,data:s})=>{o===he&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),he.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",J(he.postMessage)),ks=typeof queueMicrotask<"u"?queueMicrotask.bind(he):typeof process<"u"&&process.nextTick||Sr,y={isArray:_e,isArrayBuffer:Ar,isBuffer:Po,isFormData:Zo,isArrayBufferView:Uo,isString:zo,isNumber:Er,isBoolean:Mo,isObject:Ye,isPlainObject:Xe,isReadableStream:Jo,isRequest:Qo,isResponse:Yo,isHeaders:Xo,isUndefined:Fe,isDate:Vo,isFile:jo,isBlob:Go,isRegExp:ds,isFunction:J,isStream:Ho,isURLSearchParams:Wo,isTypedArray:cs,isFileList:$o,forEach:Ie,merge:qt,extend:es,trim:Ko,stripBOM:ts,inherits:rs,toFlatObject:ns,kindOf:Je,kindOfTest:re,endsWith:os,toArray:ss,forEachEntry:is,matchAll:as,isHTMLForm:ls,hasOwnProperty:Dr,hasOwnProp:Dr,reduceDescriptors:qr,freezeMethods:ps,toObjectSet:fs,toCamelCase:us,noop:hs,toFiniteNumber:ms,findKey:_r,global:he,isContextDefined:Cr,isSpecCompliantForm:gs,toJSONObject:bs,isAsyncFn:ys,isThenable:ws,setImmediate:Sr,asap:ks,isIterable:t=>t!=null&&J(t[We])};function F(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}y.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.status}}});const Rr=F.prototype,Tr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Tr[t]={value:t}}),Object.defineProperties(F,Tr),Object.defineProperty(Rr,"isAxiosError",{value:!0}),F.from=(t,e,r,n,o,s)=>{const c=Object.create(Rr);return y.toFlatObject(t,c,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),F.call(c,t.message,e,r,n,o),c.cause=t,c.name=t.name,s&&Object.assign(c,s),c};const vs=null;function St(t){return y.isPlainObject(t)||y.isArray(t)}function Lr(t){return y.endsWith(t,"[]")?t.slice(0,-2):t}function Nr(t,e,r){return t?t.concat(e).map(function(o,s){return o=Lr(o),!r&&s?"["+o+"]":o}).join(r?".":""):e}function xs(t){return y.isArray(t)&&!t.some(St)}const As=y.toFlatObject(y,{},null,function(e){return/^is[A-Z]/.test(e)});function Ke(t,e,r){if(!y.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=y.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,g){return!y.isUndefined(g[b])});const n=r.metaTokens,o=r.visitor||d,s=r.dots,c=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&y.isSpecCompliantForm(e);if(!y.isFunction(o))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(y.isDate(h))return h.toISOString();if(!l&&y.isBlob(h))throw new F("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(h)||y.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,b,g){let w=h;if(h&&!g&&typeof h=="object"){if(y.endsWith(b,"{}"))b=n?b:b.slice(0,-2),h=JSON.stringify(h);else if(y.isArray(h)&&xs(h)||(y.isFileList(h)||y.endsWith(b,"[]"))&&(w=y.toArray(h)))return b=Lr(b),w.forEach(function(C,q){!(y.isUndefined(C)||C===null)&&e.append(c===!0?Nr([b],q,s):c===null?b:b+"[]",u(C))}),!1}return St(h)?!0:(e.append(Nr(g,b,s),u(h)),!1)}const p=[],f=Object.assign(As,{defaultVisitor:d,convertValue:u,isVisitable:St});function m(h,b){if(!y.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(h),y.forEach(h,function(w,k){(!(y.isUndefined(w)||w===null)&&o.call(e,w,y.isString(k)?k.trim():k,b,f))===!0&&m(w,b?b.concat(k):[k])}),p.pop()}}if(!y.isObject(t))throw new TypeError("data must be an object");return m(t),e}function Br(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Rt(t,e){this._pairs=[],t&&Ke(t,this,e)}const Fr=Rt.prototype;Fr.append=function(e,r){this._pairs.push([e,r])},Fr.toString=function(e){const r=e?function(n){return e.call(this,n,Br)}:Br;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Es(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ir(t,e,r){if(!e)return t;const n=r&&r.encode||Es;y.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(e,r):s=y.isURLSearchParams(e)?e.toString():new Rt(e,r).toString(n),s){const c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Or{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Pr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_s={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Rt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Tt=typeof window<"u"&&typeof document<"u",Lt=typeof navigator=="object"&&navigator||void 0,Cs=Tt&&(!Lt||["ReactNative","NativeScript","NS"].indexOf(Lt.product)<0),Ds=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qs=Tt&&window.location.href||"http://localhost",Z={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tt,hasStandardBrowserEnv:Cs,hasStandardBrowserWebWorkerEnv:Ds,navigator:Lt,origin:qs},Symbol.toStringTag,{value:"Module"})),..._s};function Ss(t,e){return Ke(t,new Z.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,s){return Z.isNode&&y.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Rs(t){return y.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ts(t){const e={},r=Object.keys(t);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],e[s]=t[s];return e}function Ur(t){function e(r,n,o,s){let c=r[s++];if(c==="__proto__")return!0;const i=Number.isFinite(+c),l=s>=r.length;return c=!c&&y.isArray(o)?o.length:c,l?(y.hasOwnProp(o,c)?o[c]=[o[c],n]:o[c]=n,!i):((!o[c]||!y.isObject(o[c]))&&(o[c]=[]),e(r,n,o[c],s)&&y.isArray(o[c])&&(o[c]=Ts(o[c])),!i)}if(y.isFormData(t)&&y.isFunction(t.entries)){const r={};return y.forEachEntry(t,(n,o)=>{e(Rs(n),o,r,0)}),r}return null}function Ls(t,e,r){if(y.isString(t))try{return(e||JSON.parse)(t),y.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Oe={transitional:Pr,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=y.isObject(e);if(s&&y.isHTMLForm(e)&&(e=new FormData(e)),y.isFormData(e))return o?JSON.stringify(Ur(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)||y.isReadableStream(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ss(e,this.formSerializer).toString();if((i=y.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ke(i?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),Ls(e)):e}],transformResponse:[function(e){const r=this.transitional||Oe.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(y.isResponse(e)||y.isReadableStream(e))return e;if(e&&y.isString(e)&&(n&&!this.responseType||o)){const c=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(i){if(c)throw i.name==="SyntaxError"?F.from(i,F.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],t=>{Oe.headers[t]={}});const Ns=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Bs=t=>{const e={};let r,n,o;return t&&t.split(`
2
- `).forEach(function(c){o=c.indexOf(":"),r=c.substring(0,o).trim().toLowerCase(),n=c.substring(o+1).trim(),!(!r||e[r]&&Ns[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},zr=Symbol("internals");function Pe(t){return t&&String(t).trim().toLowerCase()}function et(t){return t===!1||t==null?t:y.isArray(t)?t.map(et):String(t)}function Fs(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Is=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Nt(t,e,r,n,o){if(y.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!y.isString(e)){if(y.isString(n))return e.indexOf(n)!==-1;if(y.isRegExp(n))return n.test(e)}}function Os(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Ps(t,e){const r=y.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,s,c){return this[n].call(this,e,o,s,c)},configurable:!0})})}let Q=class{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function s(i,l,u){const d=Pe(l);if(!d)throw new Error("header name must be a non-empty string");const p=y.findKey(o,d);(!p||o[p]===void 0||u===!0||u===void 0&&o[p]!==!1)&&(o[p||l]=et(i))}const c=(i,l)=>y.forEach(i,(u,d)=>s(u,d,l));if(y.isPlainObject(e)||e instanceof this.constructor)c(e,r);else if(y.isString(e)&&(e=e.trim())&&!Is(e))c(Bs(e),r);else if(y.isObject(e)&&y.isIterable(e)){let i={},l,u;for(const d of e){if(!y.isArray(d))throw TypeError("Object iterator must return a key-value pair");i[u=d[0]]=(l=i[u])?y.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}c(i,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Pe(e),e){const n=y.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return Fs(o);if(y.isFunction(r))return r.call(this,o,n);if(y.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Pe(e),e){const n=y.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Nt(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function s(c){if(c=Pe(c),c){const i=y.findKey(n,c);i&&(!r||Nt(n,n[i],i,r))&&(delete n[i],o=!0)}}return y.isArray(e)?e.forEach(s):s(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!e||Nt(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){const r=this,n={};return y.forEach(this,(o,s)=>{const c=y.findKey(n,s);if(c){r[c]=et(o),delete r[s];return}const i=e?Os(s):String(s).trim();i!==s&&delete r[s],r[i]=et(o),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return y.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&y.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[zr]=this[zr]={accessors:{}}).accessors,o=this.prototype;function s(c){const i=Pe(c);n[i]||(Ps(o,c),n[i]=!0)}return y.isArray(e)?e.forEach(s):s(e),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors(Q.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),y.freezeMethods(Q);function Bt(t,e){const r=this||Oe,n=e||r,o=Q.from(n.headers);let s=n.data;return y.forEach(t,function(i){s=i.call(r,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function Mr(t){return!!(t&&t.__CANCEL__)}function Ce(t,e,r){F.call(this,t??"canceled",F.ERR_CANCELED,e,r),this.name="CanceledError"}y.inherits(Ce,F,{__CANCEL__:!0});function Vr(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new F("Request failed with status code "+r.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Us(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function zs(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,s=0,c;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),d=n[s];c||(c=u),r[o]=l,n[o]=u;let p=s,f=0;for(;p!==o;)f+=r[p++],p=p%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-c<e)return;const m=d&&u-d;return m?Math.round(f*1e3/m):void 0}}function Ms(t,e){let r=0,n=1e3/e,o,s;const c=(u,d=Date.now())=>{r=d,o=null,s&&(clearTimeout(s),s=null),t.apply(null,u)};return[(...u)=>{const d=Date.now(),p=d-r;p>=n?c(u,d):(o=u,s||(s=setTimeout(()=>{s=null,c(o)},n-p)))},()=>o&&c(o)]}const tt=(t,e,r=3)=>{let n=0;const o=zs(50,250);return Ms(s=>{const c=s.loaded,i=s.lengthComputable?s.total:void 0,l=c-n,u=o(l),d=c<=i;n=c;const p={loaded:c,total:i,progress:i?c/i:void 0,bytes:l,rate:u||void 0,estimated:u&&i&&d?(i-c)/u:void 0,event:s,lengthComputable:i!=null,[e?"download":"upload"]:!0};t(p)},r)},jr=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Gr=t=>(...e)=>y.asap(()=>t(...e)),Vs=Z.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Z.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Z.origin),Z.navigator&&/(msie|trident)/i.test(Z.navigator.userAgent)):()=>!0,js=Z.hasStandardBrowserEnv?{write(t,e,r,n,o,s){const c=[t+"="+encodeURIComponent(e)];y.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),y.isString(n)&&c.push("path="+n),y.isString(o)&&c.push("domain="+o),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gs(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $s(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function $r(t,e,r){let n=!Gs(e);return t&&(n||r==!1)?$s(t,e):e}const Hr=t=>t instanceof Q?{...t}:t;function me(t,e){e=e||{};const r={};function n(u,d,p,f){return y.isPlainObject(u)&&y.isPlainObject(d)?y.merge.call({caseless:f},u,d):y.isPlainObject(d)?y.merge({},d):y.isArray(d)?d.slice():d}function o(u,d,p,f){if(y.isUndefined(d)){if(!y.isUndefined(u))return n(void 0,u,p,f)}else return n(u,d,p,f)}function s(u,d){if(!y.isUndefined(d))return n(void 0,d)}function c(u,d){if(y.isUndefined(d)){if(!y.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function i(u,d,p){if(p in e)return n(u,d);if(p in t)return n(void 0,u)}const l={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:i,headers:(u,d,p)=>o(Hr(u),Hr(d),p,!0)};return y.forEach(Object.keys(Object.assign({},t,e)),function(d){const p=l[d]||o,f=p(t[d],e[d],d);y.isUndefined(f)&&p!==i||(r[d]=f)}),r}const Zr=t=>{const e=me({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:c,auth:i}=e;e.headers=c=Q.from(c),e.url=Ir($r(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),i&&c.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(y.isFormData(r)){if(Z.hasStandardBrowserEnv||Z.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((l=c.getContentType())!==!1){const[u,...d]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];c.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Z.hasStandardBrowserEnv&&(n&&y.isFunction(n)&&(n=n(e)),n||n!==!1&&Vs(e.url))){const u=o&&s&&js.read(s);u&&c.set(o,u)}return e},Hs=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const o=Zr(t);let s=o.data;const c=Q.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:u}=o,d,p,f,m,h;function b(){m&&m(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function w(){if(!g)return;const C=Q.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),S={data:!i||i==="text"||i==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:C,config:t,request:g};Vr(function(L){r(L),b()},function(L){n(L),b()},S),g=null}"onloadend"in g?g.onloadend=w:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(w)},g.onabort=function(){g&&(n(new F("Request aborted",F.ECONNABORTED,t,g)),g=null)},g.onerror=function(){n(new F("Network Error",F.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let q=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const S=o.transitional||Pr;o.timeoutErrorMessage&&(q=o.timeoutErrorMessage),n(new F(q,S.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,t,g)),g=null},s===void 0&&c.setContentType(null),"setRequestHeader"in g&&y.forEach(c.toJSON(),function(q,S){g.setRequestHeader(S,q)}),y.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),i&&i!=="json"&&(g.responseType=o.responseType),u&&([f,h]=tt(u,!0),g.addEventListener("progress",f)),l&&g.upload&&([p,m]=tt(l),g.upload.addEventListener("progress",p),g.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(d=C=>{g&&(n(!C||C.type?new Ce(null,t,g):C),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const k=Us(o.url);if(k&&Z.protocols.indexOf(k)===-1){n(new F("Unsupported protocol "+k+":",F.ERR_BAD_REQUEST,t));return}g.send(s||null)})},Zs=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o;const s=function(u){if(!o){o=!0,i();const d=u instanceof Error?u:this.reason;n.abort(d instanceof F?d:new Ce(d instanceof Error?d.message:d))}};let c=e&&setTimeout(()=>{c=null,s(new F(`timeout ${e} of ms exceeded`,F.ETIMEDOUT))},e);const i=()=>{t&&(c&&clearTimeout(c),c=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>y.asap(i),l}},Ws=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},Js=async function*(t,e){for await(const r of Qs(t))yield*Ws(r,e)},Qs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Wr=(t,e,r,n)=>{const o=Js(t,e);let s=0,c,i=l=>{c||(c=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await o.next();if(u){i(),l.close();return}let p=d.byteLength;if(r){let f=s+=p;r(f)}l.enqueue(new Uint8Array(d))}catch(u){throw i(u),u}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},rt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Jr=rt&&typeof ReadableStream=="function",Ys=rt&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Qr=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Xs=Jr&&Qr(()=>{let t=!1;const e=new Request(Z.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Yr=64*1024,Ft=Jr&&Qr(()=>y.isReadableStream(new Response("").body)),nt={stream:Ft&&(t=>t.body)};rt&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!nt[e]&&(nt[e]=y.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new F(`Response type '${e}' is not supported`,F.ERR_NOT_SUPPORT,n)})})})(new Response);const Ks=async t=>{if(t==null)return 0;if(y.isBlob(t))return t.size;if(y.isSpecCompliantForm(t))return(await new Request(Z.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(y.isArrayBufferView(t)||y.isArrayBuffer(t))return t.byteLength;if(y.isURLSearchParams(t)&&(t=t+""),y.isString(t))return(await Ys(t)).byteLength},ec=async(t,e)=>{const r=y.toFiniteNumber(t.getContentLength());return r??Ks(e)},It={http:vs,xhr:Hs,fetch:rt&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:s,timeout:c,onDownloadProgress:i,onUploadProgress:l,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:f}=Zr(t);u=u?(u+"").toLowerCase():"text";let m=Zs([o,s&&s.toAbortSignal()],c),h;const b=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(l&&Xs&&r!=="get"&&r!=="head"&&(g=await ec(d,n))!==0){let S=new Request(e,{method:"POST",body:n,duplex:"half"}),E;if(y.isFormData(n)&&(E=S.headers.get("content-type"))&&d.setContentType(E),S.body){const[L,U]=jr(g,tt(Gr(l)));n=Wr(S.body,Yr,L,U)}}y.isString(p)||(p=p?"include":"omit");const w="credentials"in Request.prototype;h=new Request(e,{...f,signal:m,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?p:void 0});let k=await fetch(h);const C=Ft&&(u==="stream"||u==="response");if(Ft&&(i||C&&b)){const S={};["status","statusText","headers"].forEach(G=>{S[G]=k[G]});const E=y.toFiniteNumber(k.headers.get("content-length")),[L,U]=i&&jr(E,tt(Gr(i),!0))||[];k=new Response(Wr(k.body,Yr,L,()=>{U&&U(),b&&b()}),S)}u=u||"text";let q=await nt[y.findKey(nt,u)||"text"](k,t);return!C&&b&&b(),await new Promise((S,E)=>{Vr(S,E,{data:q,headers:Q.from(k.headers),status:k.status,statusText:k.statusText,config:t,request:h})})}catch(w){throw b&&b(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new F("Network Error",F.ERR_NETWORK,t,h),{cause:w.cause||w}):F.from(w,w&&w.code,t,h)}})};y.forEach(It,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Xr=t=>`- ${t}`,tc=t=>y.isFunction(t)||t===null||t===!1,Kr={getAdapter:t=>{t=y.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let s=0;s<e;s++){r=t[s];let c;if(n=r,!tc(r)&&(n=It[(c=String(r)).toLowerCase()],n===void 0))throw new F(`Unknown adapter '${c}'`);if(n)break;o[c||"#"+s]=n}if(!n){const s=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=e?s.length>1?`since :
4
- `+s.map(Xr).join(`
5
- `):" "+Xr(s[0]):"as no adapter specified";throw new F("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n},adapters:It};function Ot(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ce(null,t)}function en(t){return Ot(t),t.headers=Q.from(t.headers),t.data=Bt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Kr.getAdapter(t.adapter||Oe.adapter)(t).then(function(n){return Ot(t),n.data=Bt.call(t,t.transformResponse,n),n.headers=Q.from(n.headers),n},function(n){return Mr(n)||(Ot(t),n&&n.response&&(n.response.data=Bt.call(t,t.transformResponse,n.response),n.response.headers=Q.from(n.response.headers))),Promise.reject(n)})}const tn="1.9.0",ot={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ot[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const rn={};ot.transitional=function(e,r,n){function o(s,c){return"[Axios v"+tn+"] Transitional option '"+s+"'"+c+(n?". "+n:"")}return(s,c,i)=>{if(e===!1)throw new F(o(c," has been removed"+(r?" in "+r:"")),F.ERR_DEPRECATED);return r&&!rn[c]&&(rn[c]=!0,console.warn(o(c," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,c,i):!0}},ot.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function rc(t,e,r){if(typeof t!="object")throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const s=n[o],c=e[s];if(c){const i=t[s],l=i===void 0||c(i,s,t);if(l!==!0)throw new F("option "+s+" must be "+l,F.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}}const st={assertOptions:rc,validators:ot},se=st.validators;let ge=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Or,response:new Or}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=me(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&st.assertOptions(n,{silentJSONParsing:se.transitional(se.boolean),forcedJSONParsing:se.transitional(se.boolean),clarifyTimeoutError:se.transitional(se.boolean)},!1),o!=null&&(y.isFunction(o)?r.paramsSerializer={serialize:o}:st.assertOptions(o,{encode:se.function,serialize:se.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),st.assertOptions(r,{baseUrl:se.spelling("baseURL"),withXsrfToken:se.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=s&&y.merge(s.common,s[r.method]);s&&y.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),r.headers=Q.concat(c,s);const i=[];let l=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(l=l&&b.synchronous,i.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let d,p=0,f;if(!l){const h=[en.bind(this),void 0];for(h.unshift.apply(h,i),h.push.apply(h,u),f=h.length,d=Promise.resolve(r);p<f;)d=d.then(h[p++],h[p++]);return d}f=i.length;let m=r;for(p=0;p<f;){const h=i[p++],b=i[p++];try{m=h(m)}catch(g){b.call(this,g);break}}try{d=en.call(this,m)}catch(h){return Promise.reject(h)}for(p=0,f=u.length;p<f;)d=d.then(u[p++],u[p++]);return d}getUri(e){e=me(this.defaults,e);const r=$r(e.baseURL,e.url,e.allowAbsoluteUrls);return Ir(r,e.params,e.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(e){ge.prototype[e]=function(r,n){return this.request(me(n||{},{method:e,url:r,data:(n||{}).data}))}}),y.forEach(["post","put","patch"],function(e){function r(n){return function(s,c,i){return this.request(me(i||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:c}))}}ge.prototype[e]=r(),ge.prototype[e+"Form"]=r(!0)});let nc=class Io{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const c=new Promise(i=>{n.subscribe(i),s=i}).then(o);return c.cancel=function(){n.unsubscribe(s)},c},e(function(s,c,i){n.reason||(n.reason=new Ce(s,c,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Io(function(o){e=o}),cancel:e}}};function oc(t){return function(r){return t.apply(null,r)}}function sc(t){return y.isObject(t)&&t.isAxiosError===!0}const Pt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pt).forEach(([t,e])=>{Pt[e]=t});function nn(t){const e=new ge(t),r=Ee(ge.prototype.request,e);return y.extend(r,ge.prototype,e,{allOwnKeys:!0}),y.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return nn(me(t,o))},r}const V=nn(Oe);V.Axios=ge,V.CanceledError=Ce,V.CancelToken=nc,V.isCancel=Mr,V.VERSION=tn,V.toFormData=Ke,V.AxiosError=F,V.Cancel=V.CanceledError,V.all=function(e){return Promise.all(e)},V.spread=oc,V.isAxiosError=sc,V.mergeConfig=me,V.AxiosHeaders=Q,V.formToJSON=t=>Ur(y.isHTMLForm(t)?new FormData(t):t),V.getAdapter=Kr.getAdapter,V.HttpStatusCode=Pt,V.default=V;const{Axios:rp,AxiosError:np,CanceledError:op,isCancel:sp,CancelToken:cp,VERSION:ip,all:ap,Cancel:lp,isAxiosError:up,spread:dp,toFormData:pp,AxiosHeaders:fp,HttpStatusCode:hp,formToJSON:mp,getAdapter:gp,mergeConfig:bp}=V;function cc(t){return t==null?!0:typeof t=="string"||Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}function on(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function sn(t={},e={}){const r={},n=new Set([...Object.keys(t),...Object.keys(e)]);for(const o of n){if(o==="__proto__"||o==="constructor"||o==="prototype")continue;const s=t[o],c=e[o];on(s)&&on(c)?r[o]=sn(s,c):r[o]=c!==void 0?c:s}return r}const ic="q-defaults";function ac(){var t,e;const r=a.getCurrentInstance();if(!r)throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");const n=r.type.name??r.type.__name;if(!n)throw new Error("[Quidgest UI] Could not determine component name");const o=lc(),s=(t=o.value)==null?void 0:t.Global,c=(e=o.value)==null?void 0:e[n];return a.computed(()=>sn(s,c))}function lc(){const t=a.inject(ic,void 0);if(!t)throw new Error("[Quidgest UI] Could not find defaults instance");return t}const uc=["id"],dc=a.defineComponent({__name:"QSpinnerLoader",props:{id:{},class:{},size:{default:48}},setup(t){const e=t,r=a.computed(()=>({"font-size":e.size!==48?`${e.size}px`:void 0}));return(n,o)=>(a.openBlock(),a.createElementBlock("div",{id:e.id,class:a.normalizeClass(["q-spinner-loader",e.class]),style:a.normalizeStyle(r.value)},null,14,uc))}});function pc(t){return t.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([0-9])([a-zA-Z])/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").trim().split(/\s+/)}function fc(t){return pc(t).join("-").toLowerCase()}function hc(t,e){var r;const n=fc(e);return n?typeof((r=t.props)==null?void 0:r[n])<"u":!1}function W(t){const e=t,r=e.setup;return r&&(e.setup=(n,o)=>{const s=ac();if(cc(s.value))return r(n,o);const c=a.getCurrentInstance();if(c===null)return r(n,o);const i=new Proxy(n,{get(l,u){var d;const p=Reflect.get(l,u),f=(d=s.value)==null?void 0:d[u];return typeof u=="string"&&!hc(c.vnode,u)?f??p:p}});return r(i,o)}),t}const mc=W(dc);function gc(t,e=!1){return e?/^#[a-fA-F0-9]{6}$/.test(t):/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t)}function bc(t){const e=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(e){const r=parseInt(e[1],10),n=parseInt(e[2],10),o=parseInt(e[3],10);return{r,g:n,b:o}}}function yc(t){if(gc(t)){t.length===4&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const e=parseInt(t.slice(1,3),16),r=parseInt(t.slice(3,5),16),n=parseInt(t.slice(5,7),16);return{r:e,g:r,b:n}}else{const e=bc(t);if(e)return e}throw new Error("Invalid color format")}function wc(t,e){const r=an(t),n=e/100;return r.l=r.l-n*r.l,vc(r)}function kc(t){const e=t.r.toString(16).padStart(2,"0"),r=t.g.toString(16).padStart(2,"0"),n=t.b.toString(16).padStart(2,"0");return`#${e}${r}${n}`}function cn(t){return`${t.r} ${t.g} ${t.b}`}function an(t){const e=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(e,r,n),s=Math.min(e,r,n);let c=0,i;const l=(o+s)/2;if(o===s)c=i=0;else{const u=o-s;switch(i=l>.5?u/(2-o-s):u/(o+s),o){case e:c=(r-n)/u+(r<n?6:0);break;case r:c=(n-e)/u+2;break;case n:c=(e-r)/u+4;break}c/=6}return{h:Math.round(c*360),s:Math.round(i*100),l:Math.round(l*100)}}function vc(t){const e=t.h/360,r=t.s/100,n=t.l/100;let o,s,c;if(r===0)o=s=c=n;else{const i=n<.5?n*(1+r):n+r-n*r,l=2*n-i;o=Ut(l,i,e+1/3),s=Ut(l,i,e),c=Ut(l,i,e-1/3)}return{r:Math.round(o*255),g:Math.round(s*255),b:Math.round(c*255)}}function Ut(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function xc(t){return t>50?"#000":"#fff"}const Ac=Symbol.for("q-theme");function ln(){const t=a.inject(Ac);if(!t)throw new Error("[Quidgest UI] Could not find theme instance");return t}function un(t){const e=a.computed(()=>a.unref(t)),r=a.computed(()=>e.value?!Ec(e.value):!1),n=a.computed(()=>{const o=e.value;if(!o)return;let s=o;const c=ln();if(r.value){const f=o;s=c.current.value.scheme[f]??o}let i;try{if(i=yc(s),!i)return}catch(f){console.error("Failed to parse color:",f);return}const l=an(i),u=xc(l.l),d=wc(i,25),p=kc(d);return{mainColor:s,mainColorRgb:cn(i),onMainColor:u,hoverColor:p,hoverColorRgb:cn(d),onHoverColor:u}});return{isUtilityColor:r,style:n}}function Ec(t){return t.startsWith("#")||t.startsWith("rgb")||t.startsWith("hsl")}const _c=["id","disabled"],Cc={key:0,class:"q-button__spinner"},Dc={class:"q-button__content"},ce=W(a.defineComponent({__name:"QButton",props:{id:{},class:{},label:{},variant:{default:"outlined"},color:{default:"primary"},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},loading:{type:Boolean},size:{default:"regular"},iconPos:{default:"start"},pill:{type:Boolean}},emits:["click"],setup(t,{emit:e}){const r=t,n=e,o=a.computed(()=>r.disabled||r.loading);function s(d){o.value||n("click",d)}const{isUtilityColor:c,style:i}=un(a.toRef(r,"color")),l=a.computed(()=>{const d=c.value?`q-button--${r.color}`:void 0,p=r.size!=="regular"?`q-button--${r.size}`:void 0,f=r.iconPos!=="start"?`q-button--icon-${r.iconPos}`:void 0;return["q-button",`q-button--${r.variant}`,d,p,f,{"q-button--borderless":r.borderless,"q-button--elevated":r.elevated,"q-button--block":r.block,"q-button--loading":r.loading,"q-button--pill":r.pill},r.class]}),u=a.computed(()=>{var d,p,f,m,h,b;if(!c.value)return{"--q-button-main-color":(d=i.value)==null?void 0:d.mainColor,"--q-button-main-color-rgb":(p=i.value)==null?void 0:p.mainColorRgb,"--q-button-on-main-color":(f=i.value)==null?void 0:f.onMainColor,"--q-button-hover-color":(m=i.value)==null?void 0:m.hoverColor,"--q-button-hover-color-rgb":(h=i.value)==null?void 0:h.hoverColorRgb,"--q-button-on-hover-color":(b=i.value)==null?void 0:b.onHoverColor}});return(d,p)=>(a.openBlock(),a.createElementBlock("button",{id:r.id,type:"button",class:a.normalizeClass(l.value),disabled:o.value,style:a.normalizeStyle(u.value),onClick:a.withModifiers(s,["stop","prevent"])},[r.loading?(a.openBlock(),a.createElementBlock("div",Cc,[a.createVNode(a.unref(mc))])):a.createCommentVNode("v-if",!0),a.createElementVNode("span",Dc,[a.renderSlot(d.$slots,"default"),a.createTextVNode(" "+a.toDisplayString(r.label),1)])],14,_c))}})),qc=a.defineComponent({__name:"QIcon",props:{id:{},class:{},icon:{},type:{default:"svg"},size:{},color:{}},setup(t){const e=t,r=a.computed(()=>{switch(e.type){case"svg":return Uc;case"font":return Oc;case"img":return Pc;default:return}}),{style:n}=un(a.toRef(e,"color")),o=a.computed(()=>{var s;return{"font-size":e.size!==void 0?`${e.size}px`:void 0,color:e.color!==void 0&&e.color!=="primary"?(s=n.value)==null?void 0:s.mainColor:void 0}});return(s,c)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.value),{id:e.id,class:a.normalizeClass(e.class),icon:e.icon,style:a.normalizeStyle(o.value)},null,8,["id","class","icon","style"]))}}),Sc=["id"],Rc=a.defineComponent({__name:"QIconFont",props:{id:{},class:{},icon:{},library:{default:""},variant:{}},setup(t){const e=t,r=a.computed(()=>e.variant?`${e.library}-${e.variant}`:e.library),n=a.computed(()=>e.library&&e.icon?`${e.library}-${e.icon}`:e.icon);return(o,s)=>(a.openBlock(),a.createElementBlock("i",{id:e.id,class:a.normalizeClass(["q-icon","q-icon__font",r.value,n.value,e.class])},null,10,Sc))}}),Tc=["id","src"],Lc=a.defineComponent({__name:"QIconImg",props:{id:{},class:{},icon:{}},setup(t){const e=t;return(r,n)=>(a.openBlock(),a.createElementBlock("img",{id:e.id,src:e.icon,class:a.normalizeClass(["q-icon","q-icon__img",e.class])},null,10,Tc))}}),Ue={},Nc=a.defineComponent({name:"InlineSvg",inheritAttrs:!1,props:{src:{type:String,required:!0},symbol:{type:String,default:""},title:{type:String,default:""},transformSource:{type:Function,default:void 0},keepDuringLoading:{type:Boolean,default:!0}},emits:{loaded:t=>typeof t=="object",unloaded:()=>!0,error:t=>typeof t=="object"},data(){return{svgElSource:null}},watch:{src(t){this.getSource(t)}},async mounted(){await this.getSource(this.src)},methods:{copySvgAttrs(t,e){const r=e.attributes;if(r)for(const n of r)t[n.name]=n.value},copyComponentAttrs(t,e){for(const[r,n]of Object.entries(e))n!==!1&&n!==null&&n!==void 0&&(t[r]=n)},getSvgContent(t){return this.symbol&&(t=t.getElementById(this.symbol),!t)?null:(this.transformSource&&(t=t.cloneNode(!0),t=this.transformSource(t)),this.title&&(this.transformSource||(t=t.cloneNode(!0)),Bc(t,this.title)),t)},async getSource(t){try{Ue[t]||(Ue[t]=Fc(this.download(t))),this.svgElSource&&Ue[t].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded"));const e=await Ue[t];this.svgElSource=e,await this.$nextTick(),this.$emit("loaded",this.$el)}catch(e){this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete Ue[t],this.$emit("error",e)}},async download(t){const e=await fetch(t);if(!e.ok)throw new Error("Error loading SVG");const r=await e.text(),n=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("svg")[0];if(!n)throw new Error("Loaded file is not a valid SVG");return n}},render(){if(!this.svgElSource)return null;const t=this.getSvgContent(this.svgElSource);if(!t)return a.h("div",this.$attrs);const e={};return this.copySvgAttrs(e,this.svgElSource),this.copySvgAttrs(e,t),this.copyComponentAttrs(e,this.$attrs),e.innerHTML=t.innerHTML,a.h("svg",e)},expose:[]});function Bc(t,e){const r=t.getElementsByTagName("title");if(r.length)r[0].textContent=e;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=e,t.insertBefore(n,t.firstChild)}}function Fc(t){if(t.getIsPending)return t;let e=!0;const r=t.then(n=>(e=!1,n),n=>{throw e=!1,n});return r.getIsPending=()=>e,r}const Ic=a.defineComponent({__name:"QIconSvg",props:{id:{},class:{},icon:{},bundle:{default:""}},emits:["loaded","unloaded"],setup(t,{emit:e}){const r=t,n=e;function o(c){n("loaded",c)}function s(){n("unloaded")}return(c,i)=>(a.openBlock(),a.createBlock(a.unref(Nc),{id:r.id,class:a.normalizeClass(["q-icon","q-icon__svg",r.class]),src:r.bundle,symbol:r.icon,onLoaded:o,onUnloaded:s},null,8,["id","class","src","symbol"]))}}),ee=W(qc),Oc=W(Rc),Pc=W(Lc),Uc=W(Ic);let zc=0;function dn(t){return a.unref(t)||`uid-${++zc}`}const Mc=["id"],Vc=["for"],pn=W(a.defineComponent({inheritAttrs:!1,__name:"QLabel",props:{id:{},class:{},label:{},for:{},required:{type:Boolean}},setup(t){const e=t,r=a.computed(()=>["q-label",{"q-label--required":e.required},e.class]);return(n,o)=>(a.openBlock(),a.createElementBlock("div",{id:e.id,class:a.normalizeClass(r.value)},[a.renderSlot(n.$slots,"prepend"),a.createElementVNode("label",a.mergeProps({for:e.for},n.$attrs),[a.renderSlot(n.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(e.label),1)])],16,Vc),a.renderSlot(n.$slots,"append")],10,Mc))}})),jc=["id"],Gc={key:0,class:"q-field__prepend"},$c={key:1,class:"q-field__append"},Hc={key:1,class:"q-field__extras"},fn=W(a.defineComponent({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},for:{},required:{type:Boolean},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean}},setup(t,{expose:e}){const r=t,n=a.ref(null),o=a.computed(()=>r.required&&!r.readonly&&!r.disabled),s=a.computed(()=>["q-field",`q-field--${r.size}`,{"q-field--readonly":r.readonly,"q-field--disabled":r.disabled,"q-field--required":o.value,"q-field--invalid":r.invalid},r.class]);return e({fieldRef:n}),(c,i)=>(a.openBlock(),a.createElementBlock("div",{id:r.id,class:a.normalizeClass(s.value)},[r.label?(a.openBlock(),a.createBlock(a.unref(pn),{key:0,class:"q-field__label",label:r.label,for:r.for,required:r.required},{prepend:a.withCtx(()=>[a.renderSlot(c.$slots,"label.prepend")]),append:a.withCtx(()=>[a.renderSlot(c.$slots,"label.append")]),_:3},8,["label","for","required"])):a.createCommentVNode("v-if",!0),a.renderSlot(c.$slots,"control",{},()=>[a.createElementVNode("div",a.mergeProps({ref_key:"fieldRef",ref:n,class:"q-field__control"},c.$attrs),[c.$slots.prepend?(a.openBlock(),a.createElementBlock("div",Gc,[a.renderSlot(c.$slots,"prepend")])):a.createCommentVNode("v-if",!0),a.renderSlot(c.$slots,"default"),c.$slots.append?(a.openBlock(),a.createElementBlock("div",$c,[a.renderSlot(c.$slots,"append")])):a.createCommentVNode("v-if",!0)],16)]),c.$slots.extras?(a.openBlock(),a.createElementBlock("div",Hc,[a.renderSlot(c.$slots,"extras")])):a.createCommentVNode("v-if",!0)],10,jc))}})),Zc={clearValue:"Clear value"},Wc={clear:{icon:"close"}},Jc=W(a.defineComponent({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>Wc},texts:{default:()=>Zc}},emits:["click"],setup(t,{emit:e}){const r=t,n=e;function o(s){n("click",s)}return(s,c)=>(a.openBlock(),a.createBlock(a.unref(ce),{id:r.id,class:a.normalizeClass(["q-clear-btn",r.class]),"aria-label":r.texts.clearValue,variant:"ghost",color:"neutral",borderless:"",tabindex:"-1",onClick:o},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),a.normalizeProps(a.guardReactiveProps(r.icons.clear)),null,16)]),_:1},8,["id","class","aria-label"]))}})),Qc=["id","type","maxlength","required","placeholder","readonly","disabled"],Yc=W(a.defineComponent({inheritAttrs:!1,__name:"QTextField",props:a.mergeModels({id:{},class:{},label:{},for:{},required:{type:Boolean},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},clearable:{type:Boolean},type:{default:"text"},texts:{}},{modelValue:{},modelModifiers:{}}),emits:a.mergeModels(["click:clear"],["update:modelValue"]),setup(t,{expose:e,emit:r}){const n=t,o=r,s=a.useModel(t,"modelValue"),c=a.computed({get:()=>s.value,set:h=>{const b=n.maxLength;s.value=b?h==null?void 0:h.slice(0,b):h}});a.watch(s,h=>c.value=h,{immediate:!0});const i=dn(n.id),l=a.ref(null),u=a.ref(null),d=a.computed(()=>n.readonly||n.disabled?void 0:n.placeholder),p=a.computed(()=>n.clearable&&!n.readonly&&!n.disabled),f=a.computed(()=>p.value&&s.value);function m(h){p.value&&(s.value="",o("click:clear",h))}return e({fieldRef:a.computed(()=>{var h;return(h=l.value)==null?void 0:h.fieldRef}),inputRef:u}),(h,b)=>(a.openBlock(),a.createBlock(a.unref(fn),{ref_key:"fieldRef",ref:l,class:a.normalizeClass(["q-text-field",n.class]),for:a.unref(i),label:n.label,size:n.size,readonly:n.readonly,disabled:n.disabled,required:n.required,invalid:n.invalid},a.createSlots({"label.prepend":a.withCtx(()=>[a.renderSlot(h.$slots,"label.prepend")]),"label.append":a.withCtx(()=>[a.renderSlot(h.$slots,"label.append")]),default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("input",a.mergeProps({id:a.unref(i),ref_key:"inputRef",ref:u,"onUpdate:modelValue":b[0]||(b[0]=g=>c.value=g),class:"q-text-field__input",type:n.type,maxlength:n.maxLength,required:n.required,placeholder:d.value,readonly:n.readonly,disabled:n.disabled},h.$attrs),null,16,Qc),[[a.vModelDynamic,c.value]])]),_:2},[h.$slots.prepend?{name:"prepend",fn:a.withCtx(()=>[a.renderSlot(h.$slots,"prepend")]),key:"0"}:void 0,h.$slots.append||f.value?{name:"append",fn:a.withCtx(()=>[a.renderSlot(h.$slots,"append"),f.value?(a.openBlock(),a.createBlock(a.unref(Jc),{key:0,"data-testid":"q-text-field__clear-button",texts:n.texts,onClick:m},null,8,["texts"])):a.createCommentVNode("v-if",!0)]),key:"1"}:void 0,h.$slots.extras?{name:"extras",fn:a.withCtx(()=>[a.renderSlot(h.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","size","readonly","disabled","required","invalid"]))}}));function hn(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}const mn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xc=Object.prototype.toString,Kc=t=>Xc.call(t)==="[object Object]",be=()=>{},ei=ti();function ti(){var t,e;return mn&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function gn(...t){if(t.length!==1)return a.toRef(...t);const e=t[0];return typeof e=="function"?a.readonly(a.customRef(()=>({get:e,set:be}))):a.ref(e)}function zt(t){return Array.isArray(t)?t:[t]}function ri(t,e,r){return a.watch(t,e,{...r,immediate:!0})}const ze=mn?window:void 0;function pe(t){var e;const r=a.toValue(t);return(e=r==null?void 0:r.$el)!=null?e:r}function Me(...t){const e=[],r=()=>{e.forEach(i=>i()),e.length=0},n=(i,l,u,d)=>(i.addEventListener(l,u,d),()=>i.removeEventListener(l,u,d)),o=a.computed(()=>{const i=zt(a.toValue(t[0])).filter(l=>l!=null);return i.every(l=>typeof l!="string")?i:void 0}),s=ri(()=>{var i,l;return[(l=(i=o.value)==null?void 0:i.map(u=>pe(u)))!=null?l:[ze].filter(u=>u!=null),zt(a.toValue(o.value?t[1]:t[0])),zt(a.unref(o.value?t[2]:t[1])),a.toValue(o.value?t[3]:t[2])]},([i,l,u,d])=>{if(r(),!(i!=null&&i.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const p=Kc(d)?{...d}:d;e.push(...i.flatMap(f=>l.flatMap(m=>u.map(h=>n(f,m,h,p)))))},{flush:"post"}),c=()=>{s(),r()};return hn(r),c}let bn=!1;function ni(t,e,r={}){const{window:n=ze,ignore:o=[],capture:s=!0,detectIframe:c=!1,controls:i=!1}=r;if(!n)return i?{stop:be,cancel:be,trigger:be}:be;if(ei&&!bn){bn=!0;const g={passive:!0};Array.from(n.document.body.children).forEach(w=>Me(w,"click",be,g)),Me(n.document.documentElement,"click",be,g)}let l=!0;const u=g=>a.toValue(o).some(w=>{if(typeof w=="string")return Array.from(n.document.querySelectorAll(w)).some(k=>k===g.target||g.composedPath().includes(k));{const k=pe(w);return k&&(g.target===k||g.composedPath().includes(k))}});function d(g){const w=a.toValue(g);return w&&w.$.subTree.shapeFlag===16}function p(g,w){const k=a.toValue(g),C=k.$.subTree&&k.$.subTree.children;return C==null||!Array.isArray(C)?!1:C.some(q=>q.el===w.target||w.composedPath().includes(q.el))}const f=g=>{const w=pe(t);if(g.target!=null&&!(!(w instanceof Element)&&d(t)&&p(t,g))&&!(!w||w===g.target||g.composedPath().includes(w))){if("detail"in g&&g.detail===0&&(l=!u(g)),!l){l=!0;return}e(g)}};let m=!1;const h=[Me(n,"click",g=>{m||(m=!0,setTimeout(()=>{m=!1},0),f(g))},{passive:!0,capture:s}),Me(n,"pointerdown",g=>{const w=pe(t);l=!u(g)&&!!(w&&!g.composedPath().includes(w))},{passive:!0}),c&&Me(n,"blur",g=>{setTimeout(()=>{var w;const k=pe(t);((w=n.document.activeElement)==null?void 0:w.tagName)==="IFRAME"&&!(k!=null&&k.contains(n.document.activeElement))&&e(g)},0)},{passive:!0})].filter(Boolean),b=()=>h.forEach(g=>g());return i?{stop:b,cancel:()=>{l=!1},trigger:g=>{l=!0,f(g),l=!1}}:b}function oi(){const t=a.shallowRef(!1),e=a.getCurrentInstance();return e&&a.onMounted(()=>{t.value=!0},e),t}function si(t){const e=oi();return a.computed(()=>(e.value,!!t()))}function ci(t,e,r={}){const{window:n=ze,...o}=r;let s;const c=si(()=>n&&"ResizeObserver"in n),i=()=>{s&&(s.disconnect(),s=void 0)},l=a.computed(()=>{const p=a.toValue(t);return Array.isArray(p)?p.map(f=>pe(f)):[pe(p)]}),u=a.watch(l,p=>{if(i(),c.value&&n){s=new ResizeObserver(e);for(const f of p)f&&s.observe(f,o)}},{immediate:!0,flush:"post"}),d=()=>{i(),u()};return hn(d),{isSupported:c,stop:d}}function ii(t=ze,e){t&&typeof t.requestAnimationFrame=="function"?t.requestAnimationFrame(e):e()}function ai(t={}){var e,r;const{window:n=ze}=t,o=gn(t==null?void 0:t.element),s=gn((e=t==null?void 0:t.input)!=null?e:""),c=(r=t==null?void 0:t.styleProp)!=null?r:"height",i=a.shallowRef(1),l=a.shallowRef(0);function u(){var d;if(!o.value)return;let p="";o.value.style[c]="1px",i.value=(d=o.value)==null?void 0:d.scrollHeight;const f=a.toValue(t==null?void 0:t.styleTarget);f?f.style[c]=`${i.value}px`:p=`${i.value}px`,o.value.style[c]=p}return a.watch([s,o],()=>a.nextTick(u),{immediate:!0}),a.watch(i,()=>{var d;return(d=t==null?void 0:t.onResize)==null?void 0:d.call(t)}),ci(o,([{contentRect:d}])=>{l.value!==d.width&&ii(n,()=>{l.value=d.width,u()})}),t!=null&&t.watch&&a.watch(t.watch,u,{immediate:!0,deep:!0}),{textarea:o,input:s,triggerResize:u}}const li=W(a.defineComponent({__name:"QDismissibleLayer",emits:["escape-key-down","pointer-down-outside","focus-outside","interact-outside","dismiss"],setup(t,{emit:e}){const r=e,n=a.ref(null);function o(c){c.key==="Escape"&&(r("escape-key-down",c),c.defaultPrevented||r("dismiss",c))}function s(c){if(!n.value)return;const i=c.target;if(!n.value.contains(i)){const l=new CustomEvent("focus-outside",{bubbles:!1,cancelable:!0,detail:{originalEvent:c}});r("focus-outside",l),r("interact-outside",l),l.defaultPrevented||r("dismiss",l)}}return a.onMounted(()=>{document.addEventListener("keydown",o),document.addEventListener("focusin",s),ni(n,c=>{const i=new CustomEvent("pointer-down-outside",{bubbles:!1,cancelable:!0,detail:{originalEvent:c}});r("pointer-down-outside",i),r("interact-outside",i),i.defaultPrevented||r("dismiss",i)})}),a.onUnmounted(()=>{document.removeEventListener("keydown",o),document.removeEventListener("focusin",s)}),(c,i)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"layerRef",ref:n},[a.renderSlot(c.$slots,"default")],512))}}));/*!
1
+ (function(t,W){typeof exports=="object"&&typeof module<"u"?module.exports=W(require("vue"),require("axios"),require("markdown-it")):typeof define=="function"&&define.amd?define(["vue","axios","markdown-it"],W):(t=typeof globalThis<"u"?globalThis:t||self,t.ChatBotFrontend=W(t.vue,t.axios,t.MarkdownIt))})(this,function(t,W,et){"use strict";function ge(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function Ne(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function be(e={},n={}){const o={},a=new Set([...Object.keys(e),...Object.keys(n)]);for(const r of a){if(r==="__proto__"||r==="constructor"||r==="prototype")continue;const l=e[r],i=n[r];Ne(l)&&Ne(i)?o[r]=be(l,i):o[r]=i!==void 0?i:l}return o}const Se="q-defaults";function tt(){var e,n;const o=t.getCurrentInstance();if(!o)throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");const a=o.type.name??o.type.__name;if(!a)throw new Error("[Quidgest UI] Could not determine component name");const r=Ie(),l=(e=r.value)==null?void 0:e.Global,i=(n=r.value)==null?void 0:n[a];return t.computed(()=>be(l,i))}function nt(e){if(ge(e))return;const n=Ie(),o=t.ref(e),a=t.computed(()=>ge(o.value)?n.value:be(n.value,o.value));t.provide(Se,a)}function Ie(){const e=t.inject(Se,void 0);if(!e)throw new Error("[Quidgest UI] Could not find defaults instance");return e}const ot=["id"],at=t.defineComponent({__name:"QSpinnerLoader",props:{id:{},class:{},size:{default:48}},setup(e){const n=e,o=t.computed(()=>({"font-size":n.size!==48?`${n.size}px`:void 0}));return(a,r)=>(t.openBlock(),t.createElementBlock("div",{id:n.id,class:t.normalizeClass(["q-spinner-loader",n.class]),style:t.normalizeStyle(o.value)},null,14,ot))}});function rt(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([0-9])([a-zA-Z])/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").trim().split(/\s+/)}function lt(e){return rt(e).join("-").toLowerCase()}function it(e,n){var o;const a=lt(n);return a?typeof((o=e.props)==null?void 0:o[a])<"u":!1}function q(e){const n=e,o=n.setup;return o&&(n.setup=(a,r)=>{const l=tt();if(ge(l.value))return o(a,r);const i=t.getCurrentInstance();if(i===null)return o(a,r);const s=new Proxy(a,{get(u,f){var g;const c=Reflect.get(u,f),m=(g=l.value)==null?void 0:g[f];return typeof f=="string"&&!it(i.vnode,f)?m??c:c}});return o(s,r)}),e}const st=q(at);function ct(e,n=!1){return n?/^#[a-fA-F0-9]{6}$/.test(e):/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(e)}function dt(e){const n=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(n){const o=parseInt(n[1],10),a=parseInt(n[2],10),r=parseInt(n[3],10);return{r:o,g:a,b:r}}}function ut(e){if(ct(e)){e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const n=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return{r:n,g:o,b:a}}else{const n=dt(e);if(n)return n}throw new Error("Invalid color format")}function pt(e,n){const o=De(e),a=n/100;return o.l=o.l-a*o.l,mt(o)}function ft(e){const n=e.r.toString(16).padStart(2,"0"),o=e.g.toString(16).padStart(2,"0"),a=e.b.toString(16).padStart(2,"0");return`#${n}${o}${a}`}function xe(e){return`${e.r} ${e.g} ${e.b}`}function De(e){const n=e.r/255,o=e.g/255,a=e.b/255,r=Math.max(n,o,a),l=Math.min(n,o,a);let i=0,s;const u=(r+l)/2;if(r===l)i=s=0;else{const f=r-l;switch(s=u>.5?f/(2-r-l):f/(r+l),r){case n:i=(o-a)/f+(o<a?6:0);break;case o:i=(a-n)/f+2;break;case a:i=(n-o)/f+4;break}i/=6}return{h:Math.round(i*360),s:Math.round(s*100),l:Math.round(u*100)}}function mt(e){const n=e.h/360,o=e.s/100,a=e.l/100;let r,l,i;if(o===0)r=l=i=a;else{const s=a<.5?a*(1+o):a+o-a*o,u=2*a-s;r=he(u,s,n+1/3),l=he(u,s,n),i=he(u,s,n-1/3)}return{r:Math.round(r*255),g:Math.round(l*255),b:Math.round(i*255)}}function he(e,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*6*o:o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function gt(e){return e>50?"#000":"#fff"}const bt=Symbol.for("q-theme");function $e(){const e=t.inject(bt);if(!e)throw new Error("[Quidgest UI] Could not find theme instance");return e}function Le(e){const n=t.computed(()=>t.unref(e)),o=t.computed(()=>n.value?!ht(n.value):!1),a=t.computed(()=>{const r=n.value;if(!r)return;let l=r;const i=$e();if(o.value){const m=r;l=i.current.value.scheme[m]??r}let s;try{if(s=ut(l),!s)return}catch(m){console.error("Failed to parse color:",m);return}const u=De(s),f=gt(u.l),g=pt(s,25),c=ft(g);return{mainColor:l,mainColorRgb:xe(s),onMainColor:f,hoverColor:c,hoverColorRgb:xe(g),onHoverColor:f}});return{isUtilityColor:o,style:a}}function ht(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}const yt=["id","disabled"],wt={key:0,class:"q-button__spinner"},vt={class:"q-button__content"},ye=q(t.defineComponent({__name:"QButton",props:{id:{},class:{},label:{},variant:{default:"outlined"},color:{default:"primary"},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},loading:{type:Boolean},size:{default:"regular"},iconPos:{default:"start"},pill:{type:Boolean}},emits:["click"],setup(e,{emit:n}){const o=e,a=n,r=t.computed(()=>o.disabled||o.loading);function l(g){r.value||a("click",g)}const{isUtilityColor:i,style:s}=Le(t.toRef(o,"color")),u=t.computed(()=>{const g=i.value?`q-button--${o.color}`:void 0,c=o.size!=="regular"?`q-button--${o.size}`:void 0,m=o.iconPos!=="start"?`q-button--icon-${o.iconPos}`:void 0;return["q-button",`q-button--${o.variant}`,g,c,m,{"q-button--borderless":o.borderless,"q-button--elevated":o.elevated,"q-button--block":o.block,"q-button--loading":o.loading,"q-button--pill":o.pill},o.class]}),f=t.computed(()=>{var g,c,m,y,x,$;if(!i.value)return{"--q-button-main-color":(g=s.value)==null?void 0:g.mainColor,"--q-button-main-color-rgb":(c=s.value)==null?void 0:c.mainColorRgb,"--q-button-on-main-color":(m=s.value)==null?void 0:m.onMainColor,"--q-button-hover-color":(y=s.value)==null?void 0:y.hoverColor,"--q-button-hover-color-rgb":(x=s.value)==null?void 0:x.hoverColorRgb,"--q-button-on-hover-color":($=s.value)==null?void 0:$.onHoverColor}});return(g,c)=>(t.openBlock(),t.createElementBlock("button",{id:o.id,type:"button",class:t.normalizeClass(u.value),disabled:r.value,style:t.normalizeStyle(f.value),onClick:t.withModifiers(l,["stop","prevent"])},[o.loading?(t.openBlock(),t.createElementBlock("div",wt,[t.createVNode(t.unref(st))])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",vt,[t.renderSlot(g.$slots,"default"),t.createTextVNode(" "+t.toDisplayString(o.label),1)])],14,yt))}})),kt=t.defineComponent({__name:"QIcon",props:{id:{},class:{},icon:{},type:{default:"svg"},size:{},color:{}},setup(e){const n=e,o=t.computed(()=>{switch(n.type){case"svg":return $t;case"font":return xt;case"img":return Dt;default:return}}),{style:a}=Le(t.toRef(n,"color")),r=t.computed(()=>{var l;return{"font-size":n.size!==void 0?`${n.size}px`:void 0,color:n.color!==void 0&&n.color!=="primary"?(l=a.value)==null?void 0:l.mainColor:void 0}});return(l,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.value),{id:n.id,class:t.normalizeClass(n.class),icon:n.icon,style:t.normalizeStyle(r.value)},null,8,["id","class","icon","style"]))}}),Bt=["id"],Et=t.defineComponent({__name:"QIconFont",props:{id:{},class:{},icon:{},library:{default:""},variant:{}},setup(e){const n=e,o=t.computed(()=>n.variant?`${n.library}-${n.variant}`:n.library),a=t.computed(()=>n.library&&n.icon?`${n.library}-${n.icon}`:n.icon);return(r,l)=>(t.openBlock(),t.createElementBlock("i",{id:n.id,class:t.normalizeClass(["q-icon","q-icon__font",o.value,a.value,n.class])},null,10,Bt))}}),Ct=["id","src"],_t=t.defineComponent({__name:"QIconImg",props:{id:{},class:{},icon:{}},setup(e){const n=e;return(o,a)=>(t.openBlock(),t.createElementBlock("img",{id:n.id,src:n.icon,class:t.normalizeClass(["q-icon","q-icon__img",n.class])},null,10,Ct))}}),te={},At=t.defineComponent({name:"InlineSvg",inheritAttrs:!1,props:{src:{type:String,required:!0},symbol:{type:String,default:""},title:{type:String,default:""},transformSource:{type:Function,default:void 0},keepDuringLoading:{type:Boolean,default:!0}},emits:{loaded:e=>typeof e=="object",unloaded:()=>!0,error:e=>typeof e=="object"},data(){return{svgElSource:null}},watch:{src(e){this.getSource(e)}},async mounted(){await this.getSource(this.src)},methods:{copySvgAttrs(e,n){const o=n.attributes;if(o)for(const a of o)e[a.name]=a.value},copyComponentAttrs(e,n){for(const[o,a]of Object.entries(n))a!==!1&&a!==null&&a!==void 0&&(e[o]=a)},getSvgContent(e){return this.symbol&&(e=e.getElementById(this.symbol),!e)?null:(this.transformSource&&(e=e.cloneNode(!0),e=this.transformSource(e)),this.title&&(this.transformSource||(e=e.cloneNode(!0)),Nt(e,this.title)),e)},async getSource(e){try{te[e]||(te[e]=St(this.download(e))),this.svgElSource&&te[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded"));const n=await te[e];this.svgElSource=n,await this.$nextTick(),this.$emit("loaded",this.$el)}catch(n){this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete te[e],this.$emit("error",n)}},async download(e){const n=await fetch(e);if(!n.ok)throw new Error("Error loading SVG");const o=await n.text(),a=new DOMParser().parseFromString(o,"text/xml").getElementsByTagName("svg")[0];if(!a)throw new Error("Loaded file is not a valid SVG");return a}},render(){if(!this.svgElSource)return null;const e=this.getSvgContent(this.svgElSource);if(!e)return t.h("div",this.$attrs);const n={};return this.copySvgAttrs(n,this.svgElSource),this.copySvgAttrs(n,e),this.copyComponentAttrs(n,this.$attrs),n.innerHTML=e.innerHTML,t.h("svg",n)},expose:[]});function Nt(e,n){const o=e.getElementsByTagName("title");if(o.length)o[0].textContent=n;else{const a=document.createElementNS("http://www.w3.org/2000/svg","title");a.textContent=n,e.insertBefore(a,e.firstChild)}}function St(e){if(e.getIsPending)return e;let n=!0;const o=e.then(a=>(n=!1,a),a=>{throw n=!1,a});return o.getIsPending=()=>n,o}const It=t.defineComponent({__name:"QIconSvg",props:{id:{},class:{},icon:{},bundle:{default:""}},emits:["loaded","unloaded"],setup(e,{emit:n}){const o=e,a=n;function r(i){a("loaded",i)}function l(){a("unloaded")}return(i,s)=>(t.openBlock(),t.createBlock(t.unref(At),{id:o.id,class:t.normalizeClass(["q-icon","q-icon__svg",o.class]),src:o.bundle,symbol:o.icon,onLoaded:r,onUnloaded:l},null,8,["id","class","src","symbol"]))}}),ne=q(kt),xt=q(Et),Dt=q(_t),$t=q(It);let Lt=0;function Mt(e){return t.unref(e)||`uid-${++Lt}`}const Rt=["id"],Tt=q(t.defineComponent({__name:"QButtonGroup",props:{id:{},class:{},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean}},setup(e){const n=e;return nt({QButton:{disabled:t.toRef(n,"disabled"),borderless:t.toRef(n,"borderless")}}),(o,a)=>(t.openBlock(),t.createElementBlock("div",{id:n.id,class:t.normalizeClass(["q-button-group",{"q-button-group--elevated":n.elevated},n.class]),role:"group"},[t.renderSlot(o.$slots,"default")],10,Rt))}})),Ft=["id"],Vt=["for"],Pt=q(t.defineComponent({inheritAttrs:!1,__name:"QLabel",props:{id:{},class:{},label:{},for:{},required:{type:Boolean}},setup(e){const n=e,o=t.computed(()=>["q-label",{"q-label--required":n.required},n.class]);return(a,r)=>(t.openBlock(),t.createElementBlock("div",{id:n.id,class:t.normalizeClass(o.value)},[t.renderSlot(a.$slots,"prepend"),t.createElementVNode("label",t.mergeProps({for:n.for},a.$attrs),[t.renderSlot(a.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(n.label),1)])],16,Vt),t.renderSlot(a.$slots,"append")],10,Ft))}})),Ot=Symbol("DismissibleLayer");function Ut(e){const n=t.inject(Ot);if(!n)throw new Error("useDismissibleLayerStackItem must be used within a dismissible layer stack context.");return{register:()=>n.register(e),unregister:()=>n.unregister(e),isTop:()=>n.isTop(e)}}const qt={ref:"layer"},jt=q(t.defineComponent({__name:"QDismissibleLayer",emits:["escape-key-down","pointer-down-outside","focus-outside","interact-outside","dismiss"],setup(e,{emit:n}){const o=n,a=t.useTemplateRef("layer"),r=t.useId(),l=Ut(r);let i=[];function s(c){c.key==="Escape"&&l!=null&&l.isTop()&&(o("escape-key-down",c),c.defaultPrevented||o("dismiss",c))}function u(c){if(!a.value)return;const m=c.target;if(!a.value.contains(m)&&l!=null&&l.isTop()){const y=new CustomEvent("focus-outside",{bubbles:!1,cancelable:!0,detail:{originalEvent:c}});o("focus-outside",y),o("interact-outside",y),y.defaultPrevented||o("dismiss",y)}}function f(c){if(!a.value||!(l!=null&&l.isTop()))return;const m=c.target;if(!a.value.contains(m)){const y=new CustomEvent("pointer-down-outside",{bubbles:!1,cancelable:!0,detail:{originalEvent:c}});o("pointer-down-outside",y),o("interact-outside",y),y.defaultPrevented||o("dismiss",y)}}function g(){["mousedown","touchstart"].forEach(c=>{document.addEventListener(c,f,{passive:!0,capture:!0}),i.push(()=>{document.removeEventListener(c,f,{capture:!0})})})}return t.onMounted(()=>{l==null||l.register(),document.addEventListener("keydown",s),i.push(()=>{document.removeEventListener("keydown",s)}),document.addEventListener("focusin",u),i.push(()=>{document.removeEventListener("focusin",u)}),g()}),t.onUnmounted(()=>{l==null||l.unregister(),i.forEach(c=>c()),i=[]}),(c,m)=>(t.openBlock(),t.createElementBlock("div",qt,[t.renderSlot(c.$slots,"default")],512))}}));typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Gt(e){var n;const o=t.toValue(e);return(n=o==null?void 0:o.$el)!=null?n:o}/*!
7
2
  * tabbable 6.2.0
8
3
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
9
- */var yn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ct=yn.join(","),wn=typeof Element>"u",ye=wn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,it=!wn&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},at=function t(e,r){var n;r===void 0&&(r=!0);var o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=o===""||o==="true",c=s||r&&e&&t(e.parentNode);return c},ui=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},kn=function(t,e,r){if(at(t))return[];var n=Array.prototype.slice.apply(t.querySelectorAll(ct));return e&&ye.call(t,ct)&&n.unshift(t),n=n.filter(r),n},vn=function t(e,r,n){for(var o=[],s=Array.from(e);s.length;){var c=s.shift();if(!at(c,!1))if(c.tagName==="SLOT"){var i=c.assignedElements(),l=i.length?i:c.children,u=t(l,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:c,candidates:u})}else{var d=ye.call(c,ct);d&&n.filter(c)&&(r||!e.includes(c))&&o.push(c);var p=c.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(c),f=!at(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(c));if(p&&f){var m=t(p===!0?c.children:p.children,!0,n);n.flatten?o.push.apply(o,m):o.push({scopeParent:c,candidates:m})}else s.unshift.apply(s,c.children)}}return o},xn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},we=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ui(t))&&!xn(t)?0:t.tabIndex},di=function(t,e){var r=we(t);return r<0&&e&&!xn(t)?0:r},pi=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},An=function(t){return t.tagName==="INPUT"},fi=function(t){return An(t)&&t.type==="hidden"},hi=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},mi=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},gi=function(t){if(!t.name)return!0;var e=t.form||it(t),r=function(s){return e.querySelectorAll('input[type="radio"][name="'+s+'"]')},n;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")n=r(window.CSS.escape(t.name));else try{n=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=mi(n,t.form);return!o||o===t},bi=function(t){return An(t)&&t.type==="radio"},yi=function(t){return bi(t)&&!gi(t)},wi=function(t){var e,r=t&&it(t),n=(e=r)===null||e===void 0?void 0:e.host,o=!1;if(r&&r!==t){var s,c,i;for(o=!!((s=n)!==null&&s!==void 0&&(c=s.ownerDocument)!==null&&c!==void 0&&c.contains(n)||t!=null&&(i=t.ownerDocument)!==null&&i!==void 0&&i.contains(t));!o&&n;){var l,u,d;r=it(n),n=(l=r)===null||l===void 0?void 0:l.host,o=!!((u=n)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(n))}}return o},En=function(t){var e=t.getBoundingClientRect(),r=e.width,n=e.height;return r===0&&n===0},ki=function(t,e){var r=e.displayCheck,n=e.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=ye.call(t,"details>summary:first-of-type"),s=o?t.parentElement:t;if(ye.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof n=="function"){for(var c=t;t;){var i=t.parentElement,l=it(t);if(i&&!i.shadowRoot&&n(i)===!0)return En(t);t.assignedSlot?t=t.assignedSlot:!i&&l!==t.ownerDocument?t=l.host:t=i}t=c}if(wi(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return En(t);return!1},vi=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var n=e.children.item(r);if(n.tagName==="LEGEND")return ye.call(e,"fieldset[disabled] *")?!0:!n.contains(t)}return!0}e=e.parentElement}return!1},lt=function(t,e){return!(e.disabled||at(e)||fi(e)||ki(e,t)||hi(e)||vi(e))},Mt=function(t,e){return!(yi(e)||we(e)<0||!lt(t,e))},xi=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ai=function t(e){var r=[],n=[];return e.forEach(function(o,s){var c=!!o.scopeParent,i=c?o.scopeParent:o,l=di(i,c),u=c?t(o.candidates):i;l===0?c?r.push.apply(r,u):r.push(i):n.push({documentOrder:s,tabIndex:l,item:o,isScope:c,content:u})}),n.sort(pi).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(r)},Ei=function(t,e){e=e||{};var r;return e.getShadowRoot?r=vn([t],e.includeContainer,{filter:Mt.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:xi}):r=kn(t,e.includeContainer,Mt.bind(null,e)),Ai(r)},_i=function(t,e){e=e||{};var r;return e.getShadowRoot?r=vn([t],e.includeContainer,{filter:lt.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=kn(t,e.includeContainer,lt.bind(null,e)),r},De=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return ye.call(t,ct)===!1?!1:Mt(e,t)},Ci=yn.concat("iframe").join(","),Vt=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return ye.call(t,Ci)===!1?!1:lt(e,t)};/*!
4
+ */var Me=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ie=Me.join(","),Re=typeof Element>"u",G=Re?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,se=!Re&&Element.prototype.getRootNode?function(e){var n;return e==null||(n=e.getRootNode)===null||n===void 0?void 0:n.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ce=function e(n,o){var a;o===void 0&&(o=!0);var r=n==null||(a=n.getAttribute)===null||a===void 0?void 0:a.call(n,"inert"),l=r===""||r==="true",i=l||o&&n&&e(n.parentNode);return i},zt=function(e){var n,o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return o===""||o==="true"},Te=function(e,n,o){if(ce(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(ie));return n&&G.call(e,ie)&&a.unshift(e),a=a.filter(o),a},Fe=function e(n,o,a){for(var r=[],l=Array.from(n);l.length;){var i=l.shift();if(!ce(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),u=s.length?s:i.children,f=e(u,!0,a);a.flatten?r.push.apply(r,f):r.push({scopeParent:i,candidates:f})}else{var g=G.call(i,ie);g&&a.filter(i)&&(o||!n.includes(i))&&r.push(i);var c=i.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(i),m=!ce(c,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(i));if(c&&m){var y=e(c===!0?i.children:c.children,!0,a);a.flatten?r.push.apply(r,y):r.push({scopeParent:i,candidates:y})}else l.unshift.apply(l,i.children)}}return r},Ve=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},z=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||zt(e))&&!Ve(e)?0:e.tabIndex},Ht=function(e,n){var o=z(e);return o<0&&n&&!Ve(e)?0:o},Zt=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Pe=function(e){return e.tagName==="INPUT"},Jt=function(e){return Pe(e)&&e.type==="hidden"},Wt=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return n},Yt=function(e,n){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===n)return e[o]},Qt=function(e){if(!e.name)return!0;var n=e.form||se(e),o=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=o(window.CSS.escape(e.name));else try{a=o(e.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var r=Yt(a,e.form);return!r||r===e},Xt=function(e){return Pe(e)&&e.type==="radio"},Kt=function(e){return Xt(e)&&!Qt(e)},en=function(e){var n,o=e&&se(e),a=(n=o)===null||n===void 0?void 0:n.host,r=!1;if(o&&o!==e){var l,i,s;for(r=!!((l=a)!==null&&l!==void 0&&(i=l.ownerDocument)!==null&&i!==void 0&&i.contains(a)||e!=null&&(s=e.ownerDocument)!==null&&s!==void 0&&s.contains(e));!r&&a;){var u,f,g;o=se(a),a=(u=o)===null||u===void 0?void 0:u.host,r=!!((f=a)!==null&&f!==void 0&&(g=f.ownerDocument)!==null&&g!==void 0&&g.contains(a))}}return r},Oe=function(e){var n=e.getBoundingClientRect(),o=n.width,a=n.height;return o===0&&a===0},tn=function(e,n){var o=n.displayCheck,a=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var r=G.call(e,"details>summary:first-of-type"),l=r?e.parentElement:e;if(G.call(l,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="legacy-full"){if(typeof a=="function"){for(var i=e;e;){var s=e.parentElement,u=se(e);if(s&&!s.shadowRoot&&a(s)===!0)return Oe(e);e.assignedSlot?e=e.assignedSlot:!s&&u!==e.ownerDocument?e=u.host:e=s}e=i}if(en(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Oe(e);return!1},nn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var a=n.children.item(o);if(a.tagName==="LEGEND")return G.call(n,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}n=n.parentElement}return!1},de=function(e,n){return!(n.disabled||ce(n)||Jt(n)||tn(n,e)||Wt(n)||nn(n))},we=function(e,n){return!(Kt(n)||z(n)<0||!de(e,n))},on=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},an=function e(n){var o=[],a=[];return n.forEach(function(r,l){var i=!!r.scopeParent,s=i?r.scopeParent:r,u=Ht(s,i),f=i?e(r.candidates):s;u===0?i?o.push.apply(o,f):o.push(s):a.push({documentOrder:l,tabIndex:u,item:r,isScope:i,content:f})}),a.sort(Zt).reduce(function(r,l){return l.isScope?r.push.apply(r,l.content):r.push(l.content),r},[]).concat(o)},rn=function(e,n){n=n||{};var o;return n.getShadowRoot?o=Fe([e],n.includeContainer,{filter:we.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:on}):o=Te(e,n.includeContainer,we.bind(null,n)),an(o)},ln=function(e,n){n=n||{};var o;return n.getShadowRoot?o=Fe([e],n.includeContainer,{filter:de.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):o=Te(e,n.includeContainer,de.bind(null,n)),o},Y=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return G.call(e,ie)===!1?!1:we(n,e)},sn=Me.concat("iframe").join(","),ve=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return G.call(e,sn)===!1?!1:de(n,e)};/*!
10
5
  * focus-trap 7.6.4
11
6
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
12
- */function jt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Di(t){if(Array.isArray(t))return jt(t)}function qi(t,e,r){return(e=Ni(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Si(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ri(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
13
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Cn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_n(Object(r),!0).forEach(function(n){qi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_n(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ti(t){return Di(t)||Si(t)||Bi(t)||Ri()}function Li(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ni(t){var e=Li(t,"string");return typeof e=="symbol"?e:e+""}function Bi(t,e){if(t){if(typeof t=="string")return jt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jt(t,e):void 0}}var Dn={activateTrap:function(t,e){if(t.length>0){var r=t[t.length-1];r!==e&&r._setPausedState(!0)}var n=t.indexOf(e);n===-1||t.splice(n,1),t.push(e)},deactivateTrap:function(t,e){var r=t.indexOf(e);r!==-1&&t.splice(r,1),t.length>0&&!t[t.length-1]._isManuallyPaused()&&t[t.length-1]._setPausedState(!1)}},Fi=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},Ii=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Ve=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},Oi=function(t){return Ve(t)&&!t.shiftKey},Pi=function(t){return Ve(t)&&t.shiftKey},qn=function(t){return setTimeout(t,0)},je=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return typeof t=="function"?t.apply(void 0,r):t},ut=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},Ui=[],zi=function(t,e){var r=(e==null?void 0:e.document)||document,n=(e==null?void 0:e.trapStack)||Ui,o=Cn({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Oi,isKeyBackward:Pi},e),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},c,i=function(v,A,T){return v&&v[A]!==void 0?v[A]:o[T||A]},l=function(v,A){var T=typeof(A==null?void 0:A.composedPath)=="function"?A.composedPath():void 0;return s.containerGroups.findIndex(function(x){var D=x.container,_=x.tabbableNodes;return D.contains(v)||(T==null?void 0:T.includes(D))||_.find(function(N){return N===v})})},u=function(v){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=A.hasFallback,x=T===void 0?!1:T,D=A.params,_=D===void 0?[]:D,N=o[v];if(typeof N=="function"&&(N=N.apply(void 0,Ti(_))),N===!0&&(N=void 0),!N){if(N===void 0||N===!1)return N;throw new Error("`".concat(v,"` was specified but was not a node, or did not return a node"))}var j=N;if(typeof N=="string"){try{j=r.querySelector(N)}catch(M){throw new Error("`".concat(v,'` appears to be an invalid selector; error="').concat(M.message,'"'))}if(!j&&!x)throw new Error("`".concat(v,"` as selector refers to no known node"))}return j},d=function(){var v=u("initialFocus",{hasFallback:!0});if(v===!1)return!1;if(v===void 0||v&&!Vt(v,o.tabbableOptions))if(l(r.activeElement)>=0)v=r.activeElement;else{var A=s.tabbableGroups[0],T=A&&A.firstTabbableNode;v=T||u("fallbackFocus")}else v===null&&(v=u("fallbackFocus"));if(!v)throw new Error("Your focus-trap needs to have at least one focusable element");return v},p=function(){if(s.containerGroups=s.containers.map(function(v){var A=Ei(v,o.tabbableOptions),T=_i(v,o.tabbableOptions),x=A.length>0?A[0]:void 0,D=A.length>0?A[A.length-1]:void 0,_=T.find(function(M){return De(M)}),N=T.slice().reverse().find(function(M){return De(M)}),j=!!A.find(function(M){return we(M)>0});return{container:v,tabbableNodes:A,focusableNodes:T,posTabIndexesFound:j,firstTabbableNode:x,lastTabbableNode:D,firstDomTabbableNode:_,lastDomTabbableNode:N,nextTabbableNode:function(M){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=A.indexOf(M);return O<0?R?T.slice(T.indexOf(M)+1).find(function(P){return De(P)}):T.slice(0,T.indexOf(M)).reverse().find(function(P){return De(P)}):A[O+(R?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(v){return v.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(v){return v.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},f=function(v){var A=v.activeElement;if(A)return A.shadowRoot&&A.shadowRoot.activeElement!==null?f(A.shadowRoot):A},m=function(v){if(v!==!1&&v!==f(document)){if(!v||!v.focus){m(d());return}v.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=v,Fi(v)&&v.select()}},h=function(v){var A=u("setReturnFocus",{params:[v]});return A||(A===!1?!1:v)},b=function(v){var A=v.target,T=v.event,x=v.isBackward,D=x===void 0?!1:x;A=A||ut(T),p();var _=null;if(s.tabbableGroups.length>0){var N=l(A,T),j=N>=0?s.containerGroups[N]:void 0;if(N<0)D?_=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:_=s.tabbableGroups[0].firstTabbableNode;else if(D){var M=s.tabbableGroups.findIndex(function(oe){var Ae=oe.firstTabbableNode;return A===Ae});if(M<0&&(j.container===A||Vt(A,o.tabbableOptions)&&!De(A,o.tabbableOptions)&&!j.nextTabbableNode(A,!1))&&(M=N),M>=0){var R=M===0?s.tabbableGroups.length-1:M-1,O=s.tabbableGroups[R];_=we(A)>=0?O.lastTabbableNode:O.lastDomTabbableNode}else Ve(T)||(_=j.nextTabbableNode(A,!1))}else{var P=s.tabbableGroups.findIndex(function(oe){var Ae=oe.lastTabbableNode;return A===Ae});if(P<0&&(j.container===A||Vt(A,o.tabbableOptions)&&!De(A,o.tabbableOptions)&&!j.nextTabbableNode(A))&&(P=N),P>=0){var K=P===s.tabbableGroups.length-1?0:P+1,$=s.tabbableGroups[K];_=we(A)>=0?$.firstTabbableNode:$.firstDomTabbableNode}else Ve(T)||(_=j.nextTabbableNode(A))}}else _=u("fallbackFocus");return _},g=function(v){var A=ut(v);if(!(l(A,v)>=0)){if(je(o.clickOutsideDeactivates,v)){c.deactivate({returnFocus:o.returnFocusOnDeactivate});return}je(o.allowOutsideClick,v)||v.preventDefault()}},w=function(v){var A=ut(v),T=l(A,v)>=0;if(T||A instanceof Document)T&&(s.mostRecentlyFocusedNode=A);else{v.stopImmediatePropagation();var x,D=!0;if(s.mostRecentlyFocusedNode)if(we(s.mostRecentlyFocusedNode)>0){var _=l(s.mostRecentlyFocusedNode),N=s.containerGroups[_].tabbableNodes;if(N.length>0){var j=N.findIndex(function(M){return M===s.mostRecentlyFocusedNode});j>=0&&(o.isKeyForward(s.recentNavEvent)?j+1<N.length&&(x=N[j+1],D=!1):j-1>=0&&(x=N[j-1],D=!1))}}else s.containerGroups.some(function(M){return M.tabbableNodes.some(function(R){return we(R)>0})})||(D=!1);else D=!1;D&&(x=b({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),m(x||s.mostRecentlyFocusedNode||d())}s.recentNavEvent=void 0},k=function(v){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=v;var T=b({event:v,isBackward:A});T&&(Ve(v)&&v.preventDefault(),m(T))},C=function(v){(o.isKeyForward(v)||o.isKeyBackward(v))&&k(v,o.isKeyBackward(v))},q=function(v){Ii(v)&&je(o.escapeDeactivates,v)!==!1&&(v.preventDefault(),c.deactivate())},S=function(v){var A=ut(v);l(A,v)>=0||je(o.clickOutsideDeactivates,v)||je(o.allowOutsideClick,v)||(v.preventDefault(),v.stopImmediatePropagation())},E=function(){if(s.active)return Dn.activateTrap(n,c),s.delayInitialFocusTimer=o.delayInitialFocus?qn(function(){m(d())}):m(d()),r.addEventListener("focusin",w,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",C,{capture:!0,passive:!1}),r.addEventListener("keydown",q),c},L=function(){if(s.active)return r.removeEventListener("focusin",w,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",C,!0),r.removeEventListener("keydown",q),c},U=function(v){var A=v.some(function(T){var x=Array.from(T.removedNodes);return x.some(function(D){return D===s.mostRecentlyFocusedNode})});A&&m(d())},G=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(U):void 0,I=function(){G&&(G.disconnect(),s.active&&!s.paused&&s.containers.map(function(v){G.observe(v,{subtree:!0,childList:!0})}))};return c={get active(){return s.active},get paused(){return s.paused},activate:function(v){if(s.active)return this;var A=i(v,"onActivate"),T=i(v,"onPostActivate"),x=i(v,"checkCanFocusTrap");x||p(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,A==null||A();var D=function(){x&&p(),E(),I(),T==null||T()};return x?(x(s.containers.concat()).then(D,D),this):(D(),this)},deactivate:function(v){if(!s.active)return this;var A=Cn({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},v);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,L(),s.active=!1,s.paused=!1,I(),Dn.deactivateTrap(n,c);var T=i(A,"onDeactivate"),x=i(A,"onPostDeactivate"),D=i(A,"checkCanReturnFocus"),_=i(A,"returnFocus","returnFocusOnDeactivate");T==null||T();var N=function(){qn(function(){_&&m(h(s.nodeFocusedBeforeActivation)),x==null||x()})};return _&&D?(D(h(s.nodeFocusedBeforeActivation)).then(N,N),this):(N(),this)},pause:function(v){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,v)):this},unpause:function(v){return s.active?(s.manuallyPaused=!1,n[n.length-1]!==this?this:this._setPausedState(!1,v)):this},updateContainerElements:function(v){var A=[].concat(v).filter(Boolean);return s.containers=A.map(function(T){return typeof T=="string"?r.querySelector(T):T}),s.active&&p(),I(),this}},Object.defineProperties(c,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(v,A){if(s.paused===v)return this;if(s.paused=v,v){var T=i(A,"onPause"),x=i(A,"onPostPause");T==null||T(),L(),I(),x==null||x()}else{var D=i(A,"onUnpause"),_=i(A,"onPostUnpause");D==null||D(),p(),E(),I(),_==null||_()}return this}}}),c.updateContainerElements(t),c};const Mi=a.defineComponent({name:"UseFocusTrap",props:["as","options"],setup(t,{slots:e}){let r;const n=a.ref(),o=()=>r&&r.activate(),s=()=>r&&r.deactivate();return a.watch(()=>pe(n),c=>{c&&(r=zi(c,t.options||{}),o())},{flush:"post"}),a.onScopeDispose(()=>s()),()=>{if(e.default)return a.h(t.as||"div",{ref:n},e.default())}}}),Vi=W(a.defineComponent({__name:"QFocusTrap",props:a.mergeModels({options:{},as:{}},{disabled:{type:Boolean},disabledModifiers:{}}),emits:["update:disabled"],setup(t){const e=t,r=a.useModel(t,"disabled");return(n,o)=>r.value?a.renderSlot(n.$slots,"default",{key:0}):(a.openBlock(),a.createBlock(a.unref(Mi),a.normalizeProps(a.mergeProps({key:1},e)),{default:a.withCtx(()=>[a.renderSlot(n.$slots,"default")]),_:3},16))}})),qe="data-scroll-locked",Gt="right-scroll-bar-position",$t="width-before-scroll-bar",ji="with-scroll-bars-hidden",Gi="--removed-body-scroll-bar-size",$i={left:0,top:0,right:0,gap:0},Ht=t=>parseInt(t||"",10)||0,Hi=t=>{const e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Ht(r),Ht(n),Ht(o)]},Zi=(t="margin")=>{if(typeof window>"u")return $i;const e=Hi(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}};function Wi(){return document?document.createElement("style"):null}function Ji(t,e){t.appendChild(document.createTextNode(e))}function Qi(t){(document.head||document.getElementsByTagName("head")[0]).appendChild(t)}const Yi=()=>{let t=0,e=null;return{add:r=>{t===0&&(e=Wi())&&(Ji(e,r),Qi(e)),t++},remove:()=>{var r;t--,!t&&e&&((r=e.parentNode)==null||r.removeChild(e),e=null)}}},Xi=W(a.defineComponent({__name:"QRemoveScrollBar",props:{noRelative:{type:Boolean},noImportant:{type:Boolean},gapMode:{default:"margin"}},setup(t){const e=t,r=Yi(),n=()=>{const s=parseInt(document.body.getAttribute(qe)||"0",10);return isFinite(s)?s:0},o=({left:s,top:c,right:i,gap:l},u,d="margin",p)=>`
14
- .${ji} {
15
- overflow: hidden ${p};
16
- padding-right: ${l}px ${p};
7
+ */function ke(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,a=Array(n);o<n;o++)a[o]=e[o];return a}function cn(e){if(Array.isArray(e))return ke(e)}function dn(e,n,o){return(n=gn(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function un(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,a)}return o}function qe(e){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?Ue(Object(o),!0).forEach(function(a){dn(e,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ue(Object(o)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(o,a))})}return e}function fn(e){return cn(e)||un(e)||bn(e)||pn()}function mn(e,n){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var a=o.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function gn(e){var n=mn(e,"string");return typeof n=="symbol"?n:n+""}function bn(e,n){if(e){if(typeof e=="string")return ke(e,n);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?ke(e,n):void 0}}var je={activateTrap:function(e,n){if(e.length>0){var o=e[e.length-1];o!==n&&o._setPausedState(!0)}var a=e.indexOf(n);a===-1||e.splice(a,1),e.push(n)},deactivateTrap:function(e,n){var o=e.indexOf(n);o!==-1&&e.splice(o,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},hn=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},yn=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},oe=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},wn=function(e){return oe(e)&&!e.shiftKey},vn=function(e){return oe(e)&&e.shiftKey},Ge=function(e){return setTimeout(e,0)},ae=function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return typeof e=="function"?e.apply(void 0,o):e},ue=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},kn=[],Bn=function(e,n){var o=(n==null?void 0:n.document)||document,a=(n==null?void 0:n.trapStack)||kn,r=qe({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:wn,isKeyBackward:vn},n),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},i,s=function(d,p,w){return d&&d[p]!==void 0?d[p]:r[w||p]},u=function(d,p){var w=typeof(p==null?void 0:p.composedPath)=="function"?p.composedPath():void 0;return l.containerGroups.findIndex(function(A){var B=A.container,D=A.tabbableNodes;return B.contains(d)||(w==null?void 0:w.includes(B))||D.find(function(C){return C===d})})},f=function(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=p.hasFallback,A=w===void 0?!1:w,B=p.params,D=B===void 0?[]:B,C=r[d];if(typeof C=="function"&&(C=C.apply(void 0,fn(D))),C===!0&&(C=void 0),!C){if(C===void 0||C===!1)return C;throw new Error("`".concat(d,"` was specified but was not a node, or did not return a node"))}var b=C;if(typeof C=="string"){try{b=o.querySelector(C)}catch(h){throw new Error("`".concat(d,'` appears to be an invalid selector; error="').concat(h.message,'"'))}if(!b&&!A)throw new Error("`".concat(d,"` as selector refers to no known node"))}return b},g=function(){var d=f("initialFocus",{hasFallback:!0});if(d===!1)return!1;if(d===void 0||d&&!ve(d,r.tabbableOptions))if(u(o.activeElement)>=0)d=o.activeElement;else{var p=l.tabbableGroups[0],w=p&&p.firstTabbableNode;d=w||f("fallbackFocus")}else d===null&&(d=f("fallbackFocus"));if(!d)throw new Error("Your focus-trap needs to have at least one focusable element");return d},c=function(){if(l.containerGroups=l.containers.map(function(d){var p=rn(d,r.tabbableOptions),w=ln(d,r.tabbableOptions),A=p.length>0?p[0]:void 0,B=p.length>0?p[p.length-1]:void 0,D=w.find(function(h){return Y(h)}),C=w.slice().reverse().find(function(h){return Y(h)}),b=!!p.find(function(h){return z(h)>0});return{container:d,tabbableNodes:p,focusableNodes:w,posTabIndexesFound:b,firstTabbableNode:A,lastTabbableNode:B,firstDomTabbableNode:D,lastDomTabbableNode:C,nextTabbableNode:function(h){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,T=p.indexOf(h);return T<0?E?w.slice(w.indexOf(h)+1).find(function(L){return Y(L)}):w.slice(0,w.indexOf(h)).reverse().find(function(L){return Y(L)}):p[T+(E?1:-1)]}}}),l.tabbableGroups=l.containerGroups.filter(function(d){return d.tabbableNodes.length>0}),l.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find(function(d){return d.posTabIndexesFound})&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(d){var p=d.activeElement;if(p)return p.shadowRoot&&p.shadowRoot.activeElement!==null?m(p.shadowRoot):p},y=function(d){if(d!==!1&&d!==m(document)){if(!d||!d.focus){y(g());return}d.focus({preventScroll:!!r.preventScroll}),l.mostRecentlyFocusedNode=d,hn(d)&&d.select()}},x=function(d){var p=f("setReturnFocus",{params:[d]});return p||(p===!1?!1:d)},$=function(d){var p=d.target,w=d.event,A=d.isBackward,B=A===void 0?!1:A;p=p||ue(w),c();var D=null;if(l.tabbableGroups.length>0){var C=u(p,w),b=C>=0?l.containerGroups[C]:void 0;if(C<0)B?D=l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:D=l.tabbableGroups[0].firstTabbableNode;else if(B){var h=l.tabbableGroups.findIndex(function(ee){var le=ee.firstTabbableNode;return p===le});if(h<0&&(b.container===p||ve(p,r.tabbableOptions)&&!Y(p,r.tabbableOptions)&&!b.nextTabbableNode(p,!1))&&(h=C),h>=0){var E=h===0?l.tabbableGroups.length-1:h-1,T=l.tabbableGroups[E];D=z(p)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else oe(w)||(D=b.nextTabbableNode(p,!1))}else{var L=l.tabbableGroups.findIndex(function(ee){var le=ee.lastTabbableNode;return p===le});if(L<0&&(b.container===p||ve(p,r.tabbableOptions)&&!Y(p,r.tabbableOptions)&&!b.nextTabbableNode(p))&&(L=C),L>=0){var Z=L===l.tabbableGroups.length-1?0:L+1,K=l.tabbableGroups[Z];D=z(p)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else oe(w)||(D=b.nextTabbableNode(p))}}else D=f("fallbackFocus");return D},S=function(d){var p=ue(d);if(!(u(p,d)>=0)){if(ae(r.clickOutsideDeactivates,d)){i.deactivate({returnFocus:r.returnFocusOnDeactivate});return}ae(r.allowOutsideClick,d)||d.preventDefault()}},U=function(d){var p=ue(d),w=u(p,d)>=0;if(w||p instanceof Document)w&&(l.mostRecentlyFocusedNode=p);else{d.stopImmediatePropagation();var A,B=!0;if(l.mostRecentlyFocusedNode)if(z(l.mostRecentlyFocusedNode)>0){var D=u(l.mostRecentlyFocusedNode),C=l.containerGroups[D].tabbableNodes;if(C.length>0){var b=C.findIndex(function(h){return h===l.mostRecentlyFocusedNode});b>=0&&(r.isKeyForward(l.recentNavEvent)?b+1<C.length&&(A=C[b+1],B=!1):b-1>=0&&(A=C[b-1],B=!1))}}else l.containerGroups.some(function(h){return h.tabbableNodes.some(function(E){return z(E)>0})})||(B=!1);else B=!1;B&&(A=$({target:l.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(l.recentNavEvent)})),y(A||l.mostRecentlyFocusedNode||g())}l.recentNavEvent=void 0},M=function(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;l.recentNavEvent=d;var w=$({event:d,isBackward:p});w&&(oe(d)&&d.preventDefault(),y(w))},F=function(d){(r.isKeyForward(d)||r.isKeyBackward(d))&&M(d,r.isKeyBackward(d))},_=function(d){yn(d)&&ae(r.escapeDeactivates,d)!==!1&&(d.preventDefault(),i.deactivate())},I=function(d){var p=ue(d);u(p,d)>=0||ae(r.clickOutsideDeactivates,d)||ae(r.allowOutsideClick,d)||(d.preventDefault(),d.stopImmediatePropagation())},k=function(){if(l.active)return je.activateTrap(a,i),l.delayInitialFocusTimer=r.delayInitialFocus?Ge(function(){y(g())}):y(g()),o.addEventListener("focusin",U,!0),o.addEventListener("mousedown",S,{capture:!0,passive:!1}),o.addEventListener("touchstart",S,{capture:!0,passive:!1}),o.addEventListener("click",I,{capture:!0,passive:!1}),o.addEventListener("keydown",F,{capture:!0,passive:!1}),o.addEventListener("keydown",_),i},N=function(){if(l.active)return o.removeEventListener("focusin",U,!0),o.removeEventListener("mousedown",S,!0),o.removeEventListener("touchstart",S,!0),o.removeEventListener("click",I,!0),o.removeEventListener("keydown",F,!0),o.removeEventListener("keydown",_),i},V=function(d){var p=d.some(function(w){var A=Array.from(w.removedNodes);return A.some(function(B){return B===l.mostRecentlyFocusedNode})});p&&y(g())},R=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(V):void 0,O=function(){R&&(R.disconnect(),l.active&&!l.paused&&l.containers.map(function(d){R.observe(d,{subtree:!0,childList:!0})}))};return i={get active(){return l.active},get paused(){return l.paused},activate:function(d){if(l.active)return this;var p=s(d,"onActivate"),w=s(d,"onPostActivate"),A=s(d,"checkCanFocusTrap");A||c(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=o.activeElement,p==null||p();var B=function(){A&&c(),k(),O(),w==null||w()};return A?(A(l.containers.concat()).then(B,B),this):(B(),this)},deactivate:function(d){if(!l.active)return this;var p=qe({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},d);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,N(),l.active=!1,l.paused=!1,O(),je.deactivateTrap(a,i);var w=s(p,"onDeactivate"),A=s(p,"onPostDeactivate"),B=s(p,"checkCanReturnFocus"),D=s(p,"returnFocus","returnFocusOnDeactivate");w==null||w();var C=function(){Ge(function(){D&&y(x(l.nodeFocusedBeforeActivation)),A==null||A()})};return D&&B?(B(x(l.nodeFocusedBeforeActivation)).then(C,C),this):(C(),this)},pause:function(d){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,d)):this},unpause:function(d){return l.active?(l.manuallyPaused=!1,a[a.length-1]!==this?this:this._setPausedState(!1,d)):this},updateContainerElements:function(d){var p=[].concat(d).filter(Boolean);return l.containers=p.map(function(w){return typeof w=="string"?o.querySelector(w):w}),l.active&&c(),O(),this}},Object.defineProperties(i,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(d,p){if(l.paused===d)return this;if(l.paused=d,d){var w=s(p,"onPause"),A=s(p,"onPostPause");w==null||w(),N(),O(),A==null||A()}else{var B=s(p,"onUnpause"),D=s(p,"onPostUnpause");B==null||B(),c(),k(),O(),D==null||D()}return this}}}),i.updateContainerElements(e),i};const En=t.defineComponent({name:"UseFocusTrap",props:["as","options"],setup(e,{slots:n}){let o;const a=t.ref(),r=()=>o&&o.activate(),l=()=>o&&o.deactivate();return t.watch(()=>Gt(a),i=>{i&&(o=Bn(i,e.options||{}),r())},{flush:"post"}),t.onScopeDispose(()=>l()),()=>{if(n.default)return t.h(e.as||"div",{ref:a},n.default())}}}),Cn=q(t.defineComponent({__name:"QFocusTrap",props:t.mergeModels({options:{},as:{}},{disabled:{type:Boolean},disabledModifiers:{}}),emits:["update:disabled"],setup(e){const n=e,o=t.useModel(e,"disabled");return(a,r)=>o.value?t.renderSlot(a.$slots,"default",{key:0}):(t.openBlock(),t.createBlock(t.unref(En),t.normalizeProps(t.mergeProps({key:1},n)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16))}})),Q="data-scroll-locked",Be="right-scroll-bar-position",Ee="width-before-scroll-bar",_n="with-scroll-bars-hidden",An="--removed-body-scroll-bar-size",Nn={left:0,top:0,right:0,gap:0},Ce=e=>parseInt(e||"",10)||0,Sn=e=>{const n=window.getComputedStyle(document.body),o=n[e==="padding"?"paddingLeft":"marginLeft"],a=n[e==="padding"?"paddingTop":"marginTop"],r=n[e==="padding"?"paddingRight":"marginRight"];return[Ce(o),Ce(a),Ce(r)]},In=(e="margin")=>{if(typeof window>"u")return Nn;const n=Sn(e),o=document.documentElement.clientWidth,a=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,a-o+n[2]-n[0])}};function xn(){return document?document.createElement("style"):null}function Dn(e,n){e.appendChild(document.createTextNode(n))}function $n(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}const Ln=()=>{let e=0,n=null;return{add:o=>{e===0&&(n=xn())&&(Dn(n,o),$n(n)),e++},remove:()=>{var o;e--,!e&&n&&((o=n.parentNode)==null||o.removeChild(n),n=null)}}},Mn=q(t.defineComponent({__name:"QRemoveScrollBar",props:{noRelative:{type:Boolean},noImportant:{type:Boolean},gapMode:{default:"margin"}},setup(e){const n=e,o=Ln(),a=()=>{const l=parseInt(document.body.getAttribute(Q)||"0",10);return isFinite(l)?l:0},r=({left:l,top:i,right:s,gap:u},f,g="margin",c)=>`
9
+ .${_n} {
10
+ overflow: hidden ${c};
11
+ padding-right: ${u}px ${c};
17
12
  }
18
- body[${qe}] {
19
- overflow: hidden ${p};
13
+ body[${Q}] {
14
+ overflow: hidden ${c};
20
15
  overscroll-behavior: contain;
21
- ${[u&&`position: relative ${p};`,d==="margin"&&`
22
- padding-left: ${s}px;
23
- padding-top: ${c}px;
24
- padding-right: ${i}px;
16
+ ${[f&&`position: relative ${c};`,g==="margin"&&`
17
+ padding-left: ${l}px;
18
+ padding-top: ${i}px;
19
+ padding-right: ${s}px;
25
20
  margin-left:0;
26
21
  margin-top:0;
27
- margin-right: ${l}px ${p};
28
- `,d==="padding"&&`padding-right: ${l}px ${p};`].filter(Boolean).join("")}
22
+ margin-right: ${u}px ${c};
23
+ `,g==="padding"&&`padding-right: ${u}px ${c};`].filter(Boolean).join("")}
29
24
  }
30
25
 
31
- .${Gt} {
32
- right: ${l}px ${p};
26
+ .${Be} {
27
+ right: ${u}px ${c};
33
28
  }
34
29
 
35
- .${$t} {
36
- margin-right: ${l}px ${p};
30
+ .${Ee} {
31
+ margin-right: ${u}px ${c};
37
32
  }
38
33
 
39
- .${Gt} .${Gt} {
40
- right: 0 ${p};
34
+ .${Be} .${Be} {
35
+ right: 0 ${c};
41
36
  }
42
37
 
43
- .${$t} .${$t} {
44
- margin-right: 0 ${p};
38
+ .${Ee} .${Ee} {
39
+ margin-right: 0 ${c};
45
40
  }
46
41
 
47
- body[${qe}] {
48
- ${Gi}: ${l}px;
42
+ body[${Q}] {
43
+ ${An}: ${u}px;
49
44
  }
50
- `;return a.onMounted(()=>{document.body.setAttribute(qe,(n()+1).toString());const s=Zi(e.gapMode);r.add(o(s,!e.noRelative,e.gapMode,e.noImportant?"":"!important"))}),a.onUnmounted(()=>{const s=n()-1;s<=0?document.body.removeAttribute(qe):document.body.setAttribute(qe,s.toString()),r.remove()}),(s,c)=>a.renderSlot(s.$slots,"default")}}));function Ki(t,e,r,n){const o=(n==null?void 0:n.offset)??0,s=(n==null?void 0:n.crossOffset)??0,c=(n==null?void 0:n.placement)??"bottom",i=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=r==null?void 0:r.getBoundingClientRect(),d=ea(i,l,c,o),p=sa(i,l,d),f=ra(p,d,o),m=na(f,d,s),h=ta(m,l,d);let b;if(n!=null&&n.arrow){if(!u)throw new Error("[Quidgest UI] The arrow element must exist to compute its position");b=oa(h,i,l,u,d)}return{overlayCoords:h,arrowCoords:b,placement:d}}function ea(t,e,r,n){const o=Sn(t,e,r,n);if(Rn(o)){const s=Se(r),c={top:"bottom",bottom:"top",left:"right",right:"left"}[s],i=Sn(t,e,c,n);if(Rn(i))return r;const l=aa(r);return l?`${c}-${l}`:c}return r}function ta(t,e,r){const n=dt(r),o=(c,i,l)=>Math.min(Math.max(c,i),l),s={...t};return n==="x"?s.x=o(t.x,8,window.innerWidth-e.width-8):s.y=o(t.y,8,window.innerHeight-e.height-8),s}function ra(t,e,r){const n=Se(e);return{x:t.x+(n==="left"?-r:n==="right"?r:0),y:t.y+(n==="top"?-r:n==="bottom"?r:0)}}function na(t,e,r){const n=Se(e);return{x:t.x+(n==="top"||n==="bottom"?r:0),y:t.y+(n==="right"||n==="left"?r:0)}}function oa(t,e,r,n,o){if(dt(o)==="y"){const s=e.top+e.height/2,c=t.y+r.height/2,i=c-s,l=r.height/2-i-n.height/2+2;if(l>0&&l<r.height-n.height)return{y:l}}else{const s=e.left+e.width/2,c=t.x+r.width/2,i=c-s,l=r.width/2-i-n.width/2+2;if(l>0&&l<r.width-n.width)return{x:l}}}function sa(t,e,r){const[n,o]=r.split("-"),s=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2;let i;switch(n){case"top":i={x:s,y:t.y-e.height};break;case"bottom":i={x:s,y:t.y+t.height};break;case"left":i={x:t.x-e.width,y:c};break;case"right":i={x:t.x+t.width,y:c};break;default:throw new Error(`[Quidgest UI] Invalid placement value: ${r}`)}if(!o)return i;const l=dt(r)==="y"?"height":"width",u=dt(r),d=t[l]/2-e[l]/2;switch(o){case"start":i[u]-=d;break;case"end":i[u]+=d;break;default:throw new Error(`[Quidgest UI] Invalid alignment value: ${o}`)}return i}function Sn(t,e,r,n){const o=Se(r);let s=0;switch(o){case"top":s=t.top-(e.height+n);break;case"bottom":s=window.innerHeight-t.bottom-(e.height+n);break;case"left":s=t.left-(e.width+n);break;case"right":s=window.innerWidth-t.right-(e.width+n);break;default:throw new Error(`[Quidgest UI] Invalid side value: ${o}`)}return s}function ca(t){return t==="x"?"y":"x"}function ia(t){const e=Se(t);return["left","right"].includes(e)?"x":"y"}function dt(t){return ca(ia(t))}function Se(t){const[e]=t.split("-");return e}function aa(t){const[,e]=t.split("-");return e}function Rn(t){return t<0}function la(t){return typeof t=="string"?document.querySelector(t):t}const ua=["id"],da=["role"],pa=W(a.defineComponent({inheritAttrs:!1,__name:"QOverlay",props:a.mergeModels({id:{},class:{},anchor:{},appearance:{default:"regular"},arrow:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},delay:{default:500},nonModal:{type:Boolean},scrollLock:{type:Boolean},offset:{default:8},crossOffset:{default:0},persistent:{type:Boolean},placement:{default:"right"},spy:{type:Boolean},transition:{default:"fade"},trigger:{default:"click"},closeOnContentClick:{type:Boolean},width:{default:"auto"},focusTrap:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:a.mergeModels(["enter","leave"],["update:modelValue"]),setup(t,{emit:e}){const r=t,n=e,o=a.useModel(t,"modelValue"),{class:s}=ln(),c=a.computed(()=>["q-overlay",`q-overlay--${Se(p.placement)}`,s.value,{"q-overlay--independent":i.value,"q-overlay--inverted":r.appearance==="inverted"},r.class]),i=a.computed(()=>r.anchor===void 0),l=a.computed(()=>o.value&&!r.nonModal),u=a.computed(()=>(o.value||p.animating)&&r.scrollLock),d=a.computed(()=>!r.inline&&(o.value||p.animating)),p=a.reactive({animating:!1,top:0,left:0,width:0,placement:r.placement}),f=a.reactive({top:void 0,left:void 0,hidden:!0});a.watch(o,T);const m=a.computed(()=>{if(i.value)return;const B=D(),de=r.width==="anchor",Y=de?B==null?void 0:B.getBoundingClientRect().width:void 0;return{top:`${p.top}px`,left:`${p.left}px`,width:Y!==void 0?`${Y}px`:void 0}}),h=a.computed(()=>{if(r.arrow)return{top:f.top!==void 0?`${f.top}px`:void 0,left:f.left!==void 0?`${f.left}px`:void 0,opacity:f.hidden?0:1}}),b=a.ref(null),g=a.ref(null),w=a.ref(null);function k(){const B=D();if(!B||!g.value)return;const de={placement:r.placement,width:r.width,offset:r.offset,crossOffset:r.crossOffset,arrow:r.arrow},Y=Ki(B,g.value,(b==null?void 0:b.value)??void 0,de);p.left=Y.overlayCoords.x,p.top=Y.overlayCoords.y,p.placement=Y.placement,f.hidden=Y.arrowCoords===void 0,Y.arrowCoords&&(f.top=Y.arrowCoords.y,f.left=Y.arrowCoords.x)}a.watch(()=>r.placement,()=>a.nextTick(k));let C;function q(){E(0)}function S(){E(r.delay)}function E(B){C&&U(),C=window.setTimeout(()=>{o.value=!0},B)}function L(){if(C&&U(),o.value=!1,r.anchor&&r.trigger==="click"){const B=D();a.nextTick(()=>B==null?void 0:B.focus())}}function U(){clearTimeout(C),C=void 0}function G(){a.nextTick(Ae),n("enter")}function I(){x()}function v(){n("leave")}function A(){x(),kr()}function T(){p.animating=!0}function x(){p.animating=!1}function D(){return r.anchor?la(r.anchor):null}function _(B){r.persistent&&B.preventDefault()}function N(B){var de;if(r.persistent){B.preventDefault();return}let Y=!1;B.defaultPrevented||B.detail.originalEvent.type==="pointerdown"&&(Y=!0);const Ct=B.detail.originalEvent.target;if((de=D())!=null&&de.contains(Ct)){B.preventDefault();return}B.detail.originalEvent.type==="focusin"&&Y&&B.preventDefault()}function j(){L()}let M;function R(){const B=D();if(B)switch(M=new MutationObserver(k),M.observe(B,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),r.trigger){case"click":B.addEventListener("click",q);break;case"hover":B.addEventListener("mouseenter",S),B.addEventListener("mouseleave",L),B.addEventListener("focusin",q),B.addEventListener("focusout",L);break}}function O(){const B=D();if(B)switch(M==null||M.disconnect(),r.trigger){case"click":B.removeEventListener("click",q);break;case"hover":B.removeEventListener("mouseenter",S),B.removeEventListener("mouseleave",L),B.removeEventListener("focusin",q),B.removeEventListener("focusout",L);break}}function P(){window.addEventListener("resize",k),r.scrollLock||window.addEventListener("scroll",k)}function K(){window.removeEventListener("resize",k),r.scrollLock||window.removeEventListener("scroll",k)}let $;function oe(){D()?(k(),$=window.setTimeout(oe,100)):L()}function Ae(){var B;i.value||(P(),r.spy?oe():k()),(i.value||r.trigger==="click")&&((B=g.value)==null||B.focus())}function kr(){i.value||K(),r.spy&&(clearTimeout($),$=void 0)}return a.onMounted(()=>{a.nextTick(R)}),a.onBeforeUnmount(O),(B,de)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createBlock(a.Teleport,{disabled:!d.value,to:r.attach},[a.createVNode(a.Transition,{name:"fade",appear:""},{default:a.withCtx(()=>[l.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass([r.backdropClass,"q-overlay__underlay",{"q-overlay__underlay--blur":r.backdropBlur}])},null,2)):a.createCommentVNode("v-if",!0)]),_:1}),a.createVNode(a.Transition,{name:r.transition,appear:"",onEnter:G,onAfterEnter:I,onLeave:v,onAfterLeave:A},{default:a.withCtx(()=>[o.value?(a.openBlock(),a.createElementBlock("div",{key:0,id:r.id,ref_key:"overlayContainerRef",ref:w,tabindex:"-1",class:a.normalizeClass(c.value),style:a.normalizeStyle(m.value)},[a.createVNode(a.unref(li),{onDismiss:j,onInteractOutside:N,onPointerDownOutside:_},{default:a.withCtx(()=>[w.value?(a.openBlock(),a.createBlock(a.unref(Vi),{key:0,disabled:r.nonModal||!o.value,options:{fallbackFocus:w.value}},{default:a.withCtx(()=>[a.createElementVNode("div",a.mergeProps({ref_key:"overlayRef",ref:g,class:"q-overlay__content",tabindex:"-1",role:l.value?"dialog":void 0},B.$attrs),[r.arrow?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:b,role:"presentation",class:"q-overlay__arrow",style:a.normalizeStyle(h.value)},null,4)):a.createCommentVNode("v-if",!0),a.renderSlot(B.$slots,"default")],16,da)]),_:3},8,["disabled","options"])):a.createCommentVNode("v-if",!0)]),_:3})],14,ua)):a.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"])),u.value?(a.openBlock(),a.createBlock(a.unref(Xi),{key:0})):a.createCommentVNode("v-if",!0)],64))}})),fa=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],ha={icon:"check-circle-outline"},ma={close:{icon:"close"}},ga={class:"q-dialog__header"},ba={class:"q-dialog__header-title"},ya={class:"q-dialog__body"},wa={key:0,class:"q-dialog__body-icon"},ka={class:"q-dialog__body-text"},va=["innerHTML"],xa={key:1},Aa={class:"q-dialog__body-actions"},Ea=W(a.defineComponent({__name:"QDialog",props:a.mergeModels({id:{},class:{},title:{},text:{},icon:{default:()=>ha},buttons:{default:()=>fa},attach:{default:"body"},inline:{type:Boolean},backdropBlur:{type:Boolean,default:!0},dismissible:{type:Boolean},html:{type:Boolean,default:!0},icons:{default:()=>ma}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,r=a.useModel(t,"modelValue");function n(){r.value=!1}function o(s){var c;(c=s.action)==null||c.call(s),n()}return(s,c)=>(a.openBlock(),a.createBlock(a.unref(pa),{id:e.id,modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=i=>r.value=i),"backdrop-class":"q-dialog__underlay","scroll-lock":"",persistent:"",inline:e.inline,attach:e.attach,"backdrop-blur":e.backdropBlur},{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["q-dialog",e.class])},[a.createElementVNode("div",ga,[a.createElementVNode("span",ba,a.toDisplayString(e.title),1),e.dismissible?(a.openBlock(),a.createBlock(a.unref(ce),{key:0,variant:"text",onClick:n},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),a.normalizeProps(a.guardReactiveProps(e.icons.close)),null,16)]),_:1})):a.createCommentVNode("v-if",!0)]),a.renderSlot(s.$slots,"body.content",{},()=>[a.createElementVNode("div",ya,[a.renderSlot(s.$slots,"body.icon",{},()=>[e.icon?(a.openBlock(),a.createElementBlock("span",wa,[a.createVNode(a.unref(ee),a.normalizeProps(a.guardReactiveProps(e.icon)),null,16)])):a.createCommentVNode("v-if",!0)]),a.createElementVNode("div",ka,[e.html?(a.openBlock(),a.createElementBlock("span",{key:0,innerHTML:e.text},null,8,va)):(a.openBlock(),a.createElementBlock("span",xa,a.toDisplayString(e.text),1))]),a.renderSlot(s.$slots,"body.append")])]),a.createElementVNode("div",Aa,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.buttons,i=>(a.openBlock(),a.createBlock(a.unref(ce),a.mergeProps({ref_for:!0},i.props,{key:i.id,onClick:()=>o(i)}),{default:a.withCtx(()=>[i.icon?(a.openBlock(),a.createBlock(a.unref(ee),a.mergeProps({key:0,ref_for:!0},i.icon),null,16)):a.createCommentVNode("v-if",!0)]),_:2},1040,["onClick"]))),128))])],2)]),_:3},8,["id","modelValue","inline","attach","backdrop-blur"]))}})),_a=["id","required","placeholder","readonly","disabled","maxlength","rows","cols","resize","wrap"],Ca=W(a.defineComponent({inheritAttrs:!1,__name:"QTextArea",props:a.mergeModels({id:{},class:{},label:{},for:{},required:{type:Boolean},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},rows:{default:3},cols:{},resize:{default:"vertical"},wrap:{default:"soft"},autosize:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,r=a.useModel(t,"modelValue"),n=a.computed({get:()=>r.value,set:u=>{const d=e.maxLength;r.value=d?u==null?void 0:u.slice(0,d):u}});a.watch(r,u=>n.value=u,{immediate:!0});const o=dn(e.id),s=a.computed(()=>e.readonly||e.disabled?void 0:e.placeholder),c=a.computed(()=>({input:e.autosize?l:null})),i=a.ref(),{triggerResize:l}=ai({element:a.computed(()=>e.autosize?i.value:void 0),styleProp:"minHeight"});return(u,d)=>(a.openBlock(),a.createBlock(a.unref(fn),{class:a.normalizeClass(["q-text-area",e.class]),for:a.unref(o),label:e.label,size:e.size,readonly:e.readonly,disabled:e.disabled,required:e.required},a.createSlots({"label.prepend":a.withCtx(()=>[a.renderSlot(u.$slots,"label.prepend")]),"label.append":a.withCtx(()=>[a.renderSlot(u.$slots,"label.append")]),default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("textarea",a.mergeProps({id:a.unref(o),ref_key:"textareaRef",ref:i,"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),class:"q-text-area__input",required:e.required,placeholder:s.value,readonly:e.readonly,disabled:e.disabled,maxlength:e.maxLength,rows:e.rows,cols:e.cols,resize:e.resize,wrap:e.wrap},u.$attrs,a.toHandlers(c.value,!0)),null,16,_a),[[a.vModelText,n.value]])]),_:2},[u.$slots.prepend?{name:"prepend",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"prepend")]),key:"0"}:void 0,u.$slots.append?{name:"append",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"append")]),key:"1"}:void 0,u.$slots.extras?{name:"extras",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","size","readonly","disabled","required"]))}})),Da={class:"pulsing-dots"},qa=a.defineComponent({__name:"PulseDots",setup(t){const e=[1,2,3];return(r,n)=>(a.openBlock(),a.createElementBlock("div",Da,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(e,(o,s)=>a.createElementVNode("span",{key:s,class:"dot",style:a.normalizeStyle({animationDelay:s*.2+"s"})}," • ",4)),64))]))}});function Sa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ra(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var z={},Tn={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
51
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Zt=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Re={},Ln={};function Ta(t){var e,r,n=Ln[t];if(n)return n;for(n=Ln[t]=[],e=0;e<128;e++)r=String.fromCharCode(e),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<t.length;e++)n[t.charCodeAt(e)]=t[e];return n}function pt(t,e,r){var n,o,s,c,i,l="";for(typeof e!="string"&&(r=e,e=pt.defaultChars),typeof r>"u"&&(r=!0),i=Ta(e),n=0,o=t.length;n<o;n++){if(s=t.charCodeAt(n),r&&s===37&&n+2<o&&/^[0-9a-f]{2}$/i.test(t.slice(n+1,n+3))){l+=t.slice(n,n+3),n+=2;continue}if(s<128){l+=i[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&n+1<o&&(c=t.charCodeAt(n+1),c>=56320&&c<=57343)){l+=encodeURIComponent(t[n]+t[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(t[n])}return l}pt.defaultChars=";/?:@&=+$,-_.!~*'()#",pt.componentChars="-_.!~*'()";var La=pt,Nn={};function Na(t){var e,r,n=Nn[t];if(n)return n;for(n=Nn[t]=[],e=0;e<128;e++)r=String.fromCharCode(e),n.push(r);for(e=0;e<t.length;e++)r=t.charCodeAt(e),n[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}function ft(t,e){var r;return typeof e!="string"&&(e=ft.defaultChars),r=Na(e),t.replace(/(%[a-f0-9]{2})+/gi,function(n){var o,s,c,i,l,u,d,p="";for(o=0,s=n.length;o<s;o+=3){if(c=parseInt(n.slice(o+1,o+3),16),c<128){p+=r[c];continue}if((c&224)===192&&o+3<s&&(i=parseInt(n.slice(o+4,o+6),16),(i&192)===128)){d=c<<6&1984|i&63,d<128?p+="��":p+=String.fromCharCode(d),o+=3;continue}if((c&240)===224&&o+6<s&&(i=parseInt(n.slice(o+4,o+6),16),l=parseInt(n.slice(o+7,o+9),16),(i&192)===128&&(l&192)===128)){d=c<<12&61440|i<<6&4032|l&63,d<2048||d>=55296&&d<=57343?p+="���":p+=String.fromCharCode(d),o+=6;continue}if((c&248)===240&&o+9<s&&(i=parseInt(n.slice(o+4,o+6),16),l=parseInt(n.slice(o+7,o+9),16),u=parseInt(n.slice(o+10,o+12),16),(i&192)===128&&(l&192)===128&&(u&192)===128)){d=c<<18&1835008|i<<12&258048|l<<6&4032|u&63,d<65536||d>1114111?p+="����":(d-=65536,p+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}p+="�"}return p})}ft.defaultChars=";/?:@&=+$,#",ft.componentChars="";var Ba=ft,Fa=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?r+="["+e.hostname+"]":r+=e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||"",r};function ht(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Ia=/^([a-z0-9.+-]+:)/i,Oa=/:[0-9]*$/,Pa=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ua=["<",">",'"',"`"," ","\r",`
52
- `," "],za=["{","}","|","\\","^","`"].concat(Ua),Ma=["'"].concat(za),Bn=["%","/","?",";","#"].concat(Ma),Fn=["/","?","#"],Va=255,In=/^[+a-z0-9A-Z_-]{0,63}$/,ja=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,On={javascript:!0,"javascript:":!0},Pn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ga(t,e){if(t&&t instanceof ht)return t;var r=new ht;return r.parse(t,e),r}ht.prototype.parse=function(t,e){var r,n,o,s,c,i=t;if(i=i.trim(),!e&&t.split("#").length===1){var l=Pa.exec(i);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var u=Ia.exec(i);if(u&&(u=u[0],o=u.toLowerCase(),this.protocol=u,i=i.substr(u.length)),(e||u||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(c=i.substr(0,2)==="//",c&&!(u&&On[u])&&(i=i.substr(2),this.slashes=!0)),!On[u]&&(c||u&&!Pn[u])){var d=-1;for(r=0;r<Fn.length;r++)s=i.indexOf(Fn[r]),s!==-1&&(d===-1||s<d)&&(d=s);var p,f;for(d===-1?f=i.lastIndexOf("@"):f=i.lastIndexOf("@",d),f!==-1&&(p=i.slice(0,f),i=i.slice(f+1),this.auth=p),d=-1,r=0;r<Bn.length;r++)s=i.indexOf(Bn[r]),s!==-1&&(d===-1||s<d)&&(d=s);d===-1&&(d=i.length),i[d-1]===":"&&d--;var m=i.slice(0,d);i=i.slice(d),this.parseHost(m),this.hostname=this.hostname||"";var h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){var b=this.hostname.split(/\./);for(r=0,n=b.length;r<n;r++){var g=b[r];if(g&&!g.match(In)){for(var w="",k=0,C=g.length;k<C;k++)g.charCodeAt(k)>127?w+="x":w+=g[k];if(!w.match(In)){var q=b.slice(0,r),S=b.slice(r+1),E=g.match(ja);E&&(q.push(E[1]),S.unshift(E[2])),S.length&&(i=S.join(".")+i),this.hostname=q.join(".");break}}}}this.hostname.length>Va&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var L=i.indexOf("#");L!==-1&&(this.hash=i.substr(L),i=i.slice(0,L));var U=i.indexOf("?");return U!==-1&&(this.search=i.substr(U),i=i.slice(0,U)),i&&(this.pathname=i),Pn[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},ht.prototype.parseHost=function(t){var e=Oa.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var $a=Ga;Re.encode=La,Re.decode=Ba,Re.format=Fa,Re.parse=$a;var ke={},Wt,Un;function zn(){return Un||(Un=1,Wt=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Wt}var Jt,Mn;function Vn(){return Mn||(Mn=1,Jt=/[\0-\x1F\x7F-\x9F]/),Jt}var Qt,jn;function Ha(){return jn||(jn=1,Qt=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),Qt}var Yt,Gn;function $n(){return Gn||(Gn=1,Yt=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Yt}var Hn;function Za(){return Hn||(Hn=1,ke.Any=zn(),ke.Cc=Vn(),ke.Cf=Ha(),ke.P=Zt,ke.Z=$n()),ke}(function(t){function e(x){return Object.prototype.toString.call(x)}function r(x){return e(x)==="[object String]"}var n=Object.prototype.hasOwnProperty;function o(x,D){return n.call(x,D)}function s(x){var D=Array.prototype.slice.call(arguments,1);return D.forEach(function(_){if(_){if(typeof _!="object")throw new TypeError(_+"must be object");Object.keys(_).forEach(function(N){x[N]=_[N]})}}),x}function c(x,D,_){return[].concat(x.slice(0,D),_,x.slice(D+1))}function i(x){return!(x>=55296&&x<=57343||x>=64976&&x<=65007||(x&65535)===65535||(x&65535)===65534||x>=0&&x<=8||x===11||x>=14&&x<=31||x>=127&&x<=159||x>1114111)}function l(x){if(x>65535){x-=65536;var D=55296+(x>>10),_=56320+(x&1023);return String.fromCharCode(D,_)}return String.fromCharCode(x)}var u=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,d=/&([a-z#][a-z0-9]{1,31});/gi,p=new RegExp(u.source+"|"+d.source,"gi"),f=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i,m=Tn;function h(x,D){var _;return o(m,D)?m[D]:D.charCodeAt(0)===35&&f.test(D)&&(_=D[1].toLowerCase()==="x"?parseInt(D.slice(2),16):parseInt(D.slice(1),10),i(_))?l(_):x}function b(x){return x.indexOf("\\")<0?x:x.replace(u,"$1")}function g(x){return x.indexOf("\\")<0&&x.indexOf("&")<0?x:x.replace(p,function(D,_,N){return _||h(D,N)})}var w=/[&<>"]/,k=/[&<>"]/g,C={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function q(x){return C[x]}function S(x){return w.test(x)?x.replace(k,q):x}var E=/[.?*+^$[\]\\(){}|-]/g;function L(x){return x.replace(E,"\\$&")}function U(x){switch(x){case 9:case 32:return!0}return!1}function G(x){if(x>=8192&&x<=8202)return!0;switch(x){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var I=Zt;function v(x){return I.test(x)}function A(x){switch(x){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function T(x){return x=x.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(x=x.replace(/ẞ/g,"ß")),x.toLowerCase().toUpperCase()}t.lib={},t.lib.mdurl=Re,t.lib.ucmicro=Za(),t.assign=s,t.isString=r,t.has=o,t.unescapeMd=b,t.unescapeAll=g,t.isValidEntityCode=i,t.fromCodePoint=l,t.escapeHtml=S,t.arrayReplaceAt=c,t.isSpace=U,t.isWhiteSpace=G,t.isMdAsciiPunct=A,t.isPunctChar=v,t.escapeRE=L,t.normalizeReference=T})(z);var mt={},Wa=function(e,r,n){var o,s,c,i,l=-1,u=e.posMax,d=e.pos;for(e.pos=r+1,o=1;e.pos<u;){if(c=e.src.charCodeAt(e.pos),c===93&&(o--,o===0)){s=!0;break}if(i=e.pos,e.md.inline.skipToken(e),c===91){if(i===e.pos-1)o++;else if(n)return e.pos=d,-1}}return s&&(l=e.pos),e.pos=d,l},Zn=z.unescapeAll,Ja=function(e,r,n){var o,s,c=r,i={ok:!1,pos:0,lines:0,str:""};if(e.charCodeAt(c)===60){for(c++;c<n;){if(o=e.charCodeAt(c),o===10||o===60)return i;if(o===62)return i.pos=c+1,i.str=Zn(e.slice(r+1,c)),i.ok=!0,i;if(o===92&&c+1<n){c+=2;continue}c++}return i}for(s=0;c<n&&(o=e.charCodeAt(c),!(o===32||o<32||o===127));){if(o===92&&c+1<n){if(e.charCodeAt(c+1)===32)break;c+=2;continue}if(o===40&&(s++,s>32))return i;if(o===41){if(s===0)break;s--}c++}return r===c||s!==0||(i.str=Zn(e.slice(r,c)),i.pos=c,i.ok=!0),i},Qa=z.unescapeAll,Ya=function(e,r,n){var o,s,c=0,i=r,l={ok:!1,pos:0,lines:0,str:""};if(i>=n||(s=e.charCodeAt(i),s!==34&&s!==39&&s!==40))return l;for(i++,s===40&&(s=41);i<n;){if(o=e.charCodeAt(i),o===s)return l.pos=i+1,l.lines=c,l.str=Qa(e.slice(r+1,i)),l.ok=!0,l;if(o===40&&s===41)return l;o===10?c++:o===92&&i+1<n&&(i++,e.charCodeAt(i)===10&&c++),i++}return l};mt.parseLinkLabel=Wa,mt.parseLinkDestination=Ja,mt.parseLinkTitle=Ya;var Xa=z.assign,Ka=z.unescapeAll,ve=z.escapeHtml,ie={};ie.code_inline=function(t,e,r,n,o){var s=t[e];return"<code"+o.renderAttrs(s)+">"+ve(s.content)+"</code>"},ie.code_block=function(t,e,r,n,o){var s=t[e];return"<pre"+o.renderAttrs(s)+"><code>"+ve(t[e].content)+`</code></pre>
53
- `},ie.fence=function(t,e,r,n,o){var s=t[e],c=s.info?Ka(s.info).trim():"",i="",l="",u,d,p,f,m;return c&&(p=c.split(/(\s+)/g),i=p[0],l=p.slice(2).join("")),r.highlight?u=r.highlight(s.content,i,l)||ve(s.content):u=ve(s.content),u.indexOf("<pre")===0?u+`
54
- `:c?(d=s.attrIndex("class"),f=s.attrs?s.attrs.slice():[],d<0?f.push(["class",r.langPrefix+i]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+i),m={attrs:f},"<pre><code"+o.renderAttrs(m)+">"+u+`</code></pre>
55
- `):"<pre><code"+o.renderAttrs(s)+">"+u+`</code></pre>
56
- `},ie.image=function(t,e,r,n,o){var s=t[e];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,r,n),o.renderToken(t,e,r)},ie.hardbreak=function(t,e,r){return r.xhtmlOut?`<br />
57
- `:`<br>
58
- `},ie.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?`<br />
59
- `:`<br>
60
- `:`
61
- `},ie.text=function(t,e){return ve(t[e].content)},ie.html_block=function(t,e){return t[e].content},ie.html_inline=function(t,e){return t[e].content};function Te(){this.rules=Xa({},ie)}Te.prototype.renderAttrs=function(e){var r,n,o;if(!e.attrs)return"";for(o="",r=0,n=e.attrs.length;r<n;r++)o+=" "+ve(e.attrs[r][0])+'="'+ve(e.attrs[r][1])+'"';return o},Te.prototype.renderToken=function(e,r,n){var o,s="",c=!1,i=e[r];return i.hidden?"":(i.block&&i.nesting!==-1&&r&&e[r-1].hidden&&(s+=`
62
- `),s+=(i.nesting===-1?"</":"<")+i.tag,s+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(s+=" /"),i.block&&(c=!0,i.nesting===1&&r+1<e.length&&(o=e[r+1],(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===i.tag)&&(c=!1))),s+=c?`>
63
- `:">",s)},Te.prototype.renderInline=function(t,e,r){for(var n,o="",s=this.rules,c=0,i=t.length;c<i;c++)n=t[c].type,typeof s[n]<"u"?o+=s[n](t,c,e,r,this):o+=this.renderToken(t,c,e);return o},Te.prototype.renderInlineAsText=function(t,e,r){for(var n="",o=0,s=t.length;o<s;o++)t[o].type==="text"?n+=t[o].content:t[o].type==="image"?n+=this.renderInlineAsText(t[o].children,e,r):t[o].type==="softbreak"&&(n+=`
64
- `);return n},Te.prototype.render=function(t,e,r){var n,o,s,c="",i=this.rules;for(n=0,o=t.length;n<o;n++)s=t[n].type,s==="inline"?c+=this.renderInline(t[n].children,e,r):typeof i[s]<"u"?c+=i[s](t,n,e,r,this):c+=this.renderToken(t,n,e,r);return c};var el=Te;function ne(){this.__rules__=[],this.__cache__=null}ne.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},ne.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){e.indexOf(n)<0&&e.push(n)})}),t.__cache__={},e.forEach(function(r){t.__cache__[r]=[],t.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||t.__cache__[r].push(n.fn))})})},ne.prototype.at=function(t,e,r){var n=this.__find__(t),o=r||{};if(n===-1)throw new Error("Parser rule not found: "+t);this.__rules__[n].fn=e,this.__rules__[n].alt=o.alt||[],this.__cache__=null},ne.prototype.before=function(t,e,r,n){var o=this.__find__(t),s=n||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},ne.prototype.after=function(t,e,r,n){var o=this.__find__(t),s=n||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},ne.prototype.push=function(t,e,r){var n=r||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null},ne.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var r=[];return t.forEach(function(n){var o=this.__find__(n);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[o].enabled=!0,r.push(n)},this),this.__cache__=null,r},ne.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(t,e)},ne.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var r=[];return t.forEach(function(n){var o=this.__find__(n);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[o].enabled=!1,r.push(n)},this),this.__cache__=null,r},ne.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};var Xt=ne,tl=/\r\n?|\n/g,rl=/\0/g,nl=function(e){var r;r=e.src.replace(tl,`
65
- `),r=r.replace(rl,"�"),e.src=r},ol=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},sl=function(e){var r=e.tokens,n,o,s;for(o=0,s=r.length;o<s;o++)n=r[o],n.type==="inline"&&e.md.inline.parse(n.content,e.md,e.env,n.children)},cl=z.arrayReplaceAt;function il(t){return/^<a[>\s]/i.test(t)}function al(t){return/^<\/a\s*>/i.test(t)}var ll=function(e){var r,n,o,s,c,i,l,u,d,p,f,m,h,b,g,w,k=e.tokens,C;if(e.md.options.linkify){for(n=0,o=k.length;n<o;n++)if(!(k[n].type!=="inline"||!e.md.linkify.pretest(k[n].content)))for(s=k[n].children,h=0,r=s.length-1;r>=0;r--){if(i=s[r],i.type==="link_close"){for(r--;s[r].level!==i.level&&s[r].type!=="link_open";)r--;continue}if(i.type==="html_inline"&&(il(i.content)&&h>0&&h--,al(i.content)&&h++),!(h>0)&&i.type==="text"&&e.md.linkify.test(i.content)){for(d=i.content,C=e.md.linkify.match(d),l=[],m=i.level,f=0,C.length>0&&C[0].index===0&&r>0&&s[r-1].type==="text_special"&&(C=C.slice(1)),u=0;u<C.length;u++)b=C[u].url,g=e.md.normalizeLink(b),e.md.validateLink(g)&&(w=C[u].text,C[u].schema?C[u].schema==="mailto:"&&!/^mailto:/i.test(w)?w=e.md.normalizeLinkText("mailto:"+w).replace(/^mailto:/,""):w=e.md.normalizeLinkText(w):w=e.md.normalizeLinkText("http://"+w).replace(/^http:\/\//,""),p=C[u].index,p>f&&(c=new e.Token("text","",0),c.content=d.slice(f,p),c.level=m,l.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",g]],c.level=m++,c.markup="linkify",c.info="auto",l.push(c),c=new e.Token("text","",0),c.content=w,c.level=m,l.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",l.push(c),f=C[u].lastIndex);f<d.length&&(c=new e.Token("text","",0),c.content=d.slice(f),c.level=m,l.push(c)),k[n].children=s=cl(s,r,l)}}}},Wn=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ul=/\((c|tm|r)\)/i,dl=/\((c|tm|r)\)/ig,pl={c:"©",r:"®",tm:"™"};function fl(t,e){return pl[e.toLowerCase()]}function hl(t){var e,r,n=0;for(e=t.length-1;e>=0;e--)r=t[e],r.type==="text"&&!n&&(r.content=r.content.replace(dl,fl)),r.type==="link_open"&&r.info==="auto"&&n--,r.type==="link_close"&&r.info==="auto"&&n++}function ml(t){var e,r,n=0;for(e=t.length-1;e>=0;e--)r=t[e],r.type==="text"&&!n&&Wn.test(r.content)&&(r.content=r.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–")),r.type==="link_open"&&r.info==="auto"&&n--,r.type==="link_close"&&r.info==="auto"&&n++}var gl=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type==="inline"&&(ul.test(e.tokens[r].content)&&hl(e.tokens[r].children),Wn.test(e.tokens[r].content)&&ml(e.tokens[r].children))},Jn=z.isWhiteSpace,Qn=z.isPunctChar,Yn=z.isMdAsciiPunct,bl=/['"]/,Xn=/['"]/g,Kn="’";function gt(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}function yl(t,e){var r,n,o,s,c,i,l,u,d,p,f,m,h,b,g,w,k,C,q,S,E;for(q=[],r=0;r<t.length;r++){for(n=t[r],l=t[r].level,k=q.length-1;k>=0&&!(q[k].level<=l);k--);if(q.length=k+1,n.type==="text"){o=n.content,c=0,i=o.length;e:for(;c<i&&(Xn.lastIndex=c,s=Xn.exec(o),!!s);){if(g=w=!0,c=s.index+1,C=s[0]==="'",d=32,s.index-1>=0)d=o.charCodeAt(s.index-1);else for(k=r-1;k>=0&&!(t[k].type==="softbreak"||t[k].type==="hardbreak");k--)if(t[k].content){d=t[k].content.charCodeAt(t[k].content.length-1);break}if(p=32,c<i)p=o.charCodeAt(c);else for(k=r+1;k<t.length&&!(t[k].type==="softbreak"||t[k].type==="hardbreak");k++)if(t[k].content){p=t[k].content.charCodeAt(0);break}if(f=Yn(d)||Qn(String.fromCharCode(d)),m=Yn(p)||Qn(String.fromCharCode(p)),h=Jn(d),b=Jn(p),b?g=!1:m&&(h||f||(g=!1)),h?w=!1:f&&(b||m||(w=!1)),p===34&&s[0]==='"'&&d>=48&&d<=57&&(w=g=!1),g&&w&&(g=f,w=m),!g&&!w){C&&(n.content=gt(n.content,s.index,Kn));continue}if(w){for(k=q.length-1;k>=0&&(u=q[k],!(q[k].level<l));k--)if(u.single===C&&q[k].level===l){u=q[k],C?(S=e.md.options.quotes[2],E=e.md.options.quotes[3]):(S=e.md.options.quotes[0],E=e.md.options.quotes[1]),n.content=gt(n.content,s.index,E),t[u.token].content=gt(t[u.token].content,u.pos,S),c+=E.length-1,u.token===r&&(c+=S.length-1),o=n.content,i=o.length,q.length=k;continue e}}g?q.push({token:r,pos:s.index,single:C,level:l}):w&&C&&(n.content=gt(n.content,s.index,Kn))}}}}var wl=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type!=="inline"||!bl.test(e.tokens[r].content)||yl(e.tokens[r].children,e)},kl=function(e){var r,n,o,s,c,i,l=e.tokens;for(r=0,n=l.length;r<n;r++)if(l[r].type==="inline"){for(o=l[r].children,c=o.length,s=0;s<c;s++)o[s].type==="text_special"&&(o[s].type="text");for(s=i=0;s<c;s++)o[s].type==="text"&&s+1<c&&o[s+1].type==="text"?o[s+1].content=o[s].content+o[s+1].content:(s!==i&&(o[i]=o[s]),i++);s!==i&&(o.length=i)}};function Le(t,e,r){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Le.prototype.attrIndex=function(e){var r,n,o;if(!this.attrs)return-1;for(r=this.attrs,n=0,o=r.length;n<o;n++)if(r[n][0]===e)return n;return-1},Le.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Le.prototype.attrSet=function(e,r){var n=this.attrIndex(e),o=[e,r];n<0?this.attrPush(o):this.attrs[n]=o},Le.prototype.attrGet=function(e){var r=this.attrIndex(e),n=null;return r>=0&&(n=this.attrs[r][1]),n},Le.prototype.attrJoin=function(e,r){var n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};var Kt=Le,vl=Kt;function eo(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}eo.prototype.Token=vl;var xl=eo,Al=Xt,er=[["normalize",nl],["block",ol],["inline",sl],["linkify",ll],["replacements",gl],["smartquotes",wl],["text_join",kl]];function tr(){this.ruler=new Al;for(var t=0;t<er.length;t++)this.ruler.push(er[t][0],er[t][1])}tr.prototype.process=function(t){var e,r,n;for(n=this.ruler.getRules(""),e=0,r=n.length;e<r;e++)n[e](t)},tr.prototype.State=xl;var El=tr,rr=z.isSpace;function nr(t,e){var r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function to(t){var e=[],r=0,n=t.length,o,s=!1,c=0,i="";for(o=t.charCodeAt(r);r<n;)o===124&&(s?(i+=t.substring(c,r-1),c=r):(e.push(i+t.substring(c,r)),i="",c=r+1)),s=o===92,r++,o=t.charCodeAt(r);return e.push(i+t.substring(c)),e}var _l=function(e,r,n,o){var s,c,i,l,u,d,p,f,m,h,b,g,w,k,C,q,S,E;if(r+2>n||(d=r+1,e.sCount[d]<e.blkIndent)||e.sCount[d]-e.blkIndent>=4||(i=e.bMarks[d]+e.tShift[d],i>=e.eMarks[d])||(S=e.src.charCodeAt(i++),S!==124&&S!==45&&S!==58)||i>=e.eMarks[d]||(E=e.src.charCodeAt(i++),E!==124&&E!==45&&E!==58&&!rr(E))||S===45&&rr(E))return!1;for(;i<e.eMarks[d];){if(s=e.src.charCodeAt(i),s!==124&&s!==45&&s!==58&&!rr(s))return!1;i++}for(c=nr(e,r+1),p=c.split("|"),h=[],l=0;l<p.length;l++){if(b=p[l].trim(),!b){if(l===0||l===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;b.charCodeAt(b.length-1)===58?h.push(b.charCodeAt(0)===58?"center":"right"):b.charCodeAt(0)===58?h.push("left"):h.push("")}if(c=nr(e,r).trim(),c.indexOf("|")===-1||e.sCount[r]-e.blkIndent>=4||(p=to(c),p.length&&p[0]===""&&p.shift(),p.length&&p[p.length-1]===""&&p.pop(),f=p.length,f===0||f!==h.length))return!1;if(o)return!0;for(k=e.parentType,e.parentType="table",q=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),m.map=g=[r,0],m=e.push("thead_open","thead",1),m.map=[r,r+1],m=e.push("tr_open","tr",1),m.map=[r,r+1],l=0;l<p.length;l++)m=e.push("th_open","th",1),h[l]&&(m.attrs=[["style","text-align:"+h[l]]]),m=e.push("inline","",0),m.content=p[l].trim(),m.children=[],m=e.push("th_close","th",-1);for(m=e.push("tr_close","tr",-1),m=e.push("thead_close","thead",-1),d=r+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(C=!1,l=0,u=q.length;l<u;l++)if(q[l](e,d,n,!0)){C=!0;break}if(C||(c=nr(e,d).trim(),!c)||e.sCount[d]-e.blkIndent>=4)break;for(p=to(c),p.length&&p[0]===""&&p.shift(),p.length&&p[p.length-1]===""&&p.pop(),d===r+2&&(m=e.push("tbody_open","tbody",1),m.map=w=[r+2,0]),m=e.push("tr_open","tr",1),m.map=[d,d+1],l=0;l<f;l++)m=e.push("td_open","td",1),h[l]&&(m.attrs=[["style","text-align:"+h[l]]]),m=e.push("inline","",0),m.content=p[l]?p[l].trim():"",m.children=[],m=e.push("td_close","td",-1);m=e.push("tr_close","tr",-1)}return w&&(m=e.push("tbody_close","tbody",-1),w[1]=d),m=e.push("table_close","table",-1),g[1]=d,e.parentType=k,e.line=d,!0},Cl=function(e,r,n){var o,s,c;if(e.sCount[r]-e.blkIndent<4)return!1;for(s=o=r+1;o<n;){if(e.isEmpty(o)){o++;continue}if(e.sCount[o]-e.blkIndent>=4){o++,s=o;continue}break}return e.line=s,c=e.push("code_block","code",0),c.content=e.getLines(r,s,4+e.blkIndent,!1)+`
66
- `,c.map=[r,e.line],!0},Dl=function(e,r,n,o){var s,c,i,l,u,d,p,f=!1,m=e.bMarks[r]+e.tShift[r],h=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||m+3>h||(s=e.src.charCodeAt(m),s!==126&&s!==96)||(u=m,m=e.skipChars(m,s),c=m-u,c<3)||(p=e.src.slice(u,m),i=e.src.slice(m,h),s===96&&i.indexOf(String.fromCharCode(s))>=0))return!1;if(o)return!0;for(l=r;l++,!(l>=n||(m=u=e.bMarks[l]+e.tShift[l],h=e.eMarks[l],m<h&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(m)===s&&!(e.sCount[l]-e.blkIndent>=4)&&(m=e.skipChars(m,s),!(m-u<c)&&(m=e.skipSpaces(m),!(m<h)))){f=!0;break}return c=e.sCount[r],e.line=l+(f?1:0),d=e.push("fence","code",0),d.info=i,d.content=e.getLines(r+1,l,c,!0),d.markup=p,d.map=[r,e.line],!0},ql=z.isSpace,Sl=function(e,r,n,o){var s,c,i,l,u,d,p,f,m,h,b,g,w,k,C,q,S,E,L,U,G=e.lineMax,I=e.bMarks[r]+e.tShift[r],v=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(I)!==62)return!1;if(o)return!0;for(h=[],b=[],k=[],C=[],E=e.md.block.ruler.getRules("blockquote"),w=e.parentType,e.parentType="blockquote",f=r;f<n&&(U=e.sCount[f]<e.blkIndent,I=e.bMarks[f]+e.tShift[f],v=e.eMarks[f],!(I>=v));f++){if(e.src.charCodeAt(I++)===62&&!U){for(l=e.sCount[f]+1,e.src.charCodeAt(I)===32?(I++,l++,s=!1,q=!0):e.src.charCodeAt(I)===9?(q=!0,(e.bsCount[f]+l)%4===3?(I++,l++,s=!1):s=!0):q=!1,m=l,h.push(e.bMarks[f]),e.bMarks[f]=I;I<v&&(c=e.src.charCodeAt(I),ql(c));){c===9?m+=4-(m+e.bsCount[f]+(s?1:0))%4:m++;I++}d=I>=v,b.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(q?1:0),k.push(e.sCount[f]),e.sCount[f]=m-l,C.push(e.tShift[f]),e.tShift[f]=I-e.bMarks[f];continue}if(d)break;for(S=!1,i=0,u=E.length;i<u;i++)if(E[i](e,f,n,!0)){S=!0;break}if(S){e.lineMax=f,e.blkIndent!==0&&(h.push(e.bMarks[f]),b.push(e.bsCount[f]),C.push(e.tShift[f]),k.push(e.sCount[f]),e.sCount[f]-=e.blkIndent);break}h.push(e.bMarks[f]),b.push(e.bsCount[f]),C.push(e.tShift[f]),k.push(e.sCount[f]),e.sCount[f]=-1}for(g=e.blkIndent,e.blkIndent=0,L=e.push("blockquote_open","blockquote",1),L.markup=">",L.map=p=[r,0],e.md.block.tokenize(e,r,f),L=e.push("blockquote_close","blockquote",-1),L.markup=">",e.lineMax=G,e.parentType=w,p[1]=e.line,i=0;i<C.length;i++)e.bMarks[i+r]=h[i],e.tShift[i+r]=C[i],e.sCount[i+r]=k[i],e.bsCount[i+r]=b[i];return e.blkIndent=g,!0},Rl=z.isSpace,Tl=function(e,r,n,o){var s,c,i,l,u=e.bMarks[r]+e.tShift[r],d=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||(s=e.src.charCodeAt(u++),s!==42&&s!==45&&s!==95))return!1;for(c=1;u<d;){if(i=e.src.charCodeAt(u++),i!==s&&!Rl(i))return!1;i===s&&c++}return c<3?!1:(o||(e.line=r+1,l=e.push("hr","hr",0),l.map=[r,e.line],l.markup=Array(c+1).join(String.fromCharCode(s))),!0)},ro=z.isSpace;function no(t,e){var r,n,o,s;return n=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],r=t.src.charCodeAt(n++),r!==42&&r!==45&&r!==43||n<o&&(s=t.src.charCodeAt(n),!ro(s))?-1:n}function oo(t,e){var r,n=t.bMarks[e]+t.tShift[e],o=n,s=t.eMarks[e];if(o+1>=s||(r=t.src.charCodeAt(o++),r<48||r>57))return-1;for(;;){if(o>=s)return-1;if(r=t.src.charCodeAt(o++),r>=48&&r<=57){if(o-n>=10)return-1;continue}if(r===41||r===46)break;return-1}return o<s&&(r=t.src.charCodeAt(o),!ro(r))?-1:o}function Ll(t,e){var r,n,o=t.level+2;for(r=e+2,n=t.tokens.length-2;r<n;r++)t.tokens[r].level===o&&t.tokens[r].type==="paragraph_open"&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}var Nl=function(e,r,n,o){var s,c,i,l,u,d,p,f,m,h,b,g,w,k,C,q,S,E,L,U,G,I,v,A,T,x,D,_=r,N=!1,j=!0;if(e.sCount[_]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[_]-e.listIndent>=4&&e.sCount[_]<e.blkIndent)return!1;if(o&&e.parentType==="paragraph"&&e.sCount[_]>=e.blkIndent&&(N=!0),(I=oo(e,_))>=0){if(p=!0,A=e.bMarks[_]+e.tShift[_],w=Number(e.src.slice(A,I-1)),N&&w!==1)return!1}else if((I=no(e,_))>=0)p=!1;else return!1;if(N&&e.skipSpaces(I)>=e.eMarks[_])return!1;if(o)return!0;for(g=e.src.charCodeAt(I-1),b=e.tokens.length,p?(D=e.push("ordered_list_open","ol",1),w!==1&&(D.attrs=[["start",w]])):D=e.push("bullet_list_open","ul",1),D.map=h=[_,0],D.markup=String.fromCharCode(g),v=!1,x=e.md.block.ruler.getRules("list"),S=e.parentType,e.parentType="list";_<n;){for(G=I,k=e.eMarks[_],d=C=e.sCount[_]+I-(e.bMarks[_]+e.tShift[_]);G<k;){if(s=e.src.charCodeAt(G),s===9)C+=4-(C+e.bsCount[_])%4;else if(s===32)C++;else break;G++}if(c=G,c>=k?u=1:u=C-d,u>4&&(u=1),l=d+u,D=e.push("list_item_open","li",1),D.markup=String.fromCharCode(g),D.map=f=[_,0],p&&(D.info=e.src.slice(A,I-1)),U=e.tight,L=e.tShift[_],E=e.sCount[_],q=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=l,e.tight=!0,e.tShift[_]=c-e.bMarks[_],e.sCount[_]=C,c>=k&&e.isEmpty(_+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,_,n,!0),(!e.tight||v)&&(j=!1),v=e.line-_>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=q,e.tShift[_]=L,e.sCount[_]=E,e.tight=U,D=e.push("list_item_close","li",-1),D.markup=String.fromCharCode(g),_=e.line,f[1]=_,_>=n||e.sCount[_]<e.blkIndent||e.sCount[_]-e.blkIndent>=4)break;for(T=!1,i=0,m=x.length;i<m;i++)if(x[i](e,_,n,!0)){T=!0;break}if(T)break;if(p){if(I=oo(e,_),I<0)break;A=e.bMarks[_]+e.tShift[_]}else if(I=no(e,_),I<0)break;if(g!==e.src.charCodeAt(I-1))break}return p?D=e.push("ordered_list_close","ol",-1):D=e.push("bullet_list_close","ul",-1),D.markup=String.fromCharCode(g),h[1]=_,e.line=_,e.parentType=S,j&&Ll(e,b),!0},Bl=z.normalizeReference,bt=z.isSpace,Fl=function(e,r,n,o){var s,c,i,l,u,d,p,f,m,h,b,g,w,k,C,q,S=0,E=e.bMarks[r]+e.tShift[r],L=e.eMarks[r],U=r+1;if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(E)!==91)return!1;for(;++E<L;)if(e.src.charCodeAt(E)===93&&e.src.charCodeAt(E-1)!==92){if(E+1===L||e.src.charCodeAt(E+1)!==58)return!1;break}for(l=e.lineMax,C=e.md.block.ruler.getRules("reference"),h=e.parentType,e.parentType="reference";U<l&&!e.isEmpty(U);U++)if(!(e.sCount[U]-e.blkIndent>3)&&!(e.sCount[U]<0)){for(k=!1,d=0,p=C.length;d<p;d++)if(C[d](e,U,l,!0)){k=!0;break}if(k)break}for(w=e.getLines(r,U,e.blkIndent,!1).trim(),L=w.length,E=1;E<L;E++){if(s=w.charCodeAt(E),s===91)return!1;if(s===93){m=E;break}else s===10?S++:s===92&&(E++,E<L&&w.charCodeAt(E)===10&&S++)}if(m<0||w.charCodeAt(m+1)!==58)return!1;for(E=m+2;E<L;E++)if(s=w.charCodeAt(E),s===10)S++;else if(!bt(s))break;if(b=e.md.helpers.parseLinkDestination(w,E,L),!b.ok||(u=e.md.normalizeLink(b.str),!e.md.validateLink(u)))return!1;for(E=b.pos,S+=b.lines,c=E,i=S,g=E;E<L;E++)if(s=w.charCodeAt(E),s===10)S++;else if(!bt(s))break;for(b=e.md.helpers.parseLinkTitle(w,E,L),E<L&&g!==E&&b.ok?(q=b.str,E=b.pos,S+=b.lines):(q="",E=c,S=i);E<L&&(s=w.charCodeAt(E),!!bt(s));)E++;if(E<L&&w.charCodeAt(E)!==10&&q)for(q="",E=c,S=i;E<L&&(s=w.charCodeAt(E),!!bt(s));)E++;return E<L&&w.charCodeAt(E)!==10||(f=Bl(w.slice(1,m)),!f)?!1:(o||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[f]>"u"&&(e.env.references[f]={title:q,href:u}),e.parentType=h,e.line=r+S+1),!0)},Il=["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","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yt={},Ol="[a-zA-Z_:][a-zA-Z0-9:._-]*",Pl="[^\"'=<>`\\x00-\\x20]+",Ul="'[^']*'",zl='"[^"]*"',Ml="(?:"+Pl+"|"+Ul+"|"+zl+")",Vl="(?:\\s+"+Ol+"(?:\\s*=\\s*"+Ml+")?)",so="<[A-Za-z][A-Za-z0-9\\-]*"+Vl+"*\\s*\\/?>",co="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",jl="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Gl="<[?][\\s\\S]*?[?]>",$l="<![A-Z]+\\s+[^>]*>",Hl="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Zl=new RegExp("^(?:"+so+"|"+co+"|"+jl+"|"+Gl+"|"+$l+"|"+Hl+")"),Wl=new RegExp("^(?:"+so+"|"+co+")");yt.HTML_TAG_RE=Zl,yt.HTML_OPEN_CLOSE_TAG_RE=Wl;var Jl=Il,Ql=yt.HTML_OPEN_CLOSE_TAG_RE,Ne=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Jl.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Ql.source+"\\s*$"),/^$/,!1]],Yl=function(e,r,n,o){var s,c,i,l,u=e.bMarks[r]+e.tShift[r],d=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(u)!==60)return!1;for(l=e.src.slice(u,d),s=0;s<Ne.length&&!Ne[s][0].test(l);s++);if(s===Ne.length)return!1;if(o)return Ne[s][2];if(c=r+1,!Ne[s][1].test(l)){for(;c<n&&!(e.sCount[c]<e.blkIndent);c++)if(u=e.bMarks[c]+e.tShift[c],d=e.eMarks[c],l=e.src.slice(u,d),Ne[s][1].test(l)){l.length!==0&&c++;break}}return e.line=c,i=e.push("html_block","",0),i.map=[r,c],i.content=e.getLines(r,c,e.blkIndent,!0),!0},io=z.isSpace,Xl=function(e,r,n,o){var s,c,i,l,u=e.bMarks[r]+e.tShift[r],d=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||(s=e.src.charCodeAt(u),s!==35||u>=d))return!1;for(c=1,s=e.src.charCodeAt(++u);s===35&&u<d&&c<=6;)c++,s=e.src.charCodeAt(++u);return c>6||u<d&&!io(s)?!1:(o||(d=e.skipSpacesBack(d,u),i=e.skipCharsBack(d,35,u),i>u&&io(e.src.charCodeAt(i-1))&&(d=i),e.line=r+1,l=e.push("heading_open","h"+String(c),1),l.markup="########".slice(0,c),l.map=[r,e.line],l=e.push("inline","",0),l.content=e.src.slice(u,d).trim(),l.map=[r,e.line],l.children=[],l=e.push("heading_close","h"+String(c),-1),l.markup="########".slice(0,c)),!0)},Kl=function(e,r,n){var o,s,c,i,l,u,d,p,f,m=r+1,h,b=e.md.block.ruler.getRules("paragraph");if(e.sCount[r]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(u=e.bMarks[m]+e.tShift[m],d=e.eMarks[m],u<d&&(f=e.src.charCodeAt(u),(f===45||f===61)&&(u=e.skipChars(u,f),u=e.skipSpaces(u),u>=d)))){p=f===61?1:2;break}if(!(e.sCount[m]<0)){for(s=!1,c=0,i=b.length;c<i;c++)if(b[c](e,m,n,!0)){s=!0;break}if(s)break}}return p?(o=e.getLines(r,m,e.blkIndent,!1).trim(),e.line=m+1,l=e.push("heading_open","h"+String(p),1),l.markup=String.fromCharCode(f),l.map=[r,e.line],l=e.push("inline","",0),l.content=o,l.map=[r,e.line-1],l.children=[],l=e.push("heading_close","h"+String(p),-1),l.markup=String.fromCharCode(f),e.parentType=h,!0):!1},eu=function(e,r,n){var o,s,c,i,l,u,d=r+1,p=e.md.block.ruler.getRules("paragraph");for(u=e.parentType,e.parentType="paragraph";d<n&&!e.isEmpty(d);d++)if(!(e.sCount[d]-e.blkIndent>3)&&!(e.sCount[d]<0)){for(s=!1,c=0,i=p.length;c<i;c++)if(p[c](e,d,n,!0)){s=!0;break}if(s)break}return o=e.getLines(r,d,e.blkIndent,!1).trim(),e.line=d,l=e.push("paragraph_open","p",1),l.map=[r,e.line],l=e.push("inline","",0),l.content=o,l.map=[r,e.line],l.children=[],l=e.push("paragraph_close","p",-1),e.parentType=u,!0},ao=Kt,wt=z.isSpace;function ae(t,e,r,n){var o,s,c,i,l,u,d,p;for(this.src=t,this.md=e,this.env=r,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,this.result="",s=this.src,p=!1,c=i=u=d=0,l=s.length;i<l;i++){if(o=s.charCodeAt(i),!p)if(wt(o)){u++,o===9?d+=4-d%4:d++;continue}else p=!0;(o===10||i===l-1)&&(o!==10&&i++,this.bMarks.push(c),this.eMarks.push(i),this.tShift.push(u),this.sCount.push(d),this.bsCount.push(0),p=!1,u=0,d=0,c=i+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}ae.prototype.push=function(t,e,r){var n=new ao(t,e,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n},ae.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},ae.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},ae.prototype.skipSpaces=function(e){for(var r,n=this.src.length;e<n&&(r=this.src.charCodeAt(e),!!wt(r));e++);return e},ae.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!wt(this.src.charCodeAt(--e)))return e+1;return e},ae.prototype.skipChars=function(e,r){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===r;e++);return e},ae.prototype.skipCharsBack=function(e,r,n){if(e<=n)return e;for(;e>n;)if(r!==this.src.charCodeAt(--e))return e+1;return e},ae.prototype.getLines=function(e,r,n,o){var s,c,i,l,u,d,p,f=e;if(e>=r)return"";for(d=new Array(r-e),s=0;f<r;f++,s++){for(c=0,p=l=this.bMarks[f],f+1<r||o?u=this.eMarks[f]+1:u=this.eMarks[f];l<u&&c<n;){if(i=this.src.charCodeAt(l),wt(i))i===9?c+=4-(c+this.bsCount[f])%4:c++;else if(l-p<this.tShift[f])c++;else break;l++}c>n?d[s]=new Array(c-n+1).join(" ")+this.src.slice(l,u):d[s]=this.src.slice(l,u)}return d.join("")},ae.prototype.Token=ao;var tu=ae,ru=Xt,kt=[["table",_l,["paragraph","reference"]],["code",Cl],["fence",Dl,["paragraph","reference","blockquote","list"]],["blockquote",Sl,["paragraph","reference","blockquote","list"]],["hr",Tl,["paragraph","reference","blockquote","list"]],["list",Nl,["paragraph","reference","blockquote"]],["reference",Fl],["html_block",Yl,["paragraph","reference","blockquote"]],["heading",Xl,["paragraph","reference","blockquote"]],["lheading",Kl],["paragraph",eu]];function vt(){this.ruler=new ru;for(var t=0;t<kt.length;t++)this.ruler.push(kt[t][0],kt[t][1],{alt:(kt[t][2]||[]).slice()})}vt.prototype.tokenize=function(t,e,r){for(var n,o,s,c=this.ruler.getRules(""),i=c.length,l=e,u=!1,d=t.md.options.maxNesting;l<r&&(t.line=l=t.skipEmptyLines(l),!(l>=r||t.sCount[l]<t.blkIndent));){if(t.level>=d){t.line=r;break}for(s=t.line,o=0;o<i;o++)if(n=c[o](t,l,r,!1),n){if(s>=t.line)throw new Error("block rule didn't increment state.line");break}if(!n)throw new Error("none of the block rules matched");t.tight=!u,t.isEmpty(t.line-1)&&(u=!0),l=t.line,l<r&&t.isEmpty(l)&&(u=!0,l++,t.line=l)}},vt.prototype.parse=function(t,e,r,n){var o;t&&(o=new this.State(t,e,r,n),this.tokenize(o,o.line,o.lineMax))},vt.prototype.State=tu;var nu=vt;function ou(t){switch(t){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}}for(var su=function(e,r){for(var n=e.pos;n<e.posMax&&!ou(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(r||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)},cu=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,iu=function(e,r){var n,o,s,c,i,l,u,d;return!e.md.options.linkify||e.linkLevel>0||(n=e.pos,o=e.posMax,n+3>o)||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47||(s=e.pending.match(cu),!s)||(c=s[1],i=e.md.linkify.matchAtStart(e.src.slice(n-c.length)),!i)||(l=i.url,l.length<=c.length)||(l=l.replace(/\*+$/,""),u=e.md.normalizeLink(l),!e.md.validateLink(u))?!1:(r||(e.pending=e.pending.slice(0,-c.length),d=e.push("link_open","a",1),d.attrs=[["href",u]],d.markup="linkify",d.info="auto",d=e.push("text","",0),d.content=e.md.normalizeLinkText(l),d=e.push("link_close","a",-1),d.markup="linkify",d.info="auto"),e.pos+=l.length-c.length,!0)},au=z.isSpace,lu=function(e,r){var n,o,s,c=e.pos;if(e.src.charCodeAt(c)!==10)return!1;if(n=e.pending.length-1,o=e.posMax,!r)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){for(s=n-1;s>=1&&e.pending.charCodeAt(s-1)===32;)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(c++;c<o&&au(e.src.charCodeAt(c));)c++;return e.pos=c,!0},uu=z.isSpace,or=[],lo=0;lo<256;lo++)or.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){or[t.charCodeAt(0)]=1});var du=function(e,r){var n,o,s,c,i,l=e.pos,u=e.posMax;if(e.src.charCodeAt(l)!==92||(l++,l>=u))return!1;if(n=e.src.charCodeAt(l),n===10){for(r||e.push("hardbreak","br",0),l++;l<u&&(n=e.src.charCodeAt(l),!!uu(n));)l++;return e.pos=l,!0}return c=e.src[l],n>=55296&&n<=56319&&l+1<u&&(o=e.src.charCodeAt(l+1),o>=56320&&o<=57343&&(c+=e.src[l+1],l++)),s="\\"+c,r||(i=e.push("text_special","",0),n<256&&or[n]!==0?i.content=c:i.content=s,i.markup=s,i.info="escape"),e.pos=l+1,!0},pu=function(e,r){var n,o,s,c,i,l,u,d,p=e.pos,f=e.src.charCodeAt(p);if(f!==96)return!1;for(n=p,p++,o=e.posMax;p<o&&e.src.charCodeAt(p)===96;)p++;if(s=e.src.slice(n,p),u=s.length,e.backticksScanned&&(e.backticks[u]||0)<=n)return r||(e.pending+=s),e.pos+=u,!0;for(l=p;(i=e.src.indexOf("`",l))!==-1;){for(l=i+1;l<o&&e.src.charCodeAt(l)===96;)l++;if(d=l-i,d===u)return r||(c=e.push("code_inline","code",0),c.markup=s,c.content=e.src.slice(p,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=l,!0;e.backticks[d]=i}return e.backticksScanned=!0,r||(e.pending+=s),e.pos+=u,!0},xt={};xt.tokenize=function(e,r){var n,o,s,c,i,l=e.pos,u=e.src.charCodeAt(l);if(r||u!==126||(o=e.scanDelims(e.pos,!0),c=o.length,i=String.fromCharCode(u),c<2))return!1;for(c%2&&(s=e.push("text","",0),s.content=i,c--),n=0;n<c;n+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:u,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function uo(t,e){var r,n,o,s,c,i=[],l=e.length;for(r=0;r<l;r++)o=e[r],o.marker===126&&o.end!==-1&&(s=e[o.end],c=t.tokens[o.token],c.type="s_open",c.tag="s",c.nesting=1,c.markup="~~",c.content="",c=t.tokens[s.token],c.type="s_close",c.tag="s",c.nesting=-1,c.markup="~~",c.content="",t.tokens[s.token-1].type==="text"&&t.tokens[s.token-1].content==="~"&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),n=r+1;n<t.tokens.length&&t.tokens[n].type==="s_close";)n++;n--,r!==n&&(c=t.tokens[n],t.tokens[n]=t.tokens[r],t.tokens[r]=c)}}xt.postProcess=function(e){var r,n=e.tokens_meta,o=e.tokens_meta.length;for(uo(e,e.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&uo(e,n[r].delimiters)};var At={};At.tokenize=function(e,r){var n,o,s,c=e.pos,i=e.src.charCodeAt(c);if(r||i!==95&&i!==42)return!1;for(o=e.scanDelims(e.pos,i===42),n=0;n<o.length;n++)s=e.push("text","",0),s.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function po(t,e){var r,n,o,s,c,i,l=e.length;for(r=l-1;r>=0;r--)n=e[r],!(n.marker!==95&&n.marker!==42)&&n.end!==-1&&(o=e[n.end],i=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===o.token+1,c=String.fromCharCode(n.marker),s=t.tokens[n.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?c+c:c,s.content="",s=t.tokens[o.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?c+c:c,s.content="",i&&(t.tokens[e[r-1].token].content="",t.tokens[e[n.end+1].token].content="",r--))}At.postProcess=function(e){var r,n=e.tokens_meta,o=e.tokens_meta.length;for(po(e,e.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&po(e,n[r].delimiters)};var fu=z.normalizeReference,sr=z.isSpace,hu=function(e,r){var n,o,s,c,i,l,u,d,p,f="",m="",h=e.pos,b=e.posMax,g=e.pos,w=!0;if(e.src.charCodeAt(e.pos)!==91||(i=e.pos+1,c=e.md.helpers.parseLinkLabel(e,e.pos,!0),c<0))return!1;if(l=c+1,l<b&&e.src.charCodeAt(l)===40){for(w=!1,l++;l<b&&(o=e.src.charCodeAt(l),!(!sr(o)&&o!==10));l++);if(l>=b)return!1;if(g=l,u=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),u.ok){for(f=e.md.normalizeLink(u.str),e.md.validateLink(f)?l=u.pos:f="",g=l;l<b&&(o=e.src.charCodeAt(l),!(!sr(o)&&o!==10));l++);if(u=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<b&&g!==l&&u.ok)for(m=u.str,l=u.pos;l<b&&(o=e.src.charCodeAt(l),!(!sr(o)&&o!==10));l++);}(l>=b||e.src.charCodeAt(l)!==41)&&(w=!0),l++}if(w){if(typeof e.env.references>"u")return!1;if(l<b&&e.src.charCodeAt(l)===91?(g=l+1,l=e.md.helpers.parseLinkLabel(e,l),l>=0?s=e.src.slice(g,l++):l=c+1):l=c+1,s||(s=e.src.slice(i,c)),d=e.env.references[fu(s)],!d)return e.pos=h,!1;f=d.href,m=d.title}return r||(e.pos=i,e.posMax=c,p=e.push("link_open","a",1),p.attrs=n=[["href",f]],m&&n.push(["title",m]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,p=e.push("link_close","a",-1)),e.pos=l,e.posMax=b,!0},mu=z.normalizeReference,cr=z.isSpace,gu=function(e,r){var n,o,s,c,i,l,u,d,p,f,m,h,b,g="",w=e.pos,k=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(l=e.pos+2,i=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),i<0))return!1;if(u=i+1,u<k&&e.src.charCodeAt(u)===40){for(u++;u<k&&(o=e.src.charCodeAt(u),!(!cr(o)&&o!==10));u++);if(u>=k)return!1;for(b=u,p=e.md.helpers.parseLinkDestination(e.src,u,e.posMax),p.ok&&(g=e.md.normalizeLink(p.str),e.md.validateLink(g)?u=p.pos:g=""),b=u;u<k&&(o=e.src.charCodeAt(u),!(!cr(o)&&o!==10));u++);if(p=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&b!==u&&p.ok)for(f=p.str,u=p.pos;u<k&&(o=e.src.charCodeAt(u),!(!cr(o)&&o!==10));u++);else f="";if(u>=k||e.src.charCodeAt(u)!==41)return e.pos=w,!1;u++}else{if(typeof e.env.references>"u")return!1;if(u<k&&e.src.charCodeAt(u)===91?(b=u+1,u=e.md.helpers.parseLinkLabel(e,u),u>=0?c=e.src.slice(b,u++):u=i+1):u=i+1,c||(c=e.src.slice(l,i)),d=e.env.references[mu(c)],!d)return e.pos=w,!1;g=d.href,f=d.title}return r||(s=e.src.slice(l,i),e.md.inline.parse(s,e.md,e.env,h=[]),m=e.push("image","img",0),m.attrs=n=[["src",g],["alt",""]],m.children=h,m.content=s,f&&n.push(["title",f])),e.pos=u,e.posMax=k,!0},bu=/^([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])?)*)$/,yu=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,wu=function(e,r){var n,o,s,c,i,l,u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;for(i=e.pos,l=e.posMax;;){if(++u>=l||(c=e.src.charCodeAt(u),c===60))return!1;if(c===62)break}return n=e.src.slice(i+1,u),yu.test(n)?(o=e.md.normalizeLink(n),e.md.validateLink(o)?(r||(s=e.push("link_open","a",1),s.attrs=[["href",o]],s.markup="autolink",s.info="auto",s=e.push("text","",0),s.content=e.md.normalizeLinkText(n),s=e.push("link_close","a",-1),s.markup="autolink",s.info="auto"),e.pos+=n.length+2,!0):!1):bu.test(n)?(o=e.md.normalizeLink("mailto:"+n),e.md.validateLink(o)?(r||(s=e.push("link_open","a",1),s.attrs=[["href",o]],s.markup="autolink",s.info="auto",s=e.push("text","",0),s.content=e.md.normalizeLinkText(n),s=e.push("link_close","a",-1),s.markup="autolink",s.info="auto"),e.pos+=n.length+2,!0):!1):!1},ku=yt.HTML_TAG_RE;function vu(t){return/^<a[>\s]/i.test(t)}function xu(t){return/^<\/a\s*>/i.test(t)}function Au(t){var e=t|32;return e>=97&&e<=122}var Eu=function(e,r){var n,o,s,c,i=e.pos;return!e.md.options.html||(s=e.posMax,e.src.charCodeAt(i)!==60||i+2>=s)||(n=e.src.charCodeAt(i+1),n!==33&&n!==63&&n!==47&&!Au(n))||(o=e.src.slice(i).match(ku),!o)?!1:(r||(c=e.push("html_inline","",0),c.content=o[0],vu(c.content)&&e.linkLevel++,xu(c.content)&&e.linkLevel--),e.pos+=o[0].length,!0)},fo=Tn,_u=z.has,Cu=z.isValidEntityCode,ho=z.fromCodePoint,Du=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,qu=/^&([a-z][a-z0-9]{1,31});/i,Su=function(e,r){var n,o,s,c,i=e.pos,l=e.posMax;if(e.src.charCodeAt(i)!==38||i+1>=l)return!1;if(n=e.src.charCodeAt(i+1),n===35){if(s=e.src.slice(i).match(Du),s)return r||(o=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),c=e.push("text_special","",0),c.content=Cu(o)?ho(o):ho(65533),c.markup=s[0],c.info="entity"),e.pos+=s[0].length,!0}else if(s=e.src.slice(i).match(qu),s&&_u(fo,s[1]))return r||(c=e.push("text_special","",0),c.content=fo[s[1]],c.markup=s[0],c.info="entity"),e.pos+=s[0].length,!0;return!1};function mo(t){var e,r,n,o,s,c,i,l,u={},d=t.length;if(d){var p=0,f=-2,m=[];for(e=0;e<d;e++)if(n=t[e],m.push(0),(t[p].marker!==n.marker||f!==n.token-1)&&(p=e),f=n.token,n.length=n.length||0,!!n.close){for(u.hasOwnProperty(n.marker)||(u[n.marker]=[-1,-1,-1,-1,-1,-1]),s=u[n.marker][(n.open?3:0)+n.length%3],r=p-m[p]-1,c=r;r>s;r-=m[r]+1)if(o=t[r],o.marker===n.marker&&o.open&&o.end<0&&(i=!1,(o.close||n.open)&&(o.length+n.length)%3===0&&(o.length%3!==0||n.length%3!==0)&&(i=!0),!i)){l=r>0&&!t[r-1].open?m[r-1]+1:0,m[e]=e-r+l,m[r]=l,n.open=!1,o.end=e,o.close=!1,c=-1,f=-2;break}c!==-1&&(u[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}}var Ru=function(e){var r,n=e.tokens_meta,o=e.tokens_meta.length;for(mo(e.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&mo(n[r].delimiters)},Tu=function(e){var r,n,o=0,s=e.tokens,c=e.tokens.length;for(r=n=0;r<c;r++)s[r].nesting<0&&o--,s[r].level=o,s[r].nesting>0&&o++,s[r].type==="text"&&r+1<c&&s[r+1].type==="text"?s[r+1].content=s[r].content+s[r+1].content:(r!==n&&(s[n]=s[r]),n++);r!==n&&(s.length=n)},ir=Kt,go=z.isWhiteSpace,bo=z.isPunctChar,yo=z.isMdAsciiPunct;function Ge(t,e,r,n){this.src=t,this.env=r,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}Ge.prototype.pushPending=function(){var t=new ir("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},Ge.prototype.push=function(t,e,r){this.pending&&this.pushPending();var n=new ir(t,e,r),o=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(o),n},Ge.prototype.scanDelims=function(t,e){var r=t,n,o,s,c,i,l,u,d,p,f=!0,m=!0,h=this.posMax,b=this.src.charCodeAt(t);for(n=t>0?this.src.charCodeAt(t-1):32;r<h&&this.src.charCodeAt(r)===b;)r++;return s=r-t,o=r<h?this.src.charCodeAt(r):32,u=yo(n)||bo(String.fromCharCode(n)),p=yo(o)||bo(String.fromCharCode(o)),l=go(n),d=go(o),d?f=!1:p&&(l||u||(f=!1)),l?m=!1:u&&(d||p||(m=!1)),e?(c=f,i=m):(c=f&&(!m||u),i=m&&(!f||p)),{can_open:c,can_close:i,length:s}},Ge.prototype.Token=ir;var Lu=Ge,wo=Xt,ar=[["text",su],["linkify",iu],["newline",lu],["escape",du],["backticks",pu],["strikethrough",xt.tokenize],["emphasis",At.tokenize],["link",hu],["image",gu],["autolink",wu],["html_inline",Eu],["entity",Su]],lr=[["balance_pairs",Ru],["strikethrough",xt.postProcess],["emphasis",At.postProcess],["fragments_join",Tu]];function $e(){var t;for(this.ruler=new wo,t=0;t<ar.length;t++)this.ruler.push(ar[t][0],ar[t][1]);for(this.ruler2=new wo,t=0;t<lr.length;t++)this.ruler2.push(lr[t][0],lr[t][1])}$e.prototype.skipToken=function(t){var e,r,n=t.pos,o=this.ruler.getRules(""),s=o.length,c=t.md.options.maxNesting,i=t.cache;if(typeof i[n]<"u"){t.pos=i[n];return}if(t.level<c){for(r=0;r<s;r++)if(t.level++,e=o[r](t,!0),t.level--,e){if(n>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;e||t.pos++,i[n]=t.pos},$e.prototype.tokenize=function(t){for(var e,r,n,o=this.ruler.getRules(""),s=o.length,c=t.posMax,i=t.md.options.maxNesting;t.pos<c;){if(n=t.pos,t.level<i){for(r=0;r<s;r++)if(e=o[r](t,!1),e){if(n>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(e){if(t.pos>=c)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},$e.prototype.parse=function(t,e,r,n){var o,s,c,i=new this.State(t,e,r,n);for(this.tokenize(i),s=this.ruler2.getRules(""),c=s.length,o=0;o<c;o++)s[o](i)},$e.prototype.State=Lu;var Nu=$e,ur,ko;function Bu(){return ko||(ko=1,ur=function(t){var e={};t=t||{},e.src_Any=zn().source,e.src_Cc=Vn().source,e.src_Z=$n().source,e.src_P=Zt.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");var r="[><|]";return e.src_pseudo_letter="(?:(?!"+r+"|"+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="(?=$|"+r+"|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+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+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+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="(^|"+r+'|"|\\(|'+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}),ur}function dr(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(r){r&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t}function Et(t){return Object.prototype.toString.call(t)}function Fu(t){return Et(t)==="[object String]"}function Iu(t){return Et(t)==="[object Object]"}function Ou(t){return Et(t)==="[object RegExp]"}function vo(t){return Et(t)==="[object Function]"}function Pu(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var xo={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Uu(t){return Object.keys(t||{}).reduce(function(e,r){return e||xo.hasOwnProperty(r)},!1)}var zu={"http:":{validate:function(t,e,r){var n=t.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,r){var n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){var n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},Mu="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]",Vu="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function ju(t){t.__index__=-1,t.__text_cache__=""}function Gu(t){return function(e,r){var n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}function Ao(){return function(t,e){e.normalize(t)}}function _t(t){var e=t.re=Bu()(t.__opts__),r=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||r.push(Mu),r.push(e.src_xn),e.src_tlds=r.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");var o=[];t.__compiled__={};function s(i,l){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+l)}Object.keys(t.__schemas__).forEach(function(i){var l=t.__schemas__[i];if(l!==null){var u={validate:null,link:null};if(t.__compiled__[i]=u,Iu(l)){Ou(l.validate)?u.validate=Gu(l.validate):vo(l.validate)?u.validate=l.validate:s(i,l),vo(l.normalize)?u.normalize=l.normalize:l.normalize?s(i,l):u.normalize=Ao();return}if(Fu(l)){o.push(i);return}s(i,l)}}),o.forEach(function(i){t.__compiled__[t.__schemas__[i]]&&(t.__compiled__[i].validate=t.__compiled__[t.__schemas__[i]].validate,t.__compiled__[i].normalize=t.__compiled__[t.__schemas__[i]].normalize)}),t.__compiled__[""]={validate:null,normalize:Ao()};var c=Object.keys(t.__compiled__).filter(function(i){return i.length>0&&t.__compiled__[i]}).map(Pu).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),ju(t)}function $u(t,e){var r=t.__index__,n=t.__last_index__,o=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=o,this.text=o,this.url=o}function pr(t,e){var r=new $u(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function X(t,e){if(!(this instanceof X))return new X(t,e);e||Uu(t)&&(e=t,t={}),this.__opts__=dr({},xo,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=dr({},zu,t),this.__compiled__={},this.__tlds__=Vu,this.__tlds_replaced__=!1,this.re={},_t(this)}X.prototype.add=function(e,r){return this.__schemas__[e]=r,_t(this),this},X.prototype.set=function(e){return this.__opts__=dr(this.__opts__,e),this},X.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,n,o,s,c,i,l,u,d;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(r=l.exec(e))!==null;)if(s=this.testSchemaAt(e,r[2],l.lastIndex),s){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(c=n.index+n[1].length,(this.__index__<0||c<this.__index__)&&(this.__schema__="",this.__index__=c,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=e.indexOf("@"),d>=0&&(o=e.match(this.re.email_fuzzy))!==null&&(c=o.index+o[1].length,i=o.index+o[0].length,(this.__index__<0||c<this.__index__||c===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=c,this.__last_index__=i))),this.__index__>=0},X.prototype.pretest=function(e){return this.re.pretest.test(e)},X.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0},X.prototype.match=function(e){var r=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(pr(this,r)),r=this.__last_index__);for(var o=r?e.slice(r):e;this.test(o);)n.push(pr(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null},X.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var r=this.re.schema_at_start.exec(e);if(!r)return null;var n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,pr(this,0)):null},X.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,o,s){return n!==s[o-1]}).reverse(),_t(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,_t(this),this)},X.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},X.prototype.onCompile=function(){};var Hu=X;const Be=2147483647,le=36,fr=1,He=26,Zu=38,Wu=700,Eo=72,_o=128,Co="-",Ju=/^xn--/,Qu=/[^\0-\x7F]/,Yu=/[\x2E\u3002\uFF0E\uFF61]/g,Xu={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},hr=le-fr,ue=Math.floor,mr=String.fromCharCode;function fe(t){throw new RangeError(Xu[t])}function Ku(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}function Do(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(Yu,".");const o=t.split("."),s=Ku(o,e).join(".");return n+s}function gr(t){const e=[];let r=0;const n=t.length;for(;r<n;){const o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){const s=t.charCodeAt(r++);(s&64512)==56320?e.push(((o&1023)<<10)+(s&1023)+65536):(e.push(o),r--)}else e.push(o)}return e}const qo=t=>String.fromCodePoint(...t),ed=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:le},So=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Ro=function(t,e,r){let n=0;for(t=r?ue(t/Wu):t>>1,t+=ue(t/e);t>hr*He>>1;n+=le)t=ue(t/hr);return ue(n+(hr+1)*t/(t+Zu))},br=function(t){const e=[],r=t.length;let n=0,o=_o,s=Eo,c=t.lastIndexOf(Co);c<0&&(c=0);for(let i=0;i<c;++i)t.charCodeAt(i)>=128&&fe("not-basic"),e.push(t.charCodeAt(i));for(let i=c>0?c+1:0;i<r;){const l=n;for(let d=1,p=le;;p+=le){i>=r&&fe("invalid-input");const f=ed(t.charCodeAt(i++));f>=le&&fe("invalid-input"),f>ue((Be-n)/d)&&fe("overflow"),n+=f*d;const m=p<=s?fr:p>=s+He?He:p-s;if(f<m)break;const h=le-m;d>ue(Be/h)&&fe("overflow"),d*=h}const u=e.length+1;s=Ro(n-l,u,l==0),ue(n/u)>Be-o&&fe("overflow"),o+=ue(n/u),n%=u,e.splice(n++,0,o)}return String.fromCodePoint(...e)},yr=function(t){const e=[];t=gr(t);const r=t.length;let n=_o,o=0,s=Eo;for(const l of t)l<128&&e.push(mr(l));const c=e.length;let i=c;for(c&&e.push(Co);i<r;){let l=Be;for(const d of t)d>=n&&d<l&&(l=d);const u=i+1;l-n>ue((Be-o)/u)&&fe("overflow"),o+=(l-n)*u,n=l;for(const d of t)if(d<n&&++o>Be&&fe("overflow"),d===n){let p=o;for(let f=le;;f+=le){const m=f<=s?fr:f>=s+He?He:f-s;if(p<m)break;const h=p-m,b=le-m;e.push(mr(So(m+h%b,0))),p=ue(h/b)}e.push(mr(So(p,0))),s=Ro(o,u,i===c),o=0,++i}++o,++n}return e.join("")},To=function(t){return Do(t,function(e){return Ju.test(e)?br(e.slice(4).toLowerCase()):e})},Lo=function(t){return Do(t,function(e){return Qu.test(e)?"xn--"+yr(e):e})},td=Ra(Object.freeze(Object.defineProperty({__proto__:null,decode:br,default:{version:"2.3.1",ucs2:{decode:gr,encode:qo},decode:br,encode:yr,toASCII:Lo,toUnicode:To},encode:yr,toASCII:Lo,toUnicode:To,ucs2decode:gr,ucs2encode:qo},Symbol.toStringTag,{value:"Module"})));var rd={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},nd={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"]}}},od={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"]}}},Ze=z,sd=mt,cd=el,id=El,ad=nu,ld=Nu,ud=Hu,xe=Re,No=td,dd={default:rd,zero:nd,commonmark:od},pd=/^(vbscript|javascript|file|data):/,fd=/^data:image\/(gif|png|jpeg|webp);/;function hd(t){var e=t.trim().toLowerCase();return pd.test(e)?!!fd.test(e):!0}var Bo=["http:","https:","mailto:"];function md(t){var e=xe.parse(t,!0);if(e.hostname&&(!e.protocol||Bo.indexOf(e.protocol)>=0))try{e.hostname=No.toASCII(e.hostname)}catch{}return xe.encode(xe.format(e))}function gd(t){var e=xe.parse(t,!0);if(e.hostname&&(!e.protocol||Bo.indexOf(e.protocol)>=0))try{e.hostname=No.toUnicode(e.hostname)}catch{}return xe.decode(xe.format(e),xe.decode.defaultChars+"%")}function te(t,e){if(!(this instanceof te))return new te(t,e);e||Ze.isString(t)||(e=t||{},t="default"),this.inline=new ld,this.block=new ad,this.core=new id,this.renderer=new cd,this.linkify=new ud,this.validateLink=hd,this.normalizeLink=md,this.normalizeLinkText=gd,this.utils=Ze,this.helpers=Ze.assign({},sd),this.options={},this.configure(t),e&&this.set(e)}te.prototype.set=function(t){return Ze.assign(this.options,t),this},te.prototype.configure=function(t){var e=this,r;if(Ze.isString(t)&&(r=t,t=dd[r],!t))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)}),this},te.prototype.enable=function(t,e){var r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.enable(t,!0))},this),r=r.concat(this.inline.ruler2.enable(t,!0));var n=t.filter(function(o){return r.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},te.prototype.disable=function(t,e){var r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.disable(t,!0))},this),r=r.concat(this.inline.ruler2.disable(t,!0));var n=t.filter(function(o){return r.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},te.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},te.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");var r=new this.core.State(t,this,e);return this.core.process(r),r.tokens},te.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},te.prototype.parseInline=function(t,e){var r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens},te.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};var bd=te,yd=bd;const wd=Sa(yd),kd=a.defineComponent({name:"VueMarkdown",props:{source:{type:String,required:!0},options:{type:Object,required:!1},plugins:{type:Array,required:!1}},setup(t){const e=a.ref(new wd(t.options??{}));for(const n of t.plugins??[])e.value.use(n);const r=a.computed(()=>e.value.render(t.source));return()=>a.h("div",{innerHTML:r.value})}}),vd={class:"q-chatbot__message-container"},xd={class:"q-chatbot__message-wrapper"},Ad={key:0,class:"q-chatbot__image-preview"},Ed=["src","alt"],_d={class:"q-chatbot__message"},Cd={key:1,class:"q-chatbot__text"},Dd={class:"q-chatbot__dialog-title"},qd={key:1,class:"q-chatbot__feedback-buttons"},Sd={class:"q-chatbot__sender"},Rd=a.defineComponent({__name:"CBMessage",props:{sender:{default:"user"},message:{},date:{default:()=>new Date},loading:{type:Boolean},dateFormat:{},imagePreviewUrl:{},texts:{default:()=>({commentDialogTitle:"Would you like to add a comment?",commentPlaceholder:"Type your comment here (optional)...",goodResponse:"Good response",badResponse:"Bad response",copyResponse:"Copy response",submitButton:"Submit",cancelButton:"Cancel",senderImage:"Sender Image",imagePreview:"Image preview"})},apiEndpoint:{},sessionID:{},userImage:{default:void 0},chatbotImage:{},isWelcomeMessage:{type:Boolean}},setup(t){const e=t,r=a.ref(!1),n=a.ref(""),o=a.ref(null),s=[{id:"confirm-btn",action:f,props:{label:e.texts.submitButton,variant:"bold"},icon:{icon:"submit"}},{id:"cancel-btn",props:{label:e.texts.cancelButton},icon:{icon:"cancel"}}],c=a.computed(()=>e.sender==="bot"&&!Object.values(e.texts||{}).includes(e.message||"")&&!e.isWelcomeMessage),i=a.computed(()=>e.dateFormat?d(e.date,"HH:mm"):e.date.toLocaleString()),l=a.computed(()=>`${i.value}`),u=a.computed(()=>e.sender==="bot"?e.chatbotImage:e.userImage);function d(b,g){const w=b.getDate().toString().padStart(2,"0"),k=(b.getMonth()+1).toString().padStart(2,"0"),C=b.getFullYear().toString().padStart(2,"0"),q=b.getHours().toString().padStart(2,"0"),S=b.getMinutes().toString().padStart(2,"0"),E=b.getSeconds().toString().padStart(2,"0");return g.replace("dd",w).replace("MM",k).replace("yyyy",C).replace("HH",q).replace("mm",S).replace("ss",E)}function p(b){r.value=!0,n.value="",o.value=b}function f(){o.value!=null&&m(o.value,n.value)}function m(b,g){V.post(e.apiEndpoint+"/prompt/feedback",{messageSessionID:e.sessionID,feedbackValue:b,feedbackComment:g}).catch(w=>{console.error("Error sending message feedback: ",w)})}function h(){e.message&&navigator.clipboard.writeText(e.message).then(()=>{console.log("Message copied to clipboard")}).catch(b=>{console.error("Failed to copy message to clipboard: ",b)})}return(b,g)=>{const w=a.resolveComponent("q-button-group");return a.openBlock(),a.createElementBlock("div",vd,[a.createVNode(a.unref(ee),{type:"img",icon:u.value,alt:e.texts.senderImage,class:"q-chatbot__profile"},null,8,["icon","alt"]),a.createElementVNode("div",xd,[e.imagePreviewUrl&&e.imagePreviewUrl.length>0?(a.openBlock(),a.createElementBlock("div",Ad,[a.createElementVNode("img",{src:e.imagePreviewUrl,alt:e.texts.imagePreview},null,8,Ed)])):a.createCommentVNode("",!0),a.createElementVNode("div",_d,[b.loading?(a.openBlock(),a.createBlock(qa,{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[e.sender==="bot"?(a.openBlock(),a.createBlock(a.unref(kd),{key:0,class:"q-chatbot__text",source:e.message||""},null,8,["source"])):(a.openBlock(),a.createElementBlock("div",Cd,a.toDisplayString(e.message),1))],64))]),a.createVNode(a.unref(Ea),{id:"comment-dialog",modelValue:r.value,"onUpdate:modelValue":g[1]||(g[1]=k=>r.value=k),buttons:s},{"body.content":a.withCtx(()=>[a.createElementVNode("div",Dd,a.toDisplayString(e.texts.commentDialogTitle),1),a.createVNode(a.unref(Yc),{modelValue:n.value,"onUpdate:modelValue":g[0]||(g[0]=k=>n.value=k),maxLength:150,size:"large",placeholder:e.texts.commentPlaceholder},null,8,["modelValue","placeholder"])]),_:1},8,["modelValue"]),c.value?(a.openBlock(),a.createElementBlock("div",qd,[a.createVNode(w,null,{default:a.withCtx(()=>[a.createVNode(a.unref(ce),{title:e.texts.goodResponse,borderless:"",disabled:b.loading,onClick:g[2]||(g[2]=k=>p(1))},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),{icon:"thumb-up"})]),_:1},8,["title","disabled"]),a.createVNode(a.unref(ce),{title:e.texts.badResponse,borderless:"",disabled:b.loading,onClick:g[3]||(g[3]=k=>p(0))},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),{icon:"thumb-down"})]),_:1},8,["title","disabled"]),a.createVNode(a.unref(ce),{title:e.texts.copyResponse,borderless:"",disabled:b.loading,onClick:h},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),{icon:"copy-content"})]),_:1},8,["title","disabled"])]),_:1})])):a.createCommentVNode("",!0),a.createElementVNode("div",Sd,a.toDisplayString(l.value),1)])])}}}),H=[];for(let t=0;t<256;++t)H.push((t+256).toString(16).slice(1));function Td(t,e=0){return(H[t[e+0]]+H[t[e+1]]+H[t[e+2]]+H[t[e+3]]+"-"+H[t[e+4]]+H[t[e+5]]+"-"+H[t[e+6]]+H[t[e+7]]+"-"+H[t[e+8]]+H[t[e+9]]+"-"+H[t[e+10]]+H[t[e+11]]+H[t[e+12]]+H[t[e+13]]+H[t[e+14]]+H[t[e+15]]).toLowerCase()}let wr;const Ld=new Uint8Array(16);function Nd(){if(!wr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");wr=crypto.getRandomValues.bind(crypto)}return wr(Ld)}const Fo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Bd(t,e,r){var o;if(Fo.randomUUID&&!t)return Fo.randomUUID();t=t||{};const n=t.random??((o=t.rng)==null?void 0:o.call(t))??Nd();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Td(n)}const Fd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLy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VfdDwHP1qH7mev5X0CklziW8WhfTgO8G9VDVHXAHo0w0i44wa0PkzMh+ApirpHi3Rn3/AnAUuuDySUA2xK/fYBaV99XS/k5Ev/w+6IPetTo6+TraP74MnZHnFWClkuK/Zfbv8+j6UYcaR8xh6JOAB9eovwIYH0VoU2QP5F3P7wxMRj9BiarSSzuwCvjA/L3VtdrFvPYE9ie6qqYb0Omgfh3VKcvIIy5czz8YfQbnFJpLbegDeZGmjqxbSI3r+ScCtwL9GhzsS+jQ1tn1aLxuNRvMBR8OTCD4MZk4SJprO6JecOs6govcn88GfggcEXOwz5uZaboN2Qysi3p0Pf8Y40A4lfgUY96IduzcoaR4xqaOWRvW6nr+3sZJcg4wxNJuLjSOl2lKirU2djAWccvGkX+6cTYcE+G2pti26xnjZJkZhwcisQtMN6kCW4Ch5jUYyNSoufeMU2IBOtxmnpJiQ5zs1RAnD0xS837orHIHAb2MAyODDgzcs8j9fKNxgKwzIFehE8G9gT6fu1RJsSrutvk/GdqIAV0smzEAAAAASUVORK5CYII=",Od={class:"q-chatbot"},Pd={class:"q-chatbot__content"},Ud={class:"q-chatbot__tools"},zd={class:"q-chatbot__footer-container"},Md={class:"q-chatbot__input-wrapper"},Vd={key:0,class:"q-chatbot__image-preview"},jd=["src"],Gd={class:"q-chatbot__input"},$d={class:"q-chatbot__send-container"},Hd=["accept"];return a.defineComponent({name:"ChatBot",__name:"ChatBot",props:{apiEndpoint:{default:"http://localhost:3000"},controllerEndpoint:{},texts:{default:()=>({chatbotTitle:"ChatBot",sendMessage:"Send message",clearChat:"Clear chat",inputLabel:"What can I help with?",imageUpload:"Upload Image",imageUploadQButton:"Upload Image",goodResponse:"Good response",badResponse:"Bad response",initialMessage:"Howdy! I am GenioBot 👋, Quidgest's personal AI assistant! How can I help you?",initialAgentMessage:"Just a temporary message while we are working on the agent mode",loginError:"Uh oh, I could not authenticate with the Quidgest API endpoint 😓",botIsSick:"*cough cough* GenioBot is not feeling alright 🥴️🤒, looks like something failed!"})},username:{},projectPath:{},userImage:{default:Id},chatbotImage:{default:Fd},dateFormat:{},mode:{default:"chat"}},setup(t){const e=a.ref([]),r=a.ref(1),n=a.ref(""),o=a.ref(!1),s=a.ref(!1),c=a.ref(null),i=a.ref(!0),l=a.ref(null),u=a.ref(null),d=a.computed(()=>".png, .jpeg, .jpg, .svg, .webp"),p=a.ref(!1),f=a.ref(!1),m=a.computed(()=>n.value.trim().length===0||o.value||s.value),h=t;a.onMounted(()=>{k(),a.nextTick(()=>{var R;(R=c.value)==null||R.addEventListener("scroll",G)})});const b=a.computed(()=>s.value||o.value),g=a.computed(()=>({"q-chatbot__footer-disabled":b.value,"drag-over":f.value&&!p.value}));function w(R){s.value=R}async function k(){try{await V.post(h.apiEndpoint+"/auth/login",{username:h.username,password:"test"}),C()}catch(R){w(!0),q(h.texts.loginError),console.log("Error logging in: "+R)}}async function C(){try{const R=await V.post(h.apiEndpoint+"/prompt/load",{username:h.username,project:h.projectPath});if(!R)return console.error("No response from server");if(R.status!==200||!R.data.success){w(!0),q(h.texts.botIsSick),console.log(`Unsuccessful load, endpoint gave status ${R.status}`);return}E(),R.data.history.forEach(O=>{const P=O.imageUrl?h.controllerEndpoint+O.imageUrl:void 0;q(O.content,O.type==="ai"?"bot":"user",P,O.sessionID)})}catch(R){w(!0),q(h.texts.botIsSick),console.log("Error loading: "+R)}}function q(R,O="bot",P=null,K,$){e.value.push({id:r.value++,message:R,date:new Date,sender:O,imagePreviewUrl:P??void 0,sessionID:K||Bd(),isWelcomeMessage:$??!1}),a.nextTick(()=>{i.value&&U()})}function S(){return e.value.find(R=>R.id===r.value-1)}function E(){const R=h.mode==="chat"?h.texts.initialMessage:h.texts.initialAgentMessage;q(R,"bot",null,void 0,!0)}function L(){e.value=[],n.value="",o.value=!1,w(!1),i.value=!0}function U(){a.nextTick(()=>{c.value&&(c.value.scrollTop=c.value.scrollHeight)})}function G(){if(c.value){const{scrollTop:O,clientHeight:P,scrollHeight:K}=c.value;O+P>=K-20?i.value=!0:i.value=!1}}function I(){u.value="",l.value&&(l.value.value=""),p.value=!1}function v(){var R;(R=l.value)==null||R.click()}function A(R){const O=R.target;l.value=O,O.files&&O.files[0]&&(u.value=URL.createObjectURL(O.files[0]),p.value=!0)}function T(){var R,O;n.value.trim().length===0||o.value||s.value||(c.value&&c.value.scrollTo({top:c.value.scrollHeight,behavior:"smooth"}),q(n.value,"user",u.value),x(n.value,(O=(R=l.value)==null?void 0:R.files)==null?void 0:O[0]),I(),n.value="")}async function x(R,O){q("","bot");let P=S();const K=(P==null?void 0:P.sessionID)||"",$=new FormData;O&&$.append("image",O),$.append("message",R),$.append("project",h.projectPath),$.append("user",h.username),$.append("sessionID",K),o.value=!0;try{const oe=await V.post(h.apiEndpoint+"/prompt/submit",$,{headers:{"Content-Type":"text/event-stream",Accept:"text/event-stream"},responseType:"stream",adapter:"fetch"});if(!oe)return console.error("No response from server");const Ae=oe.data.getReader(),kr=new TextDecoder("utf-8");for(;;){const{done:B,value:de}=await Ae.read();if(B)break;const Ct=kr.decode(de,{stream:!0}).match(/data:\s*({.*?})/g);if(Ct){for(const Zd of Ct)try{const vr=Zd.split("data:")[1].trim(),Wd=JSON.parse(vr);P&&(P.message+=Wd.value)}catch(vr){console.error("Error parsing match:",vr)}i.value&&U()}}o.value=!1}catch(oe){w(!0),q(h.texts.botIsSick),console.log("Error setting chat prompt: "+oe);return}}function D(){V.post(h.apiEndpoint+"/prompt/clear",{username:h.username,project:h.projectPath}).then(R=>{if(R.status!==200||!R.data.success){w(!0),q(h.texts.loginError),console.log(`Unsuccessful clear, endpoint gave status ${R.status}`);return}L(),E()}).catch(R=>{w(!0),q(h.texts.loginError),console.log("Error clearing chat: "+R)})}function _(R){const O=["q-chatbot__messages-wrapper"];return R==="user"&&O.push("q-chatbot__messages-wrapper_right"),O}function N(R){R.preventDefault(),b.value||(f.value=!0)}function j(R){R.preventDefault(),f.value=!1}function M(R){var P;if(R.preventDefault(),f.value=!1,b.value||p.value)return;const O=(P=R.dataTransfer)==null?void 0:P.files;if(O&&O.length>0){const K=O[0];if(K.type.startsWith("image/")&&l.value){const $=new DataTransfer;$.items.add(K),l.value.files=$.files,u.value=URL.createObjectURL(K),p.value=!0}}}return a.watch(()=>h.apiEndpoint,()=>{L(),k()}),(R,O)=>(a.openBlock(),a.createElementBlock("div",Od,[a.createElementVNode("div",Pd,[a.createElementVNode("div",Ud,[a.createVNode(a.unref(ce),{title:h.texts.clearChat,disabled:s.value,borderless:"",onClick:D},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),{icon:"bin"})]),_:1},8,["title","disabled"])]),a.createElementVNode("div",{ref_key:"messagesContainer",ref:c,class:"q-chatbot__messages-container",onScroll:G},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.value,P=>(a.openBlock(),a.createElementBlock("div",{key:P.id,class:a.normalizeClass(_(P.sender))},[a.createVNode(a.unref(Rd),a.mergeProps({ref_for:!0},P,{"date-format":h.dateFormat,"user-image":h.userImage,"chatbot-image":h.chatbotImage,loading:o.value&&!P.message,imagePreviewUrl:P.imagePreviewUrl,apiEndpoint:h.apiEndpoint,sessionID:P.sessionID}),null,16,["date-format","user-image","chatbot-image","loading","imagePreviewUrl","apiEndpoint","sessionID"])],2))),128))],544)]),a.createElementVNode("div",zd,[a.createVNode(a.unref(pn),{label:h.texts.inputLabel},null,8,["label"]),a.createElementVNode("div",{class:a.normalizeClass(["q-chatbot__footer",g.value]),onDragover:a.withModifiers(N,["prevent"]),onDragleave:a.withModifiers(j,["prevent"]),onDrop:a.withModifiers(M,["prevent"])},[a.createElementVNode("div",Md,[u.value?(a.openBlock(),a.createElementBlock("div",Vd,[a.createElementVNode("img",{src:u.value,tabindex:"0",alt:"Image preview"},null,8,jd),a.createVNode(a.unref(ce),{class:"q-chatbot__remove-image",tabindex:"0",flat:"",round:"",onClick:I},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),{icon:"bin"})]),_:1})])):a.createCommentVNode("",!0),a.createElementVNode("div",Gd,[a.createVNode(a.unref(Ca),{modelValue:n.value,"onUpdate:modelValue":O[0]||(O[0]=P=>n.value=P),size:"block",autosize:"",resize:"none",rows:2,disabled:b.value,onKeyup:a.withKeys(T,["enter"])},null,8,["modelValue","disabled"])])]),a.createElementVNode("div",$d,[a.createVNode(a.unref(ce),{title:h.texts.imageUpload,class:"q-chatbot__upload",disabled:s.value||o.value||p.value,onClick:v},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),{icon:"upload"})]),_:1},8,["title","disabled"]),a.createElementVNode("input",{id:"image-upload",type:"file",ref_key:"imageInput",ref:l,onChange:A,accept:d.value,class:"hidden-input",style:{display:"none"}},null,40,Hd),a.createVNode(a.unref(ce),{title:h.texts.sendMessage,variant:"bold",class:"q-chatbot__send",disabled:m.value,readonly:m.value,loading:o.value,onClick:T},{default:a.withCtx(()=>[a.createVNode(a.unref(ee),{icon:"send"})]),_:1},8,["title","disabled","readonly","loading"])])],34)])]))}})});
45
+ `;return t.onMounted(()=>{document.body.setAttribute(Q,(a()+1).toString());const l=In(n.gapMode);o.add(r(l,!n.noRelative,n.gapMode,n.noImportant?"":"!important"))}),t.onUnmounted(()=>{const l=a()-1;l<=0?document.body.removeAttribute(Q):document.body.setAttribute(Q,l.toString()),o.remove()}),(l,i)=>t.renderSlot(l.$slots,"default")}}));function Rn(e,n,o,a){const r=(a==null?void 0:a.offset)??0,l=(a==null?void 0:a.crossOffset)??0,i=(a==null?void 0:a.placement)??"bottom",s=e.getBoundingClientRect(),u=n.getBoundingClientRect(),f=o==null?void 0:o.getBoundingClientRect(),g=Tn(s,u,i,r),c=Un(s,u,g),m=Vn(c,g,r),y=Pn(m,g,l),x=Fn(y,u,g);let $;if(a!=null&&a.arrow){if(!f)throw new Error("[Quidgest UI] The arrow element must exist to compute its position");$=On(x,s,u,f,g)}return{overlayCoords:x,arrowCoords:$,placement:g}}function Tn(e,n,o,a){const r=ze(e,n,o,a);if(He(r)){const l=X(o),i={top:"bottom",bottom:"top",left:"right",right:"left"}[l],s=ze(e,n,i,a);if(He(s))return o;const u=Gn(o);return u?`${i}-${u}`:i}return o}function Fn(e,n,o){const a=pe(o),r=(i,s,u)=>Math.min(Math.max(i,s),u),l={...e};return a==="x"?l.x=r(e.x,8,window.innerWidth-n.width-8):l.y=r(e.y,8,window.innerHeight-n.height-8),l}function Vn(e,n,o){const a=X(n);return{x:e.x+(a==="left"?-o:a==="right"?o:0),y:e.y+(a==="top"?-o:a==="bottom"?o:0)}}function Pn(e,n,o){const a=X(n);return{x:e.x+(a==="top"||a==="bottom"?o:0),y:e.y+(a==="right"||a==="left"?o:0)}}function On(e,n,o,a,r){if(pe(r)==="y"){const l=n.top+n.height/2,i=e.y+o.height/2,s=i-l,u=o.height/2-s-a.height/2+2;if(u>0&&u<o.height-a.height)return{y:u}}else{const l=n.left+n.width/2,i=e.x+o.width/2,s=i-l,u=o.width/2-s-a.width/2+2;if(u>0&&u<o.width-a.width)return{x:u}}}function Un(e,n,o){const[a,r]=o.split("-"),l=e.x+e.width/2-n.width/2,i=e.y+e.height/2-n.height/2;let s;switch(a){case"top":s={x:l,y:e.y-n.height};break;case"bottom":s={x:l,y:e.y+e.height};break;case"left":s={x:e.x-n.width,y:i};break;case"right":s={x:e.x+e.width,y:i};break;default:throw new Error(`[Quidgest UI] Invalid placement value: ${o}`)}if(!r)return s;const u=pe(o)==="y"?"height":"width",f=pe(o),g=e[u]/2-n[u]/2;switch(r){case"start":s[f]-=g;break;case"end":s[f]+=g;break;default:throw new Error(`[Quidgest UI] Invalid alignment value: ${r}`)}return s}function ze(e,n,o,a){const r=X(o);let l=0;switch(r){case"top":l=e.top-(n.height+a);break;case"bottom":l=window.innerHeight-e.bottom-(n.height+a);break;case"left":l=e.left-(n.width+a);break;case"right":l=window.innerWidth-e.right-(n.width+a);break;default:throw new Error(`[Quidgest UI] Invalid side value: ${r}`)}return l}function qn(e){return e==="x"?"y":"x"}function jn(e){const n=X(e);return["left","right"].includes(n)?"x":"y"}function pe(e){return qn(jn(e))}function X(e){const[n]=e.split("-");return n}function Gn(e){const[,n]=e.split("-");return n}function He(e){return e<0}function zn(e){return typeof e=="string"?document.querySelector(e):e}const Hn=["id"],Zn=["role"],Jn=q(t.defineComponent({inheritAttrs:!1,__name:"QOverlay",props:t.mergeModels({id:{},class:{},anchor:{},appearance:{default:"regular"},arrow:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},delay:{default:500},nonModal:{type:Boolean},scrollLock:{type:Boolean},offset:{default:8},crossOffset:{default:0},persistent:{type:Boolean},placement:{default:"right"},spy:{type:Boolean},transition:{default:"fade"},trigger:{default:"click"},width:{default:"auto"},focusTrap:{type:Boolean},centerVertically:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["enter","leave"],["update:modelValue"]),setup(e,{emit:n}){const o=e,a=n,r=t.useModel(e,"modelValue"),{class:l}=$e(),i=t.computed(()=>["q-overlay",`q-overlay--${X(c.placement)}`,l.value,{"q-overlay--independent":s.value,"q-overlay--inverted":o.appearance==="inverted","q-overlay--center":o.centerVertically},o.class]),s=t.computed(()=>o.anchor===void 0),u=t.computed(()=>r.value&&!o.nonModal),f=t.computed(()=>(r.value||c.animating)&&o.scrollLock),g=t.computed(()=>!o.inline&&(r.value||c.animating)),c=t.reactive({animating:!1,top:0,left:0,width:0,placement:o.placement}),m=t.reactive({top:void 0,left:void 0,hidden:!0});t.watch(r,w);const y=t.computed(()=>{if(s.value)return;const v=B(),J=o.width==="anchor",j=J?v==null?void 0:v.getBoundingClientRect().width:void 0;return{top:`${c.top}px`,left:`${c.left}px`,width:j!==void 0?`${j}px`:void 0}}),x=t.computed(()=>{if(o.arrow)return{top:m.top!==void 0?`${m.top}px`:void 0,left:m.left!==void 0?`${m.left}px`:void 0,opacity:m.hidden?0:1}}),$=t.ref(null),S=t.ref(null),U=t.ref(null);function M(){const v=B();if(!v||!S.value)return;const J={placement:o.placement,width:o.width,offset:o.offset,crossOffset:o.crossOffset,arrow:o.arrow},j=Rn(v,S.value,($==null?void 0:$.value)??void 0,J);c.left=j.overlayCoords.x,c.top=j.overlayCoords.y,c.placement=j.placement,m.hidden=j.arrowCoords===void 0,j.arrowCoords&&(m.top=j.arrowCoords.y,m.left=j.arrowCoords.x)}t.watch(()=>o.placement,()=>t.nextTick(M));let F;function _(){k(0)}function I(){k(o.delay)}function k(v){F&&V(),F=window.setTimeout(()=>{r.value=!0},v)}function N(){if(F&&V(),r.value=!1,o.anchor&&o.trigger==="click"){const v=B();t.nextTick(()=>v==null?void 0:v.focus())}}function V(){clearTimeout(F),F=void 0}function R(){t.nextTick(le),a("enter")}function O(){A()}function d(){a("leave")}function p(){A(),Yo()}function w(){c.animating=!0}function A(){c.animating=!1}function B(){return o.anchor?zn(o.anchor):null}function D(v){o.persistent&&v.preventDefault()}function C(v){var J;if(o.persistent){v.preventDefault();return}let j=!1;v.defaultPrevented||v.detail.originalEvent.type==="pointerdown"&&(j=!0);const Qo=v.detail.originalEvent.target;if((J=B())!=null&&J.contains(Qo)){v.preventDefault();return}v.detail.originalEvent.type==="focusin"&&j&&v.preventDefault()}function b(){N()}let h;function E(){const v=B();if(v)switch(h=new MutationObserver(M),h.observe(v,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),o.trigger){case"click":v.addEventListener("click",_);break;case"hover":v.addEventListener("mouseenter",I),v.addEventListener("mouseleave",N),v.addEventListener("focusin",_),v.addEventListener("focusout",N);break}}function T(){const v=B();if(v)switch(h==null||h.disconnect(),o.trigger){case"click":v.removeEventListener("click",_);break;case"hover":v.removeEventListener("mouseenter",I),v.removeEventListener("mouseleave",N),v.removeEventListener("focusin",_),v.removeEventListener("focusout",N);break}}function L(){window.addEventListener("resize",M),o.scrollLock||window.addEventListener("scroll",M)}function Z(){window.removeEventListener("resize",M),o.scrollLock||window.removeEventListener("scroll",M)}let K;function ee(){B()?(M(),K=window.setTimeout(ee,100)):N()}function le(){var v;s.value||(L(),o.spy?ee():M()),(s.value||o.trigger==="click")&&((v=S.value)==null||v.focus())}function Yo(){s.value||Z(),o.spy&&(clearTimeout(K),K=void 0)}return t.onMounted(()=>{t.nextTick(E)}),t.onBeforeUnmount(T),(v,J)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!g.value,to:o.attach},[t.createVNode(t.Transition,{name:"fade",appear:""},{default:t.withCtx(()=>[u.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([o.backdropClass,"q-overlay__underlay",{"q-overlay__underlay--blur":o.backdropBlur}])},null,2)):t.createCommentVNode("v-if",!0)]),_:1}),t.createVNode(t.Transition,{name:o.transition,appear:"",onEnter:R,onAfterEnter:O,onLeave:d,onAfterLeave:p},{default:t.withCtx(()=>[r.value?(t.openBlock(),t.createElementBlock("div",{key:0,id:o.id,ref_key:"overlayContainerRef",ref:U,tabindex:"-1",class:t.normalizeClass(i.value),style:t.normalizeStyle(y.value)},[t.createVNode(t.unref(jt),{onDismiss:b,onInteractOutside:C,onPointerDownOutside:D},{default:t.withCtx(()=>[U.value?(t.openBlock(),t.createBlock(t.unref(Cn),{key:0,disabled:o.nonModal||!r.value,options:{fallbackFocus:U.value}},{default:t.withCtx(()=>[t.createElementVNode("div",t.mergeProps({ref_key:"overlayRef",ref:S,class:"q-overlay__content",tabindex:"-1",role:u.value?"dialog":void 0},v.$attrs),[o.arrow?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:$,role:"presentation",class:"q-overlay__arrow",style:t.normalizeStyle(x.value)},null,4)):t.createCommentVNode("v-if",!0),t.renderSlot(v.$slots,"default")],16,Zn)]),_:3},8,["disabled","options"])):t.createCommentVNode("v-if",!0)]),_:3})],14,Hn)):t.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"])),f.value?(t.openBlock(),t.createBlock(t.unref(Mn),{key:0})):t.createCommentVNode("v-if",!0)],64))}})),Wn=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],Yn={icon:"check-circle-outline"},Qn={close:{icon:"close"}},Xn={key:0,class:"q-dialog__header"},Kn={class:"q-dialog__header-title"},eo={key:1,class:"q-dialog__body"},to={key:0,class:"q-dialog__body-icon"},no={class:"q-dialog__body-text"},oo=["innerHTML"],ao={key:1},ro={key:2,class:"q-dialog__footer"},lo={class:"q-dialog__footer-buttons"},io=t.defineComponent({__name:"QDialog",props:t.mergeModels({id:{},class:{},title:{},text:{},icon:{default:()=>Yn},buttons:{default:()=>Wn},attach:{default:"body"},inline:{type:Boolean},backdropBlur:{type:Boolean,default:!0},dismissible:{type:Boolean},html:{type:Boolean,default:!0},icons:{default:()=>Qn},size:{default:"small"},centerVertically:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["enter","leave"],["update:modelValue"]),setup(e,{emit:n}){const o=e,a=n,r=t.useModel(e,"modelValue"),l=t.computed(()=>["q-dialog",o.class]),i=t.computed(()=>`q-overlay--${o.size}`);function s(){r.value=!1}function u(c){var m;(m=c.action)==null||m.call(c),s()}function f(){a("enter")}function g(){a("leave")}return(c,m)=>(t.openBlock(),t.createBlock(t.unref(Jn),{id:o.id,modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=y=>r.value=y),"backdrop-class":"q-dialog__underlay","scroll-lock":"",persistent:"",inline:o.inline,attach:o.attach,"backdrop-blur":o.backdropBlur,"center-vertically":o.centerVertically,class:t.normalizeClass(i.value),onEnter:f,onLeave:g},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(l.value)},[o.title||c.$slots.header?(t.openBlock(),t.createElementBlock("div",Xn,[t.renderSlot(c.$slots,"header",{},()=>[t.createElementVNode("span",Kn,t.toDisplayString(o.title),1)])])):t.createCommentVNode("v-if",!0),o.icon||o.text||c.$slots.body?(t.openBlock(),t.createElementBlock("div",eo,[t.renderSlot(c.$slots,"body",{},()=>[t.renderSlot(c.$slots,"body.icon",{},()=>[o.icon?(t.openBlock(),t.createElementBlock("span",to,[t.createVNode(t.unref(ne),t.normalizeProps(t.guardReactiveProps(o.icon)),null,16)])):t.createCommentVNode("v-if",!0)]),t.createElementVNode("div",no,[o.html?(t.openBlock(),t.createElementBlock("div",{key:0,innerHTML:o.text},null,8,oo)):(t.openBlock(),t.createElementBlock("div",ao,t.toDisplayString(o.text),1))]),t.renderSlot(c.$slots,"body.append")])])):t.createCommentVNode("v-if",!0),o.buttons||c.$slots.footer?(t.openBlock(),t.createElementBlock("div",ro,[t.renderSlot(c.$slots,"footer",{},()=>[t.createElementVNode("span",lo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,y=>(t.openBlock(),t.createBlock(t.unref(ye),t.mergeProps({ref_for:!0},y.props,{key:y.id,onClick:()=>u(y)}),{default:t.withCtx(()=>[y.icon?(t.openBlock(),t.createBlock(t.unref(ne),t.mergeProps({key:0,ref_for:!0},y.icon),null,16)):t.createCommentVNode("v-if",!0)]),_:2},1040,["onClick"]))),128))])])])):t.createCommentVNode("v-if",!0),o.dismissible?(t.openBlock(),t.createBlock(t.unref(ye),{key:3,class:"q-dialog__close",variant:"text",onClick:s},{default:t.withCtx(()=>[t.createVNode(t.unref(ne),t.normalizeProps(t.guardReactiveProps(o.icons.close)),null,16)]),_:1})):t.createCommentVNode("v-if",!0)],2)]),_:3},8,["id","modelValue","inline","attach","backdrop-blur","center-vertically","class"]))}}),fe=t.reactive({dialogs:[]});function so(){function e(o,a){const r=Mt(a);return fe.dialogs.push({id:r,props:o}),r}function n(o){const a=fe.dialogs.findIndex(r=>r.id===o);a!==-1&&fe.dialogs.splice(a,1)}return{...fe,addDialog:e,removeDialog:n}}const co=t.defineComponent({inheritAttrs:!1,__name:"QDialogProvider",setup(e){const{dialogs:n,removeDialog:o}=so();return(a,r)=>(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n),l=>(t.openBlock(),t.createBlock(t.unref(Ze),t.mergeProps({key:l.id,ref_for:!0},l.props,{"model-value":"",onLeave:()=>t.unref(o)(l.id)}),null,16,["onLeave"]))),128))}}),Ze=q(io);q(co);function H(){return{copy:"Copy",apply:"Apply",applyAll:"Apply all",chatbotTitle:"ChatBot",sendMessage:"Send message",clearChat:"Clear chat",inputLabel:"What can I help with?",imageUpload:"Upload Image",imageUploadQButton:"Upload Image",goodResponse:"Good response",badResponse:"Bad response",initialMessage:"Howdy! I am GenioBot 👋, Quidgest's personal AI assistant! How can I help you?",initialAgentMessage:"Just a temporary message while we are working on the agent mode",loginError:"Uh oh, I could not authenticate with the Quidgest API endpoint 😓",botIsSick:"*cough cough* GenioBot is not feeling alright 🥴️🤒, looks like something failed!",commentDialogTitle:"Would you like to add a comment?",commentPlaceholder:"Type your comment here (optional)...",copyResponse:"Copy response",submitButton:"Submit",cancelButton:"Cancel",senderImage:"Sender Image",imagePreview:"Image preview",regenerateResponse:"Regenerate response",generatingResponse:"Generating"}}async function Je(e,n){var u,f,g,c,m,y;const o=new AbortController,a=o.signal,l=(await W({...e,headers:{Accept:"text/event-stream"},responseType:"stream",signal:a,adapter:"fetch"})).data;if(!l||!(l instanceof ReadableStream))throw new Error("Invalid stream response");const i=l.getReader(),s=new TextDecoder;for(;;){const{done:x,value:$}=await i.read();if(x){(u=n.onDone)==null||u.call(n);break}const U=s.decode($,{stream:!0}).split(/\n\n+/);for(const M of U){const F=M.trim().split(`
46
+ `);let _="",I="";for(const k of F)k.startsWith("event:")?_=k.replace("event:","").trim():k.startsWith("data:")&&(I=k.replace("data:","").trim());if(!(!_||!I))try{const k=JSON.parse(I);switch(_){case"message":(f=n.onMessage)==null||f.call(n,k.value);break;case"error":(g=n.onError)==null||g.call(n,new Error(k.value));break;case"field_metadata":(c=n.onFieldMetadata)==null||c.call(n,k);break;case"done":(m=n.onDone)==null||m.call(n);break;default:console.warn(`Unknown event type: ${_}`)}}catch(k){(y=n.onError)==null||y.call(n,k),console.error("Error processing event:",k);continue}finally{x&&(i.releaseLock(),o.abort())}}}}function We(e){const n=t.ref(!1),o=t.ref(null);async function a(f){n.value=!0,o.value=null;try{return{data:(await W({...f,baseURL:e})).data,error:null}}catch(g){return o.value=g,console.error("Error in API request:",g),{data:null,error:g}}finally{n.value=!1}}async function r(f,g,c,m){return await a({method:"POST",url:"/prompt/load",data:{username:f,project:g,agentID:c,formId:m}})}async function l(f,g,c,m){return await a({method:"POST",url:"/prompt/clear",data:{username:f,project:g,agentID:c,formId:m}})}async function i(f,g,c){return n.value=!0,await Je({method:"POST",url:`${e}/prompt/submit`,data:f},{onMessage:m=>{g(m)},onError:m=>{o.value=m,c==null||c(m),console.error("Error in sendPrompt:",m)},onDone:()=>n.value=!1})}async function s(f,g,c){return n.value=!0,await Je({method:"POST",url:`${e}/get-job-result`,data:{jobId:f}},{onMessage:m=>g(m),onFieldMetadata:m=>c(m),onError:m=>{o.value=m,console.error("Error in getFieldSuggestionData:",m)},onDone:()=>n.value=!1})}async function u(f,g,c){return await a({method:"POST",url:"/prompt/feedback",data:{messageSessionID:c,feedbackValue:f,feedbackComment:g}})}return{isLoading:n,lastError:o,getChatData:r,clearChatData:l,getFieldSuggestionData:s,sendPrompt:i,handleFeedback:u}}const uo=["innerHTML"],_e=t.defineComponent({__name:"MarkdownRender",props:{source:{},options:{},plugins:{}},setup(e){const n=e,o=t.ref(new et({html:!0,...n.options??{}}));n.plugins&&n.plugins.forEach(r=>o.value.use(r));const a=t.computed(()=>o.value.render(n.source));return(r,l)=>(t.openBlock(),t.createElementBlock("div",{class:"markdown-renderer",innerHTML:a.value},null,8,uo))}});function Ye(e,n){switch(e){case"date":return new Date(n).toLocaleDateString();case"number":return parseFloat(n);case"boolean":return n.toLowerCase()==="true";default:return n.toString()}}const po={class:"q-field-preview"},fo={class:"q-field-preview__toolbar"},mo={class:"q-field-preview__content"},go={class:"q-field-preview__footer"},bo=t.defineComponent({__name:"FieldPreview",props:{name:{},text:{},type:{},disabled:{type:Boolean},applied:{type:Boolean}},emits:["apply"],setup(e,{emit:n}){const o=H(),a=e,r=t.ref(a.applied),l=t.computed(()=>a.disabled||r.value),i=t.computed(()=>a.type==="text"||a.type==="multiline_text"?_e:"div"),s=t.computed(()=>{const g={};return i.value===_e?g.source=a.text:g.innerHTML=a.text,g}),u=n;function f(){if(r.value)return;r.value=!0;const g=Ye(a.type,a.text);u("apply",g)}return(g,c)=>(t.openBlock(),t.createElementBlock("div",po,[t.createElementVNode("div",fo,[t.createElementVNode("span",null,[c[0]||(c[0]=t.createTextVNode(" Suggestions for field: ")),t.createElementVNode("b",null,t.toDisplayString(a.name),1)])]),t.createElementVNode("div",mo,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.value),t.normalizeProps(t.guardReactiveProps(s.value)),null,16))]),t.createElementVNode("div",go,[t.createVNode(t.unref(Tt),{borderless:""},{default:t.withCtx(()=>[t.createVNode(t.unref(ye),{label:t.unref(o).apply,disabled:l.value,readonly:l.value,onClick:f},{default:t.withCtx(()=>[t.createVNode(t.unref(ne),{icon:"apply"})]),_:1},8,["label","disabled","readonly"])]),_:1})])]))}}),ho={class:"pulsing-dots"},yo={class:"generating-text"},wo={class:"dots-container"},vo=t.defineComponent({__name:"PulseDots",setup(e){const n=[1,2,3],o=H();return(a,r)=>(t.openBlock(),t.createElementBlock("div",ho,[t.createElementVNode("span",yo,t.toDisplayString(t.unref(o).generatingResponse),1),t.createElementVNode("div",wo,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(n,(l,i)=>t.createElementVNode("span",{key:i,class:"dot",style:t.normalizeStyle({animationDelay:i*.2+"s"})}," • ",4)),64))])]))}}),ko={class:"q-chatbot__message-container"},Bo={class:"q-chatbot__message-wrapper"},Eo={key:0,class:"q-chatbot__image-preview"},Co=["src","alt"],_o={class:"q-chatbot__message"},Ao={key:1,class:"q-chatbot__text"},No=t.defineComponent({__name:"ChatBotMessage",props:{sender:{default:"user"},message:{},date:{default:()=>new Date},loading:{type:Boolean},dateFormat:{},imagePreviewUrl:{},apiEndpoint:{},sessionID:{},userImage:{default:void 0},chatbotImage:{},isWelcomeMessage:{type:Boolean},fields:{default:()=>[]}},emits:["apply-fields"],setup(e,{emit:n}){const o=n,a=H(),r=e,{handleFeedback:l}=We(r.apiEndpoint),i=t.computed(()=>r.sender==="bot"&&!Object.values(a||{}).includes(r.message||"")&&!r.isWelcomeMessage),s=t.computed(()=>r.sender==="bot"?r.chatbotImage:r.userImage);function u(){r.message&&navigator.clipboard.writeText(r.message).then(()=>{console.log("Response copied to clipboard")}).catch(m=>{console.error("Failed to copy response: ",m)})}function f(m,y){o("apply-fields",[{name:y.name,text:m}])}function g(){if(!r.fields||r.fields.length===0)return;const m=r.fields.map(y=>({name:y.name,text:Ye(y.type,y.text)}));o("apply-fields",m)}function c(m,y){m===null||y===null||!r.sessionID||l(m,y,r.sessionID)}return(m,y)=>(t.openBlock(),t.createElementBlock("div",ko,[t.createVNode(t.unref(ne),{type:"img",icon:s.value,alt:t.unref(a).senderImage,class:"q-chatbot__profile"},null,8,["icon","alt"]),t.createElementVNode("div",Bo,[r.imagePreviewUrl&&r.imagePreviewUrl.length>0?(t.openBlock(),t.createElementBlock("div",Eo,[t.createElementVNode("img",{src:r.imagePreviewUrl,alt:t.unref(a).imagePreview},null,8,Co)])):t.createCommentVNode("",!0),t.createElementVNode("div",_o,[m.loading?(t.openBlock(),t.createBlock(vo,{key:0})):r.sender==="bot"&&r.fields.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(r.fields,(x,$)=>(t.openBlock(),t.createBlock(t.unref(bo),{class:"q-chatbot__text",key:$,text:x.text||"",name:x.name,type:x.type,disabled:m.loading,onApply:S=>f(S,x)},null,8,["text","name","type","disabled","onApply"]))),128)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[r.sender==="bot"?(t.openBlock(),t.createBlock(t.unref(_e),{key:0,class:"q-chatbot__text",source:r.message||""},null,8,["source"])):(t.openBlock(),t.createElementBlock("div",Ao,t.toDisplayString(r.message),1))],64))])]),t.createVNode(t.unref(Mo),{showButtons:i.value,loading:r.loading,"date-format":r.dateFormat,onCopyResponse:u,onSubmitFeedback:c,onApplyAll:g},null,8,["showButtons","loading","date-format"])]))}}),P=[];for(let e=0;e<256;++e)P.push((e+256).toString(16).slice(1));function So(e,n=0){return(P[e[n+0]]+P[e[n+1]]+P[e[n+2]]+P[e[n+3]]+"-"+P[e[n+4]]+P[e[n+5]]+"-"+P[e[n+6]]+P[e[n+7]]+"-"+P[e[n+8]]+P[e[n+9]]+"-"+P[e[n+10]]+P[e[n+11]]+P[e[n+12]]+P[e[n+13]]+P[e[n+14]]+P[e[n+15]]).toLowerCase()}let Ae;const Io=new Uint8Array(16);function xo(){if(!Ae){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ae=crypto.getRandomValues.bind(crypto)}return Ae(Io)}const Qe={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xe(e,n,o){var r;if(Qe.randomUUID&&!e)return Qe.randomUUID();e=e||{};const a=e.random??((r=e.rng)==null?void 0:r.call(e))??xo();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,So(a)}const re=t.ref([]),me=t.ref(1);function Ke(){function e(r,l,i,s,u){const f={id:me.value++,message:r,date:new Date,sender:l||"bot",sessionID:s||Xe(),imagePreviewUrl:i||void 0,isWelcomeMessage:u,fields:[]};re.value.push(f)}function n(){return re.value.find(r=>r.id===me.value-1)}function o(){re.value=[],me.value=1}function a(){return re.value}return{messages:re,nextMessageId:me,addChatMessage:e,getLastMessage:n,clearMessages:o,getMessages:a}}const Do={class:"q-chatbot__dialog-title"},$o={key:0,class:"q-chatbot__feedback-buttons"},Lo={class:"q-chatbot__sender"},Mo=t.defineComponent({__name:"ChatBotMessageButtons",props:{loading:{type:Boolean},showButtons:{type:Boolean},dateFormat:{},date:{}},emits:["submit-feedback","copy-response","apply-all"],setup(e,{emit:n}){const o=H(),{getLastMessage:a}=Ke(),r=e,l=t.ref(!1),i=t.ref(""),s=t.ref(null),u=t.ref(!1),f=t.computed(()=>r.loading||u.value),g=r.date||new Date,c=n,m=a(),y=t.computed(()=>m?m.fields&&m.fields.length>1:!1),x=[{id:"confirm-btn",action:_,props:{label:o.submitButton},icon:{icon:"submit"}},{id:"cancel-btn",props:{label:o.cancelButton},icon:{icon:"cancel"}}],$=t.computed(()=>r.dateFormat?U(g,"HH:mm"):g.toLocaleString()),S=t.computed(()=>`${$.value}`);function U(k,N){const V=k.getDate().toString().padStart(2,"0"),R=(k.getMonth()+1).toString().padStart(2,"0"),O=k.getFullYear().toString().padStart(2,"0"),d=k.getHours().toString().padStart(2,"0"),p=k.getMinutes().toString().padStart(2,"0"),w=k.getSeconds().toString().padStart(2,"0");return N.replace("dd",V).replace("MM",R).replace("yyyy",O).replace("HH",d).replace("mm",p).replace("ss",w)}function M(k){l.value=!0,i.value="",s.value=k}function F(){u.value||(u.value=!0,c("apply-all"))}function _(){s.value!==null&&(c("submit-feedback",s.value,i.value),l.value=!1,i.value="",s.value=null)}function I(){c("copy-response")}return(k,N)=>{const V=t.resolveComponent("q-text-field"),R=t.resolveComponent("q-icon"),O=t.resolveComponent("q-button"),d=t.resolveComponent("q-button-group");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(Ze),{modelValue:l.value,"onUpdate:modelValue":N[1]||(N[1]=p=>l.value=p),buttons:x},{body:t.withCtx(()=>[t.createElementVNode("div",Do,t.toDisplayString(t.unref(o).commentDialogTitle),1),t.createVNode(V,{modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=p=>i.value=p),maxLength:150,size:"large",placeholder:t.unref(o).commentPlaceholder},null,8,["modelValue","placeholder"])]),_:1},8,["modelValue"]),k.showButtons?(t.openBlock(),t.createElementBlock("div",$o,[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(O,{title:t.unref(o).goodResponse,borderless:"",disabled:r.loading,onClick:N[2]||(N[2]=p=>M(1))},{default:t.withCtx(()=>[t.createVNode(R,{icon:"thumb-up"})]),_:1},8,["title","disabled"]),t.createVNode(O,{title:t.unref(o).badResponse,borderless:"",disabled:r.loading,onClick:N[3]||(N[3]=p=>M(0))},{default:t.withCtx(()=>[t.createVNode(R,{icon:"thumb-down"})]),_:1},8,["title","disabled"]),t.createVNode(O,{title:t.unref(o).copyResponse,borderless:"",disabled:r.loading,onClick:I},{default:t.withCtx(()=>[t.createVNode(R,{icon:"copy-content"})]),_:1},8,["title","disabled"]),y.value?(t.openBlock(),t.createBlock(O,{key:0,title:t.unref(o).applyAll,borderless:"",disabled:f.value,readonly:f.value,onClick:F},{default:t.withCtx(()=>[t.createVNode(R,{icon:"apply-all"})]),_:1},8,["title","disabled","readonly"])):t.createCommentVNode("",!0)]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",Lo,t.toDisplayString(S.value),1)],64)}}}),Ro={class:"q-chatbot__tools"},To={class:"q-chatbot__tools__select"},Fo=t.defineComponent({__name:"ChatToolBar",props:{disabled:{type:Boolean},availableAgents:{default:()=>[]},selectedAgentKey:{}},emits:["clear","change-chat"],setup(e,{emit:n}){const{clearChat:o}=H(),a={key:"",value:"Default Chat",formId:""},r=e,l=n,i=t.computed(()=>r.availableAgents&&r.availableAgents.length>0),s=t.ref(r.selectedAgentKey||a.key);t.watch(()=>r.selectedAgentKey,c=>{s.value=c||a.key});const u=t.computed(()=>{var m;const c=(m=r.availableAgents)==null?void 0:m.map(y=>({key:y.key,value:y.value,formId:y.formId}));return c==null||c.push(a),c||[a]});function f(){l("clear")}function g(c){const m=u.value.find(y=>y.key===c);if(m){if(m.key===a.key){l("change-chat",{key:"",formId:""});return}l("change-chat",m)}}return(c,m)=>{const y=t.resolveComponent("q-select"),x=t.resolveComponent("q-icon"),$=t.resolveComponent("q-button");return t.openBlock(),t.createElementBlock("div",Ro,[t.createElementVNode("div",To,[i.value?(t.openBlock(),t.createBlock(y,{key:0,modelValue:s.value,"onUpdate:modelValue":[m[0]||(m[0]=S=>s.value=S),g],size:"medium",items:u.value},null,8,["modelValue","items"])):t.createCommentVNode("",!0)]),t.createVNode($,{title:t.unref(o),disabled:r.disabled,borderless:"",onClick:f},{default:t.withCtx(()=>[t.createVNode(x,{icon:"bin"})]),_:1},8,["title","disabled"])])}}}),Vo={class:"q-chatbot__input-wrapper"},Po={key:0,class:"q-chatbot__image-preview"},Oo=["src"],Uo={class:"q-chatbot__input"},qo={class:"q-chatbot__send-container"},jo=["accept"],Go=t.defineComponent({__name:"ChatBotInput",props:{disabled:{type:Boolean},loading:{type:Boolean},userPrompt:{},agentId:{}},emits:["sendMessage"],setup(e,{emit:n}){const o=H(),a=e,r=t.ref(null),l=t.ref(""),i=t.computed(()=>".png, .jpeg, .jpg, .svg, .webp"),s=t.ref(!1),u=t.ref(!1),f=t.ref(a.userPrompt??""),g=n,c=t.computed(()=>a.disabled||a.loading||f.value.trim().length===0);function m(_){_.preventDefault(),a.disabled||(u.value=!0)}const y=t.computed(()=>({"q-chatbot__footer-disabled":a.disabled,"drag-over":u.value&&!s.value}));function x(_){_.preventDefault(),u.value=!1}function $(_){var N;if(_.preventDefault(),u.value=!1,a.disabled||s.value)return;const I=(N=_.dataTransfer)==null?void 0:N.files;if(!I)return;const k=I[0];if(k.type.startsWith("image/")){if(!r.value)return;const V=new DataTransfer;V.items.add(k),r.value.files=V.files,l.value=URL.createObjectURL(k),s.value=!0}}function S(){if(!(f.value.trim()===""||a.loading||a.disabled)){if(r.value&&r.value.files&&r.value.files.length>0){const I={file:r.value.files[0],previewUrl:l.value};g("sendMessage",f.value,I),U()}else g("sendMessage",f.value);f.value=""}}function U(){l.value="",r.value&&(r.value.value="",r.value.files=null),s.value=!1}function M(){var _;(_=r.value)==null||_.click()}function F(_){const I=_.target;r.value=I,I.files&&I.files[0]&&(l.value=URL.createObjectURL(I.files[0]),s.value=!0)}return(_,I)=>{const k=t.resolveComponent("q-icon"),N=t.resolveComponent("q-button"),V=t.resolveComponent("q-text-area");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(Pt),{label:t.unref(o).inputLabel},null,8,["label"]),t.createElementVNode("div",{class:t.normalizeClass(["q-chatbot__footer",y.value]),onDragover:t.withModifiers(m,["prevent"]),onDragleave:t.withModifiers(x,["prevent"]),onDrop:t.withModifiers($,["prevent"])},[t.createElementVNode("div",Vo,[l.value?(t.openBlock(),t.createElementBlock("div",Po,[t.createElementVNode("img",{src:l.value,tabindex:"0",alt:"Image preview"},null,8,Oo),t.createVNode(N,{class:"q-chatbot__remove-image",tabindex:"0",flat:"",round:"",onClick:U},{default:t.withCtx(()=>[t.createVNode(k,{icon:"bin"})]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",Uo,[t.createVNode(V,{modelValue:f.value,"onUpdate:modelValue":I[0]||(I[0]=R=>f.value=R),size:"block",autosize:"",resize:"none",rows:2,disabled:a.disabled,onKeyup:t.withKeys(S,["enter"])},null,8,["modelValue","disabled"])])]),t.createElementVNode("div",qo,[t.createVNode(N,{title:t.unref(o).imageUpload,class:"q-chatbot__upload",disabled:a.disabled||a.loading||s.value,onClick:M},{default:t.withCtx(()=>[t.createVNode(k,{icon:"upload"})]),_:1},8,["title","disabled"]),t.createElementVNode("input",{id:"image-upload",type:"file",ref_key:"imageInput",ref:r,onChange:F,accept:i.value,class:"hidden-input"},null,40,jo),t.createVNode(N,{title:t.unref(o).sendMessage,variant:"bold",class:"q-chatbot__send",disabled:c.value,readonly:c.value,onClick:S},{default:t.withCtx(()=>[t.createVNode(k,{icon:"send"})]),_:1},8,["title","disabled","readonly"])])],34)],64)}}}),zo="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20126.25%20110.36'%3e%3cdefs%3e%3cradialGradient%20id='radial-gradient'%20cx='45.24'%20cy='38.05'%20fx='45.24'%20fy='38.05'%20r='59.09'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2331319e'/%3e%3cstop%20offset='.19'%20stop-color='%232e2e97'/%3e%3cstop%20offset='.45'%20stop-color='%23292985'/%3e%3cstop%20offset='.75'%20stop-color='%23202067'/%3e%3cstop%20offset='1'%20stop-color='%2317174a'/%3e%3c/radialGradient%3e%3clinearGradient%20id='linear-gradient'%20x1='82.65'%20y1='50.41'%20x2='82.65'%20y2='77.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.02'%20stop-color='%2366ebfe'/%3e%3cstop%20offset='.96'%20stop-color='%2300bfdb'/%3e%3c/linearGradient%3e%3clinearGradient%20id='linear-gradient-2'%20x1='44.6'%20y1='50.01'%20x2='44.6'%20y2='77.1'%20xlink:href='%23linear-gradient'/%3e%3c/defs%3e%3cg%20isolation='isolate'%3e%3cg%20id='Layer_1'%3e%3cpath%20d='M126.2,61.4c-.2-3.69-2.61-17.39-5.92-22.09-2.42-3.44-5.89-4.03-7.96-4.38-.13-.02-.27-.05-.41-.07-.16-.28-.32-.58-.45-.81-.63-1.14-1.03-1.87-1.44-2.44-6.96-9.88-14.91-16.51-24.85-20.69-.25-2.29-.84-5.24-3.37-7.44-2.93-2.55-7.58-2.9-11.68-3.21-.93-.07-1.82-.14-2.4-.22l-.33-.05h-8.61l-.36.05c-.65.1-1.61.17-2.63.24-3.75.27-8.01.57-10.98,2.85-2.94,2.26-3.58,5.55-3.79,7.84-9.71,3.94-17.86,10.71-24.85,20.62-.4.57-.81,1.3-1.43,2.44-.13.23-.29.53-.45.81-.14.02-.28.05-.4.07-2.07.35-5.54.94-7.96,4.39-2.25,3.19-3.84,9.89-4.58,13.59-.6,2.97-1.9,10.3-1.08,14.26.79,3.78,3.66,5.6,5.37,6.68.12.08.26.16.39.25,1.65,10.03,6.98,18.56,15.52,24.77,9.23,6.72,20.2,9.43,27.78,10.52,4.49.65,9.15.97,13.85.97,9.67,0,23.77-1.39,36-8.02,11.58-6.27,18.81-16,21.04-28.24,4.52-2.76,6.36-5.67,5.98-12.71Z'%20fill='%2317174a'/%3e%3cpath%20d='M67.15,4.69c2.98.42,9.31.31,11.62,2.31,1.99,1.73,1.65,4.82,2.06,7.22,10.77,3.89,18.73,10.59,25.39,20.04.64.91,2.13,3.95,2.58,4.33,1.71,1.46,5.54.35,7.67,3.37,2.29,3.25,4.83,15.41,5.06,19.59.31,5.82-.76,6.9-5.58,9.44-3.28,26.16-29.7,34.5-52.68,34.5-4.6,0-9.06-.33-13.17-.93-18.13-2.61-37.11-12.11-39.51-33.08-1.7-1.92-4.96-2.54-5.55-5.39-.95-4.56,2.21-20.32,4.89-24.14,2.13-3.02,5.96-1.91,7.67-3.37.46-.39,1.94-3.42,2.58-4.33,6.54-9.28,14.55-16.22,25.21-19.87.85-.87-.3-5.45,2.43-7.55,2.52-1.94,8.35-1.69,11.42-2.16h7.91'%20fill='%23fff'/%3e%3cpath%20d='M121.86,61.51c-.22-4.2-2.78-16.43-5.07-19.7-1.77-2.51-4.71-2.18-6.64-2.83.1,1.18.16,2.37.16,3.57,0,26.85-25.96,48.61-57.98,48.61-15.83,0-30.17-5.32-40.63-13.94,4.91,17.1,22.06,25.14,38.51,27.52,4.12.59,8.6.93,13.21.93,23.06,0,49.57-8.38,52.85-34.68,4.83-2.56,5.91-3.63,5.6-9.49Z'%20fill='%23d0d7e2'%20mix-blend-mode='multiply'%20opacity='.4'/%3e%3cpath%20d='M62.91,97.68c5.82,0,11.67-.53,16.72-1.56,13.1-2.67,22.09-8.06,26.72-16.03,4.43-7.63,4.75-17.33.96-28.84-4.28-13-13.22-22.77-24.7-27.89-.13,4.51-3.84,8.16-8.38,8.16h-20.89c-4.61,0-8.39-3.78-8.39-8.39v-.14c-5.36,2.25-10.29,5.49-14.5,9.61-8.23,8.06-13.16,19.02-13.9,30.84-.59,9.44,2.67,17.53,9.43,23.42,6.27,5.46,15.68,9.02,27.2,10.3,3.13.35,6.43.52,9.73.52'%20fill='url(%23radial-gradient)'/%3e%3crect%20x='74.34'%20y='50.41'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient)'/%3e%3crect%20x='36.29'%20y='50.01'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient-2)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ho="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF2GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoV2luZG93cykiIHhtcDpDcmVh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nuvZgNnKSkKTQo3jfYZB41eXQf4SorXgrZZUZYd09AogidwORFYYDb0zejEmF8B3HZgVCVwKwZsIM8FxhD80daXgcWu549tIrhj0R6qvgE/uhkYU03whBNC58cDD1T48QeBS5QU6xoUbA/gd8C5FX7FBCXFA9X0oWpvUyGfW5LOZFcDwyv4eH9gfDqTVYV8blmDwT0LeBxToKoCTVJSTK22H06IFzQBmFrFtP80cJmSYmnMwfYDfgscX+FXbAYuUFL8MYz+OCFf3AizSqw0B/UnwP3ATR2Dt2MC1kWfjDy/iplxg9llPB5Wv5waXOhQ4BGqq2/wMfAH4FYlxauWg/0icDn66Gg18eSrgdOUFKGe1XZqdNG9gFlUX+NoC/A34A7gSVsOgpsCWcOAi4GTQrDji8CpSorQz4Y5NTRCd+Bes5UKQ2+bVfdDwHP1qH7mev5X0CklziW8WhfTgO8G9VDVHXAHo0w0i44wa0PkzMh+ApirpHi3Rn3/AnAUuuDySUA2xK/fYBaV99XS/k5Ev/w+6IPetTo6+TraP74MnZHnFWClkuK/Zfbv8+j6UYcaR8xh6JOAB9eovwIYH0VoU2QP5F3P7wxMRj9BiarSSzuwCvjA/L3VtdrFvPYE9ie6qqYb0Omgfh3VKcvIIy5czz8YfQbnFJpLbegDeZGmjqxbSI3r+ScCtwL9GhzsS+jQ1tn1aLxuNRvMBR8OTCD4MZk4SJprO6JecOs6govcn88GfggcEXOwz5uZaboN2Qysi3p0Pf8Y40A4lfgUY96IduzcoaR4xqaOWRvW6nr+3sZJcg4wxNJuLjSOl2lKirU2djAWccvGkX+6cTYcE+G2pti26xnjZJkZhwcisQtMN6kCW4Ch5jUYyNSoufeMU2IBOtxmnpJiQ5zs1RAnD0xS837orHIHAb2MAyODDgzcs8j9fKNxgKwzIFehE8G9gT6fu1RJsSrutvk/GdqIAV0smzEAAAAASUVORK5CYII=",Zo={class:"q-chatbot"},Jo={class:"q-chatbot__content"},Wo={class:"q-chatbot__footer-container"};return t.defineComponent({name:"ChatBot",__name:"ChatBot",props:{apiEndpoint:{default:"http://localhost:3000"},controllerEndpoint:{},username:{},projectPath:{},userImage:{default:Ho},chatbotImage:{default:zo},dateFormat:{},agentData:{default:()=>({id:"",formId:"",jobId:""})},availableAgents:{default:()=>[]}},emits:["apply-fields"],setup(e,{emit:n}){const o=n,a=e,r=t.ref(!0),l=t.ref(null),i=t.ref(!0),s=t.ref(a.agentData.id),u=t.ref(a.agentData.formId),f=H(),{isLoading:g,clearChatData:c,getChatData:m,getFieldSuggestionData:y,sendPrompt:x}=We(a.apiEndpoint),{messages:$,addChatMessage:S,clearMessages:U,getLastMessage:M}=Ke(),F=t.computed(()=>r.value||g.value);t.onBeforeMount(()=>{var b;(b=l.value)==null||b.removeEventListener("scroll",O)}),t.onMounted(()=>{I()});function _(b){r.value=b}async function I(){try{await k()}catch(b){S(f.loginError),console.error("Error logging in: "+b)}}async function k(){_(!0);const{data:b,error:h}=await m(a.username,a.projectPath,s.value,u.value);if(h||!b||!b.success){_(!0),S(f.botIsSick),console.log("Error loading chat data: "+h);return}_(!1),N(),b.history.forEach(async E=>{const T=E.imageUrl?a.controllerEndpoint+E.imageUrl:void 0;S(E.content,E.type==="ai"?"bot":"user",T,E.sessionID)})}function N(){const b=f.initialMessage;S(b,"bot",null,void 0,!0)}function V(){U(),_(!1),i.value=!0}function R(){t.nextTick(()=>{l.value&&(l.value.scrollTop=l.value.scrollHeight)})}function O(){if(l.value){const{scrollTop:h,clientHeight:E,scrollHeight:T}=l.value;i.value=h+E>=T-20}}async function d(b,h){l.value&&l.value.scrollTo({top:l.value.scrollHeight,behavior:"smooth"}),S(b,"user",h==null?void 0:h.previewUrl),t.nextTick(()=>{i.value&&R()}),w(b,h==null?void 0:h.file)}async function p(b){l.value&&l.value.scrollTo({top:l.value.scrollHeight,behavior:"smooth"}),S("","bot"),t.nextTick(()=>{i.value&&R()});const h=M();h&&await y(b,E=>{h.message+=E,h.fields||(h.fields=[]);const T=h.fields[h.fields.length-1];T.text=h.message,i.value&&R()},E=>{var L;h.message="";const T=E;(L=h.fields)==null||L.push({type:T.type,name:T.name,text:T.text})})}async function w(b,h){S("","bot");const E=M();if(!E)return;const T=(E==null?void 0:E.sessionID)||Xe(),L=new FormData;h&&L.append("image",h),L.append("message",b),L.append("project",a.projectPath),L.append("user",a.username),L.append("sessionID",T),L.append("agentID",s.value),L.append("formId",u.value),await x(L,Z=>{E&&(E.message+=Z),i.value&&R()},Z=>{_(!0),S(f.botIsSick),console.error("Error sending message: "+Z)})}async function A(){const{data:b,error:h}=await c(a.username,a.projectPath,s.value,u.value);if(h||!b||!b.success){_(!0),S(f.loginError),console.log("Error clearing chat: "+h);return}V(),N()}function B(b){const h=["q-chatbot__messages-wrapper"];return b==="user"&&h.push("q-chatbot__messages-wrapper_right"),h}function D(b){s.value=b.key,u.value=b.formId,V(),k()}function C(b){!b||b.length===0||o("apply-fields",b)}return t.watch(()=>a.availableAgents,(b,h)=>{b.length===0&&h.length>0&&(s.value="",u.value="",V(),I())}),t.watch(()=>a.agentData,async(b,h)=>{var E;F.value||(((E=a.agentData)==null?void 0:E.id)!==(h==null?void 0:h.id)&&(s.value=(b==null?void 0:b.id)||"",u.value=(b==null?void 0:b.formId)||"",V(),await I()),(b==null?void 0:b.id)!==""&&b&&b.jobId!==h.jobId&&await p(b.jobId))}),t.watch(()=>[a.agentData.id,a.agentData.formId],([b,h])=>{s.value=b,u.value=h},{immediate:!0}),(b,h)=>(t.openBlock(),t.createElementBlock("div",Zo,[t.createElementVNode("div",Jo,[t.createVNode(t.unref(Fo),{disabled:F.value,"available-agents":a.availableAgents,"selected-agent-key":s.value,onClear:A,onChangeChat:D},null,8,["disabled","available-agents","selected-agent-key"]),t.createElementVNode("div",{ref_key:"messagesContainer",ref:l,class:"q-chatbot__messages-container",onScroll:O},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref($),E=>(t.openBlock(),t.createElementBlock("div",{key:E.id,class:t.normalizeClass(B(E.sender))},[t.createVNode(t.unref(No),t.mergeProps({ref_for:!0},E,{"date-format":a.dateFormat,"user-image":a.userImage,"chatbot-image":a.chatbotImage,loading:t.unref(g)&&!E.message,imagePreviewUrl:E.imagePreviewUrl,apiEndpoint:a.apiEndpoint,sessionID:E.sessionID,fields:E.fields,onApplyFields:C}),null,16,["date-format","user-image","chatbot-image","loading","imagePreviewUrl","apiEndpoint","sessionID","fields"])],2))),128))],544)]),t.createElementVNode("div",Wo,[t.createVNode(t.unref(Go),{disabled:F.value,loading:t.unref(g),onSendMessage:d},null,8,["disabled","loading"])])]))}})});