@farris/x-ui 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/src/runtime-attachment-download.d.ts +1 -1
- package/dynamic-component/src/composition/types.d.ts +2 -0
- package/farris.x-ui.esm.js +3461 -3365
- package/farris.x-ui.umd.cjs +74 -74
- package/index.css +1 -1
- package/package.json +1 -1
package/farris.x-ui.umd.cjs
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
(function(O,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(O=typeof globalThis<"u"?globalThis:O||self,i(O.FarrisX={},O.vue))})(this,function(O,i){"use strict";var q1=Object.defineProperty;var Wl=O=>{throw TypeError(O)};var Z1=(O,i,be)=>i in O?q1(O,i,{enumerable:!0,configurable:!0,writable:!0,value:be}):O[i]=be;var fe=(O,i,be)=>Z1(O,typeof i!="symbol"?i+"":i,be),ai=(O,i,be)=>i.has(O)||Wl("Cannot "+be);var v=(O,i,be)=>(ai(O,i,"read from private field"),be?be.call(O):i.get(O)),ie=(O,i,be)=>i.has(O)?Wl("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(O):i.set(O,be),ee=(O,i,be,at)=>(ai(O,i,"write to private field"),at?at.call(O,be):i.set(O,be),be),q=(O,i,be)=>(ai(O,i,"access private method"),be);var Ru=(O,i,be,at)=>({set _(Ir){ee(O,i,Ir,be)},get _(){return v(O,i,at)}});var _l,Tt,Sn,El,Sl,it,Je,ct,rn,dt,Dn,Tn,ft,ke,ht,we,he,ne,$e,et,Re,Se,mt,De,pt,gt,tt,nt,bt,Gt,Ue,Fn,G,si,un,It,Sr,rt,Gl,on,Nn,Dr,qt,Zt,li,Mu,Bu,me,ci,Nr,Yt,di,In;const be={content:{type:Object,required:!0},onOpen:{type:Function,default:void 0}},at=i.defineComponent({name:"AppPreviewMessage",props:be,setup(e){const t=i.ref(!1);function n(){var h;const a=(h=e.content)==null?void 0:h.appConfig;if(!a)return"";const s=a.ws??"",l=a.appPath??"",d=a.appObjectId??"";return`${a.appBuilderUri??"/apps/platform/development-platform/ide/app-builder/index.html"}?path=${l}&boId=${d}&ws=${s}&version=2.0#/home`}function u(){var s,l;const a=(s=e.content)==null?void 0:s.previewConfig;a&&e.onOpen&&e.onOpen({...a,title:a.title??((l=e.content)==null?void 0:l.appName)})}function o(a){const s=a.target;s!=null&&s.closest(".f-chat-app-preview-open-btn")||a.preventDefault()}function r(a){a.stopPropagation();const s=n();s&&window.open(s,"_blank")}return()=>{const a=e.content;if(!a)return null;const{message:s,appName:l,createdDatetime:d}=a;return i.createVNode("div",{class:"f-chat-message-app-preview"},[i.createVNode("div",{class:"f-chat-app-preview-message"},[s]),i.createVNode("div",{class:"f-chat-app-preview-card",onMouseenter:()=>t.value=!0,onMouseleave:()=>t.value=!1,onMousedown:o,onClick:u,role:"button",tabindex:0,onKeydown:f=>f.key==="Enter"&&u()},[i.createVNode("div",{class:"f-chat-app-preview-card-left"},[i.createVNode("span",{class:"f-chat-app-preview-icon"},[i.createVNode("i",{class:"fx-icon fx-icon-bubble_star"},null)])]),i.createVNode("div",{class:"f-chat-app-preview-card-middle"},[i.createVNode("div",{class:"f-chat-app-preview-app-name"},[l]),i.createVNode("div",{class:"f-chat-app-preview-datetime"},[d])]),i.createVNode("div",{class:"f-chat-app-preview-card-right"},[i.createVNode("div",{class:"f-chat-app-preview-action-area"},null),t.value&&i.createVNode("button",{type:"button",class:"f-chat-app-preview-open-btn",onClick:r,title:"在新页签中打开","aria-label":"在新页签中打开"},[i.createVNode("i",{class:"fx-icon fx-icon-folder-open"},null)])])])])}}});at.install=e=>{e.component(at.name,at)};const Ir={content:{type:Object,required:!0},outputMode:{type:String,default:"streaming"},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},header:{type:String,default:"sender"},placement:{type:String,default:"start"},showAvatar:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},attachments:{type:Array,default:()=>[]},onPreview:{type:Function,default:void 0},onUserAuthConfirm:{type:Function,default:void 0},compositeTailRender:{type:Function,default:void 0},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0},attachmentRowClickOpensPreview:{type:Boolean,default:!0},attachmentShowDownload:{type:Boolean,default:!0},role:{type:String,default:"assistant"}},zu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Xl="/api/runtime/attachment";function ql(){try{const e=zu==null?void 0:zu.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function Zl(e){var n;const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:typeof window<"u"&&((n=window.location)!=null&&n.origin)&&t.startsWith("/")?`${window.location.origin}${t}`:t}function Yl(e){return`${Xl}/${encodeURIComponent(e)}/download`}function ju(e){const t=String(e??"").trim();if(!t)return"";const n=Yl(t),u=ql();return u?`${u}${n}`:n}function fi(e){const t=e.trim().match(/\/api\/runtime\/attachment\/([^/]+)\/download(?:\?|#|$)/i);if(!(t!=null&&t[1]))return"";try{return decodeURIComponent(t[1]).trim()}catch{return t[1].trim()}}function sn(e){const t=String(e.fileId??"").trim();if(t)return ju(t);const n=String(e.url??"").trim();if(!n)return;const u=fi(n);if(u)return ju(u);if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/"))return n}async function Or(e,t){const n=String(t??"").replace(/[/\\]/g,"_").trim()||"download",u=Zl(e);try{const o=await fetch(u,{credentials:"include",mode:"cors"});if(!o.ok)throw new Error(`download_http_${o.status}`);const r=await o.blob(),a=URL.createObjectURL(r),s=document.createElement("a");s.href=a,s.download=n,s.rel="noopener noreferrer",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)}catch{const o=document.createElement("a");o.href=u,o.target="_blank",o.rel="noopener noreferrer",document.body.appendChild(o),o.click(),document.body.removeChild(o)}}function ye(e,t){return t&&(typeof t=="string"?t.split(" ").filter(Boolean).forEach(u=>{e[u]=!0}):Array.isArray(t)?t.forEach(n=>{n&&(e[n]=!0)}):typeof t=="object"&&Object.entries(t).forEach(([n,u])=>{n&&u&&(e[n]=!0)})),e}function Ae(e,t){return t&&(typeof t=="string"?t.split(";").filter(Boolean).forEach(u=>{var r,a;const o=u.split(":");if(o.length>=2&&((r=o[0])!=null&&r.trim())&&((a=o[1])!=null&&a.trim())){const s=o[0].trim(),l=o.slice(1).join(":").trim();e[s]=l}}):typeof t=="object"&&Object.entries(t).forEach(([n,u])=>{n&&u!==void 0&&u!==null&&(e[n]=u)})),e}function Mn(e){return e||null}function hi(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Lr(e){return e?typeof e!="string"?e:hi(e)?i.h("img",{src:e,alt:"icon",class:"fx-prompt--item-icon-image",onError:t=>{const n=t.target;n.style.display="none",n.parentElement.innerHTML='<i class="fx-icon fx-icon-warning"></i>'}}):e.includes("fx-icon")||e.includes("icon-")?i.h("i",{class:e}):e:null}function mi(e,t,n,u={}){const{charInterval:o=30}=u,r=i.ref({});let a=[],s=new Set;const l=()=>typeof t=="function"?t():t.value,d=()=>typeof n=="function"?n():n.value,f=()=>{a.forEach(m=>clearInterval(m)),a=[]},c=()=>{f(),r.value={},s.clear()},h=()=>{f(),r.value={},s.clear()},p=()=>{const m=e();if(!m||Object.keys(m).length===0){r.value={};return}if(!d()){r.value={...m},s=new Set(Object.keys(m));return}const w=Object.keys(m);w.forEach(g=>{r.value.hasOwnProperty(g)||(r.value[g]="")});const y=w.filter(g=>!s.has(g));if(y.length===0)return;let A=0;const b=()=>{var T;if(A>=y.length)return;const g=y[A],x=m[g];if(!x){s.add(g),A++,b();return}let k=((T=r.value[g])==null?void 0:T.length)||0;const F=setInterval(()=>{k<x.length?(r.value={...r.value,[g]:x.slice(0,k+1)},k++):(clearInterval(F),a=a.filter(D=>D!==F),s.add(g),A++,b())},o);a.push(F)};b()};return i.watch(()=>e(),()=>{l()&&p()},{immediate:!0}),i.watch(n,()=>{h(),l()&&p()}),i.watch(t,m=>{m?p():c()}),i.onMounted(()=>{l()&&p()}),{displayContent:r}}function Pr(){const e=i.reactive({}),t=[],n=i.ref(null);let u=null;const o=30,r=m=>{const w=e[m];return!w||w.displayedLength>=w.rawValue.length},a=i.computed(()=>Object.keys(e).length===0?!1:Object.keys(e).every(m=>r(m))),s=()=>{for(const m of t)if(!r(m))return m;return null},l=()=>{if(!n.value&&(n.value=s(),!n.value)){d();return}const m=e[n.value];m&&(m.displayedLength<m.rawValue.length?(m.displayedLength++,m.displayedValue=m.rawValue.slice(0,m.displayedLength),m.isStreaming=!0):(m.isStreaming=!1,m.displayedValue=m.rawValue,n.value=s(),n.value||d()))},d=()=>{u&&(clearInterval(u),u=null)},f=()=>{u||(u=setInterval(l,o))},c=()=>{d(),Object.keys(e).forEach(m=>{delete e[m]}),t.length=0,n.value=null},h=(m,w)=>{if(e[m]){p(m,w);return}t.push(m),e[m]={rawValue:w??"",displayedLength:0,isStreaming:!1,displayedValue:""},u||(!n.value||n.value===m)&&f()},p=(m,w)=>{const y=e[m];if(!y){h(m,w);return}y.rawValue=w??"",!u&&!r(m)&&(!n.value||n.value===m)&&f()};return i.onUnmounted(()=>{d()}),{propertyStates:e,currentProperty:n,get isAnyStreaming(){return Object.values(e).some(m=>m.isStreaming)},isAllDone:a,startStreaming:f,reset:c,registerProperty:h,updatePropertyValue:p}}function Hu(){const e=i.ref(null),t=i.ref(0),n=i.ref(!1);let u=null;const o=()=>{e.value=Date.now(),n.value=!0,u=setInterval(()=>{e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))},1e3)},r=()=>{u&&(clearInterval(u),u=null),e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))};return{elapsedSeconds:t,hasEverStarted:n,start:o,stop:r,reset:()=>{r(),e.value=null,t.value=0,n.value=!1}}}function Kl(e){return e.scrollWidth>e.clientWidth}function pi(){Kl(this)?this.title=this.textContent??"":this.removeAttribute("title")}function gi(){this.removeAttribute("title")}const bi={mounted(e){e.addEventListener("mouseenter",pi),e.addEventListener("mouseleave",gi)},updated(e){e.removeAttribute("title")},unmounted(e){e.removeEventListener("mouseenter",pi),e.removeEventListener("mouseleave",gi)}};function Ql(e,t){const n=i.computed(()=>{var o;return Ae({},(o=e.styles)==null?void 0:o.header)});function u(){return t.slots.header&&i.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:n.value},[t.slots.header()])}return{renderHeader:u}}function Jl(e,t){var r;const n=i.ref(((r=e.content)==null?void 0:r.sender)??"发送人"),u=i.computed(()=>{var a;return Ae({},(a=e.styles)==null?void 0:a.header)});function o(){return i.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:u.value},[n.value])}return{renderHeader:o}}const ec={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},tc={role:{type:String,default:"assistant"},attachments:{type:Array,default:()=>[]},enableBatchPreview:{type:Boolean,default:!1},enableFixedWidth:{type:Boolean,default:!1},showDownloadButton:{type:Boolean,default:!0},onPreview:{type:Function,default:void 0},onBatchPreview:{type:Function,default:void 0}};function nc(){return{getFileIcon:u=>({pdf:"file-type-pdf",doc:"file-type-doc",docx:"file-type-doc",xls:"file-type-xls",xlsx:"file-type-xls",ppt:"file-type-ppt",pptx:"file-type-ppt",txt:"file-type-txt",zip:"file-type-zip",rar:"file-type-zip",image:"file-type-img",img:"file-type-img",md:"file-type-md",video:"file-type-any",audio:"file-type-any"})[u.toLowerCase()]||"file-type-any",formatFileName:u=>(u==null?void 0:u.replace(/\.[^.]+$/,""))??"",formatFileSize:u=>u<1024?u+" B":u<1048576?(u/1024).toFixed(1)+" KB":(u/1048576).toFixed(1)+" MB"}}const yi=i.defineComponent({name:"FXBubbleAttachment",props:tc,emits:["preview","batchPreview"],setup(e,t){const n=i.computed(()=>e.attachments??[]),u=i.computed(()=>{var y;return((y=n.value)==null?void 0:y.length)>0}),{formatFileName:o,formatFileSize:r}=nc(),a=i.computed(()=>({"f-chat-bubble-attachment-info":!0,"f-utils-fill":e.enableFixedWidth})),s=i.computed(()=>({"f-chat-bubble-attachment-name":!0,"name-tip":e.enableFixedWidth}));function l(y,A){t.emit("preview",A)}async function d(y,A){y.stopPropagation(),y.preventDefault();const b=sn(A);b&&await Or(b,A.name)}function f(y){t.emit("batchPreview",n.value)}function c(y){switch(y.toLowerCase()){case"doc":case"docx":return"Word";case"xlsx":case"xls":return"Excel";case"ppt":case"pptx":return"PPT";case"txt":return"txt";case"png":case"jpg":case"jpeg":return"Image";case"pdf":return"PDF";case"md":return"Markdown";default:return""}}function h(y){return y?{pdf:"file-type-pdf",doc:"file-type-doc",docx:"file-type-doc",xls:"file-type-xls",xlsx:"file-type-xls",ppt:"file-type-ppt",pptx:"file-type-ppt",txt:"file-type-txt",md:"file-type-md",jpg:"file-type-img",jpeg:"file-type-img",png:"file-type-img",gif:"file-type-img",webp:"file-type-img",html:"file-type-html"}[y.toLowerCase()]||"file-type-any":""}function p(y){if(!y)return null;const A=c(y.type);return i.createVNode("div",{class:"file-info f-utils-fill"},[i.createVNode("span",{class:"file-name",title:y.name},[y.name]),i.createVNode("div",{class:"file-info-footer"},[i.createVNode("span",{class:`file-icon ${h(y.type)}`},null),A&&i.createVNode(i.Fragment,null,[i.createVNode("span",{class:"file-type"},[c(y.type)])]),y.size&&i.createVNode(i.Fragment,null,[i.createVNode("div",{class:"file-info-divider"},null),i.createTextVNode(" "),i.createVNode("span",{class:"file-size"},[r(y.size)])])])])}function m(y,A){const b=sn(y);return i.createVNode("div",{class:"f-chat-bubble-attachment-item",key:A},[i.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation",onClick:g=>l(g,y)},[i.createVNode("div",{class:a.value},[i.createVNode("span",{class:s.value,title:y.name},[o(y.name)]),y.size?i.createVNode("span",{class:"f-chat-bubble-attachment-size"},[r(y.size)]):null])]),e.showDownloadButton!==!1&&b?i.createVNode("button",{type:"button",class:"f-chat-bubble-attachment-download-btn","aria-label":"下载附件",title:"下载",onClick:g=>d(g,y)},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_download","aria-hidden":"true"},null)]):null])}function w(y,A){return i.createVNode("div",{class:"f-chat-bubble-attachment-toast",key:A},[p(y)])}return()=>u.value?i.createVNode("div",{class:{"f-chat-bubble-attachments":!0,"attachments-toast":e.role==="user"}},[n.value.map((y,A)=>e.role==="user"?w(y,A):m(y,A)),e.enableBatchPreview&&i.createVNode("div",{class:"f-chat-bubble-attachment-preview-btn",onClick:f},[i.createVNode("span",{class:"f-chat-bubble-attachment-preview-btn-text"},[i.createTextVNode("查看全部文件")]),i.createVNode("i",{class:"fx-icon fx-icon-sort-asc-sm",style:{transform:"rotate(90deg)"}},null)])]):null}}),rc=i.defineComponent({name:"FXBubbleFileContentFooter",props:ec,setup(e,t){const n=i.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return Ae({},e.customStyle),()=>i.createVNode(yi,{attachments:n.value,onPreview:u=>{var o;return(o=e.onPreviewFile)==null?void 0:o.call(e,u)},onBatchPreview:u=>{var o;return(o=e.onBatchPreviewFile)==null?void 0:o.call(e,u)}},null)}}),uc={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},oc=i.defineComponent({name:"FXBubblePageContentFooter",props:uc,setup(e,t){const n=i.ref(),u=i.computed(()=>{var a,s;const r={width:"100%",height:"100%",border:"none"};return(a=e.customStyle)!=null&&a.width&&(r.width=e.customStyle.width),(s=e.customStyle)!=null&&s.height&&(r.height=`${e.customStyle.height}px`),r}),o=r=>{var a,s;((a=r.data)==null?void 0:a.type)==="navigation"&&((s=r.data)!=null&&s.url)&&e.onNavigate&&e.onNavigate(r.data.url)};return i.onMounted(()=>{window.addEventListener("message",o)}),i.onUnmounted(()=>{window.removeEventListener("message",o)}),()=>i.createVNode("iframe",{ref:n,src:e.pageUrl,style:u.value,scrolling:"auto"},null)}});function xi(){function e(o,r){const{fileContent:a,height:s,width:l}=o;return{file:a,customStyle:{width:l||"100%",height:s||"100%"},onPreviewFile:r==null?void 0:r.onPreviewFile,onBatchPreviewFile:r==null?void 0:r.onBatchPreviewFile}}function t(o,r){const{pageUrl:a,height:s,width:l}=o;return{pageUrl:a,customStyle:{width:l||"100%",height:s||"100%"},onNavigate:r==null?void 0:r.onNavigate}}function n(o,r){const a=e(o,r);return i.h(rc,a)}function u(o,r){const a=t(o,r);return i.h(oc,a)}return{renderFileEmbeddedContent:n,renderPageEmbeddedContent:u}}const ic={title:{type:String,default:""},subtitle:{type:String,default:""},text:{type:String,default:""},textFormat:{type:String,default:"plain"},placement:{type:String,default:"start"},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0}};function ac(e){return e.replace(/```\s*\n+\s*assistant-widget/g,"``` assistant-widget")}const wi=/^```\s*assistant-widget[\s\S]*?```$/,sc=/^```\s*assistant-widget/,lc=/^```\s*([a-zA-Z0-9-]*)$/;function cc(e){const t=e.match(lc);if(!t)return!1;const n=(t[1]??"").toLowerCase();return n===""||"assistant-widget".startsWith(n)}function dc(e){return e?wi.test(e):!1}function fc(e){return e?wi.test(e)||sc.test(e)||cc(e):!1}function hc(e){if(!e)return[];const t=/(```[\s]*assistant-widget[\s\S]*?```)/g,n=[];let u=0,o;for(;(o=t.exec(e))!==null;){if(o.index>u){const r=e.slice(u,o.index),a=/(```[\s]*assistant-widget)/,s=r.match(a);if(s){const l=r.indexOf(s[0]);l>0&&n.push(r.slice(0,l)),n.push(r.slice(l));const d=r.slice(l+s[0].length);d.trim().length>0&&n.push(d)}else n.push(r)}n.push(ac(o[0])),u=o.index+o[0].length}if(u<e.length){const r=e.slice(u),a=/(```[\s]*assistant-widget)/,s=r.match(a);if(s){const l=r.indexOf(s[0]);l>0&&n.push(r.slice(0,l)),n.push(r.slice(l))}else n.push(r)}return n.filter(r=>r.trim().length>0)}function vi(e){const t=e.replace("``` assistant-widget","").replace("```","").trim();try{return JSON.parse(t)}catch(n){return console.error("Failed to parse JSON:",n),null}}function mc(e){var n;const t=vi(e);return((n=t==null?void 0:t.renderer)==null?void 0:n.widgetImplOptions)||{}}const pc=/^```\s*dynamic-component[\s\S]*?```$/,gc=/^```\s*dynamic-component/;function bc(e){return e.replace(/```\s*\n*\s*dynamic-component/g,"``` dynamic-component")}function yc(e){return e?pc.test(e)||gc.test(e):!1}function xc(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object"||Array.isArray(n))return null;const u=n;return typeof u.instanceId!="string"?null:{...u,instanceId:u.instanceId,name:typeof u.name=="string"?u.name:void 0,componentId:typeof u.componentId=="string"?u.componentId:void 0,jsUrl:typeof u.jsUrl=="string"?u.jsUrl:"",url:typeof u.url=="string"?u.url:"",title:typeof u.title=="string"?u.title:"预览",position:u.position==="inline"?"inline":"right",width:typeof u.width=="string"?u.width:void 0,isFullscreen:typeof u.isFullscreen=="boolean"?u.isFullscreen:!1,autoOpen:typeof u.autoOpen=="boolean"?u.autoOpen:!1,fileRe:typeof u.fileRe=="string"?u.fileRe:void 0,target:u.target==="preview"||u.target==="previewExtra"?u.target:void 0}}function wc(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;const n=t.match(/"position"\s*:\s*"(inline|right)"/);return n?{position:n[1]}:null}function vc(e){if(!e)return[];const t="``` dynamic-component",n="```",u=[];let o=0;for(;o<e.length;){const r=e.indexOf(t,o);if(r===-1){const p=e.slice(o);p&&u.push(p);break}let a=r+t.length;const s=e.lastIndexOf("```",r),l=s>=0&&s<r+3?s:r,d=e.slice(o,l);d&&u.push(d);const f=e.indexOf(n,a);if(f===-1){u.push(e.slice(l));break}const c=f+n.length,h=e.slice(l,c);u.push(bc(h)),o=c}return u.filter(r=>r.length>0)}var Le=(e=>(e.Text="text",e.FlowUIComplete="flowui-complete",e.AssistantWidgetComplete="assistant-widget-complete",e.AssistantWidgetPending="assistant-widget-pending",e.DynamicComponentComplete="dynamic-component-complete",e.DynamicComponentPending="dynamic-component-pending",e))(Le||{});function Ac(e){var o;if(!e)return[];const t=[],n=new Set,u=hc(e);for(const r of u)if(fc(r))if(dc(r)){const a=vi(r);t.push({type:Le.AssistantWidgetComplete,raw:r,widgetData:a,widgetUrl:(o=a==null?void 0:a.renderer)==null?void 0:o.url,widgetImplOptions:mc(r)})}else t.push({type:Le.AssistantWidgetPending,raw:r});else{const a=vc(r);for(const s of a)if(yc(s))if(s.endsWith("```")){const l=xc(s);if(l!=null&&l.instanceId){if(n.has(l.instanceId))continue;n.add(l.instanceId),t.push({type:Le.DynamicComponentComplete,raw:s,config:l})}}else{const l=wc(s);t.push({type:Le.DynamicComponentPending,raw:s,position:(l==null?void 0:l.position)??null})}else s.trim()&&t.push({type:Le.Text,raw:s})}return t}const Ai={};function kc(e){let t=Ai[e];if(t)return t;t=Ai[e]=[];for(let n=0;n<128;n++){const u=String.fromCharCode(n);t.push(u)}for(let n=0;n<e.length;n++){const u=e.charCodeAt(n);t[u]="%"+("0"+u.toString(16).toUpperCase()).slice(-2)}return t}function ln(e,t){typeof t!="string"&&(t=ln.defaultChars);const n=kc(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(u){let o="";for(let r=0,a=u.length;r<a;r+=3){const s=parseInt(u.slice(r+1,r+3),16);if(s<128){o+=n[s];continue}if((s&224)===192&&r+3<a){const l=parseInt(u.slice(r+4,r+6),16);if((l&192)===128){const d=s<<6&1984|l&63;d<128?o+="��":o+=String.fromCharCode(d),r+=3;continue}}if((s&240)===224&&r+6<a){const l=parseInt(u.slice(r+4,r+6),16),d=parseInt(u.slice(r+7,r+9),16);if((l&192)===128&&(d&192)===128){const f=s<<12&61440|l<<6&4032|d&63;f<2048||f>=55296&&f<=57343?o+="���":o+=String.fromCharCode(f),r+=6;continue}}if((s&248)===240&&r+9<a){const l=parseInt(u.slice(r+4,r+6),16),d=parseInt(u.slice(r+7,r+9),16),f=parseInt(u.slice(r+10,r+12),16);if((l&192)===128&&(d&192)===128&&(f&192)===128){let c=s<<18&1835008|l<<12&258048|d<<6&4032|f&63;c<65536||c>1114111?o+="����":(c-=65536,o+=String.fromCharCode(55296+(c>>10),56320+(c&1023))),r+=9;continue}}o+="�"}return o})}ln.defaultChars=";/?:@&=+$,#",ln.componentChars="";const ki={};function Cc(e){let t=ki[e];if(t)return t;t=ki[e]=[];for(let n=0;n<128;n++){const u=String.fromCharCode(n);/^[0-9a-z]$/i.test(u)?t.push(u):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Bn(e,t,n){typeof t!="string"&&(n=t,t=Bn.defaultChars),typeof n>"u"&&(n=!0);const u=Cc(t);let o="";for(let r=0,a=e.length;r<a;r++){const s=e.charCodeAt(r);if(n&&s===37&&r+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){o+=e.slice(r,r+3),r+=2;continue}if(s<128){o+=u[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&r+1<a){const l=e.charCodeAt(r+1);if(l>=56320&&l<=57343){o+=encodeURIComponent(e[r]+e[r+1]),r++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[r])}return o}Bn.defaultChars=";/?:@&=+$,-_.!~*'()#",Bn.componentChars="-_.!~*'()";function $u(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Vr(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const _c=/^([a-z0-9.+-]+:)/i,Ec=/:[0-9]*$/,Sc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Dc=["<",">",'"',"`"," ","\r",`
|
|
2
|
-
`," "],Tc=["{","}","|","\\","^","`"].concat(Dc),Fc=["'"].concat(Tc),Ci=["%","/","?",";","#"].concat(Fc),_i=["/","?","#"],Nc=255,Ei=/^[+a-z0-9A-Z_-]{0,63}$/,Ic=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Si={javascript:!0,"javascript:":!0},Di={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Uu(e,t){if(e&&e instanceof Vr)return e;const n=new Vr;return n.parse(e,t),n}Vr.prototype.parse=function(e,t){let n,u,o,r=e;if(r=r.trim(),!t&&e.split("#").length===1){const d=Sc.exec(r);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let a=_c.exec(r);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,r=r.substr(a.length)),(t||a||r.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=r.substr(0,2)==="//",o&&!(a&&Si[a])&&(r=r.substr(2),this.slashes=!0)),!Si[a]&&(o||a&&!Di[a])){let d=-1;for(let m=0;m<_i.length;m++)u=r.indexOf(_i[m]),u!==-1&&(d===-1||u<d)&&(d=u);let f,c;d===-1?c=r.lastIndexOf("@"):c=r.lastIndexOf("@",d),c!==-1&&(f=r.slice(0,c),r=r.slice(c+1),this.auth=f),d=-1;for(let m=0;m<Ci.length;m++)u=r.indexOf(Ci[m]),u!==-1&&(d===-1||u<d)&&(d=u);d===-1&&(d=r.length),r[d-1]===":"&&d--;const h=r.slice(0,d);r=r.slice(d),this.parseHost(h),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const m=this.hostname.split(/\./);for(let w=0,y=m.length;w<y;w++){const A=m[w];if(A&&!A.match(Ei)){let b="";for(let g=0,x=A.length;g<x;g++)A.charCodeAt(g)>127?b+="x":b+=A[g];if(!b.match(Ei)){const g=m.slice(0,w),x=m.slice(w+1),k=A.match(Ic);k&&(g.push(k[1]),x.unshift(k[2])),x.length&&(r=x.join(".")+r),this.hostname=g.join(".");break}}}}this.hostname.length>Nc&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=r.indexOf("#");s!==-1&&(this.hash=r.substr(s),r=r.slice(0,s));const l=r.indexOf("?");return l!==-1&&(this.search=r.substr(l),r=r.slice(0,l)),r&&(this.pathname=r),Di[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Vr.prototype.parseHost=function(e){let t=Ec.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Oc=Object.freeze(Object.defineProperty({__proto__:null,decode:ln,encode:Bn,format:$u,parse:Uu},Symbol.toStringTag,{value:"Module"})),Ti=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Fi=/[\0-\x1F\x7F-\x9F]/,Lc=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Wu=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\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-\u2E4F\u2E52-\u2E5D\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[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Ni=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Ii=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Pc=Object.freeze(Object.defineProperty({__proto__:null,Any:Ti,Cc:Fi,Cf:Lc,P:Wu,S:Ni,Z:Ii},Symbol.toStringTag,{value:"Module"})),Vc=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Rc=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Gu;const Mc=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Bc=(Gu=String.fromCodePoint)!==null&&Gu!==void 0?Gu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function zc(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Mc.get(e))!==null&&t!==void 0?t:e}var _e;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(_e||(_e={}));const jc=32;var Rt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Rt||(Rt={}));function Xu(e){return e>=_e.ZERO&&e<=_e.NINE}function Hc(e){return e>=_e.UPPER_A&&e<=_e.UPPER_F||e>=_e.LOWER_A&&e<=_e.LOWER_F}function $c(e){return e>=_e.UPPER_A&&e<=_e.UPPER_Z||e>=_e.LOWER_A&&e<=_e.LOWER_Z||Xu(e)}function Uc(e){return e===_e.EQUALS||$c(e)}var Ee;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ee||(Ee={}));var Mt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Mt||(Mt={}));class Wc{constructor(t,n,u){this.decodeTree=t,this.emitCodePoint=n,this.errors=u,this.state=Ee.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Mt.Strict}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===_e.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|jc)===_e.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,u,o){if(n!==u){const r=u-n;this.result=this.result*Math.pow(o,r)+parseInt(t.substr(n,r),o),this.consumed+=r}}stateNumericHex(t,n){const u=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Xu(o)||Hc(o))n+=1;else return this.addToNumericResult(t,u,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,u,n,16),-1}stateNumericDecimal(t,n){const u=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Xu(o))n+=1;else return this.addToNumericResult(t,u,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,u,n,10),-1}emitNumericEntity(t,n){var u;if(this.consumed<=n)return(u=this.errors)===null||u===void 0||u.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===_e.SEMI)this.consumed+=1;else if(this.decodeMode===Mt.Strict)return 0;return this.emitCodePoint(zc(this.result),this.consumed),this.errors&&(t!==_e.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:u}=this;let o=u[this.treeIndex],r=(o&Rt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Gc(u,o,this.treeIndex+Math.max(1,r),a),this.treeIndex<0)return this.result===0||this.decodeMode===Mt.Attribute&&(r===0||Uc(a))?0:this.emitNotTerminatedNamedEntity();if(o=u[this.treeIndex],r=(o&Rt.VALUE_LENGTH)>>14,r!==0){if(a===_e.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Mt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:u}=this,o=(u[n]&Rt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,u){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Rt.VALUE_LENGTH:o[t+1],u),n===3&&this.emitCodePoint(o[t+2],u),u}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==Mt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function Oi(e){let t="";const n=new Wc(e,u=>t+=Bc(u));return function(o,r){let a=0,s=0;for(;(s=o.indexOf("&",s))>=0;){t+=o.slice(a,s),n.startEntity(r);const d=n.write(o,s+1);if(d<0){a=s+n.end();break}a=s+d,s=d===0?a+1:a}const l=t+o.slice(a);return t="",l}}function Gc(e,t,n,u){const o=(t&Rt.BRANCH_LENGTH)>>7,r=t&Rt.JUMP_TABLE;if(o===0)return r!==0&&u===r?n:-1;if(r){const l=u-r;return l<0||l>=o?-1:e[n+l]-1}let a=n,s=a+o-1;for(;a<=s;){const l=a+s>>>1,d=e[l];if(d<u)a=l+1;else if(d>u)s=l-1;else return e[l+o]}return-1}const Xc=Oi(Vc);Oi(Rc);function Li(e,t=Mt.Legacy){return Xc(e,t)}function qc(e){return Object.prototype.toString.call(e)}function qu(e){return qc(e)==="[object String]"}const Zc=Object.prototype.hasOwnProperty;function Yc(e,t){return Zc.call(e,t)}function Rr(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(u){e[u]=n[u]})}}),e}function Pi(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Zu(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Mr(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Vi=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Kc=/&([a-z#][a-z0-9]{1,31});/gi,Qc=new RegExp(Vi.source+"|"+Kc.source,"gi"),Jc=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function ed(e,t){if(t.charCodeAt(0)===35&&Jc.test(t)){const u=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Zu(u)?Mr(u):e}const n=Li(e);return n!==e?n:e}function td(e){return e.indexOf("\\")<0?e:e.replace(Vi,"$1")}function cn(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Qc,function(t,n,u){return n||ed(t,u)})}const nd=/[&<>"]/,rd=/[&<>"]/g,ud={"&":"&","<":"<",">":">",'"':"""};function od(e){return ud[e]}function Bt(e){return nd.test(e)?e.replace(rd,od):e}const id=/[.?*+^$[\]\\(){}|-]/g;function ad(e){return e.replace(id,"\\$&")}function ce(e){switch(e){case 9:case 32:return!0}return!1}function zn(e){if(e>=8192&&e<=8202)return!0;switch(e){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}function jn(e){return Wu.test(e)||Ni.test(e)}function Hn(e){switch(e){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 Br(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const sd=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Pi,assign:Rr,escapeHtml:Bt,escapeRE:ad,fromCodePoint:Mr,has:Yc,isMdAsciiPunct:Hn,isPunctChar:jn,isSpace:ce,isString:qu,isValidEntityCode:Zu,isWhiteSpace:zn,lib:{mdurl:Oc,ucmicro:Pc},normalizeReference:Br,unescapeAll:cn,unescapeMd:td},Symbol.toStringTag,{value:"Module"}));function ld(e,t,n){let u,o,r,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,u=1;e.pos<s;){if(r=e.src.charCodeAt(e.pos),r===93&&(u--,u===0)){o=!0;break}if(a=e.pos,e.md.inline.skipToken(e),r===91){if(a===e.pos-1)u++;else if(n)return e.pos=l,-1}}let d=-1;return o&&(d=e.pos),e.pos=l,d}function cd(e,t,n){let u,o=t;const r={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(u=e.charCodeAt(o),u===10||u===60)return r;if(u===62)return r.pos=o+1,r.str=cn(e.slice(t+1,o)),r.ok=!0,r;if(u===92&&o+1<n){o+=2;continue}o++}return r}let a=0;for(;o<n&&(u=e.charCodeAt(o),!(u===32||u<32||u===127));){if(u===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(u===40&&(a++,a>32))return r;if(u===41){if(a===0)break;a--}o++}return t===o||a!==0||(r.str=cn(e.slice(t,o)),r.pos=o,r.ok=!0),r}function dd(e,t,n,u){let o,r=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(u)a.str=u.str,a.marker=u.marker;else{if(r>=n)return a;let s=e.charCodeAt(r);if(s!==34&&s!==39&&s!==40)return a;t++,r++,s===40&&(s=41),a.marker=s}for(;r<n;){if(o=e.charCodeAt(r),o===a.marker)return a.pos=r+1,a.str+=cn(e.slice(t,r)),a.ok=!0,a;if(o===40&&a.marker===41)return a;o===92&&r+1<n&&r++,r++}return a.can_continue=!0,a.str+=cn(e.slice(t,r)),a}const fd=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:cd,parseLinkLabel:ld,parseLinkTitle:dd},Symbol.toStringTag,{value:"Module"})),xt={};xt.code_inline=function(e,t,n,u,o){const r=e[t];return"<code"+o.renderAttrs(r)+">"+Bt(r.content)+"</code>"},xt.code_block=function(e,t,n,u,o){const r=e[t];return"<pre"+o.renderAttrs(r)+"><code>"+Bt(e[t].content)+`</code></pre>
|
|
3
|
-
`},xt.fence=function(e,t,n,
|
|
4
|
-
`;if(a){const f=
|
|
5
|
-
`}return`<pre><code${o.renderAttrs(
|
|
6
|
-
`},xt.image=function(e,t,n,
|
|
1
|
+
(function(P,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(P=typeof globalThis<"u"?globalThis:P||self,i(P.FarrisX={},P.vue))})(this,function(P,i){"use strict";var e2=Object.defineProperty;var ql=P=>{throw TypeError(P)};var t2=(P,i,be)=>i in P?e2(P,i,{enumerable:!0,configurable:!0,writable:!0,value:be}):P[i]=be;var fe=(P,i,be)=>t2(P,typeof i!="symbol"?i+"":i,be),si=(P,i,be)=>i.has(P)||ql("Cannot "+be);var v=(P,i,be)=>(si(P,i,"read from private field"),be?be.call(P):i.get(P)),ie=(P,i,be)=>i.has(P)?ql("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(P):i.set(P,be),ne=(P,i,be,at)=>(si(P,i,"write to private field"),at?at.call(P,be):i.set(P,be),be),Q=(P,i,be)=>(si(P,i,"access private method"),be);var Mu=(P,i,be,at)=>({set _(Ir){ne(P,i,Ir,be)},get _(){return v(P,i,at)}});var Dl,Dt,Dn,Fl,Tl,it,Je,ct,rn,dt,Fn,Tn,ft,ke,ht,we,he,re,$e,et,Re,Se,pt,De,mt,gt,tt,nt,bt,Gt,Ue,Nn,q,li,un,It,Sr,rt,Zl,on,In,Dr,qt,Zt,ci,Bu,zu,pe,di,Nr,Yt,fi,On;const be={content:{type:Object,required:!0},onOpen:{type:Function,default:void 0}},at=i.defineComponent({name:"AppPreviewMessage",props:be,setup(e){const t=i.ref(!1);function n(){var h;const a=(h=e.content)==null?void 0:h.appConfig;if(!a)return"";const s=a.ws??"",l=a.appPath??"",d=a.appObjectId??"";return`${a.appBuilderUri??"/apps/platform/development-platform/ide/app-builder/index.html"}?path=${l}&boId=${d}&ws=${s}&version=2.0#/home`}function r(){var s,l;const a=(s=e.content)==null?void 0:s.previewConfig;a&&e.onOpen&&e.onOpen({...a,title:a.title??((l=e.content)==null?void 0:l.appName)})}function o(a){const s=a.target;s!=null&&s.closest(".f-chat-app-preview-open-btn")||a.preventDefault()}function u(a){a.stopPropagation();const s=n();s&&window.open(s,"_blank")}return()=>{const a=e.content;if(!a)return null;const{message:s,appName:l,createdDatetime:d}=a;return i.createVNode("div",{class:"f-chat-message-app-preview"},[i.createVNode("div",{class:"f-chat-app-preview-message"},[s]),i.createVNode("div",{class:"f-chat-app-preview-card",onMouseenter:()=>t.value=!0,onMouseleave:()=>t.value=!1,onMousedown:o,onClick:r,role:"button",tabindex:0,onKeydown:f=>f.key==="Enter"&&r()},[i.createVNode("div",{class:"f-chat-app-preview-card-left"},[i.createVNode("span",{class:"f-chat-app-preview-icon"},[i.createVNode("i",{class:"fx-icon fx-icon-bubble_star"},null)])]),i.createVNode("div",{class:"f-chat-app-preview-card-middle"},[i.createVNode("div",{class:"f-chat-app-preview-app-name"},[l]),i.createVNode("div",{class:"f-chat-app-preview-datetime"},[d])]),i.createVNode("div",{class:"f-chat-app-preview-card-right"},[i.createVNode("div",{class:"f-chat-app-preview-action-area"},null),t.value&&i.createVNode("button",{type:"button",class:"f-chat-app-preview-open-btn",onClick:u,title:"在新页签中打开","aria-label":"在新页签中打开"},[i.createVNode("i",{class:"fx-icon fx-icon-folder-open"},null)])])])])}}});at.install=e=>{e.component(at.name,at)};const Ir={content:{type:Object,required:!0},outputMode:{type:String,default:"streaming"},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},header:{type:String,default:"sender"},placement:{type:String,default:"start"},showAvatar:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},attachments:{type:Array,default:()=>[]},onPreview:{type:Function,default:void 0},onUserAuthConfirm:{type:Function,default:void 0},compositeTailRender:{type:Function,default:void 0},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0},attachmentRowClickOpensPreview:{type:Boolean,default:!0},attachmentShowDownload:{type:Boolean,default:!0},role:{type:String,default:"assistant"}},ju={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Yl="/api/runtime/attachment";function Kl(){try{const e=ju==null?void 0:ju.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function Ql(e){var n;const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:typeof window<"u"&&((n=window.location)!=null&&n.origin)&&t.startsWith("/")?`${window.location.origin}${t}`:t}function Jl(e){return`${Yl}/${encodeURIComponent(e)}/download`}function Hu(e){const t=String(e??"").trim();if(!t)return"";const n=Jl(t),r=Kl();return r?`${r}${n}`:n}function hi(e){const t=e.trim().match(/\/api\/runtime\/attachment\/([^/]+)\/download(?:\?|#|$)/i);if(!(t!=null&&t[1]))return"";try{return decodeURIComponent(t[1]).trim()}catch{return t[1].trim()}}function pi(e){return String(e??"").replace(/[/\\]/g,"_").trim()||"download"}function ec(e){if(!e)return null;const t=/filename\*=UTF-8''([^;]+)|filename="([^"]+)"|filename=([^;]+)/i.exec(e),n=(t==null?void 0:t[1])??(t==null?void 0:t[2])??(t==null?void 0:t[3]);if(!n)return null;try{return decodeURIComponent(n.trim())}catch{return n.trim()}}function mi(e){const t=Ql(e);if(typeof window>"u")return t;try{const n=new URL(t);if(n.origin!==window.location.origin&&n.pathname.startsWith("/api/"))return`${n.pathname}${n.search}${n.hash}`}catch{}return t}function tc(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=pi(t),r.rel="noopener noreferrer",r.style.display="none",document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}function nc(e){const t=document.createElement("a");t.href=mi(e),t.rel="noopener noreferrer",t.style.display="none",document.body.appendChild(t),t.click(),t.remove()}function sn(e){const t=String(e.fileId??"").trim();if(t)return Hu(t);const n=String(e.url??"").trim();if(!n)return;const r=hi(n);if(r)return Hu(r);if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/"))return n}async function Or(e,t){const n=pi(t),r=mi(e);try{const o=await fetch(r,{credentials:"include",mode:"cors"});if(!o.ok)throw new Error(`download_http_${o.status}`);const u=await o.blob(),a=ec(o.headers.get("Content-Disposition"))??n;tc(u,a)}catch{nc(e)}}function ye(e,t){return t&&(typeof t=="string"?t.split(" ").filter(Boolean).forEach(r=>{e[r]=!0}):Array.isArray(t)?t.forEach(n=>{n&&(e[n]=!0)}):typeof t=="object"&&Object.entries(t).forEach(([n,r])=>{n&&r&&(e[n]=!0)})),e}function Ae(e,t){return t&&(typeof t=="string"?t.split(";").filter(Boolean).forEach(r=>{var u,a;const o=r.split(":");if(o.length>=2&&((u=o[0])!=null&&u.trim())&&((a=o[1])!=null&&a.trim())){const s=o[0].trim(),l=o.slice(1).join(":").trim();e[s]=l}}):typeof t=="object"&&Object.entries(t).forEach(([n,r])=>{n&&r!==void 0&&r!==null&&(e[n]=r)})),e}function Bn(e){return e||null}function gi(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Lr(e){return e?typeof e!="string"?e:gi(e)?i.h("img",{src:e,alt:"icon",class:"fx-prompt--item-icon-image",onError:t=>{const n=t.target;n.style.display="none",n.parentElement.innerHTML='<i class="fx-icon fx-icon-warning"></i>'}}):e.includes("fx-icon")||e.includes("icon-")?i.h("i",{class:e}):e:null}function bi(e,t,n,r={}){const{charInterval:o=30}=r,u=i.ref({});let a=[],s=new Set;const l=()=>typeof t=="function"?t():t.value,d=()=>typeof n=="function"?n():n.value,f=()=>{a.forEach(p=>clearInterval(p)),a=[]},c=()=>{f(),u.value={},s.clear()},h=()=>{f(),u.value={},s.clear()},m=()=>{const p=e();if(!p||Object.keys(p).length===0){u.value={};return}if(!d()){u.value={...p},s=new Set(Object.keys(p));return}const w=Object.keys(p);w.forEach(g=>{u.value.hasOwnProperty(g)||(u.value[g]="")});const y=w.filter(g=>!s.has(g));if(y.length===0)return;let A=0;const b=()=>{var D;if(A>=y.length)return;const g=y[A],x=p[g];if(!x){s.add(g),A++,b();return}let k=((D=u.value[g])==null?void 0:D.length)||0;const T=setInterval(()=>{k<x.length?(u.value={...u.value,[g]:x.slice(0,k+1)},k++):(clearInterval(T),a=a.filter(S=>S!==T),s.add(g),A++,b())},o);a.push(T)};b()};return i.watch(()=>e(),()=>{l()&&m()},{immediate:!0}),i.watch(n,()=>{h(),l()&&m()}),i.watch(t,p=>{p?m():c()}),i.onMounted(()=>{l()&&m()}),{displayContent:u}}function Vr(){const e=i.reactive({}),t=[],n=i.ref(null);let r=null;const o=30,u=p=>{const w=e[p];return!w||w.displayedLength>=w.rawValue.length},a=i.computed(()=>Object.keys(e).length===0?!1:Object.keys(e).every(p=>u(p))),s=()=>{for(const p of t)if(!u(p))return p;return null},l=()=>{if(!n.value&&(n.value=s(),!n.value)){d();return}const p=e[n.value];p&&(p.displayedLength<p.rawValue.length?(p.displayedLength++,p.displayedValue=p.rawValue.slice(0,p.displayedLength),p.isStreaming=!0):(p.isStreaming=!1,p.displayedValue=p.rawValue,n.value=s(),n.value||d()))},d=()=>{r&&(clearInterval(r),r=null)},f=()=>{r||(r=setInterval(l,o))},c=()=>{d(),Object.keys(e).forEach(p=>{delete e[p]}),t.length=0,n.value=null},h=(p,w)=>{if(e[p]){m(p,w);return}t.push(p),e[p]={rawValue:w??"",displayedLength:0,isStreaming:!1,displayedValue:""},r||(!n.value||n.value===p)&&f()},m=(p,w)=>{const y=e[p];if(!y){h(p,w);return}y.rawValue=w??"",!r&&!u(p)&&(!n.value||n.value===p)&&f()};return i.onUnmounted(()=>{d()}),{propertyStates:e,currentProperty:n,get isAnyStreaming(){return Object.values(e).some(p=>p.isStreaming)},isAllDone:a,startStreaming:f,reset:c,registerProperty:h,updatePropertyValue:m}}function $u(){const e=i.ref(null),t=i.ref(0),n=i.ref(!1);let r=null;const o=()=>{e.value=Date.now(),n.value=!0,r=setInterval(()=>{e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))},1e3)},u=()=>{r&&(clearInterval(r),r=null),e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))};return{elapsedSeconds:t,hasEverStarted:n,start:o,stop:u,reset:()=>{u(),e.value=null,t.value=0,n.value=!1}}}function rc(e){return e.scrollWidth>e.clientWidth}function yi(){rc(this)?this.title=this.textContent??"":this.removeAttribute("title")}function xi(){this.removeAttribute("title")}const wi={mounted(e){e.addEventListener("mouseenter",yi),e.addEventListener("mouseleave",xi)},updated(e){e.removeAttribute("title")},unmounted(e){e.removeEventListener("mouseenter",yi),e.removeEventListener("mouseleave",xi)}};function uc(e,t){const n=i.computed(()=>{var o;return Ae({},(o=e.styles)==null?void 0:o.header)});function r(){return t.slots.header&&i.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:n.value},[t.slots.header()])}return{renderHeader:r}}function oc(e,t){var u;const n=i.ref(((u=e.content)==null?void 0:u.sender)??"发送人"),r=i.computed(()=>{var a;return Ae({},(a=e.styles)==null?void 0:a.header)});function o(){return i.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:r.value},[n.value])}return{renderHeader:o}}const ic={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},ac={role:{type:String,default:"assistant"},attachments:{type:Array,default:()=>[]},enableBatchPreview:{type:Boolean,default:!1},enableFixedWidth:{type:Boolean,default:!1},showDownloadButton:{type:Boolean,default:!0},onPreview:{type:Function,default:void 0},onBatchPreview:{type:Function,default:void 0}};function sc(){return{getFileIcon:r=>({pdf:"file-type-pdf",doc:"file-type-doc",docx:"file-type-doc",xls:"file-type-xls",xlsx:"file-type-xls",ppt:"file-type-ppt",pptx:"file-type-ppt",txt:"file-type-txt",zip:"file-type-zip",rar:"file-type-zip",image:"file-type-img",img:"file-type-img",md:"file-type-md",video:"file-type-any",audio:"file-type-any"})[r.toLowerCase()]||"file-type-any",formatFileName:r=>(r==null?void 0:r.replace(/\.[^.]+$/,""))??"",formatFileSize:r=>r<1024?r+" B":r<1048576?(r/1024).toFixed(1)+" KB":(r/1048576).toFixed(1)+" MB"}}const vi=i.defineComponent({name:"FXBubbleAttachment",props:ac,emits:["preview","batchPreview"],setup(e,t){const n=i.computed(()=>e.attachments??[]),r=i.computed(()=>{var y;return((y=n.value)==null?void 0:y.length)>0}),{formatFileName:o,formatFileSize:u}=sc(),a=i.computed(()=>({"f-chat-bubble-attachment-info":!0,"f-utils-fill":e.enableFixedWidth})),s=i.computed(()=>({"f-chat-bubble-attachment-name":!0,"name-tip":e.enableFixedWidth}));function l(y,A){t.emit("preview",A)}async function d(y,A){y.stopPropagation(),y.preventDefault();const b=sn(A);b&&await Or(b,A.name)}function f(y){t.emit("batchPreview",n.value)}function c(y){switch(y.toLowerCase()){case"doc":case"docx":return"Word";case"xlsx":case"xls":return"Excel";case"ppt":case"pptx":return"PPT";case"txt":return"txt";case"png":case"jpg":case"jpeg":return"Image";case"pdf":return"PDF";case"md":return"Markdown";default:return""}}function h(y){return y?{pdf:"file-type-pdf",doc:"file-type-doc",docx:"file-type-doc",xls:"file-type-xls",xlsx:"file-type-xls",ppt:"file-type-ppt",pptx:"file-type-ppt",txt:"file-type-txt",md:"file-type-md",jpg:"file-type-img",jpeg:"file-type-img",png:"file-type-img",gif:"file-type-img",webp:"file-type-img",html:"file-type-html"}[y.toLowerCase()]||"file-type-any":""}function m(y){if(!y)return null;const A=c(y.type);return i.createVNode("div",{class:"file-info f-utils-fill"},[i.createVNode("span",{class:"file-name",title:y.name},[y.name]),i.createVNode("div",{class:"file-info-footer"},[i.createVNode("span",{class:`file-icon ${h(y.type)}`},null),A&&i.createVNode(i.Fragment,null,[i.createVNode("span",{class:"file-type"},[c(y.type)])]),y.size&&i.createVNode(i.Fragment,null,[i.createVNode("div",{class:"file-info-divider"},null),i.createTextVNode(" "),i.createVNode("span",{class:"file-size"},[u(y.size)])])])])}function p(y,A){const b=sn(y);return i.createVNode("div",{class:"f-chat-bubble-attachment-item",key:A},[i.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation",onClick:g=>l(g,y)},[i.createVNode("div",{class:a.value},[i.createVNode("span",{class:s.value,title:y.name},[o(y.name)]),y.size?i.createVNode("span",{class:"f-chat-bubble-attachment-size"},[u(y.size)]):null])]),e.showDownloadButton!==!1&&b?i.createVNode("button",{type:"button",class:"f-chat-bubble-attachment-download-btn","aria-label":"下载附件",title:"下载",onClick:g=>d(g,y)},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_download","aria-hidden":"true"},null)]):null])}function w(y,A){return i.createVNode("div",{class:"f-chat-bubble-attachment-toast",key:A},[m(y)])}return()=>r.value?i.createVNode("div",{class:{"f-chat-bubble-attachments":!0,"attachments-toast":e.role==="user"}},[n.value.map((y,A)=>e.role==="user"?w(y,A):p(y,A)),e.enableBatchPreview&&i.createVNode("div",{class:"f-chat-bubble-attachment-preview-btn",onClick:f},[i.createVNode("span",{class:"f-chat-bubble-attachment-preview-btn-text"},[i.createTextVNode("查看全部文件")]),i.createVNode("i",{class:"fx-icon fx-icon-sort-asc-sm",style:{transform:"rotate(90deg)"}},null)])]):null}}),lc=i.defineComponent({name:"FXBubbleFileContentFooter",props:ic,setup(e,t){const n=i.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return Ae({},e.customStyle),()=>i.createVNode(vi,{attachments:n.value,onPreview:r=>{var o;return(o=e.onPreviewFile)==null?void 0:o.call(e,r)},onBatchPreview:r=>{var o;return(o=e.onBatchPreviewFile)==null?void 0:o.call(e,r)}},null)}}),cc={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},dc=i.defineComponent({name:"FXBubblePageContentFooter",props:cc,setup(e,t){const n=i.ref(),r=i.computed(()=>{var a,s;const u={width:"100%",height:"100%",border:"none"};return(a=e.customStyle)!=null&&a.width&&(u.width=e.customStyle.width),(s=e.customStyle)!=null&&s.height&&(u.height=`${e.customStyle.height}px`),u}),o=u=>{var a,s;((a=u.data)==null?void 0:a.type)==="navigation"&&((s=u.data)!=null&&s.url)&&e.onNavigate&&e.onNavigate(u.data.url)};return i.onMounted(()=>{window.addEventListener("message",o)}),i.onUnmounted(()=>{window.removeEventListener("message",o)}),()=>i.createVNode("iframe",{ref:n,src:e.pageUrl,style:r.value,scrolling:"auto"},null)}});function Ai(){function e(o,u){const{fileContent:a,height:s,width:l}=o;return{file:a,customStyle:{width:l||"100%",height:s||"100%"},onPreviewFile:u==null?void 0:u.onPreviewFile,onBatchPreviewFile:u==null?void 0:u.onBatchPreviewFile}}function t(o,u){const{pageUrl:a,height:s,width:l}=o;return{pageUrl:a,customStyle:{width:l||"100%",height:s||"100%"},onNavigate:u==null?void 0:u.onNavigate}}function n(o,u){const a=e(o,u);return i.h(lc,a)}function r(o,u){const a=t(o,u);return i.h(dc,a)}return{renderFileEmbeddedContent:n,renderPageEmbeddedContent:r}}const fc={title:{type:String,default:""},subtitle:{type:String,default:""},text:{type:String,default:""},textFormat:{type:String,default:"plain"},placement:{type:String,default:"start"},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0}};function hc(e){return e.replace(/```\s*\n+\s*assistant-widget/g,"``` assistant-widget")}const ki=/^```\s*assistant-widget[\s\S]*?```$/,pc=/^```\s*assistant-widget/,mc=/^```\s*([a-zA-Z0-9-]*)$/;function gc(e){const t=e.match(mc);if(!t)return!1;const n=(t[1]??"").toLowerCase();return n===""||"assistant-widget".startsWith(n)}function bc(e){return e?ki.test(e):!1}function yc(e){return e?ki.test(e)||pc.test(e)||gc(e):!1}function xc(e){if(!e)return[];const t=/(```[\s]*assistant-widget[\s\S]*?```)/g,n=[];let r=0,o;for(;(o=t.exec(e))!==null;){if(o.index>r){const u=e.slice(r,o.index),a=/(```[\s]*assistant-widget)/,s=u.match(a);if(s){const l=u.indexOf(s[0]);l>0&&n.push(u.slice(0,l)),n.push(u.slice(l));const d=u.slice(l+s[0].length);d.trim().length>0&&n.push(d)}else n.push(u)}n.push(hc(o[0])),r=o.index+o[0].length}if(r<e.length){const u=e.slice(r),a=/(```[\s]*assistant-widget)/,s=u.match(a);if(s){const l=u.indexOf(s[0]);l>0&&n.push(u.slice(0,l)),n.push(u.slice(l))}else n.push(u)}return n.filter(u=>u.trim().length>0)}function Ci(e){const t=e.replace("``` assistant-widget","").replace("```","").trim();try{return JSON.parse(t)}catch(n){return console.error("Failed to parse JSON:",n),null}}function wc(e){var n;const t=Ci(e);return((n=t==null?void 0:t.renderer)==null?void 0:n.widgetImplOptions)||{}}const vc=/^```\s*dynamic-component[\s\S]*?```$/,Ac=/^```\s*dynamic-component/;function kc(e){return e.replace(/```\s*\n*\s*dynamic-component/g,"``` dynamic-component")}function Cc(e){return e?vc.test(e)||Ac.test(e):!1}function _c(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object"||Array.isArray(n))return null;const r=n;return typeof r.instanceId!="string"?null:{...r,instanceId:r.instanceId,name:typeof r.name=="string"?r.name:void 0,componentId:typeof r.componentId=="string"?r.componentId:void 0,jsUrl:typeof r.jsUrl=="string"?r.jsUrl:"",url:typeof r.url=="string"?r.url:"",title:typeof r.title=="string"?r.title:"预览",position:r.position==="inline"?"inline":"right",width:typeof r.width=="string"?r.width:void 0,isFullscreen:typeof r.isFullscreen=="boolean"?r.isFullscreen:!1,autoOpen:typeof r.autoOpen=="boolean"?r.autoOpen:!1,fileRe:typeof r.fileRe=="string"?r.fileRe:void 0,target:r.target==="preview"||r.target==="previewExtra"?r.target:void 0}}function Ec(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;const n=t.match(/"position"\s*:\s*"(inline|right)"/);return n?{position:n[1]}:null}function Sc(e){if(!e)return[];const t="``` dynamic-component",n="```",r=[];let o=0;for(;o<e.length;){const u=e.indexOf(t,o);if(u===-1){const m=e.slice(o);m&&r.push(m);break}let a=u+t.length;const s=e.lastIndexOf("```",u),l=s>=0&&s<u+3?s:u,d=e.slice(o,l);d&&r.push(d);const f=e.indexOf(n,a);if(f===-1){r.push(e.slice(l));break}const c=f+n.length,h=e.slice(l,c);r.push(kc(h)),o=c}return r.filter(u=>u.length>0)}var Le=(e=>(e.Text="text",e.FlowUIComplete="flowui-complete",e.AssistantWidgetComplete="assistant-widget-complete",e.AssistantWidgetPending="assistant-widget-pending",e.DynamicComponentComplete="dynamic-component-complete",e.DynamicComponentPending="dynamic-component-pending",e))(Le||{});function Dc(e){var o;if(!e)return[];const t=[],n=new Set,r=xc(e);for(const u of r)if(yc(u))if(bc(u)){const a=Ci(u);t.push({type:Le.AssistantWidgetComplete,raw:u,widgetData:a,widgetUrl:(o=a==null?void 0:a.renderer)==null?void 0:o.url,widgetImplOptions:wc(u)})}else t.push({type:Le.AssistantWidgetPending,raw:u});else{const a=Sc(u);for(const s of a)if(Cc(s))if(s.endsWith("```")){const l=_c(s);if(l!=null&&l.instanceId){if(n.has(l.instanceId))continue;n.add(l.instanceId),t.push({type:Le.DynamicComponentComplete,raw:s,config:l})}}else{const l=Ec(s);t.push({type:Le.DynamicComponentPending,raw:s,position:(l==null?void 0:l.position)??null})}else s.trim()&&t.push({type:Le.Text,raw:s})}return t}const _i={};function Fc(e){let t=_i[e];if(t)return t;t=_i[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function ln(e,t){typeof t!="string"&&(t=ln.defaultChars);const n=Fc(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let u=0,a=r.length;u<a;u+=3){const s=parseInt(r.slice(u+1,u+3),16);if(s<128){o+=n[s];continue}if((s&224)===192&&u+3<a){const l=parseInt(r.slice(u+4,u+6),16);if((l&192)===128){const d=s<<6&1984|l&63;d<128?o+="��":o+=String.fromCharCode(d),u+=3;continue}}if((s&240)===224&&u+6<a){const l=parseInt(r.slice(u+4,u+6),16),d=parseInt(r.slice(u+7,u+9),16);if((l&192)===128&&(d&192)===128){const f=s<<12&61440|l<<6&4032|d&63;f<2048||f>=55296&&f<=57343?o+="���":o+=String.fromCharCode(f),u+=6;continue}}if((s&248)===240&&u+9<a){const l=parseInt(r.slice(u+4,u+6),16),d=parseInt(r.slice(u+7,u+9),16),f=parseInt(r.slice(u+10,u+12),16);if((l&192)===128&&(d&192)===128&&(f&192)===128){let c=s<<18&1835008|l<<12&258048|d<<6&4032|f&63;c<65536||c>1114111?o+="����":(c-=65536,o+=String.fromCharCode(55296+(c>>10),56320+(c&1023))),u+=9;continue}}o+="�"}return o})}ln.defaultChars=";/?:@&=+$,#",ln.componentChars="";const Ei={};function Tc(e){let t=Ei[e];if(t)return t;t=Ei[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function zn(e,t,n){typeof t!="string"&&(n=t,t=zn.defaultChars),typeof n>"u"&&(n=!0);const r=Tc(t);let o="";for(let u=0,a=e.length;u<a;u++){const s=e.charCodeAt(u);if(n&&s===37&&u+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(u+1,u+3))){o+=e.slice(u,u+3),u+=2;continue}if(s<128){o+=r[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&u+1<a){const l=e.charCodeAt(u+1);if(l>=56320&&l<=57343){o+=encodeURIComponent(e[u]+e[u+1]),u++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[u])}return o}zn.defaultChars=";/?:@&=+$,-_.!~*'()#",zn.componentChars="-_.!~*'()";function Uu(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Pr(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Nc=/^([a-z0-9.+-]+:)/i,Ic=/:[0-9]*$/,Oc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Lc=["<",">",'"',"`"," ","\r",`
|
|
2
|
+
`," "],Vc=["{","}","|","\\","^","`"].concat(Lc),Pc=["'"].concat(Vc),Si=["%","/","?",";","#"].concat(Pc),Di=["/","?","#"],Rc=255,Fi=/^[+a-z0-9A-Z_-]{0,63}$/,Mc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ti={javascript:!0,"javascript:":!0},Ni={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Wu(e,t){if(e&&e instanceof Pr)return e;const n=new Pr;return n.parse(e,t),n}Pr.prototype.parse=function(e,t){let n,r,o,u=e;if(u=u.trim(),!t&&e.split("#").length===1){const d=Oc.exec(u);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let a=Nc.exec(u);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,u=u.substr(a.length)),(t||a||u.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=u.substr(0,2)==="//",o&&!(a&&Ti[a])&&(u=u.substr(2),this.slashes=!0)),!Ti[a]&&(o||a&&!Ni[a])){let d=-1;for(let p=0;p<Di.length;p++)r=u.indexOf(Di[p]),r!==-1&&(d===-1||r<d)&&(d=r);let f,c;d===-1?c=u.lastIndexOf("@"):c=u.lastIndexOf("@",d),c!==-1&&(f=u.slice(0,c),u=u.slice(c+1),this.auth=f),d=-1;for(let p=0;p<Si.length;p++)r=u.indexOf(Si[p]),r!==-1&&(d===-1||r<d)&&(d=r);d===-1&&(d=u.length),u[d-1]===":"&&d--;const h=u.slice(0,d);u=u.slice(d),this.parseHost(h),this.hostname=this.hostname||"";const m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m){const p=this.hostname.split(/\./);for(let w=0,y=p.length;w<y;w++){const A=p[w];if(A&&!A.match(Fi)){let b="";for(let g=0,x=A.length;g<x;g++)A.charCodeAt(g)>127?b+="x":b+=A[g];if(!b.match(Fi)){const g=p.slice(0,w),x=p.slice(w+1),k=A.match(Mc);k&&(g.push(k[1]),x.unshift(k[2])),x.length&&(u=x.join(".")+u),this.hostname=g.join(".");break}}}}this.hostname.length>Rc&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=u.indexOf("#");s!==-1&&(this.hash=u.substr(s),u=u.slice(0,s));const l=u.indexOf("?");return l!==-1&&(this.search=u.substr(l),u=u.slice(0,l)),u&&(this.pathname=u),Ni[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Pr.prototype.parseHost=function(e){let t=Ic.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Bc=Object.freeze(Object.defineProperty({__proto__:null,decode:ln,encode:zn,format:Uu,parse:Wu},Symbol.toStringTag,{value:"Module"})),Ii=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Oi=/[\0-\x1F\x7F-\x9F]/,zc=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Gu=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\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-\u2E4F\u2E52-\u2E5D\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[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Li=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Vi=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,jc=Object.freeze(Object.defineProperty({__proto__:null,Any:Ii,Cc:Oi,Cf:zc,P:Gu,S:Li,Z:Vi},Symbol.toStringTag,{value:"Module"})),Hc=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),$c=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Xu;const Uc=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Wc=(Xu=String.fromCodePoint)!==null&&Xu!==void 0?Xu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Gc(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Uc.get(e))!==null&&t!==void 0?t:e}var _e;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(_e||(_e={}));const Xc=32;var Rt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Rt||(Rt={}));function qu(e){return e>=_e.ZERO&&e<=_e.NINE}function qc(e){return e>=_e.UPPER_A&&e<=_e.UPPER_F||e>=_e.LOWER_A&&e<=_e.LOWER_F}function Zc(e){return e>=_e.UPPER_A&&e<=_e.UPPER_Z||e>=_e.LOWER_A&&e<=_e.LOWER_Z||qu(e)}function Yc(e){return e===_e.EQUALS||Zc(e)}var Ee;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ee||(Ee={}));var Mt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Mt||(Mt={}));class Kc{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ee.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Mt.Strict}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===_e.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Xc)===_e.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const u=r-n;this.result=this.result*Math.pow(o,u)+parseInt(t.substr(n,u),o),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(qu(o)||qc(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(qu(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===_e.SEMI)this.consumed+=1;else if(this.decodeMode===Mt.Strict)return 0;return this.emitCodePoint(Gc(this.result),this.consumed),this.errors&&(t!==_e.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],u=(o&Rt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Qc(r,o,this.treeIndex+Math.max(1,u),a),this.treeIndex<0)return this.result===0||this.decodeMode===Mt.Attribute&&(u===0||Yc(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&Rt.VALUE_LENGTH)>>14,u!==0){if(a===_e.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Mt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Rt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Rt.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==Mt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function Pi(e){let t="";const n=new Kc(e,r=>t+=Wc(r));return function(o,u){let a=0,s=0;for(;(s=o.indexOf("&",s))>=0;){t+=o.slice(a,s),n.startEntity(u);const d=n.write(o,s+1);if(d<0){a=s+n.end();break}a=s+d,s=d===0?a+1:a}const l=t+o.slice(a);return t="",l}}function Qc(e,t,n,r){const o=(t&Rt.BRANCH_LENGTH)>>7,u=t&Rt.JUMP_TABLE;if(o===0)return u!==0&&r===u?n:-1;if(u){const l=r-u;return l<0||l>=o?-1:e[n+l]-1}let a=n,s=a+o-1;for(;a<=s;){const l=a+s>>>1,d=e[l];if(d<r)a=l+1;else if(d>r)s=l-1;else return e[l+o]}return-1}const Jc=Pi(Hc);Pi($c);function Ri(e,t=Mt.Legacy){return Jc(e,t)}function ed(e){return Object.prototype.toString.call(e)}function Zu(e){return ed(e)==="[object String]"}const td=Object.prototype.hasOwnProperty;function nd(e,t){return td.call(e,t)}function Rr(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Mi(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Yu(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Mr(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Bi=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,rd=/&([a-z#][a-z0-9]{1,31});/gi,ud=new RegExp(Bi.source+"|"+rd.source,"gi"),od=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function id(e,t){if(t.charCodeAt(0)===35&&od.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Yu(r)?Mr(r):e}const n=Ri(e);return n!==e?n:e}function ad(e){return e.indexOf("\\")<0?e:e.replace(Bi,"$1")}function cn(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(ud,function(t,n,r){return n||id(t,r)})}const sd=/[&<>"]/,ld=/[&<>"]/g,cd={"&":"&","<":"<",">":">",'"':"""};function dd(e){return cd[e]}function Bt(e){return sd.test(e)?e.replace(ld,dd):e}const fd=/[.?*+^$[\]\\(){}|-]/g;function hd(e){return e.replace(fd,"\\$&")}function ce(e){switch(e){case 9:case 32:return!0}return!1}function jn(e){if(e>=8192&&e<=8202)return!0;switch(e){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}function Hn(e){return Gu.test(e)||Li.test(e)}function $n(e){switch(e){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 Br(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const pd=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Mi,assign:Rr,escapeHtml:Bt,escapeRE:hd,fromCodePoint:Mr,has:nd,isMdAsciiPunct:$n,isPunctChar:Hn,isSpace:ce,isString:Zu,isValidEntityCode:Yu,isWhiteSpace:jn,lib:{mdurl:Bc,ucmicro:jc},normalizeReference:Br,unescapeAll:cn,unescapeMd:ad},Symbol.toStringTag,{value:"Module"}));function md(e,t,n){let r,o,u,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(u=e.src.charCodeAt(e.pos),u===93&&(r--,r===0)){o=!0;break}if(a=e.pos,e.md.inline.skipToken(e),u===91){if(a===e.pos-1)r++;else if(n)return e.pos=l,-1}}let d=-1;return o&&(d=e.pos),e.pos=l,d}function gd(e,t,n){let r,o=t;const u={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return u;if(r===62)return u.pos=o+1,u.str=cn(e.slice(t+1,o)),u.ok=!0,u;if(r===92&&o+1<n){o+=2;continue}o++}return u}let a=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(a++,a>32))return u;if(r===41){if(a===0)break;a--}o++}return t===o||a!==0||(u.str=cn(e.slice(t,o)),u.pos=o,u.ok=!0),u}function bd(e,t,n,r){let o,u=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(u>=n)return a;let s=e.charCodeAt(u);if(s!==34&&s!==39&&s!==40)return a;t++,u++,s===40&&(s=41),a.marker=s}for(;u<n;){if(o=e.charCodeAt(u),o===a.marker)return a.pos=u+1,a.str+=cn(e.slice(t,u)),a.ok=!0,a;if(o===40&&a.marker===41)return a;o===92&&u+1<n&&u++,u++}return a.can_continue=!0,a.str+=cn(e.slice(t,u)),a}const yd=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:gd,parseLinkLabel:md,parseLinkTitle:bd},Symbol.toStringTag,{value:"Module"})),xt={};xt.code_inline=function(e,t,n,r,o){const u=e[t];return"<code"+o.renderAttrs(u)+">"+Bt(u.content)+"</code>"},xt.code_block=function(e,t,n,r,o){const u=e[t];return"<pre"+o.renderAttrs(u)+"><code>"+Bt(e[t].content)+`</code></pre>
|
|
3
|
+
`},xt.fence=function(e,t,n,r,o){const u=e[t],a=u.info?cn(u.info).trim():"";let s="",l="";if(a){const f=a.split(/(\s+)/g);s=f[0],l=f.slice(2).join("")}let d;if(n.highlight?d=n.highlight(u.content,s,l)||Bt(u.content):d=Bt(u.content),d.indexOf("<pre")===0)return d+`
|
|
4
|
+
`;if(a){const f=u.attrIndex("class"),c=u.attrs?u.attrs.slice():[];f<0?c.push(["class",n.langPrefix+s]):(c[f]=c[f].slice(),c[f][1]+=" "+n.langPrefix+s);const h={attrs:c};return`<pre><code${o.renderAttrs(h)}>${d}</code></pre>
|
|
5
|
+
`}return`<pre><code${o.renderAttrs(u)}>${d}</code></pre>
|
|
6
|
+
`},xt.image=function(e,t,n,r,o){const u=e[t];return u.attrs[u.attrIndex("alt")][1]=o.renderInlineAsText(u.children,n,r),o.renderToken(e,t,n)},xt.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
7
7
|
`:`<br>
|
|
8
8
|
`},xt.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
9
9
|
`:`<br>
|
|
10
10
|
`:`
|
|
11
|
-
`},xt.text=function(e,t){return Bt(e[t].content)},xt.html_block=function(e,t){return e[t].content},xt.html_inline=function(e,t){return e[t].content};function dn(){this.rules=Rr({},xt)}dn.prototype.renderAttrs=function(t){let n,
|
|
12
|
-
`),
|
|
13
|
-
`:">",
|
|
14
|
-
`;break}return
|
|
15
|
-
`),t=t.replace(md,"�"),e.src=t}function gd(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function bd(e){const t=e.tokens;for(let n=0,u=t.length;n<u;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function yd(e){return/^<a[>\s]/i.test(e)}function xd(e){return/^<\/a\s*>/i.test(e)}function wd(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,u=t.length;n<u;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,r=0;for(let a=o.length-1;a>=0;a--){const s=o[a];if(s.type==="link_close"){for(a--;o[a].level!==s.level&&o[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(yd(s.content)&&r>0&&r--,xd(s.content)&&r++),!(r>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let d=e.md.linkify.match(l);const f=[];let c=s.level,h=0;d.length>0&&d[0].index===0&&a>0&&o[a-1].type==="text_special"&&(d=d.slice(1));for(let p=0;p<d.length;p++){const m=d[p].url,w=e.md.normalizeLink(m);if(!e.md.validateLink(w))continue;let y=d[p].text;d[p].schema?d[p].schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const A=d[p].index;if(A>h){const k=new e.Token("text","",0);k.content=l.slice(h,A),k.level=c,f.push(k)}const b=new e.Token("link_open","a",1);b.attrs=[["href",w]],b.level=c++,b.markup="linkify",b.info="auto",f.push(b);const g=new e.Token("text","",0);g.content=y,g.level=c,f.push(g);const x=new e.Token("link_close","a",-1);x.level=--c,x.markup="linkify",x.info="auto",f.push(x),h=d[p].lastIndex}if(h<l.length){const p=new e.Token("text","",0);p.content=l.slice(h),p.level=c,f.push(p)}t[n].children=o=Pi(o,a,f)}}}}const Mi=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,vd=/\((c|tm|r)\)/i,Ad=/\((c|tm|r)\)/ig,kd={c:"©",r:"®",tm:"™"};function Cd(e,t){return kd[t.toLowerCase()]}function _d(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&(u.content=u.content.replace(Ad,Cd)),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function Ed(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&Mi.test(u.content)&&(u.content=u.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–")),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function Sd(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(vd.test(e.tokens[t].content)&&_d(e.tokens[t].children),Mi.test(e.tokens[t].content)&&Ed(e.tokens[t].children))}const Dd=/['"]/,Bi=/['"]/g,zi="’";function zr(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Td(e,t){let n;const u=[];for(let o=0;o<e.length;o++){const r=e[o],a=e[o].level;for(n=u.length-1;n>=0&&!(u[n].level<=a);n--);if(u.length=n+1,r.type!=="text")continue;let s=r.content,l=0,d=s.length;e:for(;l<d;){Bi.lastIndex=l;const f=Bi.exec(s);if(!f)break;let c=!0,h=!0;l=f.index+1;const p=f[0]==="'";let m=32;if(f.index-1>=0)m=s.charCodeAt(f.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let w=32;if(l<d)w=s.charCodeAt(l);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){w=e[n].content.charCodeAt(0);break}const y=Hn(m)||jn(String.fromCharCode(m)),A=Hn(w)||jn(String.fromCharCode(w)),b=zn(m),g=zn(w);if(g?c=!1:A&&(b||y||(c=!1)),b?h=!1:y&&(g||A||(h=!1)),w===34&&f[0]==='"'&&m>=48&&m<=57&&(h=c=!1),c&&h&&(c=y,h=A),!c&&!h){p&&(r.content=zr(r.content,f.index,zi));continue}if(h)for(n=u.length-1;n>=0;n--){let x=u[n];if(u[n].level<a)break;if(x.single===p&&u[n].level===a){x=u[n];let k,F;p?(k=t.md.options.quotes[2],F=t.md.options.quotes[3]):(k=t.md.options.quotes[0],F=t.md.options.quotes[1]),r.content=zr(r.content,f.index,F),e[x.token].content=zr(e[x.token].content,x.pos,k),l+=F.length-1,x.token===o&&(l+=k.length-1),s=r.content,d=s.length,u.length=n;continue e}}c?u.push({token:o,pos:f.index,single:p,level:a}):h&&p&&(r.content=zr(r.content,f.index,zi))}}}function Fd(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!Dd.test(e.tokens[t].content)||Td(e.tokens[t].children,e)}function Nd(e){let t,n;const u=e.tokens,o=u.length;for(let r=0;r<o;r++){if(u[r].type!=="inline")continue;const a=u[r].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=n=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}}const Yu=[["normalize",pd],["block",gd],["inline",bd],["linkify",wd],["replacements",Sd],["smartquotes",Fd],["text_join",Nd]];function Ku(){this.ruler=new We;for(let e=0;e<Yu.length;e++)this.ruler.push(Yu[e][0],Yu[e][1])}Ku.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,u=t.length;n<u;n++)t[n](e)},Ku.prototype.State=Ri;function wt(e,t,n,u){this.src=e,this.md=t,this.env=n,this.tokens=u,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let r=0,a=0,s=0,l=0,d=o.length,f=!1;a<d;a++){const c=o.charCodeAt(a);if(!f)if(ce(c)){s++,c===9?l+=4-l%4:l++;continue}else f=!0;(c===10||a===d-1)&&(c!==10&&a++,this.bMarks.push(r),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),f=!1,s=0,l=0,r=a+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}wt.prototype.push=function(e,t,n){const u=new st(e,t,n);return u.block=!0,n<0&&this.level--,u.level=this.level,n>0&&this.level++,this.tokens.push(u),u},wt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},wt.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},wt.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const u=this.src.charCodeAt(t);if(!ce(u))break}return t},wt.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ce(this.src.charCodeAt(--t)))return t+1;return t},wt.prototype.skipChars=function(t,n){for(let u=this.src.length;t<u&&this.src.charCodeAt(t)===n;t++);return t},wt.prototype.skipCharsBack=function(t,n,u){if(t<=u)return t;for(;t>u;)if(n!==this.src.charCodeAt(--t))return t+1;return t},wt.prototype.getLines=function(t,n,u,o){if(t>=n)return"";const r=new Array(n-t);for(let a=0,s=t;s<n;s++,a++){let l=0;const d=this.bMarks[s];let f=d,c;for(s+1<n||o?c=this.eMarks[s]+1:c=this.eMarks[s];f<c&&l<u;){const h=this.src.charCodeAt(f);if(ce(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(f-d<this.tShift[s])l++;else break;f++}l>u?r[a]=new Array(l-u+1).join(" ")+this.src.slice(f,c):r[a]=this.src.slice(f,c)}return r.join("")},wt.prototype.Token=st;const Id=65536;function Qu(e,t){const n=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];return e.src.slice(n,u)}function ji(e){const t=[],n=e.length;let u=0,o=e.charCodeAt(u),r=!1,a=0,s="";for(;u<n;)o===124&&(r?(s+=e.substring(a,u-1),a=u):(t.push(s+e.substring(a,u)),s="",a=u+1)),r=o===92,u++,o=e.charCodeAt(u);return t.push(s+e.substring(a)),t}function Od(e,t,n,u){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let r=e.bMarks[o]+e.tShift[o];if(r>=e.eMarks[o])return!1;const a=e.src.charCodeAt(r++);if(a!==124&&a!==45&&a!==58||r>=e.eMarks[o])return!1;const s=e.src.charCodeAt(r++);if(s!==124&&s!==45&&s!==58&&!ce(s)||a===45&&ce(s))return!1;for(;r<e.eMarks[o];){const x=e.src.charCodeAt(r);if(x!==124&&x!==45&&x!==58&&!ce(x))return!1;r++}let l=Qu(e,t+1),d=l.split("|");const f=[];for(let x=0;x<d.length;x++){const k=d[x].trim();if(!k){if(x===0||x===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(k))return!1;k.charCodeAt(k.length-1)===58?f.push(k.charCodeAt(0)===58?"center":"right"):k.charCodeAt(0)===58?f.push("left"):f.push("")}if(l=Qu(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;d=ji(l),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop();const c=d.length;if(c===0||c!==f.length)return!1;if(u)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),w=[t,0];m.map=w;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const A=e.push("tr_open","tr",1);A.map=[t,t+1];for(let x=0;x<d.length;x++){const k=e.push("th_open","th",1);f[x]&&(k.attrs=[["style","text-align:"+f[x]]]);const F=e.push("inline","",0);F.content=d[x].trim(),F.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let b,g=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let x=!1;for(let F=0,T=p.length;F<T;F++)if(p[F](e,o,n,!0)){x=!0;break}if(x||(l=Qu(e,o).trim(),!l)||e.sCount[o]-e.blkIndent>=4||(d=ji(l),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),g+=c-d.length,g>Id))break;if(o===t+2){const F=e.push("tbody_open","tbody",1);F.map=b=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let F=0;F<c;F++){const T=e.push("td_open","td",1);f[F]&&(T.attrs=[["style","text-align:"+f[F]]]);const D=e.push("inline","",0);D.content=d[F]?d[F].trim():"",D.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return b&&(e.push("tbody_close","tbody",-1),b[1]=o),e.push("table_close","table",-1),w[1]=o,e.parentType=h,e.line=o,!0}function Ld(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let u=t+1,o=u;for(;u<n;){if(e.isEmpty(u)){u++;continue}if(e.sCount[u]-e.blkIndent>=4){u++,o=u;continue}break}e.line=o;const r=e.push("code_block","code",0);return r.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
16
|
-
`,r.map=[t,e.line],!0}function Pd(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>r)return!1;const a=e.src.charCodeAt(o);if(a!==126&&a!==96)return!1;let s=o;o=e.skipChars(o,a);let l=o-s;if(l<3)return!1;const d=e.src.slice(s,o),f=e.src.slice(o,r);if(a===96&&f.indexOf(String.fromCharCode(a))>=0)return!1;if(u)return!0;let c=t,h=!1;for(;c++,!(c>=n||(o=s=e.bMarks[c]+e.tShift[c],r=e.eMarks[c],o<r&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(o)===a&&!(e.sCount[c]-e.blkIndent>=4)&&(o=e.skipChars(o,a),!(o-s<l)&&(o=e.skipSpaces(o),!(o<r)))){h=!0;break}l=e.sCount[t],e.line=c+(h?1:0);const p=e.push("fence","code",0);return p.info=f,p.content=e.getLines(t+1,c,l,!0),p.markup=d,p.map=[t,e.line],!0}function Vd(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(u)return!0;const s=[],l=[],d=[],f=[],c=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m<n;m++){const g=e.sCount[m]<e.blkIndent;if(o=e.bMarks[m]+e.tShift[m],r=e.eMarks[m],o>=r)break;if(e.src.charCodeAt(o++)===62&&!g){let k=e.sCount[m]+1,F,T;e.src.charCodeAt(o)===32?(o++,k++,T=!1,F=!0):e.src.charCodeAt(o)===9?(F=!0,(e.bsCount[m]+k)%4===3?(o++,k++,T=!1):T=!0):F=!1;let D=k;for(s.push(e.bMarks[m]),e.bMarks[m]=o;o<r;){const U=e.src.charCodeAt(o);if(ce(U))U===9?D+=4-(D+e.bsCount[m]+(T?1:0))%4:D++;else break;o++}p=o>=r,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(F?1:0),d.push(e.sCount[m]),e.sCount[m]=D-k,f.push(e.tShift[m]),e.tShift[m]=o-e.bMarks[m];continue}if(p)break;let x=!1;for(let k=0,F=c.length;k<F;k++)if(c[k](e,m,n,!0)){x=!0;break}if(x){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),l.push(e.bsCount[m]),f.push(e.tShift[m]),d.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),l.push(e.bsCount[m]),f.push(e.tShift[m]),d.push(e.sCount[m]),e.sCount[m]=-1}const w=e.blkIndent;e.blkIndent=0;const y=e.push("blockquote_open","blockquote",1);y.markup=">";const A=[t,0];y.map=A,e.md.block.tokenize(e,t,m);const b=e.push("blockquote_close","blockquote",-1);b.markup=">",e.lineMax=a,e.parentType=h,A[1]=e.line;for(let g=0;g<f.length;g++)e.bMarks[g+t]=s[g],e.tShift[g+t]=f[g],e.sCount[g+t]=d[g],e.bsCount[g+t]=l[g];return e.blkIndent=w,!0}function Rd(e,t,n,u){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let r=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(r++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;r<o;){const d=e.src.charCodeAt(r++);if(d!==a&&!ce(d))return!1;d===a&&s++}if(s<3)return!1;if(u)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function Hi(e,t){const n=e.eMarks[t];let u=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(u++);if(o!==42&&o!==45&&o!==43)return-1;if(u<n){const r=e.src.charCodeAt(u);if(!ce(r))return-1}return u}function $i(e,t){const n=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];let o=n;if(o+1>=u)return-1;let r=e.src.charCodeAt(o++);if(r<48||r>57)return-1;for(;;){if(o>=u)return-1;if(r=e.src.charCodeAt(o++),r>=48&&r<=57){if(o-n>=10)return-1;continue}if(r===41||r===46)break;return-1}return o<u&&(r=e.src.charCodeAt(o),!ce(r))?-1:o}function Md(e,t){const n=e.level+2;for(let u=t+2,o=e.tokens.length-2;u<o;u++)e.tokens[u].level===n&&e.tokens[u].type==="paragraph_open"&&(e.tokens[u+2].hidden=!0,e.tokens[u].hidden=!0,u+=2)}function Bd(e,t,n,u){let o,r,a,s,l=t,d=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let f=!1;u&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(f=!0);let c,h,p;if((p=$i(e,l))>=0){if(c=!0,a=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(a,p-1)),f&&h!==1)return!1}else if((p=Hi(e,l))>=0)c=!1;else return!1;if(f&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(u)return!0;const m=e.src.charCodeAt(p-1),w=e.tokens.length;c?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const y=[l,0];s.map=y,s.markup=String.fromCharCode(m);let A=!1;const b=e.md.block.ruler.getRules("list"),g=e.parentType;for(e.parentType="list";l<n;){r=p,o=e.eMarks[l];const x=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let k=x;for(;r<o;){const V=e.src.charCodeAt(r);if(V===9)k+=4-(k+e.bsCount[l])%4;else if(V===32)k++;else break;r++}const F=r;let T;F>=o?T=1:T=k-x,T>4&&(T=1);const D=x+T;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const U=[l,0];s.map=U,c&&(s.info=e.src.slice(a,p-1));const _=e.tight,N=e.tShift[l],I=e.sCount[l],C=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=D,e.tight=!0,e.tShift[l]=F-e.bMarks[l],e.sCount[l]=k,F>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||A)&&(d=!1),A=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=C,e.tShift[l]=N,e.sCount[l]=I,e.tight=_,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=e.line,U[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let P=!1;for(let V=0,E=b.length;V<E;V++)if(b[V](e,l,n,!0)){P=!0;break}if(P)break;if(c){if(p=$i(e,l),p<0)break;a=e.bMarks[l]+e.tShift[l]}else if(p=Hi(e,l),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return c?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(m),y[1]=l,e.line=l,e.parentType=g,d&&Md(e,w),!0}function zd(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function s(b){const g=e.lineMax;if(b>=g||e.isEmpty(b))return null;let x=!1;if(e.sCount[b]-e.blkIndent>3&&(x=!0),e.sCount[b]<0&&(x=!0),!x){const T=e.md.block.ruler.getRules("reference"),D=e.parentType;e.parentType="reference";let U=!1;for(let _=0,N=T.length;_<N;_++)if(T[_](e,b,g,!0)){U=!0;break}if(e.parentType=D,U)return null}const k=e.bMarks[b]+e.tShift[b],F=e.eMarks[b];return e.src.slice(k,F+1)}let l=e.src.slice(o,r+1);r=l.length;let d=-1;for(o=1;o<r;o++){const b=l.charCodeAt(o);if(b===91)return!1;if(b===93){d=o;break}else if(b===10){const g=s(a);g!==null&&(l+=g,r=l.length,a++)}else if(b===92&&(o++,o<r&&l.charCodeAt(o)===10)){const g=s(a);g!==null&&(l+=g,r=l.length,a++)}}if(d<0||l.charCodeAt(d+1)!==58)return!1;for(o=d+2;o<r;o++){const b=l.charCodeAt(o);if(b===10){const g=s(a);g!==null&&(l+=g,r=l.length,a++)}else if(!ce(b))break}const f=e.md.helpers.parseLinkDestination(l,o,r);if(!f.ok)return!1;const c=e.md.normalizeLink(f.str);if(!e.md.validateLink(c))return!1;o=f.pos;const h=o,p=a,m=o;for(;o<r;o++){const b=l.charCodeAt(o);if(b===10){const g=s(a);g!==null&&(l+=g,r=l.length,a++)}else if(!ce(b))break}let w=e.md.helpers.parseLinkTitle(l,o,r);for(;w.can_continue;){const b=s(a);if(b===null)break;l+=b,o=r,r=l.length,a++,w=e.md.helpers.parseLinkTitle(l,o,r,w)}let y;for(o<r&&m!==o&&w.ok?(y=w.str,o=w.pos):(y="",o=h,a=p);o<r;){const b=l.charCodeAt(o);if(!ce(b))break;o++}if(o<r&&l.charCodeAt(o)!==10&&y)for(y="",o=h,a=p;o<r;){const b=l.charCodeAt(o);if(!ce(b))break;o++}if(o<r&&l.charCodeAt(o)!==10)return!1;const A=Br(l.slice(1,d));return A?(u||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[A]>"u"&&(e.env.references[A]={title:y,href:c}),e.line=a),!0):!1}const jd=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Hd="[a-zA-Z_:][a-zA-Z0-9:._-]*",$d="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Ui="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+Hd+"(?:\\s*=\\s*"+$d+")?)")+"*\\s*\\/?>",Wi="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ud="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Wd="<[?][\\s\\S]*?[?]>",Gd="<![A-Za-z][^>]*>",Xd="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",qd=new RegExp("^(?:"+Ui+"|"+Wi+"|"+Ud+"|"+Wd+"|"+Gd+"|"+Xd+")"),Zd=new RegExp("^(?:"+Ui+"|"+Wi+")"),fn=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+jd.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Zd.source+"\\s*$"),/^$/,!1]];function Yd(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let a=e.src.slice(o,r),s=0;for(;s<fn.length&&!fn[s][0].test(a);s++);if(s===fn.length)return!1;if(u)return fn[s][2];let l=t+1;if(!fn[s][1].test(a)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(o=e.bMarks[l]+e.tShift[l],r=e.eMarks[l],a=e.src.slice(o,r),fn[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function Kd(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(o);if(a!==35||o>=r)return!1;let s=1;for(a=e.src.charCodeAt(++o);a===35&&o<r&&s<=6;)s++,a=e.src.charCodeAt(++o);if(s>6||o<r&&!ce(a))return!1;if(u)return!0;r=e.skipSpacesBack(r,o);const l=e.skipCharsBack(r,35,o);l>o&&ce(e.src.charCodeAt(l-1))&&(r=l),e.line=t+1;const d=e.push("heading_open","h"+String(s),1);d.markup="########".slice(0,s),d.map=[t,e.line];const f=e.push("inline","",0);f.content=e.src.slice(o,r).trim(),f.map=[t,e.line],f.children=[];const c=e.push("heading_close","h"+String(s),-1);return c.markup="########".slice(0,s),!0}function Qd(e,t,n){const u=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let r=0,a,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p<m&&(a=e.src.charCodeAt(p),(a===45||a===61)&&(p=e.skipChars(p,a),p=e.skipSpaces(p),p>=m))){r=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=u.length;p<m;p++)if(u[p](e,s,n,!0)){h=!0;break}if(h)break}if(!r)return!1;const l=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;const d=e.push("heading_open","h"+String(r),1);d.markup=String.fromCharCode(a),d.map=[t,e.line];const f=e.push("inline","",0);f.content=l,f.map=[t,e.line-1],f.children=[];const c=e.push("heading_close","h"+String(r),-1);return c.markup=String.fromCharCode(a),e.parentType=o,!0}function Jd(e,t,n){const u=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let r=t+1;for(e.parentType="paragraph";r<n&&!e.isEmpty(r);r++){if(e.sCount[r]-e.blkIndent>3||e.sCount[r]<0)continue;let d=!1;for(let f=0,c=u.length;f<c;f++)if(u[f](e,r,n,!0)){d=!0;break}if(d)break}const a=e.getLines(t,r,e.blkIndent,!1).trim();e.line=r;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const jr=[["table",Od,["paragraph","reference"]],["code",Ld],["fence",Pd,["paragraph","reference","blockquote","list"]],["blockquote",Vd,["paragraph","reference","blockquote","list"]],["hr",Rd,["paragraph","reference","blockquote","list"]],["list",Bd,["paragraph","reference","blockquote"]],["reference",zd],["html_block",Yd,["paragraph","reference","blockquote"]],["heading",Kd,["paragraph","reference","blockquote"]],["lheading",Qd],["paragraph",Jd]];function Hr(){this.ruler=new We;for(let e=0;e<jr.length;e++)this.ruler.push(jr[e][0],jr[e][1],{alt:(jr[e][2]||[]).slice()})}Hr.prototype.tokenize=function(e,t,n){const u=this.ruler.getRules(""),o=u.length,r=e.md.options.maxNesting;let a=t,s=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=r){e.line=n;break}const l=e.line;let d=!1;for(let f=0;f<o;f++)if(d=u[f](e,a,n,!1),d){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!d)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<n&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},Hr.prototype.parse=function(e,t,n,u){if(!e)return;const o=new this.State(e,t,n,u);this.tokenize(o,o.line,o.lineMax)},Hr.prototype.State=wt;function $n(e,t,n,u){this.src=e,this.env=n,this.md=t,this.tokens=u,this.tokens_meta=Array(u.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}$n.prototype.pushPending=function(){const e=new st("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},$n.prototype.push=function(e,t,n){this.pending&&this.pushPending();const u=new st(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),u.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(u),this.tokens_meta.push(o),u},$n.prototype.scanDelims=function(e,t){const n=this.posMax,u=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32;let r=e;for(;r<n&&this.src.charCodeAt(r)===u;)r++;const a=r-e,s=r<n?this.src.charCodeAt(r):32,l=Hn(o)||jn(String.fromCharCode(o)),d=Hn(s)||jn(String.fromCharCode(s)),f=zn(o),c=zn(s),h=!c&&(!d||f||l),p=!f&&(!l||c||d);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||d),length:a}},$n.prototype.Token=st;function e0(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function t0(e,t){let n=e.pos;for(;n<e.posMax&&!e0(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const n0=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function r0(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,u=e.posMax;if(n+3>u||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(n0);if(!o)return!1;const r=o[1],a=e.md.linkify.matchAtStart(e.src.slice(n-r.length));if(!a)return!1;let s=a.url;if(s.length<=r.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const d=e.md.normalizeLink(s);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-r.length);const f=e.push("link_open","a",1);f.attrs=[["href",d]],f.markup="linkify",f.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-r.length,!0}function u0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const u=e.pending.length-1,o=e.posMax;if(!t)if(u>=0&&e.pending.charCodeAt(u)===32)if(u>=1&&e.pending.charCodeAt(u-1)===32){let r=u-1;for(;r>=1&&e.pending.charCodeAt(r-1)===32;)r--;e.pending=e.pending.slice(0,r),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(n++;n<o&&ce(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Ju=[];for(let e=0;e<256;e++)Ju.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Ju[e.charCodeAt(0)]=1});function o0(e,t){let n=e.pos;const u=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=u))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<u&&(o=e.src.charCodeAt(n),!!ce(o));)n++;return e.pos=n,!0}let r=e.src[n];if(o>=55296&&o<=56319&&n+1<u){const s=e.src.charCodeAt(n+1);s>=56320&&s<=57343&&(r+=e.src[n+1],n++)}const a="\\"+r;if(!t){const s=e.push("text_special","",0);o<256&&Ju[o]!==0?s.content=r:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function i0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const r=e.posMax;for(;n<r&&e.src.charCodeAt(n)===96;)n++;const a=e.src.slice(o,n),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=o)return t||(e.pending+=a),e.pos+=s,!0;let l=n,d;for(;(d=e.src.indexOf("`",l))!==-1;){for(l=d+1;l<r&&e.src.charCodeAt(l)===96;)l++;const f=l-d;if(f===s){if(!t){const c=e.push("code_inline","code",0);c.markup=a,c.content=e.src.slice(n,d).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[f]=d}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function a0(e,t){const n=e.pos,u=e.src.charCodeAt(n);if(t||u!==126)return!1;const o=e.scanDelims(e.pos,!0);let r=o.length;const a=String.fromCharCode(u);if(r<2)return!1;let s;r%2&&(s=e.push("text","",0),s.content=a,r--);for(let l=0;l<r;l+=2)s=e.push("text","",0),s.content=a+a,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 Gi(e,t){let n;const u=[],o=t.length;for(let r=0;r<o;r++){const a=t[r];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[s.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&u.push(s.token-1)}for(;u.length;){const r=u.pop();let a=r+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,r!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[r],e.tokens[r]=n)}}function s0(e){const t=e.tokens_meta,n=e.tokens_meta.length;Gi(e,e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&Gi(e,t[u].delimiters)}const Xi={tokenize:a0,postProcess:s0};function l0(e,t){const n=e.pos,u=e.src.charCodeAt(n);if(t||u!==95&&u!==42)return!1;const o=e.scanDelims(e.pos,u===42);for(let r=0;r<o.length;r++){const a=e.push("text","",0);a.content=String.fromCharCode(u),e.delimiters.push({marker:u,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 qi(e,t){const n=t.length;for(let u=n-1;u>=0;u--){const o=t[u];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const r=t[o.end],a=u>0&&t[u-1].end===o.end+1&&t[u-1].marker===o.marker&&t[u-1].token===o.token-1&&t[o.end+1].token===r.token+1,s=String.fromCharCode(o.marker),l=e.tokens[o.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const d=e.tokens[r.token];d.type=a?"strong_close":"em_close",d.tag=a?"strong":"em",d.nesting=-1,d.markup=a?s+s:s,d.content="",a&&(e.tokens[t[u-1].token].content="",e.tokens[t[o.end+1].token].content="",u--)}}function c0(e){const t=e.tokens_meta,n=e.tokens_meta.length;qi(e,e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&qi(e,t[u].delimiters)}const Zi={tokenize:l0,postProcess:c0};function d0(e,t){let n,u,o,r,a="",s="",l=e.pos,d=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const f=e.pos,c=e.posMax,h=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<c&&e.src.charCodeAt(m)===40){for(d=!1,m++;m<c&&(n=e.src.charCodeAt(m),!(!ce(n)&&n!==10));m++);if(m>=c)return!1;if(l=m,o=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),o.ok){for(a=e.md.normalizeLink(o.str),e.md.validateLink(a)?m=o.pos:a="",l=m;m<c&&(n=e.src.charCodeAt(m),!(!ce(n)&&n!==10));m++);if(o=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<c&&l!==m&&o.ok)for(s=o.str,m=o.pos;m<c&&(n=e.src.charCodeAt(m),!(!ce(n)&&n!==10));m++);}(m>=c||e.src.charCodeAt(m)!==41)&&(d=!0),m++}if(d){if(typeof e.env.references>"u")return!1;if(m<c&&e.src.charCodeAt(m)===91?(l=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?u=e.src.slice(l,m++):m=p+1):m=p+1,u||(u=e.src.slice(h,p)),r=e.env.references[Br(u)],!r)return e.pos=f,!1;a=r.href,s=r.title}if(!t){e.pos=h,e.posMax=p;const w=e.push("link_open","a",1),y=[["href",a]];w.attrs=y,s&&y.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=c,!0}function f0(e,t){let n,u,o,r,a,s,l,d,f="";const c=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(r=m+1,r<h&&e.src.charCodeAt(r)===40){for(r++;r<h&&(n=e.src.charCodeAt(r),!(!ce(n)&&n!==10));r++);if(r>=h)return!1;for(d=r,s=e.md.helpers.parseLinkDestination(e.src,r,e.posMax),s.ok&&(f=e.md.normalizeLink(s.str),e.md.validateLink(f)?r=s.pos:f=""),d=r;r<h&&(n=e.src.charCodeAt(r),!(!ce(n)&&n!==10));r++);if(s=e.md.helpers.parseLinkTitle(e.src,r,e.posMax),r<h&&d!==r&&s.ok)for(l=s.str,r=s.pos;r<h&&(n=e.src.charCodeAt(r),!(!ce(n)&&n!==10));r++);else l="";if(r>=h||e.src.charCodeAt(r)!==41)return e.pos=c,!1;r++}else{if(typeof e.env.references>"u")return!1;if(r<h&&e.src.charCodeAt(r)===91?(d=r+1,r=e.md.helpers.parseLinkLabel(e,r),r>=0?o=e.src.slice(d,r++):r=m+1):r=m+1,o||(o=e.src.slice(p,m)),a=e.env.references[Br(o)],!a)return e.pos=c,!1;f=a.href,l=a.title}if(!t){u=e.src.slice(p,m);const w=[];e.md.inline.parse(u,e.md,e.env,w);const y=e.push("image","img",0),A=[["src",f],["alt",""]];y.attrs=A,y.children=w,y.content=u,l&&A.push(["title",l])}return e.pos=r,e.posMax=h,!0}const h0=/^([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])?)*)$/,m0=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function p0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const u=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const r=e.src.slice(u+1,n);if(m0.test(r)){const a=e.md.normalizeLink(r);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(r);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=r.length+2,!0}if(h0.test(r)){const a=e.md.normalizeLink("mailto:"+r);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(r);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=r.length+2,!0}return!1}function g0(e){return/^<a[>\s]/i.test(e)}function b0(e){return/^<\/a\s*>/i.test(e)}function y0(e){const t=e|32;return t>=97&&t<=122}function x0(e,t){if(!e.md.options.html)return!1;const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==60||u+2>=n)return!1;const o=e.src.charCodeAt(u+1);if(o!==33&&o!==63&&o!==47&&!y0(o))return!1;const r=e.src.slice(u).match(qd);if(!r)return!1;if(!t){const a=e.push("html_inline","",0);a.content=r[0],g0(a.content)&&e.linkLevel++,b0(a.content)&&e.linkLevel--}return e.pos+=r[0].length,!0}const w0=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,v0=/^&([a-z][a-z0-9]{1,31});/i;function A0(e,t){const n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=u)return!1;if(e.src.charCodeAt(n+1)===35){const r=e.src.slice(n).match(w0);if(r){if(!t){const a=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),s=e.push("text_special","",0);s.content=Zu(a)?Mr(a):Mr(65533),s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(v0);if(r){const a=Li(r[0]);if(a!==r[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}}return!1}function Yi(e){const t={},n=e.length;if(!n)return;let u=0,o=-2;const r=[];for(let a=0;a<n;a++){const s=e[a];if(r.push(0),(e[u].marker!==s.marker||o!==s.token-1)&&(u=a),o=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let d=u-r[u]-1,f=d;for(;d>l;d-=r[d]+1){const c=e[d];if(c.marker===s.marker&&c.open&&c.end<0){let h=!1;if((c.close||s.open)&&(c.length+s.length)%3===0&&(c.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=d>0&&!e[d-1].open?r[d-1]+1:0;r[a]=a-d+p,r[d]=p,s.open=!1,c.end=a,c.close=!1,f=-1,o=-2;break}}}f!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=f)}}function k0(e){const t=e.tokens_meta,n=e.tokens_meta.length;Yi(e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&Yi(t[u].delimiters)}function C0(e){let t,n,u=0;const o=e.tokens,r=e.tokens.length;for(t=n=0;t<r;t++)o[t].nesting<0&&u--,o[t].level=u,o[t].nesting>0&&u++,o[t].type==="text"&&t+1<r&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const eo=[["text",t0],["linkify",r0],["newline",u0],["escape",o0],["backticks",i0],["strikethrough",Xi.tokenize],["emphasis",Zi.tokenize],["link",d0],["image",f0],["autolink",p0],["html_inline",x0],["entity",A0]],to=[["balance_pairs",k0],["strikethrough",Xi.postProcess],["emphasis",Zi.postProcess],["fragments_join",C0]];function Un(){this.ruler=new We;for(let e=0;e<eo.length;e++)this.ruler.push(eo[e][0],eo[e][1]);this.ruler2=new We;for(let e=0;e<to.length;e++)this.ruler2.push(to[e][0],to[e][1])}Un.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),u=n.length,o=e.md.options.maxNesting,r=e.cache;if(typeof r[t]<"u"){e.pos=r[t];return}let a=!1;if(e.level<o){for(let s=0;s<u;s++)if(e.level++,a=n[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,r[t]=e.pos},Un.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,u=e.posMax,o=e.md.options.maxNesting;for(;e.pos<u;){const r=e.pos;let a=!1;if(e.level<o){for(let s=0;s<n;s++)if(a=t[s](e,!1),a){if(r>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=u)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Un.prototype.parse=function(e,t,n,u){const o=new this.State(e,t,n,u);this.tokenize(o);const r=this.ruler2.getRules(""),a=r.length;for(let s=0;s<a;s++)r[s](o)},Un.prototype.State=$n;function _0(e){const t={};e=e||{},t.src_Any=Ti.source,t.src_Cc=Fi.source,t.src_Z=Ii.source,t.src_P=Wu.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.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]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function no(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(u){e[u]=n[u]})}),e}function $r(e){return Object.prototype.toString.call(e)}function E0(e){return $r(e)==="[object String]"}function S0(e){return $r(e)==="[object Object]"}function D0(e){return $r(e)==="[object RegExp]"}function Ki(e){return $r(e)==="[object Function]"}function T0(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Qi={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function F0(e){return Object.keys(e||{}).reduce(function(t,n){return t||Qi.hasOwnProperty(n)},!1)}const N0={"http:":{validate:function(e,t,n){const u=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(u)?u.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const u=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(u)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:u.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const u=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(u)?u.match(n.re.mailto)[0].length:0}}},I0="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]",O0="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function L0(e){e.__index__=-1,e.__text_cache__=""}function P0(e){return function(t,n){const u=t.slice(n);return e.test(u)?u.match(e)[0].length:0}}function Ji(){return function(e,t){t.normalize(e)}}function Ur(e){const t=e.re=_0(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(I0),n.push(t.src_xn),t.src_tlds=n.join("|");function u(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(u(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(u(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(u(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(u(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function r(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const d={validate:null,link:null};if(e.__compiled__[s]=d,S0(l)){D0(l.validate)?d.validate=P0(l.validate):Ki(l.validate)?d.validate=l.validate:r(s,l),Ki(l.normalize)?d.normalize=l.normalize:l.normalize?r(s,l):d.normalize=Ji();return}if(E0(l)){o.push(s);return}r(s,l)}),o.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:Ji()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(T0).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),L0(e)}function V0(e,t){const n=e.__index__,u=e.__last_index__,o=e.__text_cache__.slice(n,u);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=u+t,this.raw=o,this.text=o,this.url=o}function ro(e,t){const n=new V0(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function qe(e,t){if(!(this instanceof qe))return new qe(e,t);t||F0(e)&&(t=e,e={}),this.__opts__=no({},Qi,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=no({},N0,e),this.__compiled__={},this.__tlds__=O0,this.__tlds_replaced__=!1,this.re={},Ur(this)}qe.prototype.add=function(t,n){return this.__schemas__[t]=n,Ur(this),this},qe.prototype.set=function(t){return this.__opts__=no(this.__opts__,t),this},qe.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,u,o,r,a,s,l,d,f;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(r=this.testSchemaAt(t,n[2],l.lastIndex),r){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(d=t.search(this.re.host_fuzzy_test),d>=0&&(this.__index__<0||d<this.__index__)&&(u=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=u.index+u[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=u.index+u[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=t.indexOf("@"),f>=0&&(o=t.match(this.re.email_fuzzy))!==null&&(a=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0},qe.prototype.pretest=function(t){return this.re.pretest.test(t)},qe.prototype.testSchemaAt=function(t,n,u){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,u,this):0},qe.prototype.match=function(t){const n=[];let u=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(ro(this,u)),u=this.__last_index__);let o=u?t.slice(u):t;for(;this.test(o);)n.push(ro(this,u)),o=o.slice(this.__last_index__),u+=this.__last_index__;return n.length?n:null},qe.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const u=this.testSchemaAt(t,n[2],n[0].length);return u?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+u,ro(this,0)):null},qe.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(u,o,r){return u!==r[o-1]}).reverse(),Ur(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ur(this),this)},qe.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},qe.prototype.onCompile=function(){};const hn=2147483647,vt=36,uo=1,Wn=26,R0=38,M0=700,ea=72,ta=128,na="-",B0=/^xn--/,z0=/[^\0-\x7F]/,j0=/[\x2E\u3002\uFF0E\uFF61]/g,H0={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},oo=vt-uo,At=Math.floor,io=String.fromCharCode;function zt(e){throw new RangeError(H0[e])}function $0(e,t){const n=[];let u=e.length;for(;u--;)n[u]=t(e[u]);return n}function ra(e,t){const n=e.split("@");let u="";n.length>1&&(u=n[0]+"@",e=n[1]),e=e.replace(j0,".");const o=e.split("."),r=$0(o,t).join(".");return u+r}function ua(e){const t=[];let n=0;const u=e.length;for(;n<u;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<u){const r=e.charCodeAt(n++);(r&64512)==56320?t.push(((o&1023)<<10)+(r&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const U0=e=>String.fromCodePoint(...e),W0=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:vt},oa=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ia=function(e,t,n){let u=0;for(e=n?At(e/M0):e>>1,e+=At(e/t);e>oo*Wn>>1;u+=vt)e=At(e/oo);return At(u+(oo+1)*e/(e+R0))},aa=function(e){const t=[],n=e.length;let u=0,o=ta,r=ea,a=e.lastIndexOf(na);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&zt("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<n;){const l=u;for(let f=1,c=vt;;c+=vt){s>=n&&zt("invalid-input");const h=W0(e.charCodeAt(s++));h>=vt&&zt("invalid-input"),h>At((hn-u)/f)&&zt("overflow"),u+=h*f;const p=c<=r?uo:c>=r+Wn?Wn:c-r;if(h<p)break;const m=vt-p;f>At(hn/m)&&zt("overflow"),f*=m}const d=t.length+1;r=ia(u-l,d,l==0),At(u/d)>hn-o&&zt("overflow"),o+=At(u/d),u%=d,t.splice(u++,0,o)}return String.fromCodePoint(...t)},sa=function(e){const t=[];e=ua(e);const n=e.length;let u=ta,o=0,r=ea;for(const l of e)l<128&&t.push(io(l));const a=t.length;let s=a;for(a&&t.push(na);s<n;){let l=hn;for(const f of e)f>=u&&f<l&&(l=f);const d=s+1;l-u>At((hn-o)/d)&&zt("overflow"),o+=(l-u)*d,u=l;for(const f of e)if(f<u&&++o>hn&&zt("overflow"),f===u){let c=o;for(let h=vt;;h+=vt){const p=h<=r?uo:h>=r+Wn?Wn:h-r;if(c<p)break;const m=c-p,w=vt-p;t.push(io(oa(p+m%w,0))),c=At(m/w)}t.push(io(oa(c,0))),r=ia(o,d,s===a),o=0,++s}++o,++u}return t.join("")},la={version:"2.3.1",ucs2:{decode:ua,encode:U0},decode:aa,encode:sa,toASCII:function(e){return ra(e,function(t){return z0.test(t)?"xn--"+sa(t):t})},toUnicode:function(e){return ra(e,function(t){return B0.test(t)?aa(t.slice(4).toLowerCase()):t})}},G0={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},X0=/^(vbscript|javascript|file|data):/,q0=/^data:image\/(gif|png|jpeg|webp);/;function Z0(e){const t=e.trim().toLowerCase();return X0.test(t)?q0.test(t):!0}const ca=["http:","https:","mailto:"];function Y0(e){const t=Uu(e,!0);if(t.hostname&&(!t.protocol||ca.indexOf(t.protocol)>=0))try{t.hostname=la.toASCII(t.hostname)}catch{}return Bn($u(t))}function K0(e){const t=Uu(e,!0);if(t.hostname&&(!t.protocol||ca.indexOf(t.protocol)>=0))try{t.hostname=la.toUnicode(t.hostname)}catch{}return ln($u(t),ln.defaultChars+"%")}function Ze(e,t){if(!(this instanceof Ze))return new Ze(e,t);t||qu(e)||(t=e||{},e="default"),this.inline=new Un,this.block=new Hr,this.core=new Ku,this.renderer=new dn,this.linkify=new qe,this.validateLink=Z0,this.normalizeLink=Y0,this.normalizeLinkText=K0,this.utils=sd,this.helpers=Rr({},fd),this.options={},this.configure(e),t&&this.set(t)}Ze.prototype.set=function(e){return Rr(this.options,e),this},Ze.prototype.configure=function(e){const t=this;if(qu(e)){const n=e;if(e=G0[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Ze.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const u=e.filter(function(o){return n.indexOf(o)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+u);return this},Ze.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const u=e.filter(function(o){return n.indexOf(o)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+u);return this},Ze.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Ze.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Ze.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Ze.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Ze.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:da,setPrototypeOf:fa,isFrozen:Q0,getPrototypeOf:J0,getOwnPropertyDescriptor:ef}=Object;let{freeze:ze,seal:ut,create:Wr}=Object,{apply:ao,construct:so}=typeof Reflect<"u"&&Reflect;ze||(ze=function(t){return t}),ut||(ut=function(t){return t}),ao||(ao=function(t,n){for(var u=arguments.length,o=new Array(u>2?u-2:0),r=2;r<u;r++)o[r-2]=arguments[r];return t.apply(n,o)}),so||(so=function(t){for(var n=arguments.length,u=new Array(n>1?n-1:0),o=1;o<n;o++)u[o-1]=arguments[o];return new t(...u)});const Gr=He(Array.prototype.forEach),tf=He(Array.prototype.lastIndexOf),ha=He(Array.prototype.pop),Gn=He(Array.prototype.push),nf=He(Array.prototype.splice),Xr=He(String.prototype.toLowerCase),lo=He(String.prototype.toString),co=He(String.prototype.match),Xn=He(String.prototype.replace),rf=He(String.prototype.indexOf),uf=He(String.prototype.trim),Ye=He(Object.prototype.hasOwnProperty),je=He(RegExp.prototype.test),qn=of(TypeError);function He(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,u=new Array(n>1?n-1:0),o=1;o<n;o++)u[o-1]=arguments[o];return ao(e,t,u)}}function of(e){return function(){for(var t=arguments.length,n=new Array(t),u=0;u<t;u++)n[u]=arguments[u];return so(e,n)}}function oe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xr;fa&&fa(e,null);let u=t.length;for(;u--;){let o=t[u];if(typeof o=="string"){const r=n(o);r!==o&&(Q0(t)||(t[u]=r),o=r)}e[o]=!0}return e}function af(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function kt(e){const t=Wr(null);for(const[n,u]of da(e))Ye(e,n)&&(Array.isArray(u)?t[n]=af(u):u&&typeof u=="object"&&u.constructor===Object?t[n]=kt(u):t[n]=u);return t}function Zn(e,t){for(;e!==null;){const u=ef(e,t);if(u){if(u.get)return He(u.get);if(typeof u.value=="function")return He(u.value)}e=J0(e)}function n(){return null}return n}const ma=ze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fo=ze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ho=ze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sf=ze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mo=ze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),lf=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pa=ze(["#text"]),ga=ze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),po=ze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ba=ze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),qr=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cf=ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),df=ut(/<%[\w\W]*|[\w\W]*%>/gm),ff=ut(/\$\{[\w\W]*/gm),hf=ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),mf=ut(/^aria-[\-\w]+$/),ya=ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pf=ut(/^(?:\w+script|data):/i),gf=ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xa=ut(/^html$/i),bf=ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var wa=Object.freeze({__proto__:null,ARIA_ATTR:mf,ATTR_WHITESPACE:gf,CUSTOM_ELEMENT:bf,DATA_ATTR:hf,DOCTYPE_NAME:xa,ERB_EXPR:df,IS_ALLOWED_URI:ya,IS_SCRIPT_OR_DATA:pf,MUSTACHE_EXPR:cf,TMPLIT_EXPR:ff});const Yn={element:1,text:3,progressingInstruction:7,comment:8,document:9},yf=function(){return typeof window>"u"?null:window},xf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let u=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(u=n.getAttribute(o));const r="dompurify"+(u?"#"+u:"");try{return t.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},va=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Aa(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yf();const t=J=>Aa(J);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==Yn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const u=n,o=u.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:c,DOMParser:h,trustedTypes:p}=e,m=l.prototype,w=Zn(m,"cloneNode"),y=Zn(m,"remove"),A=Zn(m,"nextSibling"),b=Zn(m,"childNodes"),g=Zn(m,"parentNode");if(typeof a=="function"){const J=n.createElement("template");J.content&&J.content.ownerDocument&&(n=J.content.ownerDocument)}let x,k="";const{implementation:F,createNodeIterator:T,createDocumentFragment:D,getElementsByTagName:U}=n,{importNode:_}=u;let N=va();t.isSupported=typeof da=="function"&&typeof g=="function"&&F&&F.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:I,ERB_EXPR:C,TMPLIT_EXPR:P,DATA_ATTR:V,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:$}=wa;let{IS_ALLOWED_URI:re}=wa,te=null;const z=oe({},[...ma,...fo,...ho,...mo,...pa]);let j=null;const L=oe({},[...ga,...po,...ba,...qr]);let B=Object.seal(Wr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,K=null;const Z=Object.seal(Wr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Y=!0,ue=!0,le=!1,Te=!0,Fe=!1,yt=!0,Me=!1,On=!1,Xt=!1,Ot=!1,Nu=!1,Iu=!1,Dl=!0,Tl=!1;const z1="user-content-";let Jo=!0,Tr=!1,Ln={},Ft=null;const ei=oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Fl=null;const Nl=oe({},["audio","video","img","source","image","track"]);let ti=null;const Il=oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ou="http://www.w3.org/1998/Math/MathML",Lu="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let Pn=Lt,ni=!1,ri=null;const j1=oe({},[Ou,Lu,Lt],lo);let Pu=oe({},["mi","mo","mn","ms","mtext"]),Vu=oe({},["annotation-xml"]);const H1=oe({},["title","style","font","a","script"]);let Fr=null;const $1=["application/xhtml+xml","text/html"],U1="text/html";let Ce=null,Vn=null;const W1=n.createElement("form"),Ol=function(S){return S instanceof RegExp||S instanceof Function},ui=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Vn&&Vn===S)){if((!S||typeof S!="object")&&(S={}),S=kt(S),Fr=$1.indexOf(S.PARSER_MEDIA_TYPE)===-1?U1:S.PARSER_MEDIA_TYPE,Ce=Fr==="application/xhtml+xml"?lo:Xr,te=Ye(S,"ALLOWED_TAGS")?oe({},S.ALLOWED_TAGS,Ce):z,j=Ye(S,"ALLOWED_ATTR")?oe({},S.ALLOWED_ATTR,Ce):L,ri=Ye(S,"ALLOWED_NAMESPACES")?oe({},S.ALLOWED_NAMESPACES,lo):j1,ti=Ye(S,"ADD_URI_SAFE_ATTR")?oe(kt(Il),S.ADD_URI_SAFE_ATTR,Ce):Il,Fl=Ye(S,"ADD_DATA_URI_TAGS")?oe(kt(Nl),S.ADD_DATA_URI_TAGS,Ce):Nl,Ft=Ye(S,"FORBID_CONTENTS")?oe({},S.FORBID_CONTENTS,Ce):ei,W=Ye(S,"FORBID_TAGS")?oe({},S.FORBID_TAGS,Ce):kt({}),K=Ye(S,"FORBID_ATTR")?oe({},S.FORBID_ATTR,Ce):kt({}),Ln=Ye(S,"USE_PROFILES")?S.USE_PROFILES:!1,Y=S.ALLOW_ARIA_ATTR!==!1,ue=S.ALLOW_DATA_ATTR!==!1,le=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Fe=S.SAFE_FOR_TEMPLATES||!1,yt=S.SAFE_FOR_XML!==!1,Me=S.WHOLE_DOCUMENT||!1,Ot=S.RETURN_DOM||!1,Nu=S.RETURN_DOM_FRAGMENT||!1,Iu=S.RETURN_TRUSTED_TYPE||!1,Xt=S.FORCE_BODY||!1,Dl=S.SANITIZE_DOM!==!1,Tl=S.SANITIZE_NAMED_PROPS||!1,Jo=S.KEEP_CONTENT!==!1,Tr=S.IN_PLACE||!1,re=S.ALLOWED_URI_REGEXP||ya,Pn=S.NAMESPACE||Lt,Pu=S.MATHML_TEXT_INTEGRATION_POINTS||Pu,Vu=S.HTML_INTEGRATION_POINTS||Vu,B=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&Ol(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&Ol(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(ue=!1),Nu&&(Ot=!0),Ln&&(te=oe({},pa),j=Wr(null),Ln.html===!0&&(oe(te,ma),oe(j,ga)),Ln.svg===!0&&(oe(te,fo),oe(j,po),oe(j,qr)),Ln.svgFilters===!0&&(oe(te,ho),oe(j,po),oe(j,qr)),Ln.mathMl===!0&&(oe(te,mo),oe(j,ba),oe(j,qr))),Ye(S,"ADD_TAGS")||(Z.tagCheck=null),Ye(S,"ADD_ATTR")||(Z.attributeCheck=null),S.ADD_TAGS&&(typeof S.ADD_TAGS=="function"?Z.tagCheck=S.ADD_TAGS:(te===z&&(te=kt(te)),oe(te,S.ADD_TAGS,Ce))),S.ADD_ATTR&&(typeof S.ADD_ATTR=="function"?Z.attributeCheck=S.ADD_ATTR:(j===L&&(j=kt(j)),oe(j,S.ADD_ATTR,Ce))),S.ADD_URI_SAFE_ATTR&&oe(ti,S.ADD_URI_SAFE_ATTR,Ce),S.FORBID_CONTENTS&&(Ft===ei&&(Ft=kt(Ft)),oe(Ft,S.FORBID_CONTENTS,Ce)),S.ADD_FORBID_CONTENTS&&(Ft===ei&&(Ft=kt(Ft)),oe(Ft,S.ADD_FORBID_CONTENTS,Ce)),Jo&&(te["#text"]=!0),Me&&oe(te,["html","head","body"]),te.table&&(oe(te,["tbody"]),delete W.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=S.TRUSTED_TYPES_POLICY,k=x.createHTML("")}else x===void 0&&(x=xf(p,o)),x!==null&&typeof k=="string"&&(k=x.createHTML(""));ze&&ze(S),Vn=S}},Ll=oe({},[...fo,...ho,...sf]),Pl=oe({},[...mo,...lf]),G1=function(S){let H=g(S);(!H||!H.tagName)&&(H={namespaceURI:Pn,tagName:"template"});const Q=Xr(S.tagName),ge=Xr(H.tagName);return ri[S.namespaceURI]?S.namespaceURI===Lu?H.namespaceURI===Lt?Q==="svg":H.namespaceURI===Ou?Q==="svg"&&(ge==="annotation-xml"||Pu[ge]):!!Ll[Q]:S.namespaceURI===Ou?H.namespaceURI===Lt?Q==="math":H.namespaceURI===Lu?Q==="math"&&Vu[ge]:!!Pl[Q]:S.namespaceURI===Lt?H.namespaceURI===Lu&&!Vu[ge]||H.namespaceURI===Ou&&!Pu[ge]?!1:!Pl[Q]&&(H1[Q]||!Ll[Q]):!!(Fr==="application/xhtml+xml"&&ri[S.namespaceURI]):!1},Nt=function(S){Gn(t.removed,{element:S});try{g(S).removeChild(S)}catch{y(S)}},an=function(S,H){try{Gn(t.removed,{attribute:H.getAttributeNode(S),from:H})}catch{Gn(t.removed,{attribute:null,from:H})}if(H.removeAttribute(S),S==="is")if(Ot||Nu)try{Nt(H)}catch{}else try{H.setAttribute(S,"")}catch{}},Vl=function(S){let H=null,Q=null;if(Xt)S="<remove></remove>"+S;else{const ve=co(S,/^[\r\n\t ]+/);Q=ve&&ve[0]}Fr==="application/xhtml+xml"&&Pn===Lt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const ge=x?x.createHTML(S):S;if(Pn===Lt)try{H=new h().parseFromString(ge,Fr)}catch{}if(!H||!H.documentElement){H=F.createDocument(Pn,"template",null);try{H.documentElement.innerHTML=ni?k:ge}catch{}}const Be=H.body||H.documentElement;return S&&Q&&Be.insertBefore(n.createTextNode(Q),Be.childNodes[0]||null),Pn===Lt?U.call(H,Me?"html":"body")[0]:Me?H.documentElement:Be},Rl=function(S){return T.call(S.ownerDocument||S,S,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},oi=function(S){return S instanceof c&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof f)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Ml=function(S){return typeof s=="function"&&S instanceof s};function Pt(J,S,H){Gr(J,Q=>{Q.call(t,S,H,Vn)})}const Bl=function(S){let H=null;if(Pt(N.beforeSanitizeElements,S,null),oi(S))return Nt(S),!0;const Q=Ce(S.nodeName);if(Pt(N.uponSanitizeElement,S,{tagName:Q,allowedTags:te}),yt&&S.hasChildNodes()&&!Ml(S.firstElementChild)&&je(/<[/\w!]/g,S.innerHTML)&&je(/<[/\w!]/g,S.textContent)||S.nodeType===Yn.progressingInstruction||yt&&S.nodeType===Yn.comment&&je(/<[/\w]/g,S.data))return Nt(S),!0;if(!(Z.tagCheck instanceof Function&&Z.tagCheck(Q))&&(!te[Q]||W[Q])){if(!W[Q]&&jl(Q)&&(B.tagNameCheck instanceof RegExp&&je(B.tagNameCheck,Q)||B.tagNameCheck instanceof Function&&B.tagNameCheck(Q)))return!1;if(Jo&&!Ft[Q]){const ge=g(S)||S.parentNode,Be=b(S)||S.childNodes;if(Be&&ge){const ve=Be.length;for(let Xe=ve-1;Xe>=0;--Xe){const Vt=w(Be[Xe],!0);Vt.__removalCount=(S.__removalCount||0)+1,ge.insertBefore(Vt,A(S))}}}return Nt(S),!0}return S instanceof l&&!G1(S)||(Q==="noscript"||Q==="noembed"||Q==="noframes")&&je(/<\/no(script|embed|frames)/i,S.innerHTML)?(Nt(S),!0):(Fe&&S.nodeType===Yn.text&&(H=S.textContent,Gr([I,C,P],ge=>{H=Xn(H,ge," ")}),S.textContent!==H&&(Gn(t.removed,{element:S.cloneNode()}),S.textContent=H)),Pt(N.afterSanitizeElements,S,null),!1)},zl=function(S,H,Q){if(K[H]||Dl&&(H==="id"||H==="name")&&(Q in n||Q in W1))return!1;if(!(ue&&!K[H]&&je(V,H))){if(!(Y&&je(E,H))){if(!(Z.attributeCheck instanceof Function&&Z.attributeCheck(H,S))){if(!j[H]||K[H]){if(!(jl(S)&&(B.tagNameCheck instanceof RegExp&&je(B.tagNameCheck,S)||B.tagNameCheck instanceof Function&&B.tagNameCheck(S))&&(B.attributeNameCheck instanceof RegExp&&je(B.attributeNameCheck,H)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(H,S))||H==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&je(B.tagNameCheck,Q)||B.tagNameCheck instanceof Function&&B.tagNameCheck(Q))))return!1}else if(!ti[H]){if(!je(re,Xn(Q,M,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&S!=="script"&&rf(Q,"data:")===0&&Fl[S])){if(!(le&&!je(R,Xn(Q,M,"")))){if(Q)return!1}}}}}}}return!0},jl=function(S){return S!=="annotation-xml"&&co(S,$)},Hl=function(S){Pt(N.beforeSanitizeAttributes,S,null);const{attributes:H}=S;if(!H||oi(S))return;const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let ge=H.length;for(;ge--;){const Be=H[ge],{name:ve,namespaceURI:Xe,value:Vt}=Be,Rn=Ce(ve),ii=Vt;let Oe=ve==="value"?ii:uf(ii);if(Q.attrName=Rn,Q.attrValue=Oe,Q.keepAttr=!0,Q.forceKeepAttr=void 0,Pt(N.uponSanitizeAttribute,S,Q),Oe=Q.attrValue,Tl&&(Rn==="id"||Rn==="name")&&(an(ve,S),Oe=z1+Oe),yt&&je(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Oe)){an(ve,S);continue}if(Rn==="attributename"&&co(Oe,"href")){an(ve,S);continue}if(Q.forceKeepAttr)continue;if(!Q.keepAttr){an(ve,S);continue}if(!Te&&je(/\/>/i,Oe)){an(ve,S);continue}Fe&&Gr([I,C,P],Ul=>{Oe=Xn(Oe,Ul," ")});const $l=Ce(S.nodeName);if(!zl($l,Rn,Oe)){an(ve,S);continue}if(x&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Xe)switch(p.getAttributeType($l,Rn)){case"TrustedHTML":{Oe=x.createHTML(Oe);break}case"TrustedScriptURL":{Oe=x.createScriptURL(Oe);break}}if(Oe!==ii)try{Xe?S.setAttributeNS(Xe,ve,Oe):S.setAttribute(ve,Oe),oi(S)?Nt(S):ha(t.removed)}catch{an(ve,S)}}Pt(N.afterSanitizeAttributes,S,null)},X1=function J(S){let H=null;const Q=Rl(S);for(Pt(N.beforeSanitizeShadowDOM,S,null);H=Q.nextNode();)Pt(N.uponSanitizeShadowNode,H,null),Bl(H),Hl(H),H.content instanceof r&&J(H.content);Pt(N.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(J){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,Q=null,ge=null,Be=null;if(ni=!J,ni&&(J="<!-->"),typeof J!="string"&&!Ml(J))if(typeof J.toString=="function"){if(J=J.toString(),typeof J!="string")throw qn("dirty is not a string, aborting")}else throw qn("toString is not a function");if(!t.isSupported)return J;if(On||ui(S),t.removed=[],typeof J=="string"&&(Tr=!1),Tr){if(J.nodeName){const Vt=Ce(J.nodeName);if(!te[Vt]||W[Vt])throw qn("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof s)H=Vl("<!---->"),Q=H.ownerDocument.importNode(J,!0),Q.nodeType===Yn.element&&Q.nodeName==="BODY"||Q.nodeName==="HTML"?H=Q:H.appendChild(Q);else{if(!Ot&&!Fe&&!Me&&J.indexOf("<")===-1)return x&&Iu?x.createHTML(J):J;if(H=Vl(J),!H)return Ot?null:Iu?k:""}H&&Xt&&Nt(H.firstChild);const ve=Rl(Tr?J:H);for(;ge=ve.nextNode();)Bl(ge),Hl(ge),ge.content instanceof r&&X1(ge.content);if(Tr)return J;if(Ot){if(Nu)for(Be=D.call(H.ownerDocument);H.firstChild;)Be.appendChild(H.firstChild);else Be=H;return(j.shadowroot||j.shadowrootmode)&&(Be=_.call(u,Be,!0)),Be}let Xe=Me?H.outerHTML:H.innerHTML;return Me&&te["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&je(xa,H.ownerDocument.doctype.name)&&(Xe="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
|
|
17
|
-
`+Xe),
|
|
11
|
+
`},xt.text=function(e,t){return Bt(e[t].content)},xt.html_block=function(e,t){return e[t].content},xt.html_inline=function(e,t){return e[t].content};function dn(){this.rules=Rr({},xt)}dn.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+Bt(t.attrs[n][0])+'="'+Bt(t.attrs[n][1])+'"';return o},dn.prototype.renderToken=function(t,n,r){const o=t[n];let u="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(u+=`
|
|
12
|
+
`),u+=(o.nesting===-1?"</":"<")+o.tag,u+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(u+=" /");let a=!1;if(o.block&&(a=!0,o.nesting===1&&n+1<t.length)){const s=t[n+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===o.tag)&&(a=!1)}return u+=a?`>
|
|
13
|
+
`:">",u},dn.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let u=0,a=e.length;u<a;u++){const s=e[u].type;typeof o[s]<"u"?r+=o[s](e,u,t,n,this):r+=this.renderToken(e,u,t)}return r},dn.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,u=e.length;o<u;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
|
|
14
|
+
`;break}return r},dn.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let u=0,a=e.length;u<a;u++){const s=e[u].type;s==="inline"?r+=this.renderInline(e[u].children,t,n):typeof o[s]<"u"?r+=o[s](e,u,t,n,this):r+=this.renderToken(e,u,t,n)}return r};function We(){this.__rules__=[],this.__cache__=null}We.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},We.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})},We.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},We.prototype.before=function(e,t,n,r){const o=this.__find__(e),u=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:u.alt||[]}),this.__cache__=null},We.prototype.after=function(e,t,n,r){const o=this.__find__(e),u=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:u.alt||[]}),this.__cache__=null},We.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},We.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n},We.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)},We.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n},We.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function st(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}st.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1},st.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},st.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o},st.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r},st.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function zi(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}zi.prototype.Token=st;const xd=/\r\n?|\n/g,wd=/\0/g;function vd(e){let t;t=e.src.replace(xd,`
|
|
15
|
+
`),t=t.replace(wd,"�"),e.src=t}function Ad(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function kd(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function Cd(e){return/^<a[>\s]/i.test(e)}function _d(e){return/^<\/a\s*>/i.test(e)}function Ed(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,u=0;for(let a=o.length-1;a>=0;a--){const s=o[a];if(s.type==="link_close"){for(a--;o[a].level!==s.level&&o[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(Cd(s.content)&&u>0&&u--,_d(s.content)&&u++),!(u>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let d=e.md.linkify.match(l);const f=[];let c=s.level,h=0;d.length>0&&d[0].index===0&&a>0&&o[a-1].type==="text_special"&&(d=d.slice(1));for(let m=0;m<d.length;m++){const p=d[m].url,w=e.md.normalizeLink(p);if(!e.md.validateLink(w))continue;let y=d[m].text;d[m].schema?d[m].schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const A=d[m].index;if(A>h){const k=new e.Token("text","",0);k.content=l.slice(h,A),k.level=c,f.push(k)}const b=new e.Token("link_open","a",1);b.attrs=[["href",w]],b.level=c++,b.markup="linkify",b.info="auto",f.push(b);const g=new e.Token("text","",0);g.content=y,g.level=c,f.push(g);const x=new e.Token("link_close","a",-1);x.level=--c,x.markup="linkify",x.info="auto",f.push(x),h=d[m].lastIndex}if(h<l.length){const m=new e.Token("text","",0);m.content=l.slice(h),m.level=c,f.push(m)}t[n].children=o=Mi(o,a,f)}}}}const ji=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Sd=/\((c|tm|r)\)/i,Dd=/\((c|tm|r)\)/ig,Fd={c:"©",r:"®",tm:"™"};function Td(e,t){return Fd[t.toLowerCase()]}function Nd(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(Dd,Td)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Id(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&ji.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"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Od(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Sd.test(e.tokens[t].content)&&Nd(e.tokens[t].children),ji.test(e.tokens[t].content)&&Id(e.tokens[t].children))}const Ld=/['"]/,Hi=/['"]/g,$i="’";function zr(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Vd(e,t){let n;const r=[];for(let o=0;o<e.length;o++){const u=e[o],a=e[o].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,u.type!=="text")continue;let s=u.content,l=0,d=s.length;e:for(;l<d;){Hi.lastIndex=l;const f=Hi.exec(s);if(!f)break;let c=!0,h=!0;l=f.index+1;const m=f[0]==="'";let p=32;if(f.index-1>=0)p=s.charCodeAt(f.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let w=32;if(l<d)w=s.charCodeAt(l);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){w=e[n].content.charCodeAt(0);break}const y=$n(p)||Hn(String.fromCharCode(p)),A=$n(w)||Hn(String.fromCharCode(w)),b=jn(p),g=jn(w);if(g?c=!1:A&&(b||y||(c=!1)),b?h=!1:y&&(g||A||(h=!1)),w===34&&f[0]==='"'&&p>=48&&p<=57&&(h=c=!1),c&&h&&(c=y,h=A),!c&&!h){m&&(u.content=zr(u.content,f.index,$i));continue}if(h)for(n=r.length-1;n>=0;n--){let x=r[n];if(r[n].level<a)break;if(x.single===m&&r[n].level===a){x=r[n];let k,T;m?(k=t.md.options.quotes[2],T=t.md.options.quotes[3]):(k=t.md.options.quotes[0],T=t.md.options.quotes[1]),u.content=zr(u.content,f.index,T),e[x.token].content=zr(e[x.token].content,x.pos,k),l+=T.length-1,x.token===o&&(l+=k.length-1),s=u.content,d=s.length,r.length=n;continue e}}c?r.push({token:o,pos:f.index,single:m,level:a}):h&&m&&(u.content=zr(u.content,f.index,$i))}}}function Pd(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!Ld.test(e.tokens[t].content)||Vd(e.tokens[t].children,e)}function Rd(e){let t,n;const r=e.tokens,o=r.length;for(let u=0;u<o;u++){if(r[u].type!=="inline")continue;const a=r[u].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=n=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}}const Ku=[["normalize",vd],["block",Ad],["inline",kd],["linkify",Ed],["replacements",Od],["smartquotes",Pd],["text_join",Rd]];function Qu(){this.ruler=new We;for(let e=0;e<Ku.length;e++)this.ruler.push(Ku[e][0],Ku[e][1])}Qu.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},Qu.prototype.State=zi;function wt(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let u=0,a=0,s=0,l=0,d=o.length,f=!1;a<d;a++){const c=o.charCodeAt(a);if(!f)if(ce(c)){s++,c===9?l+=4-l%4:l++;continue}else f=!0;(c===10||a===d-1)&&(c!==10&&a++,this.bMarks.push(u),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),f=!1,s=0,l=0,u=a+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}wt.prototype.push=function(e,t,n){const r=new st(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},wt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},wt.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},wt.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!ce(r))break}return t},wt.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ce(this.src.charCodeAt(--t)))return t+1;return t},wt.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t},wt.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t},wt.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const u=new Array(n-t);for(let a=0,s=t;s<n;s++,a++){let l=0;const d=this.bMarks[s];let f=d,c;for(s+1<n||o?c=this.eMarks[s]+1:c=this.eMarks[s];f<c&&l<r;){const h=this.src.charCodeAt(f);if(ce(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(f-d<this.tShift[s])l++;else break;f++}l>r?u[a]=new Array(l-r+1).join(" ")+this.src.slice(f,c):u[a]=this.src.slice(f,c)}return u.join("")},wt.prototype.Token=st;const Md=65536;function Ju(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Ui(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),u=!1,a=0,s="";for(;r<n;)o===124&&(u?(s+=e.substring(a,r-1),a=r):(t.push(s+e.substring(a,r)),s="",a=r+1)),u=o===92,r++,o=e.charCodeAt(r);return t.push(s+e.substring(a)),t}function Bd(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let u=e.bMarks[o]+e.tShift[o];if(u>=e.eMarks[o])return!1;const a=e.src.charCodeAt(u++);if(a!==124&&a!==45&&a!==58||u>=e.eMarks[o])return!1;const s=e.src.charCodeAt(u++);if(s!==124&&s!==45&&s!==58&&!ce(s)||a===45&&ce(s))return!1;for(;u<e.eMarks[o];){const x=e.src.charCodeAt(u);if(x!==124&&x!==45&&x!==58&&!ce(x))return!1;u++}let l=Ju(e,t+1),d=l.split("|");const f=[];for(let x=0;x<d.length;x++){const k=d[x].trim();if(!k){if(x===0||x===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(k))return!1;k.charCodeAt(k.length-1)===58?f.push(k.charCodeAt(0)===58?"center":"right"):k.charCodeAt(0)===58?f.push("left"):f.push("")}if(l=Ju(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;d=Ui(l),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop();const c=d.length;if(c===0||c!==f.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const m=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),w=[t,0];p.map=w;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const A=e.push("tr_open","tr",1);A.map=[t,t+1];for(let x=0;x<d.length;x++){const k=e.push("th_open","th",1);f[x]&&(k.attrs=[["style","text-align:"+f[x]]]);const T=e.push("inline","",0);T.content=d[x].trim(),T.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let b,g=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let x=!1;for(let T=0,D=m.length;T<D;T++)if(m[T](e,o,n,!0)){x=!0;break}if(x||(l=Ju(e,o).trim(),!l)||e.sCount[o]-e.blkIndent>=4||(d=Ui(l),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),g+=c-d.length,g>Md))break;if(o===t+2){const T=e.push("tbody_open","tbody",1);T.map=b=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let T=0;T<c;T++){const D=e.push("td_open","td",1);f[T]&&(D.attrs=[["style","text-align:"+f[T]]]);const S=e.push("inline","",0);S.content=d[T]?d[T].trim():"",S.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return b&&(e.push("tbody_close","tbody",-1),b[1]=o),e.push("table_close","table",-1),w[1]=o,e.parentType=h,e.line=o,!0}function zd(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const u=e.push("code_block","code",0);return u.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
16
|
+
`,u.map=[t,e.line],!0}function jd(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>u)return!1;const a=e.src.charCodeAt(o);if(a!==126&&a!==96)return!1;let s=o;o=e.skipChars(o,a);let l=o-s;if(l<3)return!1;const d=e.src.slice(s,o),f=e.src.slice(o,u);if(a===96&&f.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let c=t,h=!1;for(;c++,!(c>=n||(o=s=e.bMarks[c]+e.tShift[c],u=e.eMarks[c],o<u&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(o)===a&&!(e.sCount[c]-e.blkIndent>=4)&&(o=e.skipChars(o,a),!(o-s<l)&&(o=e.skipSpaces(o),!(o<u)))){h=!0;break}l=e.sCount[t],e.line=c+(h?1:0);const m=e.push("fence","code",0);return m.info=f,m.content=e.getLines(t+1,c,l,!0),m.markup=d,m.map=[t,e.line],!0}function Hd(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const s=[],l=[],d=[],f=[],c=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let m=!1,p;for(p=t;p<n;p++){const g=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],u=e.eMarks[p],o>=u)break;if(e.src.charCodeAt(o++)===62&&!g){let k=e.sCount[p]+1,T,D;e.src.charCodeAt(o)===32?(o++,k++,D=!1,T=!0):e.src.charCodeAt(o)===9?(T=!0,(e.bsCount[p]+k)%4===3?(o++,k++,D=!1):D=!0):T=!1;let S=k;for(s.push(e.bMarks[p]),e.bMarks[p]=o;o<u;){const X=e.src.charCodeAt(o);if(ce(X))X===9?S+=4-(S+e.bsCount[p]+(D?1:0))%4:S++;else break;o++}m=o>=u,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(T?1:0),d.push(e.sCount[p]),e.sCount[p]=S-k,f.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(m)break;let x=!1;for(let k=0,T=c.length;k<T;k++)if(c[k](e,p,n,!0)){x=!0;break}if(x){e.lineMax=p,e.blkIndent!==0&&(s.push(e.bMarks[p]),l.push(e.bsCount[p]),f.push(e.tShift[p]),d.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}s.push(e.bMarks[p]),l.push(e.bsCount[p]),f.push(e.tShift[p]),d.push(e.sCount[p]),e.sCount[p]=-1}const w=e.blkIndent;e.blkIndent=0;const y=e.push("blockquote_open","blockquote",1);y.markup=">";const A=[t,0];y.map=A,e.md.block.tokenize(e,t,p);const b=e.push("blockquote_close","blockquote",-1);b.markup=">",e.lineMax=a,e.parentType=h,A[1]=e.line;for(let g=0;g<f.length;g++)e.bMarks[g+t]=s[g],e.tShift[g+t]=f[g],e.sCount[g+t]=d[g],e.bsCount[g+t]=l[g];return e.blkIndent=w,!0}function $d(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let u=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(u++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;u<o;){const d=e.src.charCodeAt(u++);if(d!==a&&!ce(d))return!1;d===a&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function Wi(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const u=e.src.charCodeAt(r);if(!ce(u))return-1}return r}function Gi(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let u=e.src.charCodeAt(o++);if(u<48||u>57)return-1;for(;;){if(o>=r)return-1;if(u=e.src.charCodeAt(o++),u>=48&&u<=57){if(o-n>=10)return-1;continue}if(u===41||u===46)break;return-1}return o<r&&(u=e.src.charCodeAt(o),!ce(u))?-1:o}function Ud(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Wd(e,t,n,r){let o,u,a,s,l=t,d=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let f=!1;r&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(f=!0);let c,h,m;if((m=Gi(e,l))>=0){if(c=!0,a=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(a,m-1)),f&&h!==1)return!1}else if((m=Wi(e,l))>=0)c=!1;else return!1;if(f&&e.skipSpaces(m)>=e.eMarks[l])return!1;if(r)return!0;const p=e.src.charCodeAt(m-1),w=e.tokens.length;c?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const y=[l,0];s.map=y,s.markup=String.fromCharCode(p);let A=!1;const b=e.md.block.ruler.getRules("list"),g=e.parentType;for(e.parentType="list";l<n;){u=m,o=e.eMarks[l];const x=e.sCount[l]+m-(e.bMarks[l]+e.tShift[l]);let k=x;for(;u<o;){const _=e.src.charCodeAt(u);if(_===9)k+=4-(k+e.bsCount[l])%4;else if(_===32)k++;else break;u++}const T=u;let D;T>=o?D=1:D=k-x,D>4&&(D=1);const S=x+D;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(p);const X=[l,0];s.map=X,c&&(s.info=e.src.slice(a,m-1));const z=e.tight,B=e.tShift[l],j=e.sCount[l],I=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[l]=T-e.bMarks[l],e.sCount[l]=k,T>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||A)&&(d=!1),A=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=I,e.tShift[l]=B,e.sCount[l]=j,e.tight=z,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(p),l=e.line,X[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let W=!1;for(let _=0,C=b.length;_<C;_++)if(b[_](e,l,n,!0)){W=!0;break}if(W)break;if(c){if(m=Gi(e,l),m<0)break;a=e.bMarks[l]+e.tShift[l]}else if(m=Wi(e,l),m<0)break;if(p!==e.src.charCodeAt(m-1))break}return c?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(p),y[1]=l,e.line=l,e.parentType=g,d&&Ud(e,w),!0}function Gd(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],u=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function s(b){const g=e.lineMax;if(b>=g||e.isEmpty(b))return null;let x=!1;if(e.sCount[b]-e.blkIndent>3&&(x=!0),e.sCount[b]<0&&(x=!0),!x){const D=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let X=!1;for(let z=0,B=D.length;z<B;z++)if(D[z](e,b,g,!0)){X=!0;break}if(e.parentType=S,X)return null}const k=e.bMarks[b]+e.tShift[b],T=e.eMarks[b];return e.src.slice(k,T+1)}let l=e.src.slice(o,u+1);u=l.length;let d=-1;for(o=1;o<u;o++){const b=l.charCodeAt(o);if(b===91)return!1;if(b===93){d=o;break}else if(b===10){const g=s(a);g!==null&&(l+=g,u=l.length,a++)}else if(b===92&&(o++,o<u&&l.charCodeAt(o)===10)){const g=s(a);g!==null&&(l+=g,u=l.length,a++)}}if(d<0||l.charCodeAt(d+1)!==58)return!1;for(o=d+2;o<u;o++){const b=l.charCodeAt(o);if(b===10){const g=s(a);g!==null&&(l+=g,u=l.length,a++)}else if(!ce(b))break}const f=e.md.helpers.parseLinkDestination(l,o,u);if(!f.ok)return!1;const c=e.md.normalizeLink(f.str);if(!e.md.validateLink(c))return!1;o=f.pos;const h=o,m=a,p=o;for(;o<u;o++){const b=l.charCodeAt(o);if(b===10){const g=s(a);g!==null&&(l+=g,u=l.length,a++)}else if(!ce(b))break}let w=e.md.helpers.parseLinkTitle(l,o,u);for(;w.can_continue;){const b=s(a);if(b===null)break;l+=b,o=u,u=l.length,a++,w=e.md.helpers.parseLinkTitle(l,o,u,w)}let y;for(o<u&&p!==o&&w.ok?(y=w.str,o=w.pos):(y="",o=h,a=m);o<u;){const b=l.charCodeAt(o);if(!ce(b))break;o++}if(o<u&&l.charCodeAt(o)!==10&&y)for(y="",o=h,a=m;o<u;){const b=l.charCodeAt(o);if(!ce(b))break;o++}if(o<u&&l.charCodeAt(o)!==10)return!1;const A=Br(l.slice(1,d));return A?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[A]>"u"&&(e.env.references[A]={title:y,href:c}),e.line=a),!0):!1}const Xd=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qd="[a-zA-Z_:][a-zA-Z0-9:._-]*",Zd="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Xi="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+qd+"(?:\\s*=\\s*"+Zd+")?)")+"*\\s*\\/?>",qi="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Yd="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Kd="<[?][\\s\\S]*?[?]>",Qd="<![A-Za-z][^>]*>",Jd="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",e0=new RegExp("^(?:"+Xi+"|"+qi+"|"+Yd+"|"+Kd+"|"+Qd+"|"+Jd+")"),t0=new RegExp("^(?:"+Xi+"|"+qi+")"),fn=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Xd.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(t0.source+"\\s*$"),/^$/,!1]];function n0(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let a=e.src.slice(o,u),s=0;for(;s<fn.length&&!fn[s][0].test(a);s++);if(s===fn.length)return!1;if(r)return fn[s][2];let l=t+1;if(!fn[s][1].test(a)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(o=e.bMarks[l]+e.tShift[l],u=e.eMarks[l],a=e.src.slice(o,u),fn[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function r0(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(o);if(a!==35||o>=u)return!1;let s=1;for(a=e.src.charCodeAt(++o);a===35&&o<u&&s<=6;)s++,a=e.src.charCodeAt(++o);if(s>6||o<u&&!ce(a))return!1;if(r)return!0;u=e.skipSpacesBack(u,o);const l=e.skipCharsBack(u,35,o);l>o&&ce(e.src.charCodeAt(l-1))&&(u=l),e.line=t+1;const d=e.push("heading_open","h"+String(s),1);d.markup="########".slice(0,s),d.map=[t,e.line];const f=e.push("inline","",0);f.content=e.src.slice(o,u).trim(),f.map=[t,e.line],f.children=[];const c=e.push("heading_close","h"+String(s),-1);return c.markup="########".slice(0,s),!0}function u0(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let u=0,a,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let m=e.bMarks[s]+e.tShift[s];const p=e.eMarks[s];if(m<p&&(a=e.src.charCodeAt(m),(a===45||a===61)&&(m=e.skipChars(m,a),m=e.skipSpaces(m),m>=p))){u=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let m=0,p=r.length;m<p;m++)if(r[m](e,s,n,!0)){h=!0;break}if(h)break}if(!u)return!1;const l=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;const d=e.push("heading_open","h"+String(u),1);d.markup=String.fromCharCode(a),d.map=[t,e.line];const f=e.push("inline","",0);f.content=l,f.map=[t,e.line-1],f.children=[];const c=e.push("heading_close","h"+String(u),-1);return c.markup=String.fromCharCode(a),e.parentType=o,!0}function o0(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let u=t+1;for(e.parentType="paragraph";u<n&&!e.isEmpty(u);u++){if(e.sCount[u]-e.blkIndent>3||e.sCount[u]<0)continue;let d=!1;for(let f=0,c=r.length;f<c;f++)if(r[f](e,u,n,!0)){d=!0;break}if(d)break}const a=e.getLines(t,u,e.blkIndent,!1).trim();e.line=u;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const jr=[["table",Bd,["paragraph","reference"]],["code",zd],["fence",jd,["paragraph","reference","blockquote","list"]],["blockquote",Hd,["paragraph","reference","blockquote","list"]],["hr",$d,["paragraph","reference","blockquote","list"]],["list",Wd,["paragraph","reference","blockquote"]],["reference",Gd],["html_block",n0,["paragraph","reference","blockquote"]],["heading",r0,["paragraph","reference","blockquote"]],["lheading",u0],["paragraph",o0]];function Hr(){this.ruler=new We;for(let e=0;e<jr.length;e++)this.ruler.push(jr[e][0],jr[e][1],{alt:(jr[e][2]||[]).slice()})}Hr.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,u=e.md.options.maxNesting;let a=t,s=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=u){e.line=n;break}const l=e.line;let d=!1;for(let f=0;f<o;f++)if(d=r[f](e,a,n,!1),d){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!d)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<n&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},Hr.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)},Hr.prototype.State=wt;function Un(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.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}Un.prototype.pushPending=function(){const e=new st("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Un.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new st(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r},Un.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32;let u=e;for(;u<n&&this.src.charCodeAt(u)===r;)u++;const a=u-e,s=u<n?this.src.charCodeAt(u):32,l=$n(o)||Hn(String.fromCharCode(o)),d=$n(s)||Hn(String.fromCharCode(s)),f=jn(o),c=jn(s),h=!c&&(!d||f||l),m=!f&&(!l||c||d);return{can_open:h&&(t||!m||l),can_close:m&&(t||!h||d),length:a}},Un.prototype.Token=st;function i0(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function a0(e,t){let n=e.pos;for(;n<e.posMax&&!i0(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const s0=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function l0(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(s0);if(!o)return!1;const u=o[1],a=e.md.linkify.matchAtStart(e.src.slice(n-u.length));if(!a)return!1;let s=a.url;if(s.length<=u.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const d=e.md.normalizeLink(s);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-u.length);const f=e.push("link_open","a",1);f.attrs=[["href",d]],f.markup="linkify",f.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-u.length,!0}function c0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let u=r-1;for(;u>=1&&e.pending.charCodeAt(u-1)===32;)u--;e.pending=e.pending.slice(0,u),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(n++;n<o&&ce(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const eo=[];for(let e=0;e<256;e++)eo.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){eo[e.charCodeAt(0)]=1});function d0(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!ce(o));)n++;return e.pos=n,!0}let u=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const s=e.src.charCodeAt(n+1);s>=56320&&s<=57343&&(u+=e.src[n+1],n++)}const a="\\"+u;if(!t){const s=e.push("text_special","",0);o<256&&eo[o]!==0?s.content=u:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function f0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const u=e.posMax;for(;n<u&&e.src.charCodeAt(n)===96;)n++;const a=e.src.slice(o,n),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=o)return t||(e.pending+=a),e.pos+=s,!0;let l=n,d;for(;(d=e.src.indexOf("`",l))!==-1;){for(l=d+1;l<u&&e.src.charCodeAt(l)===96;)l++;const f=l-d;if(f===s){if(!t){const c=e.push("code_inline","code",0);c.markup=a,c.content=e.src.slice(n,d).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[f]=d}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function h0(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let u=o.length;const a=String.fromCharCode(r);if(u<2)return!1;let s;u%2&&(s=e.push("text","",0),s.content=a,u--);for(let l=0;l<u;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function Zi(e,t){let n;const r=[],o=t.length;for(let u=0;u<o;u++){const a=t[u];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[s.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&r.push(s.token-1)}for(;r.length;){const u=r.pop();let a=u+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,u!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[u],e.tokens[u]=n)}}function p0(e){const t=e.tokens_meta,n=e.tokens_meta.length;Zi(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Zi(e,t[r].delimiters)}const Yi={tokenize:h0,postProcess:p0};function m0(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let u=0;u<o.length;u++){const a=e.push("text","",0);a.content=String.fromCharCode(r),e.delimiters.push({marker:r,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 Ki(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const u=t[o.end],a=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===u.token+1,s=String.fromCharCode(o.marker),l=e.tokens[o.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const d=e.tokens[u.token];d.type=a?"strong_close":"em_close",d.tag=a?"strong":"em",d.nesting=-1,d.markup=a?s+s:s,d.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function g0(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ki(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Ki(e,t[r].delimiters)}const Qi={tokenize:m0,postProcess:g0};function b0(e,t){let n,r,o,u,a="",s="",l=e.pos,d=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const f=e.pos,c=e.posMax,h=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let p=m+1;if(p<c&&e.src.charCodeAt(p)===40){for(d=!1,p++;p<c&&(n=e.src.charCodeAt(p),!(!ce(n)&&n!==10));p++);if(p>=c)return!1;if(l=p,o=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),o.ok){for(a=e.md.normalizeLink(o.str),e.md.validateLink(a)?p=o.pos:a="",l=p;p<c&&(n=e.src.charCodeAt(p),!(!ce(n)&&n!==10));p++);if(o=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<c&&l!==p&&o.ok)for(s=o.str,p=o.pos;p<c&&(n=e.src.charCodeAt(p),!(!ce(n)&&n!==10));p++);}(p>=c||e.src.charCodeAt(p)!==41)&&(d=!0),p++}if(d){if(typeof e.env.references>"u")return!1;if(p<c&&e.src.charCodeAt(p)===91?(l=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(l,p++):p=m+1):p=m+1,r||(r=e.src.slice(h,m)),u=e.env.references[Br(r)],!u)return e.pos=f,!1;a=u.href,s=u.title}if(!t){e.pos=h,e.posMax=m;const w=e.push("link_open","a",1),y=[["href",a]];w.attrs=y,s&&y.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=c,!0}function y0(e,t){let n,r,o,u,a,s,l,d,f="";const c=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const m=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(u=p+1,u<h&&e.src.charCodeAt(u)===40){for(u++;u<h&&(n=e.src.charCodeAt(u),!(!ce(n)&&n!==10));u++);if(u>=h)return!1;for(d=u,s=e.md.helpers.parseLinkDestination(e.src,u,e.posMax),s.ok&&(f=e.md.normalizeLink(s.str),e.md.validateLink(f)?u=s.pos:f=""),d=u;u<h&&(n=e.src.charCodeAt(u),!(!ce(n)&&n!==10));u++);if(s=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<h&&d!==u&&s.ok)for(l=s.str,u=s.pos;u<h&&(n=e.src.charCodeAt(u),!(!ce(n)&&n!==10));u++);else l="";if(u>=h||e.src.charCodeAt(u)!==41)return e.pos=c,!1;u++}else{if(typeof e.env.references>"u")return!1;if(u<h&&e.src.charCodeAt(u)===91?(d=u+1,u=e.md.helpers.parseLinkLabel(e,u),u>=0?o=e.src.slice(d,u++):u=p+1):u=p+1,o||(o=e.src.slice(m,p)),a=e.env.references[Br(o)],!a)return e.pos=c,!1;f=a.href,l=a.title}if(!t){r=e.src.slice(m,p);const w=[];e.md.inline.parse(r,e.md,e.env,w);const y=e.push("image","img",0),A=[["src",f],["alt",""]];y.attrs=A,y.children=w,y.content=r,l&&A.push(["title",l])}return e.pos=u,e.posMax=h,!0}const x0=/^([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])?)*)$/,w0=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function v0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const u=e.src.slice(r+1,n);if(w0.test(u)){const a=e.md.normalizeLink(u);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(u);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=u.length+2,!0}if(x0.test(u)){const a=e.md.normalizeLink("mailto:"+u);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(u);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=u.length+2,!0}return!1}function A0(e){return/^<a[>\s]/i.test(e)}function k0(e){return/^<\/a\s*>/i.test(e)}function C0(e){const t=e|32;return t>=97&&t<=122}function _0(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!C0(o))return!1;const u=e.src.slice(r).match(e0);if(!u)return!1;if(!t){const a=e.push("html_inline","",0);a.content=u[0],A0(a.content)&&e.linkLevel++,k0(a.content)&&e.linkLevel--}return e.pos+=u[0].length,!0}const E0=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,S0=/^&([a-z][a-z0-9]{1,31});/i;function D0(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const u=e.src.slice(n).match(E0);if(u){if(!t){const a=u[1][0].toLowerCase()==="x"?parseInt(u[1].slice(1),16):parseInt(u[1],10),s=e.push("text_special","",0);s.content=Yu(a)?Mr(a):Mr(65533),s.markup=u[0],s.info="entity"}return e.pos+=u[0].length,!0}}else{const u=e.src.slice(n).match(S0);if(u){const a=Ri(u[0]);if(a!==u[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=u[0],s.info="entity"}return e.pos+=u[0].length,!0}}}return!1}function Ji(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const u=[];for(let a=0;a<n;a++){const s=e[a];if(u.push(0),(e[r].marker!==s.marker||o!==s.token-1)&&(r=a),o=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let d=r-u[r]-1,f=d;for(;d>l;d-=u[d]+1){const c=e[d];if(c.marker===s.marker&&c.open&&c.end<0){let h=!1;if((c.close||s.open)&&(c.length+s.length)%3===0&&(c.length%3!==0||s.length%3!==0)&&(h=!0),!h){const m=d>0&&!e[d-1].open?u[d-1]+1:0;u[a]=a-d+m,u[d]=m,s.open=!1,c.end=a,c.close=!1,f=-1,o=-2;break}}}f!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=f)}}function F0(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ji(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Ji(t[r].delimiters)}function T0(e){let t,n,r=0;const o=e.tokens,u=e.tokens.length;for(t=n=0;t<u;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<u&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const to=[["text",a0],["linkify",l0],["newline",c0],["escape",d0],["backticks",f0],["strikethrough",Yi.tokenize],["emphasis",Qi.tokenize],["link",b0],["image",y0],["autolink",v0],["html_inline",_0],["entity",D0]],no=[["balance_pairs",F0],["strikethrough",Yi.postProcess],["emphasis",Qi.postProcess],["fragments_join",T0]];function Wn(){this.ruler=new We;for(let e=0;e<to.length;e++)this.ruler.push(to[e][0],to[e][1]);this.ruler2=new We;for(let e=0;e<no.length;e++)this.ruler2.push(no[e][0],no[e][1])}Wn.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,u=e.cache;if(typeof u[t]<"u"){e.pos=u[t];return}let a=!1;if(e.level<o){for(let s=0;s<r;s++)if(e.level++,a=n[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,u[t]=e.pos},Wn.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const u=e.pos;let a=!1;if(e.level<o){for(let s=0;s<n;s++)if(a=t[s](e,!1),a){if(u>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Wn.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const u=this.ruler2.getRules(""),a=u.length;for(let s=0;s<a;s++)u[s](o)},Wn.prototype.State=Un;function N0(e){const t={};e=e||{},t.src_Any=Ii.source,t.src_Cc=Oi.source,t.src_Z=Vi.source,t.src_P=Gu.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.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]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function ro(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function $r(e){return Object.prototype.toString.call(e)}function I0(e){return $r(e)==="[object String]"}function O0(e){return $r(e)==="[object Object]"}function L0(e){return $r(e)==="[object RegExp]"}function ea(e){return $r(e)==="[object Function]"}function V0(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const ta={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function P0(e){return Object.keys(e||{}).reduce(function(t,n){return t||ta.hasOwnProperty(n)},!1)}const R0={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},M0="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]",B0="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function z0(e){e.__index__=-1,e.__text_cache__=""}function j0(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function na(){return function(e,t){t.normalize(e)}}function Ur(e){const t=e.re=N0(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(M0),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function u(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const d={validate:null,link:null};if(e.__compiled__[s]=d,O0(l)){L0(l.validate)?d.validate=j0(l.validate):ea(l.validate)?d.validate=l.validate:u(s,l),ea(l.normalize)?d.normalize=l.normalize:l.normalize?u(s,l):d.normalize=na();return}if(I0(l)){o.push(s);return}u(s,l)}),o.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:na()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(V0).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),z0(e)}function H0(e,t){const n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function uo(e,t){const n=new H0(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function qe(e,t){if(!(this instanceof qe))return new qe(e,t);t||P0(e)&&(t=e,e={}),this.__opts__=ro({},ta,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ro({},R0,e),this.__compiled__={},this.__tlds__=B0,this.__tlds_replaced__=!1,this.re={},Ur(this)}qe.prototype.add=function(t,n){return this.__schemas__[t]=n,Ur(this),this},qe.prototype.set=function(t){return this.__opts__=ro(this.__opts__,t),this},qe.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,u,a,s,l,d,f;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(u=this.testSchemaAt(t,n[2],l.lastIndex),u){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+u;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(d=t.search(this.re.host_fuzzy_test),d>=0&&(this.__index__<0||d<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=r.index+r[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=t.indexOf("@"),f>=0&&(o=t.match(this.re.email_fuzzy))!==null&&(a=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0},qe.prototype.pretest=function(t){return this.re.pretest.test(t)},qe.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0},qe.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(uo(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(uo(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null},qe.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,uo(this,0)):null},qe.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,u){return r!==u[o-1]}).reverse(),Ur(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ur(this),this)},qe.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},qe.prototype.onCompile=function(){};const hn=2147483647,vt=36,oo=1,Gn=26,$0=38,U0=700,ra=72,ua=128,oa="-",W0=/^xn--/,G0=/[^\0-\x7F]/,X0=/[\x2E\u3002\uFF0E\uFF61]/g,q0={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},io=vt-oo,At=Math.floor,ao=String.fromCharCode;function zt(e){throw new RangeError(q0[e])}function Z0(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function ia(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(X0,".");const o=e.split("."),u=Z0(o,t).join(".");return r+u}function aa(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const u=e.charCodeAt(n++);(u&64512)==56320?t.push(((o&1023)<<10)+(u&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const Y0=e=>String.fromCodePoint(...e),K0=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:vt},sa=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},la=function(e,t,n){let r=0;for(e=n?At(e/U0):e>>1,e+=At(e/t);e>io*Gn>>1;r+=vt)e=At(e/io);return At(r+(io+1)*e/(e+$0))},ca=function(e){const t=[],n=e.length;let r=0,o=ua,u=ra,a=e.lastIndexOf(oa);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&zt("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<n;){const l=r;for(let f=1,c=vt;;c+=vt){s>=n&&zt("invalid-input");const h=K0(e.charCodeAt(s++));h>=vt&&zt("invalid-input"),h>At((hn-r)/f)&&zt("overflow"),r+=h*f;const m=c<=u?oo:c>=u+Gn?Gn:c-u;if(h<m)break;const p=vt-m;f>At(hn/p)&&zt("overflow"),f*=p}const d=t.length+1;u=la(r-l,d,l==0),At(r/d)>hn-o&&zt("overflow"),o+=At(r/d),r%=d,t.splice(r++,0,o)}return String.fromCodePoint(...t)},da=function(e){const t=[];e=aa(e);const n=e.length;let r=ua,o=0,u=ra;for(const l of e)l<128&&t.push(ao(l));const a=t.length;let s=a;for(a&&t.push(oa);s<n;){let l=hn;for(const f of e)f>=r&&f<l&&(l=f);const d=s+1;l-r>At((hn-o)/d)&&zt("overflow"),o+=(l-r)*d,r=l;for(const f of e)if(f<r&&++o>hn&&zt("overflow"),f===r){let c=o;for(let h=vt;;h+=vt){const m=h<=u?oo:h>=u+Gn?Gn:h-u;if(c<m)break;const p=c-m,w=vt-m;t.push(ao(sa(m+p%w,0))),c=At(p/w)}t.push(ao(sa(c,0))),u=la(o,d,s===a),o=0,++s}++o,++r}return t.join("")},fa={version:"2.3.1",ucs2:{decode:aa,encode:Y0},decode:ca,encode:da,toASCII:function(e){return ia(e,function(t){return G0.test(t)?"xn--"+da(t):t})},toUnicode:function(e){return ia(e,function(t){return W0.test(t)?ca(t.slice(4).toLowerCase()):t})}},Q0={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},J0=/^(vbscript|javascript|file|data):/,ef=/^data:image\/(gif|png|jpeg|webp);/;function tf(e){const t=e.trim().toLowerCase();return J0.test(t)?ef.test(t):!0}const ha=["http:","https:","mailto:"];function nf(e){const t=Wu(e,!0);if(t.hostname&&(!t.protocol||ha.indexOf(t.protocol)>=0))try{t.hostname=fa.toASCII(t.hostname)}catch{}return zn(Uu(t))}function rf(e){const t=Wu(e,!0);if(t.hostname&&(!t.protocol||ha.indexOf(t.protocol)>=0))try{t.hostname=fa.toUnicode(t.hostname)}catch{}return ln(Uu(t),ln.defaultChars+"%")}function Ze(e,t){if(!(this instanceof Ze))return new Ze(e,t);t||Zu(e)||(t=e||{},e="default"),this.inline=new Wn,this.block=new Hr,this.core=new Qu,this.renderer=new dn,this.linkify=new qe,this.validateLink=tf,this.normalizeLink=nf,this.normalizeLinkText=rf,this.utils=pd,this.helpers=Rr({},yd),this.options={},this.configure(e),t&&this.set(t)}Ze.prototype.set=function(e){return Rr(this.options,e),this},Ze.prototype.configure=function(e){const t=this;if(Zu(e)){const n=e;if(e=Q0[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Ze.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Ze.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Ze.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Ze.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Ze.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Ze.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Ze.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:pa,setPrototypeOf:ma,isFrozen:uf,getPrototypeOf:of,getOwnPropertyDescriptor:af}=Object;let{freeze:ze,seal:ut,create:Wr}=Object,{apply:so,construct:lo}=typeof Reflect<"u"&&Reflect;ze||(ze=function(t){return t}),ut||(ut=function(t){return t}),so||(so=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),u=2;u<r;u++)o[u-2]=arguments[u];return t.apply(n,o)}),lo||(lo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Gr=He(Array.prototype.forEach),sf=He(Array.prototype.lastIndexOf),ga=He(Array.prototype.pop),Xn=He(Array.prototype.push),lf=He(Array.prototype.splice),Xr=He(String.prototype.toLowerCase),co=He(String.prototype.toString),fo=He(String.prototype.match),qn=He(String.prototype.replace),cf=He(String.prototype.indexOf),df=He(String.prototype.trim),Ye=He(Object.prototype.hasOwnProperty),je=He(RegExp.prototype.test),Zn=ff(TypeError);function He(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return so(e,t,r)}}function ff(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lo(e,n)}}function oe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xr;ma&&ma(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const u=n(o);u!==o&&(uf(t)||(t[r]=u),o=u)}e[o]=!0}return e}function hf(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function kt(e){const t=Wr(null);for(const[n,r]of pa(e))Ye(e,n)&&(Array.isArray(r)?t[n]=hf(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=kt(r):t[n]=r);return t}function Yn(e,t){for(;e!==null;){const r=af(e,t);if(r){if(r.get)return He(r.get);if(typeof r.value=="function")return He(r.value)}e=of(e)}function n(){return null}return n}const ba=ze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ho=ze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),po=ze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pf=ze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mo=ze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mf=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ya=ze(["#text"]),xa=ze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),go=ze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),wa=ze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),qr=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gf=ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),bf=ut(/<%[\w\W]*|[\w\W]*%>/gm),yf=ut(/\$\{[\w\W]*/gm),xf=ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),wf=ut(/^aria-[\-\w]+$/),va=ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vf=ut(/^(?:\w+script|data):/i),Af=ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Aa=ut(/^html$/i),kf=ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var ka=Object.freeze({__proto__:null,ARIA_ATTR:wf,ATTR_WHITESPACE:Af,CUSTOM_ELEMENT:kf,DATA_ATTR:xf,DOCTYPE_NAME:Aa,ERB_EXPR:bf,IS_ALLOWED_URI:va,IS_SCRIPT_OR_DATA:vf,MUSTACHE_EXPR:gf,TMPLIT_EXPR:yf});const Kn={element:1,text:3,progressingInstruction:7,comment:8,document:9},Cf=function(){return typeof window>"u"?null:window},_f=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const u="dompurify"+(r?"#"+r:"");try{return t.createPolicy(u,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},Ca=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _a(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Cf();const t=te=>_a(te);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==Kn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:u,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:c,DOMParser:h,trustedTypes:m}=e,p=l.prototype,w=Yn(p,"cloneNode"),y=Yn(p,"remove"),A=Yn(p,"nextSibling"),b=Yn(p,"childNodes"),g=Yn(p,"parentNode");if(typeof a=="function"){const te=n.createElement("template");te.content&&te.content.ownerDocument&&(n=te.content.ownerDocument)}let x,k="";const{implementation:T,createNodeIterator:D,createDocumentFragment:S,getElementsByTagName:X}=n,{importNode:z}=r;let B=Ca();t.isSupported=typeof pa=="function"&&typeof g=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:j,ERB_EXPR:I,TMPLIT_EXPR:W,DATA_ATTR:_,ARIA_ATTR:C,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:O}=ka;let{IS_ALLOWED_URI:H}=ka,$=null;const R=oe({},[...ba,...ho,...po,...mo,...ya]);let V=null;const L=oe({},[...xa,...go,...wa,...qr]);let M=Object.seal(Wr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,J=null;const Z=Object.seal(Wr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let K=!0,ue=!0,le=!1,Fe=!0,Te=!1,yt=!0,Me=!1,Ln=!1,Xt=!1,Ot=!1,Iu=!1,Ou=!1,Nl=!0,Il=!1;const G1="user-content-";let ei=!0,Fr=!1,Vn={},Ft=null;const ti=oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ol=null;const Ll=oe({},["audio","video","img","source","image","track"]);let ni=null;const Vl=oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lu="http://www.w3.org/1998/Math/MathML",Vu="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let Pn=Lt,ri=!1,ui=null;const X1=oe({},[Lu,Vu,Lt],co);let Pu=oe({},["mi","mo","mn","ms","mtext"]),Ru=oe({},["annotation-xml"]);const q1=oe({},["title","style","font","a","script"]);let Tr=null;const Z1=["application/xhtml+xml","text/html"],Y1="text/html";let Ce=null,Rn=null;const K1=n.createElement("form"),Pl=function(E){return E instanceof RegExp||E instanceof Function},oi=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rn&&Rn===E)){if((!E||typeof E!="object")&&(E={}),E=kt(E),Tr=Z1.indexOf(E.PARSER_MEDIA_TYPE)===-1?Y1:E.PARSER_MEDIA_TYPE,Ce=Tr==="application/xhtml+xml"?co:Xr,$=Ye(E,"ALLOWED_TAGS")?oe({},E.ALLOWED_TAGS,Ce):R,V=Ye(E,"ALLOWED_ATTR")?oe({},E.ALLOWED_ATTR,Ce):L,ui=Ye(E,"ALLOWED_NAMESPACES")?oe({},E.ALLOWED_NAMESPACES,co):X1,ni=Ye(E,"ADD_URI_SAFE_ATTR")?oe(kt(Vl),E.ADD_URI_SAFE_ATTR,Ce):Vl,Ol=Ye(E,"ADD_DATA_URI_TAGS")?oe(kt(Ll),E.ADD_DATA_URI_TAGS,Ce):Ll,Ft=Ye(E,"FORBID_CONTENTS")?oe({},E.FORBID_CONTENTS,Ce):ti,G=Ye(E,"FORBID_TAGS")?oe({},E.FORBID_TAGS,Ce):kt({}),J=Ye(E,"FORBID_ATTR")?oe({},E.FORBID_ATTR,Ce):kt({}),Vn=Ye(E,"USE_PROFILES")?E.USE_PROFILES:!1,K=E.ALLOW_ARIA_ATTR!==!1,ue=E.ALLOW_DATA_ATTR!==!1,le=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=E.SAFE_FOR_TEMPLATES||!1,yt=E.SAFE_FOR_XML!==!1,Me=E.WHOLE_DOCUMENT||!1,Ot=E.RETURN_DOM||!1,Iu=E.RETURN_DOM_FRAGMENT||!1,Ou=E.RETURN_TRUSTED_TYPE||!1,Xt=E.FORCE_BODY||!1,Nl=E.SANITIZE_DOM!==!1,Il=E.SANITIZE_NAMED_PROPS||!1,ei=E.KEEP_CONTENT!==!1,Fr=E.IN_PLACE||!1,H=E.ALLOWED_URI_REGEXP||va,Pn=E.NAMESPACE||Lt,Pu=E.MATHML_TEXT_INTEGRATION_POINTS||Pu,Ru=E.HTML_INTEGRATION_POINTS||Ru,M=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Pl(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(M.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Pl(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(M.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(M.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&(ue=!1),Iu&&(Ot=!0),Vn&&($=oe({},ya),V=Wr(null),Vn.html===!0&&(oe($,ba),oe(V,xa)),Vn.svg===!0&&(oe($,ho),oe(V,go),oe(V,qr)),Vn.svgFilters===!0&&(oe($,po),oe(V,go),oe(V,qr)),Vn.mathMl===!0&&(oe($,mo),oe(V,wa),oe(V,qr))),Ye(E,"ADD_TAGS")||(Z.tagCheck=null),Ye(E,"ADD_ATTR")||(Z.attributeCheck=null),E.ADD_TAGS&&(typeof E.ADD_TAGS=="function"?Z.tagCheck=E.ADD_TAGS:($===R&&($=kt($)),oe($,E.ADD_TAGS,Ce))),E.ADD_ATTR&&(typeof E.ADD_ATTR=="function"?Z.attributeCheck=E.ADD_ATTR:(V===L&&(V=kt(V)),oe(V,E.ADD_ATTR,Ce))),E.ADD_URI_SAFE_ATTR&&oe(ni,E.ADD_URI_SAFE_ATTR,Ce),E.FORBID_CONTENTS&&(Ft===ti&&(Ft=kt(Ft)),oe(Ft,E.FORBID_CONTENTS,Ce)),E.ADD_FORBID_CONTENTS&&(Ft===ti&&(Ft=kt(Ft)),oe(Ft,E.ADD_FORBID_CONTENTS,Ce)),ei&&($["#text"]=!0),Me&&oe($,["html","head","body"]),$.table&&(oe($,["tbody"]),delete G.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=E.TRUSTED_TYPES_POLICY,k=x.createHTML("")}else x===void 0&&(x=_f(m,o)),x!==null&&typeof k=="string"&&(k=x.createHTML(""));ze&&ze(E),Rn=E}},Rl=oe({},[...ho,...po,...pf]),Ml=oe({},[...mo,...mf]),Q1=function(E){let U=g(E);(!U||!U.tagName)&&(U={namespaceURI:Pn,tagName:"template"});const ee=Xr(E.tagName),ge=Xr(U.tagName);return ui[E.namespaceURI]?E.namespaceURI===Vu?U.namespaceURI===Lt?ee==="svg":U.namespaceURI===Lu?ee==="svg"&&(ge==="annotation-xml"||Pu[ge]):!!Rl[ee]:E.namespaceURI===Lu?U.namespaceURI===Lt?ee==="math":U.namespaceURI===Vu?ee==="math"&&Ru[ge]:!!Ml[ee]:E.namespaceURI===Lt?U.namespaceURI===Vu&&!Ru[ge]||U.namespaceURI===Lu&&!Pu[ge]?!1:!Ml[ee]&&(q1[ee]||!Rl[ee]):!!(Tr==="application/xhtml+xml"&&ui[E.namespaceURI]):!1},Tt=function(E){Xn(t.removed,{element:E});try{g(E).removeChild(E)}catch{y(E)}},an=function(E,U){try{Xn(t.removed,{attribute:U.getAttributeNode(E),from:U})}catch{Xn(t.removed,{attribute:null,from:U})}if(U.removeAttribute(E),E==="is")if(Ot||Iu)try{Tt(U)}catch{}else try{U.setAttribute(E,"")}catch{}},Bl=function(E){let U=null,ee=null;if(Xt)E="<remove></remove>"+E;else{const ve=fo(E,/^[\r\n\t ]+/);ee=ve&&ve[0]}Tr==="application/xhtml+xml"&&Pn===Lt&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");const ge=x?x.createHTML(E):E;if(Pn===Lt)try{U=new h().parseFromString(ge,Tr)}catch{}if(!U||!U.documentElement){U=T.createDocument(Pn,"template",null);try{U.documentElement.innerHTML=ri?k:ge}catch{}}const Be=U.body||U.documentElement;return E&&ee&&Be.insertBefore(n.createTextNode(ee),Be.childNodes[0]||null),Pn===Lt?X.call(U,Me?"html":"body")[0]:Me?U.documentElement:Be},zl=function(E){return D.call(E.ownerDocument||E,E,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},ii=function(E){return E instanceof c&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof f)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},jl=function(E){return typeof s=="function"&&E instanceof s};function Vt(te,E,U){Gr(te,ee=>{ee.call(t,E,U,Rn)})}const Hl=function(E){let U=null;if(Vt(B.beforeSanitizeElements,E,null),ii(E))return Tt(E),!0;const ee=Ce(E.nodeName);if(Vt(B.uponSanitizeElement,E,{tagName:ee,allowedTags:$}),yt&&E.hasChildNodes()&&!jl(E.firstElementChild)&&je(/<[/\w!]/g,E.innerHTML)&&je(/<[/\w!]/g,E.textContent)||E.nodeType===Kn.progressingInstruction||yt&&E.nodeType===Kn.comment&&je(/<[/\w]/g,E.data))return Tt(E),!0;if(!(Z.tagCheck instanceof Function&&Z.tagCheck(ee))&&(!$[ee]||G[ee])){if(!G[ee]&&Ul(ee)&&(M.tagNameCheck instanceof RegExp&&je(M.tagNameCheck,ee)||M.tagNameCheck instanceof Function&&M.tagNameCheck(ee)))return!1;if(ei&&!Ft[ee]){const ge=g(E)||E.parentNode,Be=b(E)||E.childNodes;if(Be&&ge){const ve=Be.length;for(let Xe=ve-1;Xe>=0;--Xe){const Pt=w(Be[Xe],!0);Pt.__removalCount=(E.__removalCount||0)+1,ge.insertBefore(Pt,A(E))}}}return Tt(E),!0}return E instanceof l&&!Q1(E)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&je(/<\/no(script|embed|frames)/i,E.innerHTML)?(Tt(E),!0):(Te&&E.nodeType===Kn.text&&(U=E.textContent,Gr([j,I,W],ge=>{U=qn(U,ge," ")}),E.textContent!==U&&(Xn(t.removed,{element:E.cloneNode()}),E.textContent=U)),Vt(B.afterSanitizeElements,E,null),!1)},$l=function(E,U,ee){if(J[U]||Nl&&(U==="id"||U==="name")&&(ee in n||ee in K1))return!1;if(!(ue&&!J[U]&&je(_,U))){if(!(K&&je(C,U))){if(!(Z.attributeCheck instanceof Function&&Z.attributeCheck(U,E))){if(!V[U]||J[U]){if(!(Ul(E)&&(M.tagNameCheck instanceof RegExp&&je(M.tagNameCheck,E)||M.tagNameCheck instanceof Function&&M.tagNameCheck(E))&&(M.attributeNameCheck instanceof RegExp&&je(M.attributeNameCheck,U)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(U,E))||U==="is"&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&je(M.tagNameCheck,ee)||M.tagNameCheck instanceof Function&&M.tagNameCheck(ee))))return!1}else if(!ni[U]){if(!je(H,qn(ee,F,""))){if(!((U==="src"||U==="xlink:href"||U==="href")&&E!=="script"&&cf(ee,"data:")===0&&Ol[E])){if(!(le&&!je(N,qn(ee,F,"")))){if(ee)return!1}}}}}}}return!0},Ul=function(E){return E!=="annotation-xml"&&fo(E,O)},Wl=function(E){Vt(B.beforeSanitizeAttributes,E,null);const{attributes:U}=E;if(!U||ii(E))return;const ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let ge=U.length;for(;ge--;){const Be=U[ge],{name:ve,namespaceURI:Xe,value:Pt}=Be,Mn=Ce(ve),ai=Pt;let Oe=ve==="value"?ai:df(ai);if(ee.attrName=Mn,ee.attrValue=Oe,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Vt(B.uponSanitizeAttribute,E,ee),Oe=ee.attrValue,Il&&(Mn==="id"||Mn==="name")&&(an(ve,E),Oe=G1+Oe),yt&&je(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Oe)){an(ve,E);continue}if(Mn==="attributename"&&fo(Oe,"href")){an(ve,E);continue}if(ee.forceKeepAttr)continue;if(!ee.keepAttr){an(ve,E);continue}if(!Fe&&je(/\/>/i,Oe)){an(ve,E);continue}Te&&Gr([j,I,W],Xl=>{Oe=qn(Oe,Xl," ")});const Gl=Ce(E.nodeName);if(!$l(Gl,Mn,Oe)){an(ve,E);continue}if(x&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Xe)switch(m.getAttributeType(Gl,Mn)){case"TrustedHTML":{Oe=x.createHTML(Oe);break}case"TrustedScriptURL":{Oe=x.createScriptURL(Oe);break}}if(Oe!==ai)try{Xe?E.setAttributeNS(Xe,ve,Oe):E.setAttribute(ve,Oe),ii(E)?Tt(E):ga(t.removed)}catch{an(ve,E)}}Vt(B.afterSanitizeAttributes,E,null)},J1=function te(E){let U=null;const ee=zl(E);for(Vt(B.beforeSanitizeShadowDOM,E,null);U=ee.nextNode();)Vt(B.uponSanitizeShadowNode,U,null),Hl(U),Wl(U),U.content instanceof u&&te(U.content);Vt(B.afterSanitizeShadowDOM,E,null)};return t.sanitize=function(te){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=null,ee=null,ge=null,Be=null;if(ri=!te,ri&&(te="<!-->"),typeof te!="string"&&!jl(te))if(typeof te.toString=="function"){if(te=te.toString(),typeof te!="string")throw Zn("dirty is not a string, aborting")}else throw Zn("toString is not a function");if(!t.isSupported)return te;if(Ln||oi(E),t.removed=[],typeof te=="string"&&(Fr=!1),Fr){if(te.nodeName){const Pt=Ce(te.nodeName);if(!$[Pt]||G[Pt])throw Zn("root node is forbidden and cannot be sanitized in-place")}}else if(te instanceof s)U=Bl("<!---->"),ee=U.ownerDocument.importNode(te,!0),ee.nodeType===Kn.element&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?U=ee:U.appendChild(ee);else{if(!Ot&&!Te&&!Me&&te.indexOf("<")===-1)return x&&Ou?x.createHTML(te):te;if(U=Bl(te),!U)return Ot?null:Ou?k:""}U&&Xt&&Tt(U.firstChild);const ve=zl(Fr?te:U);for(;ge=ve.nextNode();)Hl(ge),Wl(ge),ge.content instanceof u&&J1(ge.content);if(Fr)return te;if(Ot){if(Iu)for(Be=S.call(U.ownerDocument);U.firstChild;)Be.appendChild(U.firstChild);else Be=U;return(V.shadowroot||V.shadowrootmode)&&(Be=z.call(r,Be,!0)),Be}let Xe=Me?U.outerHTML:U.innerHTML;return Me&&$["!doctype"]&&U.ownerDocument&&U.ownerDocument.doctype&&U.ownerDocument.doctype.name&&je(Aa,U.ownerDocument.doctype.name)&&(Xe="<!DOCTYPE "+U.ownerDocument.doctype.name+`>
|
|
17
|
+
`+Xe),Te&&Gr([j,I,W],Pt=>{Xe=qn(Xe,Pt," ")}),x&&Ou?x.createHTML(Xe):Xe},t.setConfig=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oi(te),Ln=!0},t.clearConfig=function(){Rn=null,Ln=!1},t.isValidAttribute=function(te,E,U){Rn||oi({});const ee=Ce(te),ge=Ce(E);return $l(ee,ge,U)},t.addHook=function(te,E){typeof E=="function"&&Xn(B[te],E)},t.removeHook=function(te,E){if(E!==void 0){const U=sf(B[te],E);return U===-1?void 0:lf(B[te],U,1)[0]}return ga(B[te])},t.removeHooks=function(te){B[te]=[]},t.removeAllHooks=function(){B=Ca()},t}var Ef=_a();const Ea={content:{type:Object,required:!0}},Sf=new Ze({html:!0,linkify:!0});function Df(e){let t=e;return t=t.replace(/([\u2026\u3001\u3002\uff0c\uff1a\uff1b\uff1f\uff01)】」』]|[;:,.!?(\[\]])[\t ]*(#{2,6}\s+)/g,`$1
|
|
18
18
|
|
|
19
19
|
$2`),t=t.replace(/(\*\*)(\s*)(#{2,6}\s+)/g,`$1
|
|
20
20
|
|
|
21
|
-
$3`),t}function
|
|
22
|
-
`),n=t.filter(o=>o.trim().length>0);if(n.length===0)return e.trim();const
|
|
23
|
-
`).trim()}const
|
|
24
|
-
`),u=Af(n),o=kf(u);if(!o)return"";const r=vf.render(o);return wf.sanitize(r,{ADD_TAGS:["style"],ADD_ATTR:["style","align","valign","colspan","rowspan","scope","title"]})});return()=>{var u;const n=(u=e.content)==null?void 0:u.message;return i.createVNode("div",{class:"f-chat-message-markdown"},[n&&i.createVNode("div",{class:"f-chat-markdown-message"},[n]),i.createVNode("div",{class:"f-chat-markdown-content",innerHTML:t.value},null)])}}});mn.install=e=>{e.component(mn.name,mn)};const Cf=(e,t,n)=>{if(e.type!==Le.Text)return null;const o=e.raw;return o?typeof o!="string"?o:o.trim()?n.shouldShowMarkdown.value?i.createVNode(mn,{style:{border:"0px none rgb(51, 51, 51)",borderRadius:0,boxShadow:"none",padding:0},content:{type:"markdown",message:"",content:o}},null):i.createVNode("div",{class:"f-chat-bubble-content-text",key:`bubble-text-${t}`},[o]):null:null};function _f(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Ef(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Sf=function(){function e(n){var u=this;this._insertTag=function(o){var r;u.tags.length===0?u.insertionPoint?r=u.insertionPoint.nextSibling:u.prepend?r=u.container.firstChild:r=u.before:r=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(o,r),u.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(u){u.forEach(this._insertTag)},t.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Ef(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var r=_f(o);try{r.insertRule(u,r.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(u));this.ctr++},t.flush=function(){this.tags.forEach(function(u){var o;return(o=u.parentNode)==null?void 0:o.removeChild(u)}),this.tags=[],this.ctr=0},e}(),Pe="-ms-",Zr="-moz-",ae="-webkit-",Ca="comm",go="rule",bo="decl",Df="@import",_a="@keyframes",Tf="@layer",Ff=Math.abs,Yr=String.fromCharCode,Nf=Object.assign;function If(e,t){return Ne(e,0)^45?(((t<<2^Ne(e,0))<<2^Ne(e,1))<<2^Ne(e,2))<<2^Ne(e,3):0}function Ea(e){return e.trim()}function Of(e,t){return(e=t.exec(e))?e[0]:e}function se(e,t,n){return e.replace(t,n)}function yo(e,t){return e.indexOf(t)}function Ne(e,t){return e.charCodeAt(t)|0}function Kn(e,t,n){return e.slice(t,n)}function Ct(e){return e.length}function xo(e){return e.length}function Kr(e,t){return t.push(e),e}function Lf(e,t){return e.map(t).join("")}var Qr=1,pn=1,Sa=0,Ge=0,xe=0,gn="";function Jr(e,t,n,u,o,r,a){return{value:e,root:t,parent:n,type:u,props:o,children:r,line:Qr,column:pn,length:a,return:""}}function Qn(e,t){return Nf(Jr("",null,null,"",null,null,0),e,{length:-e.length},t)}function Pf(){return xe}function Vf(){return xe=Ge>0?Ne(gn,--Ge):0,pn--,xe===10&&(pn=1,Qr--),xe}function Ke(){return xe=Ge<Sa?Ne(gn,Ge++):0,pn++,xe===10&&(pn=1,Qr++),xe}function _t(){return Ne(gn,Ge)}function eu(){return Ge}function Jn(e,t){return Kn(gn,e,t)}function er(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Da(e){return Qr=pn=1,Sa=Ct(gn=e),Ge=0,[]}function Ta(e){return gn="",e}function tu(e){return Ea(Jn(Ge-1,wo(e===91?e+2:e===40?e+1:e)))}function Rf(e){for(;(xe=_t())&&xe<33;)Ke();return er(e)>2||er(xe)>3?"":" "}function Mf(e,t){for(;--t&&Ke()&&!(xe<48||xe>102||xe>57&&xe<65||xe>70&&xe<97););return Jn(e,eu()+(t<6&&_t()==32&&Ke()==32))}function wo(e){for(;Ke();)switch(xe){case e:return Ge;case 34:case 39:e!==34&&e!==39&&wo(xe);break;case 40:e===41&&wo(e);break;case 92:Ke();break}return Ge}function Bf(e,t){for(;Ke()&&e+xe!==57;)if(e+xe===84&&_t()===47)break;return"/*"+Jn(t,Ge-1)+"*"+Yr(e===47?e:Ke())}function zf(e){for(;!er(_t());)Ke();return Jn(e,Ge)}function jf(e){return Ta(nu("",null,null,null,[""],e=Da(e),0,[0],e))}function nu(e,t,n,u,o,r,a,s,l){for(var d=0,f=0,c=a,h=0,p=0,m=0,w=1,y=1,A=1,b=0,g="",x=o,k=r,F=u,T=g;y;)switch(m=b,b=Ke()){case 40:if(m!=108&&Ne(T,c-1)==58){yo(T+=se(tu(b),"&","&\f"),"&\f")!=-1&&(A=-1);break}case 34:case 39:case 91:T+=tu(b);break;case 9:case 10:case 13:case 32:T+=Rf(m);break;case 92:T+=Mf(eu()-1,7);continue;case 47:switch(_t()){case 42:case 47:Kr(Hf(Bf(Ke(),eu()),t,n),l);break;default:T+="/"}break;case 123*w:s[d++]=Ct(T)*A;case 125*w:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+f:A==-1&&(T=se(T,/\f/g,"")),p>0&&Ct(T)-c&&Kr(p>32?Na(T+";",u,n,c-1):Na(se(T," ","")+";",u,n,c-2),l);break;case 59:T+=";";default:if(Kr(F=Fa(T,t,n,d,f,o,s,g,x=[],k=[],c),r),b===123)if(f===0)nu(T,t,F,F,x,r,c,s,k);else switch(h===99&&Ne(T,3)===110?100:h){case 100:case 108:case 109:case 115:nu(e,F,F,u&&Kr(Fa(e,F,F,0,0,o,s,g,o,x=[],c),k),o,k,c,s,u?x:k);break;default:nu(T,F,F,F,[""],k,0,s,k)}}d=f=p=0,w=A=1,g=T="",c=a;break;case 58:c=1+Ct(T),p=m;default:if(w<1){if(b==123)--w;else if(b==125&&w++==0&&Vf()==125)continue}switch(T+=Yr(b),b*w){case 38:A=f>0?1:(T+="\f",-1);break;case 44:s[d++]=(Ct(T)-1)*A,A=1;break;case 64:_t()===45&&(T+=tu(Ke())),h=_t(),f=c=Ct(g=T+=zf(eu())),b++;break;case 45:m===45&&Ct(T)==2&&(w=0)}}return r}function Fa(e,t,n,u,o,r,a,s,l,d,f){for(var c=o-1,h=o===0?r:[""],p=xo(h),m=0,w=0,y=0;m<u;++m)for(var A=0,b=Kn(e,c+1,c=Ff(w=a[m])),g=e;A<p;++A)(g=Ea(w>0?h[A]+" "+b:se(b,/&\f/g,h[A])))&&(l[y++]=g);return Jr(e,t,n,o===0?go:s,l,d,f)}function Hf(e,t,n){return Jr(e,t,n,Ca,Yr(Pf()),Kn(e,2,-2),0)}function Na(e,t,n,u){return Jr(e,t,n,bo,Kn(e,0,u),Kn(e,u+1,-1),u)}function bn(e,t){for(var n="",u=xo(e),o=0;o<u;o++)n+=t(e[o],o,e,t)||"";return n}function $f(e,t,n,u){switch(e.type){case Tf:if(e.children.length)break;case Df:case bo:return e.return=e.return||e.value;case Ca:return"";case _a:return e.return=e.value+"{"+bn(e.children,u)+"}";case go:e.value=e.props.join(",")}return Ct(n=bn(e.children,u))?e.return=e.value+"{"+n+"}":""}function Uf(e){var t=xo(e);return function(n,u,o,r){for(var a="",s=0;s<t;s++)a+=e[s](n,u,o,r)||"";return a}}function Wf(e){return function(t){t.root||(t=t.return)&&e(t)}}function Gf(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Xf=function(t,n,u){for(var o=0,r=0;o=r,r=_t(),o===38&&r===12&&(n[u]=1),!er(r);)Ke();return Jn(t,Ge)},qf=function(t,n){var u=-1,o=44;do switch(er(o)){case 0:o===38&&_t()===12&&(n[u]=1),t[u]+=Xf(Ge-1,n,u);break;case 2:t[u]+=tu(o);break;case 4:if(o===44){t[++u]=_t()===58?"&\f":"",n[u]=t[u].length;break}default:t[u]+=Yr(o)}while(o=Ke());return t},Zf=function(t,n){return Ta(qf(Da(t),n))},Ia=new WeakMap,Yf=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,u=t.parent,o=t.column===u.column&&t.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Ia.get(u))&&!o){Ia.set(t,!0);for(var r=[],a=Zf(n,r),s=u.props,l=0,d=0;l<a.length;l++)for(var f=0;f<s.length;f++,d++)t.props[d]=r[l]?a[l].replace(/&\f/g,s[f]):s[f]+" "+a[l]}}},Kf=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Oa(e,t){switch(If(e,t)){case 5103:return ae+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ae+e+Zr+e+Pe+e+e;case 6828:case 4268:return ae+e+Pe+e+e;case 6165:return ae+e+Pe+"flex-"+e+e;case 5187:return ae+e+se(e,/(\w+).+(:[^]+)/,ae+"box-$1$2"+Pe+"flex-$1$2")+e;case 5443:return ae+e+Pe+"flex-item-"+se(e,/flex-|-self/,"")+e;case 4675:return ae+e+Pe+"flex-line-pack"+se(e,/align-content|flex-|-self/,"")+e;case 5548:return ae+e+Pe+se(e,"shrink","negative")+e;case 5292:return ae+e+Pe+se(e,"basis","preferred-size")+e;case 6060:return ae+"box-"+se(e,"-grow","")+ae+e+Pe+se(e,"grow","positive")+e;case 4554:return ae+se(e,/([^-])(transform)/g,"$1"+ae+"$2")+e;case 6187:return se(se(se(e,/(zoom-|grab)/,ae+"$1"),/(image-set)/,ae+"$1"),e,"")+e;case 5495:case 3959:return se(e,/(image-set\([^]*)/,ae+"$1$`$1");case 4968:return se(se(e,/(.+:)(flex-)?(.*)/,ae+"box-pack:$3"+Pe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ae+e+e;case 4095:case 3583:case 4068:case 2532:return se(e,/(.+)-inline(.+)/,ae+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ct(e)-1-t>6)switch(Ne(e,t+1)){case 109:if(Ne(e,t+4)!==45)break;case 102:return se(e,/(.+:)(.+)-([^]+)/,"$1"+ae+"$2-$3$1"+Zr+(Ne(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yo(e,"stretch")?Oa(se(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ne(e,t+1)!==115)break;case 6444:switch(Ne(e,Ct(e)-3-(~yo(e,"!important")&&10))){case 107:return se(e,":",":"+ae)+e;case 101:return se(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ae+(Ne(e,14)===45?"inline-":"")+"box$3$1"+ae+"$2$3$1"+Pe+"$2box$3")+e}break;case 5936:switch(Ne(e,t+11)){case 114:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ae+e+Pe+e+e}return e}var Qf=function(t,n,u,o){if(t.length>-1&&!t.return)switch(t.type){case bo:t.return=Oa(t.value,t.length);break;case _a:return bn([Qn(t,{value:se(t.value,"@","@"+ae)})],o);case go:if(t.length)return Lf(t.props,function(r){switch(Of(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bn([Qn(t,{props:[se(r,/:(read-\w+)/,":"+Zr+"$1")]})],o);case"::placeholder":return bn([Qn(t,{props:[se(r,/:(plac\w+)/,":"+ae+"input-$1")]}),Qn(t,{props:[se(r,/:(plac\w+)/,":"+Zr+"$1")]}),Qn(t,{props:[se(r,/:(plac\w+)/,Pe+"input-$1")]})],o)}return""})}},Jf=[Qf],eh=function(t){var n=t.key;if(n==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(w){var y=w.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=t.stylisPlugins||Jf,r={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var y=w.getAttribute("data-emotion").split(" "),A=1;A<y.length;A++)r[y[A]]=!0;s.push(w)});var l,d=[Yf,Kf];{var f,c=[$f,Wf(function(w){f.insert(w)})],h=Uf(d.concat(o,c)),p=function(y){return bn(jf(y),h)};l=function(y,A,b,g){f=b,p(y?y+"{"+A.styles+"}":A.styles),g&&(m.inserted[A.name]=!0)}}var m={key:n,sheet:new Sf({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:r,registered:{},insert:l};return m.sheet.hydrate(s),m};function th(e){for(var t=0,n,u=0,o=e.length;o>=4;++u,o-=4)n=e.charCodeAt(u)&255|(e.charCodeAt(++u)&255)<<8|(e.charCodeAt(++u)&255)<<16|(e.charCodeAt(++u)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(u+2)&255)<<16;case 2:t^=(e.charCodeAt(u+1)&255)<<8;case 1:t^=e.charCodeAt(u)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var nh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},rh=/[A-Z]|^ms/g,uh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,La=function(t){return t.charCodeAt(1)===45},Pa=function(t){return t!=null&&typeof t!="boolean"},vo=Gf(function(e){return La(e)?e:e.replace(rh,"-$&").toLowerCase()}),Va=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(uh,function(u,o,r){return jt={name:o,styles:r,next:jt},o})}return nh[t]!==1&&!La(t)&&typeof n=="number"&&n!==0?n+"px":n};function ru(e,t,n){if(n==null)return"";var u=n;if(u.__emotion_styles!==void 0)return u;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return jt={name:o.name,styles:o.styles,next:jt},o.name;var r=n;if(r.styles!==void 0){var a=r.next;if(a!==void 0)for(;a!==void 0;)jt={name:a.name,styles:a.styles,next:jt},a=a.next;var s=r.styles+";";return s}return oh(e,t,n)}}var l=n;if(t==null)return l;var d=t[l];return d!==void 0?d:l}function oh(e,t,n){var u="";if(Array.isArray(n))for(var o=0;o<n.length;o++)u+=ru(e,t,n[o])+";";else for(var r in n){var a=n[r];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?u+=r+"{"+t[s]+"}":Pa(s)&&(u+=vo(r)+":"+Va(r,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)Pa(a[l])&&(u+=vo(r)+":"+Va(r,a[l])+";");else{var d=ru(e,t,a);switch(r){case"animation":case"animationName":{u+=vo(r)+":"+d+";";break}default:u+=r+"{"+d+"}"}}}return u}var Ra=/label:\s*([^\s;{]+)\s*(;|$)/g,jt;function Ao(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var u=!0,o="";jt=void 0;var r=e[0];if(r==null||r.raw===void 0)u=!1,o+=ru(n,t,r);else{var a=r;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=ru(n,t,e[s]),u){var l=r;o+=l[s]}Ra.lastIndex=0;for(var d="",f;(f=Ra.exec(o))!==null;)d+="-"+f[1];var c=th(o)+d;return{name:c,styles:o,next:jt}}function Ma(e,t,n){var u="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(u+=o+" ")}),u}var ih=function(t,n,u){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},ah=function(t,n,u){ih(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var r=n;do t.insert(n===r?"."+o:"",r,t.sheet,!0),r=r.next;while(r!==void 0)}};function Ba(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function za(e,t,n){var u=[],o=Ma(e,u,n);return u.length<2?n:o+t(u)}var sh=function(t){var n=eh(t);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var u=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=Ao(d,n.registered,void 0);return ah(n,c),n.key+"-"+c.name},o=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=Ao(d,n.registered),h="animation-"+c.name;return Ba(n,{name:c.name,styles:"@keyframes "+h+"{"+c.styles+"}"}),h},r=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=Ao(d,n.registered);Ba(n,c)},a=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];return za(n.registered,u,lh(d))};return{css:u,cx:a,injectGlobal:r,keyframes:o,hydrate:function(l){l.forEach(function(d){n.inserted[d]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Ma.bind(null,n.registered),merge:za.bind(null,n.registered,u)}},lh=function e(t){for(var n="",u=0;u<t.length;u++){var o=t[u];if(o!=null){var r=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))r=e(o);else{r="";for(var a in o)o[a]&&a&&(r&&(r+=" "),r+=a)}break}default:r=o}r&&(n&&(n+=" "),n+=r)}}return n},ch=sh({key:"css"}),ko=ch.css,dh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ja={exports:{}};/*!
|
|
21
|
+
$3`),t}function Ff(e){const t=e.split(`
|
|
22
|
+
`),n=t.filter(o=>o.trim().length>0);if(n.length===0)return e.trim();const r=Math.min(...n.map(o=>{var u;return(((u=o.match(/^\s*/))==null?void 0:u[0])??"").length}));return t.map(o=>o.slice(r)).join(`
|
|
23
|
+
`).trim()}const pn=i.defineComponent({name:"FXMarkdownMessage",props:Ea,setup(e){const t=i.computed(()=>{var a;const n=(((a=e.content)==null?void 0:a.content)??"").replace(/\\n/g,`
|
|
24
|
+
`),r=Df(n),o=Ff(r);if(!o)return"";const u=Sf.render(o);return Ef.sanitize(u,{ADD_TAGS:["style"],ADD_ATTR:["style","align","valign","colspan","rowspan","scope","title"]})});return()=>{var r;const n=(r=e.content)==null?void 0:r.message;return i.createVNode("div",{class:"f-chat-message-markdown"},[n&&i.createVNode("div",{class:"f-chat-markdown-message"},[n]),i.createVNode("div",{class:"f-chat-markdown-content",innerHTML:t.value},null)])}}});pn.install=e=>{e.component(pn.name,pn)};const Tf=(e,t,n)=>{if(e.type!==Le.Text)return null;const o=e.raw;return o?typeof o!="string"?o:o.trim()?n.shouldShowMarkdown.value?i.createVNode(pn,{style:{border:"0px none rgb(51, 51, 51)",borderRadius:0,boxShadow:"none",padding:0},content:{type:"markdown",message:"",content:o}},null):i.createVNode("div",{class:"f-chat-bubble-content-text",key:`bubble-text-${t}`},[o]):null:null};function Nf(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function If(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Of=function(){function e(n){var r=this;this._insertTag=function(o){var u;r.tags.length===0?r.insertionPoint?u=r.insertionPoint.nextSibling:r.prepend?u=r.container.firstChild:u=r.before:u=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,u),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(If(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var u=Nf(o);try{u.insertRule(r,u.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ve="-ms-",Zr="-moz-",ae="-webkit-",Sa="comm",bo="rule",yo="decl",Lf="@import",Da="@keyframes",Vf="@layer",Pf=Math.abs,Yr=String.fromCharCode,Rf=Object.assign;function Mf(e,t){return Ne(e,0)^45?(((t<<2^Ne(e,0))<<2^Ne(e,1))<<2^Ne(e,2))<<2^Ne(e,3):0}function Fa(e){return e.trim()}function Bf(e,t){return(e=t.exec(e))?e[0]:e}function se(e,t,n){return e.replace(t,n)}function xo(e,t){return e.indexOf(t)}function Ne(e,t){return e.charCodeAt(t)|0}function Qn(e,t,n){return e.slice(t,n)}function Ct(e){return e.length}function wo(e){return e.length}function Kr(e,t){return t.push(e),e}function zf(e,t){return e.map(t).join("")}var Qr=1,mn=1,Ta=0,Ge=0,xe=0,gn="";function Jr(e,t,n,r,o,u,a){return{value:e,root:t,parent:n,type:r,props:o,children:u,line:Qr,column:mn,length:a,return:""}}function Jn(e,t){return Rf(Jr("",null,null,"",null,null,0),e,{length:-e.length},t)}function jf(){return xe}function Hf(){return xe=Ge>0?Ne(gn,--Ge):0,mn--,xe===10&&(mn=1,Qr--),xe}function Ke(){return xe=Ge<Ta?Ne(gn,Ge++):0,mn++,xe===10&&(mn=1,Qr++),xe}function _t(){return Ne(gn,Ge)}function eu(){return Ge}function er(e,t){return Qn(gn,e,t)}function tr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Na(e){return Qr=mn=1,Ta=Ct(gn=e),Ge=0,[]}function Ia(e){return gn="",e}function tu(e){return Fa(er(Ge-1,vo(e===91?e+2:e===40?e+1:e)))}function $f(e){for(;(xe=_t())&&xe<33;)Ke();return tr(e)>2||tr(xe)>3?"":" "}function Uf(e,t){for(;--t&&Ke()&&!(xe<48||xe>102||xe>57&&xe<65||xe>70&&xe<97););return er(e,eu()+(t<6&&_t()==32&&Ke()==32))}function vo(e){for(;Ke();)switch(xe){case e:return Ge;case 34:case 39:e!==34&&e!==39&&vo(xe);break;case 40:e===41&&vo(e);break;case 92:Ke();break}return Ge}function Wf(e,t){for(;Ke()&&e+xe!==57;)if(e+xe===84&&_t()===47)break;return"/*"+er(t,Ge-1)+"*"+Yr(e===47?e:Ke())}function Gf(e){for(;!tr(_t());)Ke();return er(e,Ge)}function Xf(e){return Ia(nu("",null,null,null,[""],e=Na(e),0,[0],e))}function nu(e,t,n,r,o,u,a,s,l){for(var d=0,f=0,c=a,h=0,m=0,p=0,w=1,y=1,A=1,b=0,g="",x=o,k=u,T=r,D=g;y;)switch(p=b,b=Ke()){case 40:if(p!=108&&Ne(D,c-1)==58){xo(D+=se(tu(b),"&","&\f"),"&\f")!=-1&&(A=-1);break}case 34:case 39:case 91:D+=tu(b);break;case 9:case 10:case 13:case 32:D+=$f(p);break;case 92:D+=Uf(eu()-1,7);continue;case 47:switch(_t()){case 42:case 47:Kr(qf(Wf(Ke(),eu()),t,n),l);break;default:D+="/"}break;case 123*w:s[d++]=Ct(D)*A;case 125*w:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+f:A==-1&&(D=se(D,/\f/g,"")),m>0&&Ct(D)-c&&Kr(m>32?La(D+";",r,n,c-1):La(se(D," ","")+";",r,n,c-2),l);break;case 59:D+=";";default:if(Kr(T=Oa(D,t,n,d,f,o,s,g,x=[],k=[],c),u),b===123)if(f===0)nu(D,t,T,T,x,u,c,s,k);else switch(h===99&&Ne(D,3)===110?100:h){case 100:case 108:case 109:case 115:nu(e,T,T,r&&Kr(Oa(e,T,T,0,0,o,s,g,o,x=[],c),k),o,k,c,s,r?x:k);break;default:nu(D,T,T,T,[""],k,0,s,k)}}d=f=m=0,w=A=1,g=D="",c=a;break;case 58:c=1+Ct(D),m=p;default:if(w<1){if(b==123)--w;else if(b==125&&w++==0&&Hf()==125)continue}switch(D+=Yr(b),b*w){case 38:A=f>0?1:(D+="\f",-1);break;case 44:s[d++]=(Ct(D)-1)*A,A=1;break;case 64:_t()===45&&(D+=tu(Ke())),h=_t(),f=c=Ct(g=D+=Gf(eu())),b++;break;case 45:p===45&&Ct(D)==2&&(w=0)}}return u}function Oa(e,t,n,r,o,u,a,s,l,d,f){for(var c=o-1,h=o===0?u:[""],m=wo(h),p=0,w=0,y=0;p<r;++p)for(var A=0,b=Qn(e,c+1,c=Pf(w=a[p])),g=e;A<m;++A)(g=Fa(w>0?h[A]+" "+b:se(b,/&\f/g,h[A])))&&(l[y++]=g);return Jr(e,t,n,o===0?bo:s,l,d,f)}function qf(e,t,n){return Jr(e,t,n,Sa,Yr(jf()),Qn(e,2,-2),0)}function La(e,t,n,r){return Jr(e,t,n,yo,Qn(e,0,r),Qn(e,r+1,-1),r)}function bn(e,t){for(var n="",r=wo(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Zf(e,t,n,r){switch(e.type){case Vf:if(e.children.length)break;case Lf:case yo:return e.return=e.return||e.value;case Sa:return"";case Da:return e.return=e.value+"{"+bn(e.children,r)+"}";case bo:e.value=e.props.join(",")}return Ct(n=bn(e.children,r))?e.return=e.value+"{"+n+"}":""}function Yf(e){var t=wo(e);return function(n,r,o,u){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,u)||"";return a}}function Kf(e){return function(t){t.root||(t=t.return)&&e(t)}}function Qf(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Jf=function(t,n,r){for(var o=0,u=0;o=u,u=_t(),o===38&&u===12&&(n[r]=1),!tr(u);)Ke();return er(t,Ge)},eh=function(t,n){var r=-1,o=44;do switch(tr(o)){case 0:o===38&&_t()===12&&(n[r]=1),t[r]+=Jf(Ge-1,n,r);break;case 2:t[r]+=tu(o);break;case 4:if(o===44){t[++r]=_t()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Yr(o)}while(o=Ke());return t},th=function(t,n){return Ia(eh(Na(t),n))},Va=new WeakMap,nh=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Va.get(r))&&!o){Va.set(t,!0);for(var u=[],a=th(n,u),s=r.props,l=0,d=0;l<a.length;l++)for(var f=0;f<s.length;f++,d++)t.props[d]=u[l]?a[l].replace(/&\f/g,s[f]):s[f]+" "+a[l]}}},rh=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Pa(e,t){switch(Mf(e,t)){case 5103:return ae+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ae+e+Zr+e+Ve+e+e;case 6828:case 4268:return ae+e+Ve+e+e;case 6165:return ae+e+Ve+"flex-"+e+e;case 5187:return ae+e+se(e,/(\w+).+(:[^]+)/,ae+"box-$1$2"+Ve+"flex-$1$2")+e;case 5443:return ae+e+Ve+"flex-item-"+se(e,/flex-|-self/,"")+e;case 4675:return ae+e+Ve+"flex-line-pack"+se(e,/align-content|flex-|-self/,"")+e;case 5548:return ae+e+Ve+se(e,"shrink","negative")+e;case 5292:return ae+e+Ve+se(e,"basis","preferred-size")+e;case 6060:return ae+"box-"+se(e,"-grow","")+ae+e+Ve+se(e,"grow","positive")+e;case 4554:return ae+se(e,/([^-])(transform)/g,"$1"+ae+"$2")+e;case 6187:return se(se(se(e,/(zoom-|grab)/,ae+"$1"),/(image-set)/,ae+"$1"),e,"")+e;case 5495:case 3959:return se(e,/(image-set\([^]*)/,ae+"$1$`$1");case 4968:return se(se(e,/(.+:)(flex-)?(.*)/,ae+"box-pack:$3"+Ve+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ae+e+e;case 4095:case 3583:case 4068:case 2532:return se(e,/(.+)-inline(.+)/,ae+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ct(e)-1-t>6)switch(Ne(e,t+1)){case 109:if(Ne(e,t+4)!==45)break;case 102:return se(e,/(.+:)(.+)-([^]+)/,"$1"+ae+"$2-$3$1"+Zr+(Ne(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~xo(e,"stretch")?Pa(se(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ne(e,t+1)!==115)break;case 6444:switch(Ne(e,Ct(e)-3-(~xo(e,"!important")&&10))){case 107:return se(e,":",":"+ae)+e;case 101:return se(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ae+(Ne(e,14)===45?"inline-":"")+"box$3$1"+ae+"$2$3$1"+Ve+"$2box$3")+e}break;case 5936:switch(Ne(e,t+11)){case 114:return ae+e+Ve+se(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ae+e+Ve+se(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ae+e+Ve+se(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ae+e+Ve+e+e}return e}var uh=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case yo:t.return=Pa(t.value,t.length);break;case Da:return bn([Jn(t,{value:se(t.value,"@","@"+ae)})],o);case bo:if(t.length)return zf(t.props,function(u){switch(Bf(u,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bn([Jn(t,{props:[se(u,/:(read-\w+)/,":"+Zr+"$1")]})],o);case"::placeholder":return bn([Jn(t,{props:[se(u,/:(plac\w+)/,":"+ae+"input-$1")]}),Jn(t,{props:[se(u,/:(plac\w+)/,":"+Zr+"$1")]}),Jn(t,{props:[se(u,/:(plac\w+)/,Ve+"input-$1")]})],o)}return""})}},oh=[uh],ih=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var y=w.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=t.stylisPlugins||oh,u={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var y=w.getAttribute("data-emotion").split(" "),A=1;A<y.length;A++)u[y[A]]=!0;s.push(w)});var l,d=[nh,rh];{var f,c=[Zf,Kf(function(w){f.insert(w)})],h=Yf(d.concat(o,c)),m=function(y){return bn(Xf(y),h)};l=function(y,A,b,g){f=b,m(y?y+"{"+A.styles+"}":A.styles),g&&(p.inserted[A.name]=!0)}}var p={key:n,sheet:new Of({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:u,registered:{},insert:l};return p.sheet.hydrate(s),p};function ah(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var sh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},lh=/[A-Z]|^ms/g,ch=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ra=function(t){return t.charCodeAt(1)===45},Ma=function(t){return t!=null&&typeof t!="boolean"},Ao=Qf(function(e){return Ra(e)?e:e.replace(lh,"-$&").toLowerCase()}),Ba=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(ch,function(r,o,u){return jt={name:o,styles:u,next:jt},o})}return sh[t]!==1&&!Ra(t)&&typeof n=="number"&&n!==0?n+"px":n};function ru(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return jt={name:o.name,styles:o.styles,next:jt},o.name;var u=n;if(u.styles!==void 0){var a=u.next;if(a!==void 0)for(;a!==void 0;)jt={name:a.name,styles:a.styles,next:jt},a=a.next;var s=u.styles+";";return s}return dh(e,t,n)}}var l=n;if(t==null)return l;var d=t[l];return d!==void 0?d:l}function dh(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ru(e,t,n[o])+";";else for(var u in n){var a=n[u];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=u+"{"+t[s]+"}":Ma(s)&&(r+=Ao(u)+":"+Ba(u,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)Ma(a[l])&&(r+=Ao(u)+":"+Ba(u,a[l])+";");else{var d=ru(e,t,a);switch(u){case"animation":case"animationName":{r+=Ao(u)+":"+d+";";break}default:r+=u+"{"+d+"}"}}}return r}var za=/label:\s*([^\s;{]+)\s*(;|$)/g,jt;function ko(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";jt=void 0;var u=e[0];if(u==null||u.raw===void 0)r=!1,o+=ru(n,t,u);else{var a=u;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=ru(n,t,e[s]),r){var l=u;o+=l[s]}za.lastIndex=0;for(var d="",f;(f=za.exec(o))!==null;)d+="-"+f[1];var c=ah(o)+d;return{name:c,styles:o,next:jt}}function ja(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var fh=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},hh=function(t,n,r){fh(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var u=n;do t.insert(n===u?"."+o:"",u,t.sheet,!0),u=u.next;while(u!==void 0)}};function Ha(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function $a(e,t,n){var r=[],o=ja(e,r,n);return r.length<2?n:o+t(r)}var ph=function(t){var n=ih(t);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=ko(d,n.registered,void 0);return hh(n,c),n.key+"-"+c.name},o=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=ko(d,n.registered),h="animation-"+c.name;return Ha(n,{name:c.name,styles:"@keyframes "+h+"{"+c.styles+"}"}),h},u=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=ko(d,n.registered);Ha(n,c)},a=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];return $a(n.registered,r,mh(d))};return{css:r,cx:a,injectGlobal:u,keyframes:o,hydrate:function(l){l.forEach(function(d){n.inserted[d]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:ja.bind(null,n.registered),merge:$a.bind(null,n.registered,r)}},mh=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var u=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))u=e(o);else{u="";for(var a in o)o[a]&&a&&(u&&(u+=" "),u+=a)}break}default:u=o}u&&(n&&(n+=" "),n+=u)}}return n},gh=ph({key:"css"}),Co=gh.css,bh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ua={exports:{}};/*!
|
|
25
25
|
Copyright (c) 2018 Jed Watson.
|
|
26
26
|
Licensed under the MIT License (MIT), see
|
|
27
27
|
http://jedwatson.github.io/classnames
|
|
28
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var
|
|
28
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var u="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(u=o(u,r(s)))}return u}function r(u){if(typeof u=="string"||typeof u=="number")return u;if(typeof u!="object")return"";if(Array.isArray(u))return n.apply(null,u);if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]"))return u.toString();var a="";for(var s in u)t.call(u,s)&&u[s]&&(a=o(a,s));return a}function o(u,a){return a?u?u+" "+a:u+a:u}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ua);var xh=Ua.exports;const _o=yh(xh),Wa={className:{type:String,default:""},viewStatus:{type:String,default:"full"},widgetAPIURL:{type:String,default:""},widgetOptions:{type:Object,default:()=>({mode:"embedded",implOptions:{}})},widgetData:{type:Object,default:()=>({})}};class wh{constructor(t){fe(this,"root");if(!t)throw new Error("parentElement is required");this.root=document.createElement("div"),this.root.className="fx-card-container-stage__root",t.appendChild(this.root)}dispose(){this.root.remove()}getElement(){return this.root}}function vh(){function e(t,n){if(t===n)return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null||Array.isArray(t)!==Array.isArray(n))return!1;const r=Object.keys(t),o=Object.keys(n);if(r.length!==o.length)return!1;for(const u of r)if(!o.includes(u)||!e(t[u],n[u]))return!1;return!0}return{deepEqual:e}}var Eo={exports:{}};(function(e,t){(function(n,r){r(t)})(bh,function(n){var r=Object.defineProperty,o=Object.defineProperties,u=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(R,V,L)=>V in R?r(R,V,{enumerable:!0,configurable:!0,writable:!0,value:L}):R[V]=L,f=(R,V)=>{for(var L in V||(V={}))s.call(V,L)&&d(R,L,V[L]);if(a)for(var L of a(V))l.call(V,L)&&d(R,L,V[L]);return R},c=(R,V)=>o(R,u(V)),h=(R,V,L)=>new Promise((M,G)=>{var J=ue=>{try{K(L.next(ue))}catch(le){G(le)}},Z=ue=>{try{K(L.throw(ue))}catch(le){G(le)}},K=ue=>ue.done?M(ue.value):Promise.resolve(ue.value).then(J,Z);K((L=L.apply(R,V)).next())}),m=(R=>(R[R.NONE=0]="NONE",R[R.LOADING=1]="LOADING",R[R.LOADED=2]="LOADED",R[R.ERROR=3]="ERROR",R))(m||{});class p{constructor(V){this.items={},this.factory=V}getOrCreateItemByURL(V){let L=this.items[V];return L||(L=this.items[V]=this.factory(V)),L}tryGetItemByURL(V){var L;return(L=this.items[V])!=null?L:null}removeItemByURL(V){const L=this.items[V];return L&&(this.items[V]=null,L)}}const w="__RUNTIME_IMPORT__";function y(R,V){var L,M;const G=globalThis,J=(L=G[w])!=null?L:G[w]={};return(M=J[R])!=null?M:J[R]=V()}const A=y("cssCache",()=>new p(R=>({url:R,status:m.NONE,el:null,error:null,reject:null})));function b(R,V,L){const M={handleLoad(){R.removeEventListener("load",M.handleLoad),R.removeEventListener("error",M.handleError),V()},handleError(G){R.removeEventListener("load",M.handleLoad),R.removeEventListener("error",M.handleError),L(G)}};R.addEventListener("load",M.handleLoad),R.addEventListener("error",M.handleError)}function g(R){const V=A.getOrCreateItemByURL(R),{status:L,error:M}=V;return L===m.LOADED?Promise.resolve():L===m.ERROR?Promise.reject(M):L===m.LOADING?new Promise((G,J)=>{const{el:Z}=V;b(Z,()=>G(),K=>J(K.error))}):(V.status=m.LOADING,new Promise((G,J)=>{const Z=document.createElement("link");Z.rel="stylesheet",Z.href=R,b(Z,()=>{V.status=m.LOADED,G()},K=>{const ue=K.error||new Error(`Load css failed. href=${R}`);V.status=m.ERROR,V.error=ue,J(ue)}),V.el=Z,Z.setAttribute("data-runtime-import-type","css"),document.head.appendChild(Z)}))}function x(R){return Promise.all(R.map(V=>g(V))).then(()=>Promise.resolve()).catch(V=>Promise.reject(V))}const k=y("jsCache",()=>new p(R=>({url:R,status:m.NONE,el:null,error:null,reject:null,exportThing:void 0}))),T=globalThis,{define:D}=T,{keys:S}=Object;let X=!1;typeof D<"u"&&!D.runtime_import&&(console.warn("runtime-import should NOT coexist with requiesjs or seajs or any other AMD/CMD loader."),X=!0);const z=y("pendingItemMap",()=>({})),B=function(...R){const V=R.pop(),{currentScript:L}=document;if(!L)throw new Error("currentScript is null.");const{src:M}=L,G=z[M];if(!G)throw new Error(`Can NOT find item, src=${M}`);z[M]=null;try{let J=R[0]||[],Z=null;typeof J=="string"&&(Z=J,J=R[1]||[]);const K=G.exportThing=(()=>{let ue=!1;const le={};let Fe=V(...J.map(Te=>Te==="exports"?(ue=!0,le):T[Te]));return!Fe&&ue&&(Fe=le),Fe})();Z&&(T[Z]=K),K&&S(K).length===1&&K.default&&(G.exportThing=K.default,G.exportThing.default=K.default)}catch(J){G.status=m.ERROR,J instanceof Error&&(G.error=J),G.reject(J)}},j=()=>{const{currentScript:R}=document;if(R){const{src:V}=R;if(z[V])return!0}return!1};["amd","cmd"].forEach(R=>{Object.defineProperty(B,R,{get:j})}),B.runtime_import=!0;function I(R,V){if(X)throw new Error("runtime-import UMD mode uses window.define, you should NOT have your own window.define.");T.define||(T.define=B),z[R]=V}function W(R){const V=/legao-comp\/(.*)\/[\d.]+\/web.js$/.exec(R),L=window;if(V&&V.length>0){const M=V[1];L.g_config=L.g_config||{},L.g_config.appKey=M}}function _(R,V,L){R.status=m.LOADING,W(V);const{umd:M,crossOrigin:G}=L;return new Promise((J,Z)=>{const K=document.createElement("script");if(K.src=V,K.async=!1,K.crossOrigin=G,M){K.setAttribute("data-runtime-import-type","javascript-umd"),R.reject=Z;const ue=K.src;I(ue,R)}else K.setAttribute("data-runtime-import-type","javascript");b(K,()=>{R.status=m.LOADED,R.el=null,J(R.exportThing)},ue=>{const le=ue.error||new Error(`Load javascript failed. src=${V}`);R.status=m.ERROR,R.error=le,R.el=null,Z(le)}),R.el=K,document.body.appendChild(K)})}function C(R,V){const L=k.getOrCreateItemByURL(R),{status:M,exportThing:G,error:J}=L;if(M===m.LOADED)return Promise.resolve(G);if(M===m.ERROR)return Promise.reject(J);if(M===m.LOADING){const{el:Z}=L;return new Promise((K,ue)=>{b(Z,()=>K(L.exportThing),le=>ue(le.error))})}return _(L,R,V)}function N(R,V){let L=Promise.resolve();const M=R.length-1,{umd:G}=V;return R.forEach((J,Z)=>{const K=G&&Z===M;L=L.then(()=>C(J,c(f({},V),{umd:K})))}),L}function F(R){return h(this,null,function*(){const{scripts:V,styles:L}=R;if(L){const{urls:K}=L;yield x(K)}const{dependencies:M=[],entry:G,umd:J=!0,crossOrigin:Z="anonymous"}=V;if((G?M.concat([G]):M).length)return yield N(M.concat([G]),{umd:J,crossOrigin:Z})})}function O(R,V){return h(this,null,function*(){const L=V??{};return yield F({scripts:{dependencies:[],entry:R,umd:L.umd,crossOrigin:L.crossOrigin}})})}function H(R){return h(this,null,function*(){return yield F({scripts:{dependencies:[],entry:""},styles:{urls:[R]}})})}const $=F;n.importComponent=F,n.importModule=$,n.importScript=O,n.importStyle=H,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(Eo,Eo.exports);var Ah=Eo.exports;function kh(){async function e(t){return await Ah.importScript(t)}return{loadWidgetAPI:e}}const yn=i.defineComponent({name:"FXWidgetContainer",props:Wa,setup(e,t){const{loadWidgetAPI:n}=kh(),{deepEqual:r}=vh(),o=i.ref(null),u=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),d=i.computed(()=>{const b=Co`width:100%!important`;return _o("caf-assistant-widget-container__root",b,e.className)}),f=Co`
|
|
29
29
|
overflow: hidden;
|
|
30
|
-
`,c=
|
|
30
|
+
`,c=_o("caf-assistant-widget-container__inner",f),h=i.computed(()=>{const b=Co`
|
|
31
31
|
display: ${l.value?"block":"none"};
|
|
32
|
-
`;return Co("caf-assistant-widget-container__error",b)}),p=()=>{const b=a.value;b&&(s.value=new mh(b))},m=()=>{const b=s.value;b&&(b.dispose(),s.value=null)},w=()=>{const b=r.value,g=o.value;b&&(b.unmount(),b.dispose()),g&&g.cleanup(),r.value=null,o.value=null},y=async()=>{const b=await n(e.widgetAPIURL);if(!b)throw new Error("Failed to load widget API");await b.initialize();const g=b.createWidget();o.value=b,r.value=g},A=b=>{console.error(b),l.value=b};return i.watch(()=>e.widgetAPIURL,async()=>{if(a.value)try{w(),await y();const b=a.value,g=r.value;g==null||g.updateOptions(e.widgetOptions),g==null||g.updateData(e.widgetData),b&&g&&await g.mount(b)}catch(b){A(b)}}),i.watch(()=>e.widgetOptions,(b,g)=>{try{const x=r.value;x&&(!g||!u(g,b))&&x.updateOptions(b)}catch(x){A(x)}}),i.watch(()=>e.widgetData,(b,g)=>{try{const x=r.value;x&&(!g||!u(g,b))&&x.updateData(b)}catch(x){A(x)}}),i.onMounted(async()=>{try{const b=a.value;if(b){p();const g=s.value;if(g){await y();const x=r.value;x&&(x.updateOptions(e.widgetOptions),x.updateData(e.widgetData),x.mount(g.getElement()),i.nextTick(()=>{b.parentElement&&(b.style.width="100%")}))}}}catch(b){A(b)}}),i.onBeforeUnmount(async()=>{try{w(),m()}catch(b){console.error(b)}}),()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{ref:a,class:c},null),i.createVNode("div",{class:h.value},null)])}}),$a=(e,t)=>{var n;if(e.type===Le.AssistantWidgetComplete){const u=e;return u.widgetUrl?i.createVNode(yn,{key:`widget-${t}`,widgetAPIURL:u.widgetUrl,widgetOptions:{mode:"embedded",implOptions:u.widgetImplOptions},widgetData:((n=u.widgetData)==null?void 0:n.data)||{}},null):null}return e.type===Le.AssistantWidgetPending?i.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`widget-loading-${t}`},[i.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),i.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[i.createTextVNode("数据生成中......")])]):null},yh=3e4,Ua=8e3,Ie=new Map,Qe=new Map,tr=new Map,Et=[];function Ve(e){return String(e??"").replace(/^\ufeff/,"").replace(/[\u200b\u200c\u200d]/g,"").replace(/\u00a0/g," ").trim()}function uu(e){const t=Ve(e);if(t)for(let n=Et.length-1;n>=0;n--)Et[n]===t&&Et.splice(n,1)}function xh(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function ou(e){if(typeof window>"u")return;const t=window;t.__fluens_dynamic_component_bootstrap_instance_id===e&&delete t.__fluens_dynamic_component_bootstrap_instance_id}function wh(){return Et[Et.length-1]||void 0}function iu(e,t){const n=Ve(t);return n?Ve(e.instanceId)===n||e.componentId!=null&&Ve(String(e.componentId))===n||e.name!=null&&Ve(String(e.name))===n:!1}function Eo(e){const t=Ve(e);if(!t)return null;const n=Ie.get(t);if(n)return{canonicalKey:t,entry:n};for(const[o,r]of Ie.entries())if(Ve(o)===t)return{canonicalKey:o,entry:r};const u=[];for(const[o,r]of Ie.entries())iu(r.config,t)&&u.push({key:o,entry:r});if(u.length===1){const{key:o,entry:r}=u[0];return o!==t&&console.warn(`[DynamicComponent] register id "${t}" resolved to pending instanceId "${o}" (alias match)`),{canonicalKey:o,entry:r}}if(u.length>1)return console.warn(`[DynamicComponent] register id "${t}" is ambiguous (${u.length} pending matches); refusing`),null;if(Ie.size===1){const[o,r]=[...Ie.entries()][0];return console.warn(`[DynamicComponent] register id "${t}" unmatched; using sole pending instance "${o}"`),{canonicalKey:o,entry:r}}return null}function Wa(e,t){for(const[n,u]of Qe){const o=Ve(n),r=e!==""&&o===e,a=String(t??"").trim(),s=e&&iu(u.config,e)||a&&iu(u.config,a);if(r||s)return console.warn(`[DynamicComponent] register skipped: id "${e||a}" already active (canonical "${n}"); unload first — second register yields "no pending", not duplicate mount`),!0}return!1}function So(){return{pendingKeys:[...Ie.keys()],bootstrapQueue:[...Et],activeKeys:[...Qe.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function vh(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,...So()})}function Ah(e){const t=Ve(e);if(t){if(Wa(t,e))return{ok:!1,reason:"already_active_duplicate"};const u=Eo(t);if(u)return{ok:!0,...u}}else if(Wa("",e))return{ok:!1,reason:"already_active_duplicate"};for(let n=0;n<Et.length;n++){const u=Et[n],o=Eo(u);if(o)return Et.splice(n,1),t&&Ve(u)!==t&&console.warn(`[DynamicComponent] register id "${t}" did not match pending; using bootstrap instanceId "${u}" (sync bundle entry or use window.__fluens_dynamic_component_bootstrap_instance_id)`),{ok:!0,...o}}return{ok:!1,reason:"no_pending"}}function Ga(e){const t=Ve(e);if(!t)return null;const n=Qe.get(t);if(n)return n;for(const[r,a]of Qe.entries())if(Ve(r)===t)return a;const u=[];for(const r of Qe.values())iu(r.config,t)&&u.push(r);const o=[...new Map(u.map(r=>[r.config.instanceId,r])).values()];if(o.length===1)return o[0].config.instanceId!==t&&console.warn(`[DynamicComponent] assistant post id "${t}" resolved to instanceId "${o[0].config.instanceId}" (alias match)`),o[0];if(o.length>1)return console.warn(`[DynamicComponent] assistant post id "${t}" is ambiguous (${o.length} active matches)`),null;if(Qe.size===1){const r=[...Qe.values()][0];return console.warn(`[DynamicComponent] assistant post id "${t}" unmatched; delivering to sole active instance "${r.config.instanceId}"`),r}return null}function kh(e){const t=Ve(e);if(!t)return t;const n=Ga(t);if(n)return n.config.instanceId;const u=Eo(t);return u?u.canonicalKey:Ie.size===1?[...Ie.keys()][0]:Qe.size===1?[...Qe.values()][0].config.instanceId:t}function Do(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function Xa(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(Do(t)),!0}catch(n){return console.warn("[DynamicComponent] onAssistantMessage failed",n),!1}}function Ch(e){const t=`fluens-dynamic-component-${e.instanceId}`;let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.style.width="100%",n.style.height="100%"),n}function qa(e){const t=Qe.get(e.instanceId);if(t)return Promise.resolve(t.api);const n=Ie.get(e.instanceId);if(n)return new Promise((o,r)=>{const a=n.resolve,s=n.reject;n.resolve=l=>{a(l),o(l)},n.reject=l=>{s(l),r(l)}});if((e.name||e.componentId)&&!e.jsUrl)return Promise.reject(new Error(`Dynamic component resource is empty: ${e.name||e.componentId}`));const u=Ch(e);return new Promise((o,r)=>{const a={config:e,container:u,resolve:o,reject:r,timeoutId:0},s=setTimeout(()=>{a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Ie.delete(e.instanceId),uu(e.instanceId),ou(e.instanceId),r(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},yh);a.timeoutId=s,Ie.set(e.instanceId,a),Et.push(e.instanceId),xh(e.instanceId);const l=document.createElement("script");l.src=(e==null?void 0:e.jsUrl)??"",l.dataset.dynamicComponentId=e.instanceId,l.async=!1,l.onload=()=>{a.postLoadRegisterCheckTimerId=window.setTimeout(()=>{a.postLoadRegisterCheckTimerId=void 0,Ie.has(e.instanceId)&&(clearTimeout(s),Ie.delete(e.instanceId),uu(e.instanceId),ou(e.instanceId),r(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${Ua}ms after load: ${e.name||e.componentId}`)))},Ua)},l.onerror=()=>{clearTimeout(s),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Ie.delete(e.instanceId),uu(e.instanceId),ou(e.instanceId),r(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(l)})}function Za(e){var o;const t=Qe.get(e);if(t){try{t.api.unmount()}catch{}(o=t.scriptElement)==null||o.remove(),Qe.delete(e)}const n=Ie.get(e);n&&(n.postLoadRegisterCheckTimerId!=null&&(clearTimeout(n.postLoadRegisterCheckTimerId),n.postLoadRegisterCheckTimerId=void 0),clearTimeout(n.timeoutId),Ie.delete(e)),tr.delete(e);const u=document.getElementById(`fluens-dynamic-component-${e}`);u&&u.remove()}function _h(e,t){const n=Ve(e);if(!n)return!1;const u=Ga(n);if(u)return Xa(u.api,t);const o=kh(n),r=tr.get(o)??[],a=r.findIndex(s=>s.messageId===t.messageId);return a>=0?r[a]=Do(t):r.push(Do(t)),tr.set(o,r),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=So,window.__fluens_dynamic_component_register=function(e,t){const n=Ve(e),u=Ah(e);if(!u.ok){if(u.reason==="already_active_duplicate")return;vh(n),console.warn(`[DynamicComponent] no pending for register id "${n}" (raw ${JSON.stringify(e)}); see diagnostics above. Try: unload tab / avoid double register / ensure FXDynamicComponent loaded this jsUrl first / empty id if sole pending`);return}const{canonicalKey:o,entry:r}=u;uu(o),ou(o),r.postLoadRegisterCheckTimerId!=null&&(clearTimeout(r.postLoadRegisterCheckTimerId),r.postLoadRegisterCheckTimerId=void 0),clearTimeout(r.timeoutId),Ie.delete(o);const a={config:r.config,container:r.container,api:t,scriptElement:document.currentScript};Qe.set(o,a),a.container.parentElement;try{t.mount(r.container,r.config)}catch(l){console.error(`Failed to mount dynamic component: ${o}`,l)}const s=[o];n&&n!==o&&s.push(n);for(const l of s){const d=tr.get(l);d&&d.length>0&&(tr.delete(l),d.forEach(f=>Xa(t,f)))}r.resolve(t)});const xn=i.defineComponent({name:"FXDynamicComponent",props:{config:{type:Object,required:!0}},setup(e){const t=i.ref("loading"),n=i.ref(""),u=i.computed(()=>`fluens-dynamic-component-${e.config.instanceId}`),o=i.computed(()=>e.config.position==="inline"),r=i.computed(()=>!e.config.jsUrl&&!!e.config.url),a=i.computed(()=>({...o.value?{width:"fit-content",maxWidth:"100%"}:{width:"100%"},height:"auto",...t.value==="ready"&&o.value?{padding:"16px 0"}:{},...t.value==="ready"&&!o.value?{height:"100%",overflow:"hidden"}:{}}));return i.onMounted(()=>{r.value||(t.value="loading",n.value="",qa(e.config).then(()=>{t.value="ready"}).catch(s=>{t.value="error",n.value=s.message||"Unknown error"}))}),i.onUnmounted(()=>{r.value||Za(e.config.instanceId)}),()=>r.value?null:i.createVNode("div",{class:"f-chat-dynamic-component-body",style:a.value},[i.createVNode("div",{id:u.value,style:{width:"100%",height:"100%",display:t.value==="ready"?"":"none"}},null),t.value==="loading"&&i.createVNode("div",{class:"f-chat-dynamic-component-loading"},[i.createVNode("span",{class:"f-chat-dynamic-component-loading-spinner"},null),i.createVNode("span",null,[i.createTextVNode("加载中......")])]),t.value==="error"&&i.createVNode("div",{class:"f-chat-dynamic-component-error"},[i.createVNode("span",{class:"f-chat-dynamic-component-error-icon"},[i.createTextVNode("!")]),i.createVNode("span",null,[n.value])])])}}),Ya=(e,t,n)=>{if(e.type===Le.DynamicComponentComplete){const u=e;if(!u.config)return null;if(u.config.position==="inline")return i.createVNode(xn,{key:`dc-${t}`,config:u.config},null);const o={type:"file",fileContent:{type:"md",name:u.config.title}},r={onPreviewFile:a=>{n.emit("showDynamicComponent",u.config)}};return i.nextTick(()=>n.emit("dynamicComponentsDetected",[u.config])),i.createVNode("div",{style:{padding:"16px 0"}},[n.renderFileEmbeddedContent(o,r)])}return e.type===Le.DynamicComponentPending?i.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`dc-loading-${t}`},[i.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),i.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[i.createTextVNode("组件加载中......")])]):null};function Eh(){return{[Le.Text]:Cf,[Le.AssistantWidgetComplete]:$a,[Le.AssistantWidgetPending]:$a,[Le.DynamicComponentComplete]:Ya,[Le.DynamicComponentPending]:Ya}}const Sh=i.defineComponent({name:"FXBubbleTextContent",props:ic,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:n}=xi(),{propertyStates:u,registerProperty:o,updatePropertyValue:r,startStreaming:a}=Pr();o("title",e.title??""),o("subtitle",e.subtitle??""),o("text",e.text??""),i.watch([()=>e.title,()=>e.subtitle,()=>e.text],([m,w,y])=>{r("title",m??""),r("subtitle",w??""),r("text",y??"")});const s=i.computed(()=>e.textFormat==="markdown"),l=i.ref(!1),d=i.computed(()=>{var m,w,y;return l.value?{title:((m=u.title)==null?void 0:m.displayedValue)??"",subtitle:((w=u.subtitle)==null?void 0:w.displayedValue)??"",text:((y=u.text)==null?void 0:y.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),f=i.computed(()=>Ac(d.value.text)),c={shouldShowMarkdown:s,emit:t.emit,renderFileEmbeddedContent:n},h=Eh(),p=()=>f.value.length===0?null:i.createVNode("div",{class:"f-chat-bubble-text-collection"},[f.value.map((m,w)=>{var y;return(y=h[m.type])==null?void 0:y.call(h,m,w,c)})]);return i.onMounted(()=>{l.value&&a()}),()=>i.createVNode(i.Fragment,null,[d.value.title&&i.createVNode("div",{class:"f-chat-bubble-content-title"},[d.value.title]),d.value.subtitle&&i.createVNode("div",{class:"f-chat-bubble-content-subtitle"},[d.value.subtitle]),p()])}}),Dh={content:{type:Object},outputMode:{type:String,default:"full"}};function wn({status:e,variant:t=""}){let n="";return t?n=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()} variant--${t.toLowerCase()} `:n=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()}`,i.createVNode("span",{class:n,"aria-hidden":!0},null)}const Th=i.defineComponent({name:"FXBubbleThink",props:Dh,setup(e,t){var U;const{propertyStates:n,registerProperty:u,updatePropertyValue:o,isAllDone:r}=Pr(),{elapsedSeconds:a,hasEverStarted:s,start:l,stop:d,reset:f}=Hu(),c=i.ref(((U=e.content)==null?void 0:U.completed)!==!0),h=i.ref(null),p=i.ref(null),m=i.ref(!1),w=i.ref(!1),y=i.computed(()=>e.outputMode==="streaming"),A=i.computed(()=>{var _;return(_=e.content)==null?void 0:_.completed}),b=i.computed(()=>{var V,E,R;const _=(V=g.value)==null?void 0:V.trim(),N=_?_.slice(0,8):"",I=_&&_.length>8?"…":"",C=N?`<span class="f-chat-bubble-thinking-preview">${N}${I}</span>`:"";if(A.value){const M=s.value?`(用时${a.value}秒)`:"";return(((E=e.content)==null?void 0:E.title)??"思考完成"+M)+C}return(((R=e.content)==null?void 0:R.title)??"正在思考......")+C}),g=i.computed(()=>{var _,N;return y.value?((_=n.content)==null?void 0:_.displayedValue)??"":((N=e.content)==null?void 0:N.content)??""}),x=i.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!A.value,"is-completed":A.value})),k=()=>{const _=h.value;if(!_||!m.value){w.value=!1;return}w.value=_.scrollTop>0};i.watch(()=>A.value,_=>{_?d():l()},{immediate:!0}),i.watch(()=>A.value,_=>{_&&(c.value=!1)}),i.watch(()=>e.content,_=>{_&&(n.content?o("content",_.content??""):u("content",_.content??""))},{immediate:!0}),i.watch(g,async()=>{if(c.value){await i.nextTick();const _=h.value;if(!_)return;await i.nextTick(),m.value=_.scrollHeight>_.clientHeight,m.value?(_.scrollTop=_.scrollHeight,w.value=!0):w.value=!1}},{immediate:!0}),i.watch(c,async _=>{if(_){await i.nextTick();const N=h.value;if(!N)return;await i.nextTick(),m.value=N.scrollHeight>N.clientHeight,m.value?(N.scrollTop=N.scrollHeight,w.value=!0):w.value=!1}}),i.onUnmounted(()=>{f()}),t.expose({instance:{get loadDone(){return e.content?(y.value?r.value:!0)&&A.value:!0}}});const F=()=>{c.value=!c.value},T=()=>A.value?null:i.createVNode(wn,{status:"Working",variant:"thinking"},null),D=()=>!g.value||!c.value?null:i.createVNode("div",{class:"f-chat-bubble-thinking-content"},[i.createVNode("div",{class:"f-chat-bubble-thinking-scroll-container",ref:h,onScroll:k},[m.value&&w.value&&i.createVNode("div",{class:"f-chat-bubble-thinking-fade-mask"},null),i.createVNode("div",{class:"f-chat-bubble-thinking-text-wrapper"},[i.createVNode("div",{ref:p,class:"f-chat-bubble-thinking-content-text",innerHTML:g.value},null)])])]);return()=>i.createVNode("div",{class:x.value},[i.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:F},[T(),i.createVNode("span",{class:"f-chat-bubble-thinking-title",innerHTML:b.value},null),g.value&&i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:c.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null)]),D()])}}),Fh={content:{type:Object}},Ka={id:{type:String},arrowOffsetX:{type:Number,default:0},class:{type:String,default:""},customStyles:{type:Object,default:null},isSimpleTips:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},host:{type:Object},leftBoundary:{type:Object},keepWidthWithReference:{type:Boolean,default:!1},minWidth:{type:Number,default:-1},offsetX:{type:Object,default:i.ref(0)},offsetY:{type:Object,default:i.ref(0)},placement:{type:String,default:"bottom"},reference:{type:Object},rightBoundary:{type:Object},showArrow:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:-1},limitContentBySpace:{type:Boolean,default:!1},beforeClose:{type:Function}};function Nh(e){const t=e.host?e.host:"body",n=i.computed(()=>t==="body"?0:t?t.getBoundingClientRect().top:0),u=i.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().bottom:window.innerHeight),o=i.computed(()=>t==="body"?0:t?t.getBoundingClientRect().left:0),r=i.computed(()=>t==="body"?document.body.getBoundingClientRect().width:t?t.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),a=i.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().height:window.innerHeight);return{host:t,hostLeft:o,hostTop:n,hostWidth:r,hostHeight:a,hostBottom:u}}function Ih(e,t,n,u){const o=i.ref(e.offsetX||0),r=i.ref(e.offsetY||0),a=i.ref(-1),s=i.ref(-1),l=i.ref(-1),d=i.ref(-1),f=i.ref(e.placement),c=i.ref(0),h=i.ref(0),p=i.ref(0),m=i.computed(()=>document.documentElement.scrollLeft),w=i.computed(()=>document.documentElement.scrollTop),{hostLeft:y,hostTop:A,hostWidth:b,hostHeight:g,hostBottom:x}=u;i.watch(()=>e.offsetX,L=>{o.value=L});const k=i.computed(()=>{const L={left:`${h.value}px`,top:`${p.value}px`,transform:`translate(${o.value}px, ${r.value}px)`};return e.zIndex!==-1&&(L["z-index"]=e.zIndex),e.fitContent?e.keepWidthWithReference&&n.value&&a.value>=n.value.getBoundingClientRect().width&&(L.width=`${a.value}px`):a.value!==-1&&(L.width=`${a.value}px`),e.minWidth!==-1&&(L.minWidth=`${e.minWidth}px`),e.customStyles&&Object.assign(L,e.customStyles),s.value>0&&(L.maxHeight=s.value+"px"),L}),F=i.computed(()=>({left:`${c.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function T(L){if(L&&e.keepWidthWithReference){const B=L.getBoundingClientRect();a.value=Math.max(e.minWidth,B.width)}}function D(L,B){const W=b.value-L.width-4;return W>0?W:B}function U(L,B){const W=g.value-L.height-12;return W>0?W:B}function _(L,B,W){const K=c.value,Z=B.left-y.value+B.width/2+m.value,Y=B.top-A.value-(L.height+W.height)+w.value;return{popoverLeft:Z,popoverTop:Y,arrowLeft:K}}function N(L,B,W){const K=B.top-A.value+(B.height+W.height)+w.value,Z=U(L,K);return Math.min(K,Z)}function I(L,B){const W=D(B,L),K=L<=W?c.value:L-W;return{popoverLeft:Math.min(L,W),arrowLeft:K,maxHeight:0}}function C(L,B){const W=D(B,L),K=L<=W?c.value:L-W;return{popoverLeft:L,arrowLeft:K,maxHeight:0}}function P(L,B,W){const K=B.left-y.value+m.value,{arrowLeft:Z,popoverLeft:Y}=C(K,L),{popoverTop:ue}=_(L,B,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function V(L,B,W){const K=B.left-y.value+B.width/2-(W.width/2-(L.left-y.value))+m.value,{arrowLeft:Z,popoverLeft:Y}=I(K,L),ue=N(L,B,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function E(L,B,W){const K=B.left-y.value+m.value,{arrowLeft:Z,popoverLeft:Y}=I(K,L),ue=N(L,B,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function R(L,B,W){const K=B.left-y.value;let Z=0,Y=0,ue=0,le=0,Te="bottom-left";window.innerWidth-K>L.width?Z=K+m.value:(Z=B.right-L.width+m.value,ue=L.width-W.width-20);let Fe=0;if(e.limitContentBySpace){const Xt={topHeight:B.top-A.value-W.height-8,bottomHeight:x.value-B.bottom-W.height-8};Fe=Math.max(Xt.topHeight,Xt.bottomHeight),L.height>Fe&&(le=Fe,n.value.classList.add("popover-limitmax"))}const yt=le?Math.floor(le):L.height,Me=B.top-A.value+(B.height+W.height);return x.value-Me>yt?Y=Me+w.value:(Y=B.top-yt-W.height+w.value,x.value-Me>B.top?(Y=Me+w.value,yt>B.top&&(Y=x.value-yt)):(Y=Y<0?0:Y,Te="top")),n.value.classList.add("popover-"+Te,"bs-popover-"+Te),{popoverLeft:Z<0?5:Z,popoverTop:Y,arrowLeft:ue,maxHeight:le}}function M(L,B,W){const K=B.left+B.width,Z=Math.max(B.top-(L.height/2-B.height/2),A.value);let Y=A.value+g.value-L.height;Y<0&&(Y=Z);const ue=Math.min(Z,Y);return{popoverLeft:K,popoverTop:ue,arrowLeft:0,maxHeight:0}}function $(L,B,W){const K=B.left+B.width,Z=Math.max(B.top-B.height,A.value);let Y=A.value+g.value-L.height;Y<0&&(Y=Z);const ue=Math.min(Z,Y);return{popoverLeft:K,popoverTop:ue,arrowLeft:0,maxHeight:0}}const re=new Map([["top",_],["top-left",P],["bottom",V],["bottom-left",E],["right",M],["right-top",$],["auto",R]]);function te(L){var Y;e.keepWidthWithReference&&T(L);const B=L.getBoundingClientRect();l.value=B.top,d.value=B.left;const W=t.value?t.value.getBoundingClientRect():{height:4,width:4},K=(Y=n.value)==null?void 0:Y.getBoundingClientRect();a.value=K.width;const Z=re.get(f.value);if(Z){const{arrowLeft:ue,popoverLeft:le,popoverTop:Te,maxHeight:Fe}=Z(K,B,W);c.value=ue,h.value=le,p.value=Te,s.value=Fe||-1}}function z(L){if(L){const B=L.getBoundingClientRect();(B.left!==d.value||B.top!==l.value)&&te(L)}}function j(){f.value=e.placement,c.value=0,h.value=0,p.value=0,a.value=-1}return{arrowStyle:F,popoverStyle:k,position:f,popoverWidth:a,fitToReference:T,followToReferencePosition:z,locateToReference:te,resetPosition:j}}function Oh(e,t,n,u,o,r,a){const s=i.ref(e.visible),l=i.computed(()=>s.value),{fitToReference:d,locateToReference:f,resetPosition:c}=a;let h;async function p(){s.value&&(e.beforeClose&&typeof e.beforeClose=="function"&&!await e.beforeClose()||(s.value=!1,document.body.removeEventListener("click",h),document.body.removeEventListener("mousedown",h),document.body.removeEventListener("wheel",h,!0),document.removeEventListener("scroll",h),c(),t.emit("hidden")))}h=w=>{var b;if(!o.value)return;const y=o.value.contains(w.target);if(w.type==="scroll"||w.type==="wheel"&&y){p();return}if(w.target.closest(".time-picker-panel"))return;const A=(b=w.target)==null?void 0:b.closest(".popover");if(A&&u.value&&A===u.value){w.type!=="scroll"&&w.type!=="wheel"&&w.stopPropagation();return}if(!y&&s.value){const g=o.value.closest(".popover");g&&g.removeEventListener("click",h),p()}};async function m(w){if(u.value&&(e.showArrow===!1||e.showArrow&&n.value)&&w){c(),s.value=!0,o.value=w,r.value&&d(w),await i.nextTick(),f(w),document.body.addEventListener("click",h),document.body.addEventListener("mousedown",h),document.body.addEventListener("wheel",h,!0),document.addEventListener("scroll",h),(top==null?void 0:top.document)!==document&&(top==null||top.document.addEventListener("mousedown",h));const y=w.closest(".popover");y&&y.addEventListener("click",h),t.emit("shown")}}return t.expose({hide:p,popoverRef:u,show:m,shown:l,isShow:s}),{showPopover:s,hidePopverOnClickBodyHandler:h}}function Lh(e,t,n,u,o,r){const{popoverWidth:a,fitToReference:s,followToReferencePosition:l}=o;function d(){var f;if(r.value&&((f=r.value.style)==null?void 0:f.display)!=="none"&&n.value){l(n.value);const c=n.value.getBoundingClientRect();u.value&&c.width!==a.value&&s(n.value)}}return{onResize:d}}function Ph(e,t=500){const n=i.ref(e.value);let u;const o=i.watch(e,a=>{clearTimeout(u),u=setTimeout(()=>{n.value=a},t)}),r=()=>{clearTimeout(u),o()};return i.onUnmounted(r),{delayedValue:n,cleanup:r}}const Kt=i.defineComponent({name:"FXPopover",props:Ka,emits:["shown","hidden"],setup(e,t){const n=i.ref(),u=i.ref(),o=i.ref(e.reference),r=i.ref(e.keepWidthWithReference),a=i.computed(()=>!!e.title),s=Nh(e),{host:l}=s,d=Ih(e,n,u,s),{position:f,arrowStyle:c,popoverStyle:h,fitToReference:p,locateToReference:m}=d,{showPopover:w,hidePopverOnClickBodyHandler:y}=Oh(e,t,n,u,o,r,d),{onResize:A}=Lh(e,t,o,r,d,u),b=i.computed(()=>{let T=f.value;T==="top-left"&&(T="top");const D=`popover in popover-${T}`,U=`bs-popover-${T}`,_={"popover-fitcontent":e.fitContent,fade:!0};_[D]=!0,_[U]=!0;const N=(e.class||"").split(" ");return e.isSimpleTips&&N.unshift("popover-tips"),N.reduce((I,C)=>(I[C]=!0,I),_),_}),g=i.computed(()=>({"popover-content":!0,"popover-body":!0})),x=i.computed(()=>{const T={};return T.opacity=w.value?1:0,T.visibility=w.value?"visible":"hidden",T.zIndex=1060,T}),k=i.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:F}=Ph(x,50);return i.onMounted(()=>{var T;r.value&&p(o.value),e.reference&&m(o.value),window.addEventListener("resize",A),(T=u.value)==null||T.focus()}),i.onUnmounted(()=>{document.body.removeEventListener("click",y),window.removeEventListener("resize",A),w.value=!1}),()=>i.createVNode(i.Teleport,{to:l},{default:()=>{var T;return[i.withDirectives(i.createVNode("div",{tabindex:"-1",ref:u,class:b.value,style:{...h.value,...F.value},onMousedown:D=>{D.stopPropagation()},onClick:D=>{D.stopPropagation()}},[k.value&&i.createVNode("div",{ref:n,class:"popover-arrow arrow",style:c.value},null),a.value&&i.createVNode("h3",{class:"popover-title popover-header"},[e.title]),i.createVNode("div",{class:g.value},[t.slots.default&&((T=t.slots)==null?void 0:T.default())])]),[[i.vShow,w.value]])]}})}}),au="FarrisX_PopoverInstancesKey";window[au]=window[au]||new WeakMap;function To(e,t,n){e.stopPropagation();const u=t.value;u&&u.value&&!u.value.isShow&&(u.value.show(n),window[au].set(n,u.value))}function Qa(e,t,n){e.stopPropagation(),t.value.value.hide(),window[au].delete(n)}function Vh(e,t,n){e.stopPropagation();const u=t.value;u&&u.value&&(u.value.isShow?Qa(e,t,n):To(e,t,n))}function Ja(e,t,n){t.arg&&t.arg==="toggle"?Vh(e,t,n):To(e,t,n)}const es={mounted:(e,t,n)=>{t.modifiers.hover?(e.addEventListener("mouseenter",u=>To(u,t,e)),e.addEventListener("mouseleave",u=>Qa(u,t,e))):t.modifiers.click?e.addEventListener("click",u=>Ja(u,t,e)):e.addEventListener("click",u=>Ja(u,t,e)),e.classList.add("v-popover")},unMounted:(e,t,n)=>{}};Kt.install=e=>{e.component(Kt.name,Kt),e.directive("fxpopover",es)};const ts={type:{type:String,default:"StartedToDo"},status:{type:String,default:"NotStart"},message:{type:String,default:""},taskDetail:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"hover"},initExpanded:{type:Boolean,default:!1},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!0},loading:Object,shimmer:{type:Boolean,default:!0},outputMode:{type:String,default:"streaming"},listStatus:{type:String,default:void 0},completedCount:{type:Number,default:void 0},totalCount:{type:Number,default:void 0}},ns={items:{type:Array,default:()=>[]}},rs={id:{type:Number||String,default:0},status:{type:String},task:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"expand"},initExpanded:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!1},shimmer:{type:Boolean,default:!0},title:{type:String,default:""},message:{type:String,default:""},outputMode:{type:String,default:"full"}},su=i.defineComponent({name:"FXTodoListItemView",props:rs,emits:["click"],setup(e,{emit:t}){const{propertyStates:n,registerProperty:u,updatePropertyValue:o,startStreaming:r}=Pr();u("title",e.title??""),u("task",e.task??""),u("detail",e.message??""),i.watch([()=>e.title,()=>e.task,()=>e.message],([p,m,w])=>{o("title",p??""),o("task",m??""),o("detail",w??"")});const a=i.computed(()=>["f-chat-todo-item",{"is-done":e.status==="Done","is-working":e.status==="Working","is-not-start":e.status==="NotStart","no-shimmer":!e.shimmer}]),s=i.computed(()=>["f-chat-todo-task",{"is-done":e.status==="Done"}]);function l(){t("click",e,e.id)}const d=i.computed(()=>e.outputMode==="streaming"),f=i.computed(()=>{var p;return d.value?((p=n.title)==null?void 0:p.displayedValue)??"":e.title??""}),c=i.computed(()=>{var p;return d.value?((p=n.task)==null?void 0:p.displayedValue)??"":e.task??""}),h=i.computed(()=>{var p;return d.value?((p=n.detail)==null?void 0:p.displayedValue)??"":e.message??""});return i.onMounted(()=>{d.value&&r()}),()=>i.createVNode("li",{key:e.id,class:a.value,onClick:l},[e.todoList&&e.todoList.length>0&&i.createVNode(Qt,{todoList:e.todoList,status:e.status,message:e.task,taskDetail:e.message,detailViewMode:e.detailViewMode,initExpanded:e.initExpanded,showLoading:e.showLoading,showLabel:e.showLabel,outputMode:e.outputMode},null),!e.todoList||e.todoList.length===0&&i.createVNode(i.Fragment,null,[e.showLoading&&i.createVNode(wn,{status:e.status??"Done",variant:"todo"},null),f.value?i.createVNode("div",{class:"f-chat-todo-task-wrapper"},[i.createVNode("span",{class:s.value},[f.value]),i.createVNode("div",{class:"f-chat-todo-task-description"},[c.value]),h.value?i.withDirectives(i.createVNode("div",{class:"f-chat-todo-task-description"},[h.value]),[[i.resolveDirective("overflow-tooltip")]]):null]):i.createVNode("div",{class:"f-chat-todo-task-wrapper"},[i.createVNode("span",{class:s.value},[c.value]),h.value?i.withDirectives(i.createVNode("div",{class:"f-chat-todo-task-description"},[h.value]),[[i.resolveDirective("overflow-tooltip")]]):null])])])}}),nr=i.defineComponent({name:"FXTodoListView",props:ns,setup(e){return()=>{var t;return(t=e.items)!=null&&t.length?i.createVNode("ul",{class:"f-chat-todo-items"},[e.items.map((n,u)=>i.createVNode(su,i.mergeProps({key:u},n),null))]):null}}}),Rh=300,Mh={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},Qt=i.defineComponent({name:"FXStartedTodo",props:ts,setup(e){const t=i.ref(null),n=i.ref(null),u=i.ref(null),o=i.ref(null),r=i.computed(()=>e.outputMode==="streaming"),{displayContent:a}=mi(()=>({detail:e.taskDetail??""}),()=>!0,r,{charInterval:30}),s=i.ref(e.initExpanded),l=i.computed(()=>({"f-chat-message-started-todo--content":!0,"d-none":!s.value}));function d(){e.detailViewMode!=="expand"&&(o.value!=null&&(window.clearTimeout(o.value),o.value=null),u.value=window.setTimeout(()=>{t.value&&n.value&&n.value.show(t.value),u.value=null},Rh))}function f(){e.detailViewMode!=="expand"&&(u.value!=null&&(window.clearTimeout(u.value),u.value=null),o.value=window.setTimeout(()=>{var b,g;(g=(b=n.value)==null?void 0:b.hide)==null||g.call(b),o.value=null},150))}function c(){if(e.detailViewMode==="none")return null;const b=a.value.detail??"";return i.createVNode(i.Fragment,null,[b?i.createVNode("div",{class:"f-chat-started-todo-task-detail"},[b]):null,i.createVNode(nr,{items:e.todoList},null)])}function h(){e.detailViewMode==="expand"&&(s.value=!s.value)}function p(){return e.detailViewMode==="expand"?i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:s.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null):null}function m(){return e.detailViewMode==="hover"&&i.createVNode(Kt,{ref:n,class:"f-chat-started-todo-popover"},{default:()=>[i.createVNode("div",{class:"f-chat-started-todo-popover-content",onMouseenter:()=>{o.value!=null&&(window.clearTimeout(o.value),o.value=null)},onMouseleave:f},[c()])]})}const w=i.computed(()=>e.listStatus==="completed"),y=i.computed(()=>{const b=e.todoList??[],g=e.totalCount??b.length;return{done:e.completedCount??b.filter(k=>(k==null?void 0:k.status)==="Done").length,total:g}});function A(){if(!w.value)return null;const{done:b,total:g}=y.value,x=g>0?`已完成 (${b}/${g})`:"已完成";return i.createVNode("span",{class:"f-chat-started-todo-completed-chip","aria-label":x},[x])}return()=>i.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working","is-completed":w.value}],onMouseenter:d,onMouseleave:f},[i.createVNode("div",{class:"f-chat-message-started-todo--header",onClick:h},[e.showLabel&&i.createVNode("span",{class:"f-chat-started-todo-label"},[Mh[e.status]]),i.createVNode("span",{class:"f-chat-started-todo-message",innerHTML:e.message},null),A(),p()]),e.detailViewMode==="expand"&&i.createVNode("div",{class:l.value},[c()]),m()])}});Qt.install=e=>{e.component(Qt.name,Qt)};const Bh=i.defineComponent({name:"FXBubbleThoughtChain",props:Fh,setup(e,t){const{elapsedSeconds:n,hasEverStarted:u,start:o,stop:r,reset:a}=Hu(),s=i.computed(()=>{var c;return((c=e.content)==null?void 0:c.status)==="Done"}),l=i.computed(()=>{var c;return((c=e.content)==null?void 0:c.message)??"正在思考......"}),d=i.computed(()=>{var p,m;const c=((p=e.content)==null?void 0:p.doneMessage)??((m=e.content)==null?void 0:m.message)??"思考完成",h=u.value?`(用时${n.value}秒)`:"";return""+c+h}),f=i.computed(()=>s.value?d.value:l.value);return i.watch(()=>{var c;return(c=e.content)==null?void 0:c.status},c=>{c==="Working"?o():c==="Done"?r():a()},{immediate:!0}),i.onUnmounted(()=>{a()}),t.expose({instance:{get loadDone(){return e.content?s.value:!0}}}),()=>{var c,h,p,m,w,y;return e.content?i.createVNode(Qt,{status:((c=e.content)==null?void 0:c.status)??"Working",message:f.value,todoList:(h=e.content)==null?void 0:h.todoList,detailViewMode:((p=e.content)==null?void 0:p.detailViewMode)??"expand",showLabel:!1,showLoading:!0,initExpanded:!0,listStatus:(m=e.content)==null?void 0:m.listStatus,completedCount:(w=e.content)==null?void 0:w.completedCount,totalCount:(y=e.content)==null?void 0:y.totalCount},null):null}}}),rr=i.defineComponent({name:"UserAuthMessage",props:{content:{type:Object,required:!0},onConfirm:{type:Function,default:void 0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-auth"},[i.createVNode("div",{class:"f-ec-auth-desc"},[e.content.description]),i.createVNode("div",{class:"f-ec-auth-actions"},[e.content.options.map(t=>i.createVNode("button",{key:t.optionId,type:"button",class:"f-ec-auth-btn",onClick:()=>{var n;(n=e.onConfirm)==null||n.call(e,t.optionId,t.name,t.message??t.name),console.info("[UserAuth]",t.optionId,t.name)}},[t.name]))])])}}),zh=300,jh={read_file:"tool_file",write_file:"tool_file",edit_file:"tool_file",glob:"tool_file",grep:"tool_file",bash:"tool_command",web_fetch:"tool_internet",web_search:"tool_internet",todo_create:"tool_task",todo_list:"tool_task",todo_get:"tool_task",todo_update:"tool_task",ask_user:"tool_interaction",core_memory:"tool_memory",add_daily_note:"tool_memory",lint_json:"dateselect",lint_markdown:"dateselect",output_validation:"dateselect",load_skill_through_path:"tool_mcp"};function Hh(e){return e?e.startsWith("mcp:")?"tool_mcp":jh[e]??"thinking_tool":"thinking_tool"}const vn=i.defineComponent({name:"FXToolUseMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>e.content.toolResultApplied===!0||String(e.content.result??"").trim().length>0),n=i.computed(()=>e.content.success===!1),u=i.ref(!1);let o=setTimeout(()=>{u.value=!0},zh);i.onBeforeUnmount(()=>{o&&clearTimeout(o)});const r=i.computed(()=>t.value),a=i.computed(()=>u.value&&!t.value),s=i.computed(()=>n.value?"执行失败":r.value?"执行完成":"调用中"),l=i.ref(!1),d=i.computed(()=>({"f-chat-tool-use":!0,"is-done":r.value,"is-error":n.value})),f=i.computed(()=>({"f-chat-tool-use-status":!0,"is-done":r.value&&!n.value,"is-run":a.value&&!n.value,"is-error":n.value}));i.watch(()=>[e.content.result,e.content.toolResultApplied,e.content.success],()=>{t.value&&(l.value=!1)},{flush:"post"});const c=()=>t.value?i.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{l.value=!l.value}},[i.createVNode("i",{class:"fx-icon fx-icon-"+Hh(e.content.toolName)+" tool-icon"},null),i.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),i.createVNode("div",{class:f.value},[n.value?i.createVNode(wn,{status:"Error"},null):i.createVNode(wn,{status:r.value?"Done":a.value?"Working":"NotStart"},null),i.createVNode("span",{class:"f-chat-tool-use-status-text"},[s.value])]),i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:l.value?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease"}},null)]),l.value&&i.createVNode("div",{class:"f-chat-tool-use-content"},[c()])])}});vn.install=e=>{e.component(vn.name,vn)};const ur=i.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":rr,"fx-app-preview-inline":at,FXToolUse:vn},props:Ir,setup(e,t){const n=i.shallowRef(),u=i.ref(),o=i.ref(),r=i.computed(()=>!!e.showAvatar),a=i.computed(()=>r.value===!0||e.header==="ContentHeader"),s=i.computed(()=>t.slots.leftFooter||t.slots.rightFooter),l=i.computed(()=>{var C;return Ae({},(C=e.styles)==null?void 0:C.footer)}),d=C=>{if(e.attachmentRowClickOpensPreview!==!1&&e.onPreview){if(C.type==="md"&&C.content){e.onPreview({content:C.content,contentType:"markdown"});return}if(C!=null&&C.url){const P=C!=null&&C.fullScreenPreview?"fullScreen":"splitScreen";e.onPreview({url:C.url,previewMode:P,title:C.name})}}},f=C=>{if(e.attachmentRowClickOpensPreview===!1||!e.onPreview)return;const P=C==null?void 0:C.filter(E=>E.type==="md"&&E.content);if(P.length===0)return;const V=Object.fromEntries(P.map(E=>[E.name,E.content??""]));e.onPreview({contentMap:V,contentType:"markdown"})},{renderFileEmbeddedContent:c,renderPageEmbeddedContent:h}=xi(),p=i.ref(""),m=i.computed(()=>{var P,V;if((P=e.content)!=null&&P.footerContent)return e.content.footerContent;const C=(V=e.content)==null?void 0:V.structuredContent;return C&&(C.footerTemplate||C.footerUrl||C.footerFile)?{type:C.footerUrl?"page":C.footerFile?"file":"template",pageUrl:C.footerUrl,fileContent:C.footerFile,template:C.footerTemplate,width:C.footerWidth,height:C.footerHeight}:null});i.watch(()=>{var C;return(C=m.value)==null?void 0:C.width},C=>{if(!C){p.value="";return}if(C.endsWith("%")){const P=parseFloat(C);isNaN(P)||i.nextTick(()=>{var E,R;const V=(R=(E=n.value)==null?void 0:E.parentElement)==null?void 0:R.clientWidth;V&&(p.value=`${V*P/100}px`)})}else p.value=C},{immediate:!0});const w=C=>{if(!C||C.length===0)return"我";const P=C.charAt(0);return/[\u4e00-\u9fa5]/.test(P)?P:P.toUpperCase()};function y(){return e.header==="ContentHeader"?Ql:Jl}const A=y(),{renderHeader:b}=A(e,t),g=()=>{var V,E,R;const C=((V=e.content)==null?void 0:V.sender)??"发送人",P=w(((E=e.content)==null?void 0:E.sender)??"");return i.createVNode("div",{class:"f-chat-bubble-avatar"},[(R=e.content)!=null&&R.avatar?i.createVNode("img",{src:e.content.avatar,alt:C},null):i.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[P])])},x=()=>{var P;const C=(P=e.content)==null?void 0:P.toolUseAboveText;return C!=null&&C.length?i.createVNode("div",{class:"f-chat-bubble-tool-use-group"},[C.map((V,E)=>i.createVNode(vn,{key:V.toolUseId??`tu-${E}`,content:V},null))]):null},k=()=>{var C;return(C=e.content)!=null&&C.thinkingContent?i.createVNode(Th,{ref:u,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},F=()=>{var C;return(C=e.content)!=null&&C.startedTodo?i.createVNode(Bh,{ref:o,content:e.content.startedTodo},null):null},T=C=>{if(!(C!=null&&C.type))return null;const{type:P}=C;return P==="page"&&C.pageUrl?h(C,{onNavigate:V=>{var E;(E=e.onPreview)==null||E.call(e,{url:V})}}):P==="file"&&C.fileContent?c(C,{onPreviewFile:d,onBatchPreviewFile:f}):P==="template"&&C.template?C.template():null},D=()=>{var E,R,M;if(!((M=(R=(E=e.content)==null?void 0:E.structuredContent)==null?void 0:R.sections)!=null&&M.length))return null;const{sections:C,showDivider:P}=e.content.structuredContent,V=$=>{const{content:re,label:te}=$;return te||re&&typeof re=="string"?i.createVNode(i.Fragment,null,[i.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),$.label&&i.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[$.label]),i.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[$.content])]):T($.content)};return i.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":P}]},[C.map(($,re)=>i.createVNode("div",{key:re,class:["f-chat-bubble-structured-section",{"section-divider":$.showDivider}]},[i.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[$.icon&&($.icon.startsWith("http")||$.icon.startsWith("//")||$.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test($.icon)?i.createVNode("img",{alt:$.title,src:$.icon,class:"f-chat-bubble-structured-section-icon"},null):i.createVNode("i",{class:`fx-icon ${$.icon}`,style:$.iconStyle},null)),i.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[$.title])]),$.items&&$.items.length>0&&i.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[$.items.map((te,z)=>i.createVNode("div",{key:z,class:"f-chat-bubble-structured-section-item"},[V(te)]))])]))])},U=()=>{const C=m.value;if(!C)return null;const P={};return p.value&&(P.width=p.value),C.height&&(P.height=`${C.height}px`),i.createVNode("div",{class:"f-chat-bubble-content-footer",style:P},[T(C)])},_=()=>{const C=e.attachmentRowClickOpensPreview!==!1?d:void 0;return i.createVNode(yi,{attachments:e.attachments??[],enableFixedWidth:e.placement==="end",showDownloadButton:e.attachmentShowDownload!==!1,onPreview:C,onBatchPreview:e.attachmentRowClickOpensPreview!==!1?f:void 0,role:e.role},null)},N=()=>{var P;const C=(P=e.content)==null?void 0:P.compositeInlineBlocks;return C!=null&&C.length?C.map((V,E)=>V.kind==="userAuth"?i.createVNode(i.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${E}`,content:V.content,onConfirm:e.onUserAuthConfirm},null):i.createVNode(i.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${E}`,content:V.content,onOpen:e.onPreview},null)):null},I=()=>{var C,P,V,E,R,M;return i.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[a.value&&b(),_(),i.createVNode("div",{class:`f-chat-bubble-content-text-wrapper ${e.placement}`},[(C=e.content)!=null&&C.compositeOrderedBeforeMarkdownRender?e.content.compositeOrderedBeforeMarkdownRender():i.createVNode(i.Fragment,null,[k(),x()]),F(),D(),i.createVNode(Sh,{title:((P=e.content)==null?void 0:P.title)??"",subtitle:((V=e.content)==null?void 0:V.subtitle)??"",text:typeof((E=e.content)==null?void 0:E.text)=="string"?e.content.text:"",textFormat:((R=e.content)==null?void 0:R.textFormat)??"plain",placement:e.placement,onDynamicComponentsDetected:e==null?void 0:e.onDynamicComponentsDetected,onShowDynamicComponent:e==null?void 0:e.onShowDynamicComponent},null),U(),(M=e.compositeTailRender)==null?void 0:M.call(e),N()]),s.value&&i.createVNode("div",{class:"f-chat-bubble-footer",style:l.value},[t.slots.leftFooter&&i.createVNode("div",{class:"f-chat-bubble-footer-left"},[t.slots.leftFooter()]),t.slots.rightFooter&&i.createVNode("div",{class:"f-chat-bubble-footer-right"},[t.slots.rightFooter()])])])};return()=>i.createVNode("div",{class:"f-chat-bubble-container",ref:n},[i.createVNode("div",{class:`f-chat-bubble-wrapper ${e.placement}`},[e.placement==="start"?i.createVNode(i.Fragment,null,[r.value&&g(),I()]):i.createVNode(i.Fragment,null,[I(),r.value&&g()])])])}}),us={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},Fo=i.defineComponent({name:"FXBubbleAction",props:us,setup(e,t){const n=i.computed(()=>Ae({},e.customStyle));return()=>t.slots.default&&i.createVNode("span",{class:"f-chat-bubble-footer-action",style:n.value},[t.slots.default()])}});ur.install=e=>{e.component(ur.name,ur),e.component(Fo.name,Fo)};const os={items:{type:Array,default:()=>[]},modelValue:{type:Number,default:0},direction:{type:String,default:"horizontal"},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},loop:{type:Boolean,default:!0},trigger:{type:String,default:"click"},indicatorPosition:{type:String,default:"inside"},arrowVisibility:{type:String,default:"hover"},showIndicator:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},height:{type:[String,Number],default:"400px"},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[String,Array,Object],default:""},customStyle:{type:[Object,String],default:""},buttonPosition:{type:String,default:"inner"}},is={item:{type:Object,default:()=>({})},index:{type:Number,default:0},active:{type:Boolean,default:!1},showInfo:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},lu=i.defineComponent({name:"FXCarouselItem",props:is,emits:["click"],setup(e,{slots:t,emit:n}){const u=i.computed(()=>{var c;const f={"fx-carousel--item":!0,"fx-carousel--item-active":e.active};return ye(f,(c=e.classNames)==null?void 0:c.item)}),o=i.computed(()=>{var c,h;const f=Ae({},(c=e.styles)==null?void 0:c.item);return Ae(f,(h=e.styles)==null?void 0:h.item)}),r=()=>{var f,c,h;return e.item.image?i.createVNode("img",{class:["fx-carousel--item-image",(f=e.classNames)==null?void 0:f.image],style:(c=e.styles)==null?void 0:c.image,src:e.item.image,alt:(h=e.item.title)==null?void 0:h.toString()},null):null},a=()=>{var f,c,h,p;return e.item.content?i.createVNode("div",{class:["fx-carousel--item-content",(f=e.classNames)==null?void 0:f.content],style:(c=e.styles)==null?void 0:c.content},[e.item.content]):t.default?i.createVNode("div",{class:["fx-carousel--item-content",(h=e.classNames)==null?void 0:h.content],style:(p=e.styles)==null?void 0:p.content},[t.default()]):null},s=()=>{var f,c;return e.item.title?i.createVNode("h3",{class:["fx-carousel--item-title",(f=e.classNames)==null?void 0:f.title],style:(c=e.styles)==null?void 0:c.title},[e.item.title]):null},l=()=>{var f,c;return e.item.description?i.createVNode("p",{class:["fx-carousel--item-description",(f=e.classNames)==null?void 0:f.description],style:(c=e.styles)==null?void 0:c.description},[e.item.description]):null},d=f=>{e.item.disabled||n("click",f,e.item,e.index)};return()=>i.createVNode("div",{class:u.value,style:o.value,onClick:d},[r(),a(),e.showInfo&&i.createVNode("div",{class:"fx-carousel--item-info"},[s(),l()])])}});function $h(e){const{items:t,autoplay:n=!1,interval:u=3e3,loop:o=!0,direction:r="horizontal"}=e,a=i.ref(0),s=i.ref(!1),l=i.ref(null),d=i.computed(()=>t.length),f=i.computed(()=>d.value<=1);i.computed(()=>a.value===0?o?d.value-1:0:a.value-1),i.computed(()=>a.value===d.value-1?o?0:a.value:a.value+1);const c=i.computed(()=>{const g=-a.value*100;return{transform:r==="horizontal"?`translateX(${g}%)`:`translateY(${g}%)`,transition:"transform 0.5s ease"}}),h=g=>{g<0||g>=d.value||(a.value,a.value=g)},p=()=>{f.value||(a.value===d.value-1?h(o?0:a.value):h(a.value+1))},m=()=>{f.value||(a.value===0?h(o?d.value-1:0):h(a.value-1))},w=()=>{!n||f.value||(y(),l.value=window.setInterval(()=>{s.value||p()},u))},y=()=>{l.value&&(clearInterval(l.value),l.value=null)},A=()=>{s.value=!0,n&&y()},b=()=>{s.value=!1,n&&w()};return i.onMounted(()=>{w()}),i.onUnmounted(()=>{y()}),{currentIndex:a,totalItems:d,isSingleItem:f,trackStyle:c,goTo:h,next:p,prev:m,handleMouseEnter:A,handleMouseLeave:b}}const or=i.defineComponent({name:"FXCarousel",props:os,emits:["update:modelValue","change","item-click"],setup(e,{slots:t,emit:n}){const{currentIndex:u,isSingleItem:o,trackStyle:r,goTo:a,next:s,prev:l,handleMouseEnter:d,handleMouseLeave:f}=$h({items:e.items,autoplay:e.autoplay,interval:e.interval,loop:e.loop,direction:e.direction}),c=k=>{n("update:modelValue",k),n("change",k,u.value)},h=i.computed(()=>{var F;const k={"fx-carousel":!0,"fx-carousel--vertical":e.direction==="vertical","fx-carousel--single":o.value,"fx-carousel--button-outer":e.buttonPosition==="outer","fx-carousel--button-inner":e.buttonPosition==="inner"};return ye(k,(F=e.classNames)==null?void 0:F.root)}),p=i.computed(()=>{var T;const k={height:typeof e.height=="number"?`${e.height}px`:e.height},F=Ae(k,e.customStyle);return Ae(F,(T=e.styles)==null?void 0:T.root)}),m=i.computed(()=>{var F;const k={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return ye(k,(F=e.classNames)==null?void 0:F.container)}),w=i.computed(()=>{var F;return ye({"fx-carousel--track":!0},(F=e.classNames)==null?void 0:F.track)}),y=i.computed(()=>{var F;const k={"fx-carousel--indicator":!0,"fx-carousel--indicator-outside":e.indicatorPosition==="outside","fx-carousel--indicator-none":e.indicatorPosition==="none"||!e.showIndicator};return ye(k,(F=e.classNames)==null?void 0:F.indicator)}),A=k=>{var T,D;const F={"fx-carousel--arrow":!0,"fx-carousel--arrow-left":k==="left","fx-carousel--arrow-right":k==="right","fx-carousel--arrow-never":e.arrowVisibility==="never"||!e.showArrow};return F[`fx-carousel--arrow-${e.buttonPosition}`]=!0,ye(F,k==="left"?(T=e.classNames)==null?void 0:T.arrowLeft:(D=e.classNames)==null?void 0:D.arrowRight)},b=k=>{var D,U;if(o.value)return null;const F=k==="left"?l:s,T=t[k==="left"?"prevArrow":"nextArrow"];return i.createVNode("button",{class:A(k),style:k==="left"?(D=e.styles)==null?void 0:D.arrowLeft:(U=e.styles)==null?void 0:U.arrowRight,onClick:F,"aria-label":`${k} arrow`},[T?T():i.createVNode("i",{style:"font-size: 60px;",class:`fx-icon fx-icon-arrow-${k==="left"?"left":"right"}`},null)])},g=()=>{var k;return o.value||!e.showIndicator?null:i.createVNode("div",{class:y.value,style:(k=e.styles)==null?void 0:k.indicator},[e.items.map((F,T)=>{var D,U;return i.createVNode("button",{"aria-label":`indicator ${T}`,key:T,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":T===u.value}],style:T===u.value?(D=e.styles)==null?void 0:D.indicatorItemActive:(U=e.styles)==null?void 0:U.indicatorItem,onClick:()=>{a(T),c(T)}},null)})])},x=()=>i.createVNode("div",{class:w.value,style:r.value},[e.items.map((k,F)=>i.createVNode(lu,{key:k.id||`item_${F}`,item:k,showInfo:e.showInfo,index:F,active:F===u.value,styles:e.styles,classNames:e.classNames,onClick:(T,D,U)=>{n("item-click",T,D,U)}},{default:()=>{var T,D;return[(T=t.item)==null?void 0:T.call(t,{item:k,index:F,active:F===u.value}),(D=t[`item${F}`])==null?void 0:D.call(t,{item:k,index:F,active:F===u.value})]}}))]);return()=>{var k;return i.createVNode("div",{class:h.value,style:p.value,onMouseenter:d,onMouseleave:f},[e.buttonPosition==="outer"&&b("left"),i.createVNode("div",{class:m.value,style:(k=e.styles)==null?void 0:k.container},[e.buttonPosition==="inner"&&b("left"),x(),e.buttonPosition==="inner"&&b("right")]),e.buttonPosition==="outer"&&b("right"),g()])}}});or.install=e=>{e.component(or.name,or),e.component(lu.name,lu)};const as={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function Uh(e){const t=i.ref(-1),n=i.ref(-1),u=i.ref(0),o=i.ref(0),r=i.ref(!1),a=i.ref(!1),s=i.computed(()=>({display:r.value?"block":"none",left:`${u.value}px`,cursor:"e-resize"})),l=i.computed(()=>({display:a.value?"block":"none",top:`${o.value}px`,cursor:"n-resize"})),d=i.computed(()=>{const y={display:a.value||r.value?"block":"none"};return o.value>0&&(y.cursor="n-resize"),y});function f(y,A,b,g){const x=e.value;if(x){const{left:k,right:F,width:T}=x.getBoundingClientRect();let D=y.clientX-k;g==="right"&&(D=F-y.clientX),D>A&&(D=A),D<b&&(D=b),g==="right"&&(D=T-D),u.value=D}}function c(y,A,b,g){const x=e.value;if(x){const{top:k,bottom:F,height:T}=x.getBoundingClientRect();let D=y.clientY-k;g==="bottom"&&(D=F-y.clientY),D>A&&(D=A),D<b&&(D=b),g==="bottom"&&(D=T-D),o.value=D}}function h(){const y=e.value;if(y){const{width:A,height:b}=y.getBoundingClientRect();return{width:A,height:b}}return null}function p(){const y=e.value;return y?Array.from(y.querySelectorAll("[data-position]")).reduce((A,b)=>{const g=b.getAttribute("data-position");return A=Object.assign(A,{[g]:b}),A},{}):null}function m(y,A){const b=h(),g=p();if(b&&g){const x=g==null?void 0:g.right,k=g==null?void 0:g.left;if(y==="left"&&k)return x?b.width-x.clientWidth-A:b.width-A;if(y==="right"&&x)return k?b.width-k.clientWidth-A:b.width-A}}function w(y,A){const b=h(),g=p();if(b&&g){const x=g==null?void 0:g.bottom,k=g==null?void 0:g.top;if(y==="top"&&k)return x?b.height-x.clientHeight-A:b.height-A;if(y==="bottom"&&x)return k?b.height-k.clientHeight-A:b.height-A}}return{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:l,resizeOverlayStyle:d,showHorizontalResizeHandle:r,showVerticalResizeHandle:a,horizontalResizeBarPosition:t,verticalResizeBarPosition:n,verticalResizeHandleOffset:o,horizontalResizeHandleOffset:u,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:c,getPanelMaxWidth:m,getPanelMaxHeight:w}}const An=i.defineComponent({name:"FXSplitter",props:as,emits:[],setup(e,t){const n=i.ref(),u=Uh(n),{horizontalResizeHandleStyle:o,verticalResizeHandleStyle:r,resizeOverlayStyle:a}=u;i.provide("splitter",{useResizeHandleComposition:u});const s=i.computed(()=>ye({"f-splitter":!0},e==null?void 0:e.customClass)),l=i.computed(()=>{const d={"flex-direction":e.direction==="row"?"row":"column"};return Ae(d,e==null?void 0:e.customStyle)});return()=>i.createVNode("div",{class:s.value,ref:n,style:l.value},[t.slots.default&&t.slots.default(),i.createVNode("div",{class:"f-splitter-resize-overlay",style:a.value},null),i.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:o.value},null),i.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:r.value},null)])}}),Wh={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},resizeHandle:{type:String,default:""},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0}};function Gh(e,t){const n=i.ref(e.width),u=i.ref(e.height),{horizontalResizeBarPosition:o,horizontalResizeHandleOffset:r,showHorizontalResizeHandle:a,showVerticalResizeHandle:s,verticalResizeBarPosition:l,verticalResizeHandleOffset:d,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:c,getPanelMaxWidth:h,getPanelMaxHeight:p}=t;let m="",w,y,A;const b=()=>e.maxWidth?e.maxWidth:h(m,e.minWidth)||0,g=()=>e.maxHeight?e.maxHeight:p(m,e.minHeight)||0;function x(T){if((m==="left"||m==="right")&&y){const{left:D}=y.getBoundingClientRect(),{width:U}=w.getBoundingClientRect(),_=T.clientX-D;let N=m==="left"?(U||0)+(_-o.value):(U||0)-(_-o.value);N=e.minWidth>0?Math.max(e.minWidth,N):N;const I=b();I!=null&&I>0&&(N=I>N?N:I),n.value=N}if((m==="top"||m==="bottom")&&y){const{top:D}=y.getBoundingClientRect(),{height:U}=w.getBoundingClientRect(),_=T.clientY-D;let N=m==="top"?(U||0)+(_-l.value):(U||0)-(_-l.value);N=e.minHeight>0?Math.max(e.minHeight,N):N;const I=g();I!=null&&I>0&&(N=I>N?N:I),u.value=N}r.value=0,d.value=0,o.value=-1,l.value=-1,a.value=!1,s.value=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",x),document.body.style.userSelect="",m="",w=null,y=null}function k(T,D,U){if(m=D,w=U,a.value=!0,y=T.composedPath().find(N=>N.className.split(" ")[0]==="f-splitter"),y){const{left:N}=y.getBoundingClientRect();r.value=T.clientX-N,o.value=T.clientX-N;const I=b();A=C=>f(C,I,e.minWidth,m),document.addEventListener("mousemove",A),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}function F(T,D,U){if(m=D,w=U,s.value=!0,y=T.composedPath().find(N=>N.className.split(" ")[0]==="f-splitter"),y){const{top:N}=y.getBoundingClientRect();d.value=T.clientY-N,l.value=T.clientY-N;const I=g();A=C=>c(C,I,e.minHeight,m),document.addEventListener("mousemove",A),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:u,onClickSplitterHorizontalResizeBar:k,onClickSplitterVerticalResizeBar:F}}const ir=i.defineComponent({name:"FSplitterPane",props:Wh,emits:[],setup(e,t){const n=i.ref(),u=i.inject("splitter"),{useResizeHandleComposition:o}=u,r=Gh(e,o),{actualHeight:a,actualWidth:s,onClickSplitterHorizontalResizeBar:l,onClickSplitterVerticalResizeBar:d}=r,f=i.ref(e.position),c=i.computed(()=>{const g={"f-splitter-pane":!0,"f-splitter-pane-main":f.value==="center","has-resize-bar":e.resizable};return g["f-splitter-pane-"+f.value]=!0,ye(g,e==null?void 0:e.customClass)}),h=i.computed(()=>e.resizeHandle?e.resizeHandle.split(",").filter(g=>["e","n","s","w"].find(x=>x===g)):[]),p=i.computed(()=>{const g={};return(s.value||s.value===0)&&(f.value==="left"||f.value==="right"||h.value.find(x=>x==="e")||h.value.find(x=>x==="w"))&&(g.width=`${s.value}px`),(a.value||a.value===0)&&(f.value==="bottom"||f.value==="top"||h.value.find(x=>x==="s")||h.value.find(x=>x==="n"))&&(g.height=`${a.value}px`),e.visible||(g.display="none"),Ae(g,e==null?void 0:e.customStyle)}),m=i.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":f.value==="left","f-splitter-resize-bar-n":f.value==="bottom","f-splitter-resize-bar-s":f.value==="top","f-splitter-resize-bar-w":f.value==="right"}));function w(g){return{e:"left",w:"right",s:"top",n:"bottom"}[g]||g}function y(g,x){x=w(x),["left","right"].find(k=>k===x)&&l(g,x,n.value),["top","bottom"].find(k=>k===x)&&d(g,x,n.value)}function A(){return h.value.length>0?h.value.map(g=>i.createVNode("span",{class:"f-splitter-resize-bar f-splitter-resize-bar-"+g,onMousedown:x=>y(x,g)},null)):i.createVNode("span",{class:m.value,onMousedown:g=>y(g,f.value)},null)}function b(){s.value=e.width,a.value=e.height,p.value}return t.expose({reset:b}),()=>i.createVNode("div",{ref:n,class:c.value,style:p.value,"data-position":f.value},[t.slots.default&&t.slots.default(),e.resizable&&A()])}});An.install=e=>{e.component(An.name,An),e.component(ir.name,ir)};const ss={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},ls={content:{type:String,default:null}},Xh=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},qh=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},ar=(e,t=new WeakMap)=>{if(e===null||Xh(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return qh(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof Function)return e;if(e instanceof Map){const u=new Map;return t.set(e,u),e.forEach((o,r)=>{u.set(r,ar(o,t))}),u}if(e instanceof Set){const u=new Set;t.set(e,u);for(const o of e)u.add(ar(o,t));return u}if(Array.isArray(e)){const u=[];return t.set(e,u),e.forEach(o=>{u.push(ar(o,t))}),u}const n={};t.set(e,n);for(const u in e)Object.prototype.hasOwnProperty.call(e,u)&&(n[u]=ar(e[u],t));return n},Zh=(e,t=200)=>{let n=0;return(...u)=>new Promise(o=>{n&&(clearTimeout(n),o("cancel")),n=window.setTimeout(()=>{e.apply(void 0,u),n=0,o("done")},t)})},No=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,cu=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Yh=new Set(["__proto__","constructor","prototype"]),Kh=e=>!Yh.has(e),Io=(e,t,n={})=>{if(Array.isArray(e)&&Array.isArray(t))return Oo(e,t,n);const{excludeKeys:u}=n,o=e,r=t;for(const a of Object.keys(r)){if(!Kh(a))continue;const s=r[a],l=o[a];u&&u(a)?o[a]=s:Array.isArray(s)&&Array.isArray(l)?o[a]=Oo(l,s,n):cu(s)&&cu(l)?o[a]=Io(l,s,n):o[a]=s}return e},Oo=(e,t,n)=>{const u=e.slice();return t.forEach((o,r)=>{const a=u[r];Array.isArray(o)&&Array.isArray(a)?u[r]=Oo(a,o,n):cu(o)&&cu(a)?u[r]=Io(a,o,n):u[r]=o}),u},X="md-editor",de="https://unpkg.com",Qh=`${de}/@highlightjs/cdn-assets@11.11.1/highlight.min.js`,cs={main:`${de}/prettier@3.8.1/standalone.js`,markdown:`${de}/prettier@3.8.1/plugins/markdown.js`},Jh={css:`${de}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${de}/cropperjs@1.6.2/dist/cropper.min.js`},em=`${de}/screenfull@5.2.0/dist/screenfull.js`,tm=`${de}/mermaid@11.12.3/dist/mermaid.min.js`,nm={js:`${de}/katex@0.16.33/dist/katex.min.js`,css:`${de}/katex@0.16.33/dist/katex.min.css`},Lo={a11y:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-dark.min.css`},atom:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-dark.min.css`},github:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github-dark.min.css`},gradient:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-dark.min.css`},kimbie:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-dark.min.css`},paraiso:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-dark.min.css`},qtcreator:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-dark.min.css`}},rm=`${de}/echarts@6.0.0/dist/echarts.min.js`,ds={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},lt={editorExtensions:{highlight:{js:Qh,css:Lo},prettier:{standaloneJs:cs.main,parserMarkdownJs:cs.markdown},cropper:{...Jh},screenfull:{js:em},mermaid:{js:tm,enableZoom:!0},katex:{...nm},echarts:{js:rm}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},um=({instance:e,ctx:t,props:n={}},u="default")=>{const o=(e==null?void 0:e.$slots[u])||(t==null?void 0:t.slots[u]);return(o?o(e):"")||n[u]},om="buildFinished",Po="errorCatcher",Vo="catalogChanged",im="pushCatalog",fs="rerender",am="taskStateChanged";class sm{constructor(){fe(this,"pools",{})}remove(t,n,u){const o=this.pools[t]&&this.pools[t][n];o&&(this.pools[t][n]=o.filter(r=>r!==u))}clear(t){this.pools[t]={}}on(t,n){return this.pools[t]||(this.pools[t]={}),this.pools[t][n.name]||(this.pools[t][n.name]=[]),this.pools[t][n.name].push(n.callback),this.pools[t][n.name].includes(n.callback)}emit(t,n,...u){this.pools[t]||(this.pools[t]={});const o=this.pools[t][n];o&&o.forEach(r=>{try{r(...u)}catch(a){console.error(`${n} monitor event exception!`,a)}})}}const ot=new sm,lm=(e,t)=>{if(!e)return e;const n=t.split(`
|
|
33
|
-
`),u=['<span rn-wrapper aria-hidden="true">'];return n.forEach(()=>{u.push("<span></span>")}),u.push("</span>"),`<span class="${X}-code-block">${e}</span>${u.join("")}`};async function hs(e){if(typeof e=="string"){if(window.isSecureContext&&navigator.clipboard)return await navigator.clipboard.writeText(e);{const t=document.createElement("textarea");let n=!1;if(t.value=e,t.style.position="fixed",t.style.opacity=0,t.style.zIndex="-10000",t.style.top="-10000",document.body.appendChild(t),t.select(),n=document.execCommand("copy"),document.body.removeChild(t),n)return;throw new Error('Failed to copy content via "execCommand"!')}}}const cm={copy:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy ${X}-icon"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,"collapse-tips":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-chevron-left ${X}-icon"><circle cx="12" cy="12" r="10"/><path d="m14 16-4-4 4-4"/></svg>`,pin:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin ${X}-icon"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg>`,"pin-off":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin-off ${X}-icon"><path d="M12 17v5"/><path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89"/><path d="m2 2 20 20"/><path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11"/></svg>`,check:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check ${X}-icon"><path d="M20 6 9 17l-5-5"/></svg>`},St=(e,t)=>typeof t[e]=="string"?t[e]:cm[e],Ht=(e,t,n="")=>{var o;const u=document.getElementById(t.id);if(u)n!==""&&(Reflect.get(window,n)?(o=t.onload)==null||o.call(u,new Event("load")):t.onload&&u.addEventListener("load",t.onload));else{const r={...t};r.onload=null;const a=fm(e,r);t.onload&&a.addEventListener("load",t.onload),document.head.appendChild(a)}},dm=(e,t)=>{var n;(n=document.getElementById(t.id))==null||n.remove(),Ht(e,t)},fm=(e,t)=>{const n=document.createElement(e);return Object.keys(t).forEach(u=>{t[u]!==void 0&&(n[u]=t[u])}),n},hm=(e,t)=>{const n=new Map;return e==null||e.forEach(u=>{let o=u.querySelector(`.${X}-mermaid-action`);o?o.querySelector(`.${X}-mermaid-copy`)||o.insertAdjacentHTML("beforeend",`<span class="${X}-mermaid-copy">${St("copy",t.customIcon)}</span>`):(u.insertAdjacentHTML("beforeend",`<div class="${X}-mermaid-action"><span class="${X}-mermaid-copy">${St("copy",t.customIcon)}</span></div>`),o=u.querySelector(`.${X}-mermaid-action`));const r=o.querySelector(`.${X}-mermaid-copy`);let a=-1;const s=()=>{clearTimeout(a),hs(u.dataset.content||"").then(()=>{r.innerHTML=St("check",t.customIcon)}).catch(()=>{r.innerHTML=St("copy",t.customIcon)}).finally(()=>{a=window.setTimeout(()=>{r.innerHTML=St("copy",t.customIcon)},1500)})};r.addEventListener("click",s),n.set(u,{removeClick:()=>{r.removeEventListener("click",s)}})}),()=>{n.forEach(({removeClick:u})=>{u==null||u()}),n.clear()}},mm=(()=>{const e=t=>{if(!t)return()=>{};const n=t.firstChild;let u=1,o=0,r=0,a=!1,s,l,d,f=1;const c=()=>{n.style.transform=`translate(${o}px, ${r}px) scale(${u})`},h=x=>{x.touches.length===1?(a=!0,s=x.touches[0].clientX-o,l=x.touches[0].clientY-r):x.touches.length===2&&(d=Math.hypot(x.touches[0].clientX-x.touches[1].clientX,x.touches[0].clientY-x.touches[1].clientY),f=u)},p=x=>{if(x.preventDefault(),a&&x.touches.length===1)o=x.touches[0].clientX-s,r=x.touches[0].clientY-l,c();else if(x.touches.length===2){const k=Math.hypot(x.touches[0].clientX-x.touches[1].clientX,x.touches[0].clientY-x.touches[1].clientY)/d,F=u;u=f*(1+(k-1));const T=(x.touches[0].clientX+x.touches[1].clientX)/2,D=(x.touches[0].clientY+x.touches[1].clientY)/2,U=n.getBoundingClientRect(),_=(T-U.left)/F,N=(D-U.top)/F;o-=_*(u-F),r-=N*(u-F),c()}},m=()=>{a=!1},w=x=>{x.preventDefault();const k=.02,F=u;x.deltaY<0?u+=k:u=Math.max(.1,u-k);const T=n.getBoundingClientRect(),D=x.clientX-T.left,U=x.clientY-T.top;o-=D/F*(u-F),r-=U/F*(u-F),c()},y=x=>{a=!0,s=x.clientX-o,l=x.clientY-r},A=x=>{a&&(o=x.clientX-s,r=x.clientY-l,c())},b=()=>{a=!1},g=()=>{a=!1};return t.addEventListener("touchstart",h,{passive:!1}),t.addEventListener("touchmove",p,{passive:!1}),t.addEventListener("touchend",m),t.addEventListener("wheel",w,{passive:!1}),t.addEventListener("mousedown",y),t.addEventListener("mousemove",A),t.addEventListener("mouseup",b),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("touchstart",h),t.removeEventListener("touchmove",p),t.removeEventListener("touchend",m),t.removeEventListener("wheel",w),t.removeEventListener("mousedown",y),t.removeEventListener("mousemove",A),t.removeEventListener("mouseup",b),t.removeEventListener("mouseleave",g)}};return(t,n)=>{const u=new Map;return t==null||t.forEach(o=>{let r=o.querySelector(`.${X}-mermaid-action`);r?r.querySelector(`.${X}-mermaid-zoom`)||r.insertAdjacentHTML("beforeend",`<span class="${X}-mermaid-zoom">${St("pin-off",n.customIcon)}</span>`):(o.insertAdjacentHTML("beforeend",`<div class="${X}-mermaid-action"><span class="${X}-mermaid-zoom">${St("pin-off",n.customIcon)}</span></div>`),r=o.querySelector(`.${X}-mermaid-action`));const a=r.querySelector(`.${X}-mermaid-zoom`),s=()=>{const l=u.get(o);if(l!=null&&l.removeEvent)l.removeEvent(),o.removeAttribute("data-grab"),u.set(o,{removeClick:l.removeClick}),a.innerHTML=St("pin-off",n.customIcon);else{const d=e(o);o.setAttribute("data-grab",""),u.set(o,{removeEvent:d,removeClick:l==null?void 0:l.removeClick}),a.innerHTML=St("pin",n.customIcon)}};a.addEventListener("click",s),u.set(o,{removeClick:()=>a.removeEventListener("click",s)})}),()=>{u.forEach(({removeEvent:o,removeClick:r})=>{o==null||o(),r==null||r()}),u.clear()}}})(),ms=new Set([!0,!1,"alt","title"]);function ps(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function gs(e,t){e&&e.attrs&&(e.attrs=ps(e.attrs,t))}function pm(e,t){if(!ms.has(e))throw new TypeError(`figcaption must be one of: ${[...ms]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([u])=>u==="title");return Array.isArray(n)&&n[1]?(gs(t,"title"),n[1]):void 0}function gm(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let u=1;for(let o=1,r=n.tokens.length;o<r-1;++o){const a=n.tokens[o];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[d,f,c]=a.children;if(d.type!=="link_open"||f.type!=="image"||c.type!=="link_close")continue}if(o!==0&&n.tokens[o-1].type!=="paragraph_open"||o!==r-1&&n.tokens[o+1].type!=="paragraph_close")continue;const s=n.tokens[o-1];let l;if(s.type="figure_open",s.tag="figure",n.tokens[o+1].type="figure_close",n.tokens[o+1].tag="figure",t.dataType&&n.tokens[o-1].attrPush(["data-type","image"]),t.link&&a.children.length===1){[l]=a.children;const d=new n.Token("link_open","a",1);d.attrPush(["href",l.attrGet("src")]),a.children.unshift(d),a.children.push(new n.Token("link_close","a",-1))}if(l=a.children.length===1?a.children[0]:a.children[1],t.figcaption){const d=pm(t.figcaption,l);if(d){const[f]=e.parseInline(d,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...f.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),l.attrs&&(l.attrs=ps(l.attrs,"title"))}}if(t.copyAttrs&&l.attrs){const d=t.copyAttrs===!0?"":t.copyAttrs;s.attrs=l.attrs.filter(([f])=>f.match(d)).map(f=>Array.from(f))}if(t.tabindex&&(n.tokens[o-1].attrPush(["tabindex",u]),u++),t.lazy&&(l.attrs.some(([d])=>d==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([d])=>d==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let d=!1;for(let f=0,c=l.attrs.length;f<c&&!d;f++){const h=l.attrs[f];h[0]==="class"&&(h[1]=`${h[1]} ${t.classes}`,d=!0)}d||l.attrs.push(["class",t.classes])}if(t.removeSrc){const d=l.attrs.find(([f])=>f==="src");l.attrs.push(["data-src",d[1]]),gs(l,"src")}}})}const bm=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function ym(e,t){const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==126||t||u+2>=n)return!1;e.pos=u+1;let o=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===126){o=!0;break}e.md.inline.skipToken(e)}if(!o||u+1===e.pos)return e.pos=u,!1;const r=e.src.slice(u+1,e.pos);if(r.match(/(^|[^\\])(\\\\)*\s/))return e.pos=u,!1;e.posMax=e.pos,e.pos=u+1;const a=e.push("sub_open","sub",1);a.markup="~";const s=e.push("text","",0);s.content=r.replace(bm,"$1");const l=e.push("sub_close","sub",-1);return l.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function xm(e){e.inline.ruler.after("emphasis","sub",ym)}const wm=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function vm(e,t){const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==94||t||u+2>=n)return!1;e.pos=u+1;let o=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){o=!0;break}e.md.inline.skipToken(e)}if(!o||u+1===e.pos)return e.pos=u,!1;const r=e.src.slice(u+1,e.pos);if(r.match(/(^|[^\\])(\\\\)*\s/))return e.pos=u,!1;e.posMax=e.pos,e.pos=u+1;const a=e.push("sup_open","sup",1);a.markup="^";const s=e.push("text","",0);s.content=r.replace(wm,"$1");const l=e.push("sup_close","sup",-1);return l.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function Am(e){e.inline.ruler.after("emphasis","sup",vm)}var km=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,bs=new Set,Ro=typeof process=="object"&&process?process:{},ys=(e,t,n,u)=>{typeof Ro.emitWarning=="function"?Ro.emitWarning(e,t,n,u):console.error(`[${n}] ${t}: ${e}`)},du=globalThis.AbortController,xs=globalThis.AbortSignal;if(typeof du>"u"){xs=class{constructor(){fe(this,"onabort");fe(this,"_onabort",[]);fe(this,"reason");fe(this,"aborted",!1)}addEventListener(n,u){this._onabort.push(u)}},du=class{constructor(){fe(this,"signal",new xs);t()}abort(n){var u,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let r of this.signal._onabort)r(n);(o=(u=this.signal).onabort)==null||o.call(u,n)}}};let e=((_l=Ro.env)==null?void 0:_l.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{e&&(e=!1,ys("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var Cm=e=>!bs.has(e),$t=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),ws=e=>$t(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?fu:null:null,fu=class extends Array{constructor(t){super(t),this.fill(0)}},_m=(Tt=class{constructor(t,n){fe(this,"heap");fe(this,"length");if(!v(Tt,Sn))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){let n=ws(t);if(!n)return[];ee(Tt,Sn,!0);let u=new Tt(t,n);return ee(Tt,Sn,!1),u}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},Sn=new WeakMap,ie(Tt,Sn,!1),Tt),Em=(In=class{constructor(t){ie(this,G);ie(this,it);ie(this,Je);ie(this,ct);ie(this,rn);ie(this,dt);ie(this,Dn);ie(this,Tn);ie(this,ft);fe(this,"ttl");fe(this,"ttlResolution");fe(this,"ttlAutopurge");fe(this,"updateAgeOnGet");fe(this,"updateAgeOnHas");fe(this,"allowStale");fe(this,"noDisposeOnSet");fe(this,"noUpdateTTL");fe(this,"maxEntrySize");fe(this,"sizeCalculation");fe(this,"noDeleteOnFetchRejection");fe(this,"noDeleteOnStaleGet");fe(this,"allowStaleOnFetchAbort");fe(this,"allowStaleOnFetchRejection");fe(this,"ignoreFetchAbort");ie(this,ke);ie(this,ht);ie(this,we);ie(this,he);ie(this,ne);ie(this,$e);ie(this,et);ie(this,Re);ie(this,Se);ie(this,mt);ie(this,De);ie(this,pt);ie(this,gt);ie(this,tt);ie(this,nt);ie(this,bt);ie(this,Gt);ie(this,Ue);ie(this,Fn);ie(this,un,()=>{});ie(this,It,()=>{});ie(this,Sr,()=>{});ie(this,rt,()=>!1);ie(this,on,t=>{});ie(this,Nn,(t,n,u)=>{});ie(this,Dr,(t,n,u,o)=>{if(u||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});fe(this,El,"LRUCache");let{max:n=0,ttl:u,ttlResolution:o=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:l,dispose:d,onInsert:f,disposeAfter:c,noDisposeOnSet:h,noUpdateTTL:p,maxSize:m=0,maxEntrySize:w=0,sizeCalculation:y,fetchMethod:A,memoMethod:b,noDeleteOnFetchRejection:g,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:F,ignoreFetchAbort:T,perf:D}=t;if(D!==void 0&&typeof(D==null?void 0:D.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(ee(this,ft,D??km),n!==0&&!$t(n))throw new TypeError("max option must be a nonnegative integer");let U=n?ws(n):Array;if(!U)throw new Error("invalid max value: "+n);if(ee(this,it,n),ee(this,Je,m),this.maxEntrySize=w||v(this,Je),this.sizeCalculation=y,this.sizeCalculation){if(!v(this,Je)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(ee(this,Tn,b),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(ee(this,Dn,A),ee(this,Gt,!!A),ee(this,we,new Map),ee(this,he,new Array(n).fill(void 0)),ee(this,ne,new Array(n).fill(void 0)),ee(this,$e,new U(n)),ee(this,et,new U(n)),ee(this,Re,0),ee(this,Se,0),ee(this,mt,_m.create(n)),ee(this,ke,0),ee(this,ht,0),typeof d=="function"&&ee(this,ct,d),typeof f=="function"&&ee(this,rn,f),typeof c=="function"?(ee(this,dt,c),ee(this,De,[])):(ee(this,dt,void 0),ee(this,De,void 0)),ee(this,bt,!!v(this,ct)),ee(this,Fn,!!v(this,rn)),ee(this,Ue,!!v(this,dt)),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!g,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!F,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(v(this,Je)!==0&&!$t(v(this,Je)))throw new TypeError("maxSize must be a positive integer if specified");if(!$t(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");q(this,G,Gl).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=$t(o)||o===0?o:1,this.ttlAutopurge=!!r,this.ttl=u||0,this.ttl){if(!$t(this.ttl))throw new TypeError("ttl must be a positive integer if specified");q(this,G,si).call(this)}if(v(this,it)===0&&this.ttl===0&&v(this,Je)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!v(this,it)&&!v(this,Je)){let _="LRU_CACHE_UNBOUNDED";Cm(_)&&(bs.add(_),ys("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",_,In))}}get perf(){return v(this,ft)}static unsafeExposeInternals(t){return{starts:v(t,gt),ttls:v(t,tt),autopurgeTimers:v(t,nt),sizes:v(t,pt),keyMap:v(t,we),keyList:v(t,he),valList:v(t,ne),next:v(t,$e),prev:v(t,et),get head(){return v(t,Re)},get tail(){return v(t,Se)},free:v(t,mt),isBackgroundFetch:n=>{var u;return q(u=t,G,me).call(u,n)},backgroundFetch:(n,u,o,r)=>{var a;return q(a=t,G,Bu).call(a,n,u,o,r)},moveToTail:n=>{var u;return q(u=t,G,Nr).call(u,n)},indexes:n=>{var u;return q(u=t,G,qt).call(u,n)},rindexes:n=>{var u;return q(u=t,G,Zt).call(u,n)},isStale:n=>{var u;return v(u=t,rt).call(u,n)}}}get max(){return v(this,it)}get maxSize(){return v(this,Je)}get calculatedSize(){return v(this,ht)}get size(){return v(this,ke)}get fetchMethod(){return v(this,Dn)}get memoMethod(){return v(this,Tn)}get dispose(){return v(this,ct)}get onInsert(){return v(this,rn)}get disposeAfter(){return v(this,dt)}getRemainingTTL(t){return v(this,we).has(t)?1/0:0}*entries(){for(let t of q(this,G,qt).call(this))v(this,ne)[t]!==void 0&&v(this,he)[t]!==void 0&&!q(this,G,me).call(this,v(this,ne)[t])&&(yield[v(this,he)[t],v(this,ne)[t]])}*rentries(){for(let t of q(this,G,Zt).call(this))v(this,ne)[t]!==void 0&&v(this,he)[t]!==void 0&&!q(this,G,me).call(this,v(this,ne)[t])&&(yield[v(this,he)[t],v(this,ne)[t]])}*keys(){for(let t of q(this,G,qt).call(this)){let n=v(this,he)[t];n!==void 0&&!q(this,G,me).call(this,v(this,ne)[t])&&(yield n)}}*rkeys(){for(let t of q(this,G,Zt).call(this)){let n=v(this,he)[t];n!==void 0&&!q(this,G,me).call(this,v(this,ne)[t])&&(yield n)}}*values(){for(let t of q(this,G,qt).call(this))v(this,ne)[t]!==void 0&&!q(this,G,me).call(this,v(this,ne)[t])&&(yield v(this,ne)[t])}*rvalues(){for(let t of q(this,G,Zt).call(this))v(this,ne)[t]!==void 0&&!q(this,G,me).call(this,v(this,ne)[t])&&(yield v(this,ne)[t])}[(Sl=Symbol.iterator,El=Symbol.toStringTag,Sl)](){return this.entries()}find(t,n={}){for(let u of q(this,G,qt).call(this)){let o=v(this,ne)[u],r=q(this,G,me).call(this,o)?o.__staleWhileFetching:o;if(r!==void 0&&t(r,v(this,he)[u],this))return this.get(v(this,he)[u],n)}}forEach(t,n=this){for(let u of q(this,G,qt).call(this)){let o=v(this,ne)[u],r=q(this,G,me).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&t.call(n,r,v(this,he)[u],this)}}rforEach(t,n=this){for(let u of q(this,G,Zt).call(this)){let o=v(this,ne)[u],r=q(this,G,me).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&t.call(n,r,v(this,he)[u],this)}}purgeStale(){let t=!1;for(let n of q(this,G,Zt).call(this,{allowStale:!0}))v(this,rt).call(this,n)&&(q(this,G,Yt).call(this,v(this,he)[n],"expire"),t=!0);return t}info(t){let n=v(this,we).get(t);if(n===void 0)return;let u=v(this,ne)[n],o=q(this,G,me).call(this,u)?u.__staleWhileFetching:u;if(o===void 0)return;let r={value:o};if(v(this,tt)&&v(this,gt)){let a=v(this,tt)[n],s=v(this,gt)[n];if(a&&s){let l=a-(v(this,ft).now()-s);r.ttl=l,r.start=Date.now()}}return v(this,pt)&&(r.size=v(this,pt)[n]),r}dump(){let t=[];for(let n of q(this,G,qt).call(this,{allowStale:!0})){let u=v(this,he)[n],o=v(this,ne)[n],r=q(this,G,me).call(this,o)?o.__staleWhileFetching:o;if(r===void 0||u===void 0)continue;let a={value:r};if(v(this,tt)&&v(this,gt)){a.ttl=v(this,tt)[n];let s=v(this,ft).now()-v(this,gt)[n];a.start=Math.floor(Date.now()-s)}v(this,pt)&&(a.size=v(this,pt)[n]),t.unshift([u,a])}return t}load(t){this.clear();for(let[n,u]of t){if(u.start){let o=Date.now()-u.start;u.start=v(this,ft).now()-o}this.set(n,u.value,u)}}set(t,n,u={}){var h,p,m,w,y,A,b;if(n===void 0)return this.delete(t),this;let{ttl:o=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=u,{noUpdateTTL:d=this.noUpdateTTL}=u,f=v(this,Dr).call(this,t,n,u.size||0,s);if(this.maxEntrySize&&f>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),q(this,G,Yt).call(this,t,"set"),this;let c=v(this,ke)===0?void 0:v(this,we).get(t);if(c===void 0)c=v(this,ke)===0?v(this,Se):v(this,mt).length!==0?v(this,mt).pop():v(this,ke)===v(this,it)?q(this,G,Mu).call(this,!1):v(this,ke),v(this,he)[c]=t,v(this,ne)[c]=n,v(this,we).set(t,c),v(this,$e)[v(this,Se)]=c,v(this,et)[c]=v(this,Se),ee(this,Se,c),Ru(this,ke)._++,v(this,Nn).call(this,c,f,l),l&&(l.set="add"),d=!1,v(this,Fn)&&((h=v(this,rn))==null||h.call(this,n,t,"add"));else{q(this,G,Nr).call(this,c);let g=v(this,ne)[c];if(n!==g){if(v(this,Gt)&&q(this,G,me).call(this,g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:x}=g;x!==void 0&&!a&&(v(this,bt)&&((p=v(this,ct))==null||p.call(this,x,t,"set")),v(this,Ue)&&((m=v(this,De))==null||m.push([x,t,"set"])))}else a||(v(this,bt)&&((w=v(this,ct))==null||w.call(this,g,t,"set")),v(this,Ue)&&((y=v(this,De))==null||y.push([g,t,"set"])));if(v(this,on).call(this,c),v(this,Nn).call(this,c,f,l),v(this,ne)[c]=n,l){l.set="replace";let x=g&&q(this,G,me).call(this,g)?g.__staleWhileFetching:g;x!==void 0&&(l.oldValue=x)}}else l&&(l.set="update");v(this,Fn)&&((A=this.onInsert)==null||A.call(this,n,t,n===g?"update":"replace"))}if(o!==0&&!v(this,tt)&&q(this,G,si).call(this),v(this,tt)&&(d||v(this,Sr).call(this,c,o,r),l&&v(this,It).call(this,l,c)),!a&&v(this,Ue)&&v(this,De)){let g=v(this,De),x;for(;x=g==null?void 0:g.shift();)(b=v(this,dt))==null||b.call(this,...x)}return this}pop(){var t;try{for(;v(this,ke);){let n=v(this,ne)[v(this,Re)];if(q(this,G,Mu).call(this,!0),q(this,G,me).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(v(this,Ue)&&v(this,De)){let n=v(this,De),u;for(;u=n==null?void 0:n.shift();)(t=v(this,dt))==null||t.call(this,...u)}}}has(t,n={}){let{updateAgeOnHas:u=this.updateAgeOnHas,status:o}=n,r=v(this,we).get(t);if(r!==void 0){let a=v(this,ne)[r];if(q(this,G,me).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(v(this,rt).call(this,r))o&&(o.has="stale",v(this,It).call(this,o,r));else return u&&v(this,un).call(this,r),o&&(o.has="hit",v(this,It).call(this,o,r)),!0}else o&&(o.has="miss");return!1}peek(t,n={}){let{allowStale:u=this.allowStale}=n,o=v(this,we).get(t);if(o===void 0||!u&&v(this,rt).call(this,o))return;let r=v(this,ne)[o];return q(this,G,me).call(this,r)?r.__staleWhileFetching:r}async fetch(t,n={}){let{allowStale:u=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:l=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:w,forceRefresh:y=!1,status:A,signal:b}=n;if(!v(this,Gt))return A&&(A.fetch="get"),this.get(t,{allowStale:u,updateAgeOnGet:o,noDeleteOnStaleGet:r,status:A});let g={allowStale:u,updateAgeOnGet:o,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:s,size:l,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:A,signal:b},x=v(this,we).get(t);if(x===void 0){A&&(A.fetch="miss");let k=q(this,G,Bu).call(this,t,x,g,w);return k.__returned=k}else{let k=v(this,ne)[x];if(q(this,G,me).call(this,k)){let U=u&&k.__staleWhileFetching!==void 0;return A&&(A.fetch="inflight",U&&(A.returnedStale=!0)),U?k.__staleWhileFetching:k.__returned=k}let F=v(this,rt).call(this,x);if(!y&&!F)return A&&(A.fetch="hit"),q(this,G,Nr).call(this,x),o&&v(this,un).call(this,x),A&&v(this,It).call(this,A,x),k;let T=q(this,G,Bu).call(this,t,x,g,w),D=T.__staleWhileFetching!==void 0&&u;return A&&(A.fetch=F?"stale":"refresh",D&&F&&(A.returnedStale=!0)),D?T.__staleWhileFetching:T.__returned=T}}async forceFetch(t,n={}){let u=await this.fetch(t,n);if(u===void 0)throw new Error("fetch() returned undefined");return u}memo(t,n={}){let u=v(this,Tn);if(!u)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:r,...a}=n,s=this.get(t,a);if(!r&&s!==void 0)return s;let l=u(t,s,{options:a,context:o});return this.set(t,l,a),l}get(t,n={}){let{allowStale:u=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=n,s=v(this,we).get(t);if(s!==void 0){let l=v(this,ne)[s],d=q(this,G,me).call(this,l);return a&&v(this,It).call(this,a,s),v(this,rt).call(this,s)?(a&&(a.get="stale"),d?(a&&u&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),u?l.__staleWhileFetching:void 0):(r||q(this,G,Yt).call(this,t,"expire"),a&&u&&(a.returnedStale=!0),u?l:void 0)):(a&&(a.get="hit"),d?l.__staleWhileFetching:(q(this,G,Nr).call(this,s),o&&v(this,un).call(this,s),l))}else a&&(a.get="miss")}delete(t){return q(this,G,Yt).call(this,t,"delete")}clear(){return q(this,G,di).call(this,"delete")}},it=new WeakMap,Je=new WeakMap,ct=new WeakMap,rn=new WeakMap,dt=new WeakMap,Dn=new WeakMap,Tn=new WeakMap,ft=new WeakMap,ke=new WeakMap,ht=new WeakMap,we=new WeakMap,he=new WeakMap,ne=new WeakMap,$e=new WeakMap,et=new WeakMap,Re=new WeakMap,Se=new WeakMap,mt=new WeakMap,De=new WeakMap,pt=new WeakMap,gt=new WeakMap,tt=new WeakMap,nt=new WeakMap,bt=new WeakMap,Gt=new WeakMap,Ue=new WeakMap,Fn=new WeakMap,G=new WeakSet,si=function(){let t=new fu(v(this,it)),n=new fu(v(this,it));ee(this,tt,t),ee(this,gt,n);let u=this.ttlAutopurge?new Array(v(this,it)):void 0;ee(this,nt,u),ee(this,Sr,(s,l,d=v(this,ft).now())=>{n[s]=l!==0?d:0,t[s]=l,o(s,l)}),ee(this,un,s=>{n[s]=t[s]!==0?v(this,ft).now():0,o(s,t[s])});let o=this.ttlAutopurge?(s,l)=>{if(u!=null&&u[s]&&(clearTimeout(u[s]),u[s]=void 0),l&&l!==0&&u){let d=setTimeout(()=>{v(this,rt).call(this,s)&&q(this,G,Yt).call(this,v(this,he)[s],"expire")},l+1);d.unref&&d.unref(),u[s]=d}}:()=>{};ee(this,It,(s,l)=>{if(t[l]){let d=t[l],f=n[l];if(!d||!f)return;s.ttl=d,s.start=f,s.now=r||a();let c=s.now-f;s.remainingTTL=d-c}});let r=0,a=()=>{let s=v(this,ft).now();if(this.ttlResolution>0){r=s;let l=setTimeout(()=>r=0,this.ttlResolution);l.unref&&l.unref()}return s};this.getRemainingTTL=s=>{let l=v(this,we).get(s);if(l===void 0)return 0;let d=t[l],f=n[l];if(!d||!f)return 1/0;let c=(r||a())-f;return d-c},ee(this,rt,s=>{let l=n[s],d=t[s];return!!d&&!!l&&(r||a())-l>d})},un=new WeakMap,It=new WeakMap,Sr=new WeakMap,rt=new WeakMap,Gl=function(){let t=new fu(v(this,it));ee(this,ht,0),ee(this,pt,t),ee(this,on,n=>{ee(this,ht,v(this,ht)-t[n]),t[n]=0}),ee(this,Dr,(n,u,o,r)=>{if(q(this,G,me).call(this,u))return 0;if(!$t(o))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(o=r(u,n),!$t(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o}),ee(this,Nn,(n,u,o)=>{if(t[n]=u,v(this,Je)){let r=v(this,Je)-t[n];for(;v(this,ht)>r;)q(this,G,Mu).call(this,!0)}ee(this,ht,v(this,ht)+t[n]),o&&(o.entrySize=u,o.totalCalculatedSize=v(this,ht))})},on=new WeakMap,Nn=new WeakMap,Dr=new WeakMap,qt=function*({allowStale:t=this.allowStale}={}){if(v(this,ke))for(let n=v(this,Se);!(!q(this,G,li).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,Re)));)n=v(this,et)[n]},Zt=function*({allowStale:t=this.allowStale}={}){if(v(this,ke))for(let n=v(this,Re);!(!q(this,G,li).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,Se)));)n=v(this,$e)[n]},li=function(t){return t!==void 0&&v(this,we).get(v(this,he)[t])===t},Mu=function(t){var r,a,s;let n=v(this,Re),u=v(this,he)[n],o=v(this,ne)[n];return v(this,Gt)&&q(this,G,me).call(this,o)?o.__abortController.abort(new Error("evicted")):(v(this,bt)||v(this,Ue))&&(v(this,bt)&&((r=v(this,ct))==null||r.call(this,o,u,"evict")),v(this,Ue)&&((a=v(this,De))==null||a.push([o,u,"evict"]))),v(this,on).call(this,n),(s=v(this,nt))!=null&&s[n]&&(clearTimeout(v(this,nt)[n]),v(this,nt)[n]=void 0),t&&(v(this,he)[n]=void 0,v(this,ne)[n]=void 0,v(this,mt).push(n)),v(this,ke)===1?(ee(this,Re,ee(this,Se,0)),v(this,mt).length=0):ee(this,Re,v(this,$e)[n]),v(this,we).delete(u),Ru(this,ke)._--,n},Bu=function(t,n,u,o){let r=n===void 0?void 0:v(this,ne)[n];if(q(this,G,me).call(this,r))return r;let a=new du,{signal:s}=u;s==null||s.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});let l={signal:a.signal,options:u,context:o},d=(w,y=!1)=>{let{aborted:A}=a.signal,b=u.ignoreFetchAbort&&w!==void 0,g=u.ignoreFetchAbort||!!(u.allowStaleOnFetchAbort&&w!==void 0);if(u.status&&(A&&!y?(u.status.fetchAborted=!0,u.status.fetchError=a.signal.reason,b&&(u.status.fetchAbortIgnored=!0)):u.status.fetchResolved=!0),A&&!b&&!y)return c(a.signal.reason,g);let x=p,k=v(this,ne)[n];return(k===p||b&&y&&k===void 0)&&(w===void 0?x.__staleWhileFetching!==void 0?v(this,ne)[n]=x.__staleWhileFetching:q(this,G,Yt).call(this,t,"fetch"):(u.status&&(u.status.fetchUpdated=!0),this.set(t,w,l.options))),w},f=w=>(u.status&&(u.status.fetchRejected=!0,u.status.fetchError=w),c(w,!1)),c=(w,y)=>{let{aborted:A}=a.signal,b=A&&u.allowStaleOnFetchAbort,g=b||u.allowStaleOnFetchRejection,x=g||u.noDeleteOnFetchRejection,k=p;if(v(this,ne)[n]===p&&(!x||!y&&k.__staleWhileFetching===void 0?q(this,G,Yt).call(this,t,"fetch"):b||(v(this,ne)[n]=k.__staleWhileFetching)),g)return u.status&&k.__staleWhileFetching!==void 0&&(u.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw w},h=(w,y)=>{var b;let A=(b=v(this,Dn))==null?void 0:b.call(this,t,r,l);A&&A instanceof Promise&&A.then(g=>w(g===void 0?void 0:g),y),a.signal.addEventListener("abort",()=>{(!u.ignoreFetchAbort||u.allowStaleOnFetchAbort)&&(w(void 0),u.allowStaleOnFetchAbort&&(w=g=>d(g,!0)))})};u.status&&(u.status.fetchDispatched=!0);let p=new Promise(h).then(d,f),m=Object.assign(p,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return n===void 0?(this.set(t,m,{...l.options,status:void 0}),n=v(this,we).get(t)):v(this,ne)[n]=m,m},me=function(t){if(!v(this,Gt))return!1;let n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof du},ci=function(t,n){v(this,et)[n]=t,v(this,$e)[t]=n},Nr=function(t){t!==v(this,Se)&&(t===v(this,Re)?ee(this,Re,v(this,$e)[t]):q(this,G,ci).call(this,v(this,et)[t],v(this,$e)[t]),q(this,G,ci).call(this,v(this,Se),t),ee(this,Se,t))},Yt=function(t,n){var o,r,a,s,l,d;let u=!1;if(v(this,ke)!==0){let f=v(this,we).get(t);if(f!==void 0)if((o=v(this,nt))!=null&&o[f]&&(clearTimeout((r=v(this,nt))==null?void 0:r[f]),v(this,nt)[f]=void 0),u=!0,v(this,ke)===1)q(this,G,di).call(this,n);else{v(this,on).call(this,f);let c=v(this,ne)[f];if(q(this,G,me).call(this,c)?c.__abortController.abort(new Error("deleted")):(v(this,bt)||v(this,Ue))&&(v(this,bt)&&((a=v(this,ct))==null||a.call(this,c,t,n)),v(this,Ue)&&((s=v(this,De))==null||s.push([c,t,n]))),v(this,we).delete(t),v(this,he)[f]=void 0,v(this,ne)[f]=void 0,f===v(this,Se))ee(this,Se,v(this,et)[f]);else if(f===v(this,Re))ee(this,Re,v(this,$e)[f]);else{let h=v(this,et)[f];v(this,$e)[h]=v(this,$e)[f];let p=v(this,$e)[f];v(this,et)[p]=v(this,et)[f]}Ru(this,ke)._--,v(this,mt).push(f)}}if(v(this,Ue)&&((l=v(this,De))!=null&&l.length)){let f=v(this,De),c;for(;c=f==null?void 0:f.shift();)(d=v(this,dt))==null||d.call(this,...c)}return u},di=function(t){var n,u,o,r;for(let a of q(this,G,Zt).call(this,{allowStale:!0})){let s=v(this,ne)[a];if(q(this,G,me).call(this,s))s.__abortController.abort(new Error("deleted"));else{let l=v(this,he)[a];v(this,bt)&&((n=v(this,ct))==null||n.call(this,s,l,t)),v(this,Ue)&&((u=v(this,De))==null||u.push([s,l,t]))}}if(v(this,we).clear(),v(this,ne).fill(void 0),v(this,he).fill(void 0),v(this,tt)&&v(this,gt)){v(this,tt).fill(0),v(this,gt).fill(0);for(let a of v(this,nt)??[])a!==void 0&&clearTimeout(a);(o=v(this,nt))==null||o.fill(void 0)}if(v(this,pt)&&v(this,pt).fill(0),ee(this,Re,0),ee(this,Se,0),v(this,mt).length=0,ee(this,ht,0),ee(this,ke,0),v(this,Ue)&&v(this,De)){let a=v(this,De),s;for(;s=a==null?void 0:a.shift();)(r=v(this,dt))==null||r.call(this,...s)}},In);/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var Jt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u])}return e},hu=function(t){return t.tagName==="IMG"},Sm=function(t){return NodeList.prototype.isPrototypeOf(t)},mu=function(t){return t&&t.nodeType===1},vs=function(t){var n=t.currentSrc||t.src;return n.substr(-4).toLowerCase()===".svg"},As=function(t){try{return Array.isArray(t)?t.filter(hu):Sm(t)?[].slice.call(t).filter(hu):mu(t)?[t].filter(hu):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(hu):[]}catch{throw new TypeError(`The provided selector is invalid.
|
|
32
|
+
`;return _o("caf-assistant-widget-container__error",b)}),m=()=>{const b=a.value;b&&(s.value=new wh(b))},p=()=>{const b=s.value;b&&(b.dispose(),s.value=null)},w=()=>{const b=u.value,g=o.value;b&&(b.unmount(),b.dispose()),g&&g.cleanup(),u.value=null,o.value=null},y=async()=>{const b=await n(e.widgetAPIURL);if(!b)throw new Error("Failed to load widget API");await b.initialize();const g=b.createWidget();o.value=b,u.value=g},A=b=>{console.error(b),l.value=b};return i.watch(()=>e.widgetAPIURL,async()=>{if(a.value)try{w(),await y();const b=a.value,g=u.value;g==null||g.updateOptions(e.widgetOptions),g==null||g.updateData(e.widgetData),b&&g&&await g.mount(b)}catch(b){A(b)}}),i.watch(()=>e.widgetOptions,(b,g)=>{try{const x=u.value;x&&(!g||!r(g,b))&&x.updateOptions(b)}catch(x){A(x)}}),i.watch(()=>e.widgetData,(b,g)=>{try{const x=u.value;x&&(!g||!r(g,b))&&x.updateData(b)}catch(x){A(x)}}),i.onMounted(async()=>{try{const b=a.value;if(b){m();const g=s.value;if(g){await y();const x=u.value;x&&(x.updateOptions(e.widgetOptions),x.updateData(e.widgetData),x.mount(g.getElement()),i.nextTick(()=>{b.parentElement&&(b.style.width="100%")}))}}}catch(b){A(b)}}),i.onBeforeUnmount(async()=>{try{w(),p()}catch(b){console.error(b)}}),()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{ref:a,class:c},null),i.createVNode("div",{class:h.value},null)])}}),Ga=(e,t)=>{var n;if(e.type===Le.AssistantWidgetComplete){const r=e;return r.widgetUrl?i.createVNode(yn,{key:`widget-${t}`,widgetAPIURL:r.widgetUrl,widgetOptions:{mode:"embedded",implOptions:r.widgetImplOptions},widgetData:((n=r.widgetData)==null?void 0:n.data)||{}},null):null}return e.type===Le.AssistantWidgetPending?i.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`widget-loading-${t}`},[i.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),i.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[i.createTextVNode("数据生成中......")])]):null},Ch=3e4,Xa=8e3,Ie=new Map,Qe=new Map,nr=new Map,Et=[];function Pe(e){return String(e??"").replace(/^\ufeff/,"").replace(/[\u200b\u200c\u200d]/g,"").replace(/\u00a0/g," ").trim()}function uu(e){const t=Pe(e);if(t)for(let n=Et.length-1;n>=0;n--)Et[n]===t&&Et.splice(n,1)}function _h(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function ou(e){if(typeof window>"u")return;const t=window;t.__fluens_dynamic_component_bootstrap_instance_id===e&&delete t.__fluens_dynamic_component_bootstrap_instance_id}function Eh(){return Et[Et.length-1]||void 0}function iu(e,t){const n=Pe(t);return n?Pe(e.instanceId)===n||e.componentId!=null&&Pe(String(e.componentId))===n||e.name!=null&&Pe(String(e.name))===n:!1}function So(e){const t=Pe(e);if(!t)return null;const n=Ie.get(t);if(n)return{canonicalKey:t,entry:n};for(const[o,u]of Ie.entries())if(Pe(o)===t)return{canonicalKey:o,entry:u};const r=[];for(const[o,u]of Ie.entries())iu(u.config,t)&&r.push({key:o,entry:u});if(r.length===1){const{key:o,entry:u}=r[0];return o!==t&&console.warn(`[DynamicComponent] register id "${t}" resolved to pending instanceId "${o}" (alias match)`),{canonicalKey:o,entry:u}}if(r.length>1)return console.warn(`[DynamicComponent] register id "${t}" is ambiguous (${r.length} pending matches); refusing`),null;if(Ie.size===1){const[o,u]=[...Ie.entries()][0];return console.warn(`[DynamicComponent] register id "${t}" unmatched; using sole pending instance "${o}"`),{canonicalKey:o,entry:u}}return null}function qa(e,t){for(const[n,r]of Qe){const o=Pe(n),u=e!==""&&o===e,a=String(t??"").trim(),s=e&&iu(r.config,e)||a&&iu(r.config,a);if(u||s)return console.warn(`[DynamicComponent] register skipped: id "${e||a}" already active (canonical "${n}"); unload first — second register yields "no pending", not duplicate mount`),!0}return!1}function Do(){return{pendingKeys:[...Ie.keys()],bootstrapQueue:[...Et],activeKeys:[...Qe.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function Sh(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,...Do()})}function Dh(e){const t=Pe(e);if(t){if(qa(t,e))return{ok:!1,reason:"already_active_duplicate"};const r=So(t);if(r)return{ok:!0,...r}}else if(qa("",e))return{ok:!1,reason:"already_active_duplicate"};for(let n=0;n<Et.length;n++){const r=Et[n],o=So(r);if(o)return Et.splice(n,1),t&&Pe(r)!==t&&console.warn(`[DynamicComponent] register id "${t}" did not match pending; using bootstrap instanceId "${r}" (sync bundle entry or use window.__fluens_dynamic_component_bootstrap_instance_id)`),{ok:!0,...o}}return{ok:!1,reason:"no_pending"}}function Za(e){const t=Pe(e);if(!t)return null;const n=Qe.get(t);if(n)return n;for(const[u,a]of Qe.entries())if(Pe(u)===t)return a;const r=[];for(const u of Qe.values())iu(u.config,t)&&r.push(u);const o=[...new Map(r.map(u=>[u.config.instanceId,u])).values()];if(o.length===1)return o[0].config.instanceId!==t&&console.warn(`[DynamicComponent] assistant post id "${t}" resolved to instanceId "${o[0].config.instanceId}" (alias match)`),o[0];if(o.length>1)return console.warn(`[DynamicComponent] assistant post id "${t}" is ambiguous (${o.length} active matches)`),null;if(Qe.size===1){const u=[...Qe.values()][0];return console.warn(`[DynamicComponent] assistant post id "${t}" unmatched; delivering to sole active instance "${u.config.instanceId}"`),u}return null}function Fh(e){const t=Pe(e);if(!t)return t;const n=Za(t);if(n)return n.config.instanceId;const r=So(t);return r?r.canonicalKey:Ie.size===1?[...Ie.keys()][0]:Qe.size===1?[...Qe.values()][0].config.instanceId:t}function Fo(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function Ya(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(Fo(t)),!0}catch(n){return console.warn("[DynamicComponent] onAssistantMessage failed",n),!1}}function Th(e){const t=`fluens-dynamic-component-${e.instanceId}`;let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.style.width="100%",n.style.height="100%"),n}function Ka(e){const t=Qe.get(e.instanceId);if(t)return Promise.resolve(t.api);const n=Ie.get(e.instanceId);if(n)return new Promise((o,u)=>{const a=n.resolve,s=n.reject;n.resolve=l=>{a(l),o(l)},n.reject=l=>{s(l),u(l)}});if((e.name||e.componentId)&&!e.jsUrl)return Promise.reject(new Error(`Dynamic component resource is empty: ${e.name||e.componentId}`));const r=Th(e);return new Promise((o,u)=>{const a={config:e,container:r,resolve:o,reject:u,timeoutId:0},s=setTimeout(()=>{a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Ie.delete(e.instanceId),uu(e.instanceId),ou(e.instanceId),u(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},Ch);a.timeoutId=s,Ie.set(e.instanceId,a),Et.push(e.instanceId),_h(e.instanceId);const l=document.createElement("script");l.src=(e==null?void 0:e.jsUrl)??"",l.dataset.dynamicComponentId=e.instanceId,l.async=!1,l.onload=()=>{a.postLoadRegisterCheckTimerId=window.setTimeout(()=>{a.postLoadRegisterCheckTimerId=void 0,Ie.has(e.instanceId)&&(clearTimeout(s),Ie.delete(e.instanceId),uu(e.instanceId),ou(e.instanceId),u(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${Xa}ms after load: ${e.name||e.componentId}`)))},Xa)},l.onerror=()=>{clearTimeout(s),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Ie.delete(e.instanceId),uu(e.instanceId),ou(e.instanceId),u(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(l)})}function Qa(e){var o;const t=Qe.get(e);if(t){try{t.api.unmount()}catch{}(o=t.scriptElement)==null||o.remove(),Qe.delete(e)}const n=Ie.get(e);n&&(n.postLoadRegisterCheckTimerId!=null&&(clearTimeout(n.postLoadRegisterCheckTimerId),n.postLoadRegisterCheckTimerId=void 0),clearTimeout(n.timeoutId),Ie.delete(e)),nr.delete(e);const r=document.getElementById(`fluens-dynamic-component-${e}`);r&&r.remove()}function Nh(e,t){const n=Pe(e);if(!n)return!1;const r=Za(n);if(r)return Ya(r.api,t);const o=Fh(n),u=nr.get(o)??[],a=u.findIndex(s=>s.messageId===t.messageId);return a>=0?u[a]=Fo(t):u.push(Fo(t)),nr.set(o,u),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=Do,window.__fluens_dynamic_component_register=function(e,t){const n=Pe(e),r=Dh(e);if(!r.ok){if(r.reason==="already_active_duplicate")return;Sh(n),console.warn(`[DynamicComponent] no pending for register id "${n}" (raw ${JSON.stringify(e)}); see diagnostics above. Try: unload tab / avoid double register / ensure FXDynamicComponent loaded this jsUrl first / empty id if sole pending`);return}const{canonicalKey:o,entry:u}=r;uu(o),ou(o),u.postLoadRegisterCheckTimerId!=null&&(clearTimeout(u.postLoadRegisterCheckTimerId),u.postLoadRegisterCheckTimerId=void 0),clearTimeout(u.timeoutId),Ie.delete(o);const a={config:u.config,container:u.container,api:t,scriptElement:document.currentScript};Qe.set(o,a),a.container.parentElement;try{t.mount(u.container,u.config)}catch(l){console.error(`Failed to mount dynamic component: ${o}`,l)}const s=[o];n&&n!==o&&s.push(n);for(const l of s){const d=nr.get(l);d&&d.length>0&&(nr.delete(l),d.forEach(f=>Ya(t,f)))}u.resolve(t)});const xn=i.defineComponent({name:"FXDynamicComponent",props:{config:{type:Object,required:!0}},setup(e){const t=i.ref("loading"),n=i.ref(""),r=i.computed(()=>`fluens-dynamic-component-${e.config.instanceId}`),o=i.computed(()=>e.config.position==="inline"),u=i.computed(()=>!e.config.jsUrl&&!!e.config.url),a=i.computed(()=>({...o.value?{width:"fit-content",maxWidth:"100%"}:{width:"100%"},height:"auto",...t.value==="ready"&&o.value?{padding:"16px 0"}:{},...t.value==="ready"&&!o.value?{height:"100%",overflow:"hidden"}:{}}));return i.onMounted(()=>{u.value||(t.value="loading",n.value="",Ka(e.config).then(()=>{t.value="ready"}).catch(s=>{t.value="error",n.value=s.message||"Unknown error"}))}),i.onUnmounted(()=>{u.value||Qa(e.config.instanceId)}),()=>u.value?null:i.createVNode("div",{class:"f-chat-dynamic-component-body",style:a.value},[i.createVNode("div",{id:r.value,style:{width:"100%",height:"100%",display:t.value==="ready"?"":"none"}},null),t.value==="loading"&&i.createVNode("div",{class:"f-chat-dynamic-component-loading"},[i.createVNode("span",{class:"f-chat-dynamic-component-loading-spinner"},null),i.createVNode("span",null,[i.createTextVNode("加载中......")])]),t.value==="error"&&i.createVNode("div",{class:"f-chat-dynamic-component-error"},[i.createVNode("span",{class:"f-chat-dynamic-component-error-icon"},[i.createTextVNode("!")]),i.createVNode("span",null,[n.value])])])}}),Ja=(e,t,n)=>{if(e.type===Le.DynamicComponentComplete){const r=e;if(!r.config)return null;if(r.config.position==="inline")return i.createVNode(xn,{key:`dc-${t}`,config:r.config},null);const o={type:"file",fileContent:{type:"md",name:r.config.title}},u={onPreviewFile:a=>{n.emit("showDynamicComponent",r.config)}};return i.nextTick(()=>n.emit("dynamicComponentsDetected",[r.config])),i.createVNode("div",{style:{padding:"16px 0"}},[n.renderFileEmbeddedContent(o,u)])}return e.type===Le.DynamicComponentPending?i.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`dc-loading-${t}`},[i.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),i.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[i.createTextVNode("组件加载中......")])]):null};function Ih(){return{[Le.Text]:Tf,[Le.AssistantWidgetComplete]:Ga,[Le.AssistantWidgetPending]:Ga,[Le.DynamicComponentComplete]:Ja,[Le.DynamicComponentPending]:Ja}}const Oh=i.defineComponent({name:"FXBubbleTextContent",props:fc,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:n}=Ai(),{propertyStates:r,registerProperty:o,updatePropertyValue:u,startStreaming:a}=Vr();o("title",e.title??""),o("subtitle",e.subtitle??""),o("text",e.text??""),i.watch([()=>e.title,()=>e.subtitle,()=>e.text],([p,w,y])=>{u("title",p??""),u("subtitle",w??""),u("text",y??"")});const s=i.computed(()=>e.textFormat==="markdown"),l=i.ref(!1),d=i.computed(()=>{var p,w,y;return l.value?{title:((p=r.title)==null?void 0:p.displayedValue)??"",subtitle:((w=r.subtitle)==null?void 0:w.displayedValue)??"",text:((y=r.text)==null?void 0:y.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),f=i.computed(()=>Dc(d.value.text)),c={shouldShowMarkdown:s,emit:t.emit,renderFileEmbeddedContent:n},h=Ih(),m=()=>f.value.length===0?null:i.createVNode("div",{class:"f-chat-bubble-text-collection"},[f.value.map((p,w)=>{var y;return(y=h[p.type])==null?void 0:y.call(h,p,w,c)})]);return i.onMounted(()=>{l.value&&a()}),()=>i.createVNode(i.Fragment,null,[d.value.title&&i.createVNode("div",{class:"f-chat-bubble-content-title"},[d.value.title]),d.value.subtitle&&i.createVNode("div",{class:"f-chat-bubble-content-subtitle"},[d.value.subtitle]),m()])}}),Lh={content:{type:Object},outputMode:{type:String,default:"full"}};function wn({status:e,variant:t=""}){let n="";return t?n=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()} variant--${t.toLowerCase()} `:n=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()}`,i.createVNode("span",{class:n,"aria-hidden":!0},null)}const Vh=i.defineComponent({name:"FXBubbleThink",props:Lh,setup(e,t){var X;const{propertyStates:n,registerProperty:r,updatePropertyValue:o,isAllDone:u}=Vr(),{elapsedSeconds:a,hasEverStarted:s,start:l,stop:d,reset:f}=$u(),c=i.ref(((X=e.content)==null?void 0:X.completed)!==!0),h=i.ref(null),m=i.ref(null),p=i.ref(!1),w=i.ref(!1),y=i.computed(()=>e.outputMode==="streaming"),A=i.computed(()=>{var z;return(z=e.content)==null?void 0:z.completed}),b=i.computed(()=>{var _,C,N;const z=(_=g.value)==null?void 0:_.trim(),B=z?z.slice(0,8):"",j=z&&z.length>8?"…":"",I=B?`<span class="f-chat-bubble-thinking-preview">${B}${j}</span>`:"";if(A.value){const F=s.value?`(用时${a.value}秒)`:"";return(((C=e.content)==null?void 0:C.title)??"思考完成"+F)+I}return(((N=e.content)==null?void 0:N.title)??"正在思考......")+I}),g=i.computed(()=>{var z,B;return y.value?((z=n.content)==null?void 0:z.displayedValue)??"":((B=e.content)==null?void 0:B.content)??""}),x=i.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!A.value,"is-completed":A.value})),k=()=>{const z=h.value;if(!z||!p.value){w.value=!1;return}w.value=z.scrollTop>0};i.watch(()=>A.value,z=>{z?d():l()},{immediate:!0}),i.watch(()=>A.value,z=>{z&&(c.value=!1)}),i.watch(()=>e.content,z=>{z&&(n.content?o("content",z.content??""):r("content",z.content??""))},{immediate:!0}),i.watch(g,async()=>{if(c.value){await i.nextTick();const z=h.value;if(!z)return;await i.nextTick(),p.value=z.scrollHeight>z.clientHeight,p.value?(z.scrollTop=z.scrollHeight,w.value=!0):w.value=!1}},{immediate:!0}),i.watch(c,async z=>{if(z){await i.nextTick();const B=h.value;if(!B)return;await i.nextTick(),p.value=B.scrollHeight>B.clientHeight,p.value?(B.scrollTop=B.scrollHeight,w.value=!0):w.value=!1}}),i.onUnmounted(()=>{f()}),t.expose({instance:{get loadDone(){return e.content?(y.value?u.value:!0)&&A.value:!0}}});const T=()=>{c.value=!c.value},D=()=>A.value?null:i.createVNode(wn,{status:"Working",variant:"thinking"},null),S=()=>!g.value||!c.value?null:i.createVNode("div",{class:"f-chat-bubble-thinking-content"},[i.createVNode("div",{class:"f-chat-bubble-thinking-scroll-container",ref:h,onScroll:k},[p.value&&w.value&&i.createVNode("div",{class:"f-chat-bubble-thinking-fade-mask"},null),i.createVNode("div",{class:"f-chat-bubble-thinking-text-wrapper"},[i.createVNode("div",{ref:m,class:"f-chat-bubble-thinking-content-text",innerHTML:g.value},null)])])]);return()=>i.createVNode("div",{class:x.value},[i.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:T},[D(),i.createVNode("span",{class:"f-chat-bubble-thinking-title",innerHTML:b.value},null),g.value&&i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:c.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null)]),S()])}}),Ph={content:{type:Object}},es={id:{type:String},arrowOffsetX:{type:Number,default:0},class:{type:String,default:""},customStyles:{type:Object,default:null},isSimpleTips:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},host:{type:Object},leftBoundary:{type:Object},keepWidthWithReference:{type:Boolean,default:!1},minWidth:{type:Number,default:-1},offsetX:{type:Object,default:i.ref(0)},offsetY:{type:Object,default:i.ref(0)},placement:{type:String,default:"bottom"},reference:{type:Object},rightBoundary:{type:Object},showArrow:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:-1},limitContentBySpace:{type:Boolean,default:!1},beforeClose:{type:Function}};function Rh(e){const t=e.host?e.host:"body",n=i.computed(()=>t==="body"?0:t?t.getBoundingClientRect().top:0),r=i.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().bottom:window.innerHeight),o=i.computed(()=>t==="body"?0:t?t.getBoundingClientRect().left:0),u=i.computed(()=>t==="body"?document.body.getBoundingClientRect().width:t?t.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),a=i.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().height:window.innerHeight);return{host:t,hostLeft:o,hostTop:n,hostWidth:u,hostHeight:a,hostBottom:r}}function Mh(e,t,n,r){const o=i.ref(e.offsetX||0),u=i.ref(e.offsetY||0),a=i.ref(-1),s=i.ref(-1),l=i.ref(-1),d=i.ref(-1),f=i.ref(e.placement),c=i.ref(0),h=i.ref(0),m=i.ref(0),p=i.computed(()=>document.documentElement.scrollLeft),w=i.computed(()=>document.documentElement.scrollTop),{hostLeft:y,hostTop:A,hostWidth:b,hostHeight:g,hostBottom:x}=r;i.watch(()=>e.offsetX,L=>{o.value=L});const k=i.computed(()=>{const L={left:`${h.value}px`,top:`${m.value}px`,transform:`translate(${o.value}px, ${u.value}px)`};return e.zIndex!==-1&&(L["z-index"]=e.zIndex),e.fitContent?e.keepWidthWithReference&&n.value&&a.value>=n.value.getBoundingClientRect().width&&(L.width=`${a.value}px`):a.value!==-1&&(L.width=`${a.value}px`),e.minWidth!==-1&&(L.minWidth=`${e.minWidth}px`),e.customStyles&&Object.assign(L,e.customStyles),s.value>0&&(L.maxHeight=s.value+"px"),L}),T=i.computed(()=>({left:`${c.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function D(L){if(L&&e.keepWidthWithReference){const M=L.getBoundingClientRect();a.value=Math.max(e.minWidth,M.width)}}function S(L,M){const G=b.value-L.width-4;return G>0?G:M}function X(L,M){const G=g.value-L.height-12;return G>0?G:M}function z(L,M,G){const J=c.value,Z=M.left-y.value+M.width/2+p.value,K=M.top-A.value-(L.height+G.height)+w.value;return{popoverLeft:Z,popoverTop:K,arrowLeft:J}}function B(L,M,G){const J=M.top-A.value+(M.height+G.height)+w.value,Z=X(L,J);return Math.min(J,Z)}function j(L,M){const G=S(M,L),J=L<=G?c.value:L-G;return{popoverLeft:Math.min(L,G),arrowLeft:J,maxHeight:0}}function I(L,M){const G=S(M,L),J=L<=G?c.value:L-G;return{popoverLeft:L,arrowLeft:J,maxHeight:0}}function W(L,M,G){const J=M.left-y.value+p.value,{arrowLeft:Z,popoverLeft:K}=I(J,L),{popoverTop:ue}=z(L,M,G);return{popoverLeft:K,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function _(L,M,G){const J=M.left-y.value+M.width/2-(G.width/2-(L.left-y.value))+p.value,{arrowLeft:Z,popoverLeft:K}=j(J,L),ue=B(L,M,G);return{popoverLeft:K,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function C(L,M,G){const J=M.left-y.value+p.value,{arrowLeft:Z,popoverLeft:K}=j(J,L),ue=B(L,M,G);return{popoverLeft:K,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function N(L,M,G){const J=M.left-y.value;let Z=0,K=0,ue=0,le=0,Fe="bottom-left";window.innerWidth-J>L.width?Z=J+p.value:(Z=M.right-L.width+p.value,ue=L.width-G.width-20);let Te=0;if(e.limitContentBySpace){const Xt={topHeight:M.top-A.value-G.height-8,bottomHeight:x.value-M.bottom-G.height-8};Te=Math.max(Xt.topHeight,Xt.bottomHeight),L.height>Te&&(le=Te,n.value.classList.add("popover-limitmax"))}const yt=le?Math.floor(le):L.height,Me=M.top-A.value+(M.height+G.height);return x.value-Me>yt?K=Me+w.value:(K=M.top-yt-G.height+w.value,x.value-Me>M.top?(K=Me+w.value,yt>M.top&&(K=x.value-yt)):(K=K<0?0:K,Fe="top")),n.value.classList.add("popover-"+Fe,"bs-popover-"+Fe),{popoverLeft:Z<0?5:Z,popoverTop:K,arrowLeft:ue,maxHeight:le}}function F(L,M,G){const J=M.left+M.width,Z=Math.max(M.top-(L.height/2-M.height/2),A.value);let K=A.value+g.value-L.height;K<0&&(K=Z);const ue=Math.min(Z,K);return{popoverLeft:J,popoverTop:ue,arrowLeft:0,maxHeight:0}}function O(L,M,G){const J=M.left+M.width,Z=Math.max(M.top-M.height,A.value);let K=A.value+g.value-L.height;K<0&&(K=Z);const ue=Math.min(Z,K);return{popoverLeft:J,popoverTop:ue,arrowLeft:0,maxHeight:0}}const H=new Map([["top",z],["top-left",W],["bottom",_],["bottom-left",C],["right",F],["right-top",O],["auto",N]]);function $(L){var K;e.keepWidthWithReference&&D(L);const M=L.getBoundingClientRect();l.value=M.top,d.value=M.left;const G=t.value?t.value.getBoundingClientRect():{height:4,width:4},J=(K=n.value)==null?void 0:K.getBoundingClientRect();a.value=J.width;const Z=H.get(f.value);if(Z){const{arrowLeft:ue,popoverLeft:le,popoverTop:Fe,maxHeight:Te}=Z(J,M,G);c.value=ue,h.value=le,m.value=Fe,s.value=Te||-1}}function R(L){if(L){const M=L.getBoundingClientRect();(M.left!==d.value||M.top!==l.value)&&$(L)}}function V(){f.value=e.placement,c.value=0,h.value=0,m.value=0,a.value=-1}return{arrowStyle:T,popoverStyle:k,position:f,popoverWidth:a,fitToReference:D,followToReferencePosition:R,locateToReference:$,resetPosition:V}}function Bh(e,t,n,r,o,u,a){const s=i.ref(e.visible),l=i.computed(()=>s.value),{fitToReference:d,locateToReference:f,resetPosition:c}=a;let h;async function m(){s.value&&(e.beforeClose&&typeof e.beforeClose=="function"&&!await e.beforeClose()||(s.value=!1,document.body.removeEventListener("click",h),document.body.removeEventListener("mousedown",h),document.body.removeEventListener("wheel",h,!0),document.removeEventListener("scroll",h),c(),t.emit("hidden")))}h=w=>{var b;if(!o.value)return;const y=o.value.contains(w.target);if(w.type==="scroll"||w.type==="wheel"&&y){m();return}if(w.target.closest(".time-picker-panel"))return;const A=(b=w.target)==null?void 0:b.closest(".popover");if(A&&r.value&&A===r.value){w.type!=="scroll"&&w.type!=="wheel"&&w.stopPropagation();return}if(!y&&s.value){const g=o.value.closest(".popover");g&&g.removeEventListener("click",h),m()}};async function p(w){if(r.value&&(e.showArrow===!1||e.showArrow&&n.value)&&w){c(),s.value=!0,o.value=w,u.value&&d(w),await i.nextTick(),f(w),document.body.addEventListener("click",h),document.body.addEventListener("mousedown",h),document.body.addEventListener("wheel",h,!0),document.addEventListener("scroll",h),(top==null?void 0:top.document)!==document&&(top==null||top.document.addEventListener("mousedown",h));const y=w.closest(".popover");y&&y.addEventListener("click",h),t.emit("shown")}}return t.expose({hide:m,popoverRef:r,show:p,shown:l,isShow:s}),{showPopover:s,hidePopverOnClickBodyHandler:h}}function zh(e,t,n,r,o,u){const{popoverWidth:a,fitToReference:s,followToReferencePosition:l}=o;function d(){var f;if(u.value&&((f=u.value.style)==null?void 0:f.display)!=="none"&&n.value){l(n.value);const c=n.value.getBoundingClientRect();r.value&&c.width!==a.value&&s(n.value)}}return{onResize:d}}function jh(e,t=500){const n=i.ref(e.value);let r;const o=i.watch(e,a=>{clearTimeout(r),r=setTimeout(()=>{n.value=a},t)}),u=()=>{clearTimeout(r),o()};return i.onUnmounted(u),{delayedValue:n,cleanup:u}}const Kt=i.defineComponent({name:"FXPopover",props:es,emits:["shown","hidden"],setup(e,t){const n=i.ref(),r=i.ref(),o=i.ref(e.reference),u=i.ref(e.keepWidthWithReference),a=i.computed(()=>!!e.title),s=Rh(e),{host:l}=s,d=Mh(e,n,r,s),{position:f,arrowStyle:c,popoverStyle:h,fitToReference:m,locateToReference:p}=d,{showPopover:w,hidePopverOnClickBodyHandler:y}=Bh(e,t,n,r,o,u,d),{onResize:A}=zh(e,t,o,u,d,r),b=i.computed(()=>{let D=f.value;D==="top-left"&&(D="top");const S=`popover in popover-${D}`,X=`bs-popover-${D}`,z={"popover-fitcontent":e.fitContent,fade:!0};z[S]=!0,z[X]=!0;const B=(e.class||"").split(" ");return e.isSimpleTips&&B.unshift("popover-tips"),B.reduce((j,I)=>(j[I]=!0,j),z),z}),g=i.computed(()=>({"popover-content":!0,"popover-body":!0})),x=i.computed(()=>{const D={};return D.opacity=w.value?1:0,D.visibility=w.value?"visible":"hidden",D.zIndex=1060,D}),k=i.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:T}=jh(x,50);return i.onMounted(()=>{var D;u.value&&m(o.value),e.reference&&p(o.value),window.addEventListener("resize",A),(D=r.value)==null||D.focus()}),i.onUnmounted(()=>{document.body.removeEventListener("click",y),window.removeEventListener("resize",A),w.value=!1}),()=>i.createVNode(i.Teleport,{to:l},{default:()=>{var D;return[i.withDirectives(i.createVNode("div",{tabindex:"-1",ref:r,class:b.value,style:{...h.value,...T.value},onMousedown:S=>{S.stopPropagation()},onClick:S=>{S.stopPropagation()}},[k.value&&i.createVNode("div",{ref:n,class:"popover-arrow arrow",style:c.value},null),a.value&&i.createVNode("h3",{class:"popover-title popover-header"},[e.title]),i.createVNode("div",{class:g.value},[t.slots.default&&((D=t.slots)==null?void 0:D.default())])]),[[i.vShow,w.value]])]}})}}),au="FarrisX_PopoverInstancesKey";window[au]=window[au]||new WeakMap;function To(e,t,n){e.stopPropagation();const r=t.value;r&&r.value&&!r.value.isShow&&(r.value.show(n),window[au].set(n,r.value))}function ts(e,t,n){e.stopPropagation(),t.value.value.hide(),window[au].delete(n)}function Hh(e,t,n){e.stopPropagation();const r=t.value;r&&r.value&&(r.value.isShow?ts(e,t,n):To(e,t,n))}function ns(e,t,n){t.arg&&t.arg==="toggle"?Hh(e,t,n):To(e,t,n)}const rs={mounted:(e,t,n)=>{t.modifiers.hover?(e.addEventListener("mouseenter",r=>To(r,t,e)),e.addEventListener("mouseleave",r=>ts(r,t,e))):t.modifiers.click?e.addEventListener("click",r=>ns(r,t,e)):e.addEventListener("click",r=>ns(r,t,e)),e.classList.add("v-popover")},unMounted:(e,t,n)=>{}};Kt.install=e=>{e.component(Kt.name,Kt),e.directive("fxpopover",rs)};const us={type:{type:String,default:"StartedToDo"},status:{type:String,default:"NotStart"},message:{type:String,default:""},taskDetail:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"hover"},initExpanded:{type:Boolean,default:!1},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!0},loading:Object,shimmer:{type:Boolean,default:!0},outputMode:{type:String,default:"streaming"},listStatus:{type:String,default:void 0},completedCount:{type:Number,default:void 0},totalCount:{type:Number,default:void 0}},os={items:{type:Array,default:()=>[]}},is={id:{type:Number||String,default:0},status:{type:String},task:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"expand"},initExpanded:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!1},shimmer:{type:Boolean,default:!0},title:{type:String,default:""},message:{type:String,default:""},outputMode:{type:String,default:"full"}},su=i.defineComponent({name:"FXTodoListItemView",props:is,emits:["click"],setup(e,{emit:t}){const{propertyStates:n,registerProperty:r,updatePropertyValue:o,startStreaming:u}=Vr();r("title",e.title??""),r("task",e.task??""),r("detail",e.message??""),i.watch([()=>e.title,()=>e.task,()=>e.message],([m,p,w])=>{o("title",m??""),o("task",p??""),o("detail",w??"")});const a=i.computed(()=>["f-chat-todo-item",{"is-done":e.status==="Done","is-working":e.status==="Working","is-not-start":e.status==="NotStart","no-shimmer":!e.shimmer}]),s=i.computed(()=>["f-chat-todo-task",{"is-done":e.status==="Done"}]);function l(){t("click",e,e.id)}const d=i.computed(()=>e.outputMode==="streaming"),f=i.computed(()=>{var m;return d.value?((m=n.title)==null?void 0:m.displayedValue)??"":e.title??""}),c=i.computed(()=>{var m;return d.value?((m=n.task)==null?void 0:m.displayedValue)??"":e.task??""}),h=i.computed(()=>{var m;return d.value?((m=n.detail)==null?void 0:m.displayedValue)??"":e.message??""});return i.onMounted(()=>{d.value&&u()}),()=>i.createVNode("li",{key:e.id,class:a.value,onClick:l},[e.todoList&&e.todoList.length>0&&i.createVNode(Qt,{todoList:e.todoList,status:e.status,message:e.task,taskDetail:e.message,detailViewMode:e.detailViewMode,initExpanded:e.initExpanded,showLoading:e.showLoading,showLabel:e.showLabel,outputMode:e.outputMode},null),!e.todoList||e.todoList.length===0&&i.createVNode(i.Fragment,null,[e.showLoading&&i.createVNode(wn,{status:e.status??"Done",variant:"todo"},null),f.value?i.createVNode("div",{class:"f-chat-todo-task-wrapper"},[i.createVNode("span",{class:s.value},[f.value]),i.createVNode("div",{class:"f-chat-todo-task-description"},[c.value]),h.value?i.withDirectives(i.createVNode("div",{class:"f-chat-todo-task-description"},[h.value]),[[i.resolveDirective("overflow-tooltip")]]):null]):i.createVNode("div",{class:"f-chat-todo-task-wrapper"},[i.createVNode("span",{class:s.value},[c.value]),h.value?i.withDirectives(i.createVNode("div",{class:"f-chat-todo-task-description"},[h.value]),[[i.resolveDirective("overflow-tooltip")]]):null])])])}}),rr=i.defineComponent({name:"FXTodoListView",props:os,setup(e){return()=>{var t;return(t=e.items)!=null&&t.length?i.createVNode("ul",{class:"f-chat-todo-items"},[e.items.map((n,r)=>i.createVNode(su,i.mergeProps({key:r},n),null))]):null}}}),$h=300,Uh={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},Qt=i.defineComponent({name:"FXStartedTodo",props:us,setup(e){const t=i.ref(null),n=i.ref(null),r=i.ref(null),o=i.ref(null),u=i.computed(()=>e.outputMode==="streaming"),{displayContent:a}=bi(()=>({detail:e.taskDetail??""}),()=>!0,u,{charInterval:30}),s=i.ref(e.initExpanded),l=i.computed(()=>({"f-chat-message-started-todo--content":!0,"d-none":!s.value}));function d(){e.detailViewMode!=="expand"&&(o.value!=null&&(window.clearTimeout(o.value),o.value=null),r.value=window.setTimeout(()=>{t.value&&n.value&&n.value.show(t.value),r.value=null},$h))}function f(){e.detailViewMode!=="expand"&&(r.value!=null&&(window.clearTimeout(r.value),r.value=null),o.value=window.setTimeout(()=>{var b,g;(g=(b=n.value)==null?void 0:b.hide)==null||g.call(b),o.value=null},150))}function c(){if(e.detailViewMode==="none")return null;const b=a.value.detail??"";return i.createVNode(i.Fragment,null,[b?i.createVNode("div",{class:"f-chat-started-todo-task-detail"},[b]):null,i.createVNode(rr,{items:e.todoList},null)])}function h(){e.detailViewMode==="expand"&&(s.value=!s.value)}function m(){return e.detailViewMode==="expand"?i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:s.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null):null}function p(){return e.detailViewMode==="hover"&&i.createVNode(Kt,{ref:n,class:"f-chat-started-todo-popover"},{default:()=>[i.createVNode("div",{class:"f-chat-started-todo-popover-content",onMouseenter:()=>{o.value!=null&&(window.clearTimeout(o.value),o.value=null)},onMouseleave:f},[c()])]})}const w=i.computed(()=>e.listStatus==="completed"),y=i.computed(()=>{const b=e.todoList??[],g=e.totalCount??b.length;return{done:e.completedCount??b.filter(k=>(k==null?void 0:k.status)==="Done").length,total:g}});function A(){if(!w.value)return null;const{done:b,total:g}=y.value,x=g>0?`已完成 (${b}/${g})`:"已完成";return i.createVNode("span",{class:"f-chat-started-todo-completed-chip","aria-label":x},[x])}return()=>i.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working","is-completed":w.value}],onMouseenter:d,onMouseleave:f},[i.createVNode("div",{class:"f-chat-message-started-todo--header",onClick:h},[e.showLabel&&i.createVNode("span",{class:"f-chat-started-todo-label"},[Uh[e.status]]),i.createVNode("span",{class:"f-chat-started-todo-message",innerHTML:e.message},null),A(),m()]),e.detailViewMode==="expand"&&i.createVNode("div",{class:l.value},[c()]),p()])}});Qt.install=e=>{e.component(Qt.name,Qt)};const Wh=i.defineComponent({name:"FXBubbleThoughtChain",props:Ph,setup(e,t){const{elapsedSeconds:n,hasEverStarted:r,start:o,stop:u,reset:a}=$u(),s=i.computed(()=>{var c;return((c=e.content)==null?void 0:c.status)==="Done"}),l=i.computed(()=>{var c;return((c=e.content)==null?void 0:c.message)??"正在思考......"}),d=i.computed(()=>{var m,p;const c=((m=e.content)==null?void 0:m.doneMessage)??((p=e.content)==null?void 0:p.message)??"思考完成",h=r.value?`(用时${n.value}秒)`:"";return""+c+h}),f=i.computed(()=>s.value?d.value:l.value);return i.watch(()=>{var c;return(c=e.content)==null?void 0:c.status},c=>{c==="Working"?o():c==="Done"?u():a()},{immediate:!0}),i.onUnmounted(()=>{a()}),t.expose({instance:{get loadDone(){return e.content?s.value:!0}}}),()=>{var c,h,m,p,w,y;return e.content?i.createVNode(Qt,{status:((c=e.content)==null?void 0:c.status)??"Working",message:f.value,todoList:(h=e.content)==null?void 0:h.todoList,detailViewMode:((m=e.content)==null?void 0:m.detailViewMode)??"expand",showLabel:!1,showLoading:!0,initExpanded:!0,listStatus:(p=e.content)==null?void 0:p.listStatus,completedCount:(w=e.content)==null?void 0:w.completedCount,totalCount:(y=e.content)==null?void 0:y.totalCount},null):null}}}),ur=i.defineComponent({name:"UserAuthMessage",props:{content:{type:Object,required:!0},onConfirm:{type:Function,default:void 0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-auth"},[i.createVNode("div",{class:"f-ec-auth-desc"},[e.content.description]),i.createVNode("div",{class:"f-ec-auth-actions"},[e.content.options.map(t=>i.createVNode("button",{key:t.optionId,type:"button",class:"f-ec-auth-btn",onClick:()=>{var n;(n=e.onConfirm)==null||n.call(e,t.optionId,t.name,t.message??t.name),console.info("[UserAuth]",t.optionId,t.name)}},[t.name]))])])}}),Gh=300,Xh={read_file:"tool_file",write_file:"tool_file",edit_file:"tool_file",glob:"tool_file",grep:"tool_file",bash:"tool_command",web_fetch:"tool_internet",web_search:"tool_internet",todo_create:"tool_task",todo_list:"tool_task",todo_get:"tool_task",todo_update:"tool_task",ask_user:"tool_interaction",core_memory:"tool_memory",add_daily_note:"tool_memory",lint_json:"dateselect",lint_markdown:"dateselect",output_validation:"dateselect",load_skill_through_path:"tool_mcp"};function qh(e){return e?e.startsWith("mcp:")?"tool_mcp":Xh[e]??"thinking_tool":"thinking_tool"}const vn=i.defineComponent({name:"FXToolUseMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>e.content.toolResultApplied===!0||String(e.content.result??"").trim().length>0),n=i.computed(()=>e.content.success===!1),r=i.ref(!1);let o=setTimeout(()=>{r.value=!0},Gh);i.onBeforeUnmount(()=>{o&&clearTimeout(o)});const u=i.computed(()=>t.value),a=i.computed(()=>r.value&&!t.value),s=i.computed(()=>n.value?"执行失败":u.value?"执行完成":"调用中"),l=i.ref(!1),d=i.computed(()=>({"f-chat-tool-use":!0,"is-done":u.value,"is-error":n.value})),f=i.computed(()=>({"f-chat-tool-use-status":!0,"is-done":u.value&&!n.value,"is-run":a.value&&!n.value,"is-error":n.value}));i.watch(()=>[e.content.result,e.content.toolResultApplied,e.content.success],()=>{t.value&&(l.value=!1)},{flush:"post"});const c=()=>t.value?i.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{l.value=!l.value}},[i.createVNode("i",{class:"fx-icon fx-icon-"+qh(e.content.toolName)+" tool-icon"},null),i.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),i.createVNode("div",{class:f.value},[n.value?i.createVNode(wn,{status:"Error"},null):i.createVNode(wn,{status:u.value?"Done":a.value?"Working":"NotStart"},null),i.createVNode("span",{class:"f-chat-tool-use-status-text"},[s.value])]),i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:l.value?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease"}},null)]),l.value&&i.createVNode("div",{class:"f-chat-tool-use-content"},[c()])])}});vn.install=e=>{e.component(vn.name,vn)};const or=i.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":ur,"fx-app-preview-inline":at,FXToolUse:vn},props:Ir,setup(e,t){const n=i.shallowRef(),r=i.ref(),o=i.ref(),u=i.computed(()=>!!e.showAvatar),a=i.computed(()=>u.value===!0||e.header==="ContentHeader"),s=i.computed(()=>t.slots.leftFooter||t.slots.rightFooter),l=i.computed(()=>{var I;return Ae({},(I=e.styles)==null?void 0:I.footer)}),d=I=>{if(e.attachmentRowClickOpensPreview!==!1&&e.onPreview){if(I.type==="md"&&I.content){e.onPreview({content:I.content,contentType:"markdown"});return}if(I!=null&&I.url){const W=I!=null&&I.fullScreenPreview?"fullScreen":"splitScreen";e.onPreview({url:I.url,previewMode:W,title:I.name})}}},f=I=>{if(e.attachmentRowClickOpensPreview===!1||!e.onPreview)return;const W=I==null?void 0:I.filter(C=>C.type==="md"&&C.content);if(W.length===0)return;const _=Object.fromEntries(W.map(C=>[C.name,C.content??""]));e.onPreview({contentMap:_,contentType:"markdown"})},{renderFileEmbeddedContent:c,renderPageEmbeddedContent:h}=Ai(),m=i.ref(""),p=i.computed(()=>{var W,_;if((W=e.content)!=null&&W.footerContent)return e.content.footerContent;const I=(_=e.content)==null?void 0:_.structuredContent;return I&&(I.footerTemplate||I.footerUrl||I.footerFile)?{type:I.footerUrl?"page":I.footerFile?"file":"template",pageUrl:I.footerUrl,fileContent:I.footerFile,template:I.footerTemplate,width:I.footerWidth,height:I.footerHeight}:null});i.watch(()=>{var I;return(I=p.value)==null?void 0:I.width},I=>{if(!I){m.value="";return}if(I.endsWith("%")){const W=parseFloat(I);isNaN(W)||i.nextTick(()=>{var C,N;const _=(N=(C=n.value)==null?void 0:C.parentElement)==null?void 0:N.clientWidth;_&&(m.value=`${_*W/100}px`)})}else m.value=I},{immediate:!0});const w=I=>{if(!I||I.length===0)return"我";const W=I.charAt(0);return/[\u4e00-\u9fa5]/.test(W)?W:W.toUpperCase()};function y(){return e.header==="ContentHeader"?uc:oc}const A=y(),{renderHeader:b}=A(e,t),g=()=>{var _,C,N;const I=((_=e.content)==null?void 0:_.sender)??"发送人",W=w(((C=e.content)==null?void 0:C.sender)??"");return i.createVNode("div",{class:"f-chat-bubble-avatar"},[(N=e.content)!=null&&N.avatar?i.createVNode("img",{src:e.content.avatar,alt:I},null):i.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[W])])},x=()=>{var W;const I=(W=e.content)==null?void 0:W.toolUseAboveText;return I!=null&&I.length?i.createVNode("div",{class:"f-chat-bubble-tool-use-group"},[I.map((_,C)=>i.createVNode(vn,{key:_.toolUseId??`tu-${C}`,content:_},null))]):null},k=()=>{var I;return(I=e.content)!=null&&I.thinkingContent?i.createVNode(Vh,{ref:r,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},T=()=>{var I;return(I=e.content)!=null&&I.startedTodo?i.createVNode(Wh,{ref:o,content:e.content.startedTodo},null):null},D=I=>{if(!(I!=null&&I.type))return null;const{type:W}=I;return W==="page"&&I.pageUrl?h(I,{onNavigate:_=>{var C;(C=e.onPreview)==null||C.call(e,{url:_})}}):W==="file"&&I.fileContent?c(I,{onPreviewFile:d,onBatchPreviewFile:f}):W==="template"&&I.template?I.template():null},S=()=>{var C,N,F;if(!((F=(N=(C=e.content)==null?void 0:C.structuredContent)==null?void 0:N.sections)!=null&&F.length))return null;const{sections:I,showDivider:W}=e.content.structuredContent,_=O=>{const{content:H,label:$}=O;return $||H&&typeof H=="string"?i.createVNode(i.Fragment,null,[i.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),O.label&&i.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[O.label]),i.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[O.content])]):D(O.content)};return i.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":W}]},[I.map((O,H)=>i.createVNode("div",{key:H,class:["f-chat-bubble-structured-section",{"section-divider":O.showDivider}]},[i.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[O.icon&&(O.icon.startsWith("http")||O.icon.startsWith("//")||O.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test(O.icon)?i.createVNode("img",{alt:O.title,src:O.icon,class:"f-chat-bubble-structured-section-icon"},null):i.createVNode("i",{class:`fx-icon ${O.icon}`,style:O.iconStyle},null)),i.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[O.title])]),O.items&&O.items.length>0&&i.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[O.items.map(($,R)=>i.createVNode("div",{key:R,class:"f-chat-bubble-structured-section-item"},[_($)]))])]))])},X=()=>{const I=p.value;if(!I)return null;const W={};return m.value&&(W.width=m.value),I.height&&(W.height=`${I.height}px`),i.createVNode("div",{class:"f-chat-bubble-content-footer",style:W},[D(I)])},z=()=>{const I=e.attachmentRowClickOpensPreview!==!1?d:void 0;return i.createVNode(vi,{attachments:e.attachments??[],enableFixedWidth:e.placement==="end",showDownloadButton:e.attachmentShowDownload!==!1,onPreview:I,onBatchPreview:e.attachmentRowClickOpensPreview!==!1?f:void 0,role:e.role},null)},B=()=>{var W;const I=(W=e.content)==null?void 0:W.compositeInlineBlocks;return I!=null&&I.length?I.map((_,C)=>_.kind==="userAuth"?i.createVNode(i.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${C}`,content:_.content,onConfirm:e.onUserAuthConfirm},null):i.createVNode(i.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${C}`,content:_.content,onOpen:e.onPreview},null)):null},j=()=>{var I,W,_,C,N,F;return i.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[a.value&&b(),z(),i.createVNode("div",{class:`f-chat-bubble-content-text-wrapper ${e.placement}`},[(I=e.content)!=null&&I.compositeOrderedBeforeMarkdownRender?e.content.compositeOrderedBeforeMarkdownRender():i.createVNode(i.Fragment,null,[k(),x()]),T(),S(),i.createVNode(Oh,{title:((W=e.content)==null?void 0:W.title)??"",subtitle:((_=e.content)==null?void 0:_.subtitle)??"",text:typeof((C=e.content)==null?void 0:C.text)=="string"?e.content.text:"",textFormat:((N=e.content)==null?void 0:N.textFormat)??"plain",placement:e.placement,onDynamicComponentsDetected:e==null?void 0:e.onDynamicComponentsDetected,onShowDynamicComponent:e==null?void 0:e.onShowDynamicComponent},null),X(),(F=e.compositeTailRender)==null?void 0:F.call(e),B()]),s.value&&i.createVNode("div",{class:"f-chat-bubble-footer",style:l.value},[t.slots.leftFooter&&i.createVNode("div",{class:"f-chat-bubble-footer-left"},[t.slots.leftFooter()]),t.slots.rightFooter&&i.createVNode("div",{class:"f-chat-bubble-footer-right"},[t.slots.rightFooter()])])])};return()=>i.createVNode("div",{class:"f-chat-bubble-container",ref:n},[i.createVNode("div",{class:`f-chat-bubble-wrapper ${e.placement}`},[e.placement==="start"?i.createVNode(i.Fragment,null,[u.value&&g(),j()]):i.createVNode(i.Fragment,null,[j(),u.value&&g()])])])}}),as={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},No=i.defineComponent({name:"FXBubbleAction",props:as,setup(e,t){const n=i.computed(()=>Ae({},e.customStyle));return()=>t.slots.default&&i.createVNode("span",{class:"f-chat-bubble-footer-action",style:n.value},[t.slots.default()])}});or.install=e=>{e.component(or.name,or),e.component(No.name,No)};const ss={items:{type:Array,default:()=>[]},modelValue:{type:Number,default:0},direction:{type:String,default:"horizontal"},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},loop:{type:Boolean,default:!0},trigger:{type:String,default:"click"},indicatorPosition:{type:String,default:"inside"},arrowVisibility:{type:String,default:"hover"},showIndicator:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},height:{type:[String,Number],default:"400px"},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[String,Array,Object],default:""},customStyle:{type:[Object,String],default:""},buttonPosition:{type:String,default:"inner"}},ls={item:{type:Object,default:()=>({})},index:{type:Number,default:0},active:{type:Boolean,default:!1},showInfo:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},lu=i.defineComponent({name:"FXCarouselItem",props:ls,emits:["click"],setup(e,{slots:t,emit:n}){const r=i.computed(()=>{var c;const f={"fx-carousel--item":!0,"fx-carousel--item-active":e.active};return ye(f,(c=e.classNames)==null?void 0:c.item)}),o=i.computed(()=>{var c,h;const f=Ae({},(c=e.styles)==null?void 0:c.item);return Ae(f,(h=e.styles)==null?void 0:h.item)}),u=()=>{var f,c,h;return e.item.image?i.createVNode("img",{class:["fx-carousel--item-image",(f=e.classNames)==null?void 0:f.image],style:(c=e.styles)==null?void 0:c.image,src:e.item.image,alt:(h=e.item.title)==null?void 0:h.toString()},null):null},a=()=>{var f,c,h,m;return e.item.content?i.createVNode("div",{class:["fx-carousel--item-content",(f=e.classNames)==null?void 0:f.content],style:(c=e.styles)==null?void 0:c.content},[e.item.content]):t.default?i.createVNode("div",{class:["fx-carousel--item-content",(h=e.classNames)==null?void 0:h.content],style:(m=e.styles)==null?void 0:m.content},[t.default()]):null},s=()=>{var f,c;return e.item.title?i.createVNode("h3",{class:["fx-carousel--item-title",(f=e.classNames)==null?void 0:f.title],style:(c=e.styles)==null?void 0:c.title},[e.item.title]):null},l=()=>{var f,c;return e.item.description?i.createVNode("p",{class:["fx-carousel--item-description",(f=e.classNames)==null?void 0:f.description],style:(c=e.styles)==null?void 0:c.description},[e.item.description]):null},d=f=>{e.item.disabled||n("click",f,e.item,e.index)};return()=>i.createVNode("div",{class:r.value,style:o.value,onClick:d},[u(),a(),e.showInfo&&i.createVNode("div",{class:"fx-carousel--item-info"},[s(),l()])])}});function Zh(e){const{items:t,autoplay:n=!1,interval:r=3e3,loop:o=!0,direction:u="horizontal"}=e,a=i.ref(0),s=i.ref(!1),l=i.ref(null),d=i.computed(()=>t.length),f=i.computed(()=>d.value<=1);i.computed(()=>a.value===0?o?d.value-1:0:a.value-1),i.computed(()=>a.value===d.value-1?o?0:a.value:a.value+1);const c=i.computed(()=>{const g=-a.value*100;return{transform:u==="horizontal"?`translateX(${g}%)`:`translateY(${g}%)`,transition:"transform 0.5s ease"}}),h=g=>{g<0||g>=d.value||(a.value,a.value=g)},m=()=>{f.value||(a.value===d.value-1?h(o?0:a.value):h(a.value+1))},p=()=>{f.value||(a.value===0?h(o?d.value-1:0):h(a.value-1))},w=()=>{!n||f.value||(y(),l.value=window.setInterval(()=>{s.value||m()},r))},y=()=>{l.value&&(clearInterval(l.value),l.value=null)},A=()=>{s.value=!0,n&&y()},b=()=>{s.value=!1,n&&w()};return i.onMounted(()=>{w()}),i.onUnmounted(()=>{y()}),{currentIndex:a,totalItems:d,isSingleItem:f,trackStyle:c,goTo:h,next:m,prev:p,handleMouseEnter:A,handleMouseLeave:b}}const ir=i.defineComponent({name:"FXCarousel",props:ss,emits:["update:modelValue","change","item-click"],setup(e,{slots:t,emit:n}){const{currentIndex:r,isSingleItem:o,trackStyle:u,goTo:a,next:s,prev:l,handleMouseEnter:d,handleMouseLeave:f}=Zh({items:e.items,autoplay:e.autoplay,interval:e.interval,loop:e.loop,direction:e.direction}),c=k=>{n("update:modelValue",k),n("change",k,r.value)},h=i.computed(()=>{var T;const k={"fx-carousel":!0,"fx-carousel--vertical":e.direction==="vertical","fx-carousel--single":o.value,"fx-carousel--button-outer":e.buttonPosition==="outer","fx-carousel--button-inner":e.buttonPosition==="inner"};return ye(k,(T=e.classNames)==null?void 0:T.root)}),m=i.computed(()=>{var D;const k={height:typeof e.height=="number"?`${e.height}px`:e.height},T=Ae(k,e.customStyle);return Ae(T,(D=e.styles)==null?void 0:D.root)}),p=i.computed(()=>{var T;const k={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return ye(k,(T=e.classNames)==null?void 0:T.container)}),w=i.computed(()=>{var T;return ye({"fx-carousel--track":!0},(T=e.classNames)==null?void 0:T.track)}),y=i.computed(()=>{var T;const k={"fx-carousel--indicator":!0,"fx-carousel--indicator-outside":e.indicatorPosition==="outside","fx-carousel--indicator-none":e.indicatorPosition==="none"||!e.showIndicator};return ye(k,(T=e.classNames)==null?void 0:T.indicator)}),A=k=>{var D,S;const T={"fx-carousel--arrow":!0,"fx-carousel--arrow-left":k==="left","fx-carousel--arrow-right":k==="right","fx-carousel--arrow-never":e.arrowVisibility==="never"||!e.showArrow};return T[`fx-carousel--arrow-${e.buttonPosition}`]=!0,ye(T,k==="left"?(D=e.classNames)==null?void 0:D.arrowLeft:(S=e.classNames)==null?void 0:S.arrowRight)},b=k=>{var S,X;if(o.value)return null;const T=k==="left"?l:s,D=t[k==="left"?"prevArrow":"nextArrow"];return i.createVNode("button",{class:A(k),style:k==="left"?(S=e.styles)==null?void 0:S.arrowLeft:(X=e.styles)==null?void 0:X.arrowRight,onClick:T,"aria-label":`${k} arrow`},[D?D():i.createVNode("i",{style:"font-size: 60px;",class:`fx-icon fx-icon-arrow-${k==="left"?"left":"right"}`},null)])},g=()=>{var k;return o.value||!e.showIndicator?null:i.createVNode("div",{class:y.value,style:(k=e.styles)==null?void 0:k.indicator},[e.items.map((T,D)=>{var S,X;return i.createVNode("button",{"aria-label":`indicator ${D}`,key:D,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":D===r.value}],style:D===r.value?(S=e.styles)==null?void 0:S.indicatorItemActive:(X=e.styles)==null?void 0:X.indicatorItem,onClick:()=>{a(D),c(D)}},null)})])},x=()=>i.createVNode("div",{class:w.value,style:u.value},[e.items.map((k,T)=>i.createVNode(lu,{key:k.id||`item_${T}`,item:k,showInfo:e.showInfo,index:T,active:T===r.value,styles:e.styles,classNames:e.classNames,onClick:(D,S,X)=>{n("item-click",D,S,X)}},{default:()=>{var D,S;return[(D=t.item)==null?void 0:D.call(t,{item:k,index:T,active:T===r.value}),(S=t[`item${T}`])==null?void 0:S.call(t,{item:k,index:T,active:T===r.value})]}}))]);return()=>{var k;return i.createVNode("div",{class:h.value,style:m.value,onMouseenter:d,onMouseleave:f},[e.buttonPosition==="outer"&&b("left"),i.createVNode("div",{class:p.value,style:(k=e.styles)==null?void 0:k.container},[e.buttonPosition==="inner"&&b("left"),x(),e.buttonPosition==="inner"&&b("right")]),e.buttonPosition==="outer"&&b("right"),g()])}}});ir.install=e=>{e.component(ir.name,ir),e.component(lu.name,lu)};const cs={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function Yh(e){const t=i.ref(-1),n=i.ref(-1),r=i.ref(0),o=i.ref(0),u=i.ref(!1),a=i.ref(!1),s=i.computed(()=>({display:u.value?"block":"none",left:`${r.value}px`,cursor:"e-resize"})),l=i.computed(()=>({display:a.value?"block":"none",top:`${o.value}px`,cursor:"n-resize"})),d=i.computed(()=>{const y={display:a.value||u.value?"block":"none"};return o.value>0&&(y.cursor="n-resize"),y});function f(y,A,b,g){const x=e.value;if(x){const{left:k,right:T,width:D}=x.getBoundingClientRect();let S=y.clientX-k;g==="right"&&(S=T-y.clientX),S>A&&(S=A),S<b&&(S=b),g==="right"&&(S=D-S),r.value=S}}function c(y,A,b,g){const x=e.value;if(x){const{top:k,bottom:T,height:D}=x.getBoundingClientRect();let S=y.clientY-k;g==="bottom"&&(S=T-y.clientY),S>A&&(S=A),S<b&&(S=b),g==="bottom"&&(S=D-S),o.value=S}}function h(){const y=e.value;if(y){const{width:A,height:b}=y.getBoundingClientRect();return{width:A,height:b}}return null}function m(){const y=e.value;return y?Array.from(y.querySelectorAll("[data-position]")).reduce((A,b)=>{const g=b.getAttribute("data-position");return A=Object.assign(A,{[g]:b}),A},{}):null}function p(y,A){const b=h(),g=m();if(b&&g){const x=g==null?void 0:g.right,k=g==null?void 0:g.left;if(y==="left"&&k)return x?b.width-x.clientWidth-A:b.width-A;if(y==="right"&&x)return k?b.width-k.clientWidth-A:b.width-A}}function w(y,A){const b=h(),g=m();if(b&&g){const x=g==null?void 0:g.bottom,k=g==null?void 0:g.top;if(y==="top"&&k)return x?b.height-x.clientHeight-A:b.height-A;if(y==="bottom"&&x)return k?b.height-k.clientHeight-A:b.height-A}}return{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:l,resizeOverlayStyle:d,showHorizontalResizeHandle:u,showVerticalResizeHandle:a,horizontalResizeBarPosition:t,verticalResizeBarPosition:n,verticalResizeHandleOffset:o,horizontalResizeHandleOffset:r,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:c,getPanelMaxWidth:p,getPanelMaxHeight:w}}const An=i.defineComponent({name:"FXSplitter",props:cs,emits:[],setup(e,t){const n=i.ref(),r=Yh(n),{horizontalResizeHandleStyle:o,verticalResizeHandleStyle:u,resizeOverlayStyle:a}=r;i.provide("splitter",{useResizeHandleComposition:r});const s=i.computed(()=>ye({"f-splitter":!0},e==null?void 0:e.customClass)),l=i.computed(()=>{const d={"flex-direction":e.direction==="row"?"row":"column"};return Ae(d,e==null?void 0:e.customStyle)});return()=>i.createVNode("div",{class:s.value,ref:n,style:l.value},[t.slots.default&&t.slots.default(),i.createVNode("div",{class:"f-splitter-resize-overlay",style:a.value},null),i.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:o.value},null),i.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:u.value},null)])}}),Kh={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},resizeHandle:{type:String,default:""},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0}};function Qh(e,t){const n=i.ref(e.width),r=i.ref(e.height),{horizontalResizeBarPosition:o,horizontalResizeHandleOffset:u,showHorizontalResizeHandle:a,showVerticalResizeHandle:s,verticalResizeBarPosition:l,verticalResizeHandleOffset:d,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:c,getPanelMaxWidth:h,getPanelMaxHeight:m}=t;let p="",w,y,A;const b=()=>e.maxWidth?e.maxWidth:h(p,e.minWidth)||0,g=()=>e.maxHeight?e.maxHeight:m(p,e.minHeight)||0;function x(D){if((p==="left"||p==="right")&&y){const{left:S}=y.getBoundingClientRect(),{width:X}=w.getBoundingClientRect(),z=D.clientX-S;let B=p==="left"?(X||0)+(z-o.value):(X||0)-(z-o.value);B=e.minWidth>0?Math.max(e.minWidth,B):B;const j=b();j!=null&&j>0&&(B=j>B?B:j),n.value=B}if((p==="top"||p==="bottom")&&y){const{top:S}=y.getBoundingClientRect(),{height:X}=w.getBoundingClientRect(),z=D.clientY-S;let B=p==="top"?(X||0)+(z-l.value):(X||0)-(z-l.value);B=e.minHeight>0?Math.max(e.minHeight,B):B;const j=g();j!=null&&j>0&&(B=j>B?B:j),r.value=B}u.value=0,d.value=0,o.value=-1,l.value=-1,a.value=!1,s.value=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",x),document.body.style.userSelect="",p="",w=null,y=null}function k(D,S,X){if(p=S,w=X,a.value=!0,y=D.composedPath().find(B=>B.className.split(" ")[0]==="f-splitter"),y){const{left:B}=y.getBoundingClientRect();u.value=D.clientX-B,o.value=D.clientX-B;const j=b();A=I=>f(I,j,e.minWidth,p),document.addEventListener("mousemove",A),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}function T(D,S,X){if(p=S,w=X,s.value=!0,y=D.composedPath().find(B=>B.className.split(" ")[0]==="f-splitter"),y){const{top:B}=y.getBoundingClientRect();d.value=D.clientY-B,l.value=D.clientY-B;const j=g();A=I=>c(I,j,e.minHeight,p),document.addEventListener("mousemove",A),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:r,onClickSplitterHorizontalResizeBar:k,onClickSplitterVerticalResizeBar:T}}const ar=i.defineComponent({name:"FSplitterPane",props:Kh,emits:[],setup(e,t){const n=i.ref(),r=i.inject("splitter"),{useResizeHandleComposition:o}=r,u=Qh(e,o),{actualHeight:a,actualWidth:s,onClickSplitterHorizontalResizeBar:l,onClickSplitterVerticalResizeBar:d}=u,f=i.ref(e.position),c=i.computed(()=>{const g={"f-splitter-pane":!0,"f-splitter-pane-main":f.value==="center","has-resize-bar":e.resizable};return g["f-splitter-pane-"+f.value]=!0,ye(g,e==null?void 0:e.customClass)}),h=i.computed(()=>e.resizeHandle?e.resizeHandle.split(",").filter(g=>["e","n","s","w"].find(x=>x===g)):[]),m=i.computed(()=>{const g={};return(s.value||s.value===0)&&(f.value==="left"||f.value==="right"||h.value.find(x=>x==="e")||h.value.find(x=>x==="w"))&&(g.width=`${s.value}px`),(a.value||a.value===0)&&(f.value==="bottom"||f.value==="top"||h.value.find(x=>x==="s")||h.value.find(x=>x==="n"))&&(g.height=`${a.value}px`),e.visible||(g.display="none"),Ae(g,e==null?void 0:e.customStyle)}),p=i.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":f.value==="left","f-splitter-resize-bar-n":f.value==="bottom","f-splitter-resize-bar-s":f.value==="top","f-splitter-resize-bar-w":f.value==="right"}));function w(g){return{e:"left",w:"right",s:"top",n:"bottom"}[g]||g}function y(g,x){x=w(x),["left","right"].find(k=>k===x)&&l(g,x,n.value),["top","bottom"].find(k=>k===x)&&d(g,x,n.value)}function A(){return h.value.length>0?h.value.map(g=>i.createVNode("span",{class:"f-splitter-resize-bar f-splitter-resize-bar-"+g,onMousedown:x=>y(x,g)},null)):i.createVNode("span",{class:p.value,onMousedown:g=>y(g,f.value)},null)}function b(){s.value=e.width,a.value=e.height,m.value}return t.expose({reset:b}),()=>i.createVNode("div",{ref:n,class:c.value,style:m.value,"data-position":f.value},[t.slots.default&&t.slots.default(),e.resizable&&A()])}});An.install=e=>{e.component(An.name,An),e.component(ar.name,ar)};const ds={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},fs={content:{type:String,default:null}},Jh=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},ep=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},sr=(e,t=new WeakMap)=>{if(e===null||Jh(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return ep(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof Function)return e;if(e instanceof Map){const r=new Map;return t.set(e,r),e.forEach((o,u)=>{r.set(u,sr(o,t))}),r}if(e instanceof Set){const r=new Set;t.set(e,r);for(const o of e)r.add(sr(o,t));return r}if(Array.isArray(e)){const r=[];return t.set(e,r),e.forEach(o=>{r.push(sr(o,t))}),r}const n={};t.set(e,n);for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=sr(e[r],t));return n},tp=(e,t=200)=>{let n=0;return(...r)=>new Promise(o=>{n&&(clearTimeout(n),o("cancel")),n=window.setTimeout(()=>{e.apply(void 0,r),n=0,o("done")},t)})},Io=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,cu=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),np=new Set(["__proto__","constructor","prototype"]),rp=e=>!np.has(e),Oo=(e,t,n={})=>{if(Array.isArray(e)&&Array.isArray(t))return Lo(e,t,n);const{excludeKeys:r}=n,o=e,u=t;for(const a of Object.keys(u)){if(!rp(a))continue;const s=u[a],l=o[a];r&&r(a)?o[a]=s:Array.isArray(s)&&Array.isArray(l)?o[a]=Lo(l,s,n):cu(s)&&cu(l)?o[a]=Oo(l,s,n):o[a]=s}return e},Lo=(e,t,n)=>{const r=e.slice();return t.forEach((o,u)=>{const a=r[u];Array.isArray(o)&&Array.isArray(a)?r[u]=Lo(a,o,n):cu(o)&&cu(a)?r[u]=Oo(a,o,n):r[u]=o}),r},Y="md-editor",de="https://unpkg.com",up=`${de}/@highlightjs/cdn-assets@11.11.1/highlight.min.js`,hs={main:`${de}/prettier@3.8.1/standalone.js`,markdown:`${de}/prettier@3.8.1/plugins/markdown.js`},op={css:`${de}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${de}/cropperjs@1.6.2/dist/cropper.min.js`},ip=`${de}/screenfull@5.2.0/dist/screenfull.js`,ap=`${de}/mermaid@11.12.3/dist/mermaid.min.js`,sp={js:`${de}/katex@0.16.33/dist/katex.min.js`,css:`${de}/katex@0.16.33/dist/katex.min.css`},Vo={a11y:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-dark.min.css`},atom:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-dark.min.css`},github:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github-dark.min.css`},gradient:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-dark.min.css`},kimbie:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-dark.min.css`},paraiso:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-dark.min.css`},qtcreator:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-dark.min.css`}},lp=`${de}/echarts@6.0.0/dist/echarts.min.js`,ps={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},lt={editorExtensions:{highlight:{js:up,css:Vo},prettier:{standaloneJs:hs.main,parserMarkdownJs:hs.markdown},cropper:{...op},screenfull:{js:ip},mermaid:{js:ap,enableZoom:!0},katex:{...sp},echarts:{js:lp}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},cp=({instance:e,ctx:t,props:n={}},r="default")=>{const o=(e==null?void 0:e.$slots[r])||(t==null?void 0:t.slots[r]);return(o?o(e):"")||n[r]},dp="buildFinished",Po="errorCatcher",Ro="catalogChanged",fp="pushCatalog",ms="rerender",hp="taskStateChanged";class pp{constructor(){fe(this,"pools",{})}remove(t,n,r){const o=this.pools[t]&&this.pools[t][n];o&&(this.pools[t][n]=o.filter(u=>u!==r))}clear(t){this.pools[t]={}}on(t,n){return this.pools[t]||(this.pools[t]={}),this.pools[t][n.name]||(this.pools[t][n.name]=[]),this.pools[t][n.name].push(n.callback),this.pools[t][n.name].includes(n.callback)}emit(t,n,...r){this.pools[t]||(this.pools[t]={});const o=this.pools[t][n];o&&o.forEach(u=>{try{u(...r)}catch(a){console.error(`${n} monitor event exception!`,a)}})}}const ot=new pp,mp=(e,t)=>{if(!e)return e;const n=t.split(`
|
|
33
|
+
`),r=['<span rn-wrapper aria-hidden="true">'];return n.forEach(()=>{r.push("<span></span>")}),r.push("</span>"),`<span class="${Y}-code-block">${e}</span>${r.join("")}`};async function gs(e){if(typeof e=="string"){if(window.isSecureContext&&navigator.clipboard)return await navigator.clipboard.writeText(e);{const t=document.createElement("textarea");let n=!1;if(t.value=e,t.style.position="fixed",t.style.opacity=0,t.style.zIndex="-10000",t.style.top="-10000",document.body.appendChild(t),t.select(),n=document.execCommand("copy"),document.body.removeChild(t),n)return;throw new Error('Failed to copy content via "execCommand"!')}}}const gp={copy:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy ${Y}-icon"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,"collapse-tips":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-chevron-left ${Y}-icon"><circle cx="12" cy="12" r="10"/><path d="m14 16-4-4 4-4"/></svg>`,pin:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin ${Y}-icon"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg>`,"pin-off":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin-off ${Y}-icon"><path d="M12 17v5"/><path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89"/><path d="m2 2 20 20"/><path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11"/></svg>`,check:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check ${Y}-icon"><path d="M20 6 9 17l-5-5"/></svg>`},St=(e,t)=>typeof t[e]=="string"?t[e]:gp[e],Ht=(e,t,n="")=>{var o;const r=document.getElementById(t.id);if(r)n!==""&&(Reflect.get(window,n)?(o=t.onload)==null||o.call(r,new Event("load")):t.onload&&r.addEventListener("load",t.onload));else{const u={...t};u.onload=null;const a=yp(e,u);t.onload&&a.addEventListener("load",t.onload),document.head.appendChild(a)}},bp=(e,t)=>{var n;(n=document.getElementById(t.id))==null||n.remove(),Ht(e,t)},yp=(e,t)=>{const n=document.createElement(e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n},xp=(e,t)=>{const n=new Map;return e==null||e.forEach(r=>{let o=r.querySelector(`.${Y}-mermaid-action`);o?o.querySelector(`.${Y}-mermaid-copy`)||o.insertAdjacentHTML("beforeend",`<span class="${Y}-mermaid-copy">${St("copy",t.customIcon)}</span>`):(r.insertAdjacentHTML("beforeend",`<div class="${Y}-mermaid-action"><span class="${Y}-mermaid-copy">${St("copy",t.customIcon)}</span></div>`),o=r.querySelector(`.${Y}-mermaid-action`));const u=o.querySelector(`.${Y}-mermaid-copy`);let a=-1;const s=()=>{clearTimeout(a),gs(r.dataset.content||"").then(()=>{u.innerHTML=St("check",t.customIcon)}).catch(()=>{u.innerHTML=St("copy",t.customIcon)}).finally(()=>{a=window.setTimeout(()=>{u.innerHTML=St("copy",t.customIcon)},1500)})};u.addEventListener("click",s),n.set(r,{removeClick:()=>{u.removeEventListener("click",s)}})}),()=>{n.forEach(({removeClick:r})=>{r==null||r()}),n.clear()}},wp=(()=>{const e=t=>{if(!t)return()=>{};const n=t.firstChild;let r=1,o=0,u=0,a=!1,s,l,d,f=1;const c=()=>{n.style.transform=`translate(${o}px, ${u}px) scale(${r})`},h=x=>{x.touches.length===1?(a=!0,s=x.touches[0].clientX-o,l=x.touches[0].clientY-u):x.touches.length===2&&(d=Math.hypot(x.touches[0].clientX-x.touches[1].clientX,x.touches[0].clientY-x.touches[1].clientY),f=r)},m=x=>{if(x.preventDefault(),a&&x.touches.length===1)o=x.touches[0].clientX-s,u=x.touches[0].clientY-l,c();else if(x.touches.length===2){const k=Math.hypot(x.touches[0].clientX-x.touches[1].clientX,x.touches[0].clientY-x.touches[1].clientY)/d,T=r;r=f*(1+(k-1));const D=(x.touches[0].clientX+x.touches[1].clientX)/2,S=(x.touches[0].clientY+x.touches[1].clientY)/2,X=n.getBoundingClientRect(),z=(D-X.left)/T,B=(S-X.top)/T;o-=z*(r-T),u-=B*(r-T),c()}},p=()=>{a=!1},w=x=>{x.preventDefault();const k=.02,T=r;x.deltaY<0?r+=k:r=Math.max(.1,r-k);const D=n.getBoundingClientRect(),S=x.clientX-D.left,X=x.clientY-D.top;o-=S/T*(r-T),u-=X/T*(r-T),c()},y=x=>{a=!0,s=x.clientX-o,l=x.clientY-u},A=x=>{a&&(o=x.clientX-s,u=x.clientY-l,c())},b=()=>{a=!1},g=()=>{a=!1};return t.addEventListener("touchstart",h,{passive:!1}),t.addEventListener("touchmove",m,{passive:!1}),t.addEventListener("touchend",p),t.addEventListener("wheel",w,{passive:!1}),t.addEventListener("mousedown",y),t.addEventListener("mousemove",A),t.addEventListener("mouseup",b),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("touchstart",h),t.removeEventListener("touchmove",m),t.removeEventListener("touchend",p),t.removeEventListener("wheel",w),t.removeEventListener("mousedown",y),t.removeEventListener("mousemove",A),t.removeEventListener("mouseup",b),t.removeEventListener("mouseleave",g)}};return(t,n)=>{const r=new Map;return t==null||t.forEach(o=>{let u=o.querySelector(`.${Y}-mermaid-action`);u?u.querySelector(`.${Y}-mermaid-zoom`)||u.insertAdjacentHTML("beforeend",`<span class="${Y}-mermaid-zoom">${St("pin-off",n.customIcon)}</span>`):(o.insertAdjacentHTML("beforeend",`<div class="${Y}-mermaid-action"><span class="${Y}-mermaid-zoom">${St("pin-off",n.customIcon)}</span></div>`),u=o.querySelector(`.${Y}-mermaid-action`));const a=u.querySelector(`.${Y}-mermaid-zoom`),s=()=>{const l=r.get(o);if(l!=null&&l.removeEvent)l.removeEvent(),o.removeAttribute("data-grab"),r.set(o,{removeClick:l.removeClick}),a.innerHTML=St("pin-off",n.customIcon);else{const d=e(o);o.setAttribute("data-grab",""),r.set(o,{removeEvent:d,removeClick:l==null?void 0:l.removeClick}),a.innerHTML=St("pin",n.customIcon)}};a.addEventListener("click",s),r.set(o,{removeClick:()=>a.removeEventListener("click",s)})}),()=>{r.forEach(({removeEvent:o,removeClick:u})=>{o==null||o(),u==null||u()}),r.clear()}}})(),bs=new Set([!0,!1,"alt","title"]);function ys(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function xs(e,t){e&&e.attrs&&(e.attrs=ys(e.attrs,t))}function vp(e,t){if(!bs.has(e))throw new TypeError(`figcaption must be one of: ${[...bs]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([r])=>r==="title");return Array.isArray(n)&&n[1]?(xs(t,"title"),n[1]):void 0}function Ap(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let r=1;for(let o=1,u=n.tokens.length;o<u-1;++o){const a=n.tokens[o];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[d,f,c]=a.children;if(d.type!=="link_open"||f.type!=="image"||c.type!=="link_close")continue}if(o!==0&&n.tokens[o-1].type!=="paragraph_open"||o!==u-1&&n.tokens[o+1].type!=="paragraph_close")continue;const s=n.tokens[o-1];let l;if(s.type="figure_open",s.tag="figure",n.tokens[o+1].type="figure_close",n.tokens[o+1].tag="figure",t.dataType&&n.tokens[o-1].attrPush(["data-type","image"]),t.link&&a.children.length===1){[l]=a.children;const d=new n.Token("link_open","a",1);d.attrPush(["href",l.attrGet("src")]),a.children.unshift(d),a.children.push(new n.Token("link_close","a",-1))}if(l=a.children.length===1?a.children[0]:a.children[1],t.figcaption){const d=vp(t.figcaption,l);if(d){const[f]=e.parseInline(d,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...f.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),l.attrs&&(l.attrs=ys(l.attrs,"title"))}}if(t.copyAttrs&&l.attrs){const d=t.copyAttrs===!0?"":t.copyAttrs;s.attrs=l.attrs.filter(([f])=>f.match(d)).map(f=>Array.from(f))}if(t.tabindex&&(n.tokens[o-1].attrPush(["tabindex",r]),r++),t.lazy&&(l.attrs.some(([d])=>d==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([d])=>d==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let d=!1;for(let f=0,c=l.attrs.length;f<c&&!d;f++){const h=l.attrs[f];h[0]==="class"&&(h[1]=`${h[1]} ${t.classes}`,d=!0)}d||l.attrs.push(["class",t.classes])}if(t.removeSrc){const d=l.attrs.find(([f])=>f==="src");l.attrs.push(["data-src",d[1]]),xs(l,"src")}}})}const kp=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Cp(e,t){const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==126||t||r+2>=n)return!1;e.pos=r+1;let o=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===126){o=!0;break}e.md.inline.skipToken(e)}if(!o||r+1===e.pos)return e.pos=r,!1;const u=e.src.slice(r+1,e.pos);if(u.match(/(^|[^\\])(\\\\)*\s/))return e.pos=r,!1;e.posMax=e.pos,e.pos=r+1;const a=e.push("sub_open","sub",1);a.markup="~";const s=e.push("text","",0);s.content=u.replace(kp,"$1");const l=e.push("sub_close","sub",-1);return l.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function _p(e){e.inline.ruler.after("emphasis","sub",Cp)}const Ep=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Sp(e,t){const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==94||t||r+2>=n)return!1;e.pos=r+1;let o=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){o=!0;break}e.md.inline.skipToken(e)}if(!o||r+1===e.pos)return e.pos=r,!1;const u=e.src.slice(r+1,e.pos);if(u.match(/(^|[^\\])(\\\\)*\s/))return e.pos=r,!1;e.posMax=e.pos,e.pos=r+1;const a=e.push("sup_open","sup",1);a.markup="^";const s=e.push("text","",0);s.content=u.replace(Ep,"$1");const l=e.push("sup_close","sup",-1);return l.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function Dp(e){e.inline.ruler.after("emphasis","sup",Sp)}var Fp=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ws=new Set,Mo=typeof process=="object"&&process?process:{},vs=(e,t,n,r)=>{typeof Mo.emitWarning=="function"?Mo.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},du=globalThis.AbortController,As=globalThis.AbortSignal;if(typeof du>"u"){As=class{constructor(){fe(this,"onabort");fe(this,"_onabort",[]);fe(this,"reason");fe(this,"aborted",!1)}addEventListener(n,r){this._onabort.push(r)}},du=class{constructor(){fe(this,"signal",new As);t()}abort(n){var r,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let u of this.signal._onabort)u(n);(o=(r=this.signal).onabort)==null||o.call(r,n)}}};let e=((Dl=Mo.env)==null?void 0:Dl.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{e&&(e=!1,vs("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var Tp=e=>!ws.has(e),$t=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),ks=e=>$t(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?fu:null:null,fu=class extends Array{constructor(t){super(t),this.fill(0)}},Np=(Dt=class{constructor(t,n){fe(this,"heap");fe(this,"length");if(!v(Dt,Dn))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){let n=ks(t);if(!n)return[];ne(Dt,Dn,!0);let r=new Dt(t,n);return ne(Dt,Dn,!1),r}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},Dn=new WeakMap,ie(Dt,Dn,!1),Dt),Ip=(On=class{constructor(t){ie(this,q);ie(this,it);ie(this,Je);ie(this,ct);ie(this,rn);ie(this,dt);ie(this,Fn);ie(this,Tn);ie(this,ft);fe(this,"ttl");fe(this,"ttlResolution");fe(this,"ttlAutopurge");fe(this,"updateAgeOnGet");fe(this,"updateAgeOnHas");fe(this,"allowStale");fe(this,"noDisposeOnSet");fe(this,"noUpdateTTL");fe(this,"maxEntrySize");fe(this,"sizeCalculation");fe(this,"noDeleteOnFetchRejection");fe(this,"noDeleteOnStaleGet");fe(this,"allowStaleOnFetchAbort");fe(this,"allowStaleOnFetchRejection");fe(this,"ignoreFetchAbort");ie(this,ke);ie(this,ht);ie(this,we);ie(this,he);ie(this,re);ie(this,$e);ie(this,et);ie(this,Re);ie(this,Se);ie(this,pt);ie(this,De);ie(this,mt);ie(this,gt);ie(this,tt);ie(this,nt);ie(this,bt);ie(this,Gt);ie(this,Ue);ie(this,Nn);ie(this,un,()=>{});ie(this,It,()=>{});ie(this,Sr,()=>{});ie(this,rt,()=>!1);ie(this,on,t=>{});ie(this,In,(t,n,r)=>{});ie(this,Dr,(t,n,r,o)=>{if(r||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});fe(this,Fl,"LRUCache");let{max:n=0,ttl:r,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:l,dispose:d,onInsert:f,disposeAfter:c,noDisposeOnSet:h,noUpdateTTL:m,maxSize:p=0,maxEntrySize:w=0,sizeCalculation:y,fetchMethod:A,memoMethod:b,noDeleteOnFetchRejection:g,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:T,ignoreFetchAbort:D,perf:S}=t;if(S!==void 0&&typeof(S==null?void 0:S.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(ne(this,ft,S??Fp),n!==0&&!$t(n))throw new TypeError("max option must be a nonnegative integer");let X=n?ks(n):Array;if(!X)throw new Error("invalid max value: "+n);if(ne(this,it,n),ne(this,Je,p),this.maxEntrySize=w||v(this,Je),this.sizeCalculation=y,this.sizeCalculation){if(!v(this,Je)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(ne(this,Tn,b),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(ne(this,Fn,A),ne(this,Gt,!!A),ne(this,we,new Map),ne(this,he,new Array(n).fill(void 0)),ne(this,re,new Array(n).fill(void 0)),ne(this,$e,new X(n)),ne(this,et,new X(n)),ne(this,Re,0),ne(this,Se,0),ne(this,pt,Np.create(n)),ne(this,ke,0),ne(this,ht,0),typeof d=="function"&&ne(this,ct,d),typeof f=="function"&&ne(this,rn,f),typeof c=="function"?(ne(this,dt,c),ne(this,De,[])):(ne(this,dt,void 0),ne(this,De,void 0)),ne(this,bt,!!v(this,ct)),ne(this,Nn,!!v(this,rn)),ne(this,Ue,!!v(this,dt)),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!g,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(v(this,Je)!==0&&!$t(v(this,Je)))throw new TypeError("maxSize must be a positive integer if specified");if(!$t(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Q(this,q,Zl).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=$t(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=r||0,this.ttl){if(!$t(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Q(this,q,li).call(this)}if(v(this,it)===0&&this.ttl===0&&v(this,Je)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!v(this,it)&&!v(this,Je)){let z="LRU_CACHE_UNBOUNDED";Tp(z)&&(ws.add(z),vs("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,On))}}get perf(){return v(this,ft)}static unsafeExposeInternals(t){return{starts:v(t,gt),ttls:v(t,tt),autopurgeTimers:v(t,nt),sizes:v(t,mt),keyMap:v(t,we),keyList:v(t,he),valList:v(t,re),next:v(t,$e),prev:v(t,et),get head(){return v(t,Re)},get tail(){return v(t,Se)},free:v(t,pt),isBackgroundFetch:n=>{var r;return Q(r=t,q,pe).call(r,n)},backgroundFetch:(n,r,o,u)=>{var a;return Q(a=t,q,zu).call(a,n,r,o,u)},moveToTail:n=>{var r;return Q(r=t,q,Nr).call(r,n)},indexes:n=>{var r;return Q(r=t,q,qt).call(r,n)},rindexes:n=>{var r;return Q(r=t,q,Zt).call(r,n)},isStale:n=>{var r;return v(r=t,rt).call(r,n)}}}get max(){return v(this,it)}get maxSize(){return v(this,Je)}get calculatedSize(){return v(this,ht)}get size(){return v(this,ke)}get fetchMethod(){return v(this,Fn)}get memoMethod(){return v(this,Tn)}get dispose(){return v(this,ct)}get onInsert(){return v(this,rn)}get disposeAfter(){return v(this,dt)}getRemainingTTL(t){return v(this,we).has(t)?1/0:0}*entries(){for(let t of Q(this,q,qt).call(this))v(this,re)[t]!==void 0&&v(this,he)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,re)[t])&&(yield[v(this,he)[t],v(this,re)[t]])}*rentries(){for(let t of Q(this,q,Zt).call(this))v(this,re)[t]!==void 0&&v(this,he)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,re)[t])&&(yield[v(this,he)[t],v(this,re)[t]])}*keys(){for(let t of Q(this,q,qt).call(this)){let n=v(this,he)[t];n!==void 0&&!Q(this,q,pe).call(this,v(this,re)[t])&&(yield n)}}*rkeys(){for(let t of Q(this,q,Zt).call(this)){let n=v(this,he)[t];n!==void 0&&!Q(this,q,pe).call(this,v(this,re)[t])&&(yield n)}}*values(){for(let t of Q(this,q,qt).call(this))v(this,re)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,re)[t])&&(yield v(this,re)[t])}*rvalues(){for(let t of Q(this,q,Zt).call(this))v(this,re)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,re)[t])&&(yield v(this,re)[t])}[(Tl=Symbol.iterator,Fl=Symbol.toStringTag,Tl)](){return this.entries()}find(t,n={}){for(let r of Q(this,q,qt).call(this)){let o=v(this,re)[r],u=Q(this,q,pe).call(this,o)?o.__staleWhileFetching:o;if(u!==void 0&&t(u,v(this,he)[r],this))return this.get(v(this,he)[r],n)}}forEach(t,n=this){for(let r of Q(this,q,qt).call(this)){let o=v(this,re)[r],u=Q(this,q,pe).call(this,o)?o.__staleWhileFetching:o;u!==void 0&&t.call(n,u,v(this,he)[r],this)}}rforEach(t,n=this){for(let r of Q(this,q,Zt).call(this)){let o=v(this,re)[r],u=Q(this,q,pe).call(this,o)?o.__staleWhileFetching:o;u!==void 0&&t.call(n,u,v(this,he)[r],this)}}purgeStale(){let t=!1;for(let n of Q(this,q,Zt).call(this,{allowStale:!0}))v(this,rt).call(this,n)&&(Q(this,q,Yt).call(this,v(this,he)[n],"expire"),t=!0);return t}info(t){let n=v(this,we).get(t);if(n===void 0)return;let r=v(this,re)[n],o=Q(this,q,pe).call(this,r)?r.__staleWhileFetching:r;if(o===void 0)return;let u={value:o};if(v(this,tt)&&v(this,gt)){let a=v(this,tt)[n],s=v(this,gt)[n];if(a&&s){let l=a-(v(this,ft).now()-s);u.ttl=l,u.start=Date.now()}}return v(this,mt)&&(u.size=v(this,mt)[n]),u}dump(){let t=[];for(let n of Q(this,q,qt).call(this,{allowStale:!0})){let r=v(this,he)[n],o=v(this,re)[n],u=Q(this,q,pe).call(this,o)?o.__staleWhileFetching:o;if(u===void 0||r===void 0)continue;let a={value:u};if(v(this,tt)&&v(this,gt)){a.ttl=v(this,tt)[n];let s=v(this,ft).now()-v(this,gt)[n];a.start=Math.floor(Date.now()-s)}v(this,mt)&&(a.size=v(this,mt)[n]),t.unshift([r,a])}return t}load(t){this.clear();for(let[n,r]of t){if(r.start){let o=Date.now()-r.start;r.start=v(this,ft).now()-o}this.set(n,r.value,r)}}set(t,n,r={}){var h,m,p,w,y,A,b;if(n===void 0)return this.delete(t),this;let{ttl:o=this.ttl,start:u,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=r,{noUpdateTTL:d=this.noUpdateTTL}=r,f=v(this,Dr).call(this,t,n,r.size||0,s);if(this.maxEntrySize&&f>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),Q(this,q,Yt).call(this,t,"set"),this;let c=v(this,ke)===0?void 0:v(this,we).get(t);if(c===void 0)c=v(this,ke)===0?v(this,Se):v(this,pt).length!==0?v(this,pt).pop():v(this,ke)===v(this,it)?Q(this,q,Bu).call(this,!1):v(this,ke),v(this,he)[c]=t,v(this,re)[c]=n,v(this,we).set(t,c),v(this,$e)[v(this,Se)]=c,v(this,et)[c]=v(this,Se),ne(this,Se,c),Mu(this,ke)._++,v(this,In).call(this,c,f,l),l&&(l.set="add"),d=!1,v(this,Nn)&&((h=v(this,rn))==null||h.call(this,n,t,"add"));else{Q(this,q,Nr).call(this,c);let g=v(this,re)[c];if(n!==g){if(v(this,Gt)&&Q(this,q,pe).call(this,g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:x}=g;x!==void 0&&!a&&(v(this,bt)&&((m=v(this,ct))==null||m.call(this,x,t,"set")),v(this,Ue)&&((p=v(this,De))==null||p.push([x,t,"set"])))}else a||(v(this,bt)&&((w=v(this,ct))==null||w.call(this,g,t,"set")),v(this,Ue)&&((y=v(this,De))==null||y.push([g,t,"set"])));if(v(this,on).call(this,c),v(this,In).call(this,c,f,l),v(this,re)[c]=n,l){l.set="replace";let x=g&&Q(this,q,pe).call(this,g)?g.__staleWhileFetching:g;x!==void 0&&(l.oldValue=x)}}else l&&(l.set="update");v(this,Nn)&&((A=this.onInsert)==null||A.call(this,n,t,n===g?"update":"replace"))}if(o!==0&&!v(this,tt)&&Q(this,q,li).call(this),v(this,tt)&&(d||v(this,Sr).call(this,c,o,u),l&&v(this,It).call(this,l,c)),!a&&v(this,Ue)&&v(this,De)){let g=v(this,De),x;for(;x=g==null?void 0:g.shift();)(b=v(this,dt))==null||b.call(this,...x)}return this}pop(){var t;try{for(;v(this,ke);){let n=v(this,re)[v(this,Re)];if(Q(this,q,Bu).call(this,!0),Q(this,q,pe).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(v(this,Ue)&&v(this,De)){let n=v(this,De),r;for(;r=n==null?void 0:n.shift();)(t=v(this,dt))==null||t.call(this,...r)}}}has(t,n={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:o}=n,u=v(this,we).get(t);if(u!==void 0){let a=v(this,re)[u];if(Q(this,q,pe).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(v(this,rt).call(this,u))o&&(o.has="stale",v(this,It).call(this,o,u));else return r&&v(this,un).call(this,u),o&&(o.has="hit",v(this,It).call(this,o,u)),!0}else o&&(o.has="miss");return!1}peek(t,n={}){let{allowStale:r=this.allowStale}=n,o=v(this,we).get(t);if(o===void 0||!r&&v(this,rt).call(this,o))return;let u=v(this,re)[o];return Q(this,q,pe).call(this,u)?u.__staleWhileFetching:u}async fetch(t,n={}){let{allowStale:r=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:u=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:l=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:w,forceRefresh:y=!1,status:A,signal:b}=n;if(!v(this,Gt))return A&&(A.fetch="get"),this.get(t,{allowStale:r,updateAgeOnGet:o,noDeleteOnStaleGet:u,status:A});let g={allowStale:r,updateAgeOnGet:o,noDeleteOnStaleGet:u,ttl:a,noDisposeOnSet:s,size:l,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:p,ignoreFetchAbort:m,status:A,signal:b},x=v(this,we).get(t);if(x===void 0){A&&(A.fetch="miss");let k=Q(this,q,zu).call(this,t,x,g,w);return k.__returned=k}else{let k=v(this,re)[x];if(Q(this,q,pe).call(this,k)){let X=r&&k.__staleWhileFetching!==void 0;return A&&(A.fetch="inflight",X&&(A.returnedStale=!0)),X?k.__staleWhileFetching:k.__returned=k}let T=v(this,rt).call(this,x);if(!y&&!T)return A&&(A.fetch="hit"),Q(this,q,Nr).call(this,x),o&&v(this,un).call(this,x),A&&v(this,It).call(this,A,x),k;let D=Q(this,q,zu).call(this,t,x,g,w),S=D.__staleWhileFetching!==void 0&&r;return A&&(A.fetch=T?"stale":"refresh",S&&T&&(A.returnedStale=!0)),S?D.__staleWhileFetching:D.__returned=D}}async forceFetch(t,n={}){let r=await this.fetch(t,n);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(t,n={}){let r=v(this,Tn);if(!r)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:u,...a}=n,s=this.get(t,a);if(!u&&s!==void 0)return s;let l=r(t,s,{options:a,context:o});return this.set(t,l,a),l}get(t,n={}){let{allowStale:r=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:u=this.noDeleteOnStaleGet,status:a}=n,s=v(this,we).get(t);if(s!==void 0){let l=v(this,re)[s],d=Q(this,q,pe).call(this,l);return a&&v(this,It).call(this,a,s),v(this,rt).call(this,s)?(a&&(a.get="stale"),d?(a&&r&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?l.__staleWhileFetching:void 0):(u||Q(this,q,Yt).call(this,t,"expire"),a&&r&&(a.returnedStale=!0),r?l:void 0)):(a&&(a.get="hit"),d?l.__staleWhileFetching:(Q(this,q,Nr).call(this,s),o&&v(this,un).call(this,s),l))}else a&&(a.get="miss")}delete(t){return Q(this,q,Yt).call(this,t,"delete")}clear(){return Q(this,q,fi).call(this,"delete")}},it=new WeakMap,Je=new WeakMap,ct=new WeakMap,rn=new WeakMap,dt=new WeakMap,Fn=new WeakMap,Tn=new WeakMap,ft=new WeakMap,ke=new WeakMap,ht=new WeakMap,we=new WeakMap,he=new WeakMap,re=new WeakMap,$e=new WeakMap,et=new WeakMap,Re=new WeakMap,Se=new WeakMap,pt=new WeakMap,De=new WeakMap,mt=new WeakMap,gt=new WeakMap,tt=new WeakMap,nt=new WeakMap,bt=new WeakMap,Gt=new WeakMap,Ue=new WeakMap,Nn=new WeakMap,q=new WeakSet,li=function(){let t=new fu(v(this,it)),n=new fu(v(this,it));ne(this,tt,t),ne(this,gt,n);let r=this.ttlAutopurge?new Array(v(this,it)):void 0;ne(this,nt,r),ne(this,Sr,(s,l,d=v(this,ft).now())=>{n[s]=l!==0?d:0,t[s]=l,o(s,l)}),ne(this,un,s=>{n[s]=t[s]!==0?v(this,ft).now():0,o(s,t[s])});let o=this.ttlAutopurge?(s,l)=>{if(r!=null&&r[s]&&(clearTimeout(r[s]),r[s]=void 0),l&&l!==0&&r){let d=setTimeout(()=>{v(this,rt).call(this,s)&&Q(this,q,Yt).call(this,v(this,he)[s],"expire")},l+1);d.unref&&d.unref(),r[s]=d}}:()=>{};ne(this,It,(s,l)=>{if(t[l]){let d=t[l],f=n[l];if(!d||!f)return;s.ttl=d,s.start=f,s.now=u||a();let c=s.now-f;s.remainingTTL=d-c}});let u=0,a=()=>{let s=v(this,ft).now();if(this.ttlResolution>0){u=s;let l=setTimeout(()=>u=0,this.ttlResolution);l.unref&&l.unref()}return s};this.getRemainingTTL=s=>{let l=v(this,we).get(s);if(l===void 0)return 0;let d=t[l],f=n[l];if(!d||!f)return 1/0;let c=(u||a())-f;return d-c},ne(this,rt,s=>{let l=n[s],d=t[s];return!!d&&!!l&&(u||a())-l>d})},un=new WeakMap,It=new WeakMap,Sr=new WeakMap,rt=new WeakMap,Zl=function(){let t=new fu(v(this,it));ne(this,ht,0),ne(this,mt,t),ne(this,on,n=>{ne(this,ht,v(this,ht)-t[n]),t[n]=0}),ne(this,Dr,(n,r,o,u)=>{if(Q(this,q,pe).call(this,r))return 0;if(!$t(o))if(u){if(typeof u!="function")throw new TypeError("sizeCalculation must be a function");if(o=u(r,n),!$t(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o}),ne(this,In,(n,r,o)=>{if(t[n]=r,v(this,Je)){let u=v(this,Je)-t[n];for(;v(this,ht)>u;)Q(this,q,Bu).call(this,!0)}ne(this,ht,v(this,ht)+t[n]),o&&(o.entrySize=r,o.totalCalculatedSize=v(this,ht))})},on=new WeakMap,In=new WeakMap,Dr=new WeakMap,qt=function*({allowStale:t=this.allowStale}={}){if(v(this,ke))for(let n=v(this,Se);!(!Q(this,q,ci).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,Re)));)n=v(this,et)[n]},Zt=function*({allowStale:t=this.allowStale}={}){if(v(this,ke))for(let n=v(this,Re);!(!Q(this,q,ci).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,Se)));)n=v(this,$e)[n]},ci=function(t){return t!==void 0&&v(this,we).get(v(this,he)[t])===t},Bu=function(t){var u,a,s;let n=v(this,Re),r=v(this,he)[n],o=v(this,re)[n];return v(this,Gt)&&Q(this,q,pe).call(this,o)?o.__abortController.abort(new Error("evicted")):(v(this,bt)||v(this,Ue))&&(v(this,bt)&&((u=v(this,ct))==null||u.call(this,o,r,"evict")),v(this,Ue)&&((a=v(this,De))==null||a.push([o,r,"evict"]))),v(this,on).call(this,n),(s=v(this,nt))!=null&&s[n]&&(clearTimeout(v(this,nt)[n]),v(this,nt)[n]=void 0),t&&(v(this,he)[n]=void 0,v(this,re)[n]=void 0,v(this,pt).push(n)),v(this,ke)===1?(ne(this,Re,ne(this,Se,0)),v(this,pt).length=0):ne(this,Re,v(this,$e)[n]),v(this,we).delete(r),Mu(this,ke)._--,n},zu=function(t,n,r,o){let u=n===void 0?void 0:v(this,re)[n];if(Q(this,q,pe).call(this,u))return u;let a=new du,{signal:s}=r;s==null||s.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});let l={signal:a.signal,options:r,context:o},d=(w,y=!1)=>{let{aborted:A}=a.signal,b=r.ignoreFetchAbort&&w!==void 0,g=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&w!==void 0);if(r.status&&(A&&!y?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,b&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),A&&!b&&!y)return c(a.signal.reason,g);let x=m,k=v(this,re)[n];return(k===m||b&&y&&k===void 0)&&(w===void 0?x.__staleWhileFetching!==void 0?v(this,re)[n]=x.__staleWhileFetching:Q(this,q,Yt).call(this,t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(t,w,l.options))),w},f=w=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=w),c(w,!1)),c=(w,y)=>{let{aborted:A}=a.signal,b=A&&r.allowStaleOnFetchAbort,g=b||r.allowStaleOnFetchRejection,x=g||r.noDeleteOnFetchRejection,k=m;if(v(this,re)[n]===m&&(!x||!y&&k.__staleWhileFetching===void 0?Q(this,q,Yt).call(this,t,"fetch"):b||(v(this,re)[n]=k.__staleWhileFetching)),g)return r.status&&k.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw w},h=(w,y)=>{var b;let A=(b=v(this,Fn))==null?void 0:b.call(this,t,u,l);A&&A instanceof Promise&&A.then(g=>w(g===void 0?void 0:g),y),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(w(void 0),r.allowStaleOnFetchAbort&&(w=g=>d(g,!0)))})};r.status&&(r.status.fetchDispatched=!0);let m=new Promise(h).then(d,f),p=Object.assign(m,{__abortController:a,__staleWhileFetching:u,__returned:void 0});return n===void 0?(this.set(t,p,{...l.options,status:void 0}),n=v(this,we).get(t)):v(this,re)[n]=p,p},pe=function(t){if(!v(this,Gt))return!1;let n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof du},di=function(t,n){v(this,et)[n]=t,v(this,$e)[t]=n},Nr=function(t){t!==v(this,Se)&&(t===v(this,Re)?ne(this,Re,v(this,$e)[t]):Q(this,q,di).call(this,v(this,et)[t],v(this,$e)[t]),Q(this,q,di).call(this,v(this,Se),t),ne(this,Se,t))},Yt=function(t,n){var o,u,a,s,l,d;let r=!1;if(v(this,ke)!==0){let f=v(this,we).get(t);if(f!==void 0)if((o=v(this,nt))!=null&&o[f]&&(clearTimeout((u=v(this,nt))==null?void 0:u[f]),v(this,nt)[f]=void 0),r=!0,v(this,ke)===1)Q(this,q,fi).call(this,n);else{v(this,on).call(this,f);let c=v(this,re)[f];if(Q(this,q,pe).call(this,c)?c.__abortController.abort(new Error("deleted")):(v(this,bt)||v(this,Ue))&&(v(this,bt)&&((a=v(this,ct))==null||a.call(this,c,t,n)),v(this,Ue)&&((s=v(this,De))==null||s.push([c,t,n]))),v(this,we).delete(t),v(this,he)[f]=void 0,v(this,re)[f]=void 0,f===v(this,Se))ne(this,Se,v(this,et)[f]);else if(f===v(this,Re))ne(this,Re,v(this,$e)[f]);else{let h=v(this,et)[f];v(this,$e)[h]=v(this,$e)[f];let m=v(this,$e)[f];v(this,et)[m]=v(this,et)[f]}Mu(this,ke)._--,v(this,pt).push(f)}}if(v(this,Ue)&&((l=v(this,De))!=null&&l.length)){let f=v(this,De),c;for(;c=f==null?void 0:f.shift();)(d=v(this,dt))==null||d.call(this,...c)}return r},fi=function(t){var n,r,o,u;for(let a of Q(this,q,Zt).call(this,{allowStale:!0})){let s=v(this,re)[a];if(Q(this,q,pe).call(this,s))s.__abortController.abort(new Error("deleted"));else{let l=v(this,he)[a];v(this,bt)&&((n=v(this,ct))==null||n.call(this,s,l,t)),v(this,Ue)&&((r=v(this,De))==null||r.push([s,l,t]))}}if(v(this,we).clear(),v(this,re).fill(void 0),v(this,he).fill(void 0),v(this,tt)&&v(this,gt)){v(this,tt).fill(0),v(this,gt).fill(0);for(let a of v(this,nt)??[])a!==void 0&&clearTimeout(a);(o=v(this,nt))==null||o.fill(void 0)}if(v(this,mt)&&v(this,mt).fill(0),ne(this,Re,0),ne(this,Se,0),v(this,pt).length=0,ne(this,ht,0),ne(this,ke,0),v(this,Ue)&&v(this,De)){let a=v(this,De),s;for(;s=a==null?void 0:a.shift();)(u=v(this,dt))==null||u.call(this,...s)}},On);/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var Jt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hu=function(t){return t.tagName==="IMG"},Op=function(t){return NodeList.prototype.isPrototypeOf(t)},pu=function(t){return t&&t.nodeType===1},Cs=function(t){var n=t.currentSrc||t.src;return n.substr(-4).toLowerCase()===".svg"},_s=function(t){try{return Array.isArray(t)?t.filter(hu):Op(t)?[].slice.call(t).filter(hu):pu(t)?[t].filter(hu):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(hu):[]}catch{throw new TypeError(`The provided selector is invalid.
|
|
34
34
|
Expects a CSS selector, a Node element, a NodeList or an array.
|
|
35
|
-
See: https://github.com/francoischalifour/medium-zoom`)}},Dm=function(t){var n=document.createElement("div");return n.classList.add("medium-zoom-overlay"),n.style.background=t,n},Tm=function(t){var n=t.getBoundingClientRect(),u=n.top,o=n.left,r=n.width,a=n.height,s=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,d=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return s.removeAttribute("id"),s.style.position="absolute",s.style.top=u+l+"px",s.style.left=o+d+"px",s.style.width=r+"px",s.style.height=a+"px",s.style.transform="",s},kn=function(t,n){var u=Jt({bubbles:!1,cancelable:!1,detail:void 0},n);if(typeof window.CustomEvent=="function")return new CustomEvent(t,u);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,u.bubbles,u.cancelable,u.detail),o},Fm=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=window.Promise||function(I){function C(){}I(C,C)},o=function(I){var C=I.target;if(C===U){m();return}g.indexOf(C)!==-1&&w({target:C})},r=function(){if(!(k||!D.original)){var I=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(F-I)>T.scrollOffset&&setTimeout(m,150)}},a=function(I){var C=I.key||I.keyCode;(C==="Escape"||C==="Esc"||C===27)&&m()},s=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=I;if(I.background&&(U.style.background=I.background),I.container&&I.container instanceof Object&&(C.container=Jt({},T.container,I.container)),I.template){var P=mu(I.template)?I.template:document.querySelector(I.template);C.template=P}return T=Jt({},T,C),g.forEach(function(V){V.dispatchEvent(kn("medium-zoom:update",{detail:{zoom:_}}))}),_},l=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(Jt({},T,I))},d=function(){for(var I=arguments.length,C=Array(I),P=0;P<I;P++)C[P]=arguments[P];var V=C.reduce(function(E,R){return[].concat(E,As(R))},[]);return V.filter(function(E){return g.indexOf(E)===-1}).forEach(function(E){g.push(E),E.classList.add("medium-zoom-image")}),x.forEach(function(E){var R=E.type,M=E.listener,$=E.options;V.forEach(function(re){re.addEventListener(R,M,$)})}),_},f=function(){for(var I=arguments.length,C=Array(I),P=0;P<I;P++)C[P]=arguments[P];D.zoomed&&m();var V=C.length>0?C.reduce(function(E,R){return[].concat(E,As(R))},[]):g;return V.forEach(function(E){E.classList.remove("medium-zoom-image"),E.dispatchEvent(kn("medium-zoom:detach",{detail:{zoom:_}}))}),g=g.filter(function(E){return V.indexOf(E)===-1}),_},c=function(I,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(V){V.addEventListener("medium-zoom:"+I,C,P)}),x.push({type:"medium-zoom:"+I,listener:C,options:P}),_},h=function(I,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(V){V.removeEventListener("medium-zoom:"+I,C,P)}),x=x.filter(function(V){return!(V.type==="medium-zoom:"+I&&V.listener.toString()===C.toString())}),_},p=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=I.target,P=function(){var E={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},R=void 0,M=void 0;if(T.container)if(T.container instanceof Object)E=Jt({},E,T.container),R=E.width-E.left-E.right-T.margin*2,M=E.height-E.top-E.bottom-T.margin*2;else{var $=mu(T.container)?T.container:document.querySelector(T.container),re=$.getBoundingClientRect(),te=re.width,z=re.height,j=re.left,L=re.top;E=Jt({},E,{width:te,height:z,left:j,top:L})}R=R||E.width-T.margin*2,M=M||E.height-T.margin*2;var B=D.zoomedHd||D.original,W=vs(B)?R:B.naturalWidth||R,K=vs(B)?M:B.naturalHeight||M,Z=B.getBoundingClientRect(),Y=Z.top,ue=Z.left,le=Z.width,Te=Z.height,Fe=Math.min(Math.max(le,W),R)/le,yt=Math.min(Math.max(Te,K),M)/Te,Me=Math.min(Fe,yt),On=(-ue+(R-le)/2+T.margin+E.left)/Me,Xt=(-Y+(M-Te)/2+T.margin+E.top)/Me,Ot="scale("+Me+") translate3d("+On+"px, "+Xt+"px, 0)";D.zoomed.style.transform=Ot,D.zoomedHd&&(D.zoomedHd.style.transform=Ot)};return new u(function(V){if(C&&g.indexOf(C)===-1){V(_);return}var E=function te(){k=!1,D.zoomed.removeEventListener("transitionend",te),D.original.dispatchEvent(kn("medium-zoom:opened",{detail:{zoom:_}})),V(_)};if(D.zoomed){V(_);return}if(C)D.original=C;else if(g.length>0){var R=g;D.original=R[0]}else{V(_);return}if(D.original.dispatchEvent(kn("medium-zoom:open",{detail:{zoom:_}})),F=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,k=!0,D.zoomed=Tm(D.original),document.body.appendChild(U),T.template){var M=mu(T.template)?T.template:document.querySelector(T.template);D.template=document.createElement("div"),D.template.appendChild(M.content.cloneNode(!0)),document.body.appendChild(D.template)}if(D.original.parentElement&&D.original.parentElement.tagName==="PICTURE"&&D.original.currentSrc&&(D.zoomed.src=D.original.currentSrc),document.body.appendChild(D.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),D.original.classList.add("medium-zoom-image--hidden"),D.zoomed.classList.add("medium-zoom-image--opened"),D.zoomed.addEventListener("click",m),D.zoomed.addEventListener("transitionend",E),D.original.getAttribute("data-zoom-src")){D.zoomedHd=D.zoomed.cloneNode(),D.zoomedHd.removeAttribute("srcset"),D.zoomedHd.removeAttribute("sizes"),D.zoomedHd.removeAttribute("loading"),D.zoomedHd.src=D.zoomed.getAttribute("data-zoom-src"),D.zoomedHd.onerror=function(){clearInterval($),console.warn("Unable to reach the zoom image target "+D.zoomedHd.src),D.zoomedHd=null,P()};var $=setInterval(function(){D.zoomedHd.complete&&(clearInterval($),D.zoomedHd.classList.add("medium-zoom-image--opened"),D.zoomedHd.addEventListener("click",m),document.body.appendChild(D.zoomedHd),P())},10)}else if(D.original.hasAttribute("srcset")){D.zoomedHd=D.zoomed.cloneNode(),D.zoomedHd.removeAttribute("sizes"),D.zoomedHd.removeAttribute("loading");var re=D.zoomedHd.addEventListener("load",function(){D.zoomedHd.removeEventListener("load",re),D.zoomedHd.classList.add("medium-zoom-image--opened"),D.zoomedHd.addEventListener("click",m),document.body.appendChild(D.zoomedHd),P()})}else P()})},m=function(){return new u(function(I){if(k||!D.original){I(_);return}var C=function P(){D.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(D.zoomed),D.zoomedHd&&document.body.removeChild(D.zoomedHd),document.body.removeChild(U),D.zoomed.classList.remove("medium-zoom-image--opened"),D.template&&document.body.removeChild(D.template),k=!1,D.zoomed.removeEventListener("transitionend",P),D.original.dispatchEvent(kn("medium-zoom:closed",{detail:{zoom:_}})),D.original=null,D.zoomed=null,D.zoomedHd=null,D.template=null,I(_)};k=!0,document.body.classList.remove("medium-zoom--opened"),D.zoomed.style.transform="",D.zoomedHd&&(D.zoomedHd.style.transform=""),D.template&&(D.template.style.transition="opacity 150ms",D.template.style.opacity=0),D.original.dispatchEvent(kn("medium-zoom:close",{detail:{zoom:_}})),D.zoomed.addEventListener("transitionend",C)})},w=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=I.target;return D.original?m():p({target:C})},y=function(){return T},A=function(){return g},b=function(){return D.original},g=[],x=[],k=!1,F=0,T=n,D={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?T=t:(t||typeof t=="string")&&d(t),T=Jt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},T);var U=Dm(T.background);document.addEventListener("click",o),document.addEventListener("keyup",a),document.addEventListener("scroll",r),window.addEventListener("resize",m);var _={open:p,close:m,toggle:w,update:s,clone:l,attach:d,detach:f,on:c,off:h,getOptions:y,getImages:A,getZoomedImage:b};return _};function Nm(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var u=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&u.firstChild?u.insertBefore(o,u.firstChild):u.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var Im=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Nm(Im);const Ut={hljs:`${X}-hljs`,hlcss:`${X}-hlCss`,mermaidM:`${X}-mermaid-m`,mermaid:`${X}-mermaid`,katexjs:`${X}-katex`,katexcss:`${X}-katexCss`,echarts:`${X}-echarts`},Om=(e,{editorId:t,rootRef:n,setting:u})=>{const o=lt.editorExtensions.highlight,r=lt.editorExtensionsAttrs.highlight;i.provide("editorId",t),i.provide("rootRef",n),i.provide("theme",i.computed(()=>e.theme)),i.provide("language",i.computed(()=>e.language)),i.provide("highlight",i.computed(()=>{const{js:s}=o,l={...Lo,...o.css},{js:d,css:f={}}=r||{},c=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,h=l[e.codeTheme]?l[e.codeTheme][c]:Lo.atom[c],p=l[e.codeTheme]&&f[e.codeTheme]?f[e.codeTheme][c]:f.atom?f.atom[c]:{};return{js:{src:s,...d},css:{href:h,...p}}})),i.provide("showCodeRowNumber",e.showCodeRowNumber);const a=i.computed(()=>{const s={...ds,...lt.editorConfig.languageUserDefined};return Io(ar(ds["en-US"]),s[e.language]||{})});return i.provide("usedLanguageText",a),i.provide("previewTheme",i.computed(()=>e.previewTheme)),i.provide("customIcon",i.computed(()=>e.customIcon)),i.provide("setting",i.computed(()=>u?{...u}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},Lm=e=>{const t=i.useId();return e.id||e.editorId||`${X}-${t}`},Pm=(e,t,n)=>{const u=i.inject("editorId"),o=i.inject("rootRef"),r=i.inject("usedLanguageText"),a=i.inject("setting"),s=()=>{o.value.querySelectorAll(`#${u} .${X}-preview .${X}-code`).forEach(f=>{let c=-1;const h=f.querySelector(`.${X}-copy-button:not([data-processed])`);h&&(h.onclick=p=>{p.preventDefault(),clearTimeout(c);const m=(f.querySelector("input:checked + pre code")||f.querySelector("pre code")).textContent,{text:w,successTips:y,failTips:A}=r.value.copyCode;let b=y;hs(e.formatCopiedText(m||"")).catch(()=>{b=A}).finally(()=>{h.dataset.isIcon?h.dataset.tips=b:h.innerHTML=b,c=window.setTimeout(()=>{h.dataset.isIcon?h.dataset.tips=w:h.innerHTML=w},1500)})},h.setAttribute("data-processed","true"))})},l=()=>{i.nextTick(s)},d=f=>{f&&i.nextTick(s)};i.watch([t,n],l),i.watch(()=>a.value.preview,d),i.watch(()=>a.value.htmlPreview,d),i.onMounted(s)},Vm=e=>{const t=i.inject("editorId"),n=i.inject("theme"),u=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:r}=lt;let a=o.echarts.instance;const s=i.shallowRef(-1),l=()=>{!e.noEcharts&&a&&(s.value=s.value+1)};i.watch(()=>n.value,()=>{l()}),i.onMounted(()=>{var w;if(e.noEcharts||a)return;const m=o.echarts.js;Ht("script",{...(w=r.echarts)==null?void 0:w.js,src:m,id:Ut.echarts,onload(){a=window.echarts,l()}},"echarts")});let d=[],f=[],c=[];const h=(m=!1)=>{if(!d.length){m&&(f.forEach(b=>{var g;(g=b.dispose)==null||g.call(b)}),c.forEach(b=>{var g;(g=b.disconnect)==null||g.call(b)}),f=[],c=[]);return}const w=[],y=[],A=[];d.forEach((b,g)=>{var F,T;const x=f[g],k=c[g];if(m||!b||!b.isConnected||u!=null&&u.value&&!u.value.contains(b)){(F=x==null?void 0:x.dispose)==null||F.call(x),(T=k==null?void 0:k.disconnect)==null||T.call(k);return}w.push(b),x&&y.push(x),k&&A.push(k)}),d=w,f=y,c=A},p=()=>{h(),!e.noEcharts&&a&&Array.from(u.value.querySelectorAll(`#${t} div.${X}-echarts:not([data-processed])`)).forEach(m=>{if(m.dataset.closed==="false")return!1;try{const w=new Function(`return ${m.innerText}`)(),y=a.init(m,n.value);y.setOption(w),m.setAttribute("data-processed",""),d.push(m),f.push(y);const A=new ResizeObserver(()=>{y.resize()});A.observe(m),c.push(A)}catch(w){ot.emit(t,Po,{name:"echarts",message:w==null?void 0:w.message,error:w})}})};return i.onBeforeUnmount(()=>{h(!0)}),{reRenderEcharts:s,replaceEcharts:p}},Rm=e=>{const t=i.inject("highlight"),n=i.shallowRef(lt.editorExtensions.highlight.instance);return i.onMounted(()=>{e.noHighlight||n.value||(Ht("link",{...t.value.css,rel:"stylesheet",id:Ut.hlcss}),Ht("script",{...t.value.js,id:Ut.hljs,onload(){n.value=window.hljs}},"hljs"))}),i.watch(()=>t.value.css,()=>{e.noHighlight||lt.editorExtensions.highlight.instance||dm("link",{...t.value.css,rel:"stylesheet",id:Ut.hlcss})}),n},Mm=e=>{const t=i.shallowRef(lt.editorExtensions.katex.instance);return i.onMounted(()=>{var o,r;if(e.noKatex||t.value)return;const{editorExtensions:n,editorExtensionsAttrs:u}=lt;Ht("script",{...(o=u.katex)==null?void 0:o.js,src:n.katex.js,id:Ut.katexjs,onload(){t.value=window.katex}},"katex"),Ht("link",{...(r=u.katex)==null?void 0:r.css,rel:"stylesheet",href:n.katex.css,id:Ut.katexcss})}),t},pu=new Em({max:1e3,ttl:6e5}),Bm=e=>{const t=i.inject("editorId"),n=i.inject("theme"),u=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:r,mermaidConfig:a}=lt;let s=o.mermaid.instance;const l=i.shallowRef(-1),d=()=>{if(!e.noMermaid&&s){const f=n.value==="dark"?{startOnLoad:!1,theme:"dark"}:{startOnLoad:!1,theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}};s.initialize(a(f)),l.value=l.value+1}};return i.watch(()=>n.value,()=>{pu.clear(),d()}),i.onMounted(()=>{var c,h;if(e.noMermaid||s)return;const f=o.mermaid.js;/\.mjs/.test(f)?(Ht("link",{...(c=r.mermaid)==null?void 0:c.js,rel:"modulepreload",href:f,id:Ut.mermaidM}),import(f).then(p=>{s=p.default,d()}).catch(p=>{ot.emit(t,Po,{name:"mermaid",message:`Failed to load mermaid module: ${p.message}`,error:p})})):Ht("script",{...(h=r.mermaid)==null?void 0:h.js,src:f,id:Ut.mermaid,onload(){s=window.mermaid,d()}},"mermaid")}),{reRenderRef:l,replaceMermaid:async()=>{if(!e.noMermaid&&s){const f=u.value.querySelectorAll(`div.${X}-mermaid`),c=document.createElement("div"),h=document.body.offsetWidth>1366?document.body.offsetWidth:1366,p=document.body.offsetHeight>768?document.body.offsetHeight:768;c.style.width=h+"px",c.style.height=p+"px",c.style.position="fixed",c.style.zIndex="-10000",c.style.top="-10000";let m=f.length;m>0&&document.body.appendChild(c),await Promise.allSettled(Array.from(f).map(w=>(async y=>{var g;if(y.dataset.closed==="false")return!1;const A=y.innerText;let b=pu.get(A);if(!b){const x=No();let k={svg:""};try{k=await s.render(x,A,c),b=await e.sanitizeMermaid(k.svg);const F=document.createElement("p");F.className=`${X}-mermaid`,F.setAttribute("data-processed",""),F.setAttribute("data-content",A),F.innerHTML=b,(g=F.children[0])==null||g.removeAttribute("height"),pu.set(A,F.innerHTML),y.dataset.line!==void 0&&(F.dataset.line=y.dataset.line),y.replaceWith(F)}catch(F){ot.emit(t,Po,{name:"mermaid",message:F.message,error:F})}--m===0&&c.remove()}})(w)))}}}},zm=(e,t)=>{t=t||{};const n=3,u=t.marker||"!",o=u.charCodeAt(0),r=u.length;let a="",s="";const l=(f,c,h,p,m)=>{const w=f[c];return w.type==="admonition_open"?f[c].attrPush(["class",`${X}-admonition ${X}-admonition-${w.info}`]):w.type==="admonition_title_open"&&f[c].attrPush(["class",`${X}-admonition-title`]),m.renderToken(f,c,h)},d=f=>{const c=f.trim().split(" ",2);s="",a=c[0],c.length>1&&(s=f.substring(a.length+2))};e.block.ruler.before("code","admonition",(f,c,h,p)=>{let m,w,y,A=!1,b=f.bMarks[c]+f.tShift[c],g=f.eMarks[c];if(o!==f.src.charCodeAt(b))return!1;for(m=b+1;m<=g&&u[(m-b)%r]===f.src[m];m++);const x=Math.floor((m-b)/r);if(x!==n)return!1;m-=(m-b)%r;const k=f.src.slice(b,m),F=f.src.slice(m,g);if(d(F),p)return!0;for(w=c;w++,!(w>=h||(b=f.bMarks[w]+f.tShift[w],g=f.eMarks[w],b<g&&f.sCount[w]<f.blkIndent));)if(o===f.src.charCodeAt(b)&&!(f.sCount[w]-f.blkIndent>=4)){for(m=b+1;m<=g&&u[(m-b)%r]===f.src[m];m++);if(!(Math.floor((m-b)/r)<x)&&(m-=(m-b)%r,m=f.skipSpaces(m),!(m<g))){A=!0;break}}const T=f.parentType,D=f.lineMax;return f.parentType="root",f.lineMax=w,y=f.push("admonition_open","div",1),y.markup=k,y.block=!0,y.info=a,y.map=[c,w],s&&(y=f.push("admonition_title_open","p",1),y.markup=k+" "+a,y.map=[c,w],y=f.push("inline","",0),y.content=s,y.map=[c,f.line-1],y.children=[],y=f.push("admonition_title_close","p",-1),y.markup=k+" "+a),f.md.block.tokenize(f,c+1,w),y=f.push("admonition_close","div",-1),y.markup=f.src.slice(b,m),y.block=!0,f.parentType=T,f.lineMax=D,f.line=w+(A?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=l,e.renderer.rules.admonition_title_open=l,e.renderer.rules.admonition_title_close=l,e.renderer.rules.admonition_close=l},Mo=(e,t)=>{const n=e.attrs?e.attrs.slice():[];return t.forEach(u=>{const o=e.attrIndex(u[0]);o<0?n.push(u):(n[o]=n[o].slice(),n[o][1]+=` ${u[1]}`)}),n},jm=(e,t)=>{const n=e.renderer.rules.fence,u=e.utils.unescapeAll,o=/\[(\w*)(?::([\w ]*))?\]/,r=/::(open|close)/,a=c=>c.info?u(c.info).trim():"",s=c=>{const h=a(c),[p=null,m=""]=(o.exec(h)||[]).slice(1);return[p,m]},l=c=>{const h=a(c);return h?h.split(/(\s+)/g)[0]:""},d=c=>{const h=c.info.match(r)||[],p=h[1]==="open"||h[1]!=="close"&&t.codeFoldable&&c.content.trim().split(`
|
|
36
|
-
`).length<t.autoFoldThreshold,
|
|
37
|
-
<${
|
|
38
|
-
<${
|
|
39
|
-
<div class="${
|
|
40
|
-
<div class="${
|
|
41
|
-
<span class="${
|
|
42
|
-
<span class="${
|
|
35
|
+
See: https://github.com/francoischalifour/medium-zoom`)}},Lp=function(t){var n=document.createElement("div");return n.classList.add("medium-zoom-overlay"),n.style.background=t,n},Vp=function(t){var n=t.getBoundingClientRect(),r=n.top,o=n.left,u=n.width,a=n.height,s=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,d=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return s.removeAttribute("id"),s.style.position="absolute",s.style.top=r+l+"px",s.style.left=o+d+"px",s.style.width=u+"px",s.style.height=a+"px",s.style.transform="",s},kn=function(t,n){var r=Jt({bubbles:!1,cancelable:!1,detail:void 0},n);if(typeof window.CustomEvent=="function")return new CustomEvent(t,r);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),o},Pp=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=window.Promise||function(j){function I(){}j(I,I)},o=function(j){var I=j.target;if(I===X){p();return}g.indexOf(I)!==-1&&w({target:I})},u=function(){if(!(k||!S.original)){var j=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(T-j)>D.scrollOffset&&setTimeout(p,150)}},a=function(j){var I=j.key||j.keyCode;(I==="Escape"||I==="Esc"||I===27)&&p()},s=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=j;if(j.background&&(X.style.background=j.background),j.container&&j.container instanceof Object&&(I.container=Jt({},D.container,j.container)),j.template){var W=pu(j.template)?j.template:document.querySelector(j.template);I.template=W}return D=Jt({},D,I),g.forEach(function(_){_.dispatchEvent(kn("medium-zoom:update",{detail:{zoom:z}}))}),z},l=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(Jt({},D,j))},d=function(){for(var j=arguments.length,I=Array(j),W=0;W<j;W++)I[W]=arguments[W];var _=I.reduce(function(C,N){return[].concat(C,_s(N))},[]);return _.filter(function(C){return g.indexOf(C)===-1}).forEach(function(C){g.push(C),C.classList.add("medium-zoom-image")}),x.forEach(function(C){var N=C.type,F=C.listener,O=C.options;_.forEach(function(H){H.addEventListener(N,F,O)})}),z},f=function(){for(var j=arguments.length,I=Array(j),W=0;W<j;W++)I[W]=arguments[W];S.zoomed&&p();var _=I.length>0?I.reduce(function(C,N){return[].concat(C,_s(N))},[]):g;return _.forEach(function(C){C.classList.remove("medium-zoom-image"),C.dispatchEvent(kn("medium-zoom:detach",{detail:{zoom:z}}))}),g=g.filter(function(C){return _.indexOf(C)===-1}),z},c=function(j,I){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(_){_.addEventListener("medium-zoom:"+j,I,W)}),x.push({type:"medium-zoom:"+j,listener:I,options:W}),z},h=function(j,I){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(_){_.removeEventListener("medium-zoom:"+j,I,W)}),x=x.filter(function(_){return!(_.type==="medium-zoom:"+j&&_.listener.toString()===I.toString())}),z},m=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=j.target,W=function(){var C={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},N=void 0,F=void 0;if(D.container)if(D.container instanceof Object)C=Jt({},C,D.container),N=C.width-C.left-C.right-D.margin*2,F=C.height-C.top-C.bottom-D.margin*2;else{var O=pu(D.container)?D.container:document.querySelector(D.container),H=O.getBoundingClientRect(),$=H.width,R=H.height,V=H.left,L=H.top;C=Jt({},C,{width:$,height:R,left:V,top:L})}N=N||C.width-D.margin*2,F=F||C.height-D.margin*2;var M=S.zoomedHd||S.original,G=Cs(M)?N:M.naturalWidth||N,J=Cs(M)?F:M.naturalHeight||F,Z=M.getBoundingClientRect(),K=Z.top,ue=Z.left,le=Z.width,Fe=Z.height,Te=Math.min(Math.max(le,G),N)/le,yt=Math.min(Math.max(Fe,J),F)/Fe,Me=Math.min(Te,yt),Ln=(-ue+(N-le)/2+D.margin+C.left)/Me,Xt=(-K+(F-Fe)/2+D.margin+C.top)/Me,Ot="scale("+Me+") translate3d("+Ln+"px, "+Xt+"px, 0)";S.zoomed.style.transform=Ot,S.zoomedHd&&(S.zoomedHd.style.transform=Ot)};return new r(function(_){if(I&&g.indexOf(I)===-1){_(z);return}var C=function $(){k=!1,S.zoomed.removeEventListener("transitionend",$),S.original.dispatchEvent(kn("medium-zoom:opened",{detail:{zoom:z}})),_(z)};if(S.zoomed){_(z);return}if(I)S.original=I;else if(g.length>0){var N=g;S.original=N[0]}else{_(z);return}if(S.original.dispatchEvent(kn("medium-zoom:open",{detail:{zoom:z}})),T=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,k=!0,S.zoomed=Vp(S.original),document.body.appendChild(X),D.template){var F=pu(D.template)?D.template:document.querySelector(D.template);S.template=document.createElement("div"),S.template.appendChild(F.content.cloneNode(!0)),document.body.appendChild(S.template)}if(S.original.parentElement&&S.original.parentElement.tagName==="PICTURE"&&S.original.currentSrc&&(S.zoomed.src=S.original.currentSrc),document.body.appendChild(S.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),S.original.classList.add("medium-zoom-image--hidden"),S.zoomed.classList.add("medium-zoom-image--opened"),S.zoomed.addEventListener("click",p),S.zoomed.addEventListener("transitionend",C),S.original.getAttribute("data-zoom-src")){S.zoomedHd=S.zoomed.cloneNode(),S.zoomedHd.removeAttribute("srcset"),S.zoomedHd.removeAttribute("sizes"),S.zoomedHd.removeAttribute("loading"),S.zoomedHd.src=S.zoomed.getAttribute("data-zoom-src"),S.zoomedHd.onerror=function(){clearInterval(O),console.warn("Unable to reach the zoom image target "+S.zoomedHd.src),S.zoomedHd=null,W()};var O=setInterval(function(){S.zoomedHd.complete&&(clearInterval(O),S.zoomedHd.classList.add("medium-zoom-image--opened"),S.zoomedHd.addEventListener("click",p),document.body.appendChild(S.zoomedHd),W())},10)}else if(S.original.hasAttribute("srcset")){S.zoomedHd=S.zoomed.cloneNode(),S.zoomedHd.removeAttribute("sizes"),S.zoomedHd.removeAttribute("loading");var H=S.zoomedHd.addEventListener("load",function(){S.zoomedHd.removeEventListener("load",H),S.zoomedHd.classList.add("medium-zoom-image--opened"),S.zoomedHd.addEventListener("click",p),document.body.appendChild(S.zoomedHd),W()})}else W()})},p=function(){return new r(function(j){if(k||!S.original){j(z);return}var I=function W(){S.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(S.zoomed),S.zoomedHd&&document.body.removeChild(S.zoomedHd),document.body.removeChild(X),S.zoomed.classList.remove("medium-zoom-image--opened"),S.template&&document.body.removeChild(S.template),k=!1,S.zoomed.removeEventListener("transitionend",W),S.original.dispatchEvent(kn("medium-zoom:closed",{detail:{zoom:z}})),S.original=null,S.zoomed=null,S.zoomedHd=null,S.template=null,j(z)};k=!0,document.body.classList.remove("medium-zoom--opened"),S.zoomed.style.transform="",S.zoomedHd&&(S.zoomedHd.style.transform=""),S.template&&(S.template.style.transition="opacity 150ms",S.template.style.opacity=0),S.original.dispatchEvent(kn("medium-zoom:close",{detail:{zoom:z}})),S.zoomed.addEventListener("transitionend",I)})},w=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=j.target;return S.original?p():m({target:I})},y=function(){return D},A=function(){return g},b=function(){return S.original},g=[],x=[],k=!1,T=0,D=n,S={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?D=t:(t||typeof t=="string")&&d(t),D=Jt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},D);var X=Lp(D.background);document.addEventListener("click",o),document.addEventListener("keyup",a),document.addEventListener("scroll",u),window.addEventListener("resize",p);var z={open:m,close:p,toggle:w,update:s,clone:l,attach:d,detach:f,on:c,off:h,getOptions:y,getImages:A,getZoomedImage:b};return z};function Rp(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var Mp=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Rp(Mp);const Ut={hljs:`${Y}-hljs`,hlcss:`${Y}-hlCss`,mermaidM:`${Y}-mermaid-m`,mermaid:`${Y}-mermaid`,katexjs:`${Y}-katex`,katexcss:`${Y}-katexCss`,echarts:`${Y}-echarts`},Bp=(e,{editorId:t,rootRef:n,setting:r})=>{const o=lt.editorExtensions.highlight,u=lt.editorExtensionsAttrs.highlight;i.provide("editorId",t),i.provide("rootRef",n),i.provide("theme",i.computed(()=>e.theme)),i.provide("language",i.computed(()=>e.language)),i.provide("highlight",i.computed(()=>{const{js:s}=o,l={...Vo,...o.css},{js:d,css:f={}}=u||{},c=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,h=l[e.codeTheme]?l[e.codeTheme][c]:Vo.atom[c],m=l[e.codeTheme]&&f[e.codeTheme]?f[e.codeTheme][c]:f.atom?f.atom[c]:{};return{js:{src:s,...d},css:{href:h,...m}}})),i.provide("showCodeRowNumber",e.showCodeRowNumber);const a=i.computed(()=>{const s={...ps,...lt.editorConfig.languageUserDefined};return Oo(sr(ps["en-US"]),s[e.language]||{})});return i.provide("usedLanguageText",a),i.provide("previewTheme",i.computed(()=>e.previewTheme)),i.provide("customIcon",i.computed(()=>e.customIcon)),i.provide("setting",i.computed(()=>r?{...r}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},zp=e=>{const t=i.useId();return e.id||e.editorId||`${Y}-${t}`},jp=(e,t,n)=>{const r=i.inject("editorId"),o=i.inject("rootRef"),u=i.inject("usedLanguageText"),a=i.inject("setting"),s=()=>{o.value.querySelectorAll(`#${r} .${Y}-preview .${Y}-code`).forEach(f=>{let c=-1;const h=f.querySelector(`.${Y}-copy-button:not([data-processed])`);h&&(h.onclick=m=>{m.preventDefault(),clearTimeout(c);const p=(f.querySelector("input:checked + pre code")||f.querySelector("pre code")).textContent,{text:w,successTips:y,failTips:A}=u.value.copyCode;let b=y;gs(e.formatCopiedText(p||"")).catch(()=>{b=A}).finally(()=>{h.dataset.isIcon?h.dataset.tips=b:h.innerHTML=b,c=window.setTimeout(()=>{h.dataset.isIcon?h.dataset.tips=w:h.innerHTML=w},1500)})},h.setAttribute("data-processed","true"))})},l=()=>{i.nextTick(s)},d=f=>{f&&i.nextTick(s)};i.watch([t,n],l),i.watch(()=>a.value.preview,d),i.watch(()=>a.value.htmlPreview,d),i.onMounted(s)},Hp=e=>{const t=i.inject("editorId"),n=i.inject("theme"),r=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:u}=lt;let a=o.echarts.instance;const s=i.shallowRef(-1),l=()=>{!e.noEcharts&&a&&(s.value=s.value+1)};i.watch(()=>n.value,()=>{l()}),i.onMounted(()=>{var w;if(e.noEcharts||a)return;const p=o.echarts.js;Ht("script",{...(w=u.echarts)==null?void 0:w.js,src:p,id:Ut.echarts,onload(){a=window.echarts,l()}},"echarts")});let d=[],f=[],c=[];const h=(p=!1)=>{if(!d.length){p&&(f.forEach(b=>{var g;(g=b.dispose)==null||g.call(b)}),c.forEach(b=>{var g;(g=b.disconnect)==null||g.call(b)}),f=[],c=[]);return}const w=[],y=[],A=[];d.forEach((b,g)=>{var T,D;const x=f[g],k=c[g];if(p||!b||!b.isConnected||r!=null&&r.value&&!r.value.contains(b)){(T=x==null?void 0:x.dispose)==null||T.call(x),(D=k==null?void 0:k.disconnect)==null||D.call(k);return}w.push(b),x&&y.push(x),k&&A.push(k)}),d=w,f=y,c=A},m=()=>{h(),!e.noEcharts&&a&&Array.from(r.value.querySelectorAll(`#${t} div.${Y}-echarts:not([data-processed])`)).forEach(p=>{if(p.dataset.closed==="false")return!1;try{const w=new Function(`return ${p.innerText}`)(),y=a.init(p,n.value);y.setOption(w),p.setAttribute("data-processed",""),d.push(p),f.push(y);const A=new ResizeObserver(()=>{y.resize()});A.observe(p),c.push(A)}catch(w){ot.emit(t,Po,{name:"echarts",message:w==null?void 0:w.message,error:w})}})};return i.onBeforeUnmount(()=>{h(!0)}),{reRenderEcharts:s,replaceEcharts:m}},$p=e=>{const t=i.inject("highlight"),n=i.shallowRef(lt.editorExtensions.highlight.instance);return i.onMounted(()=>{e.noHighlight||n.value||(Ht("link",{...t.value.css,rel:"stylesheet",id:Ut.hlcss}),Ht("script",{...t.value.js,id:Ut.hljs,onload(){n.value=window.hljs}},"hljs"))}),i.watch(()=>t.value.css,()=>{e.noHighlight||lt.editorExtensions.highlight.instance||bp("link",{...t.value.css,rel:"stylesheet",id:Ut.hlcss})}),n},Up=e=>{const t=i.shallowRef(lt.editorExtensions.katex.instance);return i.onMounted(()=>{var o,u;if(e.noKatex||t.value)return;const{editorExtensions:n,editorExtensionsAttrs:r}=lt;Ht("script",{...(o=r.katex)==null?void 0:o.js,src:n.katex.js,id:Ut.katexjs,onload(){t.value=window.katex}},"katex"),Ht("link",{...(u=r.katex)==null?void 0:u.css,rel:"stylesheet",href:n.katex.css,id:Ut.katexcss})}),t},mu=new Ip({max:1e3,ttl:6e5}),Wp=e=>{const t=i.inject("editorId"),n=i.inject("theme"),r=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:u,mermaidConfig:a}=lt;let s=o.mermaid.instance;const l=i.shallowRef(-1),d=()=>{if(!e.noMermaid&&s){const f=n.value==="dark"?{startOnLoad:!1,theme:"dark"}:{startOnLoad:!1,theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}};s.initialize(a(f)),l.value=l.value+1}};return i.watch(()=>n.value,()=>{mu.clear(),d()}),i.onMounted(()=>{var c,h;if(e.noMermaid||s)return;const f=o.mermaid.js;/\.mjs/.test(f)?(Ht("link",{...(c=u.mermaid)==null?void 0:c.js,rel:"modulepreload",href:f,id:Ut.mermaidM}),import(f).then(m=>{s=m.default,d()}).catch(m=>{ot.emit(t,Po,{name:"mermaid",message:`Failed to load mermaid module: ${m.message}`,error:m})})):Ht("script",{...(h=u.mermaid)==null?void 0:h.js,src:f,id:Ut.mermaid,onload(){s=window.mermaid,d()}},"mermaid")}),{reRenderRef:l,replaceMermaid:async()=>{if(!e.noMermaid&&s){const f=r.value.querySelectorAll(`div.${Y}-mermaid`),c=document.createElement("div"),h=document.body.offsetWidth>1366?document.body.offsetWidth:1366,m=document.body.offsetHeight>768?document.body.offsetHeight:768;c.style.width=h+"px",c.style.height=m+"px",c.style.position="fixed",c.style.zIndex="-10000",c.style.top="-10000";let p=f.length;p>0&&document.body.appendChild(c),await Promise.allSettled(Array.from(f).map(w=>(async y=>{var g;if(y.dataset.closed==="false")return!1;const A=y.innerText;let b=mu.get(A);if(!b){const x=Io();let k={svg:""};try{k=await s.render(x,A,c),b=await e.sanitizeMermaid(k.svg);const T=document.createElement("p");T.className=`${Y}-mermaid`,T.setAttribute("data-processed",""),T.setAttribute("data-content",A),T.innerHTML=b,(g=T.children[0])==null||g.removeAttribute("height"),mu.set(A,T.innerHTML),y.dataset.line!==void 0&&(T.dataset.line=y.dataset.line),y.replaceWith(T)}catch(T){ot.emit(t,Po,{name:"mermaid",message:T.message,error:T})}--p===0&&c.remove()}})(w)))}}}},Gp=(e,t)=>{t=t||{};const n=3,r=t.marker||"!",o=r.charCodeAt(0),u=r.length;let a="",s="";const l=(f,c,h,m,p)=>{const w=f[c];return w.type==="admonition_open"?f[c].attrPush(["class",`${Y}-admonition ${Y}-admonition-${w.info}`]):w.type==="admonition_title_open"&&f[c].attrPush(["class",`${Y}-admonition-title`]),p.renderToken(f,c,h)},d=f=>{const c=f.trim().split(" ",2);s="",a=c[0],c.length>1&&(s=f.substring(a.length+2))};e.block.ruler.before("code","admonition",(f,c,h,m)=>{let p,w,y,A=!1,b=f.bMarks[c]+f.tShift[c],g=f.eMarks[c];if(o!==f.src.charCodeAt(b))return!1;for(p=b+1;p<=g&&r[(p-b)%u]===f.src[p];p++);const x=Math.floor((p-b)/u);if(x!==n)return!1;p-=(p-b)%u;const k=f.src.slice(b,p),T=f.src.slice(p,g);if(d(T),m)return!0;for(w=c;w++,!(w>=h||(b=f.bMarks[w]+f.tShift[w],g=f.eMarks[w],b<g&&f.sCount[w]<f.blkIndent));)if(o===f.src.charCodeAt(b)&&!(f.sCount[w]-f.blkIndent>=4)){for(p=b+1;p<=g&&r[(p-b)%u]===f.src[p];p++);if(!(Math.floor((p-b)/u)<x)&&(p-=(p-b)%u,p=f.skipSpaces(p),!(p<g))){A=!0;break}}const D=f.parentType,S=f.lineMax;return f.parentType="root",f.lineMax=w,y=f.push("admonition_open","div",1),y.markup=k,y.block=!0,y.info=a,y.map=[c,w],s&&(y=f.push("admonition_title_open","p",1),y.markup=k+" "+a,y.map=[c,w],y=f.push("inline","",0),y.content=s,y.map=[c,f.line-1],y.children=[],y=f.push("admonition_title_close","p",-1),y.markup=k+" "+a),f.md.block.tokenize(f,c+1,w),y=f.push("admonition_close","div",-1),y.markup=f.src.slice(b,p),y.block=!0,f.parentType=D,f.lineMax=S,f.line=w+(A?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=l,e.renderer.rules.admonition_title_open=l,e.renderer.rules.admonition_title_close=l,e.renderer.rules.admonition_close=l},Bo=(e,t)=>{const n=e.attrs?e.attrs.slice():[];return t.forEach(r=>{const o=e.attrIndex(r[0]);o<0?n.push(r):(n[o]=n[o].slice(),n[o][1]+=` ${r[1]}`)}),n},Xp=(e,t)=>{const n=e.renderer.rules.fence,r=e.utils.unescapeAll,o=/\[(\w*)(?::([\w ]*))?\]/,u=/::(open|close)/,a=c=>c.info?r(c.info).trim():"",s=c=>{const h=a(c),[m=null,p=""]=(o.exec(h)||[]).slice(1);return[m,p]},l=c=>{const h=a(c);return h?h.split(/(\s+)/g)[0]:""},d=c=>{const h=c.info.match(u)||[],m=h[1]==="open"||h[1]!=="close"&&t.codeFoldable&&c.content.trim().split(`
|
|
36
|
+
`).length<t.autoFoldThreshold,p=h[1]||t.codeFoldable?"details":"div",w=h[1]||t.codeFoldable?"summary":"div";return{open:m,tagContainer:p,tagHeader:w}},f=(c,h,m,p,w)=>{var N;if(c[h].hidden)return"";const y=(N=t.usedLanguageTextRef.value)==null?void 0:N.copyCode.text,A=t.customIconRef.value.copy||y,b=!!t.customIconRef.value.copy,g=`<span class="${Y}-collapse-tips">${St("collapse-tips",t.customIconRef.value)}</span>`,[x]=s(c[h]);if(x===null){const{open:F,tagContainer:O,tagHeader:H}=d(c[h]),$=[["class",`${Y}-code`]];F&&$.push(["open",""]);const R={attrs:Bo(c[h],$)};c[h].info=c[h].info.replace(u,"");const V=n(c,h,m,p,w);return`
|
|
37
|
+
<${O} ${w.renderAttrs(R)}>
|
|
38
|
+
<${H} class="${Y}-code-head">
|
|
39
|
+
<div class="${Y}-code-flag"><span></span><span></span><span></span></div>
|
|
40
|
+
<div class="${Y}-code-action">
|
|
41
|
+
<span class="${Y}-code-lang">${e.utils.escapeHtml(c[h].info.trim())}</span>
|
|
42
|
+
<span class="${Y}-copy-button" data-tips="${y}"${b?" data-is-icon=true":""}>${A}</span>
|
|
43
43
|
${t.extraTools instanceof Function?t.extraTools({lang:c[h].info.trim()}):t.extraTools||""}
|
|
44
|
-
${
|
|
44
|
+
${O==="details"?g:""}
|
|
45
45
|
</div>
|
|
46
|
-
</${
|
|
47
|
-
${
|
|
48
|
-
</${
|
|
49
|
-
`}let k,
|
|
46
|
+
</${H}>
|
|
47
|
+
${V}
|
|
48
|
+
</${O}>
|
|
49
|
+
`}let k,T,D,S,X="",z="",B="";const{open:j,tagContainer:I,tagHeader:W}=d(c[h]),_=[["class",`${Y}-code`]];j&&_.push(["open",""]);const C={attrs:Bo(c[h],_)};for(let F=h;F<c.length&&(k=c[F],[T,D]=s(k),T===x);F++){k.info=k.info.replace(o,"").replace(u,""),k.hidden=!0;const O=`${Y}-codetab-${t.editorId}-${h}-${F-h}`;S=F-h>0?"":"checked",X+=`
|
|
50
50
|
<li>
|
|
51
51
|
<input
|
|
52
52
|
type="radio"
|
|
53
|
-
id="label-${
|
|
54
|
-
name="${
|
|
55
|
-
class="${
|
|
56
|
-
${
|
|
53
|
+
id="label-${Y}-codetab-label-1-${t.editorId}-${h}-${F-h}"
|
|
54
|
+
name="${Y}-codetab-label-${t.editorId}-${h}"
|
|
55
|
+
class="${O}"
|
|
56
|
+
${S}
|
|
57
57
|
>
|
|
58
58
|
<label
|
|
59
|
-
for="label-${
|
|
60
|
-
onclick="this.getRootNode().querySelectorAll('.${
|
|
59
|
+
for="label-${Y}-codetab-label-1-${t.editorId}-${h}-${F-h}"
|
|
60
|
+
onclick="this.getRootNode().querySelectorAll('.${O}').forEach(e => e.click())"
|
|
61
61
|
>
|
|
62
|
-
${e.utils.escapeHtml(
|
|
62
|
+
${e.utils.escapeHtml(D||l(k))}
|
|
63
63
|
</label>
|
|
64
|
-
</li>`,
|
|
64
|
+
</li>`,z+=`
|
|
65
65
|
<div role="tabpanel">
|
|
66
66
|
<input
|
|
67
67
|
type="radio"
|
|
68
|
-
name="${
|
|
69
|
-
class="${
|
|
70
|
-
${
|
|
68
|
+
name="${Y}-codetab-pre-${t.editorId}-${h}"
|
|
69
|
+
class="${O}"
|
|
70
|
+
${S}
|
|
71
71
|
role="presentation">
|
|
72
|
-
${n(c,
|
|
73
|
-
</div>`,
|
|
72
|
+
${n(c,F,m,p,w)}
|
|
73
|
+
</div>`,B+=`
|
|
74
74
|
<input
|
|
75
75
|
type="radio"
|
|
76
|
-
name="${
|
|
77
|
-
class="${
|
|
78
|
-
${
|
|
76
|
+
name="${Y}-codetab-lang-${t.editorId}-${h}"
|
|
77
|
+
class="${O}"
|
|
78
|
+
${S}
|
|
79
79
|
role="presentation">
|
|
80
|
-
<span class=${
|
|
81
|
-
<${
|
|
82
|
-
<${
|
|
83
|
-
<div class="${
|
|
84
|
-
<ul class="${
|
|
80
|
+
<span class=${Y}-code-lang role="note">${e.utils.escapeHtml(l(k))}</span>`}return`
|
|
81
|
+
<${I} ${w.renderAttrs(C)}>
|
|
82
|
+
<${W} class="${Y}-code-head">
|
|
83
|
+
<div class="${Y}-code-flag">
|
|
84
|
+
<ul class="${Y}-codetab-label" role="tablist">${X}</ul>
|
|
85
85
|
</div>
|
|
86
|
-
<div class="${
|
|
87
|
-
<span class="${
|
|
88
|
-
<span class="${
|
|
86
|
+
<div class="${Y}-code-action">
|
|
87
|
+
<span class="${Y}-codetab-lang">${B}</span>
|
|
88
|
+
<span class="${Y}-copy-button" data-tips="${y}"${b?" data-is-icon=true":""}>${A}</span>
|
|
89
89
|
${t.extraTools instanceof Function?t.extraTools({lang:c[h].info.trim()}):t.extraTools||""}
|
|
90
|
-
${
|
|
90
|
+
${I==="details"?g:""}
|
|
91
91
|
</div>
|
|
92
|
-
</${
|
|
93
|
-
${
|
|
94
|
-
</${
|
|
95
|
-
`};e.renderer.rules.fence=f,e.renderer.rules.code_block=f},
|
|
96
|
-
`)})));let
|
|
97
|
-
`)}))},
|
|
98
|
-
`),
|
|
99
|
-
`))):ot.emit(n,am,c+1,p)};a.forEach(l=>{l.addEventListener("click",s)}),o=()=>{a.forEach(l=>{l.removeEventListener("click",s)})}};i.onBeforeUnmount(()=>{o()}),i.watch([t],()=>{o(),i.nextTick(r)},{immediate:!0})},cp=(e,t,n)=>{const u=i.inject("setting"),o=()=>{i.nextTick(()=>{var a;(a=e.onRemount)==null||a.call(e)})},r=a=>{a&&o()};i.watch([t,n],o),i.watch(()=>u.value.preview,r),i.watch(()=>u.value.htmlPreview,r),i.onMounted(o)},Es={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:e=>e},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:e=>e},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function},noEcharts:{type:Boolean},previewComponent:{type:[Object,Function],default:void 0}};({...Es});const Ss=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes)},dp=(e,t)=>e.nodeType!==t.nodeType?!1:e.nodeType===Node.TEXT_NODE||e.nodeType===Node.COMMENT_NODE?e.textContent===t.textContent:e.nodeType===Node.ELEMENT_NODE?e.outerHTML===t.outerHTML:e.isEqualNode?e.isEqualNode(t):!1,fp=i.defineComponent({name:"UpdateOnDemand",props:{id:{type:String,required:!0},class:{type:[String,Array,Object],required:!0},html:{type:String,required:!0}},setup(e){const t=i.ref(),n=e.html,u=(o,r)=>{if(!t.value)return;const a=t.value,s=Array.from(a.childNodes),l=Math.min(o.length,r.length);let d=-1;for(let c=0;c<l;c++)if(!dp(o[c],r[c])){d=c;break}if(d===-1)if(r.length>o.length)d=o.length;else if(o.length>r.length)d=r.length;else return;const f=Math.min(d,s.length);for(let c=s.length-1;c>=f;c--)s[c].remove();for(let c=d;c<o.length;c++)a.appendChild(o[c].cloneNode(!0))};return i.watch(()=>e.html,(o,r)=>{const a=Ss(o),s=Ss(r||"");u(a,s)}),()=>i.createVNode("div",{id:e.id,class:e.class,innerHTML:n,ref:t},null)}}),hp=i.defineComponent({name:"ContentPreview",props:Es,setup(e){const t=i.inject("editorId"),n=i.inject("setting"),u=i.inject("previewTheme"),o=i.inject("showCodeRowNumber"),{html:r,key:a}=ap(e,e.previewOnly);Pm(e,r,a),sp(e,r),lp(e,r),cp(e,r,a);const s=i.computed(()=>[`${X}-preview`,`${u==null?void 0:u.value}-theme`,o&&`${X}-scrn`].filter(Boolean)),l=()=>{const d=`${t}-preview`;return e.previewComponent?i.h(e.previewComponent,{key:a.value,html:r.value,id:d,class:s.value}):i.createVNode(fp,{key:a.value,html:r.value,id:d,class:s.value},null)};return()=>i.createVNode(i.Fragment,null,[n.value.preview&&(e.previewOnly?l():i.createVNode("div",{id:`${t}-preview-wrapper`,class:`${X}-preview-wrapper`,key:"content-preview-wrapper"},[l()])),n.value.htmlPreview&&i.createVNode("div",{id:`${t}-html-wrapper`,class:`${X}-preview-wrapper`,key:"html-preview-wrapper"},[i.createVNode("div",{class:`${X}-html`},[r.value])])])}}),mp=({text:e})=>e,Ds={modelValue:{type:String,default:""},onChange:{type:Function,default:void 0},theme:{type:String,default:"light"},class:{type:String,default:""},language:{type:String,default:"zh-CN"},onHtmlChanged:{type:Function,default:void 0},onGetCatalog:{type:Function,default:void 0},editorId:{type:String,default:void 0},id:{type:String,default:void 0},showCodeRowNumber:{type:Boolean,default:!0},previewTheme:{type:String,default:"default"},style:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:mp},sanitize:{type:Function,default:e=>e},noMermaid:{type:Boolean,default:!1},noKatex:{type:Boolean,default:!1},codeTheme:{type:String,default:"atom"},formatCopiedText:{type:Function,default:e=>e},codeStyleReverse:{type:Boolean,default:!0},codeStyleReverseList:{type:Array,default:["default","mk-cute"]},noHighlight:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean,default:!1},customIcon:{type:Object,default:{}},sanitizeMermaid:{type:Function,default:e=>Promise.resolve(e)},codeFoldable:{type:Boolean,default:!0},autoFoldThreshold:{type:Number,default:30},onRemount:{type:Function,default:void 0},noEcharts:{type:Boolean,default:!1},previewComponent:{type:[Object,Function],default:void 0}};({...Ds});const Ts=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"];[...Ts];const pp=(e,t,n)=>{const{editorId:u}=n,o={rerender(){ot.emit(u,fs)}};t.expose(o)},gu=i.defineComponent({name:"MdPreview",props:Ds,emits:Ts,setup(e,t){const{noKatex:n,noMermaid:u,noHighlight:o}=e,r=i.ref(),a=Lm(e);Om(e,{rootRef:r,editorId:a}),pp(e,t,{editorId:a}),i.onBeforeUnmount(()=>{ot.clear(a)});const s=c=>{var h;(h=e.onChange)==null||h.call(e,c),t.emit("onChange",c),t.emit("update:modelValue",c)},l=c=>{var h;(h=e.onHtmlChanged)==null||h.call(e,c),t.emit("onHtmlChanged",c)},d=c=>{var h;(h=e.onGetCatalog)==null||h.call(e,c),t.emit("onGetCatalog",c)},f=()=>{var c;(c=e.onRemount)==null||c.call(e),t.emit("onRemount")};return()=>i.createVNode("div",{id:a,class:[X,e.class,e.theme==="dark"&&`${X}-dark`,`${X}-previewOnly`],style:e.style,ref:r},[i.createVNode(hp,{modelValue:e.modelValue,onChange:s,onHtmlChanged:l,onGetCatalog:d,mdHeadingId:e.mdHeadingId,noMermaid:u,sanitize:e.sanitize,noKatex:n,formatCopiedText:e.formatCopiedText,noHighlight:o,noImgZoomIn:e.noImgZoomIn,previewOnly:!0,sanitizeMermaid:e.sanitizeMermaid,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,onRemount:f,noEcharts:e.noEcharts,previewComponent:e.previewComponent},null)])}});gu.install=e=>(e.component(gu.name,gu),e);const gp={onClick:{type:Function,default:void 0},language:{type:String,default:void 0},theme:{type:String,default:void 0},disabled:{type:Boolean,default:void 0}},Bo=i.defineComponent({name:"NormalFooterToolbar",props:gp,emits:["onClick"],setup(e,t){return()=>{const n=um({props:e,ctx:t});return i.createVNode("div",{class:[`${X}-footer-item`,e.disabled&&`${X}-disabled`],onClick:u=>{var o;e.disabled||((o=e.onClick)==null||o.call(e,u),t.emit("onClick",u))}},[n])}}});Bo.install=e=>(e.component(Bo.name,Bo),e);var zo={exports:{}},pe={},jo={exports:{}},en={},Fs;function Ns(){if(Fs)return en;Fs=1;function e(){var r={};return r["align-content"]=!1,r["align-items"]=!1,r["align-self"]=!1,r["alignment-adjust"]=!1,r["alignment-baseline"]=!1,r.all=!1,r["anchor-point"]=!1,r.animation=!1,r["animation-delay"]=!1,r["animation-direction"]=!1,r["animation-duration"]=!1,r["animation-fill-mode"]=!1,r["animation-iteration-count"]=!1,r["animation-name"]=!1,r["animation-play-state"]=!1,r["animation-timing-function"]=!1,r.azimuth=!1,r["backface-visibility"]=!1,r.background=!0,r["background-attachment"]=!0,r["background-clip"]=!0,r["background-color"]=!0,r["background-image"]=!0,r["background-origin"]=!0,r["background-position"]=!0,r["background-repeat"]=!0,r["background-size"]=!0,r["baseline-shift"]=!1,r.binding=!1,r.bleed=!1,r["bookmark-label"]=!1,r["bookmark-level"]=!1,r["bookmark-state"]=!1,r.border=!0,r["border-bottom"]=!0,r["border-bottom-color"]=!0,r["border-bottom-left-radius"]=!0,r["border-bottom-right-radius"]=!0,r["border-bottom-style"]=!0,r["border-bottom-width"]=!0,r["border-collapse"]=!0,r["border-color"]=!0,r["border-image"]=!0,r["border-image-outset"]=!0,r["border-image-repeat"]=!0,r["border-image-slice"]=!0,r["border-image-source"]=!0,r["border-image-width"]=!0,r["border-left"]=!0,r["border-left-color"]=!0,r["border-left-style"]=!0,r["border-left-width"]=!0,r["border-radius"]=!0,r["border-right"]=!0,r["border-right-color"]=!0,r["border-right-style"]=!0,r["border-right-width"]=!0,r["border-spacing"]=!0,r["border-style"]=!0,r["border-top"]=!0,r["border-top-color"]=!0,r["border-top-left-radius"]=!0,r["border-top-right-radius"]=!0,r["border-top-style"]=!0,r["border-top-width"]=!0,r["border-width"]=!0,r.bottom=!1,r["box-decoration-break"]=!0,r["box-shadow"]=!0,r["box-sizing"]=!0,r["box-snap"]=!0,r["box-suppress"]=!0,r["break-after"]=!0,r["break-before"]=!0,r["break-inside"]=!0,r["caption-side"]=!1,r.chains=!1,r.clear=!0,r.clip=!1,r["clip-path"]=!1,r["clip-rule"]=!1,r.color=!0,r["color-interpolation-filters"]=!0,r["column-count"]=!1,r["column-fill"]=!1,r["column-gap"]=!1,r["column-rule"]=!1,r["column-rule-color"]=!1,r["column-rule-style"]=!1,r["column-rule-width"]=!1,r["column-span"]=!1,r["column-width"]=!1,r.columns=!1,r.contain=!1,r.content=!1,r["counter-increment"]=!1,r["counter-reset"]=!1,r["counter-set"]=!1,r.crop=!1,r.cue=!1,r["cue-after"]=!1,r["cue-before"]=!1,r.cursor=!1,r.direction=!1,r.display=!0,r["display-inside"]=!0,r["display-list"]=!0,r["display-outside"]=!0,r["dominant-baseline"]=!1,r.elevation=!1,r["empty-cells"]=!1,r.filter=!1,r.flex=!1,r["flex-basis"]=!1,r["flex-direction"]=!1,r["flex-flow"]=!1,r["flex-grow"]=!1,r["flex-shrink"]=!1,r["flex-wrap"]=!1,r.float=!1,r["float-offset"]=!1,r["flood-color"]=!1,r["flood-opacity"]=!1,r["flow-from"]=!1,r["flow-into"]=!1,r.font=!0,r["font-family"]=!0,r["font-feature-settings"]=!0,r["font-kerning"]=!0,r["font-language-override"]=!0,r["font-size"]=!0,r["font-size-adjust"]=!0,r["font-stretch"]=!0,r["font-style"]=!0,r["font-synthesis"]=!0,r["font-variant"]=!0,r["font-variant-alternates"]=!0,r["font-variant-caps"]=!0,r["font-variant-east-asian"]=!0,r["font-variant-ligatures"]=!0,r["font-variant-numeric"]=!0,r["font-variant-position"]=!0,r["font-weight"]=!0,r.grid=!1,r["grid-area"]=!1,r["grid-auto-columns"]=!1,r["grid-auto-flow"]=!1,r["grid-auto-rows"]=!1,r["grid-column"]=!1,r["grid-column-end"]=!1,r["grid-column-start"]=!1,r["grid-row"]=!1,r["grid-row-end"]=!1,r["grid-row-start"]=!1,r["grid-template"]=!1,r["grid-template-areas"]=!1,r["grid-template-columns"]=!1,r["grid-template-rows"]=!1,r["hanging-punctuation"]=!1,r.height=!0,r.hyphens=!1,r.icon=!1,r["image-orientation"]=!1,r["image-resolution"]=!1,r["ime-mode"]=!1,r["initial-letters"]=!1,r["inline-box-align"]=!1,r["justify-content"]=!1,r["justify-items"]=!1,r["justify-self"]=!1,r.left=!1,r["letter-spacing"]=!0,r["lighting-color"]=!0,r["line-box-contain"]=!1,r["line-break"]=!1,r["line-grid"]=!1,r["line-height"]=!1,r["line-snap"]=!1,r["line-stacking"]=!1,r["line-stacking-ruby"]=!1,r["line-stacking-shift"]=!1,r["line-stacking-strategy"]=!1,r["list-style"]=!0,r["list-style-image"]=!0,r["list-style-position"]=!0,r["list-style-type"]=!0,r.margin=!0,r["margin-bottom"]=!0,r["margin-left"]=!0,r["margin-right"]=!0,r["margin-top"]=!0,r["marker-offset"]=!1,r["marker-side"]=!1,r.marks=!1,r.mask=!1,r["mask-box"]=!1,r["mask-box-outset"]=!1,r["mask-box-repeat"]=!1,r["mask-box-slice"]=!1,r["mask-box-source"]=!1,r["mask-box-width"]=!1,r["mask-clip"]=!1,r["mask-image"]=!1,r["mask-origin"]=!1,r["mask-position"]=!1,r["mask-repeat"]=!1,r["mask-size"]=!1,r["mask-source-type"]=!1,r["mask-type"]=!1,r["max-height"]=!0,r["max-lines"]=!1,r["max-width"]=!0,r["min-height"]=!0,r["min-width"]=!0,r["move-to"]=!1,r["nav-down"]=!1,r["nav-index"]=!1,r["nav-left"]=!1,r["nav-right"]=!1,r["nav-up"]=!1,r["object-fit"]=!1,r["object-position"]=!1,r.opacity=!1,r.order=!1,r.orphans=!1,r.outline=!1,r["outline-color"]=!1,r["outline-offset"]=!1,r["outline-style"]=!1,r["outline-width"]=!1,r.overflow=!1,r["overflow-wrap"]=!1,r["overflow-x"]=!1,r["overflow-y"]=!1,r.padding=!0,r["padding-bottom"]=!0,r["padding-left"]=!0,r["padding-right"]=!0,r["padding-top"]=!0,r.page=!1,r["page-break-after"]=!1,r["page-break-before"]=!1,r["page-break-inside"]=!1,r["page-policy"]=!1,r.pause=!1,r["pause-after"]=!1,r["pause-before"]=!1,r.perspective=!1,r["perspective-origin"]=!1,r.pitch=!1,r["pitch-range"]=!1,r["play-during"]=!1,r.position=!1,r["presentation-level"]=!1,r.quotes=!1,r["region-fragment"]=!1,r.resize=!1,r.rest=!1,r["rest-after"]=!1,r["rest-before"]=!1,r.richness=!1,r.right=!1,r.rotation=!1,r["rotation-point"]=!1,r["ruby-align"]=!1,r["ruby-merge"]=!1,r["ruby-position"]=!1,r["shape-image-threshold"]=!1,r["shape-outside"]=!1,r["shape-margin"]=!1,r.size=!1,r.speak=!1,r["speak-as"]=!1,r["speak-header"]=!1,r["speak-numeral"]=!1,r["speak-punctuation"]=!1,r["speech-rate"]=!1,r.stress=!1,r["string-set"]=!1,r["tab-size"]=!1,r["table-layout"]=!1,r["text-align"]=!0,r["text-align-last"]=!0,r["text-combine-upright"]=!0,r["text-decoration"]=!0,r["text-decoration-color"]=!0,r["text-decoration-line"]=!0,r["text-decoration-skip"]=!0,r["text-decoration-style"]=!0,r["text-emphasis"]=!0,r["text-emphasis-color"]=!0,r["text-emphasis-position"]=!0,r["text-emphasis-style"]=!0,r["text-height"]=!0,r["text-indent"]=!0,r["text-justify"]=!0,r["text-orientation"]=!0,r["text-overflow"]=!0,r["text-shadow"]=!0,r["text-space-collapse"]=!0,r["text-transform"]=!0,r["text-underline-position"]=!0,r["text-wrap"]=!0,r.top=!1,r.transform=!1,r["transform-origin"]=!1,r["transform-style"]=!1,r.transition=!1,r["transition-delay"]=!1,r["transition-duration"]=!1,r["transition-property"]=!1,r["transition-timing-function"]=!1,r["unicode-bidi"]=!1,r["vertical-align"]=!1,r.visibility=!1,r["voice-balance"]=!1,r["voice-duration"]=!1,r["voice-family"]=!1,r["voice-pitch"]=!1,r["voice-range"]=!1,r["voice-rate"]=!1,r["voice-stress"]=!1,r["voice-volume"]=!1,r.volume=!1,r["white-space"]=!1,r.widows=!1,r.width=!0,r["will-change"]=!1,r["word-break"]=!0,r["word-spacing"]=!0,r["word-wrap"]=!0,r["wrap-flow"]=!1,r["wrap-through"]=!1,r["writing-mode"]=!1,r["z-index"]=!1,r}function t(r,a,s){}function n(r,a,s){}var u=/javascript\s*\:/img;function o(r,a){return u.test(a)?"":a}return en.whiteList=e(),en.getDefaultWhiteList=e,en.onAttr=t,en.onIgnoreAttr=n,en.safeAttrValue=o,en}var Is,Os;function Ls(){return Os||(Os=1,Is={indexOf:function(e,t){var n,u;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,u=e.length;n<u;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var u,o;if(Array.prototype.forEach)return e.forEach(t,n);for(u=0,o=e.length;u<o;u++)t.call(n,e[u],u,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}),Is}var Ho,Ps;function bp(){if(Ps)return Ho;Ps=1;var e=Ls();function t(n,u){n=e.trimRight(n),n[n.length-1]!==";"&&(n+=";");var o=n.length,r=!1,a=0,s=0,l="";function d(){if(!r){var h=e.trim(n.slice(a,s)),p=h.indexOf(":");if(p!==-1){var m=e.trim(h.slice(0,p)),w=e.trim(h.slice(p+1));if(m){var y=u(a,l.length,m,w,h);y&&(l+=y+"; ")}}}a=s+1}for(;s<o;s++){var f=n[s];if(f==="/"&&n[s+1]==="*"){var c=n.indexOf("*/",s+2);if(c===-1)break;s=c+1,a=s+1,r=!1}else f==="("?r=!0:f===")"?r=!1:f===";"?r||d():f===`
|
|
100
|
-
`&&d()}return e.trim(l)}return Ho=t,Ho}var $o,Vs;function yp(){if(Vs)return $o;Vs=1;var e=Ns(),t=bp();Ls();function n(r){return r==null}function u(r){var a={};for(var s in r)a[s]=r[s];return a}function o(r){r=u(r||{}),r.whiteList=r.whiteList||e.whiteList,r.onAttr=r.onAttr||e.onAttr,r.onIgnoreAttr=r.onIgnoreAttr||e.onIgnoreAttr,r.safeAttrValue=r.safeAttrValue||e.safeAttrValue,this.options=r}return o.prototype.process=function(r){if(r=r||"",r=r.toString(),!r)return"";var a=this,s=a.options,l=s.whiteList,d=s.onAttr,f=s.onIgnoreAttr,c=s.safeAttrValue,h=t(r,function(p,m,w,y,A){var b=l[w],g=!1;if(b===!0?g=b:typeof b=="function"?g=b(y):b instanceof RegExp&&(g=b.test(y)),g!==!0&&(g=!1),y=c(w,y),!!y){var x={position:m,sourcePosition:p,source:A,isWhite:g};if(g){var k=d(w,y,x);return n(k)?w+":"+y:k}else{var k=f(w,y,x);if(!n(k))return k}}});return h},$o=o,$o}var Rs;function Uo(){return Rs||(Rs=1,function(e,t){var n=Ns(),u=yp();function o(a,s){var l=new u(s);return l.process(a)}t=e.exports=o,t.FilterCSS=u;for(var r in n)t[r]=n[r];typeof window<"u"&&(window.filterCSS=e.exports)}(jo,jo.exports)),jo.exports}var Ms,Bs;function Wo(){return Bs||(Bs=1,Ms={indexOf:function(e,t){var n,u;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,u=e.length;n<u;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var u,o;if(Array.prototype.forEach)return e.forEach(t,n);for(u=0,o=e.length;u<o;u++)t.call(n,e[u],u,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}}),Ms}var zs;function js(){if(zs)return pe;zs=1;var e=Uo().FilterCSS,t=Uo().getDefaultWhiteList,n=Wo();function u(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var o=new e;function r(E,R,M){}function a(E,R,M){}function s(E,R,M){}function l(E,R,M){}function d(E){return E.replace(c,"<").replace(h,">")}function f(E,R,M,$){if(M=_(M),R==="href"||R==="src"){if(M=n.trim(M),M==="#")return"#";if(!(M.substr(0,7)==="http://"||M.substr(0,8)==="https://"||M.substr(0,7)==="mailto:"||M.substr(0,4)==="tel:"||M.substr(0,11)==="data:image/"||M.substr(0,6)==="ftp://"||M.substr(0,2)==="./"||M.substr(0,3)==="../"||M[0]==="#"||M[0]==="/"))return""}else if(R==="background"){if(b.lastIndex=0,b.test(M))return""}else if(R==="style"){if(g.lastIndex=0,g.test(M)||(x.lastIndex=0,x.test(M)&&(b.lastIndex=0,b.test(M))))return"";$!==!1&&($=$||o,M=$.process(M))}return M=N(M),M}var c=/</g,h=/>/g,p=/"/g,m=/"/g,w=/&#([a-zA-Z0-9]*);?/gim,y=/:?/gim,A=/&newline;?/gim,b=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,g=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,x=/u\s*r\s*l\s*\(.*/gi;function k(E){return E.replace(p,""")}function F(E){return E.replace(m,'"')}function T(E){return E.replace(w,function(R,M){return M[0]==="x"||M[0]==="X"?String.fromCharCode(parseInt(M.substr(1),16)):String.fromCharCode(parseInt(M,10))})}function D(E){return E.replace(y,":").replace(A," ")}function U(E){for(var R="",M=0,$=E.length;M<$;M++)R+=E.charCodeAt(M)<32?" ":E.charAt(M);return n.trim(R)}function _(E){return E=F(E),E=T(E),E=D(E),E=U(E),E}function N(E){return E=k(E),E=d(E),E}function I(){return""}function C(E,R){typeof R!="function"&&(R=function(){});var M=!Array.isArray(E);function $(z){return M?!0:n.indexOf(E,z)!==-1}var re=[],te=!1;return{onIgnoreTag:function(z,j,L){if($(z))if(L.isClosing){var B="[/removed]",W=L.position+B.length;return re.push([te!==!1?te:L.position,W]),te=!1,B}else return te||(te=L.position),"[removed]";else return R(z,j,L)},remove:function(z){var j="",L=0;return n.forEach(re,function(B){j+=z.slice(L,B[0]),L=B[1]}),j+=z.slice(L),j}}}function P(E){for(var R="",M=0;M<E.length;){var $=E.indexOf("<!--",M);if($===-1){R+=E.slice(M);break}R+=E.slice(M,$);var re=E.indexOf("-->",$);if(re===-1)break;M=re+3}return R}function V(E){var R=E.split("");return R=R.filter(function(M){var $=M.charCodeAt(0);return $===127?!1:$<=31?$===10||$===13:!0}),R.join("")}return pe.whiteList=u(),pe.getDefaultWhiteList=u,pe.onTag=r,pe.onIgnoreTag=a,pe.onTagAttr=s,pe.onIgnoreTagAttr=l,pe.safeAttrValue=f,pe.escapeHtml=d,pe.escapeQuote=k,pe.unescapeQuote=F,pe.escapeHtmlEntities=T,pe.escapeDangerHtml5Entities=D,pe.clearNonPrintableCharacter=U,pe.friendlyAttrValue=_,pe.escapeAttrValue=N,pe.onIgnoreTagStripAll=I,pe.StripTagBody=C,pe.stripCommentTag=P,pe.stripBlankChar=V,pe.attributeWrapSign='"',pe.cssFilter=o,pe.getDefaultCSSWhiteList=t,pe}var bu={},Hs;function $s(){if(Hs)return bu;Hs=1;var e=Wo();function t(c){var h=e.spaceIndex(c),p;return h===-1?p=c.slice(1,-1):p=c.slice(1,h+1),p=e.trim(p).toLowerCase(),p.slice(0,1)==="/"&&(p=p.slice(1)),p.slice(-1)==="/"&&(p=p.slice(0,-1)),p}function n(c){return c.slice(0,2)==="</"}function u(c,h,p){var m="",w=0,y=!1,A=!1,b=0,g=c.length,x="",k="";e:for(b=0;b<g;b++){var F=c.charAt(b);if(y===!1){if(F==="<"){y=b;continue}}else if(A===!1){if(F==="<"){m+=p(c.slice(w,b)),y=b,w=b;continue}if(F===">"||b===g-1){m+=p(c.slice(w,y)),k=c.slice(y,b+1),x=t(k),m+=h(y,m.length,x,k,n(k)),w=b+1,y=!1;continue}if(F==='"'||F==="'")for(var T=1,D=c.charAt(b-T);D.trim()===""||D==="=";){if(D==="="){A=F;continue e}D=c.charAt(b-++T)}}else if(F===A){A=!1;continue}}return w<g&&(m+=p(c.substr(w))),m}var o=/[^a-zA-Z0-9\\_:.-]/gim;function r(c,h){var p=0,m=0,w=[],y=!1,A=c.length;function b(T,D){if(T=e.trim(T),T=T.replace(o,"").toLowerCase(),!(T.length<1)){var U=h(T,D||"");U&&w.push(U)}}for(var g=0;g<A;g++){var x=c.charAt(g),k,F;if(y===!1&&x==="="){y=c.slice(p,g),p=g+1,m=c.charAt(p)==='"'||c.charAt(p)==="'"?p:s(c,g+1);continue}if(y!==!1&&g===m){if(F=c.indexOf(x,g+1),F===-1)break;k=e.trim(c.slice(m+1,F)),b(y,k),y=!1,g=F,p=g+1;continue}if(/\s|\n|\t/.test(x))if(c=c.replace(/\s|\n|\t/g," "),y===!1)if(F=a(c,g),F===-1){k=e.trim(c.slice(p,g)),b(k),y=!1,p=g+1;continue}else{g=F-1;continue}else if(F=l(c,g-1),F===-1){k=e.trim(c.slice(p,g)),k=f(k),b(y,k),y=!1,p=g+1;continue}else continue}return p<c.length&&(y===!1?b(c.slice(p)):b(y,f(e.trim(c.slice(p))))),e.trim(w.join(" "))}function a(c,h){for(;h<c.length;h++){var p=c[h];if(p!==" ")return p==="="?h:-1}}function s(c,h){for(;h<c.length;h++){var p=c[h];if(p!==" ")return p==="'"||p==='"'?h:-1}}function l(c,h){for(;h>0;h--){var p=c[h];if(p!==" ")return p==="="?h:-1}}function d(c){return c[0]==='"'&&c[c.length-1]==='"'||c[0]==="'"&&c[c.length-1]==="'"}function f(c){return d(c)?c.substr(1,c.length-2):c}return bu.parseTag=u,bu.parseAttr=r,bu}var Go,Us;function xp(){if(Us)return Go;Us=1;var e=Uo().FilterCSS,t=js(),n=$s(),u=n.parseTag,o=n.parseAttr,r=Wo();function a(c){return c==null}function s(c){var h=r.spaceIndex(c);if(h===-1)return{html:"",closing:c[c.length-2]==="/"};c=r.trim(c.slice(h+1,-1));var p=c[c.length-1]==="/";return p&&(c=r.trim(c.slice(0,-1))),{html:c,closing:p}}function l(c){var h={};for(var p in c)h[p]=c[p];return h}function d(c){var h={};for(var p in c)Array.isArray(c[p])?h[p.toLowerCase()]=c[p].map(function(m){return m.toLowerCase()}):h[p.toLowerCase()]=c[p];return h}function f(c){c=l(c||{}),c.stripIgnoreTag&&(c.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),c.onIgnoreTag=t.onIgnoreTagStripAll),c.whiteList||c.allowList?c.whiteList=d(c.whiteList||c.allowList):c.whiteList=t.whiteList,this.attributeWrapSign=c.singleQuotedAttributeValue===!0?"'":t.attributeWrapSign,c.onTag=c.onTag||t.onTag,c.onTagAttr=c.onTagAttr||t.onTagAttr,c.onIgnoreTag=c.onIgnoreTag||t.onIgnoreTag,c.onIgnoreTagAttr=c.onIgnoreTagAttr||t.onIgnoreTagAttr,c.safeAttrValue=c.safeAttrValue||t.safeAttrValue,c.escapeHtml=c.escapeHtml||t.escapeHtml,this.options=c,c.css===!1?this.cssFilter=!1:(c.css=c.css||{},this.cssFilter=new e(c.css))}return f.prototype.process=function(c){if(c=c||"",c=c.toString(),!c)return"";var h=this,p=h.options,m=p.whiteList,w=p.onTag,y=p.onIgnoreTag,A=p.onTagAttr,b=p.onIgnoreTagAttr,g=p.safeAttrValue,x=p.escapeHtml,k=h.attributeWrapSign,F=h.cssFilter;p.stripBlankChar&&(c=t.stripBlankChar(c)),p.allowCommentTag||(c=t.stripCommentTag(c));var T=!1;p.stripIgnoreTagBody&&(T=t.StripTagBody(p.stripIgnoreTagBody,y),y=T.onIgnoreTag);var D=u(c,function(U,_,N,I,C){var P={sourcePosition:U,position:_,isClosing:C,isWhite:Object.prototype.hasOwnProperty.call(m,N)},V=w(N,I,P);if(!a(V))return V;if(P.isWhite){if(P.isClosing)return"</"+N+">";var E=s(I),R=m[N],M=o(E.html,function($,re){var te=r.indexOf(R,$)!==-1,z=A(N,$,re,te);return a(z)?te?(re=g(N,$,re,F),re?$+"="+k+re+k:$):(z=b(N,$,re,te),a(z)?void 0:z):z});return I="<"+N,M&&(I+=" "+M),E.closing&&(I+=" /"),I+=">",I}else return V=y(N,I,P),a(V)?x(I):V},x);return T&&(D=T.remove(D)),D},Go=f,Go}var Ws;function wp(){return Ws||(Ws=1,function(e,t){var n=js(),u=$s(),o=xp();function r(s,l){var d=new o(l);return d.process(s)}t=e.exports=r,t.filterXSS=r,t.FilterXSS=o,function(){for(var s in n)t[s]=n[s];for(var l in u)t[l]=u[l]}(),typeof window<"u"&&(window.filterXSS=e.exports);function a(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}a()&&(self.filterXSS=e.exports)}(zo,zo.exports)),zo.exports}wp();const tn=i.defineComponent({name:"FMarkdownPreview",props:ls,setup(e){return()=>i.createVNode("div",{class:"f-markdown-preview-container"},[i.createVNode(gu,{modelValue:e.content},null)])}});tn.install=e=>{e.component(tn.name,tn)};const Xo="farris-x-preview-bridge",qo=1,Zo="assistant.message";function Gs(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function Xs(e){return e!==null&&typeof e=="object"}function qs(e){if(!Xs(e)||e.source!==Xo||e.v!==qo||e.type!==Zo)return!1;const t=e.payload;return!(!Xs(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function vp(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function Zs(e,t,n){const u=Gs(n);try{return e.postMessage({source:Xo,v:qo,type:Zo,payload:u},t),!0}catch{return!1}}function Ys(e){const t=e.allowTopAsSource!==!1,n=u=>{var o;vp(u,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(u.origin)||qs(u.data)&&((o=e.onAssistantMessage)==null||o.call(e,u.data.payload)))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}const Ap="/platform/common/web/renderer/index.html#/preview",kp="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",Cp="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",_p="67441dbb-0219-46f2-b247-51555c317995";function Ks(e){if(e.url)return e.url;const t=e.baseUri??Ap,n=e.metadataPath??kp,u=e.projectPath??Cp,o=e.baseMetadataId??_p;return`${t}?metadataPath=${encodeURIComponent(n)}&projectPath=${encodeURIComponent(u)}&baseMetadataId=${encodeURIComponent(o)}`}function Ep(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=Ks(e),n=new URL(t,window.location.href).origin;return n==="null"||n===""?window.location.origin:n}catch{return null}}const sr=i.defineComponent({name:"ChatPreview",props:ss,setup(e,{expose:t}){const n=i.ref(null),u=i.ref(null),o=i.ref(!1),r=i.ref(!1),a=i.computed(()=>Ks(e.previewConfig??{})),s=i.computed(()=>{var E;return((E=e.previewConfig)==null?void 0:E.contentType)==="markdown"}),l=i.computed(()=>{var E;return Object.keys(((E=e.previewConfig)==null?void 0:E.contentMap)??{})}),d=i.computed(()=>l.value.filter(E=>E).length>0),f=i.ref(),c=i.ref(),h=i.ref(!1);let p=null;i.onBeforeUnmount(()=>{p==null||p(),p=null,I()}),i.watch(()=>[a.value,n.value,s.value],()=>{if(p==null||p(),p=null,s.value)return;const E=n.value;if(!E)return;h.value=!1,o.value=!1,r.value=!1;const R=Date.now(),M=200,$=300,re=1e4;let te=!1,z=null,j=null;j=window.setTimeout(()=>{j=null,te||(r.value=!0)},M);const L=()=>{if(te)return;if(te=!0,z&&(window.clearTimeout(z),z=null),j&&(window.clearTimeout(j),j=null),h.value=!0,C(E),r.value){const K=Date.now()-R,Z=Math.max(0,$-K);setTimeout(()=>{o.value=!0},Z)}else o.value=!0;const W=()=>{var K;return(K=e.onIframeLoad)==null?void 0:K.call(e)};W(),window.setTimeout(W,0),window.setTimeout(W,120)},B=()=>{var W;te||(te=!0,j&&(window.clearTimeout(j),j=null),console.warn("ChatPreview: iframe load timeout"),h.value=!0,o.value=!0,(W=e.onIframeLoad)==null||W.call(e))};E.addEventListener("load",L,{once:!0}),z=window.setTimeout(B,re),p=()=>{E.removeEventListener("load",L),z&&(window.clearTimeout(z),z=null),j&&(window.clearTimeout(j),j=null)}},{flush:"post"}),i.watch([s,()=>{var E;return(E=e.previewConfig)==null?void 0:E.contentMap}],()=>{I(),s.value&&i.nextTick(()=>N())},{flush:"post"}),i.watch(()=>{var E;return(E=e.previewConfig)==null?void 0:E.contentMap},E=>{if(E){const R=Object.keys(E);f.value=R[0]??""}else f.value="";m()},{immediate:!0});function m(E){var R,M;E&&(f.value=E),d.value&&f.value?c.value=((M=(R=e.previewConfig)==null?void 0:R.contentMap)==null?void 0:M[f.value])||"":c.value=""}function w(E){var $;if(s.value||!h.value)return!1;const R=($=n.value)==null?void 0:$.contentWindow;if(!R)return!1;const M=Ep(e.previewConfig??{});return M?Zs(R,M,E):!1}t({postAssistantPayload:w});const y=i.ref(!1);let A=null;const b=800;function g(){y.value=!0,_(!0),A!=null&&(window.clearTimeout(A),A=null)}function x(){A!=null&&window.clearTimeout(A),A=window.setTimeout(()=>{y.value=!1,_(!1),A=null},b)}function k(){g(),x()}function F(){g()}function T(){x()}let D=[];function U(){const E=u.value;if(!E)return[];const R=[],M=E.querySelectorAll(".f-markdown-preview-container");return M.length>0&&M.forEach($=>R.push($)),R.length===0&&E.scrollHeight>E.clientHeight&&R.push(E),R}function _(E){const R=u.value;R&&R.querySelectorAll(".f-markdown-preview-container").forEach(M=>{M.classList.toggle("f-chat-preview-scrollbar-visible",E)})}function N(){const E=U();D=E,E.forEach(R=>{R.addEventListener("scroll",k,{passive:!0}),R.addEventListener("mouseenter",F),R.addEventListener("mouseleave",T)})}function I(){D.forEach(E=>{E.removeEventListener("scroll",k),E.removeEventListener("mouseenter",F),E.removeEventListener("mouseleave",T)}),D=[]}function C(E){try{const R=E.contentDocument;if(!R)return;const M="f-chat-preview-injected-scrollbar-style";if(R.getElementById(M))return;const $=R.createElement("style");$.id=M,$.textContent=`
|
|
92
|
+
</${W}>
|
|
93
|
+
${z}
|
|
94
|
+
</${I}>
|
|
95
|
+
`};e.renderer.rules.fence=f,e.renderer.rules.code_block=f},qp=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(r,o,u,a,s)=>{var f,c;const l=r[o],d=l.content.trim();if(l.info==="echarts"){if(l.attrSet("class",`${Y}-echarts`),l.attrSet("data-echarts-theme",t.themeRef.value),l.map&&l.level===0){const h=l.map[1]-1,m=!!((c=(f=a.srcLines[h])==null?void 0:f.trim())!=null&&c.startsWith("```"));l.attrSet("data-closed",`${m}`),l.attrSet("data-line",String(l.map[0]))}return`<div ${s.renderAttrs(l)} style="width: 100%; aspect-ratio: 4 / 3;">${e.utils.escapeHtml(d)}</div>`}return n(r,o,u,a,s)}},Zp=(e,t)=>{e.renderer.rules.heading_open=(n,r)=>{var s;const o=n[r],u=((s=n[r+1].children)==null?void 0:s.reduce((l,d)=>l+(["text","code_inline","math_inline"].includes(d.type)&&d.content||""),""))||"",a=o.markup.length;return t.headsRef.value.push({text:u,level:a,line:o.map[0],currentToken:o,nextToken:n[r+1]}),o.map&&o.level===0&&o.attrSet("id",t.mdHeadingId({text:u,level:a,index:t.headsRef.value.length,currentToken:o,nextToken:n[r+1]})),e.renderer.renderToken(n,r,t)},e.renderer.rules.heading_close=(n,r,o,u,a)=>a.renderToken(n,r,o)},Es={block:[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}],inline:[{open:"$$",close:"$$"},{open:"$",close:"$"},{open:"\\[",close:"\\]"},{open:"\\(",close:"\\)"}]},Yp=e=>(t,n)=>{const r=e.delimiters;for(const o of r){if(!t.src.startsWith(o.open,t.pos))continue;const u=t.pos+o.open.length;let a=u;for(;(a=t.src.indexOf(o.close,a))!==-1;){let s=0,l=a-1;for(;l>=0&&t.src[l]==="\\";)s++,l--;if(s%2===0)break;a+=o.close.length}if(a!==-1){if(a-u===0)return n||(t.pending+=o.open+o.close),t.pos=a+o.close.length,!0;if(!n){const s=t.push("math_inline","math",0);s.markup=o.open,s.content=t.src.slice(u,a)}return t.pos=a+o.close.length,!0}}return!1},Kp=e=>(t,n,r,o)=>{const u=e.delimiters,a=t.bMarks[n]+t.tShift[n],s=t.eMarks[n],l=(d,f,c)=>{t.line=f;const h=t.push("math_block","math",0);return h.block=!0,h.content=d,h.map=[n,t.line],h.markup=c,!0};for(const d of u){const f=a;if(t.src.slice(f,f+d.open.length)!==d.open)continue;const c=f+d.open.length,h=t.src.slice(c,s).trim(),m=h==="",p=h===d.close,w=h.endsWith(d.close);if(!m&&!p&&!w)continue;if(o)return!0;if(p)return l("",n+1,d.open);if(!m&&w){const x=h.slice(0,-d.close.length);return l(x,n+1,d.open)}let y=n+1,A=!1,b="";for(;y<r;y++){const x=t.bMarks[y]+t.tShift[y],k=t.eMarks[y];if(x<k&&t.tShift[y]<t.blkIndent)break;if(t.src.slice(x,k).trim().endsWith(d.close)){const T=t.src.slice(0,k).lastIndexOf(d.close);b=t.src.slice(x,T),A=!0;break}}if(!A)continue;const g=t.getLines(n+1,y,t.tShift[n],!0)+(b.trim()?b:"");return l(g,y+1,d.open)}return!1},Qp=(e,{katexRef:t,inlineDelimiters:n,blockDelimiters:r})=>{const o=(s,l,d,f,c=!1)=>{const h={attrs:Bo(s,[["class",l]])},m=f.renderAttrs(h);if(!t.value)return`<${d} ${m}>${s.content}</${d}>`;const p=t.value.renderToString(s.content,lt.katexConfig({throwOnError:!1,displayMode:c}));return`<${d} ${m} data-processed>${p}</${d}>`},u=(s,l,d,f,c)=>o(s[l],`${Y}-katex-inline`,"span",c),a=(s,l,d,f,c)=>o(s[l],`${Y}-katex-block`,"p",c,!0);e.inline.ruler.before("escape","math_inline",Yp({delimiters:n||Es.inline})),e.block.ruler.after("blockquote","math_block",Kp({delimiters:r||Es.block}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=u,e.renderer.rules.math_block=a},Jp=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(r,o,u,a,s)=>{var f,c;const l=r[o],d=l.content.trim();if(l.info==="mermaid"){if(l.attrSet("class",`${Y}-mermaid`),l.attrSet("data-mermaid-theme",t.themeRef.value),l.map&&l.level===0){const m=l.map[1]-1,p=!!((c=(f=a.srcLines[m])==null?void 0:f.trim())!=null&&c.startsWith("```"));l.attrSet("data-closed",`${p}`),l.attrSet("data-line",String(l.map[0]))}const h=mu.get(d);return h?(l.attrSet("data-processed",""),l.attrSet("data-content",d),`<p ${s.renderAttrs(l)}>${h}</p>`):`<div ${s.renderAttrs(l)}>${e.utils.escapeHtml(d)}</div>`}return n(r,o,u,a,s)}},Ss=(e,t,n)=>{const r=e.attrIndex(t),o=[t,n];r<0?e.attrPush(o):(e.attrs=e.attrs||[],e.attrs[r]=o)},em=e=>e.type==="inline",tm=e=>e.type==="paragraph_open",nm=e=>e.type==="list_item_open",rm=e=>e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0,um=(e,t)=>em(e[t])&&tm(e[t-1])&&nm(e[t-2])&&rm(e[t]),om=(e,t)=>{const n=e[t].level-1;for(let r=t-1;r>=0;r--)if(e[r].level===n)return r;return-1},im=e=>{const t=new e("html_inline","",0);return t.content="<label>",t},am=e=>{const t=new e("html_inline","",0);return t.content="</label>",t},sm=(e,t,n)=>{const r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",r.attrs=[["for",t]],r},lm=(e,t,n)=>{const r=new t("html_inline","",0),o=n.enabled?" ":' disabled="" ';return e.content.indexOf("[ ] ")===0?r.content='<input class="task-list-item-checkbox"'+o+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(r.content='<input class="task-list-item-checkbox" checked=""'+o+'type="checkbox">'),r},cm=(e,t,n)=>{if(e.children=e.children||[],e.children.unshift(lm(e,t,n)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),n.label)if(n.labelAfter){e.children.pop();const r="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+r+'">',e.children.push(sm(e.content,r,t))}else e.children.unshift(im(t)),e.children.push(am(t))},dm=(e,t={})=>{e.core.ruler.after("inline","github-task-lists",n=>{const r=n.tokens;for(let o=2;o<r.length;o++)um(r,o)&&(cm(r[o],n.Token,t),Ss(r[o-2],"class","task-list-item"+(t.enabled?" enabled":" ")),Ss(r[om(r,o-2)],"class","contains-task-list"))})},fm=e=>{e.core.ruler.push("init-line-number",t=>(t.tokens.forEach(n=>{n.map&&(n.attrs||(n.attrs=[]),n.attrs.push(["data-line",n.map[0].toString()]))}),!0))},hm=(e,t)=>{const{editorConfig:n,markdownItPlugins:r}=lt,o=i.inject("editorId"),u=i.inject("language"),a=i.inject("usedLanguageText"),s=i.inject("showCodeRowNumber"),l=i.inject("theme"),d=i.inject("customIcon"),f=i.inject("rootRef"),c=i.inject("setting"),h=i.ref([]),m=$p(e),p=Up(e),{reRenderRef:w,replaceMermaid:y}=Wp(e),{reRenderEcharts:A,replaceEcharts:b}=Hp(e),g=Ze({html:!0,breaks:!0,linkify:!0}),x=[{type:"image",plugin:Ap,options:{figcaption:!0,classes:"md-zoom"}},{type:"admonition",plugin:Gp,options:{}},{type:"taskList",plugin:dm,options:{}},{type:"heading",plugin:Zp,options:{mdHeadingId:e.mdHeadingId,headsRef:h}},{type:"code",plugin:Xp,options:{editorId:o,usedLanguageTextRef:a,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,customIconRef:d}},{type:"sub",plugin:_p,options:{}},{type:"sup",plugin:Dp,options:{}}];e.noKatex||x.push({type:"katex",plugin:Qp,options:{katexRef:p}}),e.noMermaid||x.push({type:"mermaid",plugin:Jp,options:{themeRef:l}}),e.noEcharts||x.push({type:"echarts",plugin:qp,options:{themeRef:l}}),r(x,{editorId:o}).forEach(_=>{g.use(_.plugin,_.options)});const k=g.options.highlight;g.set({highlight:(_,C,N)=>{if(k){const H=k(_,C,N);if(H)return H}let F;!e.noHighlight&&m.value?m.value.getLanguage(C)?F=m.value.highlight(_,{language:C,ignoreIllegals:!0}).value:F=m.value.highlightAuto(_).value:F=g.utils.escapeHtml(_);const O=s?mp(F.replace(/^\n+|\n+$/g,""),_.replace(/^\n+|\n+$/g,"")):`<span class="${Y}-code-block">${F.replace(/^\n+|\n+$/g,"")}</span>`;return`<pre><code class="language-${C}" language=${C}>${O}</code></pre>`}}),fm(g);const T=i.ref(`_article-key_${Io()}`),D=i.ref(e.sanitize(g.render(e.modelValue,{srcLines:e.modelValue.split(`
|
|
96
|
+
`)})));let S=()=>{},X=()=>{};const z=()=>{var C;const _=(C=f.value)==null?void 0:C.querySelectorAll(`#${o} p.${Y}-mermaid:not([data-closed=false])`);X(),X=xp(_,{customIcon:d.value}),S(),S=wp(_,{customIcon:d.value})},B=()=>{ot.emit(o,dp,D.value),e.onHtmlChanged(D.value),e.onGetCatalog(h.value),ot.emit(o,Ro,h.value),i.nextTick(()=>{y().then(z),b()})},j=()=>{h.value=[],D.value=e.sanitize(g.render(e.modelValue,{srcLines:e.modelValue.split(`
|
|
97
|
+
`)}))},I=i.computed(()=>(e.noKatex||!!p.value)&&(e.noHighlight||!!m.value));let W=-1;return i.watch([i.toRef(e,"modelValue"),I,w,u],()=>{W=window.setTimeout(()=>{j()},t?0:n.renderDelay)}),i.watch(()=>c.value.preview,()=>{c.value.preview&&i.nextTick(()=>{y().then(z),b(),ot.emit(o,Ro,h.value)})}),i.watch([D,A],()=>{B()}),i.onMounted(B),i.onMounted(()=>{ot.on(o,{name:fp,callback(){ot.emit(o,Ro,h.value)}}),ot.on(o,{name:ms,callback:()=>{T.value=`_article-key_${Io()}`,j()}})}),i.onBeforeUnmount(()=>{S(),X(),clearTimeout(W)}),{html:D,key:T}},pm=(e,t)=>{const n=i.inject("editorId"),r=i.inject("setting"),{noImgZoomIn:o}=e,u=tp(()=>{const a=document.querySelectorAll(`#${n}-preview img:not(.not-zoom):not(.medium-zoom-image)`);a.length!==0&&Pp(a,{background:"#00000073"})});i.onMounted(async()=>{!o&&r.value.preview&&await u()}),i.watch([t,()=>r.value.preview],async()=>{!o&&r.value.preview&&await u()})},Ds={checked:{regexp:/- \[x\]/,value:"- [ ]"},unChecked:{regexp:/- \[\s\]/,value:"- [x]"}},mm=(e,t)=>{const n=i.inject("editorId"),r=i.inject("rootRef");let o=()=>{};const u=()=>{if(!r.value)return!1;const a=r.value.querySelectorAll(".task-list-item.enabled"),s=l=>{var p;l.preventDefault();const d=l.target.checked?"unChecked":"checked",f=(p=l.target.parentElement)==null?void 0:p.dataset.line;if(!f)return;const c=Number(f),h=e.modelValue.split(`
|
|
98
|
+
`),m=h[Number(c)].replace(Ds[d].regexp,Ds[d].value);e.previewOnly?(h[Number(c)]=m,e.onChange(h.join(`
|
|
99
|
+
`))):ot.emit(n,hp,c+1,m)};a.forEach(l=>{l.addEventListener("click",s)}),o=()=>{a.forEach(l=>{l.removeEventListener("click",s)})}};i.onBeforeUnmount(()=>{o()}),i.watch([t],()=>{o(),i.nextTick(u)},{immediate:!0})},gm=(e,t,n)=>{const r=i.inject("setting"),o=()=>{i.nextTick(()=>{var a;(a=e.onRemount)==null||a.call(e)})},u=a=>{a&&o()};i.watch([t,n],o),i.watch(()=>r.value.preview,u),i.watch(()=>r.value.htmlPreview,u),i.onMounted(o)},Fs={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:e=>e},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:e=>e},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function},noEcharts:{type:Boolean},previewComponent:{type:[Object,Function],default:void 0}};({...Fs});const Ts=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes)},bm=(e,t)=>e.nodeType!==t.nodeType?!1:e.nodeType===Node.TEXT_NODE||e.nodeType===Node.COMMENT_NODE?e.textContent===t.textContent:e.nodeType===Node.ELEMENT_NODE?e.outerHTML===t.outerHTML:e.isEqualNode?e.isEqualNode(t):!1,ym=i.defineComponent({name:"UpdateOnDemand",props:{id:{type:String,required:!0},class:{type:[String,Array,Object],required:!0},html:{type:String,required:!0}},setup(e){const t=i.ref(),n=e.html,r=(o,u)=>{if(!t.value)return;const a=t.value,s=Array.from(a.childNodes),l=Math.min(o.length,u.length);let d=-1;for(let c=0;c<l;c++)if(!bm(o[c],u[c])){d=c;break}if(d===-1)if(u.length>o.length)d=o.length;else if(o.length>u.length)d=u.length;else return;const f=Math.min(d,s.length);for(let c=s.length-1;c>=f;c--)s[c].remove();for(let c=d;c<o.length;c++)a.appendChild(o[c].cloneNode(!0))};return i.watch(()=>e.html,(o,u)=>{const a=Ts(o),s=Ts(u||"");r(a,s)}),()=>i.createVNode("div",{id:e.id,class:e.class,innerHTML:n,ref:t},null)}}),xm=i.defineComponent({name:"ContentPreview",props:Fs,setup(e){const t=i.inject("editorId"),n=i.inject("setting"),r=i.inject("previewTheme"),o=i.inject("showCodeRowNumber"),{html:u,key:a}=hm(e,e.previewOnly);jp(e,u,a),pm(e,u),mm(e,u),gm(e,u,a);const s=i.computed(()=>[`${Y}-preview`,`${r==null?void 0:r.value}-theme`,o&&`${Y}-scrn`].filter(Boolean)),l=()=>{const d=`${t}-preview`;return e.previewComponent?i.h(e.previewComponent,{key:a.value,html:u.value,id:d,class:s.value}):i.createVNode(ym,{key:a.value,html:u.value,id:d,class:s.value},null)};return()=>i.createVNode(i.Fragment,null,[n.value.preview&&(e.previewOnly?l():i.createVNode("div",{id:`${t}-preview-wrapper`,class:`${Y}-preview-wrapper`,key:"content-preview-wrapper"},[l()])),n.value.htmlPreview&&i.createVNode("div",{id:`${t}-html-wrapper`,class:`${Y}-preview-wrapper`,key:"html-preview-wrapper"},[i.createVNode("div",{class:`${Y}-html`},[u.value])])])}}),wm=({text:e})=>e,Ns={modelValue:{type:String,default:""},onChange:{type:Function,default:void 0},theme:{type:String,default:"light"},class:{type:String,default:""},language:{type:String,default:"zh-CN"},onHtmlChanged:{type:Function,default:void 0},onGetCatalog:{type:Function,default:void 0},editorId:{type:String,default:void 0},id:{type:String,default:void 0},showCodeRowNumber:{type:Boolean,default:!0},previewTheme:{type:String,default:"default"},style:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:wm},sanitize:{type:Function,default:e=>e},noMermaid:{type:Boolean,default:!1},noKatex:{type:Boolean,default:!1},codeTheme:{type:String,default:"atom"},formatCopiedText:{type:Function,default:e=>e},codeStyleReverse:{type:Boolean,default:!0},codeStyleReverseList:{type:Array,default:["default","mk-cute"]},noHighlight:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean,default:!1},customIcon:{type:Object,default:{}},sanitizeMermaid:{type:Function,default:e=>Promise.resolve(e)},codeFoldable:{type:Boolean,default:!0},autoFoldThreshold:{type:Number,default:30},onRemount:{type:Function,default:void 0},noEcharts:{type:Boolean,default:!1},previewComponent:{type:[Object,Function],default:void 0}};({...Ns});const Is=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"];[...Is];const vm=(e,t,n)=>{const{editorId:r}=n,o={rerender(){ot.emit(r,ms)}};t.expose(o)},gu=i.defineComponent({name:"MdPreview",props:Ns,emits:Is,setup(e,t){const{noKatex:n,noMermaid:r,noHighlight:o}=e,u=i.ref(),a=zp(e);Bp(e,{rootRef:u,editorId:a}),vm(e,t,{editorId:a}),i.onBeforeUnmount(()=>{ot.clear(a)});const s=c=>{var h;(h=e.onChange)==null||h.call(e,c),t.emit("onChange",c),t.emit("update:modelValue",c)},l=c=>{var h;(h=e.onHtmlChanged)==null||h.call(e,c),t.emit("onHtmlChanged",c)},d=c=>{var h;(h=e.onGetCatalog)==null||h.call(e,c),t.emit("onGetCatalog",c)},f=()=>{var c;(c=e.onRemount)==null||c.call(e),t.emit("onRemount")};return()=>i.createVNode("div",{id:a,class:[Y,e.class,e.theme==="dark"&&`${Y}-dark`,`${Y}-previewOnly`],style:e.style,ref:u},[i.createVNode(xm,{modelValue:e.modelValue,onChange:s,onHtmlChanged:l,onGetCatalog:d,mdHeadingId:e.mdHeadingId,noMermaid:r,sanitize:e.sanitize,noKatex:n,formatCopiedText:e.formatCopiedText,noHighlight:o,noImgZoomIn:e.noImgZoomIn,previewOnly:!0,sanitizeMermaid:e.sanitizeMermaid,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,onRemount:f,noEcharts:e.noEcharts,previewComponent:e.previewComponent},null)])}});gu.install=e=>(e.component(gu.name,gu),e);const Am={onClick:{type:Function,default:void 0},language:{type:String,default:void 0},theme:{type:String,default:void 0},disabled:{type:Boolean,default:void 0}},zo=i.defineComponent({name:"NormalFooterToolbar",props:Am,emits:["onClick"],setup(e,t){return()=>{const n=cp({props:e,ctx:t});return i.createVNode("div",{class:[`${Y}-footer-item`,e.disabled&&`${Y}-disabled`],onClick:r=>{var o;e.disabled||((o=e.onClick)==null||o.call(e,r),t.emit("onClick",r))}},[n])}}});zo.install=e=>(e.component(zo.name,zo),e);var jo={exports:{}},me={},Ho={exports:{}},en={},Os;function Ls(){if(Os)return en;Os=1;function e(){var u={};return u["align-content"]=!1,u["align-items"]=!1,u["align-self"]=!1,u["alignment-adjust"]=!1,u["alignment-baseline"]=!1,u.all=!1,u["anchor-point"]=!1,u.animation=!1,u["animation-delay"]=!1,u["animation-direction"]=!1,u["animation-duration"]=!1,u["animation-fill-mode"]=!1,u["animation-iteration-count"]=!1,u["animation-name"]=!1,u["animation-play-state"]=!1,u["animation-timing-function"]=!1,u.azimuth=!1,u["backface-visibility"]=!1,u.background=!0,u["background-attachment"]=!0,u["background-clip"]=!0,u["background-color"]=!0,u["background-image"]=!0,u["background-origin"]=!0,u["background-position"]=!0,u["background-repeat"]=!0,u["background-size"]=!0,u["baseline-shift"]=!1,u.binding=!1,u.bleed=!1,u["bookmark-label"]=!1,u["bookmark-level"]=!1,u["bookmark-state"]=!1,u.border=!0,u["border-bottom"]=!0,u["border-bottom-color"]=!0,u["border-bottom-left-radius"]=!0,u["border-bottom-right-radius"]=!0,u["border-bottom-style"]=!0,u["border-bottom-width"]=!0,u["border-collapse"]=!0,u["border-color"]=!0,u["border-image"]=!0,u["border-image-outset"]=!0,u["border-image-repeat"]=!0,u["border-image-slice"]=!0,u["border-image-source"]=!0,u["border-image-width"]=!0,u["border-left"]=!0,u["border-left-color"]=!0,u["border-left-style"]=!0,u["border-left-width"]=!0,u["border-radius"]=!0,u["border-right"]=!0,u["border-right-color"]=!0,u["border-right-style"]=!0,u["border-right-width"]=!0,u["border-spacing"]=!0,u["border-style"]=!0,u["border-top"]=!0,u["border-top-color"]=!0,u["border-top-left-radius"]=!0,u["border-top-right-radius"]=!0,u["border-top-style"]=!0,u["border-top-width"]=!0,u["border-width"]=!0,u.bottom=!1,u["box-decoration-break"]=!0,u["box-shadow"]=!0,u["box-sizing"]=!0,u["box-snap"]=!0,u["box-suppress"]=!0,u["break-after"]=!0,u["break-before"]=!0,u["break-inside"]=!0,u["caption-side"]=!1,u.chains=!1,u.clear=!0,u.clip=!1,u["clip-path"]=!1,u["clip-rule"]=!1,u.color=!0,u["color-interpolation-filters"]=!0,u["column-count"]=!1,u["column-fill"]=!1,u["column-gap"]=!1,u["column-rule"]=!1,u["column-rule-color"]=!1,u["column-rule-style"]=!1,u["column-rule-width"]=!1,u["column-span"]=!1,u["column-width"]=!1,u.columns=!1,u.contain=!1,u.content=!1,u["counter-increment"]=!1,u["counter-reset"]=!1,u["counter-set"]=!1,u.crop=!1,u.cue=!1,u["cue-after"]=!1,u["cue-before"]=!1,u.cursor=!1,u.direction=!1,u.display=!0,u["display-inside"]=!0,u["display-list"]=!0,u["display-outside"]=!0,u["dominant-baseline"]=!1,u.elevation=!1,u["empty-cells"]=!1,u.filter=!1,u.flex=!1,u["flex-basis"]=!1,u["flex-direction"]=!1,u["flex-flow"]=!1,u["flex-grow"]=!1,u["flex-shrink"]=!1,u["flex-wrap"]=!1,u.float=!1,u["float-offset"]=!1,u["flood-color"]=!1,u["flood-opacity"]=!1,u["flow-from"]=!1,u["flow-into"]=!1,u.font=!0,u["font-family"]=!0,u["font-feature-settings"]=!0,u["font-kerning"]=!0,u["font-language-override"]=!0,u["font-size"]=!0,u["font-size-adjust"]=!0,u["font-stretch"]=!0,u["font-style"]=!0,u["font-synthesis"]=!0,u["font-variant"]=!0,u["font-variant-alternates"]=!0,u["font-variant-caps"]=!0,u["font-variant-east-asian"]=!0,u["font-variant-ligatures"]=!0,u["font-variant-numeric"]=!0,u["font-variant-position"]=!0,u["font-weight"]=!0,u.grid=!1,u["grid-area"]=!1,u["grid-auto-columns"]=!1,u["grid-auto-flow"]=!1,u["grid-auto-rows"]=!1,u["grid-column"]=!1,u["grid-column-end"]=!1,u["grid-column-start"]=!1,u["grid-row"]=!1,u["grid-row-end"]=!1,u["grid-row-start"]=!1,u["grid-template"]=!1,u["grid-template-areas"]=!1,u["grid-template-columns"]=!1,u["grid-template-rows"]=!1,u["hanging-punctuation"]=!1,u.height=!0,u.hyphens=!1,u.icon=!1,u["image-orientation"]=!1,u["image-resolution"]=!1,u["ime-mode"]=!1,u["initial-letters"]=!1,u["inline-box-align"]=!1,u["justify-content"]=!1,u["justify-items"]=!1,u["justify-self"]=!1,u.left=!1,u["letter-spacing"]=!0,u["lighting-color"]=!0,u["line-box-contain"]=!1,u["line-break"]=!1,u["line-grid"]=!1,u["line-height"]=!1,u["line-snap"]=!1,u["line-stacking"]=!1,u["line-stacking-ruby"]=!1,u["line-stacking-shift"]=!1,u["line-stacking-strategy"]=!1,u["list-style"]=!0,u["list-style-image"]=!0,u["list-style-position"]=!0,u["list-style-type"]=!0,u.margin=!0,u["margin-bottom"]=!0,u["margin-left"]=!0,u["margin-right"]=!0,u["margin-top"]=!0,u["marker-offset"]=!1,u["marker-side"]=!1,u.marks=!1,u.mask=!1,u["mask-box"]=!1,u["mask-box-outset"]=!1,u["mask-box-repeat"]=!1,u["mask-box-slice"]=!1,u["mask-box-source"]=!1,u["mask-box-width"]=!1,u["mask-clip"]=!1,u["mask-image"]=!1,u["mask-origin"]=!1,u["mask-position"]=!1,u["mask-repeat"]=!1,u["mask-size"]=!1,u["mask-source-type"]=!1,u["mask-type"]=!1,u["max-height"]=!0,u["max-lines"]=!1,u["max-width"]=!0,u["min-height"]=!0,u["min-width"]=!0,u["move-to"]=!1,u["nav-down"]=!1,u["nav-index"]=!1,u["nav-left"]=!1,u["nav-right"]=!1,u["nav-up"]=!1,u["object-fit"]=!1,u["object-position"]=!1,u.opacity=!1,u.order=!1,u.orphans=!1,u.outline=!1,u["outline-color"]=!1,u["outline-offset"]=!1,u["outline-style"]=!1,u["outline-width"]=!1,u.overflow=!1,u["overflow-wrap"]=!1,u["overflow-x"]=!1,u["overflow-y"]=!1,u.padding=!0,u["padding-bottom"]=!0,u["padding-left"]=!0,u["padding-right"]=!0,u["padding-top"]=!0,u.page=!1,u["page-break-after"]=!1,u["page-break-before"]=!1,u["page-break-inside"]=!1,u["page-policy"]=!1,u.pause=!1,u["pause-after"]=!1,u["pause-before"]=!1,u.perspective=!1,u["perspective-origin"]=!1,u.pitch=!1,u["pitch-range"]=!1,u["play-during"]=!1,u.position=!1,u["presentation-level"]=!1,u.quotes=!1,u["region-fragment"]=!1,u.resize=!1,u.rest=!1,u["rest-after"]=!1,u["rest-before"]=!1,u.richness=!1,u.right=!1,u.rotation=!1,u["rotation-point"]=!1,u["ruby-align"]=!1,u["ruby-merge"]=!1,u["ruby-position"]=!1,u["shape-image-threshold"]=!1,u["shape-outside"]=!1,u["shape-margin"]=!1,u.size=!1,u.speak=!1,u["speak-as"]=!1,u["speak-header"]=!1,u["speak-numeral"]=!1,u["speak-punctuation"]=!1,u["speech-rate"]=!1,u.stress=!1,u["string-set"]=!1,u["tab-size"]=!1,u["table-layout"]=!1,u["text-align"]=!0,u["text-align-last"]=!0,u["text-combine-upright"]=!0,u["text-decoration"]=!0,u["text-decoration-color"]=!0,u["text-decoration-line"]=!0,u["text-decoration-skip"]=!0,u["text-decoration-style"]=!0,u["text-emphasis"]=!0,u["text-emphasis-color"]=!0,u["text-emphasis-position"]=!0,u["text-emphasis-style"]=!0,u["text-height"]=!0,u["text-indent"]=!0,u["text-justify"]=!0,u["text-orientation"]=!0,u["text-overflow"]=!0,u["text-shadow"]=!0,u["text-space-collapse"]=!0,u["text-transform"]=!0,u["text-underline-position"]=!0,u["text-wrap"]=!0,u.top=!1,u.transform=!1,u["transform-origin"]=!1,u["transform-style"]=!1,u.transition=!1,u["transition-delay"]=!1,u["transition-duration"]=!1,u["transition-property"]=!1,u["transition-timing-function"]=!1,u["unicode-bidi"]=!1,u["vertical-align"]=!1,u.visibility=!1,u["voice-balance"]=!1,u["voice-duration"]=!1,u["voice-family"]=!1,u["voice-pitch"]=!1,u["voice-range"]=!1,u["voice-rate"]=!1,u["voice-stress"]=!1,u["voice-volume"]=!1,u.volume=!1,u["white-space"]=!1,u.widows=!1,u.width=!0,u["will-change"]=!1,u["word-break"]=!0,u["word-spacing"]=!0,u["word-wrap"]=!0,u["wrap-flow"]=!1,u["wrap-through"]=!1,u["writing-mode"]=!1,u["z-index"]=!1,u}function t(u,a,s){}function n(u,a,s){}var r=/javascript\s*\:/img;function o(u,a){return r.test(a)?"":a}return en.whiteList=e(),en.getDefaultWhiteList=e,en.onAttr=t,en.onIgnoreAttr=n,en.safeAttrValue=o,en}var Vs,Ps;function Rs(){return Ps||(Ps=1,Vs={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}),Vs}var $o,Ms;function km(){if(Ms)return $o;Ms=1;var e=Rs();function t(n,r){n=e.trimRight(n),n[n.length-1]!==";"&&(n+=";");var o=n.length,u=!1,a=0,s=0,l="";function d(){if(!u){var h=e.trim(n.slice(a,s)),m=h.indexOf(":");if(m!==-1){var p=e.trim(h.slice(0,m)),w=e.trim(h.slice(m+1));if(p){var y=r(a,l.length,p,w,h);y&&(l+=y+"; ")}}}a=s+1}for(;s<o;s++){var f=n[s];if(f==="/"&&n[s+1]==="*"){var c=n.indexOf("*/",s+2);if(c===-1)break;s=c+1,a=s+1,u=!1}else f==="("?u=!0:f===")"?u=!1:f===";"?u||d():f===`
|
|
100
|
+
`&&d()}return e.trim(l)}return $o=t,$o}var Uo,Bs;function Cm(){if(Bs)return Uo;Bs=1;var e=Ls(),t=km();Rs();function n(u){return u==null}function r(u){var a={};for(var s in u)a[s]=u[s];return a}function o(u){u=r(u||{}),u.whiteList=u.whiteList||e.whiteList,u.onAttr=u.onAttr||e.onAttr,u.onIgnoreAttr=u.onIgnoreAttr||e.onIgnoreAttr,u.safeAttrValue=u.safeAttrValue||e.safeAttrValue,this.options=u}return o.prototype.process=function(u){if(u=u||"",u=u.toString(),!u)return"";var a=this,s=a.options,l=s.whiteList,d=s.onAttr,f=s.onIgnoreAttr,c=s.safeAttrValue,h=t(u,function(m,p,w,y,A){var b=l[w],g=!1;if(b===!0?g=b:typeof b=="function"?g=b(y):b instanceof RegExp&&(g=b.test(y)),g!==!0&&(g=!1),y=c(w,y),!!y){var x={position:p,sourcePosition:m,source:A,isWhite:g};if(g){var k=d(w,y,x);return n(k)?w+":"+y:k}else{var k=f(w,y,x);if(!n(k))return k}}});return h},Uo=o,Uo}var zs;function Wo(){return zs||(zs=1,function(e,t){var n=Ls(),r=Cm();function o(a,s){var l=new r(s);return l.process(a)}t=e.exports=o,t.FilterCSS=r;for(var u in n)t[u]=n[u];typeof window<"u"&&(window.filterCSS=e.exports)}(Ho,Ho.exports)),Ho.exports}var js,Hs;function Go(){return Hs||(Hs=1,js={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}}),js}var $s;function Us(){if($s)return me;$s=1;var e=Wo().FilterCSS,t=Wo().getDefaultWhiteList,n=Go();function r(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var o=new e;function u(C,N,F){}function a(C,N,F){}function s(C,N,F){}function l(C,N,F){}function d(C){return C.replace(c,"<").replace(h,">")}function f(C,N,F,O){if(F=z(F),N==="href"||N==="src"){if(F=n.trim(F),F==="#")return"#";if(!(F.substr(0,7)==="http://"||F.substr(0,8)==="https://"||F.substr(0,7)==="mailto:"||F.substr(0,4)==="tel:"||F.substr(0,11)==="data:image/"||F.substr(0,6)==="ftp://"||F.substr(0,2)==="./"||F.substr(0,3)==="../"||F[0]==="#"||F[0]==="/"))return""}else if(N==="background"){if(b.lastIndex=0,b.test(F))return""}else if(N==="style"){if(g.lastIndex=0,g.test(F)||(x.lastIndex=0,x.test(F)&&(b.lastIndex=0,b.test(F))))return"";O!==!1&&(O=O||o,F=O.process(F))}return F=B(F),F}var c=/</g,h=/>/g,m=/"/g,p=/"/g,w=/&#([a-zA-Z0-9]*);?/gim,y=/:?/gim,A=/&newline;?/gim,b=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,g=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,x=/u\s*r\s*l\s*\(.*/gi;function k(C){return C.replace(m,""")}function T(C){return C.replace(p,'"')}function D(C){return C.replace(w,function(N,F){return F[0]==="x"||F[0]==="X"?String.fromCharCode(parseInt(F.substr(1),16)):String.fromCharCode(parseInt(F,10))})}function S(C){return C.replace(y,":").replace(A," ")}function X(C){for(var N="",F=0,O=C.length;F<O;F++)N+=C.charCodeAt(F)<32?" ":C.charAt(F);return n.trim(N)}function z(C){return C=T(C),C=D(C),C=S(C),C=X(C),C}function B(C){return C=k(C),C=d(C),C}function j(){return""}function I(C,N){typeof N!="function"&&(N=function(){});var F=!Array.isArray(C);function O(R){return F?!0:n.indexOf(C,R)!==-1}var H=[],$=!1;return{onIgnoreTag:function(R,V,L){if(O(R))if(L.isClosing){var M="[/removed]",G=L.position+M.length;return H.push([$!==!1?$:L.position,G]),$=!1,M}else return $||($=L.position),"[removed]";else return N(R,V,L)},remove:function(R){var V="",L=0;return n.forEach(H,function(M){V+=R.slice(L,M[0]),L=M[1]}),V+=R.slice(L),V}}}function W(C){for(var N="",F=0;F<C.length;){var O=C.indexOf("<!--",F);if(O===-1){N+=C.slice(F);break}N+=C.slice(F,O);var H=C.indexOf("-->",O);if(H===-1)break;F=H+3}return N}function _(C){var N=C.split("");return N=N.filter(function(F){var O=F.charCodeAt(0);return O===127?!1:O<=31?O===10||O===13:!0}),N.join("")}return me.whiteList=r(),me.getDefaultWhiteList=r,me.onTag=u,me.onIgnoreTag=a,me.onTagAttr=s,me.onIgnoreTagAttr=l,me.safeAttrValue=f,me.escapeHtml=d,me.escapeQuote=k,me.unescapeQuote=T,me.escapeHtmlEntities=D,me.escapeDangerHtml5Entities=S,me.clearNonPrintableCharacter=X,me.friendlyAttrValue=z,me.escapeAttrValue=B,me.onIgnoreTagStripAll=j,me.StripTagBody=I,me.stripCommentTag=W,me.stripBlankChar=_,me.attributeWrapSign='"',me.cssFilter=o,me.getDefaultCSSWhiteList=t,me}var bu={},Ws;function Gs(){if(Ws)return bu;Ws=1;var e=Go();function t(c){var h=e.spaceIndex(c),m;return h===-1?m=c.slice(1,-1):m=c.slice(1,h+1),m=e.trim(m).toLowerCase(),m.slice(0,1)==="/"&&(m=m.slice(1)),m.slice(-1)==="/"&&(m=m.slice(0,-1)),m}function n(c){return c.slice(0,2)==="</"}function r(c,h,m){var p="",w=0,y=!1,A=!1,b=0,g=c.length,x="",k="";e:for(b=0;b<g;b++){var T=c.charAt(b);if(y===!1){if(T==="<"){y=b;continue}}else if(A===!1){if(T==="<"){p+=m(c.slice(w,b)),y=b,w=b;continue}if(T===">"||b===g-1){p+=m(c.slice(w,y)),k=c.slice(y,b+1),x=t(k),p+=h(y,p.length,x,k,n(k)),w=b+1,y=!1;continue}if(T==='"'||T==="'")for(var D=1,S=c.charAt(b-D);S.trim()===""||S==="=";){if(S==="="){A=T;continue e}S=c.charAt(b-++D)}}else if(T===A){A=!1;continue}}return w<g&&(p+=m(c.substr(w))),p}var o=/[^a-zA-Z0-9\\_:.-]/gim;function u(c,h){var m=0,p=0,w=[],y=!1,A=c.length;function b(D,S){if(D=e.trim(D),D=D.replace(o,"").toLowerCase(),!(D.length<1)){var X=h(D,S||"");X&&w.push(X)}}for(var g=0;g<A;g++){var x=c.charAt(g),k,T;if(y===!1&&x==="="){y=c.slice(m,g),m=g+1,p=c.charAt(m)==='"'||c.charAt(m)==="'"?m:s(c,g+1);continue}if(y!==!1&&g===p){if(T=c.indexOf(x,g+1),T===-1)break;k=e.trim(c.slice(p+1,T)),b(y,k),y=!1,g=T,m=g+1;continue}if(/\s|\n|\t/.test(x))if(c=c.replace(/\s|\n|\t/g," "),y===!1)if(T=a(c,g),T===-1){k=e.trim(c.slice(m,g)),b(k),y=!1,m=g+1;continue}else{g=T-1;continue}else if(T=l(c,g-1),T===-1){k=e.trim(c.slice(m,g)),k=f(k),b(y,k),y=!1,m=g+1;continue}else continue}return m<c.length&&(y===!1?b(c.slice(m)):b(y,f(e.trim(c.slice(m))))),e.trim(w.join(" "))}function a(c,h){for(;h<c.length;h++){var m=c[h];if(m!==" ")return m==="="?h:-1}}function s(c,h){for(;h<c.length;h++){var m=c[h];if(m!==" ")return m==="'"||m==='"'?h:-1}}function l(c,h){for(;h>0;h--){var m=c[h];if(m!==" ")return m==="="?h:-1}}function d(c){return c[0]==='"'&&c[c.length-1]==='"'||c[0]==="'"&&c[c.length-1]==="'"}function f(c){return d(c)?c.substr(1,c.length-2):c}return bu.parseTag=r,bu.parseAttr=u,bu}var Xo,Xs;function _m(){if(Xs)return Xo;Xs=1;var e=Wo().FilterCSS,t=Us(),n=Gs(),r=n.parseTag,o=n.parseAttr,u=Go();function a(c){return c==null}function s(c){var h=u.spaceIndex(c);if(h===-1)return{html:"",closing:c[c.length-2]==="/"};c=u.trim(c.slice(h+1,-1));var m=c[c.length-1]==="/";return m&&(c=u.trim(c.slice(0,-1))),{html:c,closing:m}}function l(c){var h={};for(var m in c)h[m]=c[m];return h}function d(c){var h={};for(var m in c)Array.isArray(c[m])?h[m.toLowerCase()]=c[m].map(function(p){return p.toLowerCase()}):h[m.toLowerCase()]=c[m];return h}function f(c){c=l(c||{}),c.stripIgnoreTag&&(c.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),c.onIgnoreTag=t.onIgnoreTagStripAll),c.whiteList||c.allowList?c.whiteList=d(c.whiteList||c.allowList):c.whiteList=t.whiteList,this.attributeWrapSign=c.singleQuotedAttributeValue===!0?"'":t.attributeWrapSign,c.onTag=c.onTag||t.onTag,c.onTagAttr=c.onTagAttr||t.onTagAttr,c.onIgnoreTag=c.onIgnoreTag||t.onIgnoreTag,c.onIgnoreTagAttr=c.onIgnoreTagAttr||t.onIgnoreTagAttr,c.safeAttrValue=c.safeAttrValue||t.safeAttrValue,c.escapeHtml=c.escapeHtml||t.escapeHtml,this.options=c,c.css===!1?this.cssFilter=!1:(c.css=c.css||{},this.cssFilter=new e(c.css))}return f.prototype.process=function(c){if(c=c||"",c=c.toString(),!c)return"";var h=this,m=h.options,p=m.whiteList,w=m.onTag,y=m.onIgnoreTag,A=m.onTagAttr,b=m.onIgnoreTagAttr,g=m.safeAttrValue,x=m.escapeHtml,k=h.attributeWrapSign,T=h.cssFilter;m.stripBlankChar&&(c=t.stripBlankChar(c)),m.allowCommentTag||(c=t.stripCommentTag(c));var D=!1;m.stripIgnoreTagBody&&(D=t.StripTagBody(m.stripIgnoreTagBody,y),y=D.onIgnoreTag);var S=r(c,function(X,z,B,j,I){var W={sourcePosition:X,position:z,isClosing:I,isWhite:Object.prototype.hasOwnProperty.call(p,B)},_=w(B,j,W);if(!a(_))return _;if(W.isWhite){if(W.isClosing)return"</"+B+">";var C=s(j),N=p[B],F=o(C.html,function(O,H){var $=u.indexOf(N,O)!==-1,R=A(B,O,H,$);return a(R)?$?(H=g(B,O,H,T),H?O+"="+k+H+k:O):(R=b(B,O,H,$),a(R)?void 0:R):R});return j="<"+B,F&&(j+=" "+F),C.closing&&(j+=" /"),j+=">",j}else return _=y(B,j,W),a(_)?x(j):_},x);return D&&(S=D.remove(S)),S},Xo=f,Xo}var qs;function Em(){return qs||(qs=1,function(e,t){var n=Us(),r=Gs(),o=_m();function u(s,l){var d=new o(l);return d.process(s)}t=e.exports=u,t.filterXSS=u,t.FilterXSS=o,function(){for(var s in n)t[s]=n[s];for(var l in r)t[l]=r[l]}(),typeof window<"u"&&(window.filterXSS=e.exports);function a(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}a()&&(self.filterXSS=e.exports)}(jo,jo.exports)),jo.exports}Em();const tn=i.defineComponent({name:"FMarkdownPreview",props:fs,setup(e){return()=>i.createVNode("div",{class:"f-markdown-preview-container"},[i.createVNode(gu,{modelValue:e.content},null)])}});tn.install=e=>{e.component(tn.name,tn)};const qo="farris-x-preview-bridge",Zo=1,Yo="assistant.message";function Zs(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function Ys(e){return e!==null&&typeof e=="object"}function Ks(e){if(!Ys(e)||e.source!==qo||e.v!==Zo||e.type!==Yo)return!1;const t=e.payload;return!(!Ys(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function Sm(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function Qs(e,t,n){const r=Zs(n);try{return e.postMessage({source:qo,v:Zo,type:Yo,payload:r},t),!0}catch{return!1}}function Js(e){const t=e.allowTopAsSource!==!1,n=r=>{var o;Sm(r,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(r.origin)||Ks(r.data)&&((o=e.onAssistantMessage)==null||o.call(e,r.data.payload)))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}const Dm="/platform/common/web/renderer/index.html#/preview",Fm="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",Tm="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",Nm="67441dbb-0219-46f2-b247-51555c317995";function el(e){if(e.url)return e.url;const t=e.baseUri??Dm,n=e.metadataPath??Fm,r=e.projectPath??Tm,o=e.baseMetadataId??Nm;return`${t}?metadataPath=${encodeURIComponent(n)}&projectPath=${encodeURIComponent(r)}&baseMetadataId=${encodeURIComponent(o)}`}function Im(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=el(e),n=new URL(t,window.location.href).origin;return n==="null"||n===""?window.location.origin:n}catch{return null}}const lr=i.defineComponent({name:"ChatPreview",props:ds,setup(e,{expose:t}){const n=i.ref(null),r=i.ref(null),o=i.ref(!1),u=i.ref(!1),a=i.computed(()=>el(e.previewConfig??{})),s=i.computed(()=>{var C;return((C=e.previewConfig)==null?void 0:C.contentType)==="markdown"}),l=i.computed(()=>{var C;return Object.keys(((C=e.previewConfig)==null?void 0:C.contentMap)??{})}),d=i.computed(()=>l.value.filter(C=>C).length>0),f=i.ref(),c=i.ref(),h=i.ref(!1);let m=null;i.onBeforeUnmount(()=>{m==null||m(),m=null,j()}),i.watch(()=>[a.value,n.value,s.value],()=>{if(m==null||m(),m=null,s.value)return;const C=n.value;if(!C)return;h.value=!1,o.value=!1,u.value=!1;const N=Date.now(),F=200,O=300,H=1e4;let $=!1,R=null,V=null;V=window.setTimeout(()=>{V=null,$||(u.value=!0)},F);const L=()=>{if($)return;if($=!0,R&&(window.clearTimeout(R),R=null),V&&(window.clearTimeout(V),V=null),h.value=!0,I(C),u.value){const J=Date.now()-N,Z=Math.max(0,O-J);setTimeout(()=>{o.value=!0},Z)}else o.value=!0;const G=()=>{var J;return(J=e.onIframeLoad)==null?void 0:J.call(e)};G(),window.setTimeout(G,0),window.setTimeout(G,120)},M=()=>{var G;$||($=!0,V&&(window.clearTimeout(V),V=null),console.warn("ChatPreview: iframe load timeout"),h.value=!0,o.value=!0,(G=e.onIframeLoad)==null||G.call(e))};C.addEventListener("load",L,{once:!0}),R=window.setTimeout(M,H),m=()=>{C.removeEventListener("load",L),R&&(window.clearTimeout(R),R=null),V&&(window.clearTimeout(V),V=null)}},{flush:"post"}),i.watch([s,()=>{var C;return(C=e.previewConfig)==null?void 0:C.contentMap}],()=>{j(),s.value&&i.nextTick(()=>B())},{flush:"post"}),i.watch(()=>{var C;return(C=e.previewConfig)==null?void 0:C.contentMap},C=>{if(C){const N=Object.keys(C);f.value=N[0]??""}else f.value="";p()},{immediate:!0});function p(C){var N,F;C&&(f.value=C),d.value&&f.value?c.value=((F=(N=e.previewConfig)==null?void 0:N.contentMap)==null?void 0:F[f.value])||"":c.value=""}function w(C){var O;if(s.value||!h.value)return!1;const N=(O=n.value)==null?void 0:O.contentWindow;if(!N)return!1;const F=Im(e.previewConfig??{});return F?Qs(N,F,C):!1}t({postAssistantPayload:w});const y=i.ref(!1);let A=null;const b=800;function g(){y.value=!0,z(!0),A!=null&&(window.clearTimeout(A),A=null)}function x(){A!=null&&window.clearTimeout(A),A=window.setTimeout(()=>{y.value=!1,z(!1),A=null},b)}function k(){g(),x()}function T(){g()}function D(){x()}let S=[];function X(){const C=r.value;if(!C)return[];const N=[],F=C.querySelectorAll(".f-markdown-preview-container");return F.length>0&&F.forEach(O=>N.push(O)),N.length===0&&C.scrollHeight>C.clientHeight&&N.push(C),N}function z(C){const N=r.value;N&&N.querySelectorAll(".f-markdown-preview-container").forEach(F=>{F.classList.toggle("f-chat-preview-scrollbar-visible",C)})}function B(){const C=X();S=C,C.forEach(N=>{N.addEventListener("scroll",k,{passive:!0}),N.addEventListener("mouseenter",T),N.addEventListener("mouseleave",D)})}function j(){S.forEach(C=>{C.removeEventListener("scroll",k),C.removeEventListener("mouseenter",T),C.removeEventListener("mouseleave",D)}),S=[]}function I(C){try{const N=C.contentDocument;if(!N)return;const F="f-chat-preview-injected-scrollbar-style";if(N.getElementById(F))return;const O=N.createElement("style");O.id=F,O.textContent=`
|
|
101
101
|
html, body {
|
|
102
102
|
scrollbar-width: thin;
|
|
103
103
|
scrollbar-color: transparent transparent;
|
|
@@ -123,7 +123,7 @@ See: https://github.com/francoischalifour/medium-zoom`)}},Dm=function(t){var n=d
|
|
|
123
123
|
body.iframe-scrollbar-visible::-webkit-scrollbar-thumb {
|
|
124
124
|
background: rgba(0, 0, 0, 0.2);
|
|
125
125
|
}
|
|
126
|
-
`,(
|
|
126
|
+
`,(N.head||N.documentElement).appendChild(O);const H="f-chat-preview-injected-scrollbar-script";if(N.getElementById(H))return;const $=N.createElement("script");$.id=H,$.textContent=`
|
|
127
127
|
(function() {
|
|
128
128
|
var hideTimer = null;
|
|
129
129
|
var HIDE_DELAY = 800;
|
|
@@ -144,8 +144,8 @@ See: https://github.com/francoischalifour/medium-zoom`)}},Dm=function(t){var n=d
|
|
|
144
144
|
document.addEventListener('mouseenter', show);
|
|
145
145
|
document.addEventListener('mouseleave', scheduleHide);
|
|
146
146
|
})();
|
|
147
|
-
`,(
|
|
148
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
147
|
+
`,(N.head||N.documentElement).appendChild($)}catch{}}const W=()=>{var C;return i.createVNode("div",{class:"f-chat-preview-header"},[i.createVNode("div",{class:"f-chat-preview-header-left"},[i.createVNode("button",{class:"f-chat-preview-preview-btn"},[i.createVNode("i",{class:"fx-icon fx-icon-card_info"},null),i.createVNode("span",{class:"f-chat-preview-preview-text"},[((C=e.previewConfig)==null?void 0:C.title)||"预览"])])]),i.createVNode("div",{class:"f-chat-preview-header-right"},[i.createVNode("button",{class:"f-chat-preview-tool-btn",title:"关闭预览","aria-label":"关闭预览",onClick:()=>{var N;return(N=e.onClose)==null?void 0:N.call(e)}},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_close"},null)])])])},_=()=>{var C;return d.value?c.value?i.createVNode("div",{class:"d-flex"},[i.createVNode(An,{class:"f-chat-content-main-layout",direction:"row"},{default:()=>[i.createVNode(ar,{position:"center",resizable:!1,minWidth:100,class:"f-chat-content-main-left"},{default:()=>[i.createVNode("div",{class:"f-chat-preview-content-nav"},[i.createVNode("div",{class:"f-chat-preview-content-nav-title"},[i.createTextVNode("全部文件")]),i.createVNode("div",{class:"f-chat-preview-content-nav-content"},[l.value.map((N,F)=>i.createVNode("div",{key:F,class:["f-chat-preview-content-nav-item",N===f.value?"active-nav-item":""],title:N,onClick:()=>p(N)},[N]))])])]}),i.createVNode(ar,{position:"right",resizable:!0,width:600,class:"f-chat-preview-pane-right"},{default:()=>[i.createVNode(tn,{content:c.value},null)]})]})]):null:i.createVNode(tn,{content:((C=e.previewConfig)==null?void 0:C.content)??""},null)};return()=>i.createVNode("div",{class:"f-chat-preview"},[W(),i.createVNode("div",{ref:r,class:"f-chat-preview-content",style:{overflow:s.value?"auto":"hidden"}},[s.value?_():i.createVNode(i.Fragment,null,[i.withDirectives(i.createVNode("div",{class:["f-chat-preview-skeleton",{"f-chat-preview-skeleton--fade-out":o.value}]},[i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"60%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"80%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"45%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"70%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"55%"}},null)]),[[i.vShow,u.value]]),i.createVNode("iframe",{ref:n,name:"preview-iframe",title:"preview-iframe",src:a.value,class:["f-chat-preview-iframe",{"f-chat-preview-iframe--visible":o.value}]},null)])])])}});function Om(e,t){const n=typeof window<"u"?window.AgentWorkbenchSDK:void 0;if(!n){console.warn("[AgentWorkbenchSDK] invoke: window.AgentWorkbenchSDK is not available");return}try{const r=n[e];if(typeof r!="function"){console.warn("[AgentWorkbenchSDK] invoke: not a function:",e);return}return r(...t??[])}catch(r){console.warn("[AgentWorkbenchSDK] invoke error:",e,r);return}}function Lm(e){return Js(e)}let Vm=0;const cr=[];function nn(){var e;return((e=cr[cr.length-1])==null?void 0:e.h)??{}}function Pm(e){const t=++Vm;return cr.push({id:t,h:e}),()=>{const n=cr.findIndex(r=>r.id===t);n>=0&&cr.splice(n,1)}}const Rm={showPreview(e){var t,n;(n=(t=nn()).showPreview)==null||n.call(t,e)},replaceRightPreview(e){var t,n;(n=(t=nn()).showPreview)==null||n.call(t,e)},closePreviewPane(){var e,t;(t=(e=nn()).closePreviewPane)==null||t.call(e)},closeRightPreview(){var e,t;(t=(e=nn()).closeRightPreview)==null||t.call(e)},showFullScreenPreview(e){var t,n;(n=(t=nn()).showFullScreenPreview)==null||n.call(t,e)},closeFullScreenPreview(){var e,t;(t=(e=nn()).closeFullScreenPreview)==null||t.call(e)},isPreviewLayoutActive(){return typeof nn().showPreview=="function"}};lr.install=e=>{e.component(lr.name,lr)};const tl={modelValue:{type:Boolean,default:!1},title:{type:[String,Object],default:"标题"},description:{type:[String,Object],default:""},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"},closeOnMask:{type:Boolean,default:!1},showDivider:{type:Boolean,default:!0}},dr=i.defineComponent({name:"FXConfirmDialog",props:tl,emits:{"update:modelValue":e=>!0,cancel:()=>!0,confirm:()=>!0},setup(e,{emit:t,slots:n}){function r(){t("update:modelValue",!1)}function o(){t("cancel"),r()}function u(){t("confirm"),r()}function a(s){e.closeOnMask&&s.target===s.currentTarget&&o()}return()=>e.modelValue?i.createVNode(i.Teleport,{to:"body"},{default:()=>[i.createVNode("div",{class:"f-chat-confirm-dialog-mask",onClick:a},[i.createVNode("div",{class:"f-chat-confirm-dialog"},[i.createVNode("div",{class:"f-chat-confirm-dialog-title"},[n.title?n.title():e.title]),i.createVNode("div",{class:"f-chat-confirm-dialog-description"},[n.default?n.default():e.description]),i.createVNode("div",{class:["f-chat-confirm-dialog-actions",{"with-divider":e.showDivider}]},[i.createVNode("button",{type:"button",class:"f-chat-confirm-dialog-btn f-chat-confirm-dialog-btn-cancel",onClick:o},[e.cancelText]),i.createVNode("button",{type:"button",class:"f-chat-confirm-dialog-btn f-chat-confirm-dialog-btn-confirm",onClick:u},[e.confirmText])])])])]}):null}});dr.install=e=>{e.component(dr.name,dr)};function nl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mm(e){if(Array.isArray(e))return e}function Bm(e,t,n){return(t=Gm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zm(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,u,a,s=[],l=!0,d=!1;try{if(u=(n=n.call(e)).next,t!==0)for(;!(l=(r=u.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){d=!0,o=f}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw o}}return s}}function jm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
148
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ul(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rl(Object(n),!0).forEach(function(r){Bm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hm(e,t){if(e==null)return{};var n,r,o=$m(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)n=u[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $m(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Um(e,t){return Mm(e)||zm(e,t)||Xm(e,t)||jm()}function Wm(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gm(e){var t=Wm(e,"string");return typeof t=="symbol"?t:t+""}function Xm(e,t){if(e){if(typeof e=="string")return nl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nl(e,t):void 0}}function qm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ol(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function il(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ol(Object(n),!0).forEach(function(r){qm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,u){return u(o)},r)}}function fr(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),u=0;u<r;u++)o[u]=arguments[u];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function yu(e){return{}.toString.call(e).includes("Object")}function Ym(e){return!Object.keys(e).length}function hr(e){return typeof e=="function"}function Km(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qm(e,t){return yu(t)||Wt("changeType"),Object.keys(t).some(function(n){return!Km(e,n)})&&Wt("changeField"),t}function Jm(e){hr(e)||Wt("selectorType")}function e1(e){hr(e)||yu(e)||Wt("handlerType"),yu(e)&&Object.values(e).some(function(t){return!hr(t)})&&Wt("handlersType")}function t1(e){e||Wt("initialIsRequired"),yu(e)||Wt("initialType"),Ym(e)&&Wt("initialContent")}function n1(e,t){throw new Error(e[t]||e.default)}var r1={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Wt=fr(n1)(r1),xu={changes:Qm,selector:Jm,handler:e1,initial:t1};function u1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xu.initial(e),xu.handler(t);var n={current:e},r=fr(a1)(n,t),o=fr(i1)(n),u=fr(xu.changes)(e),a=fr(o1)(n);function s(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return xu.selector(d),d(n.current)}function l(d){Zm(r,o,u,a)(d)}return[s,l]}function o1(e,t){return hr(t)?t(e.current):t}function i1(e,t){return e.current=il(il({},e.current),t),t}function a1(e,t,n){return hr(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var s1={create:u1},l1={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function c1(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),u=0;u<r;u++)o[u]=arguments[u];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function d1(e){return{}.toString.call(e).includes("Object")}function f1(e){return e||sl("configIsRequired"),d1(e)||sl("configType"),e.urls?(h1(),{paths:{vs:e.urls.monacoBase}}):e}function h1(){console.warn(al.deprecation)}function p1(e,t){throw new Error(e[t]||e.default)}var al={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
149
149
|
You are using deprecated way of configuration.
|
|
150
150
|
|
|
151
151
|
Instead of using
|
|
@@ -154,6 +154,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
154
154
|
monaco.config({ paths: { vs: '...' } })
|
|
155
155
|
|
|
156
156
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
157
|
-
`},
|
|
158
|
-
`).length,
|
|
159
|
-
`).length:0;A=T?U+D:D}return A1+A*cl}const d=i.computed(()=>(o.value,l()>Cn));function f(){n.value=!n.value,r.value=n.value?l():Cn,h()}function c(){if(!o.value)return;o.value=null;const w=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(w,{timeout:100}):setTimeout(w,0)}function h(){if(a.value)return;const m=u.value,w=o.value;if(!m||!(w!=null&&w.layout))return;const y=m.clientWidth||m.offsetWidth,A=r.value;requestAnimationFrame(()=>{var b,g;a.value||!o.value||(g=(b=o.value)==null?void 0:b.layout)==null||g.call(b,{width:y,height:A})})}function p(){var m;a.value||!u.value||!((m=e.content)!=null&&m.code)||v1.init().then(w=>{var x;if(a.value||!u.value||!((x=e.content)!=null&&x.code))return;const{value:y,originalValue:A,language:b="typescript"}=e.content.code,g={readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",glyphMargin:!1,lineDecorationsWidth:0,folding:!1,renderLineHighlight:"none",fontSize:12,lineHeight:cl,padding:{top:8,bottom:8}};if(A){const k=w.editor.createDiffEditor(u.value,{...g,renderSideBySide:!1,renderOverviewRuler:!1});k.setModel({original:w.editor.createModel(A,b),modified:w.editor.createModel(y,b)}),k.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),k.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),i.nextTick(()=>{var T;if(a.value)return;const F=(T=k.getContainerDomNode)==null?void 0:T.call(k);if(F){const D=F.querySelector('.diff-editor-cell.original, [class*="original"]');D&&(D.style.display="none")}}),o.value=k}else{const k=w.editor.create(u.value,{value:y,language:b,...g});o.value=k}r.value=Cn,i.nextTick(()=>h())})}return i.onMounted(()=>{k1(()=>{a.value||!u.value||p()})}),i.watch(t,m=>{m&&!a.value&&i.nextTick(()=>h())}),i.onBeforeUnmount(()=>{a.value=!0,c()}),i.watch(()=>{var m,w;return(w=(m=e.content)==null?void 0:m.code)==null?void 0:w.value},()=>{a.value||(n.value?r.value=l():r.value=Cn,h())}),()=>{const m=e.content;if(!m)return null;const{message:w,fileIcon:y,fileName:A,code:b}=m;return i.createVNode("div",{class:"f-chat-message-coding"},[i.createVNode("div",{class:"f-chat-coding-message"},[w]),i.createVNode("div",{class:"f-chat-coding-card"},[i.createVNode("div",{class:"f-chat-coding-header",onClick:s,role:"button",tabindex:0,onKeydown:g=>g.key==="Enter"&&s()},[i.createVNode("span",{class:"f-chat-coding-header-icon-slot"},[i.createVNode("span",{class:"f-chat-coding-header-icon"},[i.createVNode("img",{src:y,alt:"",onError:g=>{var x;g.target.style.display="none",(x=g.target.parentElement)==null||x.classList.add("icon-error")}},null),i.createVNode("span",{class:"f-chat-coding-header-icon-fallback"},[i.createTextVNode("📄")])]),i.createVNode("span",{class:"f-chat-coding-header-expand"},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),i.createVNode("span",{class:"f-chat-coding-header-filename"},[A]),i.createVNode("span",{class:"f-chat-coding-header-stats"},[i.createVNode("span",{class:"f-chat-coding-stat-add"},[i.createTextVNode("+"),b.addedLines]),i.createVNode("span",{class:"f-chat-coding-stat-del"},[i.createTextVNode("-"),b.deletedLines])])]),i.createVNode("div",{style:{display:t.value?"block":"none"}},[i.createVNode("div",{ref:u,class:"f-chat-coding-editor",style:{height:`${r.value}px`}},null),d.value&&i.createVNode("button",{type:"button",class:"f-chat-coding-expand-btn",onClick:f,"aria-label":n.value?"收起代码":"展开代码",title:n.value?"收起代码":"展开代码"},[i.createVNode("i",{class:["fx-icon fx-icon-expanddown",n.value&&"f-chat-coding-expand-icon-up"]},null)])])])])}}});mr.install=e=>{e.component(mr.name,mr)};const dl={content:{type:Object,required:!0}};function C1(e){return"file"in e&&"path"in e}const pr=i.defineComponent({name:"FileOperationMessage",props:dl,setup(e){const t=i.ref(!0),n=i.ref({}),u=i.computed(()=>{var l;return!!((l=e.content)!=null&&l.summary)}),o=i.computed(()=>{var d;const l=(d=e.content)==null?void 0:d.summary;return l?`浏览了 ${l.explored} 个文件并查询了 ${l.searched} 个文件`:""});function r(){t.value=!t.value}function a(l){n.value={...n.value,[l]:!n.value[l]}}function s(l){return n.value[l]??!1}return()=>{const l=e.content;if(!l)return null;const{summary:d,operations:f}=l,c=!u.value||t.value;return i.createVNode("div",{class:"f-chat-message-file-operation"},[d&&i.createVNode("div",{class:"f-chat-file-op-summary",onClick:r,role:"button",tabindex:0,onKeydown:h=>h.key==="Enter"&&r()},[i.createVNode("span",{class:"f-chat-file-op-summary-inner"},[i.createVNode("span",{class:"f-chat-file-op-summary-text"},[o.value]),i.createVNode("span",{class:["f-chat-file-op-expand-btn",{expanded:t.value}]},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])])]),c&&i.createVNode("div",{class:"f-chat-file-op-operations"},[f.map((h,p)=>{var m,w,y,A;return i.createVNode("div",{key:p,class:"f-chat-file-op-operation"},[i.createVNode("div",i.mergeProps({class:["f-chat-file-op-operation-row",{"op-read":h.type==="Read","has-details":!!((m=h.details)!=null&&m.length)}],onClick:()=>{var b;return((b=h.details)==null?void 0:b.length)&&a(p)}},(w=h.details)!=null&&w.length?{role:"button",tabIndex:0}:{},{onKeydown:b=>{var g;return((g=h.details)==null?void 0:g.length)&&b.key==="Enter"&&a(p)}}),[i.createVNode("span",{class:"f-chat-file-op-type"},[h.type]),i.createVNode("span",{class:"f-chat-file-op-message-wrap"},[i.createVNode("span",{class:"f-chat-file-op-message"},[h.message]),(y=h.details)!=null&&y.length?i.createVNode("span",{class:["f-chat-file-op-expand-btn","sm",{expanded:s(p)}]},[i.createVNode("i",{class:s(p)?"fx-icon fx-icon-foldu":"fx-icon pfx-icon-expanddown"},null)]):null])]),((A=h.details)==null?void 0:A.length)&&s(p)&&i.createVNode("div",{class:"f-chat-file-op-details"},[h.details.map((b,g)=>C1(b)?i.createVNode("div",{key:g,class:"f-chat-file-op-detail-file"},[i.createVNode("span",{class:"f-chat-file-op-file-icon"},[i.createVNode("img",{src:b.icon,alt:"",onError:x=>{const k=x.target;k.style.display="none";const F=k.parentElement;F&&F.classList.add("icon-error")}},null),i.createVNode("span",{class:"f-chat-file-op-file-icon-fallback"},[i.createTextVNode("📄")])]),i.createVNode("span",{class:"f-chat-file-op-file-name"},[b.file]),i.createVNode("span",{class:"f-chat-file-op-file-path",title:b.path},[b.path])]):i.createVNode("div",{key:g,class:"f-chat-file-op-detail-text"},[i.createVNode("div",{class:"f-chat-file-op-detail-title"},[b.title]),i.createVNode("div",{class:"f-chat-file-op-detail-content"},[b.text])]))])])})])])}}});pr.install=e=>{e.component(pr.name,pr)};const fl={visible:{type:Boolean,default:!0},description:[String,Object],progress:{type:Number,default:0},showProgress:{type:Boolean,default:!0},icon:{type:[String,Object],default:""},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},_1="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='60px'%20height='60px'%20viewBox='0%200%2060%2060'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e智能logo60px%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M25.1971977,0%20L45.8523137,11.3712178%20L45.8523137,37.6155801%20L44.4946453,38.9692599%20L24.623,28.022%20L24.6233274,49.9395377%20L21.4535582,49.9395377%20L2.72549351,39.5965647%20L0,34.4406135%20L0,12.8076673%20L3.70534859,10.5019677%20L20.556,20.546%20L20.5567534,0.161454345%20L25.1971977,0%20Z%20M20.7578212,28.1498874%20L5.81325199,36.7628182%20L20.7578212,45.0027895%20L20.7578212,28.1498874%20Z%20M41.8027832,15.9256338%20L26.7716137,24.6706076%20L41.8027832,32.9879669%20L41.8027832,15.9256338%20Z%20M4.06159924,15.4742393%20L4.06159924,32.9879669%20L19.1488772,24.4568004%20L4.06159924,15.4742393%20Z%20M24.6233274,4.32908173%20L24.6233274,21.2862528%20L39.8727429,12.4882393%20L24.6233274,4.32908173%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='生成过程'%20transform='translate(-766,%20-1268)'%3e%3cg%20id='编组-7'%20transform='translate(321,%20699)'%3e%3cg%20id='编组-5'%20transform='translate(247,%20488)'%3e%3cg%20id='智能logo60px'%20transform='translate(198,%2081)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='60'%20height='60'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.8571,%200.8571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='58.2857143'%20height='58.2857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(3.4286,%201.7143)'%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L27.3406238,30.8038254%20L27.3409512,52.7213631%20L24.171182,52.7213631%20L5.44311735,42.3783901%20L2.71762384,37.2224388%20L2.71762384,15.5894926%20L6.42297243,13.283793%20L23.2736238,23.3278254%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M23.4754451,30.9317128%20L8.53087583,39.5446435%20L23.4754451,47.7846148%20L23.4754451,30.9317128%20Z%20M44.520407,18.7074592%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.520407,18.7074592%20Z%20M6.77922307,18.2560647%20L6.77922307,35.7697922%20L21.866501,27.2386257%20L6.77922307,18.2560647%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(2.7176,%202.7818)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='14.177196%2023.2632694%2022.5796859%2023.2632694%2023.4218687%2027.5957059%209.52757789%2036.9780352%203.7254788%2029.0812693'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='23.4218687%2022.4125055%2027.1161878%2015.1091341%2027.8042533%206.35665145%2018.1506617%205.88610282%2018.8417696%2016.8706238%2022.5796859%2022.4125055'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='33.5501273%2024.6706076%2024.403058%2024.9983902%2024.403058%2027.5289361%2028.4733448%2033.3539069%2036.4355638%2036.3335669%2041.6970622%2028.387534'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L23.2743772,28.5628437%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L28.3053772,23.5108254%20L28.3061985,25.7112082%20L30.1053772,27.0928254%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.5203772,18.7198254%20L45.4350062,17.1793767%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='22.5927693%2026.8440709%2023.6315003%2030.8033921%208.53087583%2039.5446435%207.30516741%2035.4601402'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M25.4312165,33.1398658%20C28.857043,33.1398658%2031.634224,30.3626848%2031.634224,26.9368583%20C31.634224,23.5110318%2028.857043,20.7338508%2025.4312165,20.7338508%20C22.00539,20.7338508%2019.228209,23.5110318%2019.228209,26.9368583%20C19.228209,30.3626848%2022.00539,33.1398658%2025.4312165,33.1398658%20Z%20M46.5950591,20.103577%20C49.2645342,20.103577%2051.4285714,17.9395398%2051.4285714,15.2700646%20C51.4285714,12.6005895%2049.2645342,10.4365523%2046.5950591,10.4365523%20C43.9255839,10.4365523%2041.7615467,12.6005895%2041.7615467,15.2700646%20C41.7615467,17.9395398%2043.9255839,20.103577%2046.5950591,20.103577%20Z%20M25.4312165,54.9048659%20C28.1006917,54.9048659%2030.2647289,52.7408287%2030.2647289,50.0713536%20C30.2647289,47.4018784%2028.1006917,45.2378412%2025.4312165,45.2378412%20C22.7617413,45.2378412%2020.5977042,47.4018784%2020.5977042,50.0713536%20C20.5977042,52.7408287%2022.7617413,54.9048659%2025.4312165,54.9048659%20Z%20M4.83351235,43.462539%20C7.50298751,43.462539%209.6670247,41.2985018%209.6670247,38.6290267%20C9.6670247,35.9595515%207.50298751,33.7955143%204.83351235,33.7955143%20C2.16403719,33.7955143%200,35.9595515%200,38.6290267%20C0,41.2985018%202.16403719,43.462539%204.83351235,43.462539%20Z%20M25.4312165,8.37808808%20C27.7447616,8.37808808%2029.6202605,6.50258918%2029.6202605,4.18904404%20C29.6202605,1.8754989%2027.7447616,0%2025.4312165,0%20C23.1176714,0%2021.2421725,1.8754989%2021.2421725,4.18904404%20C21.2421725,6.50258918%2023.1176714,8.37808808%2025.4312165,8.37808808%20Z%20M46.5950591,43.3044363%20C48.9086042,43.3044363%2050.7841031,41.4289374%2050.7841031,39.1153922%20C50.7841031,36.8018471%2048.9086042,34.9263482%2046.5950591,34.9263482%20C44.2815139,34.9263482%2042.406015,36.8018471%2042.406015,39.1153922%20C42.406015,41.4289374%2044.2815139,43.3044363%2046.5950591,43.3044363%20Z%20M4.83351235,18.3420872%20C7.14705749,18.3420872%209.02255639,16.4665883%209.02255639,14.1530432%20C9.02255639,11.8394981%207.14705749,9.96399915%204.83351235,9.96399915%20C2.51996721,9.96399915%200.644468314,11.8394981%200.644468314,14.1530432%20C0.644468314,16.4665883%202.51996721,18.3420872%204.83351235,18.3420872%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",gr=i.defineComponent({name:"FXGenerateProcess",props:fl,emits:["closed"],setup(e,t){const n=i.computed(()=>{const d={"fx-generate-process":!0,"fx-generate-process--no-progress":!e.showProgress};return ye(d,e.customClass)}),u=i.computed(()=>Ae({},e.customStyle));function o(){var d,f;return t.slots.icon?t.slots.icon():i.createVNode("div",{class:["fx-generate-process--icon",(d=e.classNames)==null?void 0:d.icon],style:(f=e.styles)==null?void 0:f.icon},[e.icon?Lr(e.icon):i.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:_1},null)])}function r(){var d,f;return e.description&&i.createVNode("p",{class:["fx-generate-process--description",(d=e.classNames)==null?void 0:d.description],style:(f=e.styles)==null?void 0:f.description},[e.description])}function a(){var d,f;return e.progress>0&&i.createVNode("div",{class:["fx-generate-process--progress-text",(d=e.classNames)==null?void 0:d["progress-text"]],style:(f=e.styles)==null?void 0:f["progress-text"]},[e.progress,i.createTextVNode("%")])}function s(){return i.createVNode("div",{class:"fx-generate-process--mask",onClick:d=>{d.stopPropagation()}},null)}function l(d=()=>{}){t.emit("closed",{callback:d})}return i.watch(()=>e.visible,d=>{d||l()}),t.expose({close:l}),()=>{var d,f;return i.createVNode(i.Fragment,null,[e.visible&&s(),e.visible&&i.createVNode("div",{class:n.value,style:u.value},[o(),!e.showProgress&&r(),e.showProgress&&i.createVNode("div",{class:["fx-generate-process--progress-bar",(d=e.classNames)==null?void 0:d["progress-bar"]],style:(f=e.styles)==null?void 0:f["progress-bar"]},[i.createVNode("div",{class:"fx-generate-process--progress-fill",style:{width:`${e.progress}%`}},null),!e.description&&a()]),e.description&&e.progress>0&&i.createVNode("div",{class:"fx-generate-process--progress"},[r(),i.createTextVNode(" "),a()])])])}}});gr.install=e=>{e.component(gr.name,gr)};const hl={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},E1=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],br=i.defineComponent({name:"FXChatHistory",props:hl,emits:["itemClick"],setup(e,{emit:t}){const n=a=>{const s=new Date(a),l=new Date;return s.getDate()===l.getDate()&&s.getMonth()===l.getMonth()&&s.getFullYear()===l.getFullYear()},u=a=>{const s=new Date(a),l=new Date;return l.setDate(l.getDate()-7),s>=l&&!n(a)},o=i.computed(()=>{var l;const a={today:[],week:[],older:[]};(l=e.items)==null||l.forEach(d=>{n(d.timestamp)?a.today.push(d):u(d.timestamp)?a.week.push(d):a.older.push(d)});const s=(d,f)=>f.timestamp-d.timestamp;return a.today.sort(s).length||a.week.sort(s).length||a.older.sort(s).length?{today:a.today.sort(s),week:a.week.sort(s),older:a.older.sort(s)}:null}),r=(a,s)=>s.length>0&&i.createVNode("div",{class:"f-chat-history-section"},[i.createVNode("span",{class:"f-chat-history-section-header"},[a]),i.createVNode("div",{class:"d-flex flex-column"},[s.map(l=>i.createVNode("div",{key:l.id,class:"f-chat-history-item",onClick:()=>t("itemClick",l)},[i.createVNode("span",{class:"f-chat-history-item-title"},[l.title])]))])]);return()=>i.createVNode("div",{class:"f-chat-history-manager"},[i.createVNode("div",{class:"f-chat-history-manager-scroll"},[o.value&&E1.map(a=>r(a.label,o.value[a.key]))])])}});br.install=e=>{e.component(br.name,br)};const ml={items:{type:Array,default:()=>[]},title:{type:[String,Object],default:""},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},gap:{type:[String,Number],default:12},fadeIn:{type:Boolean,default:!1},fadeInLeft:{type:Boolean,default:!1},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}};var pl=(e=>(e.standardFeatureCard="standard-feature-card",e.primaryFeatureCard="primary-feature-card",e.compactFeatureCard="compact-feature-card",e.standardQuestionItem="standard-question-item",e.functionEntryItem="function-entry-item",e.defaultTextItem="default-text-item",e.hasNestEntryItem="has-nest-entry-item",e.likeButtonEntryItem="like-button-entry-item",e.none="",e))(pl||{});const gl={id:{type:[String,Number],default:""},icon:{type:[String,Object],default:""},label:{type:[String,Object],default:""},description:{type:[String,Object],default:""},badge:{type:[String,Object],default:""},disabled:{type:Boolean,default:!1},children:{type:Array,default:()=>[]},styles:{type:Object},classNames:{type:Object},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},showType:{type:String,default:pl.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},vu=i.defineComponent({name:"FPrompt",props:gl,setup(e){const t=i.computed(()=>!e.id&&e.children&&e.children.length>0),n=i.computed(()=>{var h;let c={"fx-prompt--item-wrapper":!0,"fx-prompt--item-disabled":e.disabled,"fx-prompt--item-has-nest":e.id&&e.children&&e.children.length>0};return c=ye(c,(h=e.classNames)==null?void 0:h.item),ye(c,e.customClass)}),u=i.computed(()=>{let c={"fx-prompt--item":!0};return c[`fx-prompt--${e.showType||"none"}`]=!0,c}),o=i.computed(()=>{var h;const c=Ae({},(h=e.styles)==null?void 0:h.item);return Ae(c,e.customStyle)}),r=()=>{var c,h;return e.icon?i.createVNode("div",{class:["fx-prompt--item-icon",(c=e.classNames)==null?void 0:c.icon],style:(h=e.styles)==null?void 0:h.icon},[Lr(e.icon)]):null},a=()=>{var c,h;return e.label?i.createVNode("h6",{class:["fx-prompt--item-label",(c=e.classNames)==null?void 0:c.label],style:(h=e.styles)==null?void 0:h.label},[Mn(e.label)]):null};function s(){var h;const c={"fx-prompt--item-badge":!0};return typeof e.badge=="string"&&(c["badge-default"]=!0),ye(c,(h=e.classNames)==null?void 0:h.badge)}const l=()=>{var c;return e.badge?i.createVNode("span",{class:s(),style:(c=e.styles)==null?void 0:c.badge},[Mn(e.badge)]):null},d=()=>{var c,h;return e.description?i.createVNode("p",{class:["fx-prompt--item-description",(c=e.classNames)==null?void 0:c.description],style:(h=e.styles)==null?void 0:h.description},[Mn(e.description)]):null},f=()=>{var c,h,p,m;return!e.children||e.children.length===0?null:i.createVNode(_n,{class:{"fx-prompt--only-children":!e.id,"fx-prompt--item-nested":e.id},gap:e.gap,items:e.children,vertical:!0,customClass:(c=e.classNames)==null?void 0:c.subItems,customStyle:(h=e.styles)==null?void 0:h.subItems,styles:{item:((p=e.styles)==null?void 0:p.subItem)??{}},classNames:{item:((m=e.classNames)==null?void 0:m.subItem)??""}},null)};return()=>{var c,h;return i.createVNode("div",{class:n.value,style:o.value,onClick:e.onClick},[t.value?f():i.createVNode("div",{class:u.value},[r(),l(),i.createVNode("div",{class:["fx-prompt--item-content",(c=e.classNames)==null?void 0:c.itemContent],style:(h=e.styles)==null?void 0:h.itemContent},[a(),d(),f()])])])}}}),_n=i.defineComponent({name:"FXPrompts",props:ml,emits:["item-click"],setup(e,t){const n=i.computed(()=>{var f;let d={"fx-prompts":!0,"fx-prompts--fade-in":e.fadeIn,"fx-prompts--fade-in-left":e.fadeInLeft};return d=ye(d,e.customClass),d=ye(d,(f=e.classNames)==null?void 0:f.root),d});function u(d=null){var c;let f={"fx-prompts--items":!0,"fx-prompt":!0,"fx-prompts--items-wrap":e.wrap,"fx-prompts--items-vertical":e.vertical};return f=ye(f,(c=e.classNames)==null?void 0:c.items),f=ye(f,d==null?void 0:d.customClass),f}function o(d=null){var c;let f={};return(e.gap||e.gap===0)&&(f.gap=typeof e.gap=="number"?`${e.gap}px`:e.gap),f=Ae(f,(c=e.styles)==null?void 0:c.items),f=Ae(f,d==null?void 0:d.customStyle),f}const r=(d,f)=>{f.disabled||f.children&&f.children.length>0||t.emit("item-click",d,f)},a=d=>{var f,c;return d!=null&&d.title?i.createVNode("h5",{class:["fx-prompts--title",(f=e.classNames)==null?void 0:f.title],style:(c=e.styles)==null?void 0:c.title},[Mn(d==null?void 0:d.title)]):null};function s(d){return!d.items||d.items.length===0?null:i.createVNode("div",{class:u(d),style:o(d)},[d.items.map((f,c)=>i.createVNode(vu,{key:f.id||`key_${c}`,id:f.id,icon:f.icon,label:f.label,description:f.description,disabled:f.disabled,children:f.children,styles:f.styles||e.styles,classNames:f.classNames||e.classNames,showType:f.showType,customClass:f.customClass,customStyle:f.customStyle,gap:f.gap,badge:f.badge,onClick:h=>r(h,f)},null))])}function l(){return t.slots.footer?t.slots.footer():null}return()=>{var d;return i.createVNode("div",{class:n.value,style:(d=e.styles)==null?void 0:d.root},[t.slots.title&&t.slots.title(),a(e),t.slots.default&&t.slots.default(),s(e),l()])}}});_n.install=e=>{e.component(_n.name,_n),e.component(vu.name,vu)};const bl={items:{type:Array,default:()=>[]},height:{type:Number,default:200},title:{type:[String,Object],default:"推荐操作"},prompt:{type:[String,Object],default:"输入@获取推荐操作"},promptChar:{type:String,default:"@"},promptAgentName:{type:String,default:"AI助理"}},yr=i.defineComponent({name:"FXSuggestion",props:bl,setup(e,t){const n=i.ref(null),u=i.ref(!1),o=i.ref(!1),r=i.ref({top:0,left:0,height:0}),a=i.ref(-1),s=i.ref(""),l=i.computed(()=>typeof e.prompt=="string"?e.prompt:"输入“@”获取推荐操作"),d=i.computed(()=>{var A;return(((A=e.items)==null?void 0:A.length)??0)===0}),f=()=>{var U;if(!n.value||d.value)return;if((((U=n.value.textContent)==null?void 0:U.trim())||"")===""){n.value.textContent="",n.value.innerHTML="",w();return}const b=window.getSelection();if(!b||b.rangeCount===0)return;const g=b.getRangeAt(0),x=g.cloneRange();x.selectNodeContents(n.value),x.setEnd(g.endContainer,g.endOffset);const k=x.toString(),F=k.lastIndexOf(e.promptChar);if(s.value=n.value.textContent||"",F!==-1&&k.substring(F+1).trim()===""&&(n.value.textContent=k.replace(/@$/,`@${e.promptAgentName} `),s.value=n.value.textContent,u.value=!0,g.selectNodeContents(n.value),g.collapse(!1),b.removeAllRanges(),b.addRange(g)),u.value===!1){o.value=!1,a.value=-1;return}if((n.value.textContent||"").lastIndexOf(`@${e.promptAgentName} `)!==-1){const _=document.createRange();_.setStart(n.value,0),_.setEnd(g.endContainer,g.endOffset);const{top:N,right:I}=_.getBoundingClientRect(),C=c();r.value={top:N-C-5,left:I+5,height:C},a.value===-1&&(a.value=0),o.value=!0}else o.value=!1,a.value=-1},c=()=>{const b=e.items.length*38-6;return Math.min(b+28+20,e.height)},h=A=>{var k;if(!n.value)return;const b=window.getSelection();if(!b||b.rangeCount===0)return;const g=((k=n.value.textContent)==null?void 0:k.replace(/\s*$/,""))||"";n.value.textContent=`${g} ${A.label}`;const x=b.getRangeAt(0);x.selectNodeContents(n.value),x.collapse(!1),b.removeAllRanges(),b.addRange(x),w()},p=async A=>{if(!o.value||!e.items||e.items.length===0)return;switch(["ArrowUp","ArrowDown","Enter","Escape"].includes(A.key)&&A.preventDefault(),A.key){case"ArrowDown":a.value++,a.value>=e.items.length&&(a.value=0);break;case"ArrowUp":a.value--,a.value<0&&(a.value=e.items.length-1);break;case"Enter":a.value!==-1&&h(e.items[a.value]);break;case"Escape":w();break}await i.nextTick();const b=a.value>0?".f-chat-suggestion-panel-item--current":".f-chat-suggestion-panel-header",g=document.querySelector(b);g==null||g.scrollIntoView({block:"nearest",behavior:"smooth"})},m=A=>{n.value&&!n.value.contains(A.target)&&w()},w=()=>{u.value=!1,o.value=!1,a.value=-1};i.onMounted(()=>{document.addEventListener("click",m)}),i.onUnmounted(()=>{document.removeEventListener("click",m)});const y=A=>{const b=A.iconUrl||"",g=A.icon||"fx-icon fx-icon-sender_task";return i.createVNode(i.Fragment,null,[b?i.createVNode("img",{alt:"suggestion item icon",src:b},null):i.createVNode("i",{class:g},null),i.createVNode("span",{class:"f-chat-suggestion-panel-item-label"},[A.label])])};return()=>{var A;return i.createVNode("div",{class:"f-chat-suggestion-container"},[i.createVNode("div",{ref:n,class:"f-chat-suggestion-input",contenteditable:"true",onInput:f,onKeyup:f,onKeydown:p,"data-placeholder":l.value},null),o.value&&i.createVNode("div",{class:"f-chat-suggestion-panel",style:{top:`${r.value.top}px`,left:`${r.value.left}px`,height:`${r.value.height}px`}},[i.createVNode("div",{class:"f-chat-suggestion-panel-header"},[e.title]),i.createVNode("div",{class:"f-chat-suggestion-panel-container"},[(A=e.items)==null?void 0:A.map((b,g)=>i.createVNode("div",{key:g,class:["f-chat-suggestion-panel-item",{"f-chat-suggestion-panel-item--current":g===a.value}],onClick:()=>h(b),onMouseenter:()=>a.value===g},[y(b)]))])])])}}});yr.install=e=>{e.component(yr.name,yr)};const yl={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},xr=i.defineComponent({name:"Todo",props:yl,setup(e){const t=i.ref(!0),n=i.computed(()=>{var o;return(o=e.items)==null?void 0:o.length});function u(){t.value=!t.value}return()=>i.createVNode("div",{class:["f-chat-message-todo",e.customClass]},[i.createVNode("div",{class:"f-chat-todo-message"},[e.message]),i.createVNode("div",{class:"f-chat-todo-list"},[i.createVNode("div",{class:"f-chat-todo-header",onClick:u,role:"button",tabindex:0,onKeydown:o=>o.key==="Enter"&&u()},[i.createVNode("span",{class:"f-chat-todo-header-icon-slot"},[i.createVNode("span",{class:"f-chat-todo-header-icon"},[i.createVNode("i",{class:"fx-icon fx-icon-task-record"},null)]),i.createVNode("span",{class:"f-chat-todo-header-expand"},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),i.createVNode("span",{class:"f-chat-todo-header-label"},[i.createTextVNode("待办任务")]),i.createVNode("span",{class:"f-chat-todo-header-count"},[n.value])]),t.value&&i.createVNode("div",{class:"f-chat-todo-content"},[i.createVNode(nr,{items:e.items},null)])])])}});xr.install=e=>{e.component(xr.name,xr),e.component(nr.name,nr),e.component(su.name,su),e.directive("overflow-tooltip",bi)};function En(e){return e.toolResultApplied===!0||String(e.result??"").trim().length>0}const wr=i.defineComponent({name:"FXToolUseBatch",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>{const f=e.content.toolCalls;return!f||f.length===0?!0:f.every(En)}),n=i.computed(()=>t.value?`共调用 ${e.content.totalCount??e.content.toolCalls.length} 个工具`:"正在调用工具"),u=i.ref(!t.value),o=()=>{u.value=!u.value};i.watch(t,f=>{f&&(u.value=!1)});const r=f=>{En(f)&&(f._expanded=!f._expanded)},a=f=>{const c=En(f),h=f.success===!1;return{"f-chat-tool-use-batch-item":!0,"is-done":c&&!h,"is-error":h,"is-run":!c&&!h}},s=f=>{const c=En(f);return f.success===!1?"执行失败":c?"执行成功":"调用中"},l=f=>{const c=En(f),h=f.success===!1;return c||h?"Done":"Working"},d=f=>f.toolDescription?f.toolDescription:f.command?`{ command: ${f.command} }`:f.toolName??"tool";return()=>i.createVNode("div",{class:"f-chat-tool-use-batch"},[i.createVNode("div",{class:"f-chat-tool-use-batch-header",onClick:o},[i.createVNode("span",{class:"f-chat-tool-use-batch-title"},[n.value]),i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:u.value?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),u.value&&i.createVNode("div",{class:"f-chat-tool-use-batch-body"},[e.content.toolCalls.map(f=>{const c=En(f),h=f.success===!1,p=c||h,m=!!f._expanded;return i.createVNode("div",{class:a(f)},[i.createVNode("div",{class:"f-chat-tool-use-batch-item-header",onClick:()=>r(f)},[i.createVNode("i",{class:"fx-icon fx-icon-thinking_tool"},null),i.createVNode("span",{class:"f-chat-tool-use-batch-item-text"},[d(f)]),i.createVNode("div",{class:"f-chat-tool-use-batch-item-status"},[i.createVNode(wn,{status:l(f)},null),i.createVNode("span",null,[s(f)])]),p&&i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:m?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),m&&p&&i.createVNode("div",{class:"f-chat-tool-use-batch-item-result"},[f.errorMessage||f.result])])}),!t.value&&i.createVNode("div",{class:"f-chat-tool-use-batch-progress"},[i.createVNode("span",{class:"f-chat-tool-use-batch-progress-status"},[i.createVNode(wn,{status:"Working"},null),i.createVNode("span",null,[i.createTextVNode("生成中…")])]),i.createVNode("span",{class:"f-chat-tool-use-batch-progress-text"},[i.createTextVNode("正在处理复杂任务")])])])])}});wr.install=e=>{e.component(wr.name,wr)};const xl={icon:[String,Object],title:[String,Object],description:[String,Object],customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},vr=i.defineComponent({name:"FXWelcome",props:xl,emits:[],setup(e,t){const n=i.computed(()=>{const a={"fx-welcome":!0};return!e.description&&(e.icon||t.slots.icon)&&(a["fx-welcome--no-description"]=!0),ye(a,e.customClass)}),u=i.computed(()=>Ae({},e.customStyle));function o(){var a,s;return t.slots.icon?t.slots.icon():e.icon?i.createVNode("div",{class:["fx-welcome--icon",(a=e.classNames)==null?void 0:a.icon],style:(s=e.styles)==null?void 0:s.icon},[Lr(e.icon)]):null}function r(){var a,s,l,d,f,c;return t.slots.content?i.createVNode("div",{class:"fx-welcome--content"},[t.slots.content()]):(e.title||e.description)&&i.createVNode("div",{class:["fx-welcome--content",(a=e.classNames)==null?void 0:a.content],style:(s=e.styles)==null?void 0:s.content},[e.title&&i.createVNode("h4",{class:["fx-welcome--title",(l=e.classNames)==null?void 0:l.title],style:(d=e.styles)==null?void 0:d.title},[e.title]),e.description&&i.createVNode("p",{class:["fx-welcome--description",(f=e.classNames)==null?void 0:f.description],style:(c=e.styles)==null?void 0:c.description},[e.description])])}return()=>i.createVNode("div",{class:n.value,style:u.value},[o(),r()])}});vr.install=e=>{e.component(vr.name,vr)};const wl={content:{type:Object,required:!0},onOpen:{type:Function}},S1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHHUlEQVRYCV2XSY8VVRTHT9UbgAbpZpSmaRNMxIiGqZVEE1csXBoNboyJ23ahfgI/gQuXdiRx6UY2utKNEUJjQLrBEEwUmQcBBZuphzdU+fufc+tVw61Xde894/+ce+6tepml9uKhpYMbVpWTuWUTpZUjQc7oSnvUMZvvVZJO8om4ZjzLUmK2bqVZO4g+r3hLfbMHi5plc1lZztBPnftkxeGkbfbCocUvW5lNrl+ZYQdLaurCv3UKs7mlNIHuo9RXsqJtHuKZwFRmxH+4ZLbYq3mS5Z76/dOVH2WKvCjLb1e3zHQPHEszIZDNfxY0AyAT9QNHSaoJaf0KV4qHApAcBu8+NisqwBUdO3mevZcT8aRE27mEaamLCdJShEaGknM4QkQLIJqbrWgsUwy2M3osnYtDS2qDQVlkkwDIJjKYrUbSSp0bDy96ugPJeYbUsyyRjbDXwpK31HkkjDusv5rsPa1PPUzkWBlpKX+VosKleS1Aq6IcOAgmWUkQkaFwo/jcRpUJJvy6/WR7kDU37/oEMNLUtC30lV64dilhKVg8sdo5DxeLQlX0mqs1PbQYV8Qq3Uu90Bc3xJQJKYZ+U327kdREdyDuWTpJSfzMmoDo9pNBtxFG2hSvU0WTjowUhXVZfzmVyQoGBe9zZU3UZo5RGXaypBEYbhf24SvaEj617/7s2/UH1AF8AnLi2zsatnNTwwvrxv3CfryoonAVr43NQ2bv7GxaL9XAVyd7NqedpKVzN3gEQ9NT63pQPd2lPUDwrecbNsK5oHZ3vrBvzvasJbTaT4D8eH/TxoeZ0249KuyH84vExCWriOwfy+yDPb7C9t98aZ//zGkmvtTpXZNxrvRHktTDJJBOr7AT1+ujb9dmEobjFtpav7E15cC5dLasyW3rMwGs7PdN9+4tAU786Su9VEsR0OA5AKB1KQO5ouuQ56MoVW3Xs9osIGNdm1lhb4zXxiuZfTgs4Eu/pN896pE5e/qibAUddjT5ZMRhVM1FEDdj7wLgcjcYPIdX5rZ9GK6ywAHw+rbaeCU0sbVBlqIOtpCh0bU1yGMXOp45mfcdIDcOREuBjjAEDp4g61I4tx4WduleqiD4SmlZ9NnvAHgu1vbOoz4vGQzQ9o5BA0Ch9C+L/o87Pfv3Md7k3CXlI40JKGAO0s82S4Ake/yqCieajGoZdmzMbf1QqJ240rHZ6yGzcXVu4yMqw9J2bw2A0jx2kUwqWhWnOr986I9YgbQeEuz1ZZwbUEcu1XWwZ1QRlvbqWJ3+GQCeWgZyAl7J8u1dDuACAOScZKrO/ABTLgSKGwC6YqIt5Gc3DI1PXusBSJK8atc0bHSN2Wvb4nwQ7QzRz16rs7RvrGV8U9j4ugC50C3tFDbcg0DoR68dJefymwsRP5+oDNmBPGGBdr6b2ZmbdRYmWOc9Kbq/H/TZ/yV1Utg9zgm1feMt27etTv+vV7opo7XNquZcAb9UVjhX3wWxg0lIxTl+uY7w/b1DNpROLqVeQHVVWRhZldu7u/ksSu0Y6dfBIzeKVnc0tETnTjUgchYFqFRVRQntiIoote0b6uh+IzNZpnrJbOZaLbNrrF2J2zS6pVLuzlSegktTlDQth2dASETUue08pPKcfU1/7nZh99NWc630OI1TmROIGVL9dLt5v28X7xbhEpnMqw2n4RtH/HwbOkHVqTddSpYy4Kigo3ziKQe3fP0jAmXgBi+qOw/rM0NgpnX4EF8u57KmMlnmXDTdsaHhqPgcFUjE0DJ4wlCavvRkhLMpeqm7AxRmrz4pc+yvqP5Iu1ty+/WRH/4Gi9qJ49oRxfkkRJHin8537aVN8yknZkdVXIqM24mA/v7skt3m9PQlRPMXP0NYRkWttcSWotWu8wD9yfjNrxcpfT67F7QFGegnJQlyFyoMjuC1rYLXcbWmGMvBrtczsnoH9Fk/vbZDGX6G80YTG7hLYONLCNtq0qPzLyJN9KXjRMlzDT65VMU40odIW2PdHgtPjDtYKN0Sh7p8UWWau3IufxLk58lQclPzJdCHI6aCJDlFL0nGWmMZ0orm+nil8T5yUHKifVzC71JleUObCl1fPRWfLtfwPsemA5ENLo35GsvmOl3+isk/tytorObRIshC9gs49J5SMIXhJEYX7xCVpYxINkkQQGw3mYc38KFKy+aajzvlDP/dDohRmYtsYACEypybwuC8/z2rnBMDNEXBHwzeU8qaeCkLFUTqSvpuQw4qP7KbZTPNhW42hZEDtQAcF4peS6qzQEgW2CmSEyjRfUDnDlLE4g3cMXaenjDE03yQhaycyuNfag6IYIivFoppDFMOdWvt3HmScbDUgLab7louOUOuXvfQh6RsTZ3+bMVhByTCy18sHWStJim6Cb7t+LSgCRRNY0c/mEfqB5HIeSWjkUcjAjetskX9zFFPM3nWxHnT/57/Dzj0fqfCZcLZAAAAAElFTkSuQmCC",D1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHeklEQVRYCV1XW2hcVRTd985MZjKxNaVa6cNqnwbaftSIiuiPilh8NC2tWh+lXyFFbMEKgvgABQUfIGoxWqGioFLjR0GQlqooGhptjNU+9EPaarT2IUySZt73Xtfa+5w7o3dyc885+5y91l57nzN3AnHXjoOPbJAgGEhEegNJugUNCURqzbrUk5ok6GcklK6OLrTRwc2PxPhLYkniCAswEqPtbXiWGxekEdUkxniQSCmReDSO4sGP+vYPERoQIjtGtr2JRQOB9tQ3Rh0DPMvNCnAi6cwUJROEBk4QvQluoCkBR6QR1UFgqkVYiWKufmRwT9+BrYFFLh/Dl7sSCAEN0PeEIgA044bkM3mNlkYFR9R8sq8qEIB9AMRRU6brUxiPNHol5whwfsK2yMYsZaeRYFzrwVM6GMuEoYRBBxxRZkgOQubEOeJCOFQHrl1uTEsEcKpDGwFjZ0sVC5KBLJb26kJkw0iADDPjCBHQR8n1BgRnKQknqToHIZCsRVWJoJgBeQJGUpXD3ITkEunN4n93GjXm+LaVAxGJadIyCq5ScOaRkVFIgpMQKoWSVxtlDBkZGHW+X6trdK6u6876PPsU0F+rzdwagDkkCPueEOGtr+BwPF2fNGKOnE8BSbZI2BrWTbaOSs2FHQwUFwzUni0YdRGj54dPFxX7nGVzGLXZKoi8qYWJPqNsA9X6cX3vm4Fka0ogp9ITnCBRxEi53smNZ7sz2ii1H0tirEHO682qI0pCppbVSosMx9vVRBHGUsE+78wWzaGqwJRiEe55nfPkmjnX6SICY5J8PX5AzpfPKohGipytWbROsmGWZp0zdnpEfj47iq4D5w6iAvyoShYUVgQ4YiLRVAQZBdK8AzyKIvlzelw2dW+WK2Yuome9rpy5WF75/llETZKR3L74bll/1f3eLGenT8ueI7uVIGX2kht4q88gQxYcG9VmGYBNnUyGXrqo2ZBdP+3E1qqlAMtm9cjNl6/Rw+ay4nxZu3xTaouw9tXh5+wQgl+Cp4cUI9fbpxYEfJW2y8IcKXMewHBwhhEdfz8FYWPd8vtkftdC6V+93aR31qFj78nRc2P/CcQK2MhYDaCt5BIJWZ0EzId5rWztY4ys/RaERvLlqX3y45lDKYlcJidP3Pi8LLy4lZpfzx+VDw7vgjIOQKNFmjTvLVAGS5/ECgkeJgG+6Zh/xxILtJpgCzDGYuS8d8bekMnaREqikC2kbW7Bl755CqSbEoSabdvRDIRE6Bt+VFn4sjawYZECvmQ8S/Y9EQPGInyPkvFktSS7Dr2WgrY33v1hp/w9OY61zjlJo4ipJH16EnySBGtMFcjzENIgwRIfLgiwgOAKrG0qgWrF3+Ez3+kWbAevN2sy9teIFN1W1mCcigyGvnxQJOjJkBh2bgagzAmJsvgYgZfMnvSFI0od9fVskkuKc9rxpSObl4FrH8O7QgZf2QyIcy16KzZ3BpCI+jaVVQGViOCMmEbIZiTIGo5oY8GgvWTWUlnbc6+O/f/f1fOvl1uX3ikdIMBvU42camqxEdj8+XEM6BwtQisIG9A0YDKJ8YiNQYj2HKLr730U7waZFPuXc0fSNhsPrt4qc7sW4FTt1DXMsx5Wqir90RdTwDYCxjiK0Bvw9G08qbgu0OgjuWfFFpk7Y0EKOD5xUp7et10OnvoqHctjVzx8w5OSxSefMRIE0mDgp1UHLEDe3IZkQpH5guBYKUP0yZ57evmsFXLLojtSIJ52r3/7Aux1eevgi7o7vHHJ7B5Zv2oLDqdc6/0R872SFqRhtilgcnh5aCAJFAW2aEGl54uKv/Ye+1B+++e4vjdM1Ery9sjL3qTPvpUPybLZK/UlNuGhxBTwo8q2lLYiZJQuN5zAYgO8Rs7FD6zql9nFS1OAP0onZM/h3Qoe4HzAmSPDJ76Q4ZOfp3NYJ9tuekby2JYF1gP9Akefrqb8jgv6P9tIRDUaAccwSvANWZOpyoQrSCuoAo7sPLYd1eFrCXeN5pkAmmcd1fcL3boYLVcnpR5XsYS+tbjUJzqsAZOG4HYrG2VcqV/AcvQ5B855LNci/EaIcdziYGKfKoAHLvpBm/N5saboE6CdObxrtOF4NWjHNvTA/mkHSLU5bUB0CBBGg7dzfdJG7fXEZBSwaTpABFMwh/WDC6A6B/bOnP2i8niMXmsAVEu6AxxbRtHAz7Ea3pL0Ql8dgoeXL4ICjUYFbkmOMXOOkSMRlR6RS2BBMWK+LeWwM/wpS3CsKVGBUVBRqQgQoF3B7zl1C1IwENkiJKDesf7mM5uzY1yjZ0qUNJ7wpWeAC66AoiRRrmNqiB1i+SCBLToUDPIeRw2VR5VROWF3zuAVTi2/F/DVzHGO8dYi1G1nwPY+YQQJyruYnQHfNoayHgx337V3CO4H6YhvtTW+2TICd3MRZfMONDrY2G9ilzSQKhajRqSOPSB9WFvzToLo82ceT0w4GBx+vDKkiqAnmz+5bcNUtTSQxM1enIDduih1QAUYNZWCU8SaAqJ3UcdMyI9KgTLMkNrcXKpC0owatVGCj1HUyeCn237Xn+f/Avavy/P8wtVMAAAAAElFTkSuQmCC",T1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGCklEQVRYCYVXPY8cRRCtnt29s/EhW0KAEAkxmXUBIkBkRERwdoqFHNiW/AMwPwCJECTYEDKEnYJk4+ASIwQ6WSIjwJKNQBjO8t6Xb3dvZ5r3XlXPjIzX7rub7qmuqvfqo3v3ksXIH53fsJQvmOV1y3aqyJ8055x74sZyAys8EqS+hX2pcC9b3t6xPD/i/gSPrWxpvPrNjWt0QhvLV85/CU2AP3sQXEDmwEIiXkuKLw4sb5DnBgz/nWju9NL42Lc3LyZFbs3VZ0O7RusATrnmj0ceURMMg3JfYEVC+4dme4ctUe5Xls4MlfbQdYvHnnQ4m4N9KKVkmYiDyqzCX+C6VYArG65PcI3jq5Z3D7QsQYDEhSE8rLvGkudRbfZwDzwZSZAo69WR2ck1EAlbYLU6EAmcMrIk8dHAjP60R3+2XmHvqQ1XlBuC8ifA4Q+ZObL8cBcLuGGz4afoQ63LGl+wn4aM131I0fIpSJ42oNws6KmtMyEEVRzNa8vTmVUrgyBHfwhbme+DwY6s3YF7gY+lBErtqM9RIpQ8hCUbNkePDFHjICp96DBJjNgnMKoSEiFmkvHxRAKljllHDdGfPWeDd8+0RssWeTbFmf/b6p82rdn8TuDMVhKZx7LBkoBhaR/5FDAYo10QMY5O3VgNxoXQMuAiT6vHrHr1NRu9f85GF68QGqWAPQJp2CN1NKCOqhP6XwZ0aZAAvCpbWLAB0b/taHYnciwBw1AoONUnnsdSibfB66dt8cbb1vx40xKzTjHLESWhLUsmAoxQ+2DmelQEa8gpqXjme2Pn40uWD3CrjnAMkV8RxX56bs1OfHDZVk6/Ke3hW+/Y9NYPOsIJfhrcJ06A0bvD1rNH3kPhkjwGoLQCoP7ApZJWcIeJrQensu3v2v7Xn7Wa1YuvWLPAKSEYH0cLTA7u5UYPtHWRGSJGOK5EdNaMNaSH/tA1ipgSSoM/MEEBRCjv7VhzsOfKo5Wwhd99NGiEzblk2nuATUFmBBJWmXHBoBFd1hEgGOOuAMwf/ja4L3hbVmtrVqEXOOr7f8q0gY90iM+CdngW6HjoeHp2QCwqu5YdHKxbWy38pCR8KPiJAYfB0KqXXrbjGx+2qvOtW/CJXto9tLRoeA20/tyvLiIHLxdPP1rGKVbBr3g++elXZbl0rrfv2+x7fOTvPrJqhtuU4KHdD2qo1DPKsqvLhykqvcAz1G4uBexvzH/9xfa++MTyPw+swtnnFayysczhqs1Ax4ZpB1TR6Hnswy/u/W6HiEwnAGWKFpBdgzov7t2x+u5ddPxR15xQA7TK1XMrG2SgE1GJgyTaDOAY0VkZ9YNtm25e14VT0XGDCNnEPG6oM4n51VuuWQBTCJ+8V9Q1ESTXOAVINSPhoMPY1CvXIoAalkGwR1O9hTvZUVChy0icgH5SQEbY1ORgy/pwHJ4C+HNWWGBQsdGxxCLI9DhRRTo8+z4IFsThvUp4Q0CciOZazChe9FUqdMN6qGMUtHQSxIMGodEu/J0OSdhnX+s6jjRTKzETEWubXVhQ1hGCInwPWRfX7ZWCXiR3Im5EIQbUieWXkIv4ZN0LZ+nrhZBcADxwhNeZoQek6OmXPIBdB67guf7rD5vf/lmixZ3fPAr2Db+UoocIXgaBCihTTncdtaIIDd+wNL981lUk6BQadXe2xXRuNb731XErVgBNAGfDMQuBIIziVJBsLrgrMp/df5FxH1dxVxdFQSLBjjPTqT+ACZDvWFOmjpfPSLFkFEiIp8/+HutuW/b0OSmMSsNo1tEEKCJlivmFpCIhrKt+zltQEnIQzvKh1y7dkjMzpObBTfBxl7dEVMa8fl2BEYo5P8kierJl1RU/HQDAQQsIEZ0ErQuQXIe4aIiMpS1WdOyKYYLInSkB4mZzNnINDkSNElBXOP7AmpEX+5IFN4GcWQ0dylLK42r4+dVriHBs0XSQx5CKrwXooCFwYL3AMeYCGiJXgwvulqwK3bWZxvELN25fI4rG7NJ7G/jywf+Q13Ou9d+SosHnQDPZb69rAtFIgHSmX1JwmfaYBRdQypX0sTfB2xayKHDK/wNolX2UI+Wo7QAAAABJRU5ErkJggg==",vl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGLUlEQVRYCW1XTY9UVRCt19M9MwyiAxojRI1REImJRAfQhcSVGmJINMG9G5LRH+DOxJ0JP0BnpYlbMCYqGBciJmqIZiAsSARUUDQoYGjmo2emP97znFNVr3vUm+n76ladqjpV9973oLAYcyf6hwZlOVtVNmNWTVcQDH9lPLnGcr1Oa9cTRoD8KEoerstS3m1g5pe71dw7h6eP0b3g9O7x7ntwnKUsR4AzoQIymGzUU/DAFDlS53Il0qlTnABSJpHOGnzKau7IG1teL7zywVE6OJjoQnIGB1gEmEk4JQ0yAqWvP9PPn8DV/obkpQ1K4pClarzaZNs9OuEcnlyVY1UBzDEk586upUF/9ZJCFkM5Wi9df1B58iRkg9kmwDNKFoFSromMZmBzMPRYR4w6D+BEA5d4PJHTVteEkr/jihkQKKcVFEwC7wePieg10pG0J5BrVsuhp+SR7ZO/GStfQXKC3IczcDjszdpZQQiihlgXSu5BqKXhxDWDSRHY/9Ex/1qvtH5fIT00fWpsZc0S7KTjlEMALGSIR9hFbAQ7gD8H9byyVVVgnyskxY+x0y+6kddaPpianS69PcmGcQ9UHzw3iQcdkhDFPFxsrcf2ZNhSkTEQ4chO1nLk8u0FgayITFOJ7amvTlbAUlLO5PLRNPLCUtqiPkfJ3rsjY52Hrs2sHuFlzRZxlQmFcXOty+SRX77ug7nGupBFEkQ5zJKbXGTlmXy8ZfbwVp3PCJbtrez6rYHduxm84fjz731bXoGAxe5HWtr728ulbb6jIUI5sWM9HMRzP63VuZI43wNiNMpy01RhLz09kf7rnp9+t2J7do7b1rvHbP5C1z76umP7do3by/un7OT8ij32YMtmdv7Xd7FT2rlLIMBo4kypwBmI0yklbdAvLFV2/PSq5AP7JmxsrLCvzq4Zg1y93reb7YG9dmCjPbmjZafPN+z5PZN2a3FgX55ZtW1bxuzCr13b8UDL9u6atD9u9O3UmRXr4lZkh1UscnGNLXAm2ps4uWs9s/NXBqL64l4QgHTxas/+XvDXX3uxtLOXevbUo+N2+OAmG28VdvTzRet2K7v8Z99+uVbZxHgBAmbtpdJ++JFfH4XD5KKvK2uocnSh0tF3q5PxL5c8wond4X4y1klUxXvO5Feu9ez85R46Bgv/COCPI3R8oaW/Y/xcNWpsbIWS00/ew0lBY8lte+i+pjWxNRzb7mnaXTg3HCLBp1Y+1cRCqyIC0BDBTB6OTKDfaBTaAKa+iQvywt4NuAGlXfitqy4cfHZK4enivu6stdjzGxHvi4hFIg2COTJ4rl0nkybZASV6/xOTdufGhrbh41PL2ord2yds+zZcz4g39GRsj18zDCNj6sIqOJR8cngy7pGvQ6n1lk0Ne+bxCfsL74MzF7t2Ewfzm3Orgrzy3EYrsBN52t1P80jMOEcKzWuIJEoUCrYlB/Wf4d4z6GIHOBhaOHSffNuxazd6/j2A8ovvO7pu9JvCK2CxY9iann14YsFuLQ08OWxej8fPPMVb7y9Iw9ZNTfo+8YPCl0SCRBLp64aIpH/3l/Bu4A0qS7+iDJbb4P6O80JhHLEzXvx7wFkNQXCKTnhyuqENwcAZx+cXFrWcJGjHj3aHZnL6pw7PkBm76Szp6AB3pByB5Ip1EsKTATTok2v5cwoTA6UOqnXdFMavLTrgrfWlV5nJGYryuqAef0hIoBoiaJJ1/3BAhxRXb1vkxJZx6/xjFExjG+EBMEP9K7nI0FZXTfL8ZXCW5qW4PgqAVqE4YYx2Qy8iad2mgOTGEXjpXB5JBMjwuolu+DipoT99kojLDnRdA1esTUZM6RX6s24jnWFXQ4gbxbJy+KkiCIpDaMh08k5QiT/4JibIt/EmtPkaSBKkpwkPRNJHRCpXpt3JMoHDk3ztzK2iDVONYWwO6fEoivkGPmhzDgybql3PXD5wykoVFEpWUXeHQairq/QYo8Xw4HGt6oEtkLtxZBb/SxWJCAaDQmmKKpJU2JTL80HjeOpEUBrows6Htg2C5HSwau6Dt+8/5kcWyjfn2oemWgP8D7kxMygH00QziLd25E3HKBiqHvIy3oTkJ10IddsVIBK73AZ0vrBCyenzD7OyHHaTkJSSAAAAAElFTkSuQmCC",F1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGkElEQVRYCZVXS2udRRh+Z+Y7zTFtk5iml7S1XpBW3HhJdVER0YUKikhtRNCFF5TYheLWjX/AlRuzcOnO/AXXIpiFG0URoUWq0KJpLb2eb8bned6ZcxLaCP1O5szMe33ey8z5Eqw+5czyKSt5Bdsli3vnRB6dB+k6lgV/2SVLsYJ1IE108pw23jf6plk6pWyEYOuhhNXwyPdrNBj4Vc689qXlQudm3QGoJS2t9GbX/8B6hOEgCpzROeexQ4EjHRTSsZ/IEXjjYV31ILuaHl3/MHjk/TdEaHEPxvTYkBzlq2Y3zrkzOWD0XNBJM+h7OmqOmyPOkmsgMvRDDaDYcoShFQqFMJRz2a4oIYbtFOgzQq40ykmLUNL0zoVkVJrmtM4OGNbgXCAzs0SdvBLxtUTDJd1dIyPD0+xC2HezKFa0QKXxqBmAtNEwsyFwVR9eW5kcOAWd53KSX4pANRfibjA7qgMEnXiEboB6oIYZ8R0A00iDeOi4OQM4lY00Aa3louaY5mup5zIXA1WQYndMJlHSMI1x8shCYhlEqWwH6ptJXb0Hqh6BKTuTyEGRXdqn7a6EnbCBVqiIZZBfAjJRFKw0a2V0ofJcxh1WueGDFhc/RtvcZ+HKT5bPfV5PEfjVXusDZQBgOjUYFkSmR7ItddUJJqWWWRj9gx2OpTLjdOmCF+//wkLnV4jNPm1xeK/1Py+jd27QEP5q9DLrPtBZ6MPKbChZ32JMPUd1rgzBCPulloV8zxzoO5+YOJcW9KaOmO1+EjtPdyvn5pm5B5+jatE4hqoNWpATp8EM+mWXDMpoPVa+ZpS3PgH3inULEJnUXmv6Aw3h07l2mDxiORKtRegArFu0MjyGXpweN1cDGP79zsqNP7cgKFd+Mbv2O474rLJD+5ujp++uaZChk1AJbhhQMq5jgCmocTr8KUpwl+WzV61c/FZZyrhUvD+GuNI/s7BwysKOQ1au/WblwtrYoXV7LfTXcLtfZujj0bErme7mvNWUWfBaUzxb3PeuhcT7ArIHTlu+hIjzZb+cEk4SLjLrL1r56ysWzUEBuHe727DBfrQNrvZ8E1Y8814CbPSppWjN5bTeytRRi7sel3N+xanDFuZfrWWAicE+2GuAGRBLWTPK7OkukCb6ASAkWwGo2SRMAUfejJUesUA5LbxB5pYnLryOfbIyWJA4v5Q90FgW+sjQLfhFVXZrf/HHjld76wdlwDveETnD1wSk6KePbnHOTZxaNNtzEg05lKPMIA68b/HY1xbnXxTNywobygiUiIo2cSpCGKg8AtDq3hQQNl4PMNCAac8r9HfbJy2chBxKhBH3v2Np/gVcKwNLix9Y2H3CecyCDhe/HEzARVMGe5WFSOfNMaPPPVFSFgqoV9z1mO9v852QmTL1gIWZpwD05S0S3eGPoI9jiw9tFf4EMxPVfEi4T9DUuoi8duRUMIicYOL880hV6+Mt9sebwf43bXDo9HjfFiENLR35pDomDHwULPGwN1CyHQhQkFgbDU5g6tNZmn2m2dt27maO43jyB+3WJ+18GC9ZL7kzOpSIl4L+GK5fxUI3YbCucebEtoZvdbU9pTv4tmVcYq2nVIoGBnHXDPAi4rHBrRdYJ9zRc89tb/UOOMxOd/A9aHhe+T6oNTMOmpqQDjWUCQji7k7TD92Bm/8XTeilsuMgfKC8uFvgRs656ASoOm73QRldsv7SDxaG90DQz8ikFblqg4aIna/tfJw+6dsql684T3XHEgBcBl0w+vUtvWixRkKI+rMU/egm5lE957xKUB798NChQnBL1OOzmcaoMhoM/nmKYoy4H/HyVyLWLi4A0MGbKH8YIKgLhYrsVl6faETPFZigwU+gRUWhN0kH4imEBYJinWkLkYHOtTsmSOjw5cfFuIU+3gnj9bMb6Po5Jlo/GrwsACJiUDoydtRtQIN0LjpYtERjmimLlcCTyHPODtcLBznIBkBRBU5rHORvENI6BciQIISYnqj3ZUaDCw1rvLspmoQoEgT4z1uCnA9Pd4IcR4QMdSjHwLCUHdpX6jETJIjrAFZWBZdMDAFhrZlGiFGZhqIG1jLMmUB0jjXzzabTnv9ZMnK3x5rTTguyZZq0kPNq5H+psA0QkgFCjwaT0FJwclVj0wSZ47bGTOBbmhNcOVYw7CsPSCo0A5/ds3+vSYb78uPxU31/cwUAlnLf490aDqqThppyPClthltlajyD54C9nNKvNggQvA3Q1lFOOD+/Rjv/AYfYvIrlGomFAAAAAElFTkSuQmCC",Ar=i.defineComponent({name:"FChatAttachmentPreview",props:wl,emits:[],setup(e){function t(s){switch(s.toLowerCase()){case"doc":case"docx":return S1;case"xlsx":case"xls":return D1;case"ppt":case"mobi":return T1;case"txt":return vl;case"png":case"jpg":case"jpeg":case"gif":return F1;default:return vl}}function n(s){return s.icon?s.icon:t(s.type||"")}function u(s){if(s===0)return"0 B";const l=1024,d=["B","KB","MB","GB"],f=Math.floor(Math.log(s)/Math.log(l));return parseFloat((s/Math.pow(l,f)).toFixed(2))+" "+d[f]}async function o(s){var l;(l=e.onOpen)==null||l.call(e,s)}async function r(s,l){s.stopPropagation(),s.preventDefault();const d=sn(l);d&&await Or(d,l.name)}function a(s,l){const d=u(s.size||0),f=n(s),c=sn(s);return i.createVNode("div",{key:l,class:"f-chat-attachment-preview-card"},[i.createVNode("div",{class:"f-chat-attachment-preview-card-inner"},[i.createVNode("div",{class:"f-chat-attachment-preview-main",role:"button",tabindex:0,onClick:()=>o(s),onKeydown:h=>h.key==="Enter"&&o(s)},[i.createVNode("div",{class:"f-chat-attachment-preview-icon-wrapper"},[i.createVNode("img",{src:f,alt:""},null)]),i.createVNode("div",{class:"f-chat-attachment-preview-info"},[i.createVNode("div",{class:"f-chat-attachment-preview-name",title:s.name},[s.name]),i.createVNode("div",{class:"f-chat-attachment-preview-meta"},[d&&i.createVNode("span",null,[d])])])]),c?i.createVNode("button",{type:"button",class:"f-chat-attachment-preview-download-btn","aria-label":"下载附件",title:"下载",onClick:h=>r(h,s)},[i.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[i.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])])}return()=>{const s=e.content;if(!s)return null;const{message:l,attachments:d}=s;return i.createVNode("div",{class:"f-chat-attachment-preview"},[l&&i.createVNode("div",{class:"f-chat-attachment-preview-message"},[l]),i.createVNode("div",{class:"f-chat-attachment-preview-list"},[d.map((f,c)=>a(f,c))])])}}});Ar.install=e=>{e.component(Ar.name,Ar)},yn.install=e=>{e.component(yn.name,yn)},xn.install=e=>{e.component(xn.name,xn)};const Al={activeNavId:{type:String,default:""},displayField:{type:String,default:"text"},disableField:{type:String,default:"disable"},horizontal:{type:Boolean,default:!0},idField:{type:String,default:"id"},maxNum:{type:Number,default:99},navData:{type:Array,default:()=>[]},navPicking:{type:Function,default:null},valueField:{type:String,default:"num"},visible:{type:Boolean,default:!0},customClass:{type:String,default:""},customStyle:{type:String,default:""}},kr=i.defineComponent({name:"FXNav",props:Al,emits:["nav","update:activeNavId"],setup(e,t){const n=i.ref(e.activeNavId),u=i.ref(e.navData);function o(f){if(u.value&&u.value.length){let c=u.value.find(h=>h[e.idField]===f&&h[e.disableField]!==!0);c||(c=u.value.find(h=>h[e.disableField]!==!0)),c&&n.value!==c.id&&(n.value=c.id,t.emit("nav",c))}}i.watch([()=>e.activeNavId,()=>e.navData],([f,c])=>{u.value=c,o(f)});const r=i.computed(()=>e.visible&&u.value.length>0);function a(f){f.disable||f.id===n.value||Promise.resolve().then(()=>{const c=e.navPicking;return c&&typeof c=="function"?c(f):!0}).then(c=>{let h=!0;typeof c=="object"?c.canContinue||(h=!1,c.message&&console.error({message:c.message,position:"top-center"})):h=c,h&&(n.value=f.id,t.emit("update:activeNavId",f.id),t.emit("nav",f))})}const s=i.computed(()=>{const f={"farris-nav":!0,"farris-nav-vertical":!e.horizontal};return ye(f,e.customClass)}),l=i.computed(()=>Ae({},e.customStyle));function d(f){u.value=f,o(n.value)}return t.expose({updateNavData:d}),()=>{var f;return r.value&&i.createVNode("div",{class:s.value,style:l.value},[(f=u.value)==null?void 0:f.map(c=>i.createVNode("div",{class:["farris-nav-item",{active:c[e.idField]===n.value},{disabled:c[e.disableField]}],onClick:()=>a(c)},[i.createVNode("div",{class:"farris-nav-item-link pt-3"},[i.createVNode("span",{class:"farris-nav-item-link-text"},[typeof c[e.displayField]=="function"?c[e.displayField]():c[e.displayField],c[e.valueField]&&i.createVNode("div",{class:"farris-nav-item-tag"},[c[e.valueField]<=e.maxNum&&i.createVNode("span",{class:"tag-text"},[c[e.valueField]]),c[e.valueField]>e.maxNum&&i.createVNode("span",{class:"tag-text"},[e.maxNum,i.createTextVNode("+")])])]),i.createVNode("div",{class:"farris-nav-item-bottom-line"},null)])]))])}}});kr.install=e=>{e.component(kr.name,kr)};const kl={buttonContent:{type:String,default:'<i class="fx-icon fx-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},data:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入关键词"},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},showDropdown:{type:Boolean,default:!0}},Cl={data:{type:Array,default:()=>[]},onConfirmResult:{type:Function,default:void 0},onSearchedValue:{type:Function,default:void 0},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1}},Au=i.defineComponent({name:"FXSearchBoxContainer",props:Cl,emits:["confirmResult","searchedValue"],setup(e,t){const n=i.ref(e.data),u=i.ref(""),o=i.computed(()=>{if(!u.value)return n.value;const d=u.value.toLowerCase();return n.value.filter(f=>String(f[e.textField]??"").toLowerCase().includes(d))});function r(d){u.value=d}function a(d){t.emit("confirmResult",d[e.textField]),t.emit("searchedValue",[d])}function s(d){return t.slots.default?t.slots.default({item:d}):i.createVNode("span",null,[d[e.textField]])}const l=i.computed(()=>{const d={padding:"8px"};return e.maxHeight!==void 0&&e.maxHeight>0&&(d.maxHeight=`${e.maxHeight}px`),d});return i.watch(()=>e.data,d=>{d!==n.value&&(n.value=d)}),t.expose({search:r}),()=>i.createVNode("div",{class:"search-box-container f-utils-overflow-xhya position-relative",style:l.value},[e.loading&&i.createVNode("div",{class:"search-box-loading"},[i.createVNode("i",{class:"fx-icon fx-icon-bubble_step_loading fx-icon-spin"},null)]),i.createVNode("ul",{class:"search-box-list"},[o.value.map(d=>i.createVNode("li",{class:"search-box-item dropdown-item",key:d[e.idField],onClick:()=>a(d)},[s(d)])),!e.loading&&o.value.length===0&&i.createVNode("li",{class:"search-box-empty"},[i.createTextVNode("无匹配结果")])])])}}),Cr=i.defineComponent({name:"FXSearchBox",props:kl,emits:["update:modelValue","change","selectedValue","clickButton"],setup(e,t){const n=i.ref(),u=i.ref(),o=i.ref(),r=i.ref(e.modelValue),a=i.ref(!1),s='<i class="fx-icon fx-icon-clockwise fx-icon-spin"></i>',l=i.computed(()=>e.loading?s:e.buttonContent);i.watch(r,x=>{var k;(k=o.value)==null||k.search(x),t.emit("update:modelValue",x)}),i.watch(()=>e.modelValue,x=>{r.value=x});function d(x){r.value=x,m()}function f(x){const k=r.value;t.emit("change",x,{oldValue:k,newValue:x})}function c(x){t.emit("selectedValue",x)}function h(){t.emit("clickButton",{})}async function p(){var x;a.value=!0,await i.nextTick(),(x=u.value)==null||x.show(n.value)}function m(){var x;(x=u.value)==null||x.hide(),a.value=!1}function w(){a.value?m():p()}function y(x){const k=x.target.value;r.value=k,f(k),e.showDropdown&&k&&p()}function A(){e.showDropdown&&r.value&&p()}function b(){r.value="",t.emit("update:modelValue",""),m()}t.expose({togglePopup:w,hidePopup:m,showPopup:p});const g=i.computed(()=>{const x=ye({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof x=="string"?[x]:Array.isArray(x)?x:[]]});return()=>i.createVNode("div",{class:g.value},[i.createVNode("div",{class:"f-search-box-input-group",ref:n},[i.createVNode("input",{class:"f-search-box-input form-control",type:"text",placeholder:e.placeholder,value:r.value,disabled:e.disable,onInput:y,onFocus:A},null),r.value&&!e.disable&&i.createVNode("span",{class:"f-search-box-clear",onClick:b},[i.createVNode("i",{class:"fx-icon fx-icon-close"},null)]),i.createVNode("span",{class:"f-search-box-button",onClick:h,innerHTML:l.value},null)]),e.showDropdown&&i.createVNode(Kt,{ref:u,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost},{default:()=>[i.createVNode(Au,{ref:o,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:d,onSearchedValue:x=>c(x),loading:e.loading,maxHeight:e.maxHeight},t.slots)]})])}});Cr.install=e=>{e.component(Cr.name,Cr),e.component(Au.name,Au)};const Qo={data:{type:Array,default:()=>[]},view:{type:String,default:"ContentView"},customClass:{type:String,default:""},itemClass:{type:[String,Function],default:""},idField:{type:String,default:"id"},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},valueField:{type:String,default:"id"},group:{type:Object,default:void 0}};function N1(e){const t=i.ref([...e.data]),n=i.ref([]),u=i.ref(""),o=i.computed(()=>{var h;const c=e.group;return c!=null&&c.enable&&((h=c.groupFields)!=null&&h.length)?r(t.value,c):t.value.map((p,m)=>({type:0,data:p,originalIndex:m}))});function r(c,h){const p=[],m=h.groupFields[0],w=new Map;c.forEach(A=>{const b=String(A[m]??"");w.has(b)||w.set(b,[]),w.get(b).push(A)});let y=0;return w.forEach((A,b)=>{p.push({type:1,data:{[m]:b},groupField:m,groupValue:b,originalIndex:y++}),A.forEach(g=>{p.push({type:0,data:g,groupField:m,groupValue:b,originalIndex:y++})})}),p}function a(c){t.value=[...c],n.value=[],u.value=""}function s(c){u.value=c;const h=t.value.find(p=>p[e.idField]===c);h&&!n.value.includes(h)&&(n.value=[h])}function l(){n.value=[],u.value=""}function d(c){const h=n.value.indexOf(c);h>=0?n.value.splice(h,1):n.value=[c],u.value=c[e.idField]}function f(c){return n.value.includes(c)}return{data:t,visualData:o,selectedItems:n,activeItemId:u,updateDataSource:a,activeRowById:s,clearSelection:l,toggleSelection:d,isSelected:f}}const I1=i.defineComponent({name:"FXListViewItem",props:{...Qo,item:{type:Object,default:()=>({})},index:{type:Number,default:0},isActive:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1}},emits:["clickItem"],setup(e,t){const n=i.computed(()=>({"f-list-view-item":!0,"f-list-view-item-active":e.isActive}));return()=>i.createVNode("li",{class:[n.value,typeof e.itemClass=="function"?e.itemClass(e.item,e.index):e.itemClass],onClick:()=>t.emit("clickItem",e.item,e.index)},[t.slots.default?t.slots.default({item:e.item,index:e.index,selectedItem:e.isSelected?e.item:null}):i.createVNode("span",null,[e.item[e.textField]])])}}),O1=i.defineComponent({name:"FXListGroupItem",props:{groupData:{type:Object,default:()=>({})},groupField:{type:String,default:""},groupValue:{type:String,default:""},index:{type:Number,default:0}},setup(e,t){return()=>i.createVNode("li",{class:"f-list-view-group-item"},[t.slots.default?t.slots.default({item:e.groupData,index:e.index}):i.createVNode("div",{class:"f-list-view-group-header"},[i.createVNode("i",{class:"fx-icon f-accordion-expand"},null),i.createVNode("span",null,[e.groupValue])])])}}),_r=i.defineComponent({name:"FXListView",props:Qo,emits:["clickItem"],setup(e,t){const{visualData:n,activeItemId:u,updateDataSource:o,activeRowById:r,clearSelection:a,toggleSelection:s,isSelected:l}=N1({data:e.data,idField:e.idField,group:e.group}),d=i.computed(()=>ye({"f-list-view":!0},e.customClass));function f(c,h){s(c),t.emit("clickItem",c,h)}return t.expose({updateDataSource:o,activeRowById:r,clearSelection:a}),()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{class:"f-list-view-content"},[i.createVNode("ul",{class:"f-listview-items"},[n.value.map((c,h)=>c.type===1?i.createVNode(O1,{key:`group_${c.groupValue}_${h}`,groupData:c.data,groupField:c.groupField,groupValue:c.groupValue,index:h},{default:t.slots.group}):i.createVNode(I1,{key:`${c.data[e.idField]}_${h}`,item:c.data,index:c.originalIndex,isActive:c.data[e.idField]===u.value,isSelected:l(c.data),itemClass:e.itemClass,textField:e.textField,onClickItem:f},{default:t.slots.content}))])])])}});_r.install=e=>{e.component(_r.name,_r)};const ku=i.defineComponent({name:"FXAgentThinkingMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content,n=t.streamStatus==="end"||t.streamStatus===void 0;return i.createVNode("details",{class:"f-ec-thinking",open:!0},[i.createVNode("summary",{class:"f-ec-thinking-summary"},[i.createTextVNode("思考过程"),n?null:i.createVNode("span",{class:"f-ec-thinking-badge"},[i.createTextVNode("进行中")])]),i.createVNode("div",{class:"f-ec-thinking-body"},[t.text]),t.sources&&t.sources.length>0?i.createVNode("ul",{class:"f-ec-thinking-sources"},[t.sources.map((u,o)=>i.createVNode("li",{key:o},[u]))]):null])}}});ku.install=e=>{e.component(ku.name,ku)};function L1(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function P1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function V1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const Cu=i.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>P1(e.content.media)),n=i.computed(()=>sn(V1(e.content.media)));async function u(o){o.preventDefault(),o.stopPropagation();const r=n.value;r&&await Or(r,e.content.name)}return()=>{const o=!!n.value;return i.createVNode("div",{class:"f-ec-attach-row"},[i.createVNode("a",{class:"f-ec-attach f-ec-attach--stretch",href:t.value,target:"_blank",rel:"noopener noreferrer"},[i.createVNode("span",{class:"f-ec-attach-icon","aria-hidden":!0},[i.createTextVNode("📎")]),i.createVNode("span",{class:"f-ec-attach-body"},[i.createVNode("span",{class:"f-ec-attach-name"},[e.content.name]),i.createVNode("span",{class:"f-ec-attach-meta"},[i.createVNode("span",{class:"f-ec-attach-cat"},[e.content.category]),i.createVNode("span",{class:"f-ec-attach-size"},[L1(e.content.size)])])])]),o?i.createVNode("button",{type:"button",class:"f-ec-attach-download-btn","aria-label":"下载附件",title:"下载",onClick:u},[i.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[i.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])}}});Cu.install=e=>{e.component(Cu.name,Cu)};const R1={0:"高",1:"中",2:"低"},_u=i.defineComponent({name:"ErrorReminderMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content.errorLevel;return i.createVNode("div",{class:["f-ec-error",`f-ec-error--lvl-${t}`]},[i.createVNode("div",{class:"f-ec-error-head"},[i.createVNode("span",{class:"f-ec-error-badge"},[R1[t]]),i.createVNode("span",{class:"f-ec-error-label"},[i.createTextVNode("错误提醒")])]),i.createVNode("div",{class:"f-ec-error-text"},[e.content.errorText]),e.content.errorLink?i.createVNode("a",{class:"f-ec-error-link",href:e.content.errorLink,target:"_blank",rel:"noopener noreferrer"},[i.createTextVNode("查看详情")]):null])}}});_u.install=e=>{e.component(_u.name,_u)};const Dt="__hitl_other__";function Er(e){const t=e??"text";return t==="text"||t==="select"||t==="multi_select"||t==="confirm"||t==="form"||t==="date"||t==="number"?t:"text"}const Eu=i.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},pinned:{type:Boolean,default:!1},pinnedWidth:{type:String,default:void 0},onSubmitAnswers:{type:Function,default:void 0}},setup(e){const t=i.ref(!1),n=i.ref(0),u=i.ref({}),o=i.ref({});function r(_){const N={},I={};for(const C of _){const P=Er(C.ui_type);if(P==="confirm")N[C.id]=void 0;else if(P==="text"||P==="select")N[C.id]=C.default_value??"";else if(P==="multi_select")N[C.id]=C.default_value?JSON.parse(C.default_value):[];else if(P==="form"){const V={};if(Array.isArray(C.fields))for(const E of C.fields)V[E.name]=E.default_value??"";N[C.id]=V}else N[C.id]=C.default_value??"";I[C.id]={active:!1,text:""}}u.value=N,o.value=I,n.value=0}i.watch(()=>e.content.questions,_=>{Array.isArray(_)&&_.length&&r(_)},{immediate:!0}),i.watch(()=>e.content.answers,_=>{if(!Array.isArray(_)||_.length===0)return;const N={...u.value},I={...o.value};for(const C of _){N[C.id]=C.answer;const P=e.content.questions.find(V=>V.id===C.id);P&&Er(P.ui_type)==="select"&&typeof C.answer=="string"&&!(P.options??[]).some(R=>R.label===C.answer)&&C.answer!==""&&(I[C.id]={active:!0,text:C.answer},N[C.id]=Dt)}u.value=N,o.value=I,t.value=!0},{immediate:!0});const a=i.computed(()=>e.content.questions.length),s=i.computed(()=>{const _=e.content.questions;if(_.length===0)return null;const N=Math.max(0,Math.min(n.value,_.length-1));return _[N]}),l=i.computed(()=>n.value<=0),d=i.computed(()=>n.value>=a.value-1);function f(){d.value||(n.value+=1)}function c(){l.value||(n.value-=1)}const h=i.computed(()=>{var _,N;if(t.value||e.disabled)return!1;for(const I of e.content.questions){const C=Er(I.ui_type),P=u.value[I.id];if(C==="text"&&(typeof P!="string"||P.trim()==="")||C==="select"&&(typeof P!="string"||P.trim()===""||P===Dt&&(((N=(_=o.value[I.id])==null?void 0:_.text)==null?void 0:N.trim())??"")==="")||C==="confirm"&&typeof P!="boolean"||C==="multi_select"&&(!Array.isArray(P)||P.length===0))return!1;if(C==="form"){const V=I.fields??[],E=P;for(const R of V)if(R.required){const M=E[R.name];if(typeof M!="string"||M.trim()==="")return!1}}if((C==="date"||C==="number")&&(typeof P!="string"||P.trim()===""))return!1}return!0});function p(_,N){u.value={...u.value,[_]:N}}function m(_,N){var I;N===Dt?(o.value={...o.value,[_.id]:{...o.value[_.id],active:!0,text:((I=o.value[_.id])==null?void 0:I.text)??""}},p(_.id,Dt)):(o.value={...o.value,[_.id]:{active:!1,text:""}},p(_.id,N))}function w(_,N){const I=u.value[_.id]??[];I.includes(N)?p(_.id,I.filter(C=>C!==N)):p(_.id,[...I,N])}function y(){var N,I,C;if(!h.value)return;const _=[];for(const P of e.content.questions){const V=Er(P.ui_type);let E=u.value[P.id];V==="select"&&E===Dt&&(E=((I=(N=o.value[P.id])==null?void 0:N.text)==null?void 0:I.trim())??""),V==="number"&&(E=Number(E)),_.push({id:P.id,answer:E})}t.value=!0,(C=e.onSubmitAnswers)==null||C.call(e,_)}function A(_,N,I){return i.createVNode("div",{class:"f-hitl-date-wrap"},[i.createVNode("input",{class:"f-hitl-input",type:"date",value:_,disabled:N,onInput:C=>I(C.target.value)},null)])}function b(_,N,I,C,P){const V=M=>{let $=Number(_)||0;$+=M,C!==void 0&&($=Math.max(C,$)),P!==void 0&&($=Math.min(P,$)),I(String($))},E=P!==void 0&&Number(_||0)>=P,R=C!==void 0&&Number(_||0)<=C;return i.createVNode("div",{class:"f-hitl-num-wrap"},[i.createVNode("input",{class:"f-hitl-input f-hitl-num-input",type:"number",value:_,min:C,max:P,disabled:N,onInput:M=>I(M.target.value)},null),i.createVNode("div",{class:"f-hitl-num-btns"},[i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:N||E,onClick:()=>V(1)},[i.createVNode("span",{class:"fx-icon fx-icon-foldup"},null)]),i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:N||R,onClick:()=>V(-1)},[i.createVNode("span",{class:"fx-icon fx-icon-expanddown"},null)])])])}function g(_,N){const I=u.value[_.id]??"",C=o.value[_.id]??{active:!1,text:""},P=t.value||e.disabled;return i.createVNode("div",{key:_.id},[i.createVNode("div",{class:"f-hitl-option-list"},[N.map((V,E)=>{const R=I===V.label&&!C.active;return i.createVNode("div",{key:V.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":R}],onClick:()=>{P||m(_,V.label)}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[E+1]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[V.label]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[R?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}),_.allow_other?i.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":I===Dt||C.active}],onClick:()=>{P||m(_,Dt)}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[i.createTextVNode("...")]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[i.createTextVNode("其他")]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[I===Dt||C.active?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),_.allow_other&&(I===Dt||C.active)?i.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:C.text,placeholder:"请输入自定义内容",disabled:P,onInput:V=>{const E=V.target.value;o.value={...o.value,[_.id]:{active:!0,text:E}},p(_.id,Dt)}},null):null])}function x(_,N){const I=u.value[_.id]??[],C=o.value[_.id]??{active:!1,text:""},P=t.value||e.disabled;return i.createVNode("div",{key:_.id},[i.createVNode("div",{class:"f-hitl-option-list"},[N.map((V,E)=>{const R=I.includes(V.label);return i.createVNode("div",{key:V.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":R}],onClick:()=>{P||w(_,V.label)}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[E+1]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[V.label]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[R?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}),_.allow_other?i.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":C.active}],onClick:()=>{if(P)return;const V=C.text;if(C.active){const E=u.value[_.id]??[];p(_.id,E.filter(R=>R!==V)),o.value={...o.value,[_.id]:{active:!1,text:""}}}else o.value={...o.value,[_.id]:{active:!0,text:C.text}},C.text&&!I.includes(C.text)&&p(_.id,[...I,C.text])}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[i.createTextVNode("...")]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[i.createTextVNode("其他")]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[C.active?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),_.allow_other&&C.active?i.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:C.text,placeholder:"请输入自定义内容",disabled:P,onInput:V=>{const E=V.target.value,R=C.text;o.value={...o.value,[_.id]:{active:!0,text:E}};const M=u.value[_.id]??[];p(_.id,[...M.filter($=>$!==R),E])}},null):null])}function k(_){const N=u.value[_.id]??{},I=_.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-form-group"},[I.map(C=>{const P=N[C.name]??"";return C.type==="select"?i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),i.createVNode("div",{class:"f-hitl-select-group"},[(C.options??[]).map(V=>i.createVNode("button",{key:V,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":P===V}],disabled:t.value||e.disabled,onClick:()=>p(_.id,{...N,[C.name]:V})},[V]))])]):C.type==="number"?i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),b(P,t.value||e.disabled,V=>p(_.id,{...N,[C.name]:V}),C.min,C.max)]):C.type==="date"?i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),A(P,t.value||e.disabled,V=>p(_.id,{...N,[C.name]:V}))]):i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),i.createVNode("input",{class:"f-hitl-input",type:"text",value:P,placeholder:C.default_value??"请输入",disabled:t.value||e.disabled,onInput:V=>p(_.id,{...N,[C.name]:V.target.value})},null)])})])])}function F(_){const N=u.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[A(N,t.value||e.disabled,I=>p(_.id,I))])}function T(_){const N=u.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[b(N,t.value||e.disabled,I=>p(_.id,I),_.min,_.max)])}function D(_){const N=Er(_.ui_type);if(N==="text"){const I=u.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("input",{class:"f-hitl-input",type:"text",value:I,placeholder:_.placeholder??"请输入",disabled:t.value||e.disabled,onInput:C=>p(_.id,C.target.value)},null)])}if(N==="multi_select"){const I=Array.isArray(_.options)?_.options:[];return x(_,I)}if(N==="form")return k(_);if(N==="select"){const I=Array.isArray(_.options)?_.options:[];return I.length===0?i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:_.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持空的 select,请升级前端。")])]):g(_,I)}if(N==="confirm"){const I=u.value[_.id];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":I===!0}],disabled:t.value||e.disabled,onClick:()=>p(_.id,!0)},[i.createTextVNode("是")]),i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":I===!1}],disabled:t.value||e.disabled,onClick:()=>p(_.id,!1)},[i.createTextVNode("否")])])])}return N==="date"?F(_):N==="number"?T(_):i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:_.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持 ui_type「"),String(_.ui_type),i.createTextVNode("」,请升级前端。")])])}function U(){return a.value<=1?null:i.createVNode("div",{class:"f-hitl-pagination"},[i.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:l.value,onClick:c},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-left"},null)]),i.createVNode("span",{class:"f-hitl-pagination__text"},[n.value+1,i.createTextVNode("/"),a.value]),i.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:d.value,onClick:f},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-right"},null)])])}return()=>{const _=s.value;if(!_)return null;const N=e.pinned&&!t.value?"f-hitl-card--pinned":"",I=e.pinned&&!t.value&&e.pinnedWidth?{width:e.pinnedWidth}:void 0;return i.createVNode("div",{class:["f-hitl-card",N],style:I},[i.createVNode("div",{class:"f-hitl-card__header"},[i.createVNode("div",{class:"f-hitl-card__title-wrap"},[i.createVNode("span",{class:"f-hitl-card__title"},[_.question]),i.createVNode("span",{class:"f-hitl-card__subtitle"},[_.header])]),U()]),i.createVNode("div",{class:"f-hitl-card__body"},[D(_)]),!e.disabled&&i.createVNode("div",{class:"f-hitl-card__footer"},[i.createVNode("button",{type:"button",class:"f-hitl-submit",disabled:!h.value,onClick:y},[t.value?"已提交":"提交"])])])}}});Eu.install=e=>{e.component(Eu.name,Eu)};function M1(e,t){var u;const n=(u=e.pickActions)==null?void 0:u[t];return n||e.pickActionDefault}const Su=i.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(n,u)=>{var o;M1(e.content,u),(o=e.onPick)==null||o.call(e,n)};return()=>i.createVNode("div",{class:"f-ec-recommend"},[e.content.title?i.createVNode("div",{class:"f-ec-recommend-title"},[e.content.title]):null,i.createVNode("div",{class:"f-ec-recommend-chips"},[e.content.suggestions.map((n,u)=>i.createVNode("button",{key:u,type:"button",class:"f-ec-recommend-chip",onClick:()=>t(n,u)},[n]))])])}});Su.install=e=>{e.component(Su.name,Su)};const Du=i.defineComponent({name:"LinkCardMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content;return i.createVNode("div",{class:"f-ec-linkcard"},[t.poster?i.createVNode("div",{class:"f-ec-linkcard-poster"},[i.createVNode("img",{src:t.poster,alt:""},null)]):null,i.createVNode("div",{class:"f-ec-linkcard-body"},[i.createVNode("a",{class:"f-ec-linkcard-title",href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title]),t.subtitle?i.createVNode("div",{class:"f-ec-linkcard-sub"},[t.subtitle]):null,t.relatedLinks&&t.relatedLinks.length>0?i.createVNode("div",{class:"f-ec-linkcard-related"},[i.createVNode("div",{class:"f-ec-linkcard-related-label"},[i.createTextVNode("相关阅读")]),i.createVNode("ul",null,[t.relatedLinks.map((n,u)=>i.createVNode("li",{key:u},[i.createVNode("a",{href:n.url,target:"_blank",rel:"noopener noreferrer"},[n.title])]))])]):null])])}}});Du.install=e=>{e.component(Du.name,Du)};const Tu=i.defineComponent({name:"ReferenceSourcesMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-sources"},[i.createVNode("div",{class:"f-ec-sources-title"},[i.createTextVNode("引用来源")]),i.createVNode("ul",{class:"f-ec-sources-list"},[e.content.items.map((t,n)=>i.createVNode("li",{key:n},[i.createVNode("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title])]))])])}});Tu.install=e=>{e.component(Tu.name,Tu)};const Fu=i.defineComponent({name:"UnknownEnterpriseMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-unknown"},[i.createVNode("div",{class:"f-ec-unknown-title"},[i.createTextVNode("未知类型消息")]),e.content.wireType?i.createVNode("div",{class:"f-ec-unknown-wire"},[i.createTextVNode("wire type: "),e.content.wireType]):null,i.createVNode("div",{class:"f-ec-unknown-desc"},[e.content.hint??"客户端无法识别此消息类型,已按占位展示。"])])}});Fu.install=e=>{e.component(Fu.name,Fu)},rr.install=e=>{e.component(rr.name,rr)};const B1={install(e){e.use(at).use(ur).use(or).use(sr).use(cr).use(mr).use(pr).use(gr).use(br).use(mn).use(tn).use(_n).use(Qt).use(yr).use(xr).use(wr).use(vr).use(Ar).use(yn).use(xn).use(Kt).use(An).use(kr).use(Cr).use(_r)}};O.FXAgentThinking=ku,O.FXAppPreview=at,O.FXAttachmentFile=Cu,O.FXAttachmentPreview=Ar,O.FXBubble=ur,O.FXBubbleAction=Fo,O.FXCarousel=or,O.FXCarouselItem=lu,O.FXChatPreview=sr,O.FXCoding=mr,O.FXConfirmDialog=cr,O.FXDynamicComponent=xn,O.FXErrorReminder=_u,O.FXFileOperation=pr,O.FXGenerateProcess=gr,O.FXHistory=br,O.FXHitlQuestion=Eu,O.FXInputRecommend=Su,O.FXLinkCard=Du,O.FXListView=_r,O.FXMarkdown=mn,O.FXMarkdownPreview=tn,O.FXNav=kr,O.FXPopover=Kt,O.FXPopoverDirective=es,O.FXPrompt=vu,O.FXPrompts=_n,O.FXReferenceSources=Tu,O.FXSearchBox=Cr,O.FXSearchBoxContainer=Au,O.FXSplitter=An,O.FXSplitterPane=ir,O.FXStartedTodo=Qt,O.FXSuggestion=yr,O.FXTodo=xr,O.FXTodoListItemView=su,O.FXTodoListView=nr,O.FXToolUse=vn,O.FXToolUseBatch=wr,O.FXUnknownEnterprise=Fu,O.FXUserAuth=rr,O.FXWelcome=vr,O.FXWidgetContainer=yn,O.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=Zo,O.PREVIEW_BRIDGE_SOURCE=Xo,O.PREVIEW_BRIDGE_VERSION=qo,O.appPreviewMessageProps=be,O.attachmentPreviewProps=wl,O.bubbleActionProps=us,O.bubbleProps=Ir,O.carouselItemProps=is,O.carouselProps=os,O.chatHistoryProps=hl,O.chatPreviewProps=ss,O.clonePreviewPayloadForPostMessage=Gs,O.codingMessageProps=ll,O.confirmDialogProps=Qs,O.createPreviewIframeSdk=Dp,O.default=B1,O.extractFileIdFromRuntimeDownloadUrl=fi,O.fileOperationMessageProps=dl,O.generateProcessProps=fl,O.getCustomClass=ye,O.getCustomStyle=Ae,O.getDynamicComponentRegistryDebugSnapshot=So,O.invokeAgentWorkbenchSdkApi=Sp,O.isImageUrl=hi,O.isPreviewBridgeAssistantMessage=qs,O.listViewProps=Qo,O.loadDynamicComponent=qa,O.markdownMessageProps=ka,O.markdownPreviewProps=ls,O.navProps=Al,O.normalizeDynamicComponentRegisterClaim=Ve,O.overflowTooltipDirective=bi,O.peekDynamicComponentRegisterBootstrapId=wh,O.popoverProps=Ka,O.postAssistantToPreviewIframe=Zs,O.postDynamicComponentAssistantMessage=_h,O.previewLayoutBridge=Np,O.promptProps=gl,O.promptsProps=ml,O.registerPreviewChromeSdk=Fp,O.renderIconNode=Lr,O.renderNode=Mn,O.resolveHrefForAttachmentDownload=sn,O.resolveRuntimeAttachmentDownloadUrl=ju,O.searchBoxContainerProps=Cl,O.searchBoxProps=kl,O.splitterProps=as,O.startedTodoProps=ts,O.subscribeAssistantInPreviewIframe=Ys,O.suggestionProps=bl,O.todoListItemProps=rs,O.todoListViewProps=ns,O.todoProps=yl,O.triggerAttachmentDownload=Or,O.unloadDynamicComponent=Za,O.useSequentialStreaming=Pr,O.useStreamingOutput=mi,O.useTimer=Hu,O.welcomeProps=xl,O.widgetContainerProps=Ha,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
157
|
+
`},sl=c1(p1)(al),m1={config:f1},g1=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(u,a){return a(u)},o)}};function ll(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],ll(e[n],t[n]))}),ul(ul({},e),t)}var b1={type:"cancelation",msg:"operation is manually canceled"};function Ko(e){var t=!1,n=new Promise(function(r,o){e.then(function(u){return t?o(b1):r(u)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var y1=["monaco"],x1=s1.create({config:l1,isInitialized:!1,resolve:null,reject:null,monaco:null}),cl=Um(x1,2),pr=cl[0],wu=cl[1];function w1(e){var t=m1.config(e),n=t.monaco,r=Hm(t,y1);wu(function(o){return{config:ll(o.config,r),monaco:n}})}function v1(){var e=pr(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(wu({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Ko(Qo);if(window.monaco&&window.monaco.editor)return dl(window.monaco),e.resolve(window.monaco),Ko(Qo);g1(A1,C1)(_1)}return Ko(Qo)}function A1(e){return document.body.appendChild(e)}function k1(e){var t=document.createElement("script");return e&&(t.src=e),t}function C1(e){var t=pr(function(r){var o=r.config,u=r.reject;return{config:o,reject:u}}),n=k1("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function _1(){var e=pr(function(n){var r=n.config,o=n.resolve,u=n.reject;return{config:r,resolve:o,reject:u}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var r=n.m||n;dl(r),e.resolve(r)},function(n){e.reject(n)})}function dl(e){pr().monaco||wu({monaco:e})}function E1(){return pr(function(e){var t=e.monaco;return t})}var Qo=new Promise(function(e,t){return wu({resolve:e,reject:t})}),S1={config:w1,init:v1,__getMonacoInstance:E1};const fl={content:{type:Object,required:!0}},hl=20,D1=16,Cn=180;function F1(e){typeof requestIdleCallback<"u"?requestIdleCallback(e,{timeout:500}):setTimeout(e,0)}const mr=i.defineComponent({name:"FXCodingMessage",props:fl,setup(e){const t=i.ref(!0),n=i.ref(!1),r=i.ref(null),o=i.ref(null),u=i.ref(Cn),a=i.ref(!1);function s(){t.value=!t.value}function l(){var b,g,x,k;const p=(b=e.content)==null?void 0:b.code;if(!p)return Cn;const y=o.value;let A;if(y!=null&&y.getOriginalEditor&&(y!=null&&y.getModifiedEditor)){const T=((g=y.getOriginalEditor().getModel())==null?void 0:g.getLineCount())??0,D=((x=y.getModifiedEditor().getModel())==null?void 0:x.getLineCount())??0;A=T+D}else if(y!=null&&y.getModel)A=((k=y.getModel())==null?void 0:k.getLineCount())??0;else{const{value:T,originalValue:D}=p,S=(T||"").split(`
|
|
158
|
+
`).length,X=D?D.split(`
|
|
159
|
+
`).length:0;A=D?X+S:S}return D1+A*hl}const d=i.computed(()=>(o.value,l()>Cn));function f(){n.value=!n.value,u.value=n.value?l():Cn,h()}function c(){if(!o.value)return;o.value=null;const w=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(w,{timeout:100}):setTimeout(w,0)}function h(){if(a.value)return;const p=r.value,w=o.value;if(!p||!(w!=null&&w.layout))return;const y=p.clientWidth||p.offsetWidth,A=u.value;requestAnimationFrame(()=>{var b,g;a.value||!o.value||(g=(b=o.value)==null?void 0:b.layout)==null||g.call(b,{width:y,height:A})})}function m(){var p;a.value||!r.value||!((p=e.content)!=null&&p.code)||S1.init().then(w=>{var x;if(a.value||!r.value||!((x=e.content)!=null&&x.code))return;const{value:y,originalValue:A,language:b="typescript"}=e.content.code,g={readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",glyphMargin:!1,lineDecorationsWidth:0,folding:!1,renderLineHighlight:"none",fontSize:12,lineHeight:hl,padding:{top:8,bottom:8}};if(A){const k=w.editor.createDiffEditor(r.value,{...g,renderSideBySide:!1,renderOverviewRuler:!1});k.setModel({original:w.editor.createModel(A,b),modified:w.editor.createModel(y,b)}),k.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),k.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),i.nextTick(()=>{var D;if(a.value)return;const T=(D=k.getContainerDomNode)==null?void 0:D.call(k);if(T){const S=T.querySelector('.diff-editor-cell.original, [class*="original"]');S&&(S.style.display="none")}}),o.value=k}else{const k=w.editor.create(r.value,{value:y,language:b,...g});o.value=k}u.value=Cn,i.nextTick(()=>h())})}return i.onMounted(()=>{F1(()=>{a.value||!r.value||m()})}),i.watch(t,p=>{p&&!a.value&&i.nextTick(()=>h())}),i.onBeforeUnmount(()=>{a.value=!0,c()}),i.watch(()=>{var p,w;return(w=(p=e.content)==null?void 0:p.code)==null?void 0:w.value},()=>{a.value||(n.value?u.value=l():u.value=Cn,h())}),()=>{const p=e.content;if(!p)return null;const{message:w,fileIcon:y,fileName:A,code:b}=p;return i.createVNode("div",{class:"f-chat-message-coding"},[i.createVNode("div",{class:"f-chat-coding-message"},[w]),i.createVNode("div",{class:"f-chat-coding-card"},[i.createVNode("div",{class:"f-chat-coding-header",onClick:s,role:"button",tabindex:0,onKeydown:g=>g.key==="Enter"&&s()},[i.createVNode("span",{class:"f-chat-coding-header-icon-slot"},[i.createVNode("span",{class:"f-chat-coding-header-icon"},[i.createVNode("img",{src:y,alt:"",onError:g=>{var x;g.target.style.display="none",(x=g.target.parentElement)==null||x.classList.add("icon-error")}},null),i.createVNode("span",{class:"f-chat-coding-header-icon-fallback"},[i.createTextVNode("📄")])]),i.createVNode("span",{class:"f-chat-coding-header-expand"},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),i.createVNode("span",{class:"f-chat-coding-header-filename"},[A]),i.createVNode("span",{class:"f-chat-coding-header-stats"},[i.createVNode("span",{class:"f-chat-coding-stat-add"},[i.createTextVNode("+"),b.addedLines]),i.createVNode("span",{class:"f-chat-coding-stat-del"},[i.createTextVNode("-"),b.deletedLines])])]),i.createVNode("div",{style:{display:t.value?"block":"none"}},[i.createVNode("div",{ref:r,class:"f-chat-coding-editor",style:{height:`${u.value}px`}},null),d.value&&i.createVNode("button",{type:"button",class:"f-chat-coding-expand-btn",onClick:f,"aria-label":n.value?"收起代码":"展开代码",title:n.value?"收起代码":"展开代码"},[i.createVNode("i",{class:["fx-icon fx-icon-expanddown",n.value&&"f-chat-coding-expand-icon-up"]},null)])])])])}}});mr.install=e=>{e.component(mr.name,mr)};const pl={content:{type:Object,required:!0}};function T1(e){return"file"in e&&"path"in e}const gr=i.defineComponent({name:"FileOperationMessage",props:pl,setup(e){const t=i.ref(!0),n=i.ref({}),r=i.computed(()=>{var l;return!!((l=e.content)!=null&&l.summary)}),o=i.computed(()=>{var d;const l=(d=e.content)==null?void 0:d.summary;return l?`浏览了 ${l.explored} 个文件并查询了 ${l.searched} 个文件`:""});function u(){t.value=!t.value}function a(l){n.value={...n.value,[l]:!n.value[l]}}function s(l){return n.value[l]??!1}return()=>{const l=e.content;if(!l)return null;const{summary:d,operations:f}=l,c=!r.value||t.value;return i.createVNode("div",{class:"f-chat-message-file-operation"},[d&&i.createVNode("div",{class:"f-chat-file-op-summary",onClick:u,role:"button",tabindex:0,onKeydown:h=>h.key==="Enter"&&u()},[i.createVNode("span",{class:"f-chat-file-op-summary-inner"},[i.createVNode("span",{class:"f-chat-file-op-summary-text"},[o.value]),i.createVNode("span",{class:["f-chat-file-op-expand-btn",{expanded:t.value}]},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])])]),c&&i.createVNode("div",{class:"f-chat-file-op-operations"},[f.map((h,m)=>{var p,w,y,A;return i.createVNode("div",{key:m,class:"f-chat-file-op-operation"},[i.createVNode("div",i.mergeProps({class:["f-chat-file-op-operation-row",{"op-read":h.type==="Read","has-details":!!((p=h.details)!=null&&p.length)}],onClick:()=>{var b;return((b=h.details)==null?void 0:b.length)&&a(m)}},(w=h.details)!=null&&w.length?{role:"button",tabIndex:0}:{},{onKeydown:b=>{var g;return((g=h.details)==null?void 0:g.length)&&b.key==="Enter"&&a(m)}}),[i.createVNode("span",{class:"f-chat-file-op-type"},[h.type]),i.createVNode("span",{class:"f-chat-file-op-message-wrap"},[i.createVNode("span",{class:"f-chat-file-op-message"},[h.message]),(y=h.details)!=null&&y.length?i.createVNode("span",{class:["f-chat-file-op-expand-btn","sm",{expanded:s(m)}]},[i.createVNode("i",{class:s(m)?"fx-icon fx-icon-foldu":"fx-icon pfx-icon-expanddown"},null)]):null])]),((A=h.details)==null?void 0:A.length)&&s(m)&&i.createVNode("div",{class:"f-chat-file-op-details"},[h.details.map((b,g)=>T1(b)?i.createVNode("div",{key:g,class:"f-chat-file-op-detail-file"},[i.createVNode("span",{class:"f-chat-file-op-file-icon"},[i.createVNode("img",{src:b.icon,alt:"",onError:x=>{const k=x.target;k.style.display="none";const T=k.parentElement;T&&T.classList.add("icon-error")}},null),i.createVNode("span",{class:"f-chat-file-op-file-icon-fallback"},[i.createTextVNode("📄")])]),i.createVNode("span",{class:"f-chat-file-op-file-name"},[b.file]),i.createVNode("span",{class:"f-chat-file-op-file-path",title:b.path},[b.path])]):i.createVNode("div",{key:g,class:"f-chat-file-op-detail-text"},[i.createVNode("div",{class:"f-chat-file-op-detail-title"},[b.title]),i.createVNode("div",{class:"f-chat-file-op-detail-content"},[b.text])]))])])})])])}}});gr.install=e=>{e.component(gr.name,gr)};const ml={visible:{type:Boolean,default:!0},description:[String,Object],progress:{type:Number,default:0},showProgress:{type:Boolean,default:!0},icon:{type:[String,Object],default:""},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},N1="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='60px'%20height='60px'%20viewBox='0%200%2060%2060'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e智能logo60px%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M25.1971977,0%20L45.8523137,11.3712178%20L45.8523137,37.6155801%20L44.4946453,38.9692599%20L24.623,28.022%20L24.6233274,49.9395377%20L21.4535582,49.9395377%20L2.72549351,39.5965647%20L0,34.4406135%20L0,12.8076673%20L3.70534859,10.5019677%20L20.556,20.546%20L20.5567534,0.161454345%20L25.1971977,0%20Z%20M20.7578212,28.1498874%20L5.81325199,36.7628182%20L20.7578212,45.0027895%20L20.7578212,28.1498874%20Z%20M41.8027832,15.9256338%20L26.7716137,24.6706076%20L41.8027832,32.9879669%20L41.8027832,15.9256338%20Z%20M4.06159924,15.4742393%20L4.06159924,32.9879669%20L19.1488772,24.4568004%20L4.06159924,15.4742393%20Z%20M24.6233274,4.32908173%20L24.6233274,21.2862528%20L39.8727429,12.4882393%20L24.6233274,4.32908173%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='生成过程'%20transform='translate(-766,%20-1268)'%3e%3cg%20id='编组-7'%20transform='translate(321,%20699)'%3e%3cg%20id='编组-5'%20transform='translate(247,%20488)'%3e%3cg%20id='智能logo60px'%20transform='translate(198,%2081)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='60'%20height='60'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.8571,%200.8571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='58.2857143'%20height='58.2857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(3.4286,%201.7143)'%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L27.3406238,30.8038254%20L27.3409512,52.7213631%20L24.171182,52.7213631%20L5.44311735,42.3783901%20L2.71762384,37.2224388%20L2.71762384,15.5894926%20L6.42297243,13.283793%20L23.2736238,23.3278254%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M23.4754451,30.9317128%20L8.53087583,39.5446435%20L23.4754451,47.7846148%20L23.4754451,30.9317128%20Z%20M44.520407,18.7074592%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.520407,18.7074592%20Z%20M6.77922307,18.2560647%20L6.77922307,35.7697922%20L21.866501,27.2386257%20L6.77922307,18.2560647%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(2.7176,%202.7818)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='14.177196%2023.2632694%2022.5796859%2023.2632694%2023.4218687%2027.5957059%209.52757789%2036.9780352%203.7254788%2029.0812693'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='23.4218687%2022.4125055%2027.1161878%2015.1091341%2027.8042533%206.35665145%2018.1506617%205.88610282%2018.8417696%2016.8706238%2022.5796859%2022.4125055'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='33.5501273%2024.6706076%2024.403058%2024.9983902%2024.403058%2027.5289361%2028.4733448%2033.3539069%2036.4355638%2036.3335669%2041.6970622%2028.387534'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L23.2743772,28.5628437%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L28.3053772,23.5108254%20L28.3061985,25.7112082%20L30.1053772,27.0928254%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.5203772,18.7198254%20L45.4350062,17.1793767%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='22.5927693%2026.8440709%2023.6315003%2030.8033921%208.53087583%2039.5446435%207.30516741%2035.4601402'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M25.4312165,33.1398658%20C28.857043,33.1398658%2031.634224,30.3626848%2031.634224,26.9368583%20C31.634224,23.5110318%2028.857043,20.7338508%2025.4312165,20.7338508%20C22.00539,20.7338508%2019.228209,23.5110318%2019.228209,26.9368583%20C19.228209,30.3626848%2022.00539,33.1398658%2025.4312165,33.1398658%20Z%20M46.5950591,20.103577%20C49.2645342,20.103577%2051.4285714,17.9395398%2051.4285714,15.2700646%20C51.4285714,12.6005895%2049.2645342,10.4365523%2046.5950591,10.4365523%20C43.9255839,10.4365523%2041.7615467,12.6005895%2041.7615467,15.2700646%20C41.7615467,17.9395398%2043.9255839,20.103577%2046.5950591,20.103577%20Z%20M25.4312165,54.9048659%20C28.1006917,54.9048659%2030.2647289,52.7408287%2030.2647289,50.0713536%20C30.2647289,47.4018784%2028.1006917,45.2378412%2025.4312165,45.2378412%20C22.7617413,45.2378412%2020.5977042,47.4018784%2020.5977042,50.0713536%20C20.5977042,52.7408287%2022.7617413,54.9048659%2025.4312165,54.9048659%20Z%20M4.83351235,43.462539%20C7.50298751,43.462539%209.6670247,41.2985018%209.6670247,38.6290267%20C9.6670247,35.9595515%207.50298751,33.7955143%204.83351235,33.7955143%20C2.16403719,33.7955143%200,35.9595515%200,38.6290267%20C0,41.2985018%202.16403719,43.462539%204.83351235,43.462539%20Z%20M25.4312165,8.37808808%20C27.7447616,8.37808808%2029.6202605,6.50258918%2029.6202605,4.18904404%20C29.6202605,1.8754989%2027.7447616,0%2025.4312165,0%20C23.1176714,0%2021.2421725,1.8754989%2021.2421725,4.18904404%20C21.2421725,6.50258918%2023.1176714,8.37808808%2025.4312165,8.37808808%20Z%20M46.5950591,43.3044363%20C48.9086042,43.3044363%2050.7841031,41.4289374%2050.7841031,39.1153922%20C50.7841031,36.8018471%2048.9086042,34.9263482%2046.5950591,34.9263482%20C44.2815139,34.9263482%2042.406015,36.8018471%2042.406015,39.1153922%20C42.406015,41.4289374%2044.2815139,43.3044363%2046.5950591,43.3044363%20Z%20M4.83351235,18.3420872%20C7.14705749,18.3420872%209.02255639,16.4665883%209.02255639,14.1530432%20C9.02255639,11.8394981%207.14705749,9.96399915%204.83351235,9.96399915%20C2.51996721,9.96399915%200.644468314,11.8394981%200.644468314,14.1530432%20C0.644468314,16.4665883%202.51996721,18.3420872%204.83351235,18.3420872%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",br=i.defineComponent({name:"FXGenerateProcess",props:ml,emits:["closed"],setup(e,t){const n=i.computed(()=>{const d={"fx-generate-process":!0,"fx-generate-process--no-progress":!e.showProgress};return ye(d,e.customClass)}),r=i.computed(()=>Ae({},e.customStyle));function o(){var d,f;return t.slots.icon?t.slots.icon():i.createVNode("div",{class:["fx-generate-process--icon",(d=e.classNames)==null?void 0:d.icon],style:(f=e.styles)==null?void 0:f.icon},[e.icon?Lr(e.icon):i.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:N1},null)])}function u(){var d,f;return e.description&&i.createVNode("p",{class:["fx-generate-process--description",(d=e.classNames)==null?void 0:d.description],style:(f=e.styles)==null?void 0:f.description},[e.description])}function a(){var d,f;return e.progress>0&&i.createVNode("div",{class:["fx-generate-process--progress-text",(d=e.classNames)==null?void 0:d["progress-text"]],style:(f=e.styles)==null?void 0:f["progress-text"]},[e.progress,i.createTextVNode("%")])}function s(){return i.createVNode("div",{class:"fx-generate-process--mask",onClick:d=>{d.stopPropagation()}},null)}function l(d=()=>{}){t.emit("closed",{callback:d})}return i.watch(()=>e.visible,d=>{d||l()}),t.expose({close:l}),()=>{var d,f;return i.createVNode(i.Fragment,null,[e.visible&&s(),e.visible&&i.createVNode("div",{class:n.value,style:r.value},[o(),!e.showProgress&&u(),e.showProgress&&i.createVNode("div",{class:["fx-generate-process--progress-bar",(d=e.classNames)==null?void 0:d["progress-bar"]],style:(f=e.styles)==null?void 0:f["progress-bar"]},[i.createVNode("div",{class:"fx-generate-process--progress-fill",style:{width:`${e.progress}%`}},null),!e.description&&a()]),e.description&&e.progress>0&&i.createVNode("div",{class:"fx-generate-process--progress"},[u(),i.createTextVNode(" "),a()])])])}}});br.install=e=>{e.component(br.name,br)};const gl={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},I1=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],yr=i.defineComponent({name:"FXChatHistory",props:gl,emits:["itemClick"],setup(e,{emit:t}){const n=a=>{const s=new Date(a),l=new Date;return s.getDate()===l.getDate()&&s.getMonth()===l.getMonth()&&s.getFullYear()===l.getFullYear()},r=a=>{const s=new Date(a),l=new Date;return l.setDate(l.getDate()-7),s>=l&&!n(a)},o=i.computed(()=>{var l;const a={today:[],week:[],older:[]};(l=e.items)==null||l.forEach(d=>{n(d.timestamp)?a.today.push(d):r(d.timestamp)?a.week.push(d):a.older.push(d)});const s=(d,f)=>f.timestamp-d.timestamp;return a.today.sort(s).length||a.week.sort(s).length||a.older.sort(s).length?{today:a.today.sort(s),week:a.week.sort(s),older:a.older.sort(s)}:null}),u=(a,s)=>s.length>0&&i.createVNode("div",{class:"f-chat-history-section"},[i.createVNode("span",{class:"f-chat-history-section-header"},[a]),i.createVNode("div",{class:"d-flex flex-column"},[s.map(l=>i.createVNode("div",{key:l.id,class:"f-chat-history-item",onClick:()=>t("itemClick",l)},[i.createVNode("span",{class:"f-chat-history-item-title"},[l.title])]))])]);return()=>i.createVNode("div",{class:"f-chat-history-manager"},[i.createVNode("div",{class:"f-chat-history-manager-scroll"},[o.value&&I1.map(a=>u(a.label,o.value[a.key]))])])}});yr.install=e=>{e.component(yr.name,yr)};const bl={items:{type:Array,default:()=>[]},title:{type:[String,Object],default:""},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},gap:{type:[String,Number],default:12},fadeIn:{type:Boolean,default:!1},fadeInLeft:{type:Boolean,default:!1},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}};var yl=(e=>(e.standardFeatureCard="standard-feature-card",e.primaryFeatureCard="primary-feature-card",e.compactFeatureCard="compact-feature-card",e.standardQuestionItem="standard-question-item",e.functionEntryItem="function-entry-item",e.defaultTextItem="default-text-item",e.hasNestEntryItem="has-nest-entry-item",e.likeButtonEntryItem="like-button-entry-item",e.none="",e))(yl||{});const xl={id:{type:[String,Number],default:""},icon:{type:[String,Object],default:""},label:{type:[String,Object],default:""},description:{type:[String,Object],default:""},badge:{type:[String,Object],default:""},disabled:{type:Boolean,default:!1},children:{type:Array,default:()=>[]},styles:{type:Object},classNames:{type:Object},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},showType:{type:String,default:yl.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},vu=i.defineComponent({name:"FPrompt",props:xl,setup(e){const t=i.computed(()=>!e.id&&e.children&&e.children.length>0),n=i.computed(()=>{var h;let c={"fx-prompt--item-wrapper":!0,"fx-prompt--item-disabled":e.disabled,"fx-prompt--item-has-nest":e.id&&e.children&&e.children.length>0};return c=ye(c,(h=e.classNames)==null?void 0:h.item),ye(c,e.customClass)}),r=i.computed(()=>{let c={"fx-prompt--item":!0};return c[`fx-prompt--${e.showType||"none"}`]=!0,c}),o=i.computed(()=>{var h;const c=Ae({},(h=e.styles)==null?void 0:h.item);return Ae(c,e.customStyle)}),u=()=>{var c,h;return e.icon?i.createVNode("div",{class:["fx-prompt--item-icon",(c=e.classNames)==null?void 0:c.icon],style:(h=e.styles)==null?void 0:h.icon},[Lr(e.icon)]):null},a=()=>{var c,h;return e.label?i.createVNode("h6",{class:["fx-prompt--item-label",(c=e.classNames)==null?void 0:c.label],style:(h=e.styles)==null?void 0:h.label},[Bn(e.label)]):null};function s(){var h;const c={"fx-prompt--item-badge":!0};return typeof e.badge=="string"&&(c["badge-default"]=!0),ye(c,(h=e.classNames)==null?void 0:h.badge)}const l=()=>{var c;return e.badge?i.createVNode("span",{class:s(),style:(c=e.styles)==null?void 0:c.badge},[Bn(e.badge)]):null},d=()=>{var c,h;return e.description?i.createVNode("p",{class:["fx-prompt--item-description",(c=e.classNames)==null?void 0:c.description],style:(h=e.styles)==null?void 0:h.description},[Bn(e.description)]):null},f=()=>{var c,h,m,p;return!e.children||e.children.length===0?null:i.createVNode(_n,{class:{"fx-prompt--only-children":!e.id,"fx-prompt--item-nested":e.id},gap:e.gap,items:e.children,vertical:!0,customClass:(c=e.classNames)==null?void 0:c.subItems,customStyle:(h=e.styles)==null?void 0:h.subItems,styles:{item:((m=e.styles)==null?void 0:m.subItem)??{}},classNames:{item:((p=e.classNames)==null?void 0:p.subItem)??""}},null)};return()=>{var c,h;return i.createVNode("div",{class:n.value,style:o.value,onClick:e.onClick},[t.value?f():i.createVNode("div",{class:r.value},[u(),l(),i.createVNode("div",{class:["fx-prompt--item-content",(c=e.classNames)==null?void 0:c.itemContent],style:(h=e.styles)==null?void 0:h.itemContent},[a(),d(),f()])])])}}}),_n=i.defineComponent({name:"FXPrompts",props:bl,emits:["item-click"],setup(e,t){const n=i.computed(()=>{var f;let d={"fx-prompts":!0,"fx-prompts--fade-in":e.fadeIn,"fx-prompts--fade-in-left":e.fadeInLeft};return d=ye(d,e.customClass),d=ye(d,(f=e.classNames)==null?void 0:f.root),d});function r(d=null){var c;let f={"fx-prompts--items":!0,"fx-prompt":!0,"fx-prompts--items-wrap":e.wrap,"fx-prompts--items-vertical":e.vertical};return f=ye(f,(c=e.classNames)==null?void 0:c.items),f=ye(f,d==null?void 0:d.customClass),f}function o(d=null){var c;let f={};return(e.gap||e.gap===0)&&(f.gap=typeof e.gap=="number"?`${e.gap}px`:e.gap),f=Ae(f,(c=e.styles)==null?void 0:c.items),f=Ae(f,d==null?void 0:d.customStyle),f}const u=(d,f)=>{f.disabled||f.children&&f.children.length>0||t.emit("item-click",d,f)},a=d=>{var f,c;return d!=null&&d.title?i.createVNode("h5",{class:["fx-prompts--title",(f=e.classNames)==null?void 0:f.title],style:(c=e.styles)==null?void 0:c.title},[Bn(d==null?void 0:d.title)]):null};function s(d){return!d.items||d.items.length===0?null:i.createVNode("div",{class:r(d),style:o(d)},[d.items.map((f,c)=>i.createVNode(vu,{key:f.id||`key_${c}`,id:f.id,icon:f.icon,label:f.label,description:f.description,disabled:f.disabled,children:f.children,styles:f.styles||e.styles,classNames:f.classNames||e.classNames,showType:f.showType,customClass:f.customClass,customStyle:f.customStyle,gap:f.gap,badge:f.badge,onClick:h=>u(h,f)},null))])}function l(){return t.slots.footer?t.slots.footer():null}return()=>{var d;return i.createVNode("div",{class:n.value,style:(d=e.styles)==null?void 0:d.root},[t.slots.title&&t.slots.title(),a(e),t.slots.default&&t.slots.default(),s(e),l()])}}});_n.install=e=>{e.component(_n.name,_n),e.component(vu.name,vu)};const wl={items:{type:Array,default:()=>[]},height:{type:Number,default:200},title:{type:[String,Object],default:"推荐操作"},prompt:{type:[String,Object],default:"输入@获取推荐操作"},promptChar:{type:String,default:"@"},promptAgentName:{type:String,default:"AI助理"}},xr=i.defineComponent({name:"FXSuggestion",props:wl,setup(e,t){const n=i.ref(null),r=i.ref(!1),o=i.ref(!1),u=i.ref({top:0,left:0,height:0}),a=i.ref(-1),s=i.ref(""),l=i.computed(()=>typeof e.prompt=="string"?e.prompt:"输入“@”获取推荐操作"),d=i.computed(()=>{var A;return(((A=e.items)==null?void 0:A.length)??0)===0}),f=()=>{var X;if(!n.value||d.value)return;if((((X=n.value.textContent)==null?void 0:X.trim())||"")===""){n.value.textContent="",n.value.innerHTML="",w();return}const b=window.getSelection();if(!b||b.rangeCount===0)return;const g=b.getRangeAt(0),x=g.cloneRange();x.selectNodeContents(n.value),x.setEnd(g.endContainer,g.endOffset);const k=x.toString(),T=k.lastIndexOf(e.promptChar);if(s.value=n.value.textContent||"",T!==-1&&k.substring(T+1).trim()===""&&(n.value.textContent=k.replace(/@$/,`@${e.promptAgentName} `),s.value=n.value.textContent,r.value=!0,g.selectNodeContents(n.value),g.collapse(!1),b.removeAllRanges(),b.addRange(g)),r.value===!1){o.value=!1,a.value=-1;return}if((n.value.textContent||"").lastIndexOf(`@${e.promptAgentName} `)!==-1){const z=document.createRange();z.setStart(n.value,0),z.setEnd(g.endContainer,g.endOffset);const{top:B,right:j}=z.getBoundingClientRect(),I=c();u.value={top:B-I-5,left:j+5,height:I},a.value===-1&&(a.value=0),o.value=!0}else o.value=!1,a.value=-1},c=()=>{const b=e.items.length*38-6;return Math.min(b+28+20,e.height)},h=A=>{var k;if(!n.value)return;const b=window.getSelection();if(!b||b.rangeCount===0)return;const g=((k=n.value.textContent)==null?void 0:k.replace(/\s*$/,""))||"";n.value.textContent=`${g} ${A.label}`;const x=b.getRangeAt(0);x.selectNodeContents(n.value),x.collapse(!1),b.removeAllRanges(),b.addRange(x),w()},m=async A=>{if(!o.value||!e.items||e.items.length===0)return;switch(["ArrowUp","ArrowDown","Enter","Escape"].includes(A.key)&&A.preventDefault(),A.key){case"ArrowDown":a.value++,a.value>=e.items.length&&(a.value=0);break;case"ArrowUp":a.value--,a.value<0&&(a.value=e.items.length-1);break;case"Enter":a.value!==-1&&h(e.items[a.value]);break;case"Escape":w();break}await i.nextTick();const b=a.value>0?".f-chat-suggestion-panel-item--current":".f-chat-suggestion-panel-header",g=document.querySelector(b);g==null||g.scrollIntoView({block:"nearest",behavior:"smooth"})},p=A=>{n.value&&!n.value.contains(A.target)&&w()},w=()=>{r.value=!1,o.value=!1,a.value=-1};i.onMounted(()=>{document.addEventListener("click",p)}),i.onUnmounted(()=>{document.removeEventListener("click",p)});const y=A=>{const b=A.iconUrl||"",g=A.icon||"fx-icon fx-icon-sender_task";return i.createVNode(i.Fragment,null,[b?i.createVNode("img",{alt:"suggestion item icon",src:b},null):i.createVNode("i",{class:g},null),i.createVNode("span",{class:"f-chat-suggestion-panel-item-label"},[A.label])])};return()=>{var A;return i.createVNode("div",{class:"f-chat-suggestion-container"},[i.createVNode("div",{ref:n,class:"f-chat-suggestion-input",contenteditable:"true",onInput:f,onKeyup:f,onKeydown:m,"data-placeholder":l.value},null),o.value&&i.createVNode("div",{class:"f-chat-suggestion-panel",style:{top:`${u.value.top}px`,left:`${u.value.left}px`,height:`${u.value.height}px`}},[i.createVNode("div",{class:"f-chat-suggestion-panel-header"},[e.title]),i.createVNode("div",{class:"f-chat-suggestion-panel-container"},[(A=e.items)==null?void 0:A.map((b,g)=>i.createVNode("div",{key:g,class:["f-chat-suggestion-panel-item",{"f-chat-suggestion-panel-item--current":g===a.value}],onClick:()=>h(b),onMouseenter:()=>a.value===g},[y(b)]))])])])}}});xr.install=e=>{e.component(xr.name,xr)};const vl={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},wr=i.defineComponent({name:"Todo",props:vl,setup(e){const t=i.ref(!0),n=i.computed(()=>{var o;return(o=e.items)==null?void 0:o.length});function r(){t.value=!t.value}return()=>i.createVNode("div",{class:["f-chat-message-todo",e.customClass]},[i.createVNode("div",{class:"f-chat-todo-message"},[e.message]),i.createVNode("div",{class:"f-chat-todo-list"},[i.createVNode("div",{class:"f-chat-todo-header",onClick:r,role:"button",tabindex:0,onKeydown:o=>o.key==="Enter"&&r()},[i.createVNode("span",{class:"f-chat-todo-header-icon-slot"},[i.createVNode("span",{class:"f-chat-todo-header-icon"},[i.createVNode("i",{class:"fx-icon fx-icon-task-record"},null)]),i.createVNode("span",{class:"f-chat-todo-header-expand"},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),i.createVNode("span",{class:"f-chat-todo-header-label"},[i.createTextVNode("待办任务")]),i.createVNode("span",{class:"f-chat-todo-header-count"},[n.value])]),t.value&&i.createVNode("div",{class:"f-chat-todo-content"},[i.createVNode(rr,{items:e.items},null)])])])}});wr.install=e=>{e.component(wr.name,wr),e.component(rr.name,rr),e.component(su.name,su),e.directive("overflow-tooltip",wi)};function En(e){return e.toolResultApplied===!0||String(e.result??"").trim().length>0}const vr=i.defineComponent({name:"FXToolUseBatch",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>{const f=e.content.toolCalls;return!f||f.length===0?!0:f.every(En)}),n=i.computed(()=>t.value?`共调用 ${e.content.totalCount??e.content.toolCalls.length} 个工具`:"正在调用工具"),r=i.ref(!t.value),o=()=>{r.value=!r.value};i.watch(t,f=>{f&&(r.value=!1)});const u=f=>{En(f)&&(f._expanded=!f._expanded)},a=f=>{const c=En(f),h=f.success===!1;return{"f-chat-tool-use-batch-item":!0,"is-done":c&&!h,"is-error":h,"is-run":!c&&!h}},s=f=>{const c=En(f);return f.success===!1?"执行失败":c?"执行成功":"调用中"},l=f=>{const c=En(f),h=f.success===!1;return c||h?"Done":"Working"},d=f=>f.toolDescription?f.toolDescription:f.command?`{ command: ${f.command} }`:f.toolName??"tool";return()=>i.createVNode("div",{class:"f-chat-tool-use-batch"},[i.createVNode("div",{class:"f-chat-tool-use-batch-header",onClick:o},[i.createVNode("span",{class:"f-chat-tool-use-batch-title"},[n.value]),i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:r.value?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),r.value&&i.createVNode("div",{class:"f-chat-tool-use-batch-body"},[e.content.toolCalls.map(f=>{const c=En(f),h=f.success===!1,m=c||h,p=!!f._expanded;return i.createVNode("div",{class:a(f)},[i.createVNode("div",{class:"f-chat-tool-use-batch-item-header",onClick:()=>u(f)},[i.createVNode("i",{class:"fx-icon fx-icon-thinking_tool"},null),i.createVNode("span",{class:"f-chat-tool-use-batch-item-text"},[d(f)]),i.createVNode("div",{class:"f-chat-tool-use-batch-item-status"},[i.createVNode(wn,{status:l(f)},null),i.createVNode("span",null,[s(f)])]),m&&i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:p?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),p&&m&&i.createVNode("div",{class:"f-chat-tool-use-batch-item-result"},[f.errorMessage||f.result])])}),!t.value&&i.createVNode("div",{class:"f-chat-tool-use-batch-progress"},[i.createVNode("span",{class:"f-chat-tool-use-batch-progress-status"},[i.createVNode(wn,{status:"Working"},null),i.createVNode("span",null,[i.createTextVNode("生成中…")])]),i.createVNode("span",{class:"f-chat-tool-use-batch-progress-text"},[i.createTextVNode("正在处理复杂任务")])])])])}});vr.install=e=>{e.component(vr.name,vr)};const Al={icon:[String,Object],title:[String,Object],description:[String,Object],customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},Ar=i.defineComponent({name:"FXWelcome",props:Al,emits:[],setup(e,t){const n=i.computed(()=>{const a={"fx-welcome":!0};return!e.description&&(e.icon||t.slots.icon)&&(a["fx-welcome--no-description"]=!0),ye(a,e.customClass)}),r=i.computed(()=>Ae({},e.customStyle));function o(){var a,s;return t.slots.icon?t.slots.icon():e.icon?i.createVNode("div",{class:["fx-welcome--icon",(a=e.classNames)==null?void 0:a.icon],style:(s=e.styles)==null?void 0:s.icon},[Lr(e.icon)]):null}function u(){var a,s,l,d,f,c;return t.slots.content?i.createVNode("div",{class:"fx-welcome--content"},[t.slots.content()]):(e.title||e.description)&&i.createVNode("div",{class:["fx-welcome--content",(a=e.classNames)==null?void 0:a.content],style:(s=e.styles)==null?void 0:s.content},[e.title&&i.createVNode("h4",{class:["fx-welcome--title",(l=e.classNames)==null?void 0:l.title],style:(d=e.styles)==null?void 0:d.title},[e.title]),e.description&&i.createVNode("p",{class:["fx-welcome--description",(f=e.classNames)==null?void 0:f.description],style:(c=e.styles)==null?void 0:c.description},[e.description])])}return()=>i.createVNode("div",{class:n.value,style:r.value},[o(),u()])}});Ar.install=e=>{e.component(Ar.name,Ar)};const kl={content:{type:Object,required:!0},onOpen:{type:Function}},O1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHHUlEQVRYCV2XSY8VVRTHT9UbgAbpZpSmaRNMxIiGqZVEE1csXBoNboyJ23ahfgI/gQuXdiRx6UY2utKNEUJjQLrBEEwUmQcBBZuphzdU+fufc+tVw61Xde894/+ce+6tepml9uKhpYMbVpWTuWUTpZUjQc7oSnvUMZvvVZJO8om4ZjzLUmK2bqVZO4g+r3hLfbMHi5plc1lZztBPnftkxeGkbfbCocUvW5lNrl+ZYQdLaurCv3UKs7mlNIHuo9RXsqJtHuKZwFRmxH+4ZLbYq3mS5Z76/dOVH2WKvCjLb1e3zHQPHEszIZDNfxY0AyAT9QNHSaoJaf0KV4qHApAcBu8+NisqwBUdO3mevZcT8aRE27mEaamLCdJShEaGknM4QkQLIJqbrWgsUwy2M3osnYtDS2qDQVlkkwDIJjKYrUbSSp0bDy96ugPJeYbUsyyRjbDXwpK31HkkjDusv5rsPa1PPUzkWBlpKX+VosKleS1Aq6IcOAgmWUkQkaFwo/jcRpUJJvy6/WR7kDU37/oEMNLUtC30lV64dilhKVg8sdo5DxeLQlX0mqs1PbQYV8Qq3Uu90Bc3xJQJKYZ+U327kdREdyDuWTpJSfzMmoDo9pNBtxFG2hSvU0WTjowUhXVZfzmVyQoGBe9zZU3UZo5RGXaypBEYbhf24SvaEj617/7s2/UH1AF8AnLi2zsatnNTwwvrxv3CfryoonAVr43NQ2bv7GxaL9XAVyd7NqedpKVzN3gEQ9NT63pQPd2lPUDwrecbNsK5oHZ3vrBvzvasJbTaT4D8eH/TxoeZ0249KuyH84vExCWriOwfy+yDPb7C9t98aZ//zGkmvtTpXZNxrvRHktTDJJBOr7AT1+ujb9dmEobjFtpav7E15cC5dLasyW3rMwGs7PdN9+4tAU786Su9VEsR0OA5AKB1KQO5ouuQ56MoVW3Xs9osIGNdm1lhb4zXxiuZfTgs4Eu/pN896pE5e/qibAUddjT5ZMRhVM1FEDdj7wLgcjcYPIdX5rZ9GK6ywAHw+rbaeCU0sbVBlqIOtpCh0bU1yGMXOp45mfcdIDcOREuBjjAEDp4g61I4tx4WduleqiD4SmlZ9NnvAHgu1vbOoz4vGQzQ9o5BA0Ch9C+L/o87Pfv3Md7k3CXlI40JKGAO0s82S4Ake/yqCieajGoZdmzMbf1QqJ240rHZ6yGzcXVu4yMqw9J2bw2A0jx2kUwqWhWnOr986I9YgbQeEuz1ZZwbUEcu1XWwZ1QRlvbqWJ3+GQCeWgZyAl7J8u1dDuACAOScZKrO/ABTLgSKGwC6YqIt5Gc3DI1PXusBSJK8atc0bHSN2Wvb4nwQ7QzRz16rs7RvrGV8U9j4ugC50C3tFDbcg0DoR68dJefymwsRP5+oDNmBPGGBdr6b2ZmbdRYmWOc9Kbq/H/TZ/yV1Utg9zgm1feMt27etTv+vV7opo7XNquZcAb9UVjhX3wWxg0lIxTl+uY7w/b1DNpROLqVeQHVVWRhZldu7u/ksSu0Y6dfBIzeKVnc0tETnTjUgchYFqFRVRQntiIoote0b6uh+IzNZpnrJbOZaLbNrrF2J2zS6pVLuzlSegktTlDQth2dASETUue08pPKcfU1/7nZh99NWc630OI1TmROIGVL9dLt5v28X7xbhEpnMqw2n4RtH/HwbOkHVqTddSpYy4Kigo3ziKQe3fP0jAmXgBi+qOw/rM0NgpnX4EF8u57KmMlnmXDTdsaHhqPgcFUjE0DJ4wlCavvRkhLMpeqm7AxRmrz4pc+yvqP5Iu1ty+/WRH/4Gi9qJ49oRxfkkRJHin8537aVN8yknZkdVXIqM24mA/v7skt3m9PQlRPMXP0NYRkWttcSWotWu8wD9yfjNrxcpfT67F7QFGegnJQlyFyoMjuC1rYLXcbWmGMvBrtczsnoH9Fk/vbZDGX6G80YTG7hLYONLCNtq0qPzLyJN9KXjRMlzDT65VMU40odIW2PdHgtPjDtYKN0Sh7p8UWWau3IufxLk58lQclPzJdCHI6aCJDlFL0nGWmMZ0orm+nil8T5yUHKifVzC71JleUObCl1fPRWfLtfwPsemA5ENLo35GsvmOl3+isk/tytorObRIshC9gs49J5SMIXhJEYX7xCVpYxINkkQQGw3mYc38KFKy+aajzvlDP/dDohRmYtsYACEypybwuC8/z2rnBMDNEXBHwzeU8qaeCkLFUTqSvpuQw4qP7KbZTPNhW42hZEDtQAcF4peS6qzQEgW2CmSEyjRfUDnDlLE4g3cMXaenjDE03yQhaycyuNfag6IYIivFoppDFMOdWvt3HmScbDUgLab7louOUOuXvfQh6RsTZ3+bMVhByTCy18sHWStJim6Cb7t+LSgCRRNY0c/mEfqB5HIeSWjkUcjAjetskX9zFFPM3nWxHnT/57/Dzj0fqfCZcLZAAAAAElFTkSuQmCC",L1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHeklEQVRYCV1XW2hcVRTd985MZjKxNaVa6cNqnwbaftSIiuiPilh8NC2tWh+lXyFFbMEKgvgABQUfIGoxWqGioFLjR0GQlqooGhptjNU+9EPaarT2IUySZt73Xtfa+5w7o3dyc885+5y91l57nzN3AnHXjoOPbJAgGEhEegNJugUNCURqzbrUk5ok6GcklK6OLrTRwc2PxPhLYkniCAswEqPtbXiWGxekEdUkxniQSCmReDSO4sGP+vYPERoQIjtGtr2JRQOB9tQ3Rh0DPMvNCnAi6cwUJROEBk4QvQluoCkBR6QR1UFgqkVYiWKufmRwT9+BrYFFLh/Dl7sSCAEN0PeEIgA044bkM3mNlkYFR9R8sq8qEIB9AMRRU6brUxiPNHol5whwfsK2yMYsZaeRYFzrwVM6GMuEoYRBBxxRZkgOQubEOeJCOFQHrl1uTEsEcKpDGwFjZ0sVC5KBLJb26kJkw0iADDPjCBHQR8n1BgRnKQknqToHIZCsRVWJoJgBeQJGUpXD3ITkEunN4n93GjXm+LaVAxGJadIyCq5ScOaRkVFIgpMQKoWSVxtlDBkZGHW+X6trdK6u6876PPsU0F+rzdwagDkkCPueEOGtr+BwPF2fNGKOnE8BSbZI2BrWTbaOSs2FHQwUFwzUni0YdRGj54dPFxX7nGVzGLXZKoi8qYWJPqNsA9X6cX3vm4Fka0ogp9ITnCBRxEi53smNZ7sz2ii1H0tirEHO682qI0pCppbVSosMx9vVRBHGUsE+78wWzaGqwJRiEe55nfPkmjnX6SICY5J8PX5AzpfPKohGipytWbROsmGWZp0zdnpEfj47iq4D5w6iAvyoShYUVgQ4YiLRVAQZBdK8AzyKIvlzelw2dW+WK2Yuome9rpy5WF75/llETZKR3L74bll/1f3eLGenT8ueI7uVIGX2kht4q88gQxYcG9VmGYBNnUyGXrqo2ZBdP+3E1qqlAMtm9cjNl6/Rw+ay4nxZu3xTaouw9tXh5+wQgl+Cp4cUI9fbpxYEfJW2y8IcKXMewHBwhhEdfz8FYWPd8vtkftdC6V+93aR31qFj78nRc2P/CcQK2MhYDaCt5BIJWZ0EzId5rWztY4ys/RaERvLlqX3y45lDKYlcJidP3Pi8LLy4lZpfzx+VDw7vgjIOQKNFmjTvLVAGS5/ECgkeJgG+6Zh/xxILtJpgCzDGYuS8d8bekMnaREqikC2kbW7Bl755CqSbEoSabdvRDIRE6Bt+VFn4sjawYZECvmQ8S/Y9EQPGInyPkvFktSS7Dr2WgrY33v1hp/w9OY61zjlJo4ipJH16EnySBGtMFcjzENIgwRIfLgiwgOAKrG0qgWrF3+Ez3+kWbAevN2sy9teIFN1W1mCcigyGvnxQJOjJkBh2bgagzAmJsvgYgZfMnvSFI0od9fVskkuKc9rxpSObl4FrH8O7QgZf2QyIcy16KzZ3BpCI+jaVVQGViOCMmEbIZiTIGo5oY8GgvWTWUlnbc6+O/f/f1fOvl1uX3ikdIMBvU42camqxEdj8+XEM6BwtQisIG9A0YDKJ8YiNQYj2HKLr730U7waZFPuXc0fSNhsPrt4qc7sW4FTt1DXMsx5Wqir90RdTwDYCxjiK0Bvw9G08qbgu0OgjuWfFFpk7Y0EKOD5xUp7et10OnvoqHctjVzx8w5OSxSefMRIE0mDgp1UHLEDe3IZkQpH5guBYKUP0yZ57evmsFXLLojtSIJ52r3/7Aux1eevgi7o7vHHJ7B5Zv2oLDqdc6/0R872SFqRhtilgcnh5aCAJFAW2aEGl54uKv/Ye+1B+++e4vjdM1Ery9sjL3qTPvpUPybLZK/UlNuGhxBTwo8q2lLYiZJQuN5zAYgO8Rs7FD6zql9nFS1OAP0onZM/h3Qoe4HzAmSPDJ76Q4ZOfp3NYJ9tuekby2JYF1gP9Akefrqb8jgv6P9tIRDUaAccwSvANWZOpyoQrSCuoAo7sPLYd1eFrCXeN5pkAmmcd1fcL3boYLVcnpR5XsYS+tbjUJzqsAZOG4HYrG2VcqV/AcvQ5B855LNci/EaIcdziYGKfKoAHLvpBm/N5saboE6CdObxrtOF4NWjHNvTA/mkHSLU5bUB0CBBGg7dzfdJG7fXEZBSwaTpABFMwh/WDC6A6B/bOnP2i8niMXmsAVEu6AxxbRtHAz7Ea3pL0Ql8dgoeXL4ICjUYFbkmOMXOOkSMRlR6RS2BBMWK+LeWwM/wpS3CsKVGBUVBRqQgQoF3B7zl1C1IwENkiJKDesf7mM5uzY1yjZ0qUNJ7wpWeAC66AoiRRrmNqiB1i+SCBLToUDPIeRw2VR5VROWF3zuAVTi2/F/DVzHGO8dYi1G1nwPY+YQQJyruYnQHfNoayHgx337V3CO4H6YhvtTW+2TICd3MRZfMONDrY2G9ilzSQKhajRqSOPSB9WFvzToLo82ceT0w4GBx+vDKkiqAnmz+5bcNUtTSQxM1enIDduih1QAUYNZWCU8SaAqJ3UcdMyI9KgTLMkNrcXKpC0owatVGCj1HUyeCn237Xn+f/Avavy/P8wtVMAAAAAElFTkSuQmCC",V1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGCklEQVRYCYVXPY8cRRCtnt29s/EhW0KAEAkxmXUBIkBkRERwdoqFHNiW/AMwPwCJECTYEDKEnYJk4+ASIwQ6WSIjwJKNQBjO8t6Xb3dvZ5r3XlXPjIzX7rub7qmuqvfqo3v3ksXIH53fsJQvmOV1y3aqyJ8055x74sZyAys8EqS+hX2pcC9b3t6xPD/i/gSPrWxpvPrNjWt0QhvLV85/CU2AP3sQXEDmwEIiXkuKLw4sb5DnBgz/nWju9NL42Lc3LyZFbs3VZ0O7RusATrnmj0ceURMMg3JfYEVC+4dme4ctUe5Xls4MlfbQdYvHnnQ4m4N9KKVkmYiDyqzCX+C6VYArG65PcI3jq5Z3D7QsQYDEhSE8rLvGkudRbfZwDzwZSZAo69WR2ck1EAlbYLU6EAmcMrIk8dHAjP60R3+2XmHvqQ1XlBuC8ifA4Q+ZObL8cBcLuGGz4afoQ63LGl+wn4aM131I0fIpSJ42oNws6KmtMyEEVRzNa8vTmVUrgyBHfwhbme+DwY6s3YF7gY+lBErtqM9RIpQ8hCUbNkePDFHjICp96DBJjNgnMKoSEiFmkvHxRAKljllHDdGfPWeDd8+0RssWeTbFmf/b6p82rdn8TuDMVhKZx7LBkoBhaR/5FDAYo10QMY5O3VgNxoXQMuAiT6vHrHr1NRu9f85GF68QGqWAPQJp2CN1NKCOqhP6XwZ0aZAAvCpbWLAB0b/taHYnciwBw1AoONUnnsdSibfB66dt8cbb1vx40xKzTjHLESWhLUsmAoxQ+2DmelQEa8gpqXjme2Pn40uWD3CrjnAMkV8RxX56bs1OfHDZVk6/Ke3hW+/Y9NYPOsIJfhrcJ06A0bvD1rNH3kPhkjwGoLQCoP7ApZJWcIeJrQensu3v2v7Xn7Wa1YuvWLPAKSEYH0cLTA7u5UYPtHWRGSJGOK5EdNaMNaSH/tA1ipgSSoM/MEEBRCjv7VhzsOfKo5Wwhd99NGiEzblk2nuATUFmBBJWmXHBoBFd1hEgGOOuAMwf/ja4L3hbVmtrVqEXOOr7f8q0gY90iM+CdngW6HjoeHp2QCwqu5YdHKxbWy38pCR8KPiJAYfB0KqXXrbjGx+2qvOtW/CJXto9tLRoeA20/tyvLiIHLxdPP1rGKVbBr3g++elXZbl0rrfv2+x7fOTvPrJqhtuU4KHdD2qo1DPKsqvLhykqvcAz1G4uBexvzH/9xfa++MTyPw+swtnnFayysczhqs1Ax4ZpB1TR6Hnswy/u/W6HiEwnAGWKFpBdgzov7t2x+u5ddPxR15xQA7TK1XMrG2SgE1GJgyTaDOAY0VkZ9YNtm25e14VT0XGDCNnEPG6oM4n51VuuWQBTCJ+8V9Q1ESTXOAVINSPhoMPY1CvXIoAalkGwR1O9hTvZUVChy0icgH5SQEbY1ORgy/pwHJ4C+HNWWGBQsdGxxCLI9DhRRTo8+z4IFsThvUp4Q0CciOZazChe9FUqdMN6qGMUtHQSxIMGodEu/J0OSdhnX+s6jjRTKzETEWubXVhQ1hGCInwPWRfX7ZWCXiR3Im5EIQbUieWXkIv4ZN0LZ+nrhZBcADxwhNeZoQek6OmXPIBdB67guf7rD5vf/lmixZ3fPAr2Db+UoocIXgaBCihTTncdtaIIDd+wNL981lUk6BQadXe2xXRuNb731XErVgBNAGfDMQuBIIziVJBsLrgrMp/df5FxH1dxVxdFQSLBjjPTqT+ACZDvWFOmjpfPSLFkFEiIp8/+HutuW/b0OSmMSsNo1tEEKCJlivmFpCIhrKt+zltQEnIQzvKh1y7dkjMzpObBTfBxl7dEVMa8fl2BEYo5P8kierJl1RU/HQDAQQsIEZ0ErQuQXIe4aIiMpS1WdOyKYYLInSkB4mZzNnINDkSNElBXOP7AmpEX+5IFN4GcWQ0dylLK42r4+dVriHBs0XSQx5CKrwXooCFwYL3AMeYCGiJXgwvulqwK3bWZxvELN25fI4rG7NJ7G/jywf+Q13Ou9d+SosHnQDPZb69rAtFIgHSmX1JwmfaYBRdQypX0sTfB2xayKHDK/wNolX2UI+Wo7QAAAABJRU5ErkJggg==",Cl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGLUlEQVRYCW1XTY9UVRCt19M9MwyiAxojRI1REImJRAfQhcSVGmJINMG9G5LRH+DOxJ0JP0BnpYlbMCYqGBciJmqIZiAsSARUUDQoYGjmo2emP97znFNVr3vUm+n76ladqjpV9973oLAYcyf6hwZlOVtVNmNWTVcQDH9lPLnGcr1Oa9cTRoD8KEoerstS3m1g5pe71dw7h6eP0b3g9O7x7ntwnKUsR4AzoQIymGzUU/DAFDlS53Il0qlTnABSJpHOGnzKau7IG1teL7zywVE6OJjoQnIGB1gEmEk4JQ0yAqWvP9PPn8DV/obkpQ1K4pClarzaZNs9OuEcnlyVY1UBzDEk586upUF/9ZJCFkM5Wi9df1B58iRkg9kmwDNKFoFSromMZmBzMPRYR4w6D+BEA5d4PJHTVteEkr/jihkQKKcVFEwC7wePieg10pG0J5BrVsuhp+SR7ZO/GStfQXKC3IczcDjszdpZQQiihlgXSu5BqKXhxDWDSRHY/9Ex/1qvtH5fIT00fWpsZc0S7KTjlEMALGSIR9hFbAQ7gD8H9byyVVVgnyskxY+x0y+6kddaPpianS69PcmGcQ9UHzw3iQcdkhDFPFxsrcf2ZNhSkTEQ4chO1nLk8u0FgayITFOJ7amvTlbAUlLO5PLRNPLCUtqiPkfJ3rsjY52Hrs2sHuFlzRZxlQmFcXOty+SRX77ug7nGupBFEkQ5zJKbXGTlmXy8ZfbwVp3PCJbtrez6rYHduxm84fjz731bXoGAxe5HWtr728ulbb6jIUI5sWM9HMRzP63VuZI43wNiNMpy01RhLz09kf7rnp9+t2J7do7b1rvHbP5C1z76umP7do3by/un7OT8ij32YMtmdv7Xd7FT2rlLIMBo4kypwBmI0yklbdAvLFV2/PSq5AP7JmxsrLCvzq4Zg1y93reb7YG9dmCjPbmjZafPN+z5PZN2a3FgX55ZtW1bxuzCr13b8UDL9u6atD9u9O3UmRXr4lZkh1UscnGNLXAm2ps4uWs9s/NXBqL64l4QgHTxas/+XvDXX3uxtLOXevbUo+N2+OAmG28VdvTzRet2K7v8Z99+uVbZxHgBAmbtpdJ++JFfH4XD5KKvK2uocnSh0tF3q5PxL5c8wond4X4y1klUxXvO5Feu9ez85R46Bgv/COCPI3R8oaW/Y/xcNWpsbIWS00/ew0lBY8lte+i+pjWxNRzb7mnaXTg3HCLBp1Y+1cRCqyIC0BDBTB6OTKDfaBTaAKa+iQvywt4NuAGlXfitqy4cfHZK4enivu6stdjzGxHvi4hFIg2COTJ4rl0nkybZASV6/xOTdufGhrbh41PL2ord2yds+zZcz4g39GRsj18zDCNj6sIqOJR8cngy7pGvQ6n1lk0Ne+bxCfsL74MzF7t2Ewfzm3Orgrzy3EYrsBN52t1P80jMOEcKzWuIJEoUCrYlB/Wf4d4z6GIHOBhaOHSffNuxazd6/j2A8ovvO7pu9JvCK2CxY9iann14YsFuLQ08OWxej8fPPMVb7y9Iw9ZNTfo+8YPCl0SCRBLp64aIpH/3l/Bu4A0qS7+iDJbb4P6O80JhHLEzXvx7wFkNQXCKTnhyuqENwcAZx+cXFrWcJGjHj3aHZnL6pw7PkBm76Szp6AB3pByB5Ip1EsKTATTok2v5cwoTA6UOqnXdFMavLTrgrfWlV5nJGYryuqAef0hIoBoiaJJ1/3BAhxRXb1vkxJZx6/xjFExjG+EBMEP9K7nI0FZXTfL8ZXCW5qW4PgqAVqE4YYx2Qy8iad2mgOTGEXjpXB5JBMjwuolu+DipoT99kojLDnRdA1esTUZM6RX6s24jnWFXQ4gbxbJy+KkiCIpDaMh08k5QiT/4JibIt/EmtPkaSBKkpwkPRNJHRCpXpt3JMoHDk3ztzK2iDVONYWwO6fEoivkGPmhzDgybql3PXD5wykoVFEpWUXeHQairq/QYo8Xw4HGt6oEtkLtxZBb/SxWJCAaDQmmKKpJU2JTL80HjeOpEUBrows6Htg2C5HSwau6Dt+8/5kcWyjfn2oemWgP8D7kxMygH00QziLd25E3HKBiqHvIy3oTkJ10IddsVIBK73AZ0vrBCyenzD7OyHHaTkJSSAAAAAElFTkSuQmCC",P1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGkElEQVRYCZVXS2udRRh+Z+Y7zTFtk5iml7S1XpBW3HhJdVER0YUKikhtRNCFF5TYheLWjX/AlRuzcOnO/AXXIpiFG0URoUWq0KJpLb2eb8bned6ZcxLaCP1O5szMe33ey8z5Eqw+5czyKSt5Bdsli3vnRB6dB+k6lgV/2SVLsYJ1IE108pw23jf6plk6pWyEYOuhhNXwyPdrNBj4Vc689qXlQudm3QGoJS2t9GbX/8B6hOEgCpzROeexQ4EjHRTSsZ/IEXjjYV31ILuaHl3/MHjk/TdEaHEPxvTYkBzlq2Y3zrkzOWD0XNBJM+h7OmqOmyPOkmsgMvRDDaDYcoShFQqFMJRz2a4oIYbtFOgzQq40ykmLUNL0zoVkVJrmtM4OGNbgXCAzs0SdvBLxtUTDJd1dIyPD0+xC2HezKFa0QKXxqBmAtNEwsyFwVR9eW5kcOAWd53KSX4pANRfibjA7qgMEnXiEboB6oIYZ8R0A00iDeOi4OQM4lY00Aa3louaY5mup5zIXA1WQYndMJlHSMI1x8shCYhlEqWwH6ptJXb0Hqh6BKTuTyEGRXdqn7a6EnbCBVqiIZZBfAjJRFKw0a2V0ofJcxh1WueGDFhc/RtvcZ+HKT5bPfV5PEfjVXusDZQBgOjUYFkSmR7ItddUJJqWWWRj9gx2OpTLjdOmCF+//wkLnV4jNPm1xeK/1Py+jd27QEP5q9DLrPtBZ6MPKbChZ32JMPUd1rgzBCPulloV8zxzoO5+YOJcW9KaOmO1+EjtPdyvn5pm5B5+jatE4hqoNWpATp8EM+mWXDMpoPVa+ZpS3PgH3inULEJnUXmv6Aw3h07l2mDxiORKtRegArFu0MjyGXpweN1cDGP79zsqNP7cgKFd+Mbv2O474rLJD+5ujp++uaZChk1AJbhhQMq5jgCmocTr8KUpwl+WzV61c/FZZyrhUvD+GuNI/s7BwysKOQ1au/WblwtrYoXV7LfTXcLtfZujj0bErme7mvNWUWfBaUzxb3PeuhcT7ArIHTlu+hIjzZb+cEk4SLjLrL1r56ysWzUEBuHe727DBfrQNrvZ8E1Y8814CbPSppWjN5bTeytRRi7sel3N+xanDFuZfrWWAicE+2GuAGRBLWTPK7OkukCb6ASAkWwGo2SRMAUfejJUesUA5LbxB5pYnLryOfbIyWJA4v5Q90FgW+sjQLfhFVXZrf/HHjld76wdlwDveETnD1wSk6KePbnHOTZxaNNtzEg05lKPMIA68b/HY1xbnXxTNywobygiUiIo2cSpCGKg8AtDq3hQQNl4PMNCAac8r9HfbJy2chBxKhBH3v2Np/gVcKwNLix9Y2H3CecyCDhe/HEzARVMGe5WFSOfNMaPPPVFSFgqoV9z1mO9v852QmTL1gIWZpwD05S0S3eGPoI9jiw9tFf4EMxPVfEi4T9DUuoi8duRUMIicYOL880hV6+Mt9sebwf43bXDo9HjfFiENLR35pDomDHwULPGwN1CyHQhQkFgbDU5g6tNZmn2m2dt27maO43jyB+3WJ+18GC9ZL7kzOpSIl4L+GK5fxUI3YbCucebEtoZvdbU9pTv4tmVcYq2nVIoGBnHXDPAi4rHBrRdYJ9zRc89tb/UOOMxOd/A9aHhe+T6oNTMOmpqQDjWUCQji7k7TD92Bm/8XTeilsuMgfKC8uFvgRs656ASoOm73QRldsv7SDxaG90DQz8ikFblqg4aIna/tfJw+6dsql684T3XHEgBcBl0w+vUtvWixRkKI+rMU/egm5lE957xKUB798NChQnBL1OOzmcaoMhoM/nmKYoy4H/HyVyLWLi4A0MGbKH8YIKgLhYrsVl6faETPFZigwU+gRUWhN0kH4imEBYJinWkLkYHOtTsmSOjw5cfFuIU+3gnj9bMb6Po5Jlo/GrwsACJiUDoydtRtQIN0LjpYtERjmimLlcCTyHPODtcLBznIBkBRBU5rHORvENI6BciQIISYnqj3ZUaDCw1rvLspmoQoEgT4z1uCnA9Pd4IcR4QMdSjHwLCUHdpX6jETJIjrAFZWBZdMDAFhrZlGiFGZhqIG1jLMmUB0jjXzzabTnv9ZMnK3x5rTTguyZZq0kPNq5H+psA0QkgFCjwaT0FJwclVj0wSZ47bGTOBbmhNcOVYw7CsPSCo0A5/ds3+vSYb78uPxU31/cwUAlnLf490aDqqThppyPClthltlajyD54C9nNKvNggQvA3Q1lFOOD+/Rjv/AYfYvIrlGomFAAAAAElFTkSuQmCC",kr=i.defineComponent({name:"FChatAttachmentPreview",props:kl,emits:[],setup(e){function t(s){switch(s.toLowerCase()){case"doc":case"docx":return O1;case"xlsx":case"xls":return L1;case"ppt":case"mobi":return V1;case"txt":return Cl;case"png":case"jpg":case"jpeg":case"gif":return P1;default:return Cl}}function n(s){return s.icon?s.icon:t(s.type||"")}function r(s){if(s===0)return"0 B";const l=1024,d=["B","KB","MB","GB"],f=Math.floor(Math.log(s)/Math.log(l));return parseFloat((s/Math.pow(l,f)).toFixed(2))+" "+d[f]}async function o(s){var l;(l=e.onOpen)==null||l.call(e,s)}async function u(s,l){s.stopPropagation(),s.preventDefault();const d=sn(l);d&&await Or(d,l.name)}function a(s,l){const d=r(s.size||0),f=n(s),c=sn(s);return i.createVNode("div",{key:l,class:"f-chat-attachment-preview-card"},[i.createVNode("div",{class:"f-chat-attachment-preview-card-inner"},[i.createVNode("div",{class:"f-chat-attachment-preview-main",role:"button",tabindex:0,onClick:()=>o(s),onKeydown:h=>h.key==="Enter"&&o(s)},[i.createVNode("div",{class:"f-chat-attachment-preview-icon-wrapper"},[i.createVNode("img",{src:f,alt:""},null)]),i.createVNode("div",{class:"f-chat-attachment-preview-info"},[i.createVNode("div",{class:"f-chat-attachment-preview-name",title:s.name},[s.name]),i.createVNode("div",{class:"f-chat-attachment-preview-meta"},[d&&i.createVNode("span",null,[d])])])]),c?i.createVNode("button",{type:"button",class:"f-chat-attachment-preview-download-btn","aria-label":"下载附件",title:"下载",onClick:h=>u(h,s)},[i.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[i.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])])}return()=>{const s=e.content;if(!s)return null;const{message:l,attachments:d}=s;return i.createVNode("div",{class:"f-chat-attachment-preview"},[l&&i.createVNode("div",{class:"f-chat-attachment-preview-message"},[l]),i.createVNode("div",{class:"f-chat-attachment-preview-list"},[d.map((f,c)=>a(f,c))])])}}});kr.install=e=>{e.component(kr.name,kr)},yn.install=e=>{e.component(yn.name,yn)},xn.install=e=>{e.component(xn.name,xn)};const _l={activeNavId:{type:String,default:""},displayField:{type:String,default:"text"},disableField:{type:String,default:"disable"},horizontal:{type:Boolean,default:!0},idField:{type:String,default:"id"},maxNum:{type:Number,default:99},navData:{type:Array,default:()=>[]},navPicking:{type:Function,default:null},valueField:{type:String,default:"num"},visible:{type:Boolean,default:!0},customClass:{type:String,default:""},customStyle:{type:String,default:""}},Cr=i.defineComponent({name:"FXNav",props:_l,emits:["nav","update:activeNavId"],setup(e,t){const n=i.ref(e.activeNavId),r=i.ref(e.navData);function o(f){if(r.value&&r.value.length){let c=r.value.find(h=>h[e.idField]===f&&h[e.disableField]!==!0);c||(c=r.value.find(h=>h[e.disableField]!==!0)),c&&n.value!==c.id&&(n.value=c.id,t.emit("nav",c))}}i.watch([()=>e.activeNavId,()=>e.navData],([f,c])=>{r.value=c,o(f)});const u=i.computed(()=>e.visible&&r.value.length>0);function a(f){f.disable||f.id===n.value||Promise.resolve().then(()=>{const c=e.navPicking;return c&&typeof c=="function"?c(f):!0}).then(c=>{let h=!0;typeof c=="object"?c.canContinue||(h=!1,c.message&&console.error({message:c.message,position:"top-center"})):h=c,h&&(n.value=f.id,t.emit("update:activeNavId",f.id),t.emit("nav",f))})}const s=i.computed(()=>{const f={"farris-nav":!0,"farris-nav-vertical":!e.horizontal};return ye(f,e.customClass)}),l=i.computed(()=>Ae({},e.customStyle));function d(f){r.value=f,o(n.value)}return t.expose({updateNavData:d}),()=>{var f;return u.value&&i.createVNode("div",{class:s.value,style:l.value},[(f=r.value)==null?void 0:f.map(c=>i.createVNode("div",{class:["farris-nav-item",{active:c[e.idField]===n.value},{disabled:c[e.disableField]}],onClick:()=>a(c)},[i.createVNode("div",{class:"farris-nav-item-link pt-3"},[i.createVNode("span",{class:"farris-nav-item-link-text"},[typeof c[e.displayField]=="function"?c[e.displayField]():c[e.displayField],c[e.valueField]&&i.createVNode("div",{class:"farris-nav-item-tag"},[c[e.valueField]<=e.maxNum&&i.createVNode("span",{class:"tag-text"},[c[e.valueField]]),c[e.valueField]>e.maxNum&&i.createVNode("span",{class:"tag-text"},[e.maxNum,i.createTextVNode("+")])])]),i.createVNode("div",{class:"farris-nav-item-bottom-line"},null)])]))])}}});Cr.install=e=>{e.component(Cr.name,Cr)};const El={buttonContent:{type:String,default:'<i class="fx-icon fx-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},data:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入关键词"},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},showDropdown:{type:Boolean,default:!0}},Sl={data:{type:Array,default:()=>[]},onConfirmResult:{type:Function,default:void 0},onSearchedValue:{type:Function,default:void 0},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1}},Au=i.defineComponent({name:"FXSearchBoxContainer",props:Sl,emits:["confirmResult","searchedValue"],setup(e,t){const n=i.ref(e.data),r=i.ref(""),o=i.computed(()=>{if(!r.value)return n.value;const d=r.value.toLowerCase();return n.value.filter(f=>String(f[e.textField]??"").toLowerCase().includes(d))});function u(d){r.value=d}function a(d){t.emit("confirmResult",d[e.textField]),t.emit("searchedValue",[d])}function s(d){return t.slots.default?t.slots.default({item:d}):i.createVNode("span",null,[d[e.textField]])}const l=i.computed(()=>{const d={padding:"8px"};return e.maxHeight!==void 0&&e.maxHeight>0&&(d.maxHeight=`${e.maxHeight}px`),d});return i.watch(()=>e.data,d=>{d!==n.value&&(n.value=d)}),t.expose({search:u}),()=>i.createVNode("div",{class:"search-box-container f-utils-overflow-xhya position-relative",style:l.value},[e.loading&&i.createVNode("div",{class:"search-box-loading"},[i.createVNode("i",{class:"fx-icon fx-icon-bubble_step_loading fx-icon-spin"},null)]),i.createVNode("ul",{class:"search-box-list"},[o.value.map(d=>i.createVNode("li",{class:"search-box-item dropdown-item",key:d[e.idField],onClick:()=>a(d)},[s(d)])),!e.loading&&o.value.length===0&&i.createVNode("li",{class:"search-box-empty"},[i.createTextVNode("无匹配结果")])])])}}),_r=i.defineComponent({name:"FXSearchBox",props:El,emits:["update:modelValue","change","selectedValue","clickButton"],setup(e,t){const n=i.ref(),r=i.ref(),o=i.ref(),u=i.ref(e.modelValue),a=i.ref(!1),s='<i class="fx-icon fx-icon-clockwise fx-icon-spin"></i>',l=i.computed(()=>e.loading?s:e.buttonContent);i.watch(u,x=>{var k;(k=o.value)==null||k.search(x),t.emit("update:modelValue",x)}),i.watch(()=>e.modelValue,x=>{u.value=x});function d(x){u.value=x,p()}function f(x){const k=u.value;t.emit("change",x,{oldValue:k,newValue:x})}function c(x){t.emit("selectedValue",x)}function h(){t.emit("clickButton",{})}async function m(){var x;a.value=!0,await i.nextTick(),(x=r.value)==null||x.show(n.value)}function p(){var x;(x=r.value)==null||x.hide(),a.value=!1}function w(){a.value?p():m()}function y(x){const k=x.target.value;u.value=k,f(k),e.showDropdown&&k&&m()}function A(){e.showDropdown&&u.value&&m()}function b(){u.value="",t.emit("update:modelValue",""),p()}t.expose({togglePopup:w,hidePopup:p,showPopup:m});const g=i.computed(()=>{const x=ye({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof x=="string"?[x]:Array.isArray(x)?x:[]]});return()=>i.createVNode("div",{class:g.value},[i.createVNode("div",{class:"f-search-box-input-group",ref:n},[i.createVNode("input",{class:"f-search-box-input form-control",type:"text",placeholder:e.placeholder,value:u.value,disabled:e.disable,onInput:y,onFocus:A},null),u.value&&!e.disable&&i.createVNode("span",{class:"f-search-box-clear",onClick:b},[i.createVNode("i",{class:"fx-icon fx-icon-close"},null)]),i.createVNode("span",{class:"f-search-box-button",onClick:h,innerHTML:l.value},null)]),e.showDropdown&&i.createVNode(Kt,{ref:r,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost},{default:()=>[i.createVNode(Au,{ref:o,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:d,onSearchedValue:x=>c(x),loading:e.loading,maxHeight:e.maxHeight},t.slots)]})])}});_r.install=e=>{e.component(_r.name,_r),e.component(Au.name,Au)};const Jo={data:{type:Array,default:()=>[]},view:{type:String,default:"ContentView"},customClass:{type:String,default:""},itemClass:{type:[String,Function],default:""},idField:{type:String,default:"id"},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},valueField:{type:String,default:"id"},group:{type:Object,default:void 0}};function R1(e){const t=i.ref([...e.data]),n=i.ref([]),r=i.ref(""),o=i.computed(()=>{var h;const c=e.group;return c!=null&&c.enable&&((h=c.groupFields)!=null&&h.length)?u(t.value,c):t.value.map((m,p)=>({type:0,data:m,originalIndex:p}))});function u(c,h){const m=[],p=h.groupFields[0],w=new Map;c.forEach(A=>{const b=String(A[p]??"");w.has(b)||w.set(b,[]),w.get(b).push(A)});let y=0;return w.forEach((A,b)=>{m.push({type:1,data:{[p]:b},groupField:p,groupValue:b,originalIndex:y++}),A.forEach(g=>{m.push({type:0,data:g,groupField:p,groupValue:b,originalIndex:y++})})}),m}function a(c){t.value=[...c],n.value=[],r.value=""}function s(c){r.value=c;const h=t.value.find(m=>m[e.idField]===c);h&&!n.value.includes(h)&&(n.value=[h])}function l(){n.value=[],r.value=""}function d(c){const h=n.value.indexOf(c);h>=0?n.value.splice(h,1):n.value=[c],r.value=c[e.idField]}function f(c){return n.value.includes(c)}return{data:t,visualData:o,selectedItems:n,activeItemId:r,updateDataSource:a,activeRowById:s,clearSelection:l,toggleSelection:d,isSelected:f}}const M1=i.defineComponent({name:"FXListViewItem",props:{...Jo,item:{type:Object,default:()=>({})},index:{type:Number,default:0},isActive:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1}},emits:["clickItem"],setup(e,t){const n=i.computed(()=>({"f-list-view-item":!0,"f-list-view-item-active":e.isActive}));return()=>i.createVNode("li",{class:[n.value,typeof e.itemClass=="function"?e.itemClass(e.item,e.index):e.itemClass],onClick:()=>t.emit("clickItem",e.item,e.index)},[t.slots.default?t.slots.default({item:e.item,index:e.index,selectedItem:e.isSelected?e.item:null}):i.createVNode("span",null,[e.item[e.textField]])])}}),B1=i.defineComponent({name:"FXListGroupItem",props:{groupData:{type:Object,default:()=>({})},groupField:{type:String,default:""},groupValue:{type:String,default:""},index:{type:Number,default:0}},setup(e,t){return()=>i.createVNode("li",{class:"f-list-view-group-item"},[t.slots.default?t.slots.default({item:e.groupData,index:e.index}):i.createVNode("div",{class:"f-list-view-group-header"},[i.createVNode("i",{class:"fx-icon f-accordion-expand"},null),i.createVNode("span",null,[e.groupValue])])])}}),Er=i.defineComponent({name:"FXListView",props:Jo,emits:["clickItem"],setup(e,t){const{visualData:n,activeItemId:r,updateDataSource:o,activeRowById:u,clearSelection:a,toggleSelection:s,isSelected:l}=R1({data:e.data,idField:e.idField,group:e.group}),d=i.computed(()=>ye({"f-list-view":!0},e.customClass));function f(c,h){s(c),t.emit("clickItem",c,h)}return t.expose({updateDataSource:o,activeRowById:u,clearSelection:a}),()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{class:"f-list-view-content"},[i.createVNode("ul",{class:"f-listview-items"},[n.value.map((c,h)=>c.type===1?i.createVNode(B1,{key:`group_${c.groupValue}_${h}`,groupData:c.data,groupField:c.groupField,groupValue:c.groupValue,index:h},{default:t.slots.group}):i.createVNode(M1,{key:`${c.data[e.idField]}_${h}`,item:c.data,index:c.originalIndex,isActive:c.data[e.idField]===r.value,isSelected:l(c.data),itemClass:e.itemClass,textField:e.textField,onClickItem:f},{default:t.slots.content}))])])])}});Er.install=e=>{e.component(Er.name,Er)};const ku=i.defineComponent({name:"FXAgentThinkingMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content,n=t.streamStatus==="end"||t.streamStatus===void 0;return i.createVNode("details",{class:"f-ec-thinking",open:!0},[i.createVNode("summary",{class:"f-ec-thinking-summary"},[i.createTextVNode("思考过程"),n?null:i.createVNode("span",{class:"f-ec-thinking-badge"},[i.createTextVNode("进行中")])]),i.createVNode("div",{class:"f-ec-thinking-body"},[t.text]),t.sources&&t.sources.length>0?i.createVNode("ul",{class:"f-ec-thinking-sources"},[t.sources.map((r,o)=>i.createVNode("li",{key:o},[r]))]):null])}}});ku.install=e=>{e.component(ku.name,ku)};function z1(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function j1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function H1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const Cu=i.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>j1(e.content.media)),n=i.computed(()=>sn(H1(e.content.media)));async function r(o){o.preventDefault(),o.stopPropagation();const u=n.value;u&&await Or(u,e.content.name)}return()=>{const o=!!n.value;return i.createVNode("div",{class:"f-ec-attach-row"},[i.createVNode("a",{class:"f-ec-attach f-ec-attach--stretch",href:t.value,target:"_blank",rel:"noopener noreferrer"},[i.createVNode("span",{class:"f-ec-attach-icon","aria-hidden":!0},[i.createTextVNode("📎")]),i.createVNode("span",{class:"f-ec-attach-body"},[i.createVNode("span",{class:"f-ec-attach-name"},[e.content.name]),i.createVNode("span",{class:"f-ec-attach-meta"},[i.createVNode("span",{class:"f-ec-attach-cat"},[e.content.category]),i.createVNode("span",{class:"f-ec-attach-size"},[z1(e.content.size)])])])]),o?i.createVNode("button",{type:"button",class:"f-ec-attach-download-btn","aria-label":"下载附件",title:"下载",onClick:r},[i.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[i.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])}}});Cu.install=e=>{e.component(Cu.name,Cu)};const $1={0:"高",1:"中",2:"低"},_u=i.defineComponent({name:"ErrorReminderMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content.errorLevel;return i.createVNode("div",{class:["f-ec-error",`f-ec-error--lvl-${t}`]},[i.createVNode("div",{class:"f-ec-error-head"},[i.createVNode("span",{class:"f-ec-error-badge"},[$1[t]]),i.createVNode("span",{class:"f-ec-error-label"},[i.createTextVNode("错误提醒")])]),i.createVNode("div",{class:"f-ec-error-text"},[e.content.errorText]),e.content.errorLink?i.createVNode("a",{class:"f-ec-error-link",href:e.content.errorLink,target:"_blank",rel:"noopener noreferrer"},[i.createTextVNode("查看详情")]):null])}}});_u.install=e=>{e.component(_u.name,_u)};const Nt="__hitl_other__";function Eu(e,t=120){return e?e.length>t?e.slice(0,t)+"...":e:""}function Sn(e){const t=e??"text";return t==="text"||t==="select"||t==="multi_select"||t==="confirm"||t==="form"||t==="date"||t==="number"?t:"text"}const Su=i.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},pinned:{type:Boolean,default:!1},pinnedWidth:{type:String,default:void 0},onSubmitAnswers:{type:Function,default:void 0}},setup(e){const t=i.ref(!1),n=i.ref(0),r=i.ref({}),o=i.ref({}),u=i.computed(()=>t.value||e.disabled);function a(_){const C={},N={};for(const F of _){const O=Sn(F.ui_type);if(O==="confirm")C[F.id]=void 0;else if(O==="text"||O==="select")C[F.id]=F.default_value??"";else if(O==="multi_select")C[F.id]=F.default_value?JSON.parse(F.default_value):[];else if(O==="form"){const H={};if(Array.isArray(F.fields))for(const $ of F.fields)H[$.name]=$.default_value??"";C[F.id]=H}else C[F.id]=F.default_value??"";N[F.id]={active:!1,text:""}}r.value=C,o.value=N,n.value=0}i.watch(()=>e.content.questions,_=>{Array.isArray(_)&&_.length&&a(_)},{immediate:!0}),i.watch(()=>e.content.answers,_=>{if(!Array.isArray(_)||_.length===0)return;const C={...r.value},N={...o.value};for(const F of _){C[F.id]=F.answer;const O=e.content.questions.find(H=>H.id===F.id);O&&Sn(O.ui_type)==="select"&&typeof F.answer=="string"&&!(O.options??[]).some(R=>R.label===F.answer)&&F.answer!==""&&(N[F.id]={active:!0,text:F.answer},C[F.id]=Nt)}r.value=C,o.value=N,t.value=!0},{immediate:!0});const s=i.computed(()=>e.content.questions.length),l=i.computed(()=>{const _=e.content.questions;if(_.length===0)return null;const C=Math.max(0,Math.min(n.value,_.length-1));return _[C]}),d=i.computed(()=>n.value<=0),f=i.computed(()=>n.value>=s.value-1);function c(){f.value||(n.value+=1)}function h(){d.value||(n.value-=1)}const m=i.computed(()=>{var _,C;if(u.value)return!1;for(const N of e.content.questions){const F=Sn(N.ui_type),O=r.value[N.id];if(F==="text"&&(typeof O!="string"||O.trim()==="")||F==="select"&&(typeof O!="string"||O.trim()===""||O===Nt&&(((C=(_=o.value[N.id])==null?void 0:_.text)==null?void 0:C.trim())??"")==="")||F==="confirm"&&typeof O!="boolean"||F==="multi_select"&&(!Array.isArray(O)||O.length===0))return!1;if(F==="form"){const H=N.fields??[],$=O;for(const R of H)if(R.required){const V=$[R.name];if(typeof V!="string"||V.trim()==="")return!1}}if((F==="date"||F==="number")&&(typeof O!="string"||O.trim()===""))return!1}return!0});function p(_,C){r.value={...r.value,[_]:C}}function w(_,C,N){const F=r.value[_]??{};p(_,{...F,[C]:N})}function y(_,C){var N;C===Nt?(o.value={...o.value,[_.id]:{...o.value[_.id],active:!0,text:((N=o.value[_.id])==null?void 0:N.text)??""}},p(_.id,Nt)):(o.value={...o.value,[_.id]:{active:!1,text:""}},p(_.id,C))}function A(_,C){const N=r.value[_.id]??[];N.includes(C)?p(_.id,N.filter(F=>F!==C)):p(_.id,[...N,C])}function b(){var C,N,F;if(!m.value)return;const _=[];for(const O of e.content.questions){const H=Sn(O.ui_type);let $=r.value[O.id];H==="select"&&$===Nt&&($=((N=(C=o.value[O.id])==null?void 0:C.text)==null?void 0:N.trim())??""),H==="number"&&($=Number($)),_.push({id:O.id,answer:$})}t.value=!0,(F=e.onSubmitAnswers)==null||F.call(e,_)}function g(_,C,N){return i.createVNode("div",{class:"f-hitl-date-wrap"},[i.createVNode("input",{class:"f-hitl-input",type:"date",value:_,disabled:C,onInput:F=>N(F.target.value)},null)])}function x(_,C,N,F,O){const H=V=>{let L=Number(_)||0;L+=V,F!==void 0&&(L=Math.max(F,L)),O!==void 0&&(L=Math.min(O,L)),N(String(L))},$=O!==void 0&&Number(_||0)>=O,R=F!==void 0&&Number(_||0)<=F;return i.createVNode("div",{class:"f-hitl-num-wrap"},[i.createVNode("input",{class:"f-hitl-input f-hitl-num-input",type:"number",value:_,min:F,max:O,disabled:C,onInput:V=>N(V.target.value)},null),i.createVNode("div",{class:"f-hitl-num-btns"},[i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:C||$,onClick:()=>H(1)},[i.createVNode("span",{class:"fx-icon fx-icon-foldup"},null)]),i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:C||R,onClick:()=>H(-1)},[i.createVNode("span",{class:"fx-icon fx-icon-expanddown"},null)])])])}function k(_,C,N,F){return i.createVNode("div",{key:_.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":N}],onClick:F},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[C+1]),i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[_.label]),_.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[Eu(_.description)]):null]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[N?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}function T(_,C){return i.createVNode("div",{class:"f-hitl-form-item",key:_.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[_.label]),C])}function D(_,C,N){const F=r.value[_.id]??"",O=r.value[_.id]??[],H=o.value[_.id]??{active:!1,text:""},$=N==="single",R=$&&F===Nt||H.active,V=_.allow_other&&R,L=Z=>$?F===Z.label&&!H.active:O.includes(Z.label),M=Z=>()=>{u.value||($?y(_,Z.label):A(_,Z.label))},G=()=>{if(!u.value)if($)y(_,Nt);else{const Z=H.text;H.active?(p(_.id,O.filter(K=>K!==Z)),o.value={...o.value,[_.id]:{active:!1,text:""}}):(o.value={...o.value,[_.id]:{active:!0,text:H.text}},H.text&&!O.includes(H.text)&&p(_.id,[...O,H.text]))}},J=Z=>{const K=Z.target.value;o.value={...o.value,[_.id]:{active:!0,text:K}},$?p(_.id,Nt):p(_.id,[...O.filter(ue=>ue!==H.text),K])};return i.createVNode("div",{key:_.id},[i.createVNode("div",{class:"f-hitl-option-list"},[C.map((Z,K)=>k(Z,K,L(Z),M(Z))),_.allow_other?i.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":R}],onClick:G},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[i.createTextVNode("...")]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[i.createTextVNode("其他")]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[R?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),V?i.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:H.text,placeholder:"请输入自定义内容",disabled:u.value,onInput:J},null):null])}function S(_){const C=r.value[_.id]??{},N=_.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-form-group"},[N.map(F=>{const O=C[F.name]??"";return F.type==="select"?T(F,i.createVNode("div",{class:"f-hitl-select-group"},[(F.options??[]).map(H=>i.createVNode("button",{key:H,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":O===H}],disabled:u.value,onClick:()=>w(_.id,F.name,H)},[H]))])):F.type==="number"?T(F,x(O,u.value,H=>w(_.id,F.name,H),F.min,F.max)):F.type==="date"?T(F,g(O,u.value,H=>w(_.id,F.name,H))):T(F,i.createVNode("input",{class:"f-hitl-input",type:"text",value:O,placeholder:F.default_value??"请输入",disabled:u.value,onInput:H=>w(_.id,F.name,H.target.value)},null))})])])}function X(_){const C=Sn(_.ui_type);if(C==="text"){const N=r.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("input",{class:"f-hitl-input",type:"text",value:N,placeholder:_.placeholder??"请输入",disabled:u.value,onInput:F=>p(_.id,F.target.value)},null)])}if(C==="multi_select"){const N=Array.isArray(_.options)?_.options:[];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[D(_,N,"multi")])}if(C==="form")return S(_);if(C==="select"){const N=Array.isArray(_.options)?_.options:[];return N.length===0?i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:_.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持空的 select,请升级前端。")])]):i.createVNode("div",{class:"f-hitl-field",key:_.id},[D(_,N,"single")])}if(C==="confirm"){const N=r.value[_.id];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":N===!0}],disabled:u.value,onClick:()=>p(_.id,!0)},[i.createTextVNode("是")]),i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":N===!1}],disabled:u.value,onClick:()=>p(_.id,!1)},[i.createTextVNode("否")])])])}if(C==="date"){const N=r.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[g(N,u.value,F=>p(_.id,F))])}if(C==="number"){const N=r.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[x(N,u.value,F=>p(_.id,F),_.min,_.max)])}return i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:_.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持 ui_type「"),String(_.ui_type),i.createTextVNode("」,请升级前端。")])])}function z(_){const C=Sn(_.ui_type),N=(O,H,$)=>i.createVNode("input",{class:"f-hitl-input",type:O,value:H,readonly:!0,min:$==null?void 0:$.min,max:$==null?void 0:$.max},null);if(C==="text"){const O=r.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[N("text",O)])}if(C==="multi_select"){const O=r.value[_.id]??[],H=Array.isArray(_.options)?_.options:[],$=new Set(H.map(V=>V.label)),R=O.filter(V=>!$.has(V));return i.createVNode("div",{key:_.id},[i.createVNode("div",{class:"f-hitl-option-list"},[H.filter(V=>O.includes(V.label)).map(V=>i.createVNode("div",{class:"f-hitl-opt-row",key:V.label},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[V.label]),V.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[Eu(V.description)]):null])])),R.map(V=>i.createVNode("div",{class:"f-hitl-opt-row",key:V},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[V])])]))])])}if(C==="select"){const O=r.value[_.id]??"",H=o.value[_.id]??{active:!1,text:""},$=Array.isArray(_.options)?_.options:[],R=O===Nt||H.active;return i.createVNode("div",{key:_.id},[i.createVNode("div",{class:"f-hitl-option-list"},[R?i.createVNode("div",{class:"f-hitl-opt-row"},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[H.text||"其他"])])]):$.filter(V=>V.label===O).map(V=>i.createVNode("div",{class:"f-hitl-opt-row",key:V.label},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[V.label]),V.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[Eu(V.description)]):null])]))])])}if(C==="confirm"){const O=r.value[_.id];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn","f-hitl-cbtn--readonly"]},[O===!0?"是":"否"])])])}if(C==="form"){const O=r.value[_.id]??{},H=_.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-form-group"},[H.map($=>{const R=O[$.name]??"";let V;return $.type==="number"?V=N("number",R,{min:$.min,max:$.max}):$.type==="date"?V=N("date",R):V=N("text",R),T($,V)})])])}if(C==="date"){const O=r.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[N("date",O)])}if(C==="number"){const O=r.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[N("number",O)])}const F=r.value[_.id];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("span",{class:"f-hitl-submitted-value"},[String(F??"")])])}function B(_){return i.createVNode("div",{class:"f-hitl-card__title-wrap"},[i.createVNode("span",{class:"f-hitl-card__title"},[_.header]),i.createVNode("span",{class:"f-hitl-card__subtitle"},[Eu(_.question)])])}function j(){return s.value<=1?null:i.createVNode("div",{class:"f-hitl-pagination"},[i.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:d.value,onClick:h},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-left"},null)]),i.createVNode("span",{class:"f-hitl-pagination__text"},[n.value+1,i.createTextVNode("/"),s.value]),i.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:f.value,onClick:c},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-right"},null)])])}function I(){const _=e.pinnedWidth?{width:`calc(${e.pinnedWidth} * 0.8)`,minWidth:"343px",maxWidth:"800px"}:void 0;return i.createVNode("div",{class:"f-hitl-card",style:_},[i.createVNode("div",{class:"f-hitl-submitted-flat"},[e.content.questions.map(C=>i.createVNode("div",{class:"f-hitl-submitted-item",key:C.id},[i.createVNode("div",{class:"f-hitl-card__header"},[B(C)]),i.createVNode("div",{class:"f-hitl-card__body"},[z(C)])]))])])}function W(){const _=l.value;if(!_)return null;const C=e.pinned?"f-hitl-card--pinned":"",N=e.pinned&&e.pinnedWidth?{width:e.pinnedWidth}:void 0;return i.createVNode("div",{class:["f-hitl-card",C],style:N},[i.createVNode("div",{class:"f-hitl-card__header"},[B(_),j()]),i.createVNode("div",{class:"f-hitl-card__body"},[X(_)]),!u.value&&i.createVNode("div",{class:"f-hitl-card__footer"},[s.value>1&&!f.value&&i.createVNode("button",{type:"button",class:"f-hitl-btn",onClick:c},[i.createTextVNode("下一题")]),f.value&&i.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:!m.value,onClick:b},[i.createTextVNode("提交")])])])}return()=>t.value?I():W()}});Su.install=e=>{e.component(Su.name,Su)};function U1(e,t){var r;const n=(r=e.pickActions)==null?void 0:r[t];return n||e.pickActionDefault}const Du=i.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(n,r)=>{var o;U1(e.content,r),(o=e.onPick)==null||o.call(e,n)};return()=>i.createVNode("div",{class:"f-ec-recommend"},[e.content.title?i.createVNode("div",{class:"f-ec-recommend-title"},[e.content.title]):null,i.createVNode("div",{class:"f-ec-recommend-chips"},[e.content.suggestions.map((n,r)=>i.createVNode("button",{key:r,type:"button",class:"f-ec-recommend-chip",onClick:()=>t(n,r)},[n]))])])}});Du.install=e=>{e.component(Du.name,Du)};const Fu=i.defineComponent({name:"LinkCardMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content;return i.createVNode("div",{class:"f-ec-linkcard"},[t.poster?i.createVNode("div",{class:"f-ec-linkcard-poster"},[i.createVNode("img",{src:t.poster,alt:""},null)]):null,i.createVNode("div",{class:"f-ec-linkcard-body"},[i.createVNode("a",{class:"f-ec-linkcard-title",href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title]),t.subtitle?i.createVNode("div",{class:"f-ec-linkcard-sub"},[t.subtitle]):null,t.relatedLinks&&t.relatedLinks.length>0?i.createVNode("div",{class:"f-ec-linkcard-related"},[i.createVNode("div",{class:"f-ec-linkcard-related-label"},[i.createTextVNode("相关阅读")]),i.createVNode("ul",null,[t.relatedLinks.map((n,r)=>i.createVNode("li",{key:r},[i.createVNode("a",{href:n.url,target:"_blank",rel:"noopener noreferrer"},[n.title])]))])]):null])])}}});Fu.install=e=>{e.component(Fu.name,Fu)};const Tu=i.defineComponent({name:"ReferenceSourcesMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-sources"},[i.createVNode("div",{class:"f-ec-sources-title"},[i.createTextVNode("引用来源")]),i.createVNode("ul",{class:"f-ec-sources-list"},[e.content.items.map((t,n)=>i.createVNode("li",{key:n},[i.createVNode("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title])]))])])}});Tu.install=e=>{e.component(Tu.name,Tu)};const Nu=i.defineComponent({name:"UnknownEnterpriseMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-unknown"},[i.createVNode("div",{class:"f-ec-unknown-title"},[i.createTextVNode("未知类型消息")]),e.content.wireType?i.createVNode("div",{class:"f-ec-unknown-wire"},[i.createTextVNode("wire type: "),e.content.wireType]):null,i.createVNode("div",{class:"f-ec-unknown-desc"},[e.content.hint??"客户端无法识别此消息类型,已按占位展示。"])])}});Nu.install=e=>{e.component(Nu.name,Nu)},ur.install=e=>{e.component(ur.name,ur)};const W1={install(e){e.use(at).use(or).use(ir).use(lr).use(dr).use(mr).use(gr).use(br).use(yr).use(pn).use(tn).use(_n).use(Qt).use(xr).use(wr).use(vr).use(Ar).use(kr).use(yn).use(xn).use(Kt).use(An).use(Cr).use(_r).use(Er)}};P.FXAgentThinking=ku,P.FXAppPreview=at,P.FXAttachmentFile=Cu,P.FXAttachmentPreview=kr,P.FXBubble=or,P.FXBubbleAction=No,P.FXCarousel=ir,P.FXCarouselItem=lu,P.FXChatPreview=lr,P.FXCoding=mr,P.FXConfirmDialog=dr,P.FXDynamicComponent=xn,P.FXErrorReminder=_u,P.FXFileOperation=gr,P.FXGenerateProcess=br,P.FXHistory=yr,P.FXHitlQuestion=Su,P.FXInputRecommend=Du,P.FXLinkCard=Fu,P.FXListView=Er,P.FXMarkdown=pn,P.FXMarkdownPreview=tn,P.FXNav=Cr,P.FXPopover=Kt,P.FXPopoverDirective=rs,P.FXPrompt=vu,P.FXPrompts=_n,P.FXReferenceSources=Tu,P.FXSearchBox=_r,P.FXSearchBoxContainer=Au,P.FXSplitter=An,P.FXSplitterPane=ar,P.FXStartedTodo=Qt,P.FXSuggestion=xr,P.FXTodo=wr,P.FXTodoListItemView=su,P.FXTodoListView=rr,P.FXToolUse=vn,P.FXToolUseBatch=vr,P.FXUnknownEnterprise=Nu,P.FXUserAuth=ur,P.FXWelcome=Ar,P.FXWidgetContainer=yn,P.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=Yo,P.PREVIEW_BRIDGE_SOURCE=qo,P.PREVIEW_BRIDGE_VERSION=Zo,P.appPreviewMessageProps=be,P.attachmentPreviewProps=kl,P.bubbleActionProps=as,P.bubbleProps=Ir,P.carouselItemProps=ls,P.carouselProps=ss,P.chatHistoryProps=gl,P.chatPreviewProps=ds,P.clonePreviewPayloadForPostMessage=Zs,P.codingMessageProps=fl,P.confirmDialogProps=tl,P.createPreviewIframeSdk=Lm,P.default=W1,P.extractFileIdFromRuntimeDownloadUrl=hi,P.fileOperationMessageProps=pl,P.generateProcessProps=ml,P.getCustomClass=ye,P.getCustomStyle=Ae,P.getDynamicComponentRegistryDebugSnapshot=Do,P.invokeAgentWorkbenchSdkApi=Om,P.isImageUrl=gi,P.isPreviewBridgeAssistantMessage=Ks,P.listViewProps=Jo,P.loadDynamicComponent=Ka,P.markdownMessageProps=Ea,P.markdownPreviewProps=fs,P.navProps=_l,P.normalizeDynamicComponentRegisterClaim=Pe,P.overflowTooltipDirective=wi,P.peekDynamicComponentRegisterBootstrapId=Eh,P.popoverProps=es,P.postAssistantToPreviewIframe=Qs,P.postDynamicComponentAssistantMessage=Nh,P.previewLayoutBridge=Rm,P.promptProps=xl,P.promptsProps=bl,P.registerPreviewChromeSdk=Pm,P.renderIconNode=Lr,P.renderNode=Bn,P.resolveHrefForAttachmentDownload=sn,P.resolveRuntimeAttachmentDownloadUrl=Hu,P.searchBoxContainerProps=Sl,P.searchBoxProps=El,P.splitterProps=cs,P.startedTodoProps=us,P.subscribeAssistantInPreviewIframe=Js,P.suggestionProps=wl,P.todoListItemProps=is,P.todoListViewProps=os,P.todoProps=vl,P.triggerAttachmentDownload=Or,P.unloadDynamicComponent=Qa,P.useSequentialStreaming=Vr,P.useStreamingOutput=bi,P.useTimer=$u,P.welcomeProps=Al,P.widgetContainerProps=Wa,Object.defineProperties(P,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|