@farris/x-ui 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/farris.x-ui.umd.cjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
(function(R,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(R=typeof globalThis<"u"?globalThis:R||self,i(R.FarrisX={},R.vue))})(this,function(R,i){"use strict";var c2=Object.defineProperty;var uc=R=>{throw TypeError(R)};var d2=(R,i,be)=>i in R?c2(R,i,{enumerable:!0,configurable:!0,writable:!0,value:be}):R[i]=be;var fe=(R,i,be)=>d2(R,typeof i!="symbol"?i+"":i,be),pi=(R,i,be)=>i.has(R)||uc("Cannot "+be);var v=(R,i,be)=>(pi(R,i,"read from private field"),be?be.call(R):i.get(R)),ie=(R,i,be)=>i.has(R)?uc("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(R):i.set(R,be),ne=(R,i,be,at)=>(pi(R,i,"write to private field"),at?at.call(R,be):i.set(R,be),be),Q=(R,i,be)=>(pi(R,i,"access private method"),be);var zu=(R,i,be,at)=>({set _(Or){ne(R,i,Or,be)},get _(){return v(R,i,at)}});var Ml,Dt,Dn,Bl,zl,it,Je,ct,un,dt,Fn,Tn,ft,Ce,ht,xe,he,ue,$e,et,Re,De,pt,Fe,mt,gt,tt,nt,bt,Xt,Ue,Nn,q,mi,on,It,Dr,rt,oc,an,In,Fr,Zt,Yt,gi,ju,Hu,pe,bi,Ir,Kt,yi,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 Or={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"}},$u={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ic="/api/runtime/attachment";function ac(){try{const e=$u==null?void 0:$u.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function sc(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 lc(e){return`${ic}/${encodeURIComponent(e)}/download`}function Uu(e){const t=String(e??"").trim();if(!t)return"";const n=lc(t),r=ac();return r?`${r}${n}`:n}function wi(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 xi(e){return String(e??"").replace(/[/\\]/g,"_").trim()||"download"}function cc(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 vi(e){const t=sc(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 dc(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=xi(t),r.rel="noopener noreferrer",r.style.display="none",document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}function fc(e){const t=document.createElement("a");t.href=vi(e),t.rel="noopener noreferrer",t.style.display="none",document.body.appendChild(t),t.click(),t.remove()}function ln(e){const t=String(e.fileId??"").trim();if(t)return Uu(t);const n=String(e.url??"").trim();if(!n)return;const r=wi(n);if(r)return Uu(r);if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/"))return n}async function Lr(e,t){const n=xi(t),r=vi(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=cc(o.headers.get("Content-Disposition"))??n;dc(u,a)}catch{fc(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 ke(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 Ai(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Vr(e){return e?typeof e!="string"?e:Ai(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 ki(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 x=Object.keys(p);x.forEach(g=>{u.value.hasOwnProperty(g)||(u.value[g]="")});const y=x.filter(g=>!s.has(g));if(y.length===0)return;let A=0;const b=()=>{var S;if(A>=y.length)return;const g=y[A],w=p[g];if(!w){s.add(g),A++,b();return}let k=((S=u.value[g])==null?void 0:S.length)||0;const D=setInterval(()=>{k<w.length?(u.value={...u.value,[g]:w.slice(0,k+1)},k++):(clearInterval(D),a=a.filter(_=>_!==D),s.add(g),A++,b())},o);a.push(D)};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 Pr(){const e=i.reactive({}),t=[],n=i.ref(null);let r=null;const o=30,u=p=>{const x=e[p];return!x||x.displayedLength>=x.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,x)=>{if(e[p]){m(p,x);return}t.push(p),e[p]={rawValue:x??"",displayedLength:0,isStreaming:!1,displayedValue:""},r||(!n.value||n.value===p)&&f()},m=(p,x)=>{const y=e[p];if(!y){h(p,x);return}y.rawValue=x??"",!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 Wu(){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}}}const hc={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 pc(e){return e?e.startsWith("mcp:")?"tool_mcp":hc[e]??"thinking_tool":"thinking_tool"}function Gu(){return{getToolIconClass:pc}}function mc(e){return e.scrollWidth>e.clientWidth}function Ci(){mc(this)?this.title=this.textContent??"":this.removeAttribute("title")}function _i(){this.removeAttribute("title")}const Ei={mounted(e){e.addEventListener("mouseenter",Ci),e.addEventListener("mouseleave",_i)},updated(e){e.removeAttribute("title")},unmounted(e){e.removeEventListener("mouseenter",Ci),e.removeEventListener("mouseleave",_i)}};function gc(e,t){const n=i.computed(()=>{var o;return ke({},(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 bc(e,t){var u;const n=i.ref(((u=e.content)==null?void 0:u.sender)??"发送人"),r=i.computed(()=>{var a;return ke({},(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 yc={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},wc={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 xc(){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 Si=i.defineComponent({name:"FXBubbleAttachment",props:wc,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}=xc(),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=ln(A);b&&await Lr(b,A.name)}function f(y){y.stopPropagation(),y.preventDefault(),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=ln(y);return i.createVNode("div",{class:"f-chat-bubble-attachment-item",key:A,onClick:g=>l(g,y)},[i.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation"},[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 x(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"?x(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}}),vc=i.defineComponent({name:"FXBubbleFileContentFooter",props:yc,setup(e,t){const n=i.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return ke({},e.customStyle),()=>i.createVNode(Si,{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)}}),Ac={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},kc=i.defineComponent({name:"FXBubblePageContentFooter",props:Ac,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 Di(){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(vc,a)}function r(o,u){const a=t(o,u);return i.h(kc,a)}return{renderFileEmbeddedContent:n,renderPageEmbeddedContent:r}}const Cc={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}},Xu="assistant-widget",Rt="```";function Rr(e,t){let n=t;for(;n<e.length&&/\s/.test(e[n]);)n+=1;return n}function _c(e,t){let n=t;for(;n<e.length&&/[a-zA-Z0-9-]/.test(e[n]);)n+=1;return{lang:e.slice(t,n),next:n}}function Fi(e){const t=e.toLowerCase();return t.length===0||t.length>Xu.length?!1:Xu.startsWith(t)}function Ec(e){return e.toLowerCase()===Xu}function Ti(e,t){if(!e.startsWith(Rt,t))return null;let n=t+Rt.length;n=Rr(e,n);const{lang:r,next:o}=_c(e,n);return r.length===0?e.slice(o).trim().length===0?{fenceStart:t,bodyStart:o,langComplete:!1}:null:Fi(r)?(n=Rr(e,o),{fenceStart:t,bodyStart:n,langComplete:Ec(r)}):null}function qu(e,t=0){const n=Rr(e,t);return Ti(e,n)}function Sc(e,t,n){if(t<n)return!1;const r=e.slice(t+Rt.length);return r.length===0?!0:r.startsWith("`")?!1:(/^\s*[\r\n]/.test(r)||/^\s*$/.test(r),!0)}function Mr(e,t){let n=t;for(;n<=e.length;){const r=e.indexOf(Rt,n);if(r===-1)return-1;if(Sc(e,r,t))return r;n=r+1}return-1}function Dc(e){const t=qu(e,0);if(!(t!=null&&t.langComplete))return null;const n=Mr(e,t.bodyStart);return n===-1?null:e.slice(t.bodyStart,n).trim()}function Ni(e){return e.replace(/```\s*assistant-widget\s*/gi,"``` assistant-widget\n")}function Fc(e){const t=e.match(/^\s*```\s*([a-zA-Z0-9-]*)$/);return t?Fi(t[1]??""):!1}function Tc(e,t){let n=t;for(;n<e.length;){const r=e.indexOf(Rt,n);if(r===-1)return null;const o=Ti(e,r);if(o)return{fenceIdx:r,open:o};n=r+Rt.length}return null}function Ii(e){if(!e)return!1;const t=qu(e,0);if(!(t!=null&&t.langComplete))return!1;const n=Mr(e,t.bodyStart);return n===-1?!1:Rr(e,n+Rt.length)>=e.length}function Nc(e){if(!e)return!1;if(Ii(e)||Fc(e))return!0;const t=qu(e,0);return t?t.langComplete?Mr(e,t.bodyStart)===-1:!0:!1}function Ic(e){if(!e)return[];const t=[];let n=0;for(;n<e.length;){const r=Tc(e,n);if(!r){const l=e.slice(n);l&&t.push(l);break}const{fenceIdx:o,open:u}=r;if(o>n&&t.push(e.slice(n,o)),!u.langComplete){t.push(e.slice(o));break}const a=Mr(e,u.bodyStart);if(a===-1){t.push(e.slice(o));break}const s=a+Rt.length;t.push(Ni(e.slice(o,s))),n=s}return t.filter(r=>r.trim().length>0)}function Oi(e){const t=Dc(Ni(e.trim()));if(t==null||t==="")return null;try{return JSON.parse(t)}catch(n){return console.error("Failed to parse JSON:",n),null}}function Oc(e){var n;const t=Oi(e);return((n=t==null?void 0:t.renderer)==null?void 0:n.widgetImplOptions)||{}}const Lc=/^```\s*dynamic-component[\s\S]*?```$/,Vc=/^```\s*dynamic-component/;function Pc(e){return e.replace(/```\s*\n*\s*dynamic-component/g,"``` dynamic-component")}function Rc(e){return e?Lc.test(e)||Vc.test(e):!1}function Mc(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 Bc(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 zc(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(Pc(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 jc(e){var o;if(!e)return[];const t=[],n=new Set,r=Ic(e);for(const u of r)if(Nc(u))if(Ii(u)){const a=Oi(u);t.push({type:Le.AssistantWidgetComplete,raw:u,widgetData:a,widgetUrl:(o=a==null?void 0:a.renderer)==null?void 0:o.url,widgetImplOptions:Oc(u)})}else t.push({type:Le.AssistantWidgetPending,raw:u});else{const a=zc(u);for(const s of a)if(Rc(s))if(s.endsWith("```")){const l=Mc(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=Bc(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 Li={};function Hc(e){let t=Li[e];if(t)return t;t=Li[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 cn(e,t){typeof t!="string"&&(t=cn.defaultChars);const n=Hc(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})}cn.defaultChars=";/?:@&=+$,#",cn.componentChars="";const Vi={};function $c(e){let t=Vi[e];if(t)return t;t=Vi[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=$c(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 Zu(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 Br(){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 Uc=/^([a-z0-9.+-]+:)/i,Wc=/:[0-9]*$/,Gc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Xc=["<",">",'"',"`"," ","\r",`
|
|
2
|
-
`," "],qc=["{","}","|","\\","^","`"].concat(Xc),Zc=["'"].concat(qc),Pi=["%","/","?",";","#"].concat(Zc),Ri=["/","?","#"],Yc=255,Mi=/^[+a-z0-9A-Z_-]{0,63}$/,Kc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bi={javascript:!0,"javascript:":!0},zi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Yu(e,t){if(e&&e instanceof Br)return e;const n=new Br;return n.parse(e,t),n}Br.prototype.parse=function(e,t){let n,r,o,u=e;if(u=u.trim(),!t&&e.split("#").length===1){const d=Gc.exec(u);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let a=Uc.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&&Bi[a])&&(u=u.substr(2),this.slashes=!0)),!Bi[a]&&(o||a&&!zi[a])){let d=-1;for(let p=0;p<Ri.length;p++)r=u.indexOf(Ri[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<Pi.length;p++)r=u.indexOf(Pi[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 x=0,y=p.length;x<y;x++){const A=p[x];if(A&&!A.match(Mi)){let b="";for(let g=0,w=A.length;g<w;g++)A.charCodeAt(g)>127?b+="x":b+=A[g];if(!b.match(Mi)){const g=p.slice(0,x),w=p.slice(x+1),k=A.match(Kc);k&&(g.push(k[1]),w.unshift(k[2])),w.length&&(u=w.join(".")+u),this.hostname=g.join(".");break}}}}this.hostname.length>Yc&&(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),zi[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Br.prototype.parseHost=function(e){let t=Wc.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 Qc=Object.freeze(Object.defineProperty({__proto__:null,decode:cn,encode:zn,format:Zu,parse:Yu},Symbol.toStringTag,{value:"Module"})),ji=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Hi=/[\0-\x1F\x7F-\x9F]/,Jc=/[\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]/,Ku=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,$i=/[\$\+<->\^`\|~\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]/,Ui=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ed=Object.freeze(Object.defineProperty({__proto__:null,Any:ji,Cc:Hi,Cf:Jc,P:Ku,S:$i,Z:Ui},Symbol.toStringTag,{value:"Module"})),td=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))),nd=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Qu;const rd=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]]),ud=(Qu=String.fromCodePoint)!==null&&Qu!==void 0?Qu: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 od(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=rd.get(e))!==null&&t!==void 0?t:e}var Ee;(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"})(Ee||(Ee={}));const id=32;var Mt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Mt||(Mt={}));function Ju(e){return e>=Ee.ZERO&&e<=Ee.NINE}function ad(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_F||e>=Ee.LOWER_A&&e<=Ee.LOWER_F}function sd(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_Z||e>=Ee.LOWER_A&&e<=Ee.LOWER_Z||Ju(e)}function ld(e){return e===Ee.EQUALS||sd(e)}var Se;(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"})(Se||(Se={}));var Bt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Bt||(Bt={}));class cd{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Se.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bt.Strict}startEntity(t){this.decodeMode=t,this.state=Se.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Se.EntityStart:return t.charCodeAt(n)===Ee.NUM?(this.state=Se.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Se.NamedEntity,this.stateNamedEntity(t,n));case Se.NumericStart:return this.stateNumericStart(t,n);case Se.NumericDecimal:return this.stateNumericDecimal(t,n);case Se.NumericHex:return this.stateNumericHex(t,n);case Se.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|id)===Ee.LOWER_X?(this.state=Se.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Se.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(Ju(o)||ad(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(Ju(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===Ee.SEMI)this.consumed+=1;else if(this.decodeMode===Bt.Strict)return 0;return this.emitCodePoint(od(this.result),this.consumed),this.errors&&(t!==Ee.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&Mt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=dd(r,o,this.treeIndex+Math.max(1,u),a),this.treeIndex<0)return this.result===0||this.decodeMode===Bt.Attribute&&(u===0||ld(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&Mt.VALUE_LENGTH)>>14,u!==0){if(a===Ee.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Bt.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]&Mt.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]&~Mt.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Se.NamedEntity:return this.result!==0&&(this.decodeMode!==Bt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Se.NumericDecimal:return this.emitNumericEntity(0,2);case Se.NumericHex:return this.emitNumericEntity(0,3);case Se.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Se.EntityStart:return 0}}}function Wi(e){let t="";const n=new cd(e,r=>t+=ud(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 dd(e,t,n,r){const o=(t&Mt.BRANCH_LENGTH)>>7,u=t&Mt.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 fd=Wi(td);Wi(nd);function Gi(e,t=Bt.Legacy){return fd(e,t)}function hd(e){return Object.prototype.toString.call(e)}function eo(e){return hd(e)==="[object String]"}const pd=Object.prototype.hasOwnProperty;function md(e,t){return pd.call(e,t)}function zr(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 Xi(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function to(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 jr(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 qi=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,gd=/&([a-z#][a-z0-9]{1,31});/gi,bd=new RegExp(qi.source+"|"+gd.source,"gi"),yd=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function wd(e,t){if(t.charCodeAt(0)===35&&yd.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return to(r)?jr(r):e}const n=Gi(e);return n!==e?n:e}function xd(e){return e.indexOf("\\")<0?e:e.replace(qi,"$1")}function dn(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(bd,function(t,n,r){return n||wd(t,r)})}const vd=/[&<>"]/,Ad=/[&<>"]/g,kd={"&":"&","<":"<",">":">",'"':"""};function Cd(e){return kd[e]}function zt(e){return vd.test(e)?e.replace(Ad,Cd):e}const _d=/[.?*+^$[\]\\(){}|-]/g;function Ed(e){return e.replace(_d,"\\$&")}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 Ku.test(e)||$i.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 Hr(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:Xi,assign:zr,escapeHtml:zt,escapeRE:Ed,fromCodePoint:jr,has:md,isMdAsciiPunct:$n,isPunctChar:Hn,isSpace:ce,isString:eo,isValidEntityCode:to,isWhiteSpace:jn,lib:{mdurl:Qc,ucmicro:ed},normalizeReference:Hr,unescapeAll:dn,unescapeMd:xd},Symbol.toStringTag,{value:"Module"}));function Dd(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 Fd(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=dn(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=dn(e.slice(t,o)),u.pos=o,u.ok=!0),u}function Td(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+=dn(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+=dn(e.slice(t,u)),a}const Nd=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:Fd,parseLinkLabel:Dd,parseLinkTitle:Td},Symbol.toStringTag,{value:"Module"})),wt={};wt.code_inline=function(e,t,n,r,o){const u=e[t];return"<code"+o.renderAttrs(u)+">"+zt(u.content)+"</code>"},wt.code_block=function(e,t,n,r,o){const u=e[t];return"<pre"+o.renderAttrs(u)+"><code>"+zt(e[t].content)+`</code></pre>
|
|
3
|
-
`},
|
|
1
|
+
(function(R,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(R=typeof globalThis<"u"?globalThis:R||self,i(R.FarrisX={},R.vue))})(this,function(R,i){"use strict";var d2=Object.defineProperty;var oc=R=>{throw TypeError(R)};var f2=(R,i,be)=>i in R?d2(R,i,{enumerable:!0,configurable:!0,writable:!0,value:be}):R[i]=be;var fe=(R,i,be)=>f2(R,typeof i!="symbol"?i+"":i,be),mi=(R,i,be)=>i.has(R)||oc("Cannot "+be);var A=(R,i,be)=>(mi(R,i,"read from private field"),be?be.call(R):i.get(R)),ie=(R,i,be)=>i.has(R)?oc("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(R):i.set(R,be),ne=(R,i,be,at)=>(mi(R,i,"write to private field"),at?at.call(R,be):i.set(R,be),be),Q=(R,i,be)=>(mi(R,i,"access private method"),be);var zu=(R,i,be,at)=>({set _(Lr){ne(R,i,Lr,be)},get _(){return A(R,i,at)}});var Bl,Ft,Dn,zl,jl,it,Je,dt,un,ft,Fn,Tn,ht,Ce,mt,xe,he,ue,$e,et,Re,De,pt,Fe,gt,bt,tt,nt,yt,Xt,Ue,Nn,q,pi,on,Ot,Fr,rt,ic,an,In,Tr,Zt,Yt,gi,ju,Hu,me,bi,Or,Kt,yi,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 Lr={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"}},$u={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ac="/api/runtime/attachment";function sc(){try{const e=$u==null?void 0:$u.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function lc(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 cc(e){return`${ac}/${encodeURIComponent(e)}/download`}function Uu(e){const t=String(e??"").trim();if(!t)return"";const n=cc(t),r=sc();return r?`${r}${n}`:n}function wi(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 xi(e){return String(e??"").replace(/[/\\]/g,"_").trim()||"download"}function dc(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 vi(e){const t=lc(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 fc(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=xi(t),r.rel="noopener noreferrer",r.style.display="none",document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}function hc(e){const t=document.createElement("a");t.href=vi(e),t.rel="noopener noreferrer",t.style.display="none",document.body.appendChild(t),t.click(),t.remove()}function ln(e){const t=String(e.fileId??"").trim();if(t)return Uu(t);const n=String(e.url??"").trim();if(!n)return;const r=wi(n);if(r)return Uu(r);if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/"))return n}async function Vr(e,t){const n=xi(t),r=vi(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=dc(o.headers.get("Content-Disposition"))??n;fc(u,a)}catch{hc(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 ke(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 Ai(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Pr(e){return e?typeof e!="string"?e:Ai(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 ki(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(m=>clearInterval(m)),a=[]},c=()=>{f(),u.value={},s.clear()},h=()=>{f(),u.value={},s.clear()},p=()=>{const m=e();if(!m||Object.keys(m).length===0){u.value={};return}if(!d()){u.value={...m},s=new Set(Object.keys(m));return}const x=Object.keys(m);x.forEach(b=>{u.value.hasOwnProperty(b)||(u.value[b]="")});const y=x.filter(b=>!s.has(b));if(y.length===0)return;let v=0;const g=()=>{var S;if(v>=y.length)return;const b=y[v],w=m[b];if(!w){s.add(b),v++,g();return}let k=((S=u.value[b])==null?void 0:S.length)||0;const D=setInterval(()=>{k<w.length?(u.value={...u.value,[b]:w.slice(0,k+1)},k++):(clearInterval(D),a=a.filter(_=>_!==D),s.add(b),v++,g())},o);a.push(D)};g()};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:u}}function Rr(){const e=i.reactive({}),t=[],n=i.ref(null);let r=null;const o=30,u=m=>{const x=e[m];return!x||x.displayedLength>=x.rawValue.length},a=i.computed(()=>Object.keys(e).length===0?!1:Object.keys(e).every(m=>u(m))),s=()=>{for(const m of t)if(!u(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=()=>{r&&(clearInterval(r),r=null)},f=()=>{r||(r=setInterval(l,o))},c=()=>{d(),Object.keys(e).forEach(m=>{delete e[m]}),t.length=0,n.value=null},h=(m,x)=>{if(e[m]){p(m,x);return}t.push(m),e[m]={rawValue:x??"",displayedLength:0,isStreaming:!1,displayedValue:""},r||(!n.value||n.value===m)&&f()},p=(m,x)=>{const y=e[m];if(!y){h(m,x);return}y.rawValue=x??"",!r&&!u(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 Wu(){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}}}const mc={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 pc(e){return e?e.startsWith("mcp:")?"tool_mcp":mc[e]??"thinking_tool":"thinking_tool"}function Gu(){return{getToolIconClass:pc}}function gc(e){return e.scrollWidth>e.clientWidth}function Ci(){gc(this)?this.title=this.textContent??"":this.removeAttribute("title")}function _i(){this.removeAttribute("title")}const Ei={mounted(e){e.addEventListener("mouseenter",Ci),e.addEventListener("mouseleave",_i)},updated(e){e.removeAttribute("title")},unmounted(e){e.removeEventListener("mouseenter",Ci),e.removeEventListener("mouseleave",_i)}};function bc(e,t){const n=i.computed(()=>{var o;return ke({},(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 yc(e,t){var u;const n=i.ref(((u=e.content)==null?void 0:u.sender)??"发送人"),r=i.computed(()=>{var a;return ke({},(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 wc={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},xc={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 vc(){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 Si=i.defineComponent({name:"FXBubbleAttachment",props:xc,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}=vc(),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,v){t.emit("preview",v)}async function d(y,v){y.stopPropagation(),y.preventDefault();const g=ln(v);g&&await Vr(g,v.name)}function f(y){y.stopPropagation(),y.preventDefault(),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 v=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),v&&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 m(y,v){const g=ln(y);return i.createVNode("div",{class:"f-chat-bubble-attachment-item",key:v,onClick:b=>l(b,y)},[i.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation"},[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&&g?i.createVNode("button",{type:"button",class:"f-chat-bubble-attachment-download-btn","aria-label":"下载附件",title:"下载",onClick:b=>d(b,y)},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_download","aria-hidden":"true"},null)]):null])}function x(y,v){return i.createVNode("div",{class:"f-chat-bubble-attachment-toast",key:v},[p(y)])}return()=>r.value?i.createVNode("div",{class:{"f-chat-bubble-attachments":!0,"attachments-toast":e.role==="user"}},[n.value.map((y,v)=>e.role==="user"?x(y,v):m(y,v)),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}}),Ac=i.defineComponent({name:"FXBubbleFileContentFooter",props:wc,setup(e,t){const n=i.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return ke({},e.customStyle),()=>i.createVNode(Si,{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)}}),kc={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},Cc=i.defineComponent({name:"FXBubblePageContentFooter",props:kc,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 Di(){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(Ac,a)}function r(o,u){const a=t(o,u);return i.h(Cc,a)}return{renderFileEmbeddedContent:n,renderPageEmbeddedContent:r}}const _c={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}},Xu="assistant-widget",st="```";function zn(e,t){let n=t;for(;n<e.length&&/\s/.test(e[n]);)n+=1;return n}function Fi(e,t){let n=t;for(;n<e.length&&/[a-zA-Z0-9-]/.test(e[n]);)n+=1;return{lang:e.slice(t,n),next:n}}function Ti(e){const t=e.toLowerCase();return t.length===0||t.length>Xu.length?!1:Xu.startsWith(t)}function Ec(e){return e.toLowerCase()===Xu}function Sc(e,t){let n=0;for(;n<t;){const r=e.indexOf(st,n);if(r===-1||r>=t)break;let o=r+st.length;o=zn(e,o);const{lang:u}=Fi(e,o);if(u.length>0)return!0;n=r+st.length}return!1}function Ni(e,t){if(!e.startsWith(st,t))return null;let n=t+st.length;n=zn(e,n);const{lang:r,next:o}=Fi(e,n);return r.length===0?e.slice(o).trim().length===0?Sc(e,t)?null:{fenceStart:t,bodyStart:o,langComplete:!1}:null:Ti(r)?(n=zn(e,o),{fenceStart:t,bodyStart:n,langComplete:Ec(r)}):null}function qu(e,t=0){const n=zn(e,t);return Ni(e,n)}function Dc(e,t,n){if(t<n)return!1;const r=e.slice(t+st.length);return r.length===0?!0:r.startsWith("`")?!1:(/^\s*[\r\n]/.test(r)||/^\s*$/.test(r),!0)}function Mr(e,t){let n=t;for(;n<=e.length;){const r=e.indexOf(st,n);if(r===-1)return-1;if(Dc(e,r,t))return r;n=r+1}return-1}function Fc(e){const t=qu(e,0);if(!(t!=null&&t.langComplete))return null;const n=Mr(e,t.bodyStart);return n===-1?null:e.slice(t.bodyStart,n).trim()}function Ii(e){return e.replace(/```\s*assistant-widget\s*/gi,"``` assistant-widget\n")}function Tc(e){const t=e.match(/^\s*```\s*([a-zA-Z0-9-]*)$/);return t?Ti(t[1]??""):!1}function Nc(e,t){let n=t;for(;n<e.length;){const r=e.indexOf(st,n);if(r===-1)return null;const o=Ni(e,r);if(o)return{fenceIdx:r,open:o};n=r+st.length}return null}function Oi(e){if(!e)return!1;const t=qu(e,0);if(!(t!=null&&t.langComplete))return!1;const n=Mr(e,t.bodyStart);return n===-1?!1:zn(e,n+st.length)>=e.length}function Ic(e){if(!e)return!1;if(Oi(e)||Tc(e))return!0;const t=qu(e,0);return t?t.langComplete?Mr(e,t.bodyStart)===-1:!0:!1}function Oc(e){if(!e)return[];const t=[];let n=0;for(;n<e.length;){const r=Nc(e,n);if(!r){const l=e.slice(n);l&&t.push(l);break}const{fenceIdx:o,open:u}=r;if(o>n&&t.push(e.slice(n,o)),!u.langComplete){t.push(e.slice(o));break}const a=Mr(e,u.bodyStart);if(a===-1){t.push(e.slice(o));break}const s=a+st.length;t.push(Ii(e.slice(o,s))),n=s}return t.filter(r=>r.trim().length>0)}function Li(e){const t=Fc(Ii(e.trim()));if(t==null||t==="")return null;try{return JSON.parse(t)}catch(n){return console.error("Failed to parse JSON:",n),null}}function Lc(e){var n;const t=Li(e);return((n=t==null?void 0:t.renderer)==null?void 0:n.widgetImplOptions)||{}}const Vc=/^```\s*dynamic-component[\s\S]*?```$/,Pc=/^```\s*dynamic-component/;function Rc(e){return e.replace(/```\s*\n*\s*dynamic-component/g,"``` dynamic-component")}function Mc(e){return e?Vc.test(e)||Pc.test(e):!1}function Bc(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 zc(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 jc(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 p=e.slice(o);p&&r.push(p);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(Rc(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 Hc(e){var o;if(!e)return[];const t=[],n=new Set,r=Oc(e);for(const u of r)if(Ic(u))if(Oi(u)){const a=Li(u);t.push({type:Le.AssistantWidgetComplete,raw:u,widgetData:a,widgetUrl:(o=a==null?void 0:a.renderer)==null?void 0:o.url,widgetImplOptions:Lc(u)})}else t.push({type:Le.AssistantWidgetPending,raw:u});else{const a=jc(u);for(const s of a)if(Mc(s))if(s.endsWith("```")){const l=Bc(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=zc(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 Vi={};function $c(e){let t=Vi[e];if(t)return t;t=Vi[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 cn(e,t){typeof t!="string"&&(t=cn.defaultChars);const n=$c(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})}cn.defaultChars=";/?:@&=+$,#",cn.componentChars="";const Pi={};function Uc(e){let t=Pi[e];if(t)return t;t=Pi[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 jn(e,t,n){typeof t!="string"&&(n=t,t=jn.defaultChars),typeof n>"u"&&(n=!0);const r=Uc(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}jn.defaultChars=";/?:@&=+$,-_.!~*'()#",jn.componentChars="-_.!~*'()";function Zu(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 Br(){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 Wc=/^([a-z0-9.+-]+:)/i,Gc=/:[0-9]*$/,Xc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,qc=["<",">",'"',"`"," ","\r",`
|
|
2
|
+
`," "],Zc=["{","}","|","\\","^","`"].concat(qc),Yc=["'"].concat(Zc),Ri=["%","/","?",";","#"].concat(Yc),Mi=["/","?","#"],Kc=255,Bi=/^[+a-z0-9A-Z_-]{0,63}$/,Qc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,zi={javascript:!0,"javascript:":!0},ji={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Yu(e,t){if(e&&e instanceof Br)return e;const n=new Br;return n.parse(e,t),n}Br.prototype.parse=function(e,t){let n,r,o,u=e;if(u=u.trim(),!t&&e.split("#").length===1){const d=Xc.exec(u);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let a=Wc.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&&zi[a])&&(u=u.substr(2),this.slashes=!0)),!zi[a]&&(o||a&&!ji[a])){let d=-1;for(let m=0;m<Mi.length;m++)r=u.indexOf(Mi[m]),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 m=0;m<Ri.length;m++)r=u.indexOf(Ri[m]),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 p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const m=this.hostname.split(/\./);for(let x=0,y=m.length;x<y;x++){const v=m[x];if(v&&!v.match(Bi)){let g="";for(let b=0,w=v.length;b<w;b++)v.charCodeAt(b)>127?g+="x":g+=v[b];if(!g.match(Bi)){const b=m.slice(0,x),w=m.slice(x+1),k=v.match(Qc);k&&(b.push(k[1]),w.unshift(k[2])),w.length&&(u=w.join(".")+u),this.hostname=b.join(".");break}}}}this.hostname.length>Kc&&(this.hostname=""),p&&(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),ji[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Br.prototype.parseHost=function(e){let t=Gc.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 Jc=Object.freeze(Object.defineProperty({__proto__:null,decode:cn,encode:jn,format:Zu,parse:Yu},Symbol.toStringTag,{value:"Module"})),Hi=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$i=/[\0-\x1F\x7F-\x9F]/,ed=/[\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]/,Ku=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,Ui=/[\$\+<->\^`\|~\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]/,Wi=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,td=Object.freeze(Object.defineProperty({__proto__:null,Any:Hi,Cc:$i,Cf:ed,P:Ku,S:Ui,Z:Wi},Symbol.toStringTag,{value:"Module"})),nd=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))),rd=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Qu;const ud=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]]),od=(Qu=String.fromCodePoint)!==null&&Qu!==void 0?Qu: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 id(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=ud.get(e))!==null&&t!==void 0?t:e}var Ee;(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"})(Ee||(Ee={}));const ad=32;var Mt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Mt||(Mt={}));function Ju(e){return e>=Ee.ZERO&&e<=Ee.NINE}function sd(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_F||e>=Ee.LOWER_A&&e<=Ee.LOWER_F}function ld(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_Z||e>=Ee.LOWER_A&&e<=Ee.LOWER_Z||Ju(e)}function cd(e){return e===Ee.EQUALS||ld(e)}var Se;(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"})(Se||(Se={}));var Bt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Bt||(Bt={}));class dd{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Se.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bt.Strict}startEntity(t){this.decodeMode=t,this.state=Se.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Se.EntityStart:return t.charCodeAt(n)===Ee.NUM?(this.state=Se.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Se.NamedEntity,this.stateNamedEntity(t,n));case Se.NumericStart:return this.stateNumericStart(t,n);case Se.NumericDecimal:return this.stateNumericDecimal(t,n);case Se.NumericHex:return this.stateNumericHex(t,n);case Se.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ad)===Ee.LOWER_X?(this.state=Se.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Se.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(Ju(o)||sd(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(Ju(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===Ee.SEMI)this.consumed+=1;else if(this.decodeMode===Bt.Strict)return 0;return this.emitCodePoint(id(this.result),this.consumed),this.errors&&(t!==Ee.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&Mt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=fd(r,o,this.treeIndex+Math.max(1,u),a),this.treeIndex<0)return this.result===0||this.decodeMode===Bt.Attribute&&(u===0||cd(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&Mt.VALUE_LENGTH)>>14,u!==0){if(a===Ee.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Bt.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]&Mt.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]&~Mt.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Se.NamedEntity:return this.result!==0&&(this.decodeMode!==Bt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Se.NumericDecimal:return this.emitNumericEntity(0,2);case Se.NumericHex:return this.emitNumericEntity(0,3);case Se.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Se.EntityStart:return 0}}}function Gi(e){let t="";const n=new dd(e,r=>t+=od(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 fd(e,t,n,r){const o=(t&Mt.BRANCH_LENGTH)>>7,u=t&Mt.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 hd=Gi(nd);Gi(rd);function Xi(e,t=Bt.Legacy){return hd(e,t)}function md(e){return Object.prototype.toString.call(e)}function eo(e){return md(e)==="[object String]"}const pd=Object.prototype.hasOwnProperty;function gd(e,t){return pd.call(e,t)}function zr(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 qi(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function to(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 jr(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 Zi=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,bd=/&([a-z#][a-z0-9]{1,31});/gi,yd=new RegExp(Zi.source+"|"+bd.source,"gi"),wd=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function xd(e,t){if(t.charCodeAt(0)===35&&wd.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return to(r)?jr(r):e}const n=Xi(e);return n!==e?n:e}function vd(e){return e.indexOf("\\")<0?e:e.replace(Zi,"$1")}function dn(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(yd,function(t,n,r){return n||xd(t,r)})}const Ad=/[&<>"]/,kd=/[&<>"]/g,Cd={"&":"&","<":"<",">":">",'"':"""};function _d(e){return Cd[e]}function zt(e){return Ad.test(e)?e.replace(kd,_d):e}const Ed=/[.?*+^$[\]\\(){}|-]/g;function Sd(e){return e.replace(Ed,"\\$&")}function ce(e){switch(e){case 9:case 32:return!0}return!1}function Hn(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 $n(e){return Ku.test(e)||Ui.test(e)}function Un(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 Hr(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const Dd=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:qi,assign:zr,escapeHtml:zt,escapeRE:Sd,fromCodePoint:jr,has:gd,isMdAsciiPunct:Un,isPunctChar:$n,isSpace:ce,isString:eo,isValidEntityCode:to,isWhiteSpace:Hn,lib:{mdurl:Jc,ucmicro:td},normalizeReference:Hr,unescapeAll:dn,unescapeMd:vd},Symbol.toStringTag,{value:"Module"}));function Fd(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 Td(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=dn(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=dn(e.slice(t,o)),u.pos=o,u.ok=!0),u}function Nd(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+=dn(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+=dn(e.slice(t,u)),a}const Id=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:Td,parseLinkLabel:Fd,parseLinkTitle:Nd},Symbol.toStringTag,{value:"Module"})),xt={};xt.code_inline=function(e,t,n,r,o){const u=e[t];return"<code"+o.renderAttrs(u)+">"+zt(u.content)+"</code>"},xt.code_block=function(e,t,n,r,o){const u=e[t];return"<pre"+o.renderAttrs(u)+"><code>"+zt(e[t].content)+`</code></pre>
|
|
3
|
+
`},xt.fence=function(e,t,n,r,o){const u=e[t],a=u.info?dn(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)||zt(u.content):d=zt(u.content),d.indexOf("<pre")===0)return d+`
|
|
4
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
5
|
`}return`<pre><code${o.renderAttrs(u)}>${d}</code></pre>
|
|
6
|
-
`},
|
|
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
|
-
`},
|
|
11
|
+
`},xt.text=function(e,t){return zt(e[t].content)},xt.html_block=function(e,t){return e[t].content},xt.html_inline=function(e,t){return e[t].content};function fn(){this.rules=zr({},xt)}fn.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+zt(t.attrs[n][0])+'="'+zt(t.attrs[n][1])+'"';return o},fn.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
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
13
|
`:">",u},fn.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},fn.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},fn.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
|
|
15
|
-
`),t=t.replace(Od,"�"),e.src=t}function Vd(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 Pd(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 Rd(e){return/^<a[>\s]/i.test(e)}function Md(e){return/^<\/a\s*>/i.test(e)}function Bd(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"&&(Rd(s.content)&&u>0&&u--,Md(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,x=e.md.normalizeLink(p);if(!e.md.validateLink(x))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",x]],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 w=new e.Token("link_close","a",-1);w.level=--c,w.markup="linkify",w.info="auto",f.push(w),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=Xi(o,a,f)}}}}const Yi=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,zd=/\((c|tm|r)\)/i,jd=/\((c|tm|r)\)/ig,Hd={c:"©",r:"®",tm:"™"};function $d(e,t){return Hd[t.toLowerCase()]}function Ud(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(jd,$d)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Wd(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Yi.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 Gd(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(zd.test(e.tokens[t].content)&&Ud(e.tokens[t].children),Yi.test(e.tokens[t].content)&&Wd(e.tokens[t].children))}const Xd=/['"]/,Ki=/['"]/g,Qi="’";function $r(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function qd(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;){Ki.lastIndex=l;const f=Ki.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 x=32;if(l<d)x=s.charCodeAt(l);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){x=e[n].content.charCodeAt(0);break}const y=$n(p)||Hn(String.fromCharCode(p)),A=$n(x)||Hn(String.fromCharCode(x)),b=jn(p),g=jn(x);if(g?c=!1:A&&(b||y||(c=!1)),b?h=!1:y&&(g||A||(h=!1)),x===34&&f[0]==='"'&&p>=48&&p<=57&&(h=c=!1),c&&h&&(c=y,h=A),!c&&!h){m&&(u.content=$r(u.content,f.index,Qi));continue}if(h)for(n=r.length-1;n>=0;n--){let w=r[n];if(r[n].level<a)break;if(w.single===m&&r[n].level===a){w=r[n];let k,D;m?(k=t.md.options.quotes[2],D=t.md.options.quotes[3]):(k=t.md.options.quotes[0],D=t.md.options.quotes[1]),u.content=$r(u.content,f.index,D),e[w.token].content=$r(e[w.token].content,w.pos,k),l+=D.length-1,w.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=$r(u.content,f.index,Qi))}}}function Zd(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!Xd.test(e.tokens[t].content)||qd(e.tokens[t].children,e)}function Yd(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 no=[["normalize",Ld],["block",Vd],["inline",Pd],["linkify",Bd],["replacements",Gd],["smartquotes",Zd],["text_join",Yd]];function ro(){this.ruler=new We;for(let e=0;e<no.length;e++)this.ruler.push(no[e][0],no[e][1])}ro.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},ro.prototype.State=Zi;function xt(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}xt.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},xt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},xt.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},xt.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},xt.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ce(this.src.charCodeAt(--t)))return t+1;return t},xt.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t},xt.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},xt.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("")},xt.prototype.Token=st;const Kd=65536;function uo(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Ji(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 Qd(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 w=e.src.charCodeAt(u);if(w!==124&&w!==45&&w!==58&&!ce(w))return!1;u++}let l=uo(e,t+1),d=l.split("|");const f=[];for(let w=0;w<d.length;w++){const k=d[w].trim();if(!k){if(w===0||w===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=uo(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(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),x=[t,0];p.map=x;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 w=0;w<d.length;w++){const k=e.push("th_open","th",1);f[w]&&(k.attrs=[["style","text-align:"+f[w]]]);const D=e.push("inline","",0);D.content=d[w].trim(),D.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 w=!1;for(let D=0,S=m.length;D<S;D++)if(m[D](e,o,n,!0)){w=!0;break}if(w||(l=uo(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>Kd))break;if(o===t+2){const D=e.push("tbody_open","tbody",1);D.map=b=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let D=0;D<c;D++){const S=e.push("td_open","td",1);f[D]&&(S.attrs=[["style","text-align:"+f[D]]]);const _=e.push("inline","",0);_.content=d[D]?d[D].trim():"",_.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),x[1]=o,e.parentType=h,e.line=o,!0}function Jd(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 e0(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 t0(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,D,S;e.src.charCodeAt(o)===32?(o++,k++,S=!1,D=!0):e.src.charCodeAt(o)===9?(D=!0,(e.bsCount[p]+k)%4===3?(o++,k++,S=!1):S=!0):D=!1;let _=k;for(s.push(e.bMarks[p]),e.bMarks[p]=o;o<u;){const X=e.src.charCodeAt(o);if(ce(X))X===9?_+=4-(_+e.bsCount[p]+(S?1:0))%4:_++;else break;o++}m=o>=u,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(D?1:0),d.push(e.sCount[p]),e.sCount[p]=_-k,f.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(m)break;let w=!1;for(let k=0,D=c.length;k<D;k++)if(c[k](e,p,n,!0)){w=!0;break}if(w){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 x=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=x,!0}function n0(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 ea(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 ta(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 r0(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 u0(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=ta(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=ea(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),x=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 w=e.sCount[l]+m-(e.bMarks[l]+e.tShift[l]);let k=w;for(;u<o;){const G=e.src.charCodeAt(u);if(G===9)k+=4-(k+e.bsCount[l])%4;else if(G===32)k++;else break;u++}const D=u;let S;D>=o?S=1:S=k-w,S>4&&(S=1);const _=w+S;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 j=e.tight,B=e.tShift[l],H=e.sCount[l],I=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[l]=D-e.bMarks[l],e.sCount[l]=k,D>=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]=H,e.tight=j,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 G=0,T=b.length;G<T;G++)if(b[G](e,l,n,!0)){W=!0;break}if(W)break;if(c){if(m=ta(e,l),m<0)break;a=e.bMarks[l]+e.tShift[l]}else if(m=ea(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&&r0(e,x),!0}function o0(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 w=!1;if(e.sCount[b]-e.blkIndent>3&&(w=!0),e.sCount[b]<0&&(w=!0),!w){const S=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let X=!1;for(let j=0,B=S.length;j<B;j++)if(S[j](e,b,g,!0)){X=!0;break}if(e.parentType=_,X)return null}const k=e.bMarks[b]+e.tShift[b],D=e.eMarks[b];return e.src.slice(k,D+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 x=e.md.helpers.parseLinkTitle(l,o,u);for(;x.can_continue;){const b=s(a);if(b===null)break;l+=b,o=u,u=l.length,a++,x=e.md.helpers.parseLinkTitle(l,o,u,x)}let y;for(o<u&&p!==o&&x.ok?(y=x.str,o=x.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=Hr(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 i0=["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"],a0="[a-zA-Z_:][a-zA-Z0-9:._-]*",s0="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",na="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+a0+"(?:\\s*=\\s*"+s0+")?)")+"*\\s*\\/?>",ra="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",l0="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",c0="<[?][\\s\\S]*?[?]>",d0="<![A-Za-z][^>]*>",f0="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",h0=new RegExp("^(?:"+na+"|"+ra+"|"+l0+"|"+c0+"|"+d0+"|"+f0+")"),p0=new RegExp("^(?:"+na+"|"+ra+")"),hn=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+i0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(p0.source+"\\s*$"),/^$/,!1]];function m0(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<hn.length&&!hn[s][0].test(a);s++);if(s===hn.length)return!1;if(r)return hn[s][2];let l=t+1;if(!hn[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),hn[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 g0(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 b0(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 y0(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 Ur=[["table",Qd,["paragraph","reference"]],["code",Jd],["fence",e0,["paragraph","reference","blockquote","list"]],["blockquote",t0,["paragraph","reference","blockquote","list"]],["hr",n0,["paragraph","reference","blockquote","list"]],["list",u0,["paragraph","reference","blockquote"]],["reference",o0],["html_block",m0,["paragraph","reference","blockquote"]],["heading",g0,["paragraph","reference","blockquote"]],["lheading",b0],["paragraph",y0]];function Wr(){this.ruler=new We;for(let e=0;e<Ur.length;e++)this.ruler.push(Ur[e][0],Ur[e][1],{alt:(Ur[e][2]||[]).slice()})}Wr.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)}},Wr.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)},Wr.prototype.State=xt;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 w0(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 x0(e,t){let n=e.pos;for(;n<e.posMax&&!w0(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const v0=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function A0(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(v0);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 k0(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 oo=[];for(let e=0;e<256;e++)oo.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){oo[e.charCodeAt(0)]=1});function C0(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&&oo[o]!==0?s.content=u:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function _0(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 E0(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 ua(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 S0(e){const t=e.tokens_meta,n=e.tokens_meta.length;ua(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ua(e,t[r].delimiters)}const oa={tokenize:E0,postProcess:S0};function D0(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 ia(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 F0(e){const t=e.tokens_meta,n=e.tokens_meta.length;ia(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ia(e,t[r].delimiters)}const aa={tokenize:D0,postProcess:F0};function T0(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[Hr(r)],!u)return e.pos=f,!1;a=u.href,s=u.title}if(!t){e.pos=h,e.posMax=m;const x=e.push("link_open","a",1),y=[["href",a]];x.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 N0(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[Hr(o)],!a)return e.pos=c,!1;f=a.href,l=a.title}if(!t){r=e.src.slice(m,p);const x=[];e.md.inline.parse(r,e.md,e.env,x);const y=e.push("image","img",0),A=[["src",f],["alt",""]];y.attrs=A,y.children=x,y.content=r,l&&A.push(["title",l])}return e.pos=u,e.posMax=h,!0}const I0=/^([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])?)*)$/,O0=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function L0(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(O0.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(I0.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 V0(e){return/^<a[>\s]/i.test(e)}function P0(e){return/^<\/a\s*>/i.test(e)}function R0(e){const t=e|32;return t>=97&&t<=122}function M0(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&&!R0(o))return!1;const u=e.src.slice(r).match(h0);if(!u)return!1;if(!t){const a=e.push("html_inline","",0);a.content=u[0],V0(a.content)&&e.linkLevel++,P0(a.content)&&e.linkLevel--}return e.pos+=u[0].length,!0}const B0=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,z0=/^&([a-z][a-z0-9]{1,31});/i;function j0(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(B0);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=to(a)?jr(a):jr(65533),s.markup=u[0],s.info="entity"}return e.pos+=u[0].length,!0}}else{const u=e.src.slice(n).match(z0);if(u){const a=Gi(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 sa(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 H0(e){const t=e.tokens_meta,n=e.tokens_meta.length;sa(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&sa(t[r].delimiters)}function $0(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 io=[["text",x0],["linkify",A0],["newline",k0],["escape",C0],["backticks",_0],["strikethrough",oa.tokenize],["emphasis",aa.tokenize],["link",T0],["image",N0],["autolink",L0],["html_inline",M0],["entity",j0]],ao=[["balance_pairs",H0],["strikethrough",oa.postProcess],["emphasis",aa.postProcess],["fragments_join",$0]];function Wn(){this.ruler=new We;for(let e=0;e<io.length;e++)this.ruler.push(io[e][0],io[e][1]);this.ruler2=new We;for(let e=0;e<ao.length;e++)this.ruler2.push(ao[e][0],ao[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 U0(e){const t={};e=e||{},t.src_Any=ji.source,t.src_Cc=Hi.source,t.src_Z=Ui.source,t.src_P=Ku.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 so(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Gr(e){return Object.prototype.toString.call(e)}function W0(e){return Gr(e)==="[object String]"}function G0(e){return Gr(e)==="[object Object]"}function X0(e){return Gr(e)==="[object RegExp]"}function la(e){return Gr(e)==="[object Function]"}function q0(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const ca={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Z0(e){return Object.keys(e||{}).reduce(function(t,n){return t||ca.hasOwnProperty(n)},!1)}const Y0={"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}}},K0="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]",Q0="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function J0(e){e.__index__=-1,e.__text_cache__=""}function ef(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function da(){return function(e,t){t.normalize(e)}}function Xr(e){const t=e.re=U0(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(K0),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,G0(l)){X0(l.validate)?d.validate=ef(l.validate):la(l.validate)?d.validate=l.validate:u(s,l),la(l.normalize)?d.normalize=l.normalize:l.normalize?u(s,l):d.normalize=da();return}if(W0(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:da()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(q0).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"),J0(e)}function tf(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 lo(e,t){const n=new tf(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||Z0(e)&&(t=e,e={}),this.__opts__=so({},ca,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=so({},Y0,e),this.__compiled__={},this.__tlds__=Q0,this.__tlds_replaced__=!1,this.re={},Xr(this)}qe.prototype.add=function(t,n){return this.__schemas__[t]=n,Xr(this),this},qe.prototype.set=function(t){return this.__opts__=so(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(lo(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(lo(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,lo(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(),Xr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Xr(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 pn=2147483647,vt=36,co=1,Gn=26,nf=38,rf=700,fa=72,ha=128,pa="-",uf=/^xn--/,of=/[^\0-\x7F]/,af=/[\x2E\u3002\uFF0E\uFF61]/g,sf={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},fo=vt-co,At=Math.floor,ho=String.fromCharCode;function jt(e){throw new RangeError(sf[e])}function lf(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function ma(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(af,".");const o=e.split("."),u=lf(o,t).join(".");return r+u}function ga(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 cf=e=>String.fromCodePoint(...e),df=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:vt},ba=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ya=function(e,t,n){let r=0;for(e=n?At(e/rf):e>>1,e+=At(e/t);e>fo*Gn>>1;r+=vt)e=At(e/fo);return At(r+(fo+1)*e/(e+nf))},wa=function(e){const t=[],n=e.length;let r=0,o=ha,u=fa,a=e.lastIndexOf(pa);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&jt("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&&jt("invalid-input");const h=df(e.charCodeAt(s++));h>=vt&&jt("invalid-input"),h>At((pn-r)/f)&&jt("overflow"),r+=h*f;const m=c<=u?co:c>=u+Gn?Gn:c-u;if(h<m)break;const p=vt-m;f>At(pn/p)&&jt("overflow"),f*=p}const d=t.length+1;u=ya(r-l,d,l==0),At(r/d)>pn-o&&jt("overflow"),o+=At(r/d),r%=d,t.splice(r++,0,o)}return String.fromCodePoint(...t)},xa=function(e){const t=[];e=ga(e);const n=e.length;let r=ha,o=0,u=fa;for(const l of e)l<128&&t.push(ho(l));const a=t.length;let s=a;for(a&&t.push(pa);s<n;){let l=pn;for(const f of e)f>=r&&f<l&&(l=f);const d=s+1;l-r>At((pn-o)/d)&&jt("overflow"),o+=(l-r)*d,r=l;for(const f of e)if(f<r&&++o>pn&&jt("overflow"),f===r){let c=o;for(let h=vt;;h+=vt){const m=h<=u?co:h>=u+Gn?Gn:h-u;if(c<m)break;const p=c-m,x=vt-m;t.push(ho(ba(m+p%x,0))),c=At(p/x)}t.push(ho(ba(c,0))),u=ya(o,d,s===a),o=0,++s}++o,++r}return t.join("")},va={version:"2.3.1",ucs2:{decode:ga,encode:cf},decode:wa,encode:xa,toASCII:function(e){return ma(e,function(t){return of.test(t)?"xn--"+xa(t):t})},toUnicode:function(e){return ma(e,function(t){return uf.test(t)?wa(t.slice(4).toLowerCase()):t})}},ff={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"]}}}},hf=/^(vbscript|javascript|file|data):/,pf=/^data:image\/(gif|png|jpeg|webp);/;function mf(e){const t=e.trim().toLowerCase();return hf.test(t)?pf.test(t):!0}const Aa=["http:","https:","mailto:"];function gf(e){const t=Yu(e,!0);if(t.hostname&&(!t.protocol||Aa.indexOf(t.protocol)>=0))try{t.hostname=va.toASCII(t.hostname)}catch{}return zn(Zu(t))}function bf(e){const t=Yu(e,!0);if(t.hostname&&(!t.protocol||Aa.indexOf(t.protocol)>=0))try{t.hostname=va.toUnicode(t.hostname)}catch{}return cn(Zu(t),cn.defaultChars+"%")}function Ze(e,t){if(!(this instanceof Ze))return new Ze(e,t);t||eo(e)||(t=e||{},e="default"),this.inline=new Wn,this.block=new Wr,this.core=new ro,this.renderer=new fn,this.linkify=new qe,this.validateLink=mf,this.normalizeLink=gf,this.normalizeLinkText=bf,this.utils=Sd,this.helpers=zr({},Nd),this.options={},this.configure(e),t&&this.set(t)}Ze.prototype.set=function(e){return zr(this.options,e),this},Ze.prototype.configure=function(e){const t=this;if(eo(e)){const n=e;if(e=ff[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:ka,setPrototypeOf:Ca,isFrozen:yf,getPrototypeOf:wf,getOwnPropertyDescriptor:xf}=Object;let{freeze:ze,seal:ut,create:qr}=Object,{apply:po,construct:mo}=typeof Reflect<"u"&&Reflect;ze||(ze=function(t){return t}),ut||(ut=function(t){return t}),po||(po=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)}),mo||(mo=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 Zr=He(Array.prototype.forEach),vf=He(Array.prototype.lastIndexOf),_a=He(Array.prototype.pop),Xn=He(Array.prototype.push),Af=He(Array.prototype.splice),Yr=He(String.prototype.toLowerCase),go=He(String.prototype.toString),bo=He(String.prototype.match),qn=He(String.prototype.replace),kf=He(String.prototype.indexOf),Cf=He(String.prototype.trim),Ye=He(Object.prototype.hasOwnProperty),je=He(RegExp.prototype.test),Zn=_f(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 po(e,t,r)}}function _f(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mo(e,n)}}function oe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yr;Ca&&Ca(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const u=n(o);u!==o&&(yf(t)||(t[r]=u),o=u)}e[o]=!0}return e}function Ef(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function kt(e){const t=qr(null);for(const[n,r]of ka(e))Ye(e,n)&&(Array.isArray(r)?t[n]=Ef(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=xf(e,t);if(r){if(r.get)return He(r.get);if(typeof r.value=="function")return He(r.value)}e=wf(e)}function n(){return null}return n}const Ea=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"]),yo=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"]),wo=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"]),xo=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"]),Df=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Sa=ze(["#text"]),Da=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"]),vo=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"]),Fa=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"]),Kr=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ff=ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tf=ut(/<%[\w\W]*|[\w\W]*%>/gm),Nf=ut(/\$\{[\w\W]*/gm),If=ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),Of=ut(/^aria-[\-\w]+$/),Ta=ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Lf=ut(/^(?:\w+script|data):/i),Vf=ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Na=ut(/^html$/i),Pf=ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ia=Object.freeze({__proto__:null,ARIA_ATTR:Of,ATTR_WHITESPACE:Vf,CUSTOM_ELEMENT:Pf,DATA_ATTR:If,DOCTYPE_NAME:Na,ERB_EXPR:Tf,IS_ALLOWED_URI:Ta,IS_SCRIPT_OR_DATA:Lf,MUSTACHE_EXPR:Ff,TMPLIT_EXPR:Nf});const Kn={element:1,text:3,progressingInstruction:7,comment:8,document:9},Rf=function(){return typeof window>"u"?null:window},Mf=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}},Oa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function La(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rf();const t=te=>La(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,x=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 w,k="";const{implementation:D,createNodeIterator:S,createDocumentFragment:_,getElementsByTagName:X}=n,{importNode:j}=r;let B=Oa();t.isSupported=typeof ka=="function"&&typeof g=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:I,TMPLIT_EXPR:W,DATA_ATTR:G,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:C,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:P}=Ia;let{IS_ALLOWED_URI:M}=Ia,z=null;const N=oe({},[...Ea,...yo,...wo,...xo,...Sa]);let V=null;const L=oe({},[...Da,...vo,...Fa,...Kr]);let O=Object.seal(qr(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}})),U=null,J=null;const Y=Object.seal(qr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let K=!0,re=!0,ae=!1,ve=!0,Te=!1,yt=!0,Me=!1,Ln=!1,qt=!1,Ot=!1,Lu=!1,Vu=!1,jl=!0,Hl=!1;const n2="user-content-";let ii=!0,Tr=!1,Vn={},Ft=null;const ai=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 $l=null;const Ul=oe({},["audio","video","img","source","image","track"]);let si=null;const Wl=oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pu="http://www.w3.org/1998/Math/MathML",Ru="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let Pn=Lt,li=!1,ci=null;const r2=oe({},[Pu,Ru,Lt],go);let Mu=oe({},["mi","mo","mn","ms","mtext"]),Bu=oe({},["annotation-xml"]);const u2=oe({},["title","style","font","a","script"]);let Nr=null;const o2=["application/xhtml+xml","text/html"],i2="text/html";let _e=null,Rn=null;const a2=n.createElement("form"),Gl=function(E){return E instanceof RegExp||E instanceof Function},di=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),Nr=o2.indexOf(E.PARSER_MEDIA_TYPE)===-1?i2:E.PARSER_MEDIA_TYPE,_e=Nr==="application/xhtml+xml"?go:Yr,z=Ye(E,"ALLOWED_TAGS")?oe({},E.ALLOWED_TAGS,_e):N,V=Ye(E,"ALLOWED_ATTR")?oe({},E.ALLOWED_ATTR,_e):L,ci=Ye(E,"ALLOWED_NAMESPACES")?oe({},E.ALLOWED_NAMESPACES,go):r2,si=Ye(E,"ADD_URI_SAFE_ATTR")?oe(kt(Wl),E.ADD_URI_SAFE_ATTR,_e):Wl,$l=Ye(E,"ADD_DATA_URI_TAGS")?oe(kt(Ul),E.ADD_DATA_URI_TAGS,_e):Ul,Ft=Ye(E,"FORBID_CONTENTS")?oe({},E.FORBID_CONTENTS,_e):ai,U=Ye(E,"FORBID_TAGS")?oe({},E.FORBID_TAGS,_e):kt({}),J=Ye(E,"FORBID_ATTR")?oe({},E.FORBID_ATTR,_e):kt({}),Vn=Ye(E,"USE_PROFILES")?E.USE_PROFILES:!1,K=E.ALLOW_ARIA_ATTR!==!1,re=E.ALLOW_DATA_ATTR!==!1,ae=E.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=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,Lu=E.RETURN_DOM_FRAGMENT||!1,Vu=E.RETURN_TRUSTED_TYPE||!1,qt=E.FORCE_BODY||!1,jl=E.SANITIZE_DOM!==!1,Hl=E.SANITIZE_NAMED_PROPS||!1,ii=E.KEEP_CONTENT!==!1,Tr=E.IN_PLACE||!1,M=E.ALLOWED_URI_REGEXP||Ta,Pn=E.NAMESPACE||Lt,Mu=E.MATHML_TEXT_INTEGRATION_POINTS||Mu,Bu=E.HTML_INTEGRATION_POINTS||Bu,O=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Gl(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(O.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Gl(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(O.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(O.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&(re=!1),Lu&&(Ot=!0),Vn&&(z=oe({},Sa),V=qr(null),Vn.html===!0&&(oe(z,Ea),oe(V,Da)),Vn.svg===!0&&(oe(z,yo),oe(V,vo),oe(V,Kr)),Vn.svgFilters===!0&&(oe(z,wo),oe(V,vo),oe(V,Kr)),Vn.mathMl===!0&&(oe(z,xo),oe(V,Fa),oe(V,Kr))),Ye(E,"ADD_TAGS")||(Y.tagCheck=null),Ye(E,"ADD_ATTR")||(Y.attributeCheck=null),E.ADD_TAGS&&(typeof E.ADD_TAGS=="function"?Y.tagCheck=E.ADD_TAGS:(z===N&&(z=kt(z)),oe(z,E.ADD_TAGS,_e))),E.ADD_ATTR&&(typeof E.ADD_ATTR=="function"?Y.attributeCheck=E.ADD_ATTR:(V===L&&(V=kt(V)),oe(V,E.ADD_ATTR,_e))),E.ADD_URI_SAFE_ATTR&&oe(si,E.ADD_URI_SAFE_ATTR,_e),E.FORBID_CONTENTS&&(Ft===ai&&(Ft=kt(Ft)),oe(Ft,E.FORBID_CONTENTS,_e)),E.ADD_FORBID_CONTENTS&&(Ft===ai&&(Ft=kt(Ft)),oe(Ft,E.ADD_FORBID_CONTENTS,_e)),ii&&(z["#text"]=!0),Me&&oe(z,["html","head","body"]),z.table&&(oe(z,["tbody"]),delete U.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.');w=E.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else w===void 0&&(w=Mf(m,o)),w!==null&&typeof k=="string"&&(k=w.createHTML(""));ze&&ze(E),Rn=E}},Xl=oe({},[...yo,...wo,...Sf]),ql=oe({},[...xo,...Df]),s2=function(E){let $=g(E);(!$||!$.tagName)&&($={namespaceURI:Pn,tagName:"template"});const ee=Yr(E.tagName),ge=Yr($.tagName);return ci[E.namespaceURI]?E.namespaceURI===Ru?$.namespaceURI===Lt?ee==="svg":$.namespaceURI===Pu?ee==="svg"&&(ge==="annotation-xml"||Mu[ge]):!!Xl[ee]:E.namespaceURI===Pu?$.namespaceURI===Lt?ee==="math":$.namespaceURI===Ru?ee==="math"&&Bu[ge]:!!ql[ee]:E.namespaceURI===Lt?$.namespaceURI===Ru&&!Bu[ge]||$.namespaceURI===Pu&&!Mu[ge]?!1:!ql[ee]&&(u2[ee]||!Xl[ee]):!!(Nr==="application/xhtml+xml"&&ci[E.namespaceURI]):!1},Tt=function(E){Xn(t.removed,{element:E});try{g(E).removeChild(E)}catch{y(E)}},sn=function(E,$){try{Xn(t.removed,{attribute:$.getAttributeNode(E),from:$})}catch{Xn(t.removed,{attribute:null,from:$})}if($.removeAttribute(E),E==="is")if(Ot||Lu)try{Tt($)}catch{}else try{$.setAttribute(E,"")}catch{}},Zl=function(E){let $=null,ee=null;if(qt)E="<remove></remove>"+E;else{const Ae=bo(E,/^[\r\n\t ]+/);ee=Ae&&Ae[0]}Nr==="application/xhtml+xml"&&Pn===Lt&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");const ge=w?w.createHTML(E):E;if(Pn===Lt)try{$=new h().parseFromString(ge,Nr)}catch{}if(!$||!$.documentElement){$=D.createDocument(Pn,"template",null);try{$.documentElement.innerHTML=li?k:ge}catch{}}const Be=$.body||$.documentElement;return E&&ee&&Be.insertBefore(n.createTextNode(ee),Be.childNodes[0]||null),Pn===Lt?X.call($,Me?"html":"body")[0]:Me?$.documentElement:Be},Yl=function(E){return S.call(E.ownerDocument||E,E,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},fi=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")},Kl=function(E){return typeof s=="function"&&E instanceof s};function Vt(te,E,$){Zr(te,ee=>{ee.call(t,E,$,Rn)})}const Ql=function(E){let $=null;if(Vt(B.beforeSanitizeElements,E,null),fi(E))return Tt(E),!0;const ee=_e(E.nodeName);if(Vt(B.uponSanitizeElement,E,{tagName:ee,allowedTags:z}),yt&&E.hasChildNodes()&&!Kl(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(!(Y.tagCheck instanceof Function&&Y.tagCheck(ee))&&(!z[ee]||U[ee])){if(!U[ee]&&ec(ee)&&(O.tagNameCheck instanceof RegExp&&je(O.tagNameCheck,ee)||O.tagNameCheck instanceof Function&&O.tagNameCheck(ee)))return!1;if(ii&&!Ft[ee]){const ge=g(E)||E.parentNode,Be=b(E)||E.childNodes;if(Be&&ge){const Ae=Be.length;for(let Xe=Ae-1;Xe>=0;--Xe){const Pt=x(Be[Xe],!0);Pt.__removalCount=(E.__removalCount||0)+1,ge.insertBefore(Pt,A(E))}}}return Tt(E),!0}return E instanceof l&&!s2(E)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&je(/<\/no(script|embed|frames)/i,E.innerHTML)?(Tt(E),!0):(Te&&E.nodeType===Kn.text&&($=E.textContent,Zr([H,I,W],ge=>{$=qn($,ge," ")}),E.textContent!==$&&(Xn(t.removed,{element:E.cloneNode()}),E.textContent=$)),Vt(B.afterSanitizeElements,E,null),!1)},Jl=function(E,$,ee){if(J[$]||jl&&($==="id"||$==="name")&&(ee in n||ee in a2))return!1;if(!(re&&!J[$]&&je(G,$))){if(!(K&&je(T,$))){if(!(Y.attributeCheck instanceof Function&&Y.attributeCheck($,E))){if(!V[$]||J[$]){if(!(ec(E)&&(O.tagNameCheck instanceof RegExp&&je(O.tagNameCheck,E)||O.tagNameCheck instanceof Function&&O.tagNameCheck(E))&&(O.attributeNameCheck instanceof RegExp&&je(O.attributeNameCheck,$)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck($,E))||$==="is"&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&je(O.tagNameCheck,ee)||O.tagNameCheck instanceof Function&&O.tagNameCheck(ee))))return!1}else if(!si[$]){if(!je(M,qn(ee,F,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&E!=="script"&&kf(ee,"data:")===0&&$l[E])){if(!(ae&&!je(C,qn(ee,F,"")))){if(ee)return!1}}}}}}}return!0},ec=function(E){return E!=="annotation-xml"&&bo(E,P)},tc=function(E){Vt(B.beforeSanitizeAttributes,E,null);const{attributes:$}=E;if(!$||fi(E))return;const ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let ge=$.length;for(;ge--;){const Be=$[ge],{name:Ae,namespaceURI:Xe,value:Pt}=Be,Mn=_e(Ae),hi=Pt;let Oe=Ae==="value"?hi:Cf(hi);if(ee.attrName=Mn,ee.attrValue=Oe,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Vt(B.uponSanitizeAttribute,E,ee),Oe=ee.attrValue,Hl&&(Mn==="id"||Mn==="name")&&(sn(Ae,E),Oe=n2+Oe),yt&&je(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Oe)){sn(Ae,E);continue}if(Mn==="attributename"&&bo(Oe,"href")){sn(Ae,E);continue}if(ee.forceKeepAttr)continue;if(!ee.keepAttr){sn(Ae,E);continue}if(!ve&&je(/\/>/i,Oe)){sn(Ae,E);continue}Te&&Zr([H,I,W],rc=>{Oe=qn(Oe,rc," ")});const nc=_e(E.nodeName);if(!Jl(nc,Mn,Oe)){sn(Ae,E);continue}if(w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Xe)switch(m.getAttributeType(nc,Mn)){case"TrustedHTML":{Oe=w.createHTML(Oe);break}case"TrustedScriptURL":{Oe=w.createScriptURL(Oe);break}}if(Oe!==hi)try{Xe?E.setAttributeNS(Xe,Ae,Oe):E.setAttribute(Ae,Oe),fi(E)?Tt(E):_a(t.removed)}catch{sn(Ae,E)}}Vt(B.afterSanitizeAttributes,E,null)},l2=function te(E){let $=null;const ee=Yl(E);for(Vt(B.beforeSanitizeShadowDOM,E,null);$=ee.nextNode();)Vt(B.uponSanitizeShadowNode,$,null),Ql($),tc($),$.content instanceof u&&te($.content);Vt(B.afterSanitizeShadowDOM,E,null)};return t.sanitize=function(te){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,ee=null,ge=null,Be=null;if(li=!te,li&&(te="<!-->"),typeof te!="string"&&!Kl(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||di(E),t.removed=[],typeof te=="string"&&(Tr=!1),Tr){if(te.nodeName){const Pt=_e(te.nodeName);if(!z[Pt]||U[Pt])throw Zn("root node is forbidden and cannot be sanitized in-place")}}else if(te instanceof s)$=Zl("<!---->"),ee=$.ownerDocument.importNode(te,!0),ee.nodeType===Kn.element&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?$=ee:$.appendChild(ee);else{if(!Ot&&!Te&&!Me&&te.indexOf("<")===-1)return w&&Vu?w.createHTML(te):te;if($=Zl(te),!$)return Ot?null:Vu?k:""}$&&qt&&Tt($.firstChild);const Ae=Yl(Tr?te:$);for(;ge=Ae.nextNode();)Ql(ge),tc(ge),ge.content instanceof u&&l2(ge.content);if(Tr)return te;if(Ot){if(Lu)for(Be=_.call($.ownerDocument);$.firstChild;)Be.appendChild($.firstChild);else Be=$;return(V.shadowroot||V.shadowrootmode)&&(Be=j.call(r,Be,!0)),Be}let Xe=Me?$.outerHTML:$.innerHTML;return Me&&z["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&je(Na,$.ownerDocument.doctype.name)&&(Xe="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
|
|
17
|
-
`+Xe),Te&&Zr([H,I,W],
|
|
14
|
+
`;break}return r},fn.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 lt(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}lt.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},lt.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},lt.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o},lt.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r},lt.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 Yi(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Yi.prototype.Token=lt;const Od=/\r\n?|\n/g,Ld=/\0/g;function Vd(e){let t;t=e.src.replace(Od,`
|
|
15
|
+
`),t=t.replace(Ld,"�"),e.src=t}function Pd(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 Rd(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 Md(e){return/^<a[>\s]/i.test(e)}function Bd(e){return/^<\/a\s*>/i.test(e)}function zd(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"&&(Md(s.content)&&u>0&&u--,Bd(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 p=0;p<d.length;p++){const m=d[p].url,x=e.md.normalizeLink(m);if(!e.md.validateLink(x))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 v=d[p].index;if(v>h){const k=new e.Token("text","",0);k.content=l.slice(h,v),k.level=c,f.push(k)}const g=new e.Token("link_open","a",1);g.attrs=[["href",x]],g.level=c++,g.markup="linkify",g.info="auto",f.push(g);const b=new e.Token("text","",0);b.content=y,b.level=c,f.push(b);const w=new e.Token("link_close","a",-1);w.level=--c,w.markup="linkify",w.info="auto",f.push(w),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=qi(o,a,f)}}}}const Ki=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,jd=/\((c|tm|r)\)/i,Hd=/\((c|tm|r)\)/ig,$d={c:"©",r:"®",tm:"™"};function Ud(e,t){return $d[t.toLowerCase()]}function Wd(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(Hd,Ud)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Gd(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Ki.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 Xd(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(jd.test(e.tokens[t].content)&&Wd(e.tokens[t].children),Ki.test(e.tokens[t].content)&&Gd(e.tokens[t].children))}const qd=/['"]/,Qi=/['"]/g,Ji="’";function $r(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Zd(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;){Qi.lastIndex=l;const f=Qi.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 x=32;if(l<d)x=s.charCodeAt(l);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){x=e[n].content.charCodeAt(0);break}const y=Un(m)||$n(String.fromCharCode(m)),v=Un(x)||$n(String.fromCharCode(x)),g=Hn(m),b=Hn(x);if(b?c=!1:v&&(g||y||(c=!1)),g?h=!1:y&&(b||v||(h=!1)),x===34&&f[0]==='"'&&m>=48&&m<=57&&(h=c=!1),c&&h&&(c=y,h=v),!c&&!h){p&&(u.content=$r(u.content,f.index,Ji));continue}if(h)for(n=r.length-1;n>=0;n--){let w=r[n];if(r[n].level<a)break;if(w.single===p&&r[n].level===a){w=r[n];let k,D;p?(k=t.md.options.quotes[2],D=t.md.options.quotes[3]):(k=t.md.options.quotes[0],D=t.md.options.quotes[1]),u.content=$r(u.content,f.index,D),e[w.token].content=$r(e[w.token].content,w.pos,k),l+=D.length-1,w.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:p,level:a}):h&&p&&(u.content=$r(u.content,f.index,Ji))}}}function Yd(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!qd.test(e.tokens[t].content)||Zd(e.tokens[t].children,e)}function Kd(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 no=[["normalize",Vd],["block",Pd],["inline",Rd],["linkify",zd],["replacements",Xd],["smartquotes",Yd],["text_join",Kd]];function ro(){this.ruler=new We;for(let e=0;e<no.length;e++)this.ruler.push(no[e][0],no[e][1])}ro.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},ro.prototype.State=Yi;function vt(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}vt.prototype.push=function(e,t,n){const r=new lt(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},vt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},vt.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},vt.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},vt.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ce(this.src.charCodeAt(--t)))return t+1;return t},vt.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t},vt.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},vt.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("")},vt.prototype.Token=lt;const Qd=65536;function uo(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function ea(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 Jd(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 w=e.src.charCodeAt(u);if(w!==124&&w!==45&&w!==58&&!ce(w))return!1;u++}let l=uo(e,t+1),d=l.split("|");const f=[];for(let w=0;w<d.length;w++){const k=d[w].trim();if(!k){if(w===0||w===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=uo(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;d=ea(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 p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),x=[t,0];m.map=x;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const v=e.push("tr_open","tr",1);v.map=[t,t+1];for(let w=0;w<d.length;w++){const k=e.push("th_open","th",1);f[w]&&(k.attrs=[["style","text-align:"+f[w]]]);const D=e.push("inline","",0);D.content=d[w].trim(),D.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let g,b=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let w=!1;for(let D=0,S=p.length;D<S;D++)if(p[D](e,o,n,!0)){w=!0;break}if(w||(l=uo(e,o).trim(),!l)||e.sCount[o]-e.blkIndent>=4||(d=ea(l),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),b+=c-d.length,b>Qd))break;if(o===t+2){const D=e.push("tbody_open","tbody",1);D.map=g=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let D=0;D<c;D++){const S=e.push("td_open","td",1);f[D]&&(S.attrs=[["style","text-align:"+f[D]]]);const _=e.push("inline","",0);_.content=d[D]?d[D].trim():"",_.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return g&&(e.push("tbody_close","tbody",-1),g[1]=o),e.push("table_close","table",-1),x[1]=o,e.parentType=h,e.line=o,!0}function e0(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 t0(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 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 n0(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 p=!1,m;for(m=t;m<n;m++){const b=e.sCount[m]<e.blkIndent;if(o=e.bMarks[m]+e.tShift[m],u=e.eMarks[m],o>=u)break;if(e.src.charCodeAt(o++)===62&&!b){let k=e.sCount[m]+1,D,S;e.src.charCodeAt(o)===32?(o++,k++,S=!1,D=!0):e.src.charCodeAt(o)===9?(D=!0,(e.bsCount[m]+k)%4===3?(o++,k++,S=!1):S=!0):D=!1;let _=k;for(s.push(e.bMarks[m]),e.bMarks[m]=o;o<u;){const X=e.src.charCodeAt(o);if(ce(X))X===9?_+=4-(_+e.bsCount[m]+(S?1:0))%4:_++;else break;o++}p=o>=u,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(D?1:0),d.push(e.sCount[m]),e.sCount[m]=_-k,f.push(e.tShift[m]),e.tShift[m]=o-e.bMarks[m];continue}if(p)break;let w=!1;for(let k=0,D=c.length;k<D;k++)if(c[k](e,m,n,!0)){w=!0;break}if(w){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 x=e.blkIndent;e.blkIndent=0;const y=e.push("blockquote_open","blockquote",1);y.markup=">";const v=[t,0];y.map=v,e.md.block.tokenize(e,t,m);const g=e.push("blockquote_close","blockquote",-1);g.markup=">",e.lineMax=a,e.parentType=h,v[1]=e.line;for(let b=0;b<f.length;b++)e.bMarks[b+t]=s[b],e.tShift[b+t]=f[b],e.sCount[b+t]=d[b],e.bsCount[b+t]=l[b];return e.blkIndent=x,!0}function r0(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 ta(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 na(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 u0(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 o0(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,p;if((p=na(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=ta(e,l))>=0)c=!1;else return!1;if(f&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),x=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 v=!1;const g=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";l<n;){u=p,o=e.eMarks[l];const w=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let k=w;for(;u<o;){const G=e.src.charCodeAt(u);if(G===9)k+=4-(k+e.bsCount[l])%4;else if(G===32)k++;else break;u++}const D=u;let S;D>=o?S=1:S=k-w,S>4&&(S=1);const _=w+S;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const X=[l,0];s.map=X,c&&(s.info=e.src.slice(a,p-1));const j=e.tight,B=e.tShift[l],H=e.sCount[l],I=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[l]=D-e.bMarks[l],e.sCount[l]=k,D>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||v)&&(d=!1),v=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=I,e.tShift[l]=B,e.sCount[l]=H,e.tight=j,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),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 G=0,T=g.length;G<T;G++)if(g[G](e,l,n,!0)){W=!0;break}if(W)break;if(c){if(p=na(e,l),p<0)break;a=e.bMarks[l]+e.tShift[l]}else if(p=ta(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=b,d&&u0(e,x),!0}function i0(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(g){const b=e.lineMax;if(g>=b||e.isEmpty(g))return null;let w=!1;if(e.sCount[g]-e.blkIndent>3&&(w=!0),e.sCount[g]<0&&(w=!0),!w){const S=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let X=!1;for(let j=0,B=S.length;j<B;j++)if(S[j](e,g,b,!0)){X=!0;break}if(e.parentType=_,X)return null}const k=e.bMarks[g]+e.tShift[g],D=e.eMarks[g];return e.src.slice(k,D+1)}let l=e.src.slice(o,u+1);u=l.length;let d=-1;for(o=1;o<u;o++){const g=l.charCodeAt(o);if(g===91)return!1;if(g===93){d=o;break}else if(g===10){const b=s(a);b!==null&&(l+=b,u=l.length,a++)}else if(g===92&&(o++,o<u&&l.charCodeAt(o)===10)){const b=s(a);b!==null&&(l+=b,u=l.length,a++)}}if(d<0||l.charCodeAt(d+1)!==58)return!1;for(o=d+2;o<u;o++){const g=l.charCodeAt(o);if(g===10){const b=s(a);b!==null&&(l+=b,u=l.length,a++)}else if(!ce(g))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,p=a,m=o;for(;o<u;o++){const g=l.charCodeAt(o);if(g===10){const b=s(a);b!==null&&(l+=b,u=l.length,a++)}else if(!ce(g))break}let x=e.md.helpers.parseLinkTitle(l,o,u);for(;x.can_continue;){const g=s(a);if(g===null)break;l+=g,o=u,u=l.length,a++,x=e.md.helpers.parseLinkTitle(l,o,u,x)}let y;for(o<u&&m!==o&&x.ok?(y=x.str,o=x.pos):(y="",o=h,a=p);o<u;){const g=l.charCodeAt(o);if(!ce(g))break;o++}if(o<u&&l.charCodeAt(o)!==10&&y)for(y="",o=h,a=p;o<u;){const g=l.charCodeAt(o);if(!ce(g))break;o++}if(o<u&&l.charCodeAt(o)!==10)return!1;const v=Hr(l.slice(1,d));return v?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:y,href:c}),e.line=a),!0):!1}const a0=["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"],s0="[a-zA-Z_:][a-zA-Z0-9:._-]*",l0="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",ra="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+s0+"(?:\\s*=\\s*"+l0+")?)")+"*\\s*\\/?>",ua="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",c0="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",d0="<[?][\\s\\S]*?[?]>",f0="<![A-Za-z][^>]*>",h0="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",m0=new RegExp("^(?:"+ra+"|"+ua+"|"+c0+"|"+d0+"|"+f0+"|"+h0+")"),p0=new RegExp("^(?:"+ra+"|"+ua+")"),hn=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+a0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(p0.source+"\\s*$"),/^$/,!1]];function g0(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<hn.length&&!hn[s][0].test(a);s++);if(s===hn.length)return!1;if(r)return hn[s][2];let l=t+1;if(!hn[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),hn[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 b0(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 y0(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 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))){u=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=r.length;p<m;p++)if(r[p](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 w0(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 Ur=[["table",Jd,["paragraph","reference"]],["code",e0],["fence",t0,["paragraph","reference","blockquote","list"]],["blockquote",n0,["paragraph","reference","blockquote","list"]],["hr",r0,["paragraph","reference","blockquote","list"]],["list",o0,["paragraph","reference","blockquote"]],["reference",i0],["html_block",g0,["paragraph","reference","blockquote"]],["heading",b0,["paragraph","reference","blockquote"]],["lheading",y0],["paragraph",w0]];function Wr(){this.ruler=new We;for(let e=0;e<Ur.length;e++)this.ruler.push(Ur[e][0],Ur[e][1],{alt:(Ur[e][2]||[]).slice()})}Wr.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)}},Wr.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)},Wr.prototype.State=vt;function Wn(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}Wn.prototype.pushPending=function(){const e=new lt("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Wn.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new lt(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},Wn.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=Un(o)||$n(String.fromCharCode(o)),d=Un(s)||$n(String.fromCharCode(s)),f=Hn(o),c=Hn(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}},Wn.prototype.Token=lt;function x0(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 v0(e,t){let n=e.pos;for(;n<e.posMax&&!x0(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const A0=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function k0(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(A0);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 oo=[];for(let e=0;e<256;e++)oo.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){oo[e.charCodeAt(0)]=1});function _0(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&&oo[o]!==0?s.content=u:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function E0(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 S0(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 oa(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 D0(e){const t=e.tokens_meta,n=e.tokens_meta.length;oa(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&oa(e,t[r].delimiters)}const ia={tokenize:S0,postProcess:D0};function F0(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 aa(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 T0(e){const t=e.tokens_meta,n=e.tokens_meta.length;aa(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&aa(e,t[r].delimiters)}const sa={tokenize:F0,postProcess:T0};function N0(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,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?r=e.src.slice(l,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),u=e.env.references[Hr(r)],!u)return e.pos=f,!1;a=u.href,s=u.title}if(!t){e.pos=h,e.posMax=p;const x=e.push("link_open","a",1),y=[["href",a]];x.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 I0(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 p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(u=m+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=m+1):u=m+1,o||(o=e.src.slice(p,m)),a=e.env.references[Hr(o)],!a)return e.pos=c,!1;f=a.href,l=a.title}if(!t){r=e.src.slice(p,m);const x=[];e.md.inline.parse(r,e.md,e.env,x);const y=e.push("image","img",0),v=[["src",f],["alt",""]];y.attrs=v,y.children=x,y.content=r,l&&v.push(["title",l])}return e.pos=u,e.posMax=h,!0}const O0=/^([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])?)*)$/,L0=/^([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(L0.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(O0.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 P0(e){return/^<a[>\s]/i.test(e)}function R0(e){return/^<\/a\s*>/i.test(e)}function M0(e){const t=e|32;return t>=97&&t<=122}function B0(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&&!M0(o))return!1;const u=e.src.slice(r).match(m0);if(!u)return!1;if(!t){const a=e.push("html_inline","",0);a.content=u[0],P0(a.content)&&e.linkLevel++,R0(a.content)&&e.linkLevel--}return e.pos+=u[0].length,!0}const z0=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,j0=/^&([a-z][a-z0-9]{1,31});/i;function H0(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(z0);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=to(a)?jr(a):jr(65533),s.markup=u[0],s.info="entity"}return e.pos+=u[0].length,!0}}else{const u=e.src.slice(n).match(j0);if(u){const a=Xi(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 la(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 p=d>0&&!e[d-1].open?u[d-1]+1:0;u[a]=a-d+p,u[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 $0(e){const t=e.tokens_meta,n=e.tokens_meta.length;la(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&la(t[r].delimiters)}function U0(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 io=[["text",v0],["linkify",k0],["newline",C0],["escape",_0],["backticks",E0],["strikethrough",ia.tokenize],["emphasis",sa.tokenize],["link",N0],["image",I0],["autolink",V0],["html_inline",B0],["entity",H0]],ao=[["balance_pairs",$0],["strikethrough",ia.postProcess],["emphasis",sa.postProcess],["fragments_join",U0]];function Gn(){this.ruler=new We;for(let e=0;e<io.length;e++)this.ruler.push(io[e][0],io[e][1]);this.ruler2=new We;for(let e=0;e<ao.length;e++)this.ruler2.push(ao[e][0],ao[e][1])}Gn.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},Gn.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()},Gn.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)},Gn.prototype.State=Wn;function W0(e){const t={};e=e||{},t.src_Any=Hi.source,t.src_Cc=$i.source,t.src_Z=Wi.source,t.src_P=Ku.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 so(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Gr(e){return Object.prototype.toString.call(e)}function G0(e){return Gr(e)==="[object String]"}function X0(e){return Gr(e)==="[object Object]"}function q0(e){return Gr(e)==="[object RegExp]"}function ca(e){return Gr(e)==="[object Function]"}function Z0(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const da={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Y0(e){return Object.keys(e||{}).reduce(function(t,n){return t||da.hasOwnProperty(n)},!1)}const K0={"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}}},Q0="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]",J0="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function ef(e){e.__index__=-1,e.__text_cache__=""}function tf(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function fa(){return function(e,t){t.normalize(e)}}function Xr(e){const t=e.re=W0(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Q0),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,X0(l)){q0(l.validate)?d.validate=tf(l.validate):ca(l.validate)?d.validate=l.validate:u(s,l),ca(l.normalize)?d.normalize=l.normalize:l.normalize?u(s,l):d.normalize=fa();return}if(G0(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:fa()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(Z0).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"),ef(e)}function nf(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 lo(e,t){const n=new nf(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||Y0(e)&&(t=e,e={}),this.__opts__=so({},da,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=so({},K0,e),this.__compiled__={},this.__tlds__=J0,this.__tlds_replaced__=!1,this.re={},Xr(this)}qe.prototype.add=function(t,n){return this.__schemas__[t]=n,Xr(this),this},qe.prototype.set=function(t){return this.__opts__=so(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(lo(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(lo(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,lo(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(),Xr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Xr(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 mn=2147483647,At=36,co=1,Xn=26,rf=38,uf=700,ha=72,ma=128,pa="-",of=/^xn--/,af=/[^\0-\x7F]/,sf=/[\x2E\u3002\uFF0E\uFF61]/g,lf={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},fo=At-co,kt=Math.floor,ho=String.fromCharCode;function jt(e){throw new RangeError(lf[e])}function cf(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function ga(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(sf,".");const o=e.split("."),u=cf(o,t).join(".");return r+u}function ba(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 df=e=>String.fromCodePoint(...e),ff=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:At},ya=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},wa=function(e,t,n){let r=0;for(e=n?kt(e/uf):e>>1,e+=kt(e/t);e>fo*Xn>>1;r+=At)e=kt(e/fo);return kt(r+(fo+1)*e/(e+rf))},xa=function(e){const t=[],n=e.length;let r=0,o=ma,u=ha,a=e.lastIndexOf(pa);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&jt("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=At;;c+=At){s>=n&&jt("invalid-input");const h=ff(e.charCodeAt(s++));h>=At&&jt("invalid-input"),h>kt((mn-r)/f)&&jt("overflow"),r+=h*f;const p=c<=u?co:c>=u+Xn?Xn:c-u;if(h<p)break;const m=At-p;f>kt(mn/m)&&jt("overflow"),f*=m}const d=t.length+1;u=wa(r-l,d,l==0),kt(r/d)>mn-o&&jt("overflow"),o+=kt(r/d),r%=d,t.splice(r++,0,o)}return String.fromCodePoint(...t)},va=function(e){const t=[];e=ba(e);const n=e.length;let r=ma,o=0,u=ha;for(const l of e)l<128&&t.push(ho(l));const a=t.length;let s=a;for(a&&t.push(pa);s<n;){let l=mn;for(const f of e)f>=r&&f<l&&(l=f);const d=s+1;l-r>kt((mn-o)/d)&&jt("overflow"),o+=(l-r)*d,r=l;for(const f of e)if(f<r&&++o>mn&&jt("overflow"),f===r){let c=o;for(let h=At;;h+=At){const p=h<=u?co:h>=u+Xn?Xn:h-u;if(c<p)break;const m=c-p,x=At-p;t.push(ho(ya(p+m%x,0))),c=kt(m/x)}t.push(ho(ya(c,0))),u=wa(o,d,s===a),o=0,++s}++o,++r}return t.join("")},Aa={version:"2.3.1",ucs2:{decode:ba,encode:df},decode:xa,encode:va,toASCII:function(e){return ga(e,function(t){return af.test(t)?"xn--"+va(t):t})},toUnicode:function(e){return ga(e,function(t){return of.test(t)?xa(t.slice(4).toLowerCase()):t})}},hf={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"]}}}},mf=/^(vbscript|javascript|file|data):/,pf=/^data:image\/(gif|png|jpeg|webp);/;function gf(e){const t=e.trim().toLowerCase();return mf.test(t)?pf.test(t):!0}const ka=["http:","https:","mailto:"];function bf(e){const t=Yu(e,!0);if(t.hostname&&(!t.protocol||ka.indexOf(t.protocol)>=0))try{t.hostname=Aa.toASCII(t.hostname)}catch{}return jn(Zu(t))}function yf(e){const t=Yu(e,!0);if(t.hostname&&(!t.protocol||ka.indexOf(t.protocol)>=0))try{t.hostname=Aa.toUnicode(t.hostname)}catch{}return cn(Zu(t),cn.defaultChars+"%")}function Ze(e,t){if(!(this instanceof Ze))return new Ze(e,t);t||eo(e)||(t=e||{},e="default"),this.inline=new Gn,this.block=new Wr,this.core=new ro,this.renderer=new fn,this.linkify=new qe,this.validateLink=gf,this.normalizeLink=bf,this.normalizeLinkText=yf,this.utils=Dd,this.helpers=zr({},Id),this.options={},this.configure(e),t&&this.set(t)}Ze.prototype.set=function(e){return zr(this.options,e),this},Ze.prototype.configure=function(e){const t=this;if(eo(e)){const n=e;if(e=hf[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:Ca,setPrototypeOf:_a,isFrozen:wf,getPrototypeOf:xf,getOwnPropertyDescriptor:vf}=Object;let{freeze:ze,seal:ut,create:qr}=Object,{apply:mo,construct:po}=typeof Reflect<"u"&&Reflect;ze||(ze=function(t){return t}),ut||(ut=function(t){return t}),mo||(mo=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)}),po||(po=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 Zr=He(Array.prototype.forEach),Af=He(Array.prototype.lastIndexOf),Ea=He(Array.prototype.pop),qn=He(Array.prototype.push),kf=He(Array.prototype.splice),Yr=He(String.prototype.toLowerCase),go=He(String.prototype.toString),bo=He(String.prototype.match),Zn=He(String.prototype.replace),Cf=He(String.prototype.indexOf),_f=He(String.prototype.trim),Ye=He(Object.prototype.hasOwnProperty),je=He(RegExp.prototype.test),Yn=Ef(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 mo(e,t,r)}}function Ef(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return po(e,n)}}function oe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yr;_a&&_a(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const u=n(o);u!==o&&(wf(t)||(t[r]=u),o=u)}e[o]=!0}return e}function Sf(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function Ct(e){const t=qr(null);for(const[n,r]of Ca(e))Ye(e,n)&&(Array.isArray(r)?t[n]=Sf(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Ct(r):t[n]=r);return t}function Kn(e,t){for(;e!==null;){const r=vf(e,t);if(r){if(r.get)return He(r.get);if(typeof r.value=="function")return He(r.value)}e=xf(e)}function n(){return null}return n}const Sa=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"]),yo=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"]),wo=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"]),Df=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"]),xo=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"]),Ff=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Da=ze(["#text"]),Fa=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"]),vo=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"]),Ta=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"]),Kr=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Tf=ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Nf=ut(/<%[\w\W]*|[\w\W]*%>/gm),If=ut(/\$\{[\w\W]*/gm),Of=ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),Lf=ut(/^aria-[\-\w]+$/),Na=ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vf=ut(/^(?:\w+script|data):/i),Pf=ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ia=ut(/^html$/i),Rf=ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var Oa=Object.freeze({__proto__:null,ARIA_ATTR:Lf,ATTR_WHITESPACE:Pf,CUSTOM_ELEMENT:Rf,DATA_ATTR:Of,DOCTYPE_NAME:Ia,ERB_EXPR:Nf,IS_ALLOWED_URI:Na,IS_SCRIPT_OR_DATA:Vf,MUSTACHE_EXPR:Tf,TMPLIT_EXPR:If});const Qn={element:1,text:3,progressingInstruction:7,comment:8,document:9},Mf=function(){return typeof window>"u"?null:window},Bf=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}},La=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Va(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mf();const t=te=>Va(te);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==Qn.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:p}=e,m=l.prototype,x=Kn(m,"cloneNode"),y=Kn(m,"remove"),v=Kn(m,"nextSibling"),g=Kn(m,"childNodes"),b=Kn(m,"parentNode");if(typeof a=="function"){const te=n.createElement("template");te.content&&te.content.ownerDocument&&(n=te.content.ownerDocument)}let w,k="";const{implementation:D,createNodeIterator:S,createDocumentFragment:_,getElementsByTagName:X}=n,{importNode:j}=r;let B=La();t.isSupported=typeof Ca=="function"&&typeof b=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:I,TMPLIT_EXPR:W,DATA_ATTR:G,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:C,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:P}=Oa;let{IS_ALLOWED_URI:M}=Oa,z=null;const N=oe({},[...Sa,...yo,...wo,...xo,...Da]);let V=null;const L=oe({},[...Fa,...vo,...Ta,...Kr]);let O=Object.seal(qr(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}})),U=null,J=null;const Y=Object.seal(qr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let K=!0,re=!0,ae=!1,ve=!0,Te=!1,wt=!0,Me=!1,Ln=!1,qt=!1,Lt=!1,Lu=!1,Vu=!1,Hl=!0,$l=!1;const r2="user-content-";let ii=!0,Nr=!1,Vn={},Tt=null;const ai=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 Ul=null;const Wl=oe({},["audio","video","img","source","image","track"]);let si=null;const Gl=oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pu="http://www.w3.org/1998/Math/MathML",Ru="http://www.w3.org/2000/svg",Vt="http://www.w3.org/1999/xhtml";let Pn=Vt,li=!1,ci=null;const u2=oe({},[Pu,Ru,Vt],go);let Mu=oe({},["mi","mo","mn","ms","mtext"]),Bu=oe({},["annotation-xml"]);const o2=oe({},["title","style","font","a","script"]);let Ir=null;const i2=["application/xhtml+xml","text/html"],a2="text/html";let _e=null,Rn=null;const s2=n.createElement("form"),Xl=function(E){return E instanceof RegExp||E instanceof Function},di=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rn&&Rn===E)){if((!E||typeof E!="object")&&(E={}),E=Ct(E),Ir=i2.indexOf(E.PARSER_MEDIA_TYPE)===-1?a2:E.PARSER_MEDIA_TYPE,_e=Ir==="application/xhtml+xml"?go:Yr,z=Ye(E,"ALLOWED_TAGS")?oe({},E.ALLOWED_TAGS,_e):N,V=Ye(E,"ALLOWED_ATTR")?oe({},E.ALLOWED_ATTR,_e):L,ci=Ye(E,"ALLOWED_NAMESPACES")?oe({},E.ALLOWED_NAMESPACES,go):u2,si=Ye(E,"ADD_URI_SAFE_ATTR")?oe(Ct(Gl),E.ADD_URI_SAFE_ATTR,_e):Gl,Ul=Ye(E,"ADD_DATA_URI_TAGS")?oe(Ct(Wl),E.ADD_DATA_URI_TAGS,_e):Wl,Tt=Ye(E,"FORBID_CONTENTS")?oe({},E.FORBID_CONTENTS,_e):ai,U=Ye(E,"FORBID_TAGS")?oe({},E.FORBID_TAGS,_e):Ct({}),J=Ye(E,"FORBID_ATTR")?oe({},E.FORBID_ATTR,_e):Ct({}),Vn=Ye(E,"USE_PROFILES")?E.USE_PROFILES:!1,K=E.ALLOW_ARIA_ATTR!==!1,re=E.ALLOW_DATA_ATTR!==!1,ae=E.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=E.SAFE_FOR_TEMPLATES||!1,wt=E.SAFE_FOR_XML!==!1,Me=E.WHOLE_DOCUMENT||!1,Lt=E.RETURN_DOM||!1,Lu=E.RETURN_DOM_FRAGMENT||!1,Vu=E.RETURN_TRUSTED_TYPE||!1,qt=E.FORCE_BODY||!1,Hl=E.SANITIZE_DOM!==!1,$l=E.SANITIZE_NAMED_PROPS||!1,ii=E.KEEP_CONTENT!==!1,Nr=E.IN_PLACE||!1,M=E.ALLOWED_URI_REGEXP||Na,Pn=E.NAMESPACE||Vt,Mu=E.MATHML_TEXT_INTEGRATION_POINTS||Mu,Bu=E.HTML_INTEGRATION_POINTS||Bu,O=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Xl(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(O.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Xl(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(O.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(O.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&(re=!1),Lu&&(Lt=!0),Vn&&(z=oe({},Da),V=qr(null),Vn.html===!0&&(oe(z,Sa),oe(V,Fa)),Vn.svg===!0&&(oe(z,yo),oe(V,vo),oe(V,Kr)),Vn.svgFilters===!0&&(oe(z,wo),oe(V,vo),oe(V,Kr)),Vn.mathMl===!0&&(oe(z,xo),oe(V,Ta),oe(V,Kr))),Ye(E,"ADD_TAGS")||(Y.tagCheck=null),Ye(E,"ADD_ATTR")||(Y.attributeCheck=null),E.ADD_TAGS&&(typeof E.ADD_TAGS=="function"?Y.tagCheck=E.ADD_TAGS:(z===N&&(z=Ct(z)),oe(z,E.ADD_TAGS,_e))),E.ADD_ATTR&&(typeof E.ADD_ATTR=="function"?Y.attributeCheck=E.ADD_ATTR:(V===L&&(V=Ct(V)),oe(V,E.ADD_ATTR,_e))),E.ADD_URI_SAFE_ATTR&&oe(si,E.ADD_URI_SAFE_ATTR,_e),E.FORBID_CONTENTS&&(Tt===ai&&(Tt=Ct(Tt)),oe(Tt,E.FORBID_CONTENTS,_e)),E.ADD_FORBID_CONTENTS&&(Tt===ai&&(Tt=Ct(Tt)),oe(Tt,E.ADD_FORBID_CONTENTS,_e)),ii&&(z["#text"]=!0),Me&&oe(z,["html","head","body"]),z.table&&(oe(z,["tbody"]),delete U.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=E.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else w===void 0&&(w=Bf(p,o)),w!==null&&typeof k=="string"&&(k=w.createHTML(""));ze&&ze(E),Rn=E}},ql=oe({},[...yo,...wo,...Df]),Zl=oe({},[...xo,...Ff]),l2=function(E){let $=b(E);(!$||!$.tagName)&&($={namespaceURI:Pn,tagName:"template"});const ee=Yr(E.tagName),ge=Yr($.tagName);return ci[E.namespaceURI]?E.namespaceURI===Ru?$.namespaceURI===Vt?ee==="svg":$.namespaceURI===Pu?ee==="svg"&&(ge==="annotation-xml"||Mu[ge]):!!ql[ee]:E.namespaceURI===Pu?$.namespaceURI===Vt?ee==="math":$.namespaceURI===Ru?ee==="math"&&Bu[ge]:!!Zl[ee]:E.namespaceURI===Vt?$.namespaceURI===Ru&&!Bu[ge]||$.namespaceURI===Pu&&!Mu[ge]?!1:!Zl[ee]&&(o2[ee]||!ql[ee]):!!(Ir==="application/xhtml+xml"&&ci[E.namespaceURI]):!1},Nt=function(E){qn(t.removed,{element:E});try{b(E).removeChild(E)}catch{y(E)}},sn=function(E,$){try{qn(t.removed,{attribute:$.getAttributeNode(E),from:$})}catch{qn(t.removed,{attribute:null,from:$})}if($.removeAttribute(E),E==="is")if(Lt||Lu)try{Nt($)}catch{}else try{$.setAttribute(E,"")}catch{}},Yl=function(E){let $=null,ee=null;if(qt)E="<remove></remove>"+E;else{const Ae=bo(E,/^[\r\n\t ]+/);ee=Ae&&Ae[0]}Ir==="application/xhtml+xml"&&Pn===Vt&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");const ge=w?w.createHTML(E):E;if(Pn===Vt)try{$=new h().parseFromString(ge,Ir)}catch{}if(!$||!$.documentElement){$=D.createDocument(Pn,"template",null);try{$.documentElement.innerHTML=li?k:ge}catch{}}const Be=$.body||$.documentElement;return E&&ee&&Be.insertBefore(n.createTextNode(ee),Be.childNodes[0]||null),Pn===Vt?X.call($,Me?"html":"body")[0]:Me?$.documentElement:Be},Kl=function(E){return S.call(E.ownerDocument||E,E,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},fi=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")},Ql=function(E){return typeof s=="function"&&E instanceof s};function Pt(te,E,$){Zr(te,ee=>{ee.call(t,E,$,Rn)})}const Jl=function(E){let $=null;if(Pt(B.beforeSanitizeElements,E,null),fi(E))return Nt(E),!0;const ee=_e(E.nodeName);if(Pt(B.uponSanitizeElement,E,{tagName:ee,allowedTags:z}),wt&&E.hasChildNodes()&&!Ql(E.firstElementChild)&&je(/<[/\w!]/g,E.innerHTML)&&je(/<[/\w!]/g,E.textContent)||E.nodeType===Qn.progressingInstruction||wt&&E.nodeType===Qn.comment&&je(/<[/\w]/g,E.data))return Nt(E),!0;if(!(Y.tagCheck instanceof Function&&Y.tagCheck(ee))&&(!z[ee]||U[ee])){if(!U[ee]&&tc(ee)&&(O.tagNameCheck instanceof RegExp&&je(O.tagNameCheck,ee)||O.tagNameCheck instanceof Function&&O.tagNameCheck(ee)))return!1;if(ii&&!Tt[ee]){const ge=b(E)||E.parentNode,Be=g(E)||E.childNodes;if(Be&&ge){const Ae=Be.length;for(let Xe=Ae-1;Xe>=0;--Xe){const Rt=x(Be[Xe],!0);Rt.__removalCount=(E.__removalCount||0)+1,ge.insertBefore(Rt,v(E))}}}return Nt(E),!0}return E instanceof l&&!l2(E)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&je(/<\/no(script|embed|frames)/i,E.innerHTML)?(Nt(E),!0):(Te&&E.nodeType===Qn.text&&($=E.textContent,Zr([H,I,W],ge=>{$=Zn($,ge," ")}),E.textContent!==$&&(qn(t.removed,{element:E.cloneNode()}),E.textContent=$)),Pt(B.afterSanitizeElements,E,null),!1)},ec=function(E,$,ee){if(J[$]||Hl&&($==="id"||$==="name")&&(ee in n||ee in s2))return!1;if(!(re&&!J[$]&&je(G,$))){if(!(K&&je(T,$))){if(!(Y.attributeCheck instanceof Function&&Y.attributeCheck($,E))){if(!V[$]||J[$]){if(!(tc(E)&&(O.tagNameCheck instanceof RegExp&&je(O.tagNameCheck,E)||O.tagNameCheck instanceof Function&&O.tagNameCheck(E))&&(O.attributeNameCheck instanceof RegExp&&je(O.attributeNameCheck,$)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck($,E))||$==="is"&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&je(O.tagNameCheck,ee)||O.tagNameCheck instanceof Function&&O.tagNameCheck(ee))))return!1}else if(!si[$]){if(!je(M,Zn(ee,F,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&E!=="script"&&Cf(ee,"data:")===0&&Ul[E])){if(!(ae&&!je(C,Zn(ee,F,"")))){if(ee)return!1}}}}}}}return!0},tc=function(E){return E!=="annotation-xml"&&bo(E,P)},nc=function(E){Pt(B.beforeSanitizeAttributes,E,null);const{attributes:$}=E;if(!$||fi(E))return;const ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let ge=$.length;for(;ge--;){const Be=$[ge],{name:Ae,namespaceURI:Xe,value:Rt}=Be,Mn=_e(Ae),hi=Rt;let Oe=Ae==="value"?hi:_f(hi);if(ee.attrName=Mn,ee.attrValue=Oe,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Pt(B.uponSanitizeAttribute,E,ee),Oe=ee.attrValue,$l&&(Mn==="id"||Mn==="name")&&(sn(Ae,E),Oe=r2+Oe),wt&&je(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Oe)){sn(Ae,E);continue}if(Mn==="attributename"&&bo(Oe,"href")){sn(Ae,E);continue}if(ee.forceKeepAttr)continue;if(!ee.keepAttr){sn(Ae,E);continue}if(!ve&&je(/\/>/i,Oe)){sn(Ae,E);continue}Te&&Zr([H,I,W],uc=>{Oe=Zn(Oe,uc," ")});const rc=_e(E.nodeName);if(!ec(rc,Mn,Oe)){sn(Ae,E);continue}if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Xe)switch(p.getAttributeType(rc,Mn)){case"TrustedHTML":{Oe=w.createHTML(Oe);break}case"TrustedScriptURL":{Oe=w.createScriptURL(Oe);break}}if(Oe!==hi)try{Xe?E.setAttributeNS(Xe,Ae,Oe):E.setAttribute(Ae,Oe),fi(E)?Nt(E):Ea(t.removed)}catch{sn(Ae,E)}}Pt(B.afterSanitizeAttributes,E,null)},c2=function te(E){let $=null;const ee=Kl(E);for(Pt(B.beforeSanitizeShadowDOM,E,null);$=ee.nextNode();)Pt(B.uponSanitizeShadowNode,$,null),Jl($),nc($),$.content instanceof u&&te($.content);Pt(B.afterSanitizeShadowDOM,E,null)};return t.sanitize=function(te){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,ee=null,ge=null,Be=null;if(li=!te,li&&(te="<!-->"),typeof te!="string"&&!Ql(te))if(typeof te.toString=="function"){if(te=te.toString(),typeof te!="string")throw Yn("dirty is not a string, aborting")}else throw Yn("toString is not a function");if(!t.isSupported)return te;if(Ln||di(E),t.removed=[],typeof te=="string"&&(Nr=!1),Nr){if(te.nodeName){const Rt=_e(te.nodeName);if(!z[Rt]||U[Rt])throw Yn("root node is forbidden and cannot be sanitized in-place")}}else if(te instanceof s)$=Yl("<!---->"),ee=$.ownerDocument.importNode(te,!0),ee.nodeType===Qn.element&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?$=ee:$.appendChild(ee);else{if(!Lt&&!Te&&!Me&&te.indexOf("<")===-1)return w&&Vu?w.createHTML(te):te;if($=Yl(te),!$)return Lt?null:Vu?k:""}$&&qt&&Nt($.firstChild);const Ae=Kl(Nr?te:$);for(;ge=Ae.nextNode();)Jl(ge),nc(ge),ge.content instanceof u&&c2(ge.content);if(Nr)return te;if(Lt){if(Lu)for(Be=_.call($.ownerDocument);$.firstChild;)Be.appendChild($.firstChild);else Be=$;return(V.shadowroot||V.shadowrootmode)&&(Be=j.call(r,Be,!0)),Be}let Xe=Me?$.outerHTML:$.innerHTML;return Me&&z["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&je(Ia,$.ownerDocument.doctype.name)&&(Xe="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
|
|
17
|
+
`+Xe),Te&&Zr([H,I,W],Rt=>{Xe=Zn(Xe,Rt," ")}),w&&Vu?w.createHTML(Xe):Xe},t.setConfig=function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};di(te),Ln=!0},t.clearConfig=function(){Rn=null,Ln=!1},t.isValidAttribute=function(te,E,$){Rn||di({});const ee=_e(te),ge=_e(E);return ec(ee,ge,$)},t.addHook=function(te,E){typeof E=="function"&&qn(B[te],E)},t.removeHook=function(te,E){if(E!==void 0){const $=Af(B[te],E);return $===-1?void 0:kf(B[te],$,1)[0]}return Ea(B[te])},t.removeHooks=function(te){B[te]=[]},t.removeAllHooks=function(){B=La()},t}var zf=Va();const Pa={content:{type:Object,required:!0}},Ra=new Ze({html:!0,linkify:!0});Ra.linkify.set({fuzzyLink:!1});function jf(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
|
|
21
|
+
$3`),t}function Hf(e){const t=e.split(`
|
|
22
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
|
|
24
|
-
`),r=
|
|
23
|
+
`).trim()}const pn=i.defineComponent({name:"FXMarkdownMessage",props:Pa,setup(e){const t=i.computed(()=>{var a;const n=(((a=e.content)==null?void 0:a.content)??"").replace(/\\n/g,`
|
|
24
|
+
`),r=jf(n),o=Hf(r);if(!o)return"";const u=Ra.render(o);return zf.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 $f=(e,t,n)=>{if(e.type!==Le.Text)return null;const o=e.raw;if(!o)return null;if(typeof o!="string")return o;if(!o.trim())return null;let u=n.shouldShowMarkdown.value?o:o.replace(/\r\n/g,`
|
|
25
25
|
`).replace(/\r/g,`
|
|
26
|
-
`).replace(/\t/g," ");return 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 00",key:`bubble-text-${t}`},[u])};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 Uf(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 Wf=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(Uf(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var u=$f(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-",Qr="-moz-",se="-webkit-",Ra="comm",Ao="rule",ko="decl",Gf="@import",Ma="@keyframes",Xf="@layer",qf=Math.abs,Jr=String.fromCharCode,Zf=Object.assign;function Yf(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 Ba(e){return e.trim()}function Kf(e,t){return(e=t.exec(e))?e[0]:e}function le(e,t,n){return e.replace(t,n)}function Co(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 _o(e){return e.length}function eu(e,t){return t.push(e),e}function Qf(e,t){return e.map(t).join("")}var tu=1,gn=1,za=0,Ge=0,we=0,bn="";function nu(e,t,n,r,o,u,a){return{value:e,root:t,parent:n,type:r,props:o,children:u,line:tu,column:gn,length:a,return:""}}function Jn(e,t){return Zf(nu("",null,null,"",null,null,0),e,{length:-e.length},t)}function Jf(){return we}function eh(){return we=Ge>0?Ne(bn,--Ge):0,gn--,we===10&&(gn=1,tu--),we}function Ke(){return we=Ge<za?Ne(bn,Ge++):0,gn++,we===10&&(gn=1,tu++),we}function _t(){return Ne(bn,Ge)}function ru(){return Ge}function er(e,t){return Qn(bn,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 ja(e){return tu=gn=1,za=Ct(bn=e),Ge=0,[]}function Ha(e){return bn="",e}function uu(e){return Ba(er(Ge-1,Eo(e===91?e+2:e===40?e+1:e)))}function th(e){for(;(we=_t())&&we<33;)Ke();return tr(e)>2||tr(we)>3?"":" "}function nh(e,t){for(;--t&&Ke()&&!(we<48||we>102||we>57&&we<65||we>70&&we<97););return er(e,ru()+(t<6&&_t()==32&&Ke()==32))}function Eo(e){for(;Ke();)switch(we){case e:return Ge;case 34:case 39:e!==34&&e!==39&&Eo(we);break;case 40:e===41&&Eo(e);break;case 92:Ke();break}return Ge}function rh(e,t){for(;Ke()&&e+we!==57;)if(e+we===84&&_t()===47)break;return"/*"+er(t,Ge-1)+"*"+Jr(e===47?e:Ke())}function uh(e){for(;!tr(_t());)Ke();return er(e,Ge)}function oh(e){return Ha(ou("",null,null,null,[""],e=ja(e),0,[0],e))}function ou(e,t,n,r,o,u,a,s,l){for(var d=0,f=0,c=a,h=0,m=0,p=0,x=1,y=1,A=1,b=0,g="",w=o,k=u,D=r,S=g;y;)switch(p=b,b=Ke()){case 40:if(p!=108&&Ne(S,c-1)==58){Co(S+=le(uu(b),"&","&\f"),"&\f")!=-1&&(A=-1);break}case 34:case 39:case 91:S+=uu(b);break;case 9:case 10:case 13:case 32:S+=th(p);break;case 92:S+=nh(ru()-1,7);continue;case 47:switch(_t()){case 42:case 47:eu(ih(rh(Ke(),ru()),t,n),l);break;default:S+="/"}break;case 123*x:s[d++]=Ct(S)*A;case 125*x:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+f:A==-1&&(S=le(S,/\f/g,"")),m>0&&Ct(S)-c&&eu(m>32?Ua(S+";",r,n,c-1):Ua(le(S," ","")+";",r,n,c-2),l);break;case 59:S+=";";default:if(eu(D=$a(S,t,n,d,f,o,s,g,w=[],k=[],c),u),b===123)if(f===0)ou(S,t,D,D,w,u,c,s,k);else switch(h===99&&Ne(S,3)===110?100:h){case 100:case 108:case 109:case 115:ou(e,D,D,r&&eu($a(e,D,D,0,0,o,s,g,o,w=[],c),k),o,k,c,s,r?w:k);break;default:ou(S,D,D,D,[""],k,0,s,k)}}d=f=m=0,x=A=1,g=S="",c=a;break;case 58:c=1+Ct(S),m=p;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&eh()==125)continue}switch(S+=Jr(b),b*x){case 38:A=f>0?1:(S+="\f",-1);break;case 44:s[d++]=(Ct(S)-1)*A,A=1;break;case 64:_t()===45&&(S+=uu(Ke())),h=_t(),f=c=Ct(g=S+=uh(ru())),b++;break;case 45:p===45&&Ct(S)==2&&(x=0)}}return u}function $a(e,t,n,r,o,u,a,s,l,d,f){for(var c=o-1,h=o===0?u:[""],m=_o(h),p=0,x=0,y=0;p<r;++p)for(var A=0,b=Qn(e,c+1,c=qf(x=a[p])),g=e;A<m;++A)(g=Ba(x>0?h[A]+" "+b:le(b,/&\f/g,h[A])))&&(l[y++]=g);return nu(e,t,n,o===0?Ao:s,l,d,f)}function ih(e,t,n){return nu(e,t,n,Ra,Jr(Jf()),Qn(e,2,-2),0)}function Ua(e,t,n,r){return nu(e,t,n,ko,Qn(e,0,r),Qn(e,r+1,-1),r)}function yn(e,t){for(var n="",r=_o(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function ah(e,t,n,r){switch(e.type){case Xf:if(e.children.length)break;case Gf:case ko:return e.return=e.return||e.value;case Ra:return"";case Ma:return e.return=e.value+"{"+yn(e.children,r)+"}";case Ao:e.value=e.props.join(",")}return Ct(n=yn(e.children,r))?e.return=e.value+"{"+n+"}":""}function sh(e){var t=_o(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 lh(e){return function(t){t.root||(t=t.return)&&e(t)}}function ch(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var dh=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)},fh=function(t,n){var r=-1,o=44;do switch(tr(o)){case 0:o===38&&_t()===12&&(n[r]=1),t[r]+=dh(Ge-1,n,r);break;case 2:t[r]+=uu(o);break;case 4:if(o===44){t[++r]=_t()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Jr(o)}while(o=Ke());return t},hh=function(t,n){return Ha(fh(ja(t),n))},Wa=new WeakMap,ph=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&&!Wa.get(r))&&!o){Wa.set(t,!0);for(var u=[],a=hh(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]}}},mh=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ga(e,t){switch(Yf(e,t)){case 5103:return se+"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 se+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return se+e+Qr+e+Ve+e+e;case 6828:case 4268:return se+e+Ve+e+e;case 6165:return se+e+Ve+"flex-"+e+e;case 5187:return se+e+le(e,/(\w+).+(:[^]+)/,se+"box-$1$2"+Ve+"flex-$1$2")+e;case 5443:return se+e+Ve+"flex-item-"+le(e,/flex-|-self/,"")+e;case 4675:return se+e+Ve+"flex-line-pack"+le(e,/align-content|flex-|-self/,"")+e;case 5548:return se+e+Ve+le(e,"shrink","negative")+e;case 5292:return se+e+Ve+le(e,"basis","preferred-size")+e;case 6060:return se+"box-"+le(e,"-grow","")+se+e+Ve+le(e,"grow","positive")+e;case 4554:return se+le(e,/([^-])(transform)/g,"$1"+se+"$2")+e;case 6187:return le(le(le(e,/(zoom-|grab)/,se+"$1"),/(image-set)/,se+"$1"),e,"")+e;case 5495:case 3959:return le(e,/(image-set\([^]*)/,se+"$1$`$1");case 4968:return le(le(e,/(.+:)(flex-)?(.*)/,se+"box-pack:$3"+Ve+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+se+e+e;case 4095:case 3583:case 4068:case 2532:return le(e,/(.+)-inline(.+)/,se+"$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 le(e,/(.+:)(.+)-([^]+)/,"$1"+se+"$2-$3$1"+Qr+(Ne(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Co(e,"stretch")?Ga(le(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-(~Co(e,"!important")&&10))){case 107:return le(e,":",":"+se)+e;case 101:return le(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+se+(Ne(e,14)===45?"inline-":"")+"box$3$1"+se+"$2$3$1"+Ve+"$2box$3")+e}break;case 5936:switch(Ne(e,t+11)){case 114:return se+e+Ve+le(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return se+e+Ve+le(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return se+e+Ve+le(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return se+e+Ve+e+e}return e}var gh=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case ko:t.return=Ga(t.value,t.length);break;case Ma:return yn([Jn(t,{value:le(t.value,"@","@"+se)})],o);case Ao:if(t.length)return Qf(t.props,function(u){switch(Kf(u,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return yn([Jn(t,{props:[le(u,/:(read-\w+)/,":"+Qr+"$1")]})],o);case"::placeholder":return yn([Jn(t,{props:[le(u,/:(plac\w+)/,":"+se+"input-$1")]}),Jn(t,{props:[le(u,/:(plac\w+)/,":"+Qr+"$1")]}),Jn(t,{props:[le(u,/:(plac\w+)/,Ve+"input-$1")]})],o)}return""})}},bh=[gh],yh=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(x){var y=x.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var o=t.stylisPlugins||bh,u={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),A=1;A<y.length;A++)u[y[A]]=!0;s.push(x)});var l,d=[ph,mh];{var f,c=[ah,lh(function(x){f.insert(x)})],h=sh(d.concat(o,c)),m=function(y){return yn(oh(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 Wf({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 wh(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 xh={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},vh=/[A-Z]|^ms/g,Ah=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Xa=function(t){return t.charCodeAt(1)===45},qa=function(t){return t!=null&&typeof t!="boolean"},So=ch(function(e){return Xa(e)?e:e.replace(vh,"-$&").toLowerCase()}),Za=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Ah,function(r,o,u){return Ht={name:o,styles:u,next:Ht},o})}return xh[t]!==1&&!Xa(t)&&typeof n=="number"&&n!==0?n+"px":n};function iu(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 Ht={name:o.name,styles:o.styles,next:Ht},o.name;var u=n;if(u.styles!==void 0){var a=u.next;if(a!==void 0)for(;a!==void 0;)Ht={name:a.name,styles:a.styles,next:Ht},a=a.next;var s=u.styles+";";return s}return kh(e,t,n)}}var l=n;if(t==null)return l;var d=t[l];return d!==void 0?d:l}function kh(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=iu(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]+"}":qa(s)&&(r+=So(u)+":"+Za(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++)qa(a[l])&&(r+=So(u)+":"+Za(u,a[l])+";");else{var d=iu(e,t,a);switch(u){case"animation":case"animationName":{r+=So(u)+":"+d+";";break}default:r+=u+"{"+d+"}"}}}return r}var Ya=/label:\s*([^\s;{]+)\s*(;|$)/g,Ht;function Do(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="";Ht=void 0;var u=e[0];if(u==null||u.raw===void 0)r=!1,o+=iu(n,t,u);else{var a=u;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=iu(n,t,e[s]),r){var l=u;o+=l[s]}Ya.lastIndex=0;for(var d="",f;(f=Ya.exec(o))!==null;)d+="-"+f[1];var c=wh(o)+d;return{name:c,styles:o,next:Ht}}function Ka(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var Ch=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},_h=function(t,n,r){Ch(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 Qa(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Ja(e,t,n){var r=[],o=Ka(e,r,n);return r.length<2?n:o+t(r)}var Eh=function(t){var n=yh(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=Do(d,n.registered,void 0);return _h(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=Do(d,n.registered),h="animation-"+c.name;return Qa(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=Do(d,n.registered);Qa(n,c)},a=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];return Ja(n.registered,r,Sh(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:Ka.bind(null,n.registered),merge:Ja.bind(null,n.registered,r)}},Sh=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},Dh=Eh({key:"css"}),Fo=Dh.css,Fh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var es={exports:{}};/*!
|
|
26
|
+
`).replace(/\t/g," ");return 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 00",key:`bubble-text-${t}`},[u])};function Uf(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 Wf(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 Gf=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(Wf(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var u=Uf(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-",Qr="-moz-",se="-webkit-",Ma="comm",Ao="rule",ko="decl",Xf="@import",Ba="@keyframes",qf="@layer",Zf=Math.abs,Jr=String.fromCharCode,Yf=Object.assign;function Kf(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 za(e){return e.trim()}function Qf(e,t){return(e=t.exec(e))?e[0]:e}function le(e,t,n){return e.replace(t,n)}function Co(e,t){return e.indexOf(t)}function Ne(e,t){return e.charCodeAt(t)|0}function Jn(e,t,n){return e.slice(t,n)}function _t(e){return e.length}function _o(e){return e.length}function eu(e,t){return t.push(e),e}function Jf(e,t){return e.map(t).join("")}var tu=1,gn=1,ja=0,Ge=0,we=0,bn="";function nu(e,t,n,r,o,u,a){return{value:e,root:t,parent:n,type:r,props:o,children:u,line:tu,column:gn,length:a,return:""}}function er(e,t){return Yf(nu("",null,null,"",null,null,0),e,{length:-e.length},t)}function eh(){return we}function th(){return we=Ge>0?Ne(bn,--Ge):0,gn--,we===10&&(gn=1,tu--),we}function Ke(){return we=Ge<ja?Ne(bn,Ge++):0,gn++,we===10&&(gn=1,tu++),we}function Et(){return Ne(bn,Ge)}function ru(){return Ge}function tr(e,t){return Jn(bn,e,t)}function nr(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 Ha(e){return tu=gn=1,ja=_t(bn=e),Ge=0,[]}function $a(e){return bn="",e}function uu(e){return za(tr(Ge-1,Eo(e===91?e+2:e===40?e+1:e)))}function nh(e){for(;(we=Et())&&we<33;)Ke();return nr(e)>2||nr(we)>3?"":" "}function rh(e,t){for(;--t&&Ke()&&!(we<48||we>102||we>57&&we<65||we>70&&we<97););return tr(e,ru()+(t<6&&Et()==32&&Ke()==32))}function Eo(e){for(;Ke();)switch(we){case e:return Ge;case 34:case 39:e!==34&&e!==39&&Eo(we);break;case 40:e===41&&Eo(e);break;case 92:Ke();break}return Ge}function uh(e,t){for(;Ke()&&e+we!==57;)if(e+we===84&&Et()===47)break;return"/*"+tr(t,Ge-1)+"*"+Jr(e===47?e:Ke())}function oh(e){for(;!nr(Et());)Ke();return tr(e,Ge)}function ih(e){return $a(ou("",null,null,null,[""],e=Ha(e),0,[0],e))}function ou(e,t,n,r,o,u,a,s,l){for(var d=0,f=0,c=a,h=0,p=0,m=0,x=1,y=1,v=1,g=0,b="",w=o,k=u,D=r,S=b;y;)switch(m=g,g=Ke()){case 40:if(m!=108&&Ne(S,c-1)==58){Co(S+=le(uu(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=uu(g);break;case 9:case 10:case 13:case 32:S+=nh(m);break;case 92:S+=rh(ru()-1,7);continue;case 47:switch(Et()){case 42:case 47:eu(ah(uh(Ke(),ru()),t,n),l);break;default:S+="/"}break;case 123*x:s[d++]=_t(S)*v;case 125*x:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+f:v==-1&&(S=le(S,/\f/g,"")),p>0&&_t(S)-c&&eu(p>32?Wa(S+";",r,n,c-1):Wa(le(S," ","")+";",r,n,c-2),l);break;case 59:S+=";";default:if(eu(D=Ua(S,t,n,d,f,o,s,b,w=[],k=[],c),u),g===123)if(f===0)ou(S,t,D,D,w,u,c,s,k);else switch(h===99&&Ne(S,3)===110?100:h){case 100:case 108:case 109:case 115:ou(e,D,D,r&&eu(Ua(e,D,D,0,0,o,s,b,o,w=[],c),k),o,k,c,s,r?w:k);break;default:ou(S,D,D,D,[""],k,0,s,k)}}d=f=p=0,x=v=1,b=S="",c=a;break;case 58:c=1+_t(S),p=m;default:if(x<1){if(g==123)--x;else if(g==125&&x++==0&&th()==125)continue}switch(S+=Jr(g),g*x){case 38:v=f>0?1:(S+="\f",-1);break;case 44:s[d++]=(_t(S)-1)*v,v=1;break;case 64:Et()===45&&(S+=uu(Ke())),h=Et(),f=c=_t(b=S+=oh(ru())),g++;break;case 45:m===45&&_t(S)==2&&(x=0)}}return u}function Ua(e,t,n,r,o,u,a,s,l,d,f){for(var c=o-1,h=o===0?u:[""],p=_o(h),m=0,x=0,y=0;m<r;++m)for(var v=0,g=Jn(e,c+1,c=Zf(x=a[m])),b=e;v<p;++v)(b=za(x>0?h[v]+" "+g:le(g,/&\f/g,h[v])))&&(l[y++]=b);return nu(e,t,n,o===0?Ao:s,l,d,f)}function ah(e,t,n){return nu(e,t,n,Ma,Jr(eh()),Jn(e,2,-2),0)}function Wa(e,t,n,r){return nu(e,t,n,ko,Jn(e,0,r),Jn(e,r+1,-1),r)}function yn(e,t){for(var n="",r=_o(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function sh(e,t,n,r){switch(e.type){case qf:if(e.children.length)break;case Xf:case ko:return e.return=e.return||e.value;case Ma:return"";case Ba:return e.return=e.value+"{"+yn(e.children,r)+"}";case Ao:e.value=e.props.join(",")}return _t(n=yn(e.children,r))?e.return=e.value+"{"+n+"}":""}function lh(e){var t=_o(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 ch(e){return function(t){t.root||(t=t.return)&&e(t)}}function dh(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var fh=function(t,n,r){for(var o=0,u=0;o=u,u=Et(),o===38&&u===12&&(n[r]=1),!nr(u);)Ke();return tr(t,Ge)},hh=function(t,n){var r=-1,o=44;do switch(nr(o)){case 0:o===38&&Et()===12&&(n[r]=1),t[r]+=fh(Ge-1,n,r);break;case 2:t[r]+=uu(o);break;case 4:if(o===44){t[++r]=Et()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Jr(o)}while(o=Ke());return t},mh=function(t,n){return $a(hh(Ha(t),n))},Ga=new WeakMap,ph=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&&!Ga.get(r))&&!o){Ga.set(t,!0);for(var u=[],a=mh(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]}}},gh=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Xa(e,t){switch(Kf(e,t)){case 5103:return se+"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 se+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return se+e+Qr+e+Ve+e+e;case 6828:case 4268:return se+e+Ve+e+e;case 6165:return se+e+Ve+"flex-"+e+e;case 5187:return se+e+le(e,/(\w+).+(:[^]+)/,se+"box-$1$2"+Ve+"flex-$1$2")+e;case 5443:return se+e+Ve+"flex-item-"+le(e,/flex-|-self/,"")+e;case 4675:return se+e+Ve+"flex-line-pack"+le(e,/align-content|flex-|-self/,"")+e;case 5548:return se+e+Ve+le(e,"shrink","negative")+e;case 5292:return se+e+Ve+le(e,"basis","preferred-size")+e;case 6060:return se+"box-"+le(e,"-grow","")+se+e+Ve+le(e,"grow","positive")+e;case 4554:return se+le(e,/([^-])(transform)/g,"$1"+se+"$2")+e;case 6187:return le(le(le(e,/(zoom-|grab)/,se+"$1"),/(image-set)/,se+"$1"),e,"")+e;case 5495:case 3959:return le(e,/(image-set\([^]*)/,se+"$1$`$1");case 4968:return le(le(e,/(.+:)(flex-)?(.*)/,se+"box-pack:$3"+Ve+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+se+e+e;case 4095:case 3583:case 4068:case 2532:return le(e,/(.+)-inline(.+)/,se+"$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(_t(e)-1-t>6)switch(Ne(e,t+1)){case 109:if(Ne(e,t+4)!==45)break;case 102:return le(e,/(.+:)(.+)-([^]+)/,"$1"+se+"$2-$3$1"+Qr+(Ne(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Co(e,"stretch")?Xa(le(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ne(e,t+1)!==115)break;case 6444:switch(Ne(e,_t(e)-3-(~Co(e,"!important")&&10))){case 107:return le(e,":",":"+se)+e;case 101:return le(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+se+(Ne(e,14)===45?"inline-":"")+"box$3$1"+se+"$2$3$1"+Ve+"$2box$3")+e}break;case 5936:switch(Ne(e,t+11)){case 114:return se+e+Ve+le(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return se+e+Ve+le(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return se+e+Ve+le(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return se+e+Ve+e+e}return e}var bh=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case ko:t.return=Xa(t.value,t.length);break;case Ba:return yn([er(t,{value:le(t.value,"@","@"+se)})],o);case Ao:if(t.length)return Jf(t.props,function(u){switch(Qf(u,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return yn([er(t,{props:[le(u,/:(read-\w+)/,":"+Qr+"$1")]})],o);case"::placeholder":return yn([er(t,{props:[le(u,/:(plac\w+)/,":"+se+"input-$1")]}),er(t,{props:[le(u,/:(plac\w+)/,":"+Qr+"$1")]}),er(t,{props:[le(u,/:(plac\w+)/,Ve+"input-$1")]})],o)}return""})}},yh=[bh],wh=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(x){var y=x.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var o=t.stylisPlugins||yh,u={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)u[y[v]]=!0;s.push(x)});var l,d=[ph,gh];{var f,c=[sh,ch(function(x){f.insert(x)})],h=lh(d.concat(o,c)),p=function(y){return yn(ih(y),h)};l=function(y,v,g,b){f=g,p(y?y+"{"+v.styles+"}":v.styles),b&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new Gf({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 m.sheet.hydrate(s),m};function xh(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 vh={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},Ah=/[A-Z]|^ms/g,kh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qa=function(t){return t.charCodeAt(1)===45},Za=function(t){return t!=null&&typeof t!="boolean"},So=dh(function(e){return qa(e)?e:e.replace(Ah,"-$&").toLowerCase()}),Ya=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kh,function(r,o,u){return Ht={name:o,styles:u,next:Ht},o})}return vh[t]!==1&&!qa(t)&&typeof n=="number"&&n!==0?n+"px":n};function iu(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 Ht={name:o.name,styles:o.styles,next:Ht},o.name;var u=n;if(u.styles!==void 0){var a=u.next;if(a!==void 0)for(;a!==void 0;)Ht={name:a.name,styles:a.styles,next:Ht},a=a.next;var s=u.styles+";";return s}return Ch(e,t,n)}}var l=n;if(t==null)return l;var d=t[l];return d!==void 0?d:l}function Ch(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=iu(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]+"}":Za(s)&&(r+=So(u)+":"+Ya(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++)Za(a[l])&&(r+=So(u)+":"+Ya(u,a[l])+";");else{var d=iu(e,t,a);switch(u){case"animation":case"animationName":{r+=So(u)+":"+d+";";break}default:r+=u+"{"+d+"}"}}}return r}var Ka=/label:\s*([^\s;{]+)\s*(;|$)/g,Ht;function Do(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="";Ht=void 0;var u=e[0];if(u==null||u.raw===void 0)r=!1,o+=iu(n,t,u);else{var a=u;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=iu(n,t,e[s]),r){var l=u;o+=l[s]}Ka.lastIndex=0;for(var d="",f;(f=Ka.exec(o))!==null;)d+="-"+f[1];var c=xh(o)+d;return{name:c,styles:o,next:Ht}}function Qa(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var _h=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},Eh=function(t,n,r){_h(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 Ja(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function es(e,t,n){var r=[],o=Qa(e,r,n);return r.length<2?n:o+t(r)}var Sh=function(t){var n=wh(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=Do(d,n.registered,void 0);return Eh(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=Do(d,n.registered),h="animation-"+c.name;return Ja(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=Do(d,n.registered);Ja(n,c)},a=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];return es(n.registered,r,Dh(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:Qa.bind(null,n.registered),merge:es.bind(null,n.registered,r)}},Dh=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},Fh=Sh({key:"css"}),Fo=Fh.css,Th=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ts={exports:{}};/*!
|
|
27
27
|
Copyright (c) 2018 Jed Watson.
|
|
28
28
|
Licensed under the MIT License (MIT), see
|
|
29
29
|
http://jedwatson.github.io/classnames
|
|
30
|
-
*/(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})()})(
|
|
30
|
+
*/(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})()})(ts);var Ih=ts.exports;const To=Nh(Ih),ns={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 Oh{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 Lh(){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 No={exports:{}};(function(e,t){(function(n,r){r(t)})(Th,function(n){var r=Object.defineProperty,o=Object.defineProperties,u=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(N,V,L)=>V in N?r(N,V,{enumerable:!0,configurable:!0,writable:!0,value:L}):N[V]=L,f=(N,V)=>{for(var L in V||(V={}))s.call(V,L)&&d(N,L,V[L]);if(a)for(var L of a(V))l.call(V,L)&&d(N,L,V[L]);return N},c=(N,V)=>o(N,u(V)),h=(N,V,L)=>new Promise((O,U)=>{var J=re=>{try{K(L.next(re))}catch(ae){U(ae)}},Y=re=>{try{K(L.throw(re))}catch(ae){U(ae)}},K=re=>re.done?O(re.value):Promise.resolve(re.value).then(J,Y);K((L=L.apply(N,V)).next())}),p=(N=>(N[N.NONE=0]="NONE",N[N.LOADING=1]="LOADING",N[N.LOADED=2]="LOADED",N[N.ERROR=3]="ERROR",N))(p||{});class m{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 x="__RUNTIME_IMPORT__";function y(N,V){var L,O;const U=globalThis,J=(L=U[x])!=null?L:U[x]={};return(O=J[N])!=null?O:J[N]=V()}const v=y("cssCache",()=>new m(N=>({url:N,status:p.NONE,el:null,error:null,reject:null})));function g(N,V,L){const O={handleLoad(){N.removeEventListener("load",O.handleLoad),N.removeEventListener("error",O.handleError),V()},handleError(U){N.removeEventListener("load",O.handleLoad),N.removeEventListener("error",O.handleError),L(U)}};N.addEventListener("load",O.handleLoad),N.addEventListener("error",O.handleError)}function b(N){const V=v.getOrCreateItemByURL(N),{status:L,error:O}=V;return L===p.LOADED?Promise.resolve():L===p.ERROR?Promise.reject(O):L===p.LOADING?new Promise((U,J)=>{const{el:Y}=V;g(Y,()=>U(),K=>J(K.error))}):(V.status=p.LOADING,new Promise((U,J)=>{const Y=document.createElement("link");Y.rel="stylesheet",Y.href=N,g(Y,()=>{V.status=p.LOADED,U()},K=>{const re=K.error||new Error(`Load css failed. href=${N}`);V.status=p.ERROR,V.error=re,J(re)}),V.el=Y,Y.setAttribute("data-runtime-import-type","css"),document.head.appendChild(Y)}))}function w(N){return Promise.all(N.map(V=>b(V))).then(()=>Promise.resolve()).catch(V=>Promise.reject(V))}const k=y("jsCache",()=>new m(N=>({url:N,status:p.NONE,el:null,error:null,reject:null,exportThing:void 0}))),D=globalThis,{define:S}=D,{keys:_}=Object;let X=!1;typeof S<"u"&&!S.runtime_import&&(console.warn("runtime-import should NOT coexist with requiesjs or seajs or any other AMD/CMD loader."),X=!0);const j=y("pendingItemMap",()=>({})),B=function(...N){const V=N.pop(),{currentScript:L}=document;if(!L)throw new Error("currentScript is null.");const{src:O}=L,U=j[O];if(!U)throw new Error(`Can NOT find item, src=${O}`);j[O]=null;try{let J=N[0]||[],Y=null;typeof J=="string"&&(Y=J,J=N[1]||[]);const K=U.exportThing=(()=>{let re=!1;const ae={};let ve=V(...J.map(Te=>Te==="exports"?(re=!0,ae):D[Te]));return!ve&&re&&(ve=ae),ve})();Y&&(D[Y]=K),K&&_(K).length===1&&K.default&&(U.exportThing=K.default,U.exportThing.default=K.default)}catch(J){U.status=p.ERROR,J instanceof Error&&(U.error=J),U.reject(J)}},H=()=>{const{currentScript:N}=document;if(N){const{src:V}=N;if(j[V])return!0}return!1};["amd","cmd"].forEach(N=>{Object.defineProperty(B,N,{get:H})}),B.runtime_import=!0;function I(N,V){if(X)throw new Error("runtime-import UMD mode uses window.define, you should NOT have your own window.define.");D.define||(D.define=B),j[N]=V}function W(N){const V=/legao-comp\/(.*)\/[\d.]+\/web.js$/.exec(N),L=window;if(V&&V.length>0){const O=V[1];L.g_config=L.g_config||{},L.g_config.appKey=O}}function G(N,V,L){N.status=p.LOADING,W(V);const{umd:O,crossOrigin:U}=L;return new Promise((J,Y)=>{const K=document.createElement("script");if(K.src=V,K.async=!1,K.crossOrigin=U,O){K.setAttribute("data-runtime-import-type","javascript-umd"),N.reject=Y;const re=K.src;I(re,N)}else K.setAttribute("data-runtime-import-type","javascript");g(K,()=>{N.status=p.LOADED,N.el=null,J(N.exportThing)},re=>{const ae=re.error||new Error(`Load javascript failed. src=${V}`);N.status=p.ERROR,N.error=ae,N.el=null,Y(ae)}),N.el=K,document.body.appendChild(K)})}function T(N,V){const L=k.getOrCreateItemByURL(N),{status:O,exportThing:U,error:J}=L;if(O===p.LOADED)return Promise.resolve(U);if(O===p.ERROR)return Promise.reject(J);if(O===p.LOADING){const{el:Y}=L;return new Promise((K,re)=>{g(Y,()=>K(L.exportThing),ae=>re(ae.error))})}return G(L,N,V)}function C(N,V){let L=Promise.resolve();const O=N.length-1,{umd:U}=V;return N.forEach((J,Y)=>{const K=U&&Y===O;L=L.then(()=>T(J,c(f({},V),{umd:K})))}),L}function F(N){return h(this,null,function*(){const{scripts:V,styles:L}=N;if(L){const{urls:K}=L;yield w(K)}const{dependencies:O=[],entry:U,umd:J=!0,crossOrigin:Y="anonymous"}=V;if((U?O.concat([U]):O).length)return yield C(O.concat([U]),{umd:J,crossOrigin:Y})})}function P(N,V){return h(this,null,function*(){const L=V??{};return yield F({scripts:{dependencies:[],entry:N,umd:L.umd,crossOrigin:L.crossOrigin}})})}function M(N){return h(this,null,function*(){return yield F({scripts:{dependencies:[],entry:""},styles:{urls:[N]}})})}const z=F;n.importComponent=F,n.importModule=z,n.importScript=P,n.importStyle=M,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(No,No.exports);var Vh=No.exports;function Ph(){async function e(t){return await Vh.importScript(t)}return{loadWidgetAPI:e}}const wn=i.defineComponent({name:"FXWidgetContainer",props:ns,setup(e,t){const{loadWidgetAPI:n}=Ph(),{deepEqual:r}=Lh(),o=i.ref(null),u=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),d=i.computed(()=>{const g=Fo`width:100%!important`;return To("caf-assistant-widget-container__root",g,e.className)}),f=Fo`
|
|
31
31
|
overflow: hidden;
|
|
32
|
-
`,c=To("caf-assistant-widget-container__inner",f),h=i.computed(()=>{const
|
|
32
|
+
`,c=To("caf-assistant-widget-container__inner",f),h=i.computed(()=>{const g=Fo`
|
|
33
33
|
display: ${l.value?"block":"none"};
|
|
34
|
-
`;return To("caf-assistant-widget-container__error",b)}),m=()=>{const b=a.value;b&&(s.value=new Ih(b))},p=()=>{const b=s.value;b&&(b.dispose(),s.value=null)},x=()=>{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{x(),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 w=u.value;w&&(!g||!r(g,b))&&w.updateOptions(b)}catch(w){A(w)}}),i.watch(()=>e.widgetData,(b,g)=>{try{const w=u.value;w&&(!g||!r(g,b))&&w.updateData(b)}catch(w){A(w)}}),i.onMounted(async()=>{try{const b=a.value;if(b){m();const g=s.value;if(g){await y();const w=u.value;w&&(w.updateOptions(e.widgetOptions),w.updateData(e.widgetData),w.mount(g.getElement()),i.nextTick(()=>{b.parentElement&&(b.style.width="100%")}))}}}catch(b){A(b)}}),i.onBeforeUnmount(async()=>{try{x(),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)])}}),ns=(e,t)=>{var n;if(e.type===Le.AssistantWidgetComplete){const r=e;return r.widgetUrl?i.createVNode(wn,{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},Ph=3e4,rs=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 au(e){const t=Pe(e);if(t)for(let n=Et.length-1;n>=0;n--)Et[n]===t&&Et.splice(n,1)}function Rh(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function su(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 Mh(){return Et[Et.length-1]||void 0}function lu(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 Io(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())lu(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 us(e,t){for(const[n,r]of Qe){const o=Pe(n),u=e!==""&&o===e,a=String(t??"").trim(),s=e&&lu(r.config,e)||a&&lu(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 Oo(){return{pendingKeys:[...Ie.keys()],bootstrapQueue:[...Et],activeKeys:[...Qe.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function Bh(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,...Oo()})}function zh(e){const t=Pe(e);if(t){if(us(t,e))return{ok:!1,reason:"already_active_duplicate"};const r=Io(t);if(r)return{ok:!0,...r}}else if(us("",e))return{ok:!1,reason:"already_active_duplicate"};for(let n=0;n<Et.length;n++){const r=Et[n],o=Io(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 os(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())lu(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 jh(e){const t=Pe(e);if(!t)return t;const n=os(t);if(n)return n.config.instanceId;const r=Io(t);return r?r.canonicalKey:Ie.size===1?[...Ie.keys()][0]:Qe.size===1?[...Qe.values()][0].config.instanceId:t}function Lo(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function is(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(Lo(t)),!0}catch(n){return console.warn("[DynamicComponent] onAssistantMessage failed",n),!1}}function Hh(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 as(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=Hh(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),au(e.instanceId),su(e.instanceId),u(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},Ph);a.timeoutId=s,Ie.set(e.instanceId,a),Et.push(e.instanceId),Rh(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),au(e.instanceId),su(e.instanceId),u(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${rs}ms after load: ${e.name||e.componentId}`)))},rs)},l.onerror=()=>{clearTimeout(s),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Ie.delete(e.instanceId),au(e.instanceId),su(e.instanceId),u(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(l)})}function ss(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 $h(e,t){const n=Pe(e);if(!n)return!1;const r=os(n);if(r)return is(r.api,t);const o=jh(n),u=nr.get(o)??[],a=u.findIndex(s=>s.messageId===t.messageId);return a>=0?u[a]=Lo(t):u.push(Lo(t)),nr.set(o,u),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=Oo,window.__fluens_dynamic_component_register=function(e,t){const n=Pe(e),r=zh(e);if(!r.ok){if(r.reason==="already_active_duplicate")return;Bh(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;au(o),su(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=>is(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="",as(e.config).then(()=>{t.value="ready"}).catch(s=>{t.value="error",n.value=s.message||"Unknown error"}))}),i.onUnmounted(()=>{u.value||ss(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])])])}}),ls=(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 Uh(){return{[Le.Text]:Hf,[Le.AssistantWidgetComplete]:ns,[Le.AssistantWidgetPending]:ns,[Le.DynamicComponentComplete]:ls,[Le.DynamicComponentPending]:ls}}const Wh=i.defineComponent({name:"FXBubbleTextContent",props:Cc,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:n}=Di(),{propertyStates:r,registerProperty:o,updatePropertyValue:u,startStreaming:a}=Pr();o("title",e.title??""),o("subtitle",e.subtitle??""),o("text",e.text??""),i.watch([()=>e.title,()=>e.subtitle,()=>e.text],([p,x,y])=>{u("title",p??""),u("subtitle",x??""),u("text",y??"")});const s=i.computed(()=>e.textFormat==="markdown"),l=i.ref(!1),d=i.computed(()=>{var p,x,y;return l.value?{title:((p=r.title)==null?void 0:p.displayedValue)??"",subtitle:((x=r.subtitle)==null?void 0:x.displayedValue)??"",text:((y=r.text)==null?void 0:y.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),f=i.computed(()=>jc(d.value.text)),c={shouldShowMarkdown:s,emit:t.emit,renderFileEmbeddedContent:n},h=Uh(),m=()=>f.value.length===0?null:i.createVNode("div",{class:"f-chat-bubble-text-collection"},[f.value.map((p,x)=>{var y;return(y=h[p.type])==null?void 0:y.call(h,p,x,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()])}}),Gh={content:{type:Object},outputMode:{type:String,default:"full"}};function rr({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 Xh=i.defineComponent({name:"FXBubbleThink",props:Gh,setup(e,t){var X;const{propertyStates:n,registerProperty:r,updatePropertyValue:o,isAllDone:u}=Pr(),{elapsedSeconds:a,hasEverStarted:s,start:l,stop:d,reset:f}=Wu(),c=i.ref(((X=e.content)==null?void 0:X.completed)!==!0),h=i.ref(null),m=i.ref(null),p=i.ref(!1),x=i.ref(!1),y=i.computed(()=>e.outputMode==="streaming"),A=i.computed(()=>{var j;return(j=e.content)==null?void 0:j.completed}),b=i.computed(()=>{var B,H;if(A.value){const I=s.value?`(用时${a.value}秒)`:"";return((B=e.content)==null?void 0:B.title)??"思考完成"+I}return((H=e.content)==null?void 0:H.title)??"正在思考......"}),g=i.computed(()=>{var j,B;return y.value?((j=n.content)==null?void 0:j.displayedValue)??"":((B=e.content)==null?void 0:B.content)??""}),w=i.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!A.value,"is-completed":A.value})),k=()=>{const j=h.value;if(!j||!p.value){x.value=!1;return}x.value=j.scrollTop>0};i.watch(()=>A.value,j=>{j?d():l()},{immediate:!0}),i.watch(()=>A.value,j=>{j&&(c.value=!1)}),i.watch(()=>e.content,j=>{j&&(n.content?o("content",j.content??""):r("content",j.content??""))},{immediate:!0}),i.watch(g,async()=>{if(c.value){await i.nextTick();const j=h.value;if(!j)return;await i.nextTick(),p.value=j.scrollHeight>j.clientHeight,p.value?(j.scrollTop=j.scrollHeight,x.value=!0):x.value=!1}},{immediate:!0}),i.watch(c,async j=>{if(j){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,x.value=!0):x.value=!1}}),i.onUnmounted(()=>{f()}),t.expose({instance:{get loadDone(){return e.content?(y.value?u.value:!0)&&A.value:!0}}});const D=()=>{c.value=!c.value},S=()=>A.value?null:i.createVNode(rr,{status:"Working",variant:"thinking"},null),_=()=>!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&&x.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:w.value},[i.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:D},[S(),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)]),_()])}}),qh={content:{type:Object}},cs={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 Zh(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 Yh(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),x=i.computed(()=>document.documentElement.scrollTop),{hostLeft:y,hostTop:A,hostWidth:b,hostHeight:g,hostBottom:w}=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}),D=i.computed(()=>({left:`${c.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function S(L){if(L&&e.keepWidthWithReference){const O=L.getBoundingClientRect();a.value=Math.max(e.minWidth,O.width)}}function _(L,O){const U=b.value-L.width-4;return U>0?U:O}function X(L,O){const U=g.value-L.height-12;return U>0?U:O}function j(L,O,U){const J=c.value,Y=O.left-y.value+O.width/2+p.value,K=O.top-A.value-(L.height+U.height)+x.value;return{popoverLeft:Y,popoverTop:K,arrowLeft:J}}function B(L,O,U){const J=O.top-A.value+(O.height+U.height)+x.value,Y=X(L,J);return Math.min(J,Y)}function H(L,O){const U=_(O,L),J=L<=U?c.value:L-U;return{popoverLeft:Math.min(L,U),arrowLeft:J,maxHeight:0}}function I(L,O){const U=_(O,L),J=L<=U?c.value:L-U;return{popoverLeft:L,arrowLeft:J,maxHeight:0}}function W(L,O,U){const J=O.left-y.value+p.value,{arrowLeft:Y,popoverLeft:K}=I(J,L),{popoverTop:re}=j(L,O,U);return{popoverLeft:K,popoverTop:re,arrowLeft:Y,maxHeight:0}}function G(L,O,U){const J=O.left-y.value+O.width/2-(U.width/2-(L.left-y.value))+p.value,{arrowLeft:Y,popoverLeft:K}=H(J,L),re=B(L,O,U);return{popoverLeft:K,popoverTop:re,arrowLeft:Y,maxHeight:0}}function T(L,O,U){const J=O.left-y.value+p.value,{arrowLeft:Y,popoverLeft:K}=H(J,L),re=B(L,O,U);return{popoverLeft:K,popoverTop:re,arrowLeft:Y,maxHeight:0}}function C(L,O,U){const J=O.left-y.value;let Y=0,K=0,re=0,ae=0,ve="bottom-left";window.innerWidth-J>L.width?Y=J+p.value:(Y=O.right-L.width+p.value,re=L.width-U.width-20);let Te=0;if(e.limitContentBySpace){const qt={topHeight:O.top-A.value-U.height-8,bottomHeight:w.value-O.bottom-U.height-8};Te=Math.max(qt.topHeight,qt.bottomHeight),L.height>Te&&(ae=Te,n.value.classList.add("popover-limitmax"))}const yt=ae?Math.floor(ae):L.height,Me=O.top-A.value+(O.height+U.height);return w.value-Me>yt?K=Me+x.value:(K=O.top-yt-U.height+x.value,w.value-Me>O.top?(K=Me+x.value,yt>O.top&&(K=w.value-yt)):(K=K<0?0:K,ve="top")),n.value.classList.add("popover-"+ve,"bs-popover-"+ve),{popoverLeft:Y<0?5:Y,popoverTop:K,arrowLeft:re,maxHeight:ae}}function F(L,O,U){const J=O.left+O.width,Y=Math.max(O.top-(L.height/2-O.height/2),A.value);let K=A.value+g.value-L.height;K<0&&(K=Y);const re=Math.min(Y,K);return{popoverLeft:J,popoverTop:re,arrowLeft:0,maxHeight:0}}function P(L,O,U){const J=O.left+O.width,Y=Math.max(O.top-O.height,A.value);let K=A.value+g.value-L.height;K<0&&(K=Y);const re=Math.min(Y,K);return{popoverLeft:J,popoverTop:re,arrowLeft:0,maxHeight:0}}const M=new Map([["top",j],["top-left",W],["bottom",G],["bottom-left",T],["right",F],["right-top",P],["auto",C]]);function z(L){var K;e.keepWidthWithReference&&S(L);const O=L.getBoundingClientRect();l.value=O.top,d.value=O.left;const U=t.value?t.value.getBoundingClientRect():{height:4,width:4},J=(K=n.value)==null?void 0:K.getBoundingClientRect();a.value=J.width;const Y=M.get(f.value);if(Y){const{arrowLeft:re,popoverLeft:ae,popoverTop:ve,maxHeight:Te}=Y(J,O,U);c.value=re,h.value=ae,m.value=ve,s.value=Te||-1}}function N(L){if(L){const O=L.getBoundingClientRect();(O.left!==d.value||O.top!==l.value)&&z(L)}}function V(){f.value=e.placement,c.value=0,h.value=0,m.value=0,a.value=-1}return{arrowStyle:D,popoverStyle:k,position:f,popoverWidth:a,fitToReference:S,followToReferencePosition:N,locateToReference:z,resetPosition:V}}function Kh(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=x=>{var b;if(!o.value)return;const y=o.value.contains(x.target);if(x.type==="scroll"||x.type==="wheel"&&y){m();return}if(x.target.closest(".time-picker-panel"))return;const A=(b=x.target)==null?void 0:b.closest(".popover");if(A&&r.value&&A===r.value){x.type!=="scroll"&&x.type!=="wheel"&&x.stopPropagation();return}if(!y&&s.value){const g=o.value.closest(".popover");g&&g.removeEventListener("click",h),m()}};async function p(x){if(r.value&&(e.showArrow===!1||e.showArrow&&n.value)&&x){c(),s.value=!0,o.value=x,u.value&&d(x),await i.nextTick(),f(x),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=x.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 Qh(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 Qt=i.defineComponent({name:"FXPopover",props:cs,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=Zh(e),{host:l}=s,d=Yh(e,n,r,s),{position:f,arrowStyle:c,popoverStyle:h,fitToReference:m,locateToReference:p}=d,{showPopover:x,hidePopverOnClickBodyHandler:y}=Kh(e,t,n,r,o,u,d),{onResize:A}=Qh(e,t,o,u,d,r),b=i.computed(()=>{let S=f.value;S==="top-left"&&(S="top");const _=`popover in popover-${S}`,X=`bs-popover-${S}`,j={"popover-fitcontent":e.fitContent,fade:!0};j[_]=!0,j[X]=!0;const B=(e.class||"").split(" ");return e.isSimpleTips&&B.unshift("popover-tips"),B.reduce((H,I)=>(H[I]=!0,H),j),j}),g=i.computed(()=>({"popover-content":!0,"popover-body":!0})),w=i.computed(()=>{const S={};return S.opacity=x.value?1:0,S.visibility=x.value?"visible":"hidden",S.zIndex=1060,S}),k=i.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:D}=Jh(w,50);return i.onMounted(()=>{var S;u.value&&m(o.value),e.reference&&p(o.value),window.addEventListener("resize",A),(S=r.value)==null||S.focus()}),i.onUnmounted(()=>{document.body.removeEventListener("click",y),window.removeEventListener("resize",A),x.value=!1}),()=>i.createVNode(i.Teleport,{to:l},{default:()=>{var S;return[i.withDirectives(i.createVNode("div",{tabindex:"-1",ref:r,class:b.value,style:{...h.value,...D.value},onMousedown:_=>{_.stopPropagation()},onClick:_=>{_.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&&((S=t.slots)==null?void 0:S.default())])]),[[i.vShow,x.value]])]}})}}),cu="FarrisX_PopoverInstancesKey";window[cu]=window[cu]||new WeakMap;function Vo(e,t,n){e.stopPropagation();const r=t.value;r&&r.value&&!r.value.isShow&&(r.value.show(n),window[cu].set(n,r.value))}function ds(e,t,n){e.stopPropagation(),t.value.value.hide(),window[cu].delete(n)}function ep(e,t,n){e.stopPropagation();const r=t.value;r&&r.value&&(r.value.isShow?ds(e,t,n):Vo(e,t,n))}function fs(e,t,n){t.arg&&t.arg==="toggle"?ep(e,t,n):Vo(e,t,n)}const hs={mounted:(e,t,n)=>{t.modifiers.hover?(e.addEventListener("mouseenter",r=>Vo(r,t,e)),e.addEventListener("mouseleave",r=>ds(r,t,e))):t.modifiers.click?e.addEventListener("click",r=>fs(r,t,e)):e.addEventListener("click",r=>fs(r,t,e)),e.classList.add("v-popover")},unMounted:(e,t,n)=>{}};Qt.install=e=>{e.component(Qt.name,Qt),e.directive("fxpopover",hs)};const ps={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}},ms={items:{type:Array,default:()=>[]}},gs={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"}},du=i.defineComponent({name:"FXTodoListItemView",props:gs,emits:["click"],setup(e,{emit:t}){const{propertyStates:n,registerProperty:r,updatePropertyValue:o,startStreaming:u}=Pr();r("title",e.title??""),r("task",e.task??""),r("detail",e.message??""),i.watch([()=>e.title,()=>e.task,()=>e.message],([m,p,x])=>{o("title",m??""),o("task",p??""),o("detail",x??"")});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(Jt,{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(rr,{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])])])}}),ur=i.defineComponent({name:"FXTodoListView",props:ms,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(du,i.mergeProps({key:r},n),null))]):null}}}),tp=300,np={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},Jt=i.defineComponent({name:"FXStartedTodo",props:ps,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}=ki(()=>({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},tp))}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(ur,{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(Qt,{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 x=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(!x.value)return null;const{done:b,total:g}=y.value,w=g>0?`已完成 (${b}/${g})`:"已完成";return i.createVNode("span",{class:"f-chat-started-todo-completed-chip","aria-label":w},[w])}return()=>i.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working","is-completed":x.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"},[np[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()])}});Jt.install=e=>{e.component(Jt.name,Jt)};const rp=i.defineComponent({name:"FXBubbleThoughtChain",props:qh,setup(e,t){const{elapsedSeconds:n,hasEverStarted:r,start:o,stop:u,reset:a}=Wu(),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,x,y;return e.content?i.createVNode(Jt,{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:(x=e.content)==null?void 0:x.completedCount,totalCount:(y=e.content)==null?void 0:y.totalCount},null):null}}}),or=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]))])])}}),up=300,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),{getToolIconClass:n}=Gu(),r=i.computed(()=>e.content.success===!1),o=i.ref(!1);let u=setTimeout(()=>{o.value=!0},up);i.onBeforeUnmount(()=>{u&&clearTimeout(u)});const a=i.computed(()=>t.value),s=i.computed(()=>o.value&&!t.value),l=i.computed(()=>r.value?"执行失败":a.value?"执行完成":"调用中"),d=i.ref(!1),f=i.computed(()=>({"f-chat-tool-use":!0,"is-done":a.value,"is-error":r.value})),c=i.computed(()=>({"f-chat-tool-use-status":!0,"is-done":a.value&&!r.value,"is-run":s.value&&!r.value,"is-error":r.value}));i.watch(()=>[e.content.result,e.content.toolResultApplied,e.content.success],()=>{t.value&&(d.value=!1)},{flush:"post"});const h=()=>t.value?i.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>i.createVNode("div",{class:f.value},[i.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{d.value=!d.value}},[i.createVNode("i",{class:"fx-icon fx-icon-"+n(e.content.toolName)+" tool-icon"},null),i.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),i.createVNode("div",{class:c.value},[r.value?i.createVNode(rr,{status:"Error",variant:"tool-use"},null):i.createVNode(rr,{status:a.value?"Done":s.value?"Working":"NotStart",variant:"tool-use"},null),i.createVNode("span",{class:"f-chat-tool-use-status-text"},[l.value])]),i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:d.value?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease"}},null)]),d.value&&i.createVNode("div",{class:"f-chat-tool-use-content"},[h()])])}});vn.install=e=>{e.component(vn.name,vn)};const ir=i.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":or,"fx-app-preview-inline":at,FXToolUse:vn},props:Or,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 ke({},(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(T=>T.type==="md"&&T.content);if(W.length===0)return;const G=Object.fromEntries(W.map(T=>[T.name,T.content??""]));e.onPreview({contentMap:G,contentType:"markdown"})},{renderFileEmbeddedContent:c,renderPageEmbeddedContent:h}=Di(),m=i.ref(""),p=i.computed(()=>{var W,G;if((W=e.content)!=null&&W.footerContent)return e.content.footerContent;const I=(G=e.content)==null?void 0:G.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 T,C;const G=(C=(T=n.value)==null?void 0:T.parentElement)==null?void 0:C.clientWidth;G&&(m.value=`${G*W/100}px`)})}else m.value=I},{immediate:!0});const x=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"?gc:bc}const A=y(),{renderHeader:b}=A(e,t),g=()=>{var G,T,C;const I=((G=e.content)==null?void 0:G.sender)??"发送人",W=x(((T=e.content)==null?void 0:T.sender)??"");return i.createVNode("div",{class:"f-chat-bubble-avatar"},[(C=e.content)!=null&&C.avatar?i.createVNode("img",{src:e.content.avatar,alt:I},null):i.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[W])])},w=()=>{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((G,T)=>i.createVNode(vn,{key:G.toolUseId??`tu-${T}`,content:G},null))]):null},k=()=>{var I;return(I=e.content)!=null&&I.thinkingContent?i.createVNode(Xh,{ref:r,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},D=()=>{var I;return(I=e.content)!=null&&I.startedTodo?i.createVNode(rp,{ref:o,content:e.content.startedTodo},null):null},S=I=>{if(!(I!=null&&I.type))return null;const{type:W}=I;return W==="page"&&I.pageUrl?h(I,{onNavigate:G=>{var T;(T=e.onPreview)==null||T.call(e,{url:G})}}):W==="file"&&I.fileContent?c(I,{onPreviewFile:d,onBatchPreviewFile:f}):W==="template"&&I.template?I.template():null},_=()=>{var T,C,F;if(!((F=(C=(T=e.content)==null?void 0:T.structuredContent)==null?void 0:C.sections)!=null&&F.length))return null;const{sections:I,showDivider:W}=e.content.structuredContent,G=P=>{const{content:M,label:z}=P;return z||M&&typeof M=="string"?i.createVNode(i.Fragment,null,[i.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),P.label&&i.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[P.label]),i.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[P.content])]):S(P.content)};return i.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":W}]},[I.map((P,M)=>i.createVNode("div",{key:M,class:["f-chat-bubble-structured-section",{"section-divider":P.showDivider}]},[i.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[P.icon&&(P.icon.startsWith("http")||P.icon.startsWith("//")||P.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test(P.icon)?i.createVNode("img",{alt:P.title,src:P.icon,class:"f-chat-bubble-structured-section-icon"},null):i.createVNode("i",{class:`fx-icon ${P.icon}`,style:P.iconStyle},null)),i.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[P.title])]),P.items&&P.items.length>0&&i.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[P.items.map((z,N)=>i.createVNode("div",{key:N,class:"f-chat-bubble-structured-section-item"},[G(z)]))])]))])},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},[S(I)])},j=()=>{const I=e.attachmentRowClickOpensPreview!==!1?d:void 0;return i.createVNode(Si,{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((G,T)=>G.kind==="userAuth"?i.createVNode(i.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${T}`,content:G.content,onConfirm:e.onUserAuthConfirm},null):i.createVNode(i.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${T}`,content:G.content,onOpen:e.onPreview},null)):null},H=()=>{var I,W,G,T,C,F;return i.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[a.value&&b(),j(),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(),w()]),D(),_(),i.createVNode(Wh,{title:((W=e.content)==null?void 0:W.title)??"",subtitle:((G=e.content)==null?void 0:G.subtitle)??"",text:typeof((T=e.content)==null?void 0:T.text)=="string"?e.content.text:"",textFormat:((C=e.content)==null?void 0:C.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(),H()]):i.createVNode(i.Fragment,null,[H(),u.value&&g()])])])}}),bs={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},Po=i.defineComponent({name:"FXBubbleAction",props:bs,setup(e,t){const n=i.computed(()=>ke({},e.customStyle));return()=>t.slots.default&&i.createVNode("span",{class:"f-chat-bubble-footer-action",style:n.value},[t.slots.default()])}});ir.install=e=>{e.component(ir.name,ir),e.component(Po.name,Po)};const ys={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"}},ws={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:()=>({})}},fu=i.defineComponent({name:"FXCarouselItem",props:ws,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=ke({},(c=e.styles)==null?void 0:c.item);return ke(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 op(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))},x=()=>{!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&&x()};return i.onMounted(()=>{x()}),i.onUnmounted(()=>{y()}),{currentIndex:a,totalItems:d,isSingleItem:f,trackStyle:c,goTo:h,next:m,prev:p,handleMouseEnter:A,handleMouseLeave:b}}const ar=i.defineComponent({name:"FXCarousel",props:ys,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}=op({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 D;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,(D=e.classNames)==null?void 0:D.root)}),m=i.computed(()=>{var S;const k={height:typeof e.height=="number"?`${e.height}px`:e.height},D=ke(k,e.customStyle);return ke(D,(S=e.styles)==null?void 0:S.root)}),p=i.computed(()=>{var D;const k={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return ye(k,(D=e.classNames)==null?void 0:D.container)}),x=i.computed(()=>{var D;return ye({"fx-carousel--track":!0},(D=e.classNames)==null?void 0:D.track)}),y=i.computed(()=>{var D;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,(D=e.classNames)==null?void 0:D.indicator)}),A=k=>{var S,_;const D={"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 D[`fx-carousel--arrow-${e.buttonPosition}`]=!0,ye(D,k==="left"?(S=e.classNames)==null?void 0:S.arrowLeft:(_=e.classNames)==null?void 0:_.arrowRight)},b=k=>{var _,X;if(o.value)return null;const D=k==="left"?l:s,S=t[k==="left"?"prevArrow":"nextArrow"];return i.createVNode("button",{class:A(k),style:k==="left"?(_=e.styles)==null?void 0:_.arrowLeft:(X=e.styles)==null?void 0:X.arrowRight,onClick:D,"aria-label":`${k} arrow`},[S?S():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((D,S)=>{var _,X;return i.createVNode("button",{"aria-label":`indicator ${S}`,key:S,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":S===r.value}],style:S===r.value?(_=e.styles)==null?void 0:_.indicatorItemActive:(X=e.styles)==null?void 0:X.indicatorItem,onClick:()=>{a(S),c(S)}},null)})])},w=()=>i.createVNode("div",{class:x.value,style:u.value},[e.items.map((k,D)=>i.createVNode(fu,{key:k.id||`item_${D}`,item:k,showInfo:e.showInfo,index:D,active:D===r.value,styles:e.styles,classNames:e.classNames,onClick:(S,_,X)=>{n("item-click",S,_,X)}},{default:()=>{var S,_;return[(S=t.item)==null?void 0:S.call(t,{item:k,index:D,active:D===r.value}),(_=t[`item${D}`])==null?void 0:_.call(t,{item:k,index:D,active:D===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"),w(),e.buttonPosition==="inner"&&b("right")]),e.buttonPosition==="outer"&&b("right"),g()])}}});ar.install=e=>{e.component(ar.name,ar),e.component(fu.name,fu)};const xs={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function ip(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 w=e.value;if(w){const{left:k,right:D,width:S}=w.getBoundingClientRect();let _=y.clientX-k;g==="right"&&(_=D-y.clientX),_>A&&(_=A),_<b&&(_=b),g==="right"&&(_=S-_),r.value=_}}function c(y,A,b,g){const w=e.value;if(w){const{top:k,bottom:D,height:S}=w.getBoundingClientRect();let _=y.clientY-k;g==="bottom"&&(_=D-y.clientY),_>A&&(_=A),_<b&&(_=b),g==="bottom"&&(_=S-_),o.value=_}}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 w=g==null?void 0:g.right,k=g==null?void 0:g.left;if(y==="left"&&k)return w?b.width-w.clientWidth-A:b.width-A;if(y==="right"&&w)return k?b.width-k.clientWidth-A:b.width-A}}function x(y,A){const b=h(),g=m();if(b&&g){const w=g==null?void 0:g.bottom,k=g==null?void 0:g.top;if(y==="top"&&k)return w?b.height-w.clientHeight-A:b.height-A;if(y==="bottom"&&w)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:x}}const An=i.defineComponent({name:"FXSplitter",props:xs,emits:[],setup(e,t){const n=i.ref(),r=ip(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 ke(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)])}}),ap={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 sp(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="",x,y,A;const b=()=>e.maxWidth?e.maxWidth:h(p,e.minWidth)||0,g=()=>e.maxHeight?e.maxHeight:m(p,e.minHeight)||0;function w(S){if((p==="left"||p==="right")&&y){const{left:_}=y.getBoundingClientRect(),{width:X}=x.getBoundingClientRect(),j=S.clientX-_;let B=p==="left"?(X||0)+(j-o.value):(X||0)-(j-o.value);B=e.minWidth>0?Math.max(e.minWidth,B):B;const H=b();H!=null&&H>0&&(B=H>B?B:H),n.value=B}if((p==="top"||p==="bottom")&&y){const{top:_}=y.getBoundingClientRect(),{height:X}=x.getBoundingClientRect(),j=S.clientY-_;let B=p==="top"?(X||0)+(j-l.value):(X||0)-(j-l.value);B=e.minHeight>0?Math.max(e.minHeight,B):B;const H=g();H!=null&&H>0&&(B=H>B?B:H),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",w),document.body.style.userSelect="",p="",x=null,y=null}function k(S,_,X){if(p=_,x=X,a.value=!0,y=S.composedPath().find(B=>B.className.split(" ")[0]==="f-splitter"),y){const{left:B}=y.getBoundingClientRect();u.value=S.clientX-B,o.value=S.clientX-B;const H=b();A=I=>f(I,H,e.minWidth,p),document.addEventListener("mousemove",A),document.addEventListener("mouseup",w),document.body.style.userSelect="none"}}function D(S,_,X){if(p=_,x=X,s.value=!0,y=S.composedPath().find(B=>B.className.split(" ")[0]==="f-splitter"),y){const{top:B}=y.getBoundingClientRect();d.value=S.clientY-B,l.value=S.clientY-B;const H=g();A=I=>c(I,H,e.minHeight,p),document.addEventListener("mousemove",A),document.addEventListener("mouseup",w),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:r,onClickSplitterHorizontalResizeBar:k,onClickSplitterVerticalResizeBar:D}}const sr=i.defineComponent({name:"FSplitterPane",props:ap,emits:[],setup(e,t){const n=i.ref(),r=i.inject("splitter"),{useResizeHandleComposition:o}=r,u=sp(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(w=>w===g)):[]),m=i.computed(()=>{const g={};return(s.value||s.value===0)&&(f.value==="left"||f.value==="right"||h.value.find(w=>w==="e")||h.value.find(w=>w==="w"))&&(g.width=`${s.value}px`),(a.value||a.value===0)&&(f.value==="bottom"||f.value==="top"||h.value.find(w=>w==="s")||h.value.find(w=>w==="n"))&&(g.height=`${a.value}px`),e.visible||(g.display="none"),ke(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 x(g){return{e:"left",w:"right",s:"top",n:"bottom"}[g]||g}function y(g,w){w=x(w),["left","right"].find(k=>k===w)&&l(g,w,n.value),["top","bottom"].find(k=>k===w)&&d(g,w,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:w=>y(w,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(sr.name,sr)};const vs={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},As={content:{type:String,default:null}},lp=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},cp=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},lr=(e,t=new WeakMap)=>{if(e===null||lp(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return cp(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,lr(o,t))}),r}if(e instanceof Set){const r=new Set;t.set(e,r);for(const o of e)r.add(lr(o,t));return r}if(Array.isArray(e)){const r=[];return t.set(e,r),e.forEach(o=>{r.push(lr(o,t))}),r}const n={};t.set(e,n);for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=lr(e[r],t));return n},dp=(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)})},Ro=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,hu=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),fp=new Set(["__proto__","constructor","prototype"]),hp=e=>!fp.has(e),Mo=(e,t,n={})=>{if(Array.isArray(e)&&Array.isArray(t))return Bo(e,t,n);const{excludeKeys:r}=n,o=e,u=t;for(const a of Object.keys(u)){if(!hp(a))continue;const s=u[a],l=o[a];r&&r(a)?o[a]=s:Array.isArray(s)&&Array.isArray(l)?o[a]=Bo(l,s,n):hu(s)&&hu(l)?o[a]=Mo(l,s,n):o[a]=s}return e},Bo=(e,t,n)=>{const r=e.slice();return t.forEach((o,u)=>{const a=r[u];Array.isArray(o)&&Array.isArray(a)?r[u]=Bo(a,o,n):hu(o)&&hu(a)?r[u]=Mo(a,o,n):r[u]=o}),r},Z="md-editor",de="https://unpkg.com",pp=`${de}/@highlightjs/cdn-assets@11.11.1/highlight.min.js`,ks={main:`${de}/prettier@3.8.1/standalone.js`,markdown:`${de}/prettier@3.8.1/plugins/markdown.js`},mp={css:`${de}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${de}/cropperjs@1.6.2/dist/cropper.min.js`},gp=`${de}/screenfull@5.2.0/dist/screenfull.js`,bp=`${de}/mermaid@11.12.3/dist/mermaid.min.js`,yp={js:`${de}/katex@0.16.33/dist/katex.min.js`,css:`${de}/katex@0.16.33/dist/katex.min.css`},zo={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`}},wp=`${de}/echarts@6.0.0/dist/echarts.min.js`,Cs={"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:pp,css:zo},prettier:{standaloneJs:ks.main,parserMarkdownJs:ks.markdown},cropper:{...mp},screenfull:{js:gp},mermaid:{js:bp,enableZoom:!0},katex:{...yp},echarts:{js:wp}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},xp=({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]},vp="buildFinished",jo="errorCatcher",Ho="catalogChanged",Ap="pushCatalog",_s="rerender",kp="taskStateChanged";class Cp{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 Cp,_p=(e,t)=>{if(!e)return e;const n=t.split(`
|
|
35
|
-
`),r=['<span rn-wrapper aria-hidden="true">'];return n.forEach(()=>{r.push("<span></span>")}),r.push("</span>"),`<span class="${Z}-code-block">${e}</span>${r.join("")}`};async function Es(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 Ep={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 ${Z}-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 ${Z}-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 ${Z}-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 ${Z}-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 ${Z}-icon"><path d="M20 6 9 17l-5-5"/></svg>`},St=(e,t)=>typeof t[e]=="string"?t[e]:Ep[e],$t=(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=Dp(e,u);t.onload&&a.addEventListener("load",t.onload),document.head.appendChild(a)}},Sp=(e,t)=>{var n;(n=document.getElementById(t.id))==null||n.remove(),$t(e,t)},Dp=(e,t)=>{const n=document.createElement(e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n},Fp=(e,t)=>{const n=new Map;return e==null||e.forEach(r=>{let o=r.querySelector(`.${Z}-mermaid-action`);o?o.querySelector(`.${Z}-mermaid-copy`)||o.insertAdjacentHTML("beforeend",`<span class="${Z}-mermaid-copy">${St("copy",t.customIcon)}</span>`):(r.insertAdjacentHTML("beforeend",`<div class="${Z}-mermaid-action"><span class="${Z}-mermaid-copy">${St("copy",t.customIcon)}</span></div>`),o=r.querySelector(`.${Z}-mermaid-action`));const u=o.querySelector(`.${Z}-mermaid-copy`);let a=-1;const s=()=>{clearTimeout(a),Es(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()}},Tp=(()=>{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=w=>{w.touches.length===1?(a=!0,s=w.touches[0].clientX-o,l=w.touches[0].clientY-u):w.touches.length===2&&(d=Math.hypot(w.touches[0].clientX-w.touches[1].clientX,w.touches[0].clientY-w.touches[1].clientY),f=r)},m=w=>{if(w.preventDefault(),a&&w.touches.length===1)o=w.touches[0].clientX-s,u=w.touches[0].clientY-l,c();else if(w.touches.length===2){const k=Math.hypot(w.touches[0].clientX-w.touches[1].clientX,w.touches[0].clientY-w.touches[1].clientY)/d,D=r;r=f*(1+(k-1));const S=(w.touches[0].clientX+w.touches[1].clientX)/2,_=(w.touches[0].clientY+w.touches[1].clientY)/2,X=n.getBoundingClientRect(),j=(S-X.left)/D,B=(_-X.top)/D;o-=j*(r-D),u-=B*(r-D),c()}},p=()=>{a=!1},x=w=>{w.preventDefault();const k=.02,D=r;w.deltaY<0?r+=k:r=Math.max(.1,r-k);const S=n.getBoundingClientRect(),_=w.clientX-S.left,X=w.clientY-S.top;o-=_/D*(r-D),u-=X/D*(r-D),c()},y=w=>{a=!0,s=w.clientX-o,l=w.clientY-u},A=w=>{a&&(o=w.clientX-s,u=w.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",x,{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",x),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(`.${Z}-mermaid-action`);u?u.querySelector(`.${Z}-mermaid-zoom`)||u.insertAdjacentHTML("beforeend",`<span class="${Z}-mermaid-zoom">${St("pin-off",n.customIcon)}</span>`):(o.insertAdjacentHTML("beforeend",`<div class="${Z}-mermaid-action"><span class="${Z}-mermaid-zoom">${St("pin-off",n.customIcon)}</span></div>`),u=o.querySelector(`.${Z}-mermaid-action`));const a=u.querySelector(`.${Z}-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()}}})(),Ss=new Set([!0,!1,"alt","title"]);function Ds(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function Fs(e,t){e&&e.attrs&&(e.attrs=Ds(e.attrs,t))}function Np(e,t){if(!Ss.has(e))throw new TypeError(`figcaption must be one of: ${[...Ss]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([r])=>r==="title");return Array.isArray(n)&&n[1]?(Fs(t,"title"),n[1]):void 0}function Ip(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=Np(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=Ds(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]]),Fs(l,"src")}}})}const Op=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Lp(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(Op,"$1");const l=e.push("sub_close","sub",-1);return l.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function Vp(e){e.inline.ruler.after("emphasis","sub",Lp)}const Pp=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Rp(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(Pp,"$1");const l=e.push("sup_close","sup",-1);return l.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function Mp(e){e.inline.ruler.after("emphasis","sup",Rp)}var Bp=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ts=new Set,$o=typeof process=="object"&&process?process:{},Ns=(e,t,n,r)=>{typeof $o.emitWarning=="function"?$o.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},pu=globalThis.AbortController,Is=globalThis.AbortSignal;if(typeof pu>"u"){Is=class{constructor(){fe(this,"onabort");fe(this,"_onabort",[]);fe(this,"reason");fe(this,"aborted",!1)}addEventListener(n,r){this._onabort.push(r)}},pu=class{constructor(){fe(this,"signal",new Is);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=((Ml=$o.env)==null?void 0:Ml.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{e&&(e=!1,Ns("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 zp=e=>!Ts.has(e),Ut=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Os=e=>Ut(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?mu:null:null,mu=class extends Array{constructor(t){super(t),this.fill(0)}},jp=(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=Os(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),Hp=(On=class{constructor(t){ie(this,q);ie(this,it);ie(this,Je);ie(this,ct);ie(this,un);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,Ce);ie(this,ht);ie(this,xe);ie(this,he);ie(this,ue);ie(this,$e);ie(this,et);ie(this,Re);ie(this,De);ie(this,pt);ie(this,Fe);ie(this,mt);ie(this,gt);ie(this,tt);ie(this,nt);ie(this,bt);ie(this,Xt);ie(this,Ue);ie(this,Nn);ie(this,on,()=>{});ie(this,It,()=>{});ie(this,Dr,()=>{});ie(this,rt,()=>!1);ie(this,an,t=>{});ie(this,In,(t,n,r)=>{});ie(this,Fr,(t,n,r,o)=>{if(r||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});fe(this,Bl,"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:x=0,sizeCalculation:y,fetchMethod:A,memoMethod:b,noDeleteOnFetchRejection:g,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:D,ignoreFetchAbort:S,perf:_}=t;if(_!==void 0&&typeof(_==null?void 0:_.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(ne(this,ft,_??Bp),n!==0&&!Ut(n))throw new TypeError("max option must be a nonnegative integer");let X=n?Os(n):Array;if(!X)throw new Error("invalid max value: "+n);if(ne(this,it,n),ne(this,Je,p),this.maxEntrySize=x||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,Xt,!!A),ne(this,xe,new Map),ne(this,he,new Array(n).fill(void 0)),ne(this,ue,new Array(n).fill(void 0)),ne(this,$e,new X(n)),ne(this,et,new X(n)),ne(this,Re,0),ne(this,De,0),ne(this,pt,jp.create(n)),ne(this,Ce,0),ne(this,ht,0),typeof d=="function"&&ne(this,ct,d),typeof f=="function"&&ne(this,un,f),typeof c=="function"?(ne(this,dt,c),ne(this,Fe,[])):(ne(this,dt,void 0),ne(this,Fe,void 0)),ne(this,bt,!!v(this,ct)),ne(this,Nn,!!v(this,un)),ne(this,Ue,!!v(this,dt)),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!g,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!D,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(v(this,Je)!==0&&!Ut(v(this,Je)))throw new TypeError("maxSize must be a positive integer if specified");if(!Ut(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Q(this,q,oc).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=Ut(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=r||0,this.ttl){if(!Ut(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Q(this,q,mi).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 j="LRU_CACHE_UNBOUNDED";zp(j)&&(Ts.add(j),Ns("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,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,xe),keyList:v(t,he),valList:v(t,ue),next:v(t,$e),prev:v(t,et),get head(){return v(t,Re)},get tail(){return v(t,De)},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,Hu).call(a,n,r,o,u)},moveToTail:n=>{var r;return Q(r=t,q,Ir).call(r,n)},indexes:n=>{var r;return Q(r=t,q,Zt).call(r,n)},rindexes:n=>{var r;return Q(r=t,q,Yt).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,Ce)}get fetchMethod(){return v(this,Fn)}get memoMethod(){return v(this,Tn)}get dispose(){return v(this,ct)}get onInsert(){return v(this,un)}get disposeAfter(){return v(this,dt)}getRemainingTTL(t){return v(this,xe).has(t)?1/0:0}*entries(){for(let t of Q(this,q,Zt).call(this))v(this,ue)[t]!==void 0&&v(this,he)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,ue)[t])&&(yield[v(this,he)[t],v(this,ue)[t]])}*rentries(){for(let t of Q(this,q,Yt).call(this))v(this,ue)[t]!==void 0&&v(this,he)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,ue)[t])&&(yield[v(this,he)[t],v(this,ue)[t]])}*keys(){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,ue)[t])&&(yield n)}}*rkeys(){for(let t of Q(this,q,Yt).call(this)){let n=v(this,he)[t];n!==void 0&&!Q(this,q,pe).call(this,v(this,ue)[t])&&(yield n)}}*values(){for(let t of Q(this,q,Zt).call(this))v(this,ue)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,ue)[t])&&(yield v(this,ue)[t])}*rvalues(){for(let t of Q(this,q,Yt).call(this))v(this,ue)[t]!==void 0&&!Q(this,q,pe).call(this,v(this,ue)[t])&&(yield v(this,ue)[t])}[(zl=Symbol.iterator,Bl=Symbol.toStringTag,zl)](){return this.entries()}find(t,n={}){for(let r of Q(this,q,Zt).call(this)){let o=v(this,ue)[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,Zt).call(this)){let o=v(this,ue)[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,Yt).call(this)){let o=v(this,ue)[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,Yt).call(this,{allowStale:!0}))v(this,rt).call(this,n)&&(Q(this,q,Kt).call(this,v(this,he)[n],"expire"),t=!0);return t}info(t){let n=v(this,xe).get(t);if(n===void 0)return;let r=v(this,ue)[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,Zt).call(this,{allowStale:!0})){let r=v(this,he)[n],o=v(this,ue)[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,x,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,Fr).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,Kt).call(this,t,"set"),this;let c=v(this,Ce)===0?void 0:v(this,xe).get(t);if(c===void 0)c=v(this,Ce)===0?v(this,De):v(this,pt).length!==0?v(this,pt).pop():v(this,Ce)===v(this,it)?Q(this,q,ju).call(this,!1):v(this,Ce),v(this,he)[c]=t,v(this,ue)[c]=n,v(this,xe).set(t,c),v(this,$e)[v(this,De)]=c,v(this,et)[c]=v(this,De),ne(this,De,c),zu(this,Ce)._++,v(this,In).call(this,c,f,l),l&&(l.set="add"),d=!1,v(this,Nn)&&((h=v(this,un))==null||h.call(this,n,t,"add"));else{Q(this,q,Ir).call(this,c);let g=v(this,ue)[c];if(n!==g){if(v(this,Xt)&&Q(this,q,pe).call(this,g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:w}=g;w!==void 0&&!a&&(v(this,bt)&&((m=v(this,ct))==null||m.call(this,w,t,"set")),v(this,Ue)&&((p=v(this,Fe))==null||p.push([w,t,"set"])))}else a||(v(this,bt)&&((x=v(this,ct))==null||x.call(this,g,t,"set")),v(this,Ue)&&((y=v(this,Fe))==null||y.push([g,t,"set"])));if(v(this,an).call(this,c),v(this,In).call(this,c,f,l),v(this,ue)[c]=n,l){l.set="replace";let w=g&&Q(this,q,pe).call(this,g)?g.__staleWhileFetching:g;w!==void 0&&(l.oldValue=w)}}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,mi).call(this),v(this,tt)&&(d||v(this,Dr).call(this,c,o,u),l&&v(this,It).call(this,l,c)),!a&&v(this,Ue)&&v(this,Fe)){let g=v(this,Fe),w;for(;w=g==null?void 0:g.shift();)(b=v(this,dt))==null||b.call(this,...w)}return this}pop(){var t;try{for(;v(this,Ce);){let n=v(this,ue)[v(this,Re)];if(Q(this,q,ju).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,Fe)){let n=v(this,Fe),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,xe).get(t);if(u!==void 0){let a=v(this,ue)[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,on).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,xe).get(t);if(o===void 0||!r&&v(this,rt).call(this,o))return;let u=v(this,ue)[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:x,forceRefresh:y=!1,status:A,signal:b}=n;if(!v(this,Xt))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},w=v(this,xe).get(t);if(w===void 0){A&&(A.fetch="miss");let k=Q(this,q,Hu).call(this,t,w,g,x);return k.__returned=k}else{let k=v(this,ue)[w];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 D=v(this,rt).call(this,w);if(!y&&!D)return A&&(A.fetch="hit"),Q(this,q,Ir).call(this,w),o&&v(this,on).call(this,w),A&&v(this,It).call(this,A,w),k;let S=Q(this,q,Hu).call(this,t,w,g,x),_=S.__staleWhileFetching!==void 0&&r;return A&&(A.fetch=D?"stale":"refresh",_&&D&&(A.returnedStale=!0)),_?S.__staleWhileFetching:S.__returned=S}}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,xe).get(t);if(s!==void 0){let l=v(this,ue)[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,Kt).call(this,t,"expire"),a&&r&&(a.returnedStale=!0),r?l:void 0)):(a&&(a.get="hit"),d?l.__staleWhileFetching:(Q(this,q,Ir).call(this,s),o&&v(this,on).call(this,s),l))}else a&&(a.get="miss")}delete(t){return Q(this,q,Kt).call(this,t,"delete")}clear(){return Q(this,q,yi).call(this,"delete")}},it=new WeakMap,Je=new WeakMap,ct=new WeakMap,un=new WeakMap,dt=new WeakMap,Fn=new WeakMap,Tn=new WeakMap,ft=new WeakMap,Ce=new WeakMap,ht=new WeakMap,xe=new WeakMap,he=new WeakMap,ue=new WeakMap,$e=new WeakMap,et=new WeakMap,Re=new WeakMap,De=new WeakMap,pt=new WeakMap,Fe=new WeakMap,mt=new WeakMap,gt=new WeakMap,tt=new WeakMap,nt=new WeakMap,bt=new WeakMap,Xt=new WeakMap,Ue=new WeakMap,Nn=new WeakMap,q=new WeakSet,mi=function(){let t=new mu(v(this,it)),n=new mu(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,Dr,(s,l,d=v(this,ft).now())=>{n[s]=l!==0?d:0,t[s]=l,o(s,l)}),ne(this,on,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,Kt).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,xe).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})},on=new WeakMap,It=new WeakMap,Dr=new WeakMap,rt=new WeakMap,oc=function(){let t=new mu(v(this,it));ne(this,ht,0),ne(this,mt,t),ne(this,an,n=>{ne(this,ht,v(this,ht)-t[n]),t[n]=0}),ne(this,Fr,(n,r,o,u)=>{if(Q(this,q,pe).call(this,r))return 0;if(!Ut(o))if(u){if(typeof u!="function")throw new TypeError("sizeCalculation must be a function");if(o=u(r,n),!Ut(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,ju).call(this,!0)}ne(this,ht,v(this,ht)+t[n]),o&&(o.entrySize=r,o.totalCalculatedSize=v(this,ht))})},an=new WeakMap,In=new WeakMap,Fr=new WeakMap,Zt=function*({allowStale:t=this.allowStale}={}){if(v(this,Ce))for(let n=v(this,De);!(!Q(this,q,gi).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,Re)));)n=v(this,et)[n]},Yt=function*({allowStale:t=this.allowStale}={}){if(v(this,Ce))for(let n=v(this,Re);!(!Q(this,q,gi).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,De)));)n=v(this,$e)[n]},gi=function(t){return t!==void 0&&v(this,xe).get(v(this,he)[t])===t},ju=function(t){var u,a,s;let n=v(this,Re),r=v(this,he)[n],o=v(this,ue)[n];return v(this,Xt)&&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,Fe))==null||a.push([o,r,"evict"]))),v(this,an).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,ue)[n]=void 0,v(this,pt).push(n)),v(this,Ce)===1?(ne(this,Re,ne(this,De,0)),v(this,pt).length=0):ne(this,Re,v(this,$e)[n]),v(this,xe).delete(r),zu(this,Ce)._--,n},Hu=function(t,n,r,o){let u=n===void 0?void 0:v(this,ue)[n];if(Q(this,q,pe).call(this,u))return u;let a=new pu,{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=(x,y=!1)=>{let{aborted:A}=a.signal,b=r.ignoreFetchAbort&&x!==void 0,g=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&x!==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 w=m,k=v(this,ue)[n];return(k===m||b&&y&&k===void 0)&&(x===void 0?w.__staleWhileFetching!==void 0?v(this,ue)[n]=w.__staleWhileFetching:Q(this,q,Kt).call(this,t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(t,x,l.options))),x},f=x=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=x),c(x,!1)),c=(x,y)=>{let{aborted:A}=a.signal,b=A&&r.allowStaleOnFetchAbort,g=b||r.allowStaleOnFetchRejection,w=g||r.noDeleteOnFetchRejection,k=m;if(v(this,ue)[n]===m&&(!w||!y&&k.__staleWhileFetching===void 0?Q(this,q,Kt).call(this,t,"fetch"):b||(v(this,ue)[n]=k.__staleWhileFetching)),g)return r.status&&k.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw x},h=(x,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=>x(g===void 0?void 0:g),y),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(x(void 0),r.allowStaleOnFetchAbort&&(x=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,xe).get(t)):v(this,ue)[n]=p,p},pe=function(t){if(!v(this,Xt))return!1;let n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof pu},bi=function(t,n){v(this,et)[n]=t,v(this,$e)[t]=n},Ir=function(t){t!==v(this,De)&&(t===v(this,Re)?ne(this,Re,v(this,$e)[t]):Q(this,q,bi).call(this,v(this,et)[t],v(this,$e)[t]),Q(this,q,bi).call(this,v(this,De),t),ne(this,De,t))},Kt=function(t,n){var o,u,a,s,l,d;let r=!1;if(v(this,Ce)!==0){let f=v(this,xe).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,Ce)===1)Q(this,q,yi).call(this,n);else{v(this,an).call(this,f);let c=v(this,ue)[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,Fe))==null||s.push([c,t,n]))),v(this,xe).delete(t),v(this,he)[f]=void 0,v(this,ue)[f]=void 0,f===v(this,De))ne(this,De,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]}zu(this,Ce)._--,v(this,pt).push(f)}}if(v(this,Ue)&&((l=v(this,Fe))!=null&&l.length)){let f=v(this,Fe),c;for(;c=f==null?void 0:f.shift();)(d=v(this,dt))==null||d.call(this,...c)}return r},yi=function(t){var n,r,o,u;for(let a of Q(this,q,Yt).call(this,{allowStale:!0})){let s=v(this,ue)[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,Fe))==null||r.push([s,l,t]))}}if(v(this,xe).clear(),v(this,ue).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,De,0),v(this,pt).length=0,ne(this,ht,0),ne(this,Ce,0),v(this,Ue)&&v(this,Fe)){let a=v(this,Fe),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 en=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},gu=function(t){return t.tagName==="IMG"},$p=function(t){return NodeList.prototype.isPrototypeOf(t)},bu=function(t){return t&&t.nodeType===1},Ls=function(t){var n=t.currentSrc||t.src;return n.substr(-4).toLowerCase()===".svg"},Vs=function(t){try{return Array.isArray(t)?t.filter(gu):$p(t)?[].slice.call(t).filter(gu):bu(t)?[t].filter(gu):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(gu):[]}catch{throw new TypeError(`The provided selector is invalid.
|
|
34
|
+
`;return To("caf-assistant-widget-container__error",g)}),p=()=>{const g=a.value;g&&(s.value=new Oh(g))},m=()=>{const g=s.value;g&&(g.dispose(),s.value=null)},x=()=>{const g=u.value,b=o.value;g&&(g.unmount(),g.dispose()),b&&b.cleanup(),u.value=null,o.value=null},y=async()=>{const g=await n(e.widgetAPIURL);if(!g)throw new Error("Failed to load widget API");await g.initialize();const b=g.createWidget();o.value=g,u.value=b},v=g=>{console.error(g),l.value=g};return i.watch(()=>e.widgetAPIURL,async()=>{if(a.value)try{x(),await y();const g=a.value,b=u.value;b==null||b.updateOptions(e.widgetOptions),b==null||b.updateData(e.widgetData),g&&b&&await b.mount(g)}catch(g){v(g)}}),i.watch(()=>e.widgetOptions,(g,b)=>{try{const w=u.value;w&&(!b||!r(b,g))&&w.updateOptions(g)}catch(w){v(w)}}),i.watch(()=>e.widgetData,(g,b)=>{try{const w=u.value;w&&(!b||!r(b,g))&&w.updateData(g)}catch(w){v(w)}}),i.onMounted(async()=>{try{const g=a.value;if(g){p();const b=s.value;if(b){await y();const w=u.value;w&&(w.updateOptions(e.widgetOptions),w.updateData(e.widgetData),w.mount(b.getElement()),i.nextTick(()=>{g.parentElement&&(g.style.width="100%")}))}}}catch(g){v(g)}}),i.onBeforeUnmount(async()=>{try{x(),m()}catch(g){console.error(g)}}),()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{ref:a,class:c},null),i.createVNode("div",{class:h.value},null)])}}),rs=(e,t)=>{var n;if(e.type===Le.AssistantWidgetComplete){const r=e;return r.widgetUrl?i.createVNode(wn,{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},Rh=3e4,us=8e3,Ie=new Map,Qe=new Map,rr=new Map,St=[];function Pe(e){return String(e??"").replace(/^\ufeff/,"").replace(/[\u200b\u200c\u200d]/g,"").replace(/\u00a0/g," ").trim()}function au(e){const t=Pe(e);if(t)for(let n=St.length-1;n>=0;n--)St[n]===t&&St.splice(n,1)}function Mh(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function su(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 Bh(){return St[St.length-1]||void 0}function lu(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 Io(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())lu(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 os(e,t){for(const[n,r]of Qe){const o=Pe(n),u=e!==""&&o===e,a=String(t??"").trim(),s=e&&lu(r.config,e)||a&&lu(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 Oo(){return{pendingKeys:[...Ie.keys()],bootstrapQueue:[...St],activeKeys:[...Qe.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function zh(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,...Oo()})}function jh(e){const t=Pe(e);if(t){if(os(t,e))return{ok:!1,reason:"already_active_duplicate"};const r=Io(t);if(r)return{ok:!0,...r}}else if(os("",e))return{ok:!1,reason:"already_active_duplicate"};for(let n=0;n<St.length;n++){const r=St[n],o=Io(r);if(o)return St.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 is(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())lu(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 Hh(e){const t=Pe(e);if(!t)return t;const n=is(t);if(n)return n.config.instanceId;const r=Io(t);return r?r.canonicalKey:Ie.size===1?[...Ie.keys()][0]:Qe.size===1?[...Qe.values()][0].config.instanceId:t}function Lo(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function as(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(Lo(t)),!0}catch(n){return console.warn("[DynamicComponent] onAssistantMessage failed",n),!1}}function $h(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 ss(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=$h(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),au(e.instanceId),su(e.instanceId),u(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},Rh);a.timeoutId=s,Ie.set(e.instanceId,a),St.push(e.instanceId),Mh(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),au(e.instanceId),su(e.instanceId),u(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${us}ms after load: ${e.name||e.componentId}`)))},us)},l.onerror=()=>{clearTimeout(s),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Ie.delete(e.instanceId),au(e.instanceId),su(e.instanceId),u(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(l)})}function ls(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)),rr.delete(e);const r=document.getElementById(`fluens-dynamic-component-${e}`);r&&r.remove()}function Uh(e,t){const n=Pe(e);if(!n)return!1;const r=is(n);if(r)return as(r.api,t);const o=Hh(n),u=rr.get(o)??[],a=u.findIndex(s=>s.messageId===t.messageId);return a>=0?u[a]=Lo(t):u.push(Lo(t)),rr.set(o,u),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=Oo,window.__fluens_dynamic_component_register=function(e,t){const n=Pe(e),r=jh(e);if(!r.ok){if(r.reason==="already_active_duplicate")return;zh(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;au(o),su(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=rr.get(l);d&&d.length>0&&(rr.delete(l),d.forEach(f=>as(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="",ss(e.config).then(()=>{t.value="ready"}).catch(s=>{t.value="error",n.value=s.message||"Unknown error"}))}),i.onUnmounted(()=>{u.value||ls(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])])])}}),cs=(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 n.emitDynamicComponentsDetectedOnce(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 Wh(){return{[Le.Text]:$f,[Le.AssistantWidgetComplete]:rs,[Le.AssistantWidgetPending]:rs,[Le.DynamicComponentComplete]:cs,[Le.DynamicComponentPending]:cs}}const Gh=i.defineComponent({name:"FXBubbleTextContent",props:_c,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:n}=Di(),{propertyStates:r,registerProperty:o,updatePropertyValue:u,startStreaming:a}=Rr();o("title",e.title??""),o("subtitle",e.subtitle??""),o("text",e.text??""),i.watch([()=>e.title,()=>e.subtitle,()=>e.text],([y,v,g])=>{u("title",y??""),u("subtitle",v??""),u("text",g??"")});const s=i.computed(()=>e.textFormat==="markdown"),l=i.ref(!1),d=i.computed(()=>{var y,v,g;return l.value?{title:((y=r.title)==null?void 0:y.displayedValue)??"",subtitle:((v=r.subtitle)==null?void 0:v.displayedValue)??"",text:((g=r.text)==null?void 0:g.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),f=i.computed(()=>Hc(d.value.text)),c=new Set;function h(y){const v=String(y.instanceId??"").trim();!v||c.has(v)||(c.add(v),i.nextTick(()=>t.emit("dynamicComponentsDetected",[y])))}const p={shouldShowMarkdown:s,emit:t.emit,emitDynamicComponentsDetectedOnce:h,renderFileEmbeddedContent:n},m=Wh(),x=()=>f.value.length===0?null:i.createVNode("div",{class:"f-chat-bubble-text-collection"},[f.value.map((y,v)=>{var g;return(g=m[y.type])==null?void 0:g.call(m,y,v,p)})]);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]),x()])}}),Xh={content:{type:Object},outputMode:{type:String,default:"full"}};function ur({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 qh=i.defineComponent({name:"FXBubbleThink",props:Xh,setup(e,t){var X;const{propertyStates:n,registerProperty:r,updatePropertyValue:o,isAllDone:u}=Rr(),{elapsedSeconds:a,hasEverStarted:s,start:l,stop:d,reset:f}=Wu(),c=i.ref(((X=e.content)==null?void 0:X.completed)!==!0),h=i.ref(null),p=i.ref(null),m=i.ref(!1),x=i.ref(!1),y=i.computed(()=>e.outputMode==="streaming"),v=i.computed(()=>{var j;return(j=e.content)==null?void 0:j.completed}),g=i.computed(()=>{var B,H;if(v.value){const I=s.value?`(用时${a.value}秒)`:"";return((B=e.content)==null?void 0:B.title)??"思考完成"+I}return((H=e.content)==null?void 0:H.title)??"正在思考......"}),b=i.computed(()=>{var j,B;return y.value?((j=n.content)==null?void 0:j.displayedValue)??"":((B=e.content)==null?void 0:B.content)??""}),w=i.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!v.value,"is-completed":v.value})),k=()=>{const j=h.value;if(!j||!m.value){x.value=!1;return}x.value=j.scrollTop>0};i.watch(()=>v.value,j=>{j?d():l()},{immediate:!0}),i.watch(()=>v.value,j=>{j&&(c.value=!1)}),i.watch(()=>e.content,j=>{j&&(n.content?o("content",j.content??""):r("content",j.content??""))},{immediate:!0}),i.watch(b,async()=>{if(c.value){await i.nextTick();const j=h.value;if(!j)return;await i.nextTick(),m.value=j.scrollHeight>j.clientHeight,m.value?(j.scrollTop=j.scrollHeight,x.value=!0):x.value=!1}},{immediate:!0}),i.watch(c,async j=>{if(j){await i.nextTick();const B=h.value;if(!B)return;await i.nextTick(),m.value=B.scrollHeight>B.clientHeight,m.value?(B.scrollTop=B.scrollHeight,x.value=!0):x.value=!1}}),i.onUnmounted(()=>{f()}),t.expose({instance:{get loadDone(){return e.content?(y.value?u.value:!0)&&v.value:!0}}});const D=()=>{c.value=!c.value},S=()=>v.value?null:i.createVNode(ur,{status:"Working",variant:"thinking"},null),_=()=>!b.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&&x.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:b.value},null)])])]);return()=>i.createVNode("div",{class:w.value},[i.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:D},[S(),i.createVNode("span",{class:"f-chat-bubble-thinking-title",innerHTML:g.value},null),b.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)]),_()])}}),Zh={content:{type:Object}},ds={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 Yh(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 Kh(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),p=i.ref(0),m=i.computed(()=>document.documentElement.scrollLeft),x=i.computed(()=>document.documentElement.scrollTop),{hostLeft:y,hostTop:v,hostWidth:g,hostHeight:b,hostBottom:w}=r;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, ${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}),D=i.computed(()=>({left:`${c.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function S(L){if(L&&e.keepWidthWithReference){const O=L.getBoundingClientRect();a.value=Math.max(e.minWidth,O.width)}}function _(L,O){const U=g.value-L.width-4;return U>0?U:O}function X(L,O){const U=b.value-L.height-12;return U>0?U:O}function j(L,O,U){const J=c.value,Y=O.left-y.value+O.width/2+m.value,K=O.top-v.value-(L.height+U.height)+x.value;return{popoverLeft:Y,popoverTop:K,arrowLeft:J}}function B(L,O,U){const J=O.top-v.value+(O.height+U.height)+x.value,Y=X(L,J);return Math.min(J,Y)}function H(L,O){const U=_(O,L),J=L<=U?c.value:L-U;return{popoverLeft:Math.min(L,U),arrowLeft:J,maxHeight:0}}function I(L,O){const U=_(O,L),J=L<=U?c.value:L-U;return{popoverLeft:L,arrowLeft:J,maxHeight:0}}function W(L,O,U){const J=O.left-y.value+m.value,{arrowLeft:Y,popoverLeft:K}=I(J,L),{popoverTop:re}=j(L,O,U);return{popoverLeft:K,popoverTop:re,arrowLeft:Y,maxHeight:0}}function G(L,O,U){const J=O.left-y.value+O.width/2-(U.width/2-(L.left-y.value))+m.value,{arrowLeft:Y,popoverLeft:K}=H(J,L),re=B(L,O,U);return{popoverLeft:K,popoverTop:re,arrowLeft:Y,maxHeight:0}}function T(L,O,U){const J=O.left-y.value+m.value,{arrowLeft:Y,popoverLeft:K}=H(J,L),re=B(L,O,U);return{popoverLeft:K,popoverTop:re,arrowLeft:Y,maxHeight:0}}function C(L,O,U){const J=O.left-y.value;let Y=0,K=0,re=0,ae=0,ve="bottom-left";window.innerWidth-J>L.width?Y=J+m.value:(Y=O.right-L.width+m.value,re=L.width-U.width-20);let Te=0;if(e.limitContentBySpace){const qt={topHeight:O.top-v.value-U.height-8,bottomHeight:w.value-O.bottom-U.height-8};Te=Math.max(qt.topHeight,qt.bottomHeight),L.height>Te&&(ae=Te,n.value.classList.add("popover-limitmax"))}const wt=ae?Math.floor(ae):L.height,Me=O.top-v.value+(O.height+U.height);return w.value-Me>wt?K=Me+x.value:(K=O.top-wt-U.height+x.value,w.value-Me>O.top?(K=Me+x.value,wt>O.top&&(K=w.value-wt)):(K=K<0?0:K,ve="top")),n.value.classList.add("popover-"+ve,"bs-popover-"+ve),{popoverLeft:Y<0?5:Y,popoverTop:K,arrowLeft:re,maxHeight:ae}}function F(L,O,U){const J=O.left+O.width,Y=Math.max(O.top-(L.height/2-O.height/2),v.value);let K=v.value+b.value-L.height;K<0&&(K=Y);const re=Math.min(Y,K);return{popoverLeft:J,popoverTop:re,arrowLeft:0,maxHeight:0}}function P(L,O,U){const J=O.left+O.width,Y=Math.max(O.top-O.height,v.value);let K=v.value+b.value-L.height;K<0&&(K=Y);const re=Math.min(Y,K);return{popoverLeft:J,popoverTop:re,arrowLeft:0,maxHeight:0}}const M=new Map([["top",j],["top-left",W],["bottom",G],["bottom-left",T],["right",F],["right-top",P],["auto",C]]);function z(L){var K;e.keepWidthWithReference&&S(L);const O=L.getBoundingClientRect();l.value=O.top,d.value=O.left;const U=t.value?t.value.getBoundingClientRect():{height:4,width:4},J=(K=n.value)==null?void 0:K.getBoundingClientRect();a.value=J.width;const Y=M.get(f.value);if(Y){const{arrowLeft:re,popoverLeft:ae,popoverTop:ve,maxHeight:Te}=Y(J,O,U);c.value=re,h.value=ae,p.value=ve,s.value=Te||-1}}function N(L){if(L){const O=L.getBoundingClientRect();(O.left!==d.value||O.top!==l.value)&&z(L)}}function V(){f.value=e.placement,c.value=0,h.value=0,p.value=0,a.value=-1}return{arrowStyle:D,popoverStyle:k,position:f,popoverWidth:a,fitToReference:S,followToReferencePosition:N,locateToReference:z,resetPosition:V}}function Qh(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 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=x=>{var g;if(!o.value)return;const y=o.value.contains(x.target);if(x.type==="scroll"||x.type==="wheel"&&y){p();return}if(x.target.closest(".time-picker-panel"))return;const v=(g=x.target)==null?void 0:g.closest(".popover");if(v&&r.value&&v===r.value){x.type!=="scroll"&&x.type!=="wheel"&&x.stopPropagation();return}if(!y&&s.value){const b=o.value.closest(".popover");b&&b.removeEventListener("click",h),p()}};async function m(x){if(r.value&&(e.showArrow===!1||e.showArrow&&n.value)&&x){c(),s.value=!0,o.value=x,u.value&&d(x),await i.nextTick(),f(x),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=x.closest(".popover");y&&y.addEventListener("click",h),t.emit("shown")}}return t.expose({hide:p,popoverRef:r,show:m,shown:l,isShow:s}),{showPopover:s,hidePopverOnClickBodyHandler:h}}function Jh(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 em(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 Qt=i.defineComponent({name:"FXPopover",props:ds,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=Yh(e),{host:l}=s,d=Kh(e,n,r,s),{position:f,arrowStyle:c,popoverStyle:h,fitToReference:p,locateToReference:m}=d,{showPopover:x,hidePopverOnClickBodyHandler:y}=Qh(e,t,n,r,o,u,d),{onResize:v}=Jh(e,t,o,u,d,r),g=i.computed(()=>{let S=f.value;S==="top-left"&&(S="top");const _=`popover in popover-${S}`,X=`bs-popover-${S}`,j={"popover-fitcontent":e.fitContent,fade:!0};j[_]=!0,j[X]=!0;const B=(e.class||"").split(" ");return e.isSimpleTips&&B.unshift("popover-tips"),B.reduce((H,I)=>(H[I]=!0,H),j),j}),b=i.computed(()=>({"popover-content":!0,"popover-body":!0})),w=i.computed(()=>{const S={};return S.opacity=x.value?1:0,S.visibility=x.value?"visible":"hidden",S.zIndex=1060,S}),k=i.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:D}=em(w,50);return i.onMounted(()=>{var S;u.value&&p(o.value),e.reference&&m(o.value),window.addEventListener("resize",v),(S=r.value)==null||S.focus()}),i.onUnmounted(()=>{document.body.removeEventListener("click",y),window.removeEventListener("resize",v),x.value=!1}),()=>i.createVNode(i.Teleport,{to:l},{default:()=>{var S;return[i.withDirectives(i.createVNode("div",{tabindex:"-1",ref:r,class:g.value,style:{...h.value,...D.value},onMousedown:_=>{_.stopPropagation()},onClick:_=>{_.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:b.value},[t.slots.default&&((S=t.slots)==null?void 0:S.default())])]),[[i.vShow,x.value]])]}})}}),cu="FarrisX_PopoverInstancesKey";window[cu]=window[cu]||new WeakMap;function Vo(e,t,n){e.stopPropagation();const r=t.value;r&&r.value&&!r.value.isShow&&(r.value.show(n),window[cu].set(n,r.value))}function fs(e,t,n){e.stopPropagation(),t.value.value.hide(),window[cu].delete(n)}function tm(e,t,n){e.stopPropagation();const r=t.value;r&&r.value&&(r.value.isShow?fs(e,t,n):Vo(e,t,n))}function hs(e,t,n){t.arg&&t.arg==="toggle"?tm(e,t,n):Vo(e,t,n)}const ms={mounted:(e,t,n)=>{t.modifiers.hover?(e.addEventListener("mouseenter",r=>Vo(r,t,e)),e.addEventListener("mouseleave",r=>fs(r,t,e))):t.modifiers.click?e.addEventListener("click",r=>hs(r,t,e)):e.addEventListener("click",r=>hs(r,t,e)),e.classList.add("v-popover")},unMounted:(e,t,n)=>{}};Qt.install=e=>{e.component(Qt.name,Qt),e.directive("fxpopover",ms)};const ps={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}},gs={items:{type:Array,default:()=>[]}},bs={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"}},du=i.defineComponent({name:"FXTodoListItemView",props:bs,emits:["click"],setup(e,{emit:t}){const{propertyStates:n,registerProperty:r,updatePropertyValue:o,startStreaming:u}=Rr();r("title",e.title??""),r("task",e.task??""),r("detail",e.message??""),i.watch([()=>e.title,()=>e.task,()=>e.message],([p,m,x])=>{o("title",p??""),o("task",m??""),o("detail",x??"")});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&&u()}),()=>i.createVNode("li",{key:e.id,class:a.value,onClick:l},[e.todoList&&e.todoList.length>0&&i.createVNode(Jt,{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(ur,{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])])])}}),or=i.defineComponent({name:"FXTodoListView",props:gs,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(du,i.mergeProps({key:r},n),null))]):null}}}),nm=300,rm={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},Jt=i.defineComponent({name:"FXStartedTodo",props:ps,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}=ki(()=>({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},nm))}function f(){e.detailViewMode!=="expand"&&(r.value!=null&&(window.clearTimeout(r.value),r.value=null),o.value=window.setTimeout(()=>{var g,b;(b=(g=n.value)==null?void 0:g.hide)==null||b.call(g),o.value=null},150))}function c(){if(e.detailViewMode==="none")return null;const g=a.value.detail??"";return i.createVNode(i.Fragment,null,[g?i.createVNode("div",{class:"f-chat-started-todo-task-detail"},[g]):null,i.createVNode(or,{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(Qt,{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 x=i.computed(()=>e.listStatus==="completed"),y=i.computed(()=>{const g=e.todoList??[],b=e.totalCount??g.length;return{done:e.completedCount??g.filter(k=>(k==null?void 0:k.status)==="Done").length,total:b}});function v(){if(!x.value)return null;const{done:g,total:b}=y.value,w=b>0?`已完成 (${g}/${b})`:"已完成";return i.createVNode("span",{class:"f-chat-started-todo-completed-chip","aria-label":w},[w])}return()=>i.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working","is-completed":x.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"},[rm[e.status]]),i.createVNode("span",{class:"f-chat-started-todo-message",innerHTML:e.message},null),v(),p()]),e.detailViewMode==="expand"&&i.createVNode("div",{class:l.value},[c()]),m()])}});Jt.install=e=>{e.component(Jt.name,Jt)};const um=i.defineComponent({name:"FXBubbleThoughtChain",props:Zh,setup(e,t){const{elapsedSeconds:n,hasEverStarted:r,start:o,stop:u,reset:a}=Wu(),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=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,p,m,x,y;return e.content?i.createVNode(Jt,{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:(x=e.content)==null?void 0:x.completedCount,totalCount:(y=e.content)==null?void 0:y.totalCount},null):null}}}),ir=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]))])])}}),om=300,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),{getToolIconClass:n}=Gu(),r=i.computed(()=>e.content.success===!1),o=i.ref(!1);let u=setTimeout(()=>{o.value=!0},om);i.onBeforeUnmount(()=>{u&&clearTimeout(u)});const a=i.computed(()=>t.value),s=i.computed(()=>o.value&&!t.value),l=i.computed(()=>r.value?"执行失败":a.value?"执行完成":"调用中"),d=i.ref(!1),f=i.computed(()=>({"f-chat-tool-use":!0,"is-done":a.value,"is-error":r.value})),c=i.computed(()=>({"f-chat-tool-use-status":!0,"is-done":a.value&&!r.value,"is-run":s.value&&!r.value,"is-error":r.value}));i.watch(()=>[e.content.result,e.content.toolResultApplied,e.content.success],()=>{t.value&&(d.value=!1)},{flush:"post"});const h=()=>t.value?i.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>i.createVNode("div",{class:f.value},[i.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{d.value=!d.value}},[i.createVNode("i",{class:"fx-icon fx-icon-"+n(e.content.toolName)+" tool-icon"},null),i.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),i.createVNode("div",{class:c.value},[r.value?i.createVNode(ur,{status:"Error",variant:"tool-use"},null):i.createVNode(ur,{status:a.value?"Done":s.value?"Working":"NotStart",variant:"tool-use"},null),i.createVNode("span",{class:"f-chat-tool-use-status-text"},[l.value])]),i.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:d.value?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease"}},null)]),d.value&&i.createVNode("div",{class:"f-chat-tool-use-content"},[h()])])}});vn.install=e=>{e.component(vn.name,vn)};const ar=i.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":ir,"fx-app-preview-inline":at,FXToolUse:vn},props:Lr,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 ke({},(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(T=>T.type==="md"&&T.content);if(W.length===0)return;const G=Object.fromEntries(W.map(T=>[T.name,T.content??""]));e.onPreview({contentMap:G,contentType:"markdown"})},{renderFileEmbeddedContent:c,renderPageEmbeddedContent:h}=Di(),p=i.ref(""),m=i.computed(()=>{var W,G;if((W=e.content)!=null&&W.footerContent)return e.content.footerContent;const I=(G=e.content)==null?void 0:G.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=m.value)==null?void 0:I.width},I=>{if(!I){p.value="";return}if(I.endsWith("%")){const W=parseFloat(I);isNaN(W)||i.nextTick(()=>{var T,C;const G=(C=(T=n.value)==null?void 0:T.parentElement)==null?void 0:C.clientWidth;G&&(p.value=`${G*W/100}px`)})}else p.value=I},{immediate:!0});const x=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"?bc:yc}const v=y(),{renderHeader:g}=v(e,t),b=()=>{var G,T,C;const I=((G=e.content)==null?void 0:G.sender)??"发送人",W=x(((T=e.content)==null?void 0:T.sender)??"");return i.createVNode("div",{class:"f-chat-bubble-avatar"},[(C=e.content)!=null&&C.avatar?i.createVNode("img",{src:e.content.avatar,alt:I},null):i.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[W])])},w=()=>{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((G,T)=>i.createVNode(vn,{key:G.toolUseId??`tu-${T}`,content:G},null))]):null},k=()=>{var I;return(I=e.content)!=null&&I.thinkingContent?i.createVNode(qh,{ref:r,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},D=()=>{var I;return(I=e.content)!=null&&I.startedTodo?i.createVNode(um,{ref:o,content:e.content.startedTodo},null):null},S=I=>{if(!(I!=null&&I.type))return null;const{type:W}=I;return W==="page"&&I.pageUrl?h(I,{onNavigate:G=>{var T;(T=e.onPreview)==null||T.call(e,{url:G})}}):W==="file"&&I.fileContent?c(I,{onPreviewFile:d,onBatchPreviewFile:f}):W==="template"&&I.template?I.template():null},_=()=>{var T,C,F;if(!((F=(C=(T=e.content)==null?void 0:T.structuredContent)==null?void 0:C.sections)!=null&&F.length))return null;const{sections:I,showDivider:W}=e.content.structuredContent,G=P=>{const{content:M,label:z}=P;return z||M&&typeof M=="string"?i.createVNode(i.Fragment,null,[i.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),P.label&&i.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[P.label]),i.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[P.content])]):S(P.content)};return i.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":W}]},[I.map((P,M)=>i.createVNode("div",{key:M,class:["f-chat-bubble-structured-section",{"section-divider":P.showDivider}]},[i.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[P.icon&&(P.icon.startsWith("http")||P.icon.startsWith("//")||P.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test(P.icon)?i.createVNode("img",{alt:P.title,src:P.icon,class:"f-chat-bubble-structured-section-icon"},null):i.createVNode("i",{class:`fx-icon ${P.icon}`,style:P.iconStyle},null)),i.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[P.title])]),P.items&&P.items.length>0&&i.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[P.items.map((z,N)=>i.createVNode("div",{key:N,class:"f-chat-bubble-structured-section-item"},[G(z)]))])]))])},X=()=>{const I=m.value;if(!I)return null;const W={};return p.value&&(W.width=p.value),I.height&&(W.height=`${I.height}px`),i.createVNode("div",{class:"f-chat-bubble-content-footer",style:W},[S(I)])},j=()=>{const I=e.attachmentRowClickOpensPreview!==!1?d:void 0;return i.createVNode(Si,{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((G,T)=>G.kind==="userAuth"?i.createVNode(i.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${T}`,content:G.content,onConfirm:e.onUserAuthConfirm},null):i.createVNode(i.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${T}`,content:G.content,onOpen:e.onPreview},null)):null},H=()=>{var I,W,G,T,C,F;return i.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[a.value&&g(),j(),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(),w()]),D(),_(),i.createVNode(Gh,{title:((W=e.content)==null?void 0:W.title)??"",subtitle:((G=e.content)==null?void 0:G.subtitle)??"",text:typeof((T=e.content)==null?void 0:T.text)=="string"?e.content.text:"",textFormat:((C=e.content)==null?void 0:C.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&&b(),H()]):i.createVNode(i.Fragment,null,[H(),u.value&&b()])])])}}),ys={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},Po=i.defineComponent({name:"FXBubbleAction",props:ys,setup(e,t){const n=i.computed(()=>ke({},e.customStyle));return()=>t.slots.default&&i.createVNode("span",{class:"f-chat-bubble-footer-action",style:n.value},[t.slots.default()])}});ar.install=e=>{e.component(ar.name,ar),e.component(Po.name,Po)};const ws={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"}},xs={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:()=>({})}},fu=i.defineComponent({name:"FXCarouselItem",props:xs,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=ke({},(c=e.styles)==null?void 0:c.item);return ke(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,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:r.value,style:o.value,onClick:d},[u(),a(),e.showInfo&&i.createVNode("div",{class:"fx-carousel--item-info"},[s(),l()])])}});function im(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 b=-a.value*100;return{transform:u==="horizontal"?`translateX(${b}%)`:`translateY(${b}%)`,transition:"transform 0.5s ease"}}),h=b=>{b<0||b>=d.value||(a.value,a.value=b)},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))},x=()=>{!n||f.value||(y(),l.value=window.setInterval(()=>{s.value||p()},r))},y=()=>{l.value&&(clearInterval(l.value),l.value=null)},v=()=>{s.value=!0,n&&y()},g=()=>{s.value=!1,n&&x()};return i.onMounted(()=>{x()}),i.onUnmounted(()=>{y()}),{currentIndex:a,totalItems:d,isSingleItem:f,trackStyle:c,goTo:h,next:p,prev:m,handleMouseEnter:v,handleMouseLeave:g}}const sr=i.defineComponent({name:"FXCarousel",props:ws,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}=im({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 D;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,(D=e.classNames)==null?void 0:D.root)}),p=i.computed(()=>{var S;const k={height:typeof e.height=="number"?`${e.height}px`:e.height},D=ke(k,e.customStyle);return ke(D,(S=e.styles)==null?void 0:S.root)}),m=i.computed(()=>{var D;const k={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return ye(k,(D=e.classNames)==null?void 0:D.container)}),x=i.computed(()=>{var D;return ye({"fx-carousel--track":!0},(D=e.classNames)==null?void 0:D.track)}),y=i.computed(()=>{var D;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,(D=e.classNames)==null?void 0:D.indicator)}),v=k=>{var S,_;const D={"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 D[`fx-carousel--arrow-${e.buttonPosition}`]=!0,ye(D,k==="left"?(S=e.classNames)==null?void 0:S.arrowLeft:(_=e.classNames)==null?void 0:_.arrowRight)},g=k=>{var _,X;if(o.value)return null;const D=k==="left"?l:s,S=t[k==="left"?"prevArrow":"nextArrow"];return i.createVNode("button",{class:v(k),style:k==="left"?(_=e.styles)==null?void 0:_.arrowLeft:(X=e.styles)==null?void 0:X.arrowRight,onClick:D,"aria-label":`${k} arrow`},[S?S():i.createVNode("i",{style:"font-size: 60px;",class:`fx-icon fx-icon-arrow-${k==="left"?"left":"right"}`},null)])},b=()=>{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((D,S)=>{var _,X;return i.createVNode("button",{"aria-label":`indicator ${S}`,key:S,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":S===r.value}],style:S===r.value?(_=e.styles)==null?void 0:_.indicatorItemActive:(X=e.styles)==null?void 0:X.indicatorItem,onClick:()=>{a(S),c(S)}},null)})])},w=()=>i.createVNode("div",{class:x.value,style:u.value},[e.items.map((k,D)=>i.createVNode(fu,{key:k.id||`item_${D}`,item:k,showInfo:e.showInfo,index:D,active:D===r.value,styles:e.styles,classNames:e.classNames,onClick:(S,_,X)=>{n("item-click",S,_,X)}},{default:()=>{var S,_;return[(S=t.item)==null?void 0:S.call(t,{item:k,index:D,active:D===r.value}),(_=t[`item${D}`])==null?void 0:_.call(t,{item:k,index:D,active:D===r.value})]}}))]);return()=>{var k;return i.createVNode("div",{class:h.value,style:p.value,onMouseenter:d,onMouseleave:f},[e.buttonPosition==="outer"&&g("left"),i.createVNode("div",{class:m.value,style:(k=e.styles)==null?void 0:k.container},[e.buttonPosition==="inner"&&g("left"),w(),e.buttonPosition==="inner"&&g("right")]),e.buttonPosition==="outer"&&g("right"),b()])}}});sr.install=e=>{e.component(sr.name,sr),e.component(fu.name,fu)};const vs={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function am(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,v,g,b){const w=e.value;if(w){const{left:k,right:D,width:S}=w.getBoundingClientRect();let _=y.clientX-k;b==="right"&&(_=D-y.clientX),_>v&&(_=v),_<g&&(_=g),b==="right"&&(_=S-_),r.value=_}}function c(y,v,g,b){const w=e.value;if(w){const{top:k,bottom:D,height:S}=w.getBoundingClientRect();let _=y.clientY-k;b==="bottom"&&(_=D-y.clientY),_>v&&(_=v),_<g&&(_=g),b==="bottom"&&(_=S-_),o.value=_}}function h(){const y=e.value;if(y){const{width:v,height:g}=y.getBoundingClientRect();return{width:v,height:g}}return null}function p(){const y=e.value;return y?Array.from(y.querySelectorAll("[data-position]")).reduce((v,g)=>{const b=g.getAttribute("data-position");return v=Object.assign(v,{[b]:g}),v},{}):null}function m(y,v){const g=h(),b=p();if(g&&b){const w=b==null?void 0:b.right,k=b==null?void 0:b.left;if(y==="left"&&k)return w?g.width-w.clientWidth-v:g.width-v;if(y==="right"&&w)return k?g.width-k.clientWidth-v:g.width-v}}function x(y,v){const g=h(),b=p();if(g&&b){const w=b==null?void 0:b.bottom,k=b==null?void 0:b.top;if(y==="top"&&k)return w?g.height-w.clientHeight-v:g.height-v;if(y==="bottom"&&w)return k?g.height-k.clientHeight-v:g.height-v}}return{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:l,resizeOverlayStyle:d,showHorizontalResizeHandle:u,showVerticalResizeHandle:a,horizontalResizeBarPosition:t,verticalResizeBarPosition:n,verticalResizeHandleOffset:o,horizontalResizeHandleOffset:r,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:c,getPanelMaxWidth:m,getPanelMaxHeight:x}}const An=i.defineComponent({name:"FXSplitter",props:vs,emits:[],setup(e,t){const n=i.ref(),r=am(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 ke(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)])}}),sm={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 lm(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:p}=t;let m="",x,y,v;const g=()=>e.maxWidth?e.maxWidth:h(m,e.minWidth)||0,b=()=>e.maxHeight?e.maxHeight:p(m,e.minHeight)||0;function w(S){if((m==="left"||m==="right")&&y){const{left:_}=y.getBoundingClientRect(),{width:X}=x.getBoundingClientRect(),j=S.clientX-_;let B=m==="left"?(X||0)+(j-o.value):(X||0)-(j-o.value);B=e.minWidth>0?Math.max(e.minWidth,B):B;const H=g();H!=null&&H>0&&(B=H>B?B:H),n.value=B}if((m==="top"||m==="bottom")&&y){const{top:_}=y.getBoundingClientRect(),{height:X}=x.getBoundingClientRect(),j=S.clientY-_;let B=m==="top"?(X||0)+(j-l.value):(X||0)-(j-l.value);B=e.minHeight>0?Math.max(e.minHeight,B):B;const H=b();H!=null&&H>0&&(B=H>B?B:H),r.value=B}u.value=0,d.value=0,o.value=-1,l.value=-1,a.value=!1,s.value=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",w),document.body.style.userSelect="",m="",x=null,y=null}function k(S,_,X){if(m=_,x=X,a.value=!0,y=S.composedPath().find(B=>B.className.split(" ")[0]==="f-splitter"),y){const{left:B}=y.getBoundingClientRect();u.value=S.clientX-B,o.value=S.clientX-B;const H=g();v=I=>f(I,H,e.minWidth,m),document.addEventListener("mousemove",v),document.addEventListener("mouseup",w),document.body.style.userSelect="none"}}function D(S,_,X){if(m=_,x=X,s.value=!0,y=S.composedPath().find(B=>B.className.split(" ")[0]==="f-splitter"),y){const{top:B}=y.getBoundingClientRect();d.value=S.clientY-B,l.value=S.clientY-B;const H=b();v=I=>c(I,H,e.minHeight,m),document.addEventListener("mousemove",v),document.addEventListener("mouseup",w),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:r,onClickSplitterHorizontalResizeBar:k,onClickSplitterVerticalResizeBar:D}}const lr=i.defineComponent({name:"FSplitterPane",props:sm,emits:[],setup(e,t){const n=i.ref(),r=i.inject("splitter"),{useResizeHandleComposition:o}=r,u=lm(e,o),{actualHeight:a,actualWidth:s,onClickSplitterHorizontalResizeBar:l,onClickSplitterVerticalResizeBar:d}=u,f=i.ref(e.position),c=i.computed(()=>{const b={"f-splitter-pane":!0,"f-splitter-pane-main":f.value==="center","has-resize-bar":e.resizable};return b["f-splitter-pane-"+f.value]=!0,ye(b,e==null?void 0:e.customClass)}),h=i.computed(()=>e.resizeHandle?e.resizeHandle.split(",").filter(b=>["e","n","s","w"].find(w=>w===b)):[]),p=i.computed(()=>{const b={};return(s.value||s.value===0)&&(f.value==="left"||f.value==="right"||h.value.find(w=>w==="e")||h.value.find(w=>w==="w"))&&(b.width=`${s.value}px`),(a.value||a.value===0)&&(f.value==="bottom"||f.value==="top"||h.value.find(w=>w==="s")||h.value.find(w=>w==="n"))&&(b.height=`${a.value}px`),e.visible||(b.display="none"),ke(b,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 x(b){return{e:"left",w:"right",s:"top",n:"bottom"}[b]||b}function y(b,w){w=x(w),["left","right"].find(k=>k===w)&&l(b,w,n.value),["top","bottom"].find(k=>k===w)&&d(b,w,n.value)}function v(){return h.value.length>0?h.value.map(b=>i.createVNode("span",{class:"f-splitter-resize-bar f-splitter-resize-bar-"+b,onMousedown:w=>y(w,b)},null)):i.createVNode("span",{class:m.value,onMousedown:b=>y(b,f.value)},null)}function g(){s.value=e.width,a.value=e.height,p.value}return t.expose({reset:g}),()=>i.createVNode("div",{ref:n,class:c.value,style:p.value,"data-position":f.value},[t.slots.default&&t.slots.default(),e.resizable&&v()])}});An.install=e=>{e.component(An.name,An),e.component(lr.name,lr)};const As={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},ks={content:{type:String,default:null}},cm=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},dm=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},cr=(e,t=new WeakMap)=>{if(e===null||cm(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return dm(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,cr(o,t))}),r}if(e instanceof Set){const r=new Set;t.set(e,r);for(const o of e)r.add(cr(o,t));return r}if(Array.isArray(e)){const r=[];return t.set(e,r),e.forEach(o=>{r.push(cr(o,t))}),r}const n={};t.set(e,n);for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=cr(e[r],t));return n},fm=(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)})},Ro=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,hu=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),hm=new Set(["__proto__","constructor","prototype"]),mm=e=>!hm.has(e),Mo=(e,t,n={})=>{if(Array.isArray(e)&&Array.isArray(t))return Bo(e,t,n);const{excludeKeys:r}=n,o=e,u=t;for(const a of Object.keys(u)){if(!mm(a))continue;const s=u[a],l=o[a];r&&r(a)?o[a]=s:Array.isArray(s)&&Array.isArray(l)?o[a]=Bo(l,s,n):hu(s)&&hu(l)?o[a]=Mo(l,s,n):o[a]=s}return e},Bo=(e,t,n)=>{const r=e.slice();return t.forEach((o,u)=>{const a=r[u];Array.isArray(o)&&Array.isArray(a)?r[u]=Bo(a,o,n):hu(o)&&hu(a)?r[u]=Mo(a,o,n):r[u]=o}),r},Z="md-editor",de="https://unpkg.com",pm=`${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`},gm={css:`${de}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${de}/cropperjs@1.6.2/dist/cropper.min.js`},bm=`${de}/screenfull@5.2.0/dist/screenfull.js`,ym=`${de}/mermaid@11.12.3/dist/mermaid.min.js`,wm={js:`${de}/katex@0.16.33/dist/katex.min.js`,css:`${de}/katex@0.16.33/dist/katex.min.css`},zo={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`}},xm=`${de}/echarts@6.0.0/dist/echarts.min.js`,_s={"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"}}},ct={editorExtensions:{highlight:{js:pm,css:zo},prettier:{standaloneJs:Cs.main,parserMarkdownJs:Cs.markdown},cropper:{...gm},screenfull:{js:bm},mermaid:{js:ym,enableZoom:!0},katex:{...wm},echarts:{js:xm}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},vm=({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]},Am="buildFinished",jo="errorCatcher",Ho="catalogChanged",km="pushCatalog",Es="rerender",Cm="taskStateChanged";class _m{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 _m,Em=(e,t)=>{if(!e)return e;const n=t.split(`
|
|
35
|
+
`),r=['<span rn-wrapper aria-hidden="true">'];return n.forEach(()=>{r.push("<span></span>")}),r.push("</span>"),`<span class="${Z}-code-block">${e}</span>${r.join("")}`};async function Ss(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 Sm={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 ${Z}-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 ${Z}-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 ${Z}-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 ${Z}-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 ${Z}-icon"><path d="M20 6 9 17l-5-5"/></svg>`},Dt=(e,t)=>typeof t[e]=="string"?t[e]:Sm[e],$t=(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=Fm(e,u);t.onload&&a.addEventListener("load",t.onload),document.head.appendChild(a)}},Dm=(e,t)=>{var n;(n=document.getElementById(t.id))==null||n.remove(),$t(e,t)},Fm=(e,t)=>{const n=document.createElement(e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n},Tm=(e,t)=>{const n=new Map;return e==null||e.forEach(r=>{let o=r.querySelector(`.${Z}-mermaid-action`);o?o.querySelector(`.${Z}-mermaid-copy`)||o.insertAdjacentHTML("beforeend",`<span class="${Z}-mermaid-copy">${Dt("copy",t.customIcon)}</span>`):(r.insertAdjacentHTML("beforeend",`<div class="${Z}-mermaid-action"><span class="${Z}-mermaid-copy">${Dt("copy",t.customIcon)}</span></div>`),o=r.querySelector(`.${Z}-mermaid-action`));const u=o.querySelector(`.${Z}-mermaid-copy`);let a=-1;const s=()=>{clearTimeout(a),Ss(r.dataset.content||"").then(()=>{u.innerHTML=Dt("check",t.customIcon)}).catch(()=>{u.innerHTML=Dt("copy",t.customIcon)}).finally(()=>{a=window.setTimeout(()=>{u.innerHTML=Dt("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()}},Nm=(()=>{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=w=>{w.touches.length===1?(a=!0,s=w.touches[0].clientX-o,l=w.touches[0].clientY-u):w.touches.length===2&&(d=Math.hypot(w.touches[0].clientX-w.touches[1].clientX,w.touches[0].clientY-w.touches[1].clientY),f=r)},p=w=>{if(w.preventDefault(),a&&w.touches.length===1)o=w.touches[0].clientX-s,u=w.touches[0].clientY-l,c();else if(w.touches.length===2){const k=Math.hypot(w.touches[0].clientX-w.touches[1].clientX,w.touches[0].clientY-w.touches[1].clientY)/d,D=r;r=f*(1+(k-1));const S=(w.touches[0].clientX+w.touches[1].clientX)/2,_=(w.touches[0].clientY+w.touches[1].clientY)/2,X=n.getBoundingClientRect(),j=(S-X.left)/D,B=(_-X.top)/D;o-=j*(r-D),u-=B*(r-D),c()}},m=()=>{a=!1},x=w=>{w.preventDefault();const k=.02,D=r;w.deltaY<0?r+=k:r=Math.max(.1,r-k);const S=n.getBoundingClientRect(),_=w.clientX-S.left,X=w.clientY-S.top;o-=_/D*(r-D),u-=X/D*(r-D),c()},y=w=>{a=!0,s=w.clientX-o,l=w.clientY-u},v=w=>{a&&(o=w.clientX-s,u=w.clientY-l,c())},g=()=>{a=!1},b=()=>{a=!1};return t.addEventListener("touchstart",h,{passive:!1}),t.addEventListener("touchmove",p,{passive:!1}),t.addEventListener("touchend",m),t.addEventListener("wheel",x,{passive:!1}),t.addEventListener("mousedown",y),t.addEventListener("mousemove",v),t.addEventListener("mouseup",g),t.addEventListener("mouseleave",b),()=>{t.removeEventListener("touchstart",h),t.removeEventListener("touchmove",p),t.removeEventListener("touchend",m),t.removeEventListener("wheel",x),t.removeEventListener("mousedown",y),t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",g),t.removeEventListener("mouseleave",b)}};return(t,n)=>{const r=new Map;return t==null||t.forEach(o=>{let u=o.querySelector(`.${Z}-mermaid-action`);u?u.querySelector(`.${Z}-mermaid-zoom`)||u.insertAdjacentHTML("beforeend",`<span class="${Z}-mermaid-zoom">${Dt("pin-off",n.customIcon)}</span>`):(o.insertAdjacentHTML("beforeend",`<div class="${Z}-mermaid-action"><span class="${Z}-mermaid-zoom">${Dt("pin-off",n.customIcon)}</span></div>`),u=o.querySelector(`.${Z}-mermaid-action`));const a=u.querySelector(`.${Z}-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=Dt("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=Dt("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()}}})(),Ds=new Set([!0,!1,"alt","title"]);function Fs(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function Ts(e,t){e&&e.attrs&&(e.attrs=Fs(e.attrs,t))}function Im(e,t){if(!Ds.has(e))throw new TypeError(`figcaption must be one of: ${[...Ds]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([r])=>r==="title");return Array.isArray(n)&&n[1]?(Ts(t,"title"),n[1]):void 0}function Om(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=Im(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=Fs(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]]),Ts(l,"src")}}})}const Lm=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Vm(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(Lm,"$1");const l=e.push("sub_close","sub",-1);return l.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function Pm(e){e.inline.ruler.after("emphasis","sub",Vm)}const Rm=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Mm(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(Rm,"$1");const l=e.push("sup_close","sup",-1);return l.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function Bm(e){e.inline.ruler.after("emphasis","sup",Mm)}var zm=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ns=new Set,$o=typeof process=="object"&&process?process:{},Is=(e,t,n,r)=>{typeof $o.emitWarning=="function"?$o.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},mu=globalThis.AbortController,Os=globalThis.AbortSignal;if(typeof mu>"u"){Os=class{constructor(){fe(this,"onabort");fe(this,"_onabort",[]);fe(this,"reason");fe(this,"aborted",!1)}addEventListener(n,r){this._onabort.push(r)}},mu=class{constructor(){fe(this,"signal",new Os);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=((Bl=$o.env)==null?void 0:Bl.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{e&&(e=!1,Is("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 jm=e=>!Ns.has(e),Ut=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Ls=e=>Ut(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?pu:null:null,pu=class extends Array{constructor(t){super(t),this.fill(0)}},Hm=(Ft=class{constructor(t,n){fe(this,"heap");fe(this,"length");if(!A(Ft,Dn))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){let n=Ls(t);if(!n)return[];ne(Ft,Dn,!0);let r=new Ft(t,n);return ne(Ft,Dn,!1),r}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},Dn=new WeakMap,ie(Ft,Dn,!1),Ft),$m=(On=class{constructor(t){ie(this,q);ie(this,it);ie(this,Je);ie(this,dt);ie(this,un);ie(this,ft);ie(this,Fn);ie(this,Tn);ie(this,ht);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,Ce);ie(this,mt);ie(this,xe);ie(this,he);ie(this,ue);ie(this,$e);ie(this,et);ie(this,Re);ie(this,De);ie(this,pt);ie(this,Fe);ie(this,gt);ie(this,bt);ie(this,tt);ie(this,nt);ie(this,yt);ie(this,Xt);ie(this,Ue);ie(this,Nn);ie(this,on,()=>{});ie(this,Ot,()=>{});ie(this,Fr,()=>{});ie(this,rt,()=>!1);ie(this,an,t=>{});ie(this,In,(t,n,r)=>{});ie(this,Tr,(t,n,r,o)=>{if(r||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});fe(this,zl,"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:p,maxSize:m=0,maxEntrySize:x=0,sizeCalculation:y,fetchMethod:v,memoMethod:g,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:D,ignoreFetchAbort:S,perf:_}=t;if(_!==void 0&&typeof(_==null?void 0:_.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(ne(this,ht,_??zm),n!==0&&!Ut(n))throw new TypeError("max option must be a nonnegative integer");let X=n?Ls(n):Array;if(!X)throw new Error("invalid max value: "+n);if(ne(this,it,n),ne(this,Je,m),this.maxEntrySize=x||A(this,Je),this.sizeCalculation=y,this.sizeCalculation){if(!A(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(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(ne(this,Tn,g),v!==void 0&&typeof v!="function")throw new TypeError("fetchMethod must be a function if specified");if(ne(this,Fn,v),ne(this,Xt,!!v),ne(this,xe,new Map),ne(this,he,new Array(n).fill(void 0)),ne(this,ue,new Array(n).fill(void 0)),ne(this,$e,new X(n)),ne(this,et,new X(n)),ne(this,Re,0),ne(this,De,0),ne(this,pt,Hm.create(n)),ne(this,Ce,0),ne(this,mt,0),typeof d=="function"&&ne(this,dt,d),typeof f=="function"&&ne(this,un,f),typeof c=="function"?(ne(this,ft,c),ne(this,Fe,[])):(ne(this,ft,void 0),ne(this,Fe,void 0)),ne(this,yt,!!A(this,dt)),ne(this,Nn,!!A(this,un)),ne(this,Ue,!!A(this,ft)),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!D,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(A(this,Je)!==0&&!Ut(A(this,Je)))throw new TypeError("maxSize must be a positive integer if specified");if(!Ut(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Q(this,q,ic).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=Ut(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=r||0,this.ttl){if(!Ut(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Q(this,q,pi).call(this)}if(A(this,it)===0&&this.ttl===0&&A(this,Je)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!A(this,it)&&!A(this,Je)){let j="LRU_CACHE_UNBOUNDED";jm(j)&&(Ns.add(j),Is("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,On))}}get perf(){return A(this,ht)}static unsafeExposeInternals(t){return{starts:A(t,bt),ttls:A(t,tt),autopurgeTimers:A(t,nt),sizes:A(t,gt),keyMap:A(t,xe),keyList:A(t,he),valList:A(t,ue),next:A(t,$e),prev:A(t,et),get head(){return A(t,Re)},get tail(){return A(t,De)},free:A(t,pt),isBackgroundFetch:n=>{var r;return Q(r=t,q,me).call(r,n)},backgroundFetch:(n,r,o,u)=>{var a;return Q(a=t,q,Hu).call(a,n,r,o,u)},moveToTail:n=>{var r;return Q(r=t,q,Or).call(r,n)},indexes:n=>{var r;return Q(r=t,q,Zt).call(r,n)},rindexes:n=>{var r;return Q(r=t,q,Yt).call(r,n)},isStale:n=>{var r;return A(r=t,rt).call(r,n)}}}get max(){return A(this,it)}get maxSize(){return A(this,Je)}get calculatedSize(){return A(this,mt)}get size(){return A(this,Ce)}get fetchMethod(){return A(this,Fn)}get memoMethod(){return A(this,Tn)}get dispose(){return A(this,dt)}get onInsert(){return A(this,un)}get disposeAfter(){return A(this,ft)}getRemainingTTL(t){return A(this,xe).has(t)?1/0:0}*entries(){for(let t of Q(this,q,Zt).call(this))A(this,ue)[t]!==void 0&&A(this,he)[t]!==void 0&&!Q(this,q,me).call(this,A(this,ue)[t])&&(yield[A(this,he)[t],A(this,ue)[t]])}*rentries(){for(let t of Q(this,q,Yt).call(this))A(this,ue)[t]!==void 0&&A(this,he)[t]!==void 0&&!Q(this,q,me).call(this,A(this,ue)[t])&&(yield[A(this,he)[t],A(this,ue)[t]])}*keys(){for(let t of Q(this,q,Zt).call(this)){let n=A(this,he)[t];n!==void 0&&!Q(this,q,me).call(this,A(this,ue)[t])&&(yield n)}}*rkeys(){for(let t of Q(this,q,Yt).call(this)){let n=A(this,he)[t];n!==void 0&&!Q(this,q,me).call(this,A(this,ue)[t])&&(yield n)}}*values(){for(let t of Q(this,q,Zt).call(this))A(this,ue)[t]!==void 0&&!Q(this,q,me).call(this,A(this,ue)[t])&&(yield A(this,ue)[t])}*rvalues(){for(let t of Q(this,q,Yt).call(this))A(this,ue)[t]!==void 0&&!Q(this,q,me).call(this,A(this,ue)[t])&&(yield A(this,ue)[t])}[(jl=Symbol.iterator,zl=Symbol.toStringTag,jl)](){return this.entries()}find(t,n={}){for(let r of Q(this,q,Zt).call(this)){let o=A(this,ue)[r],u=Q(this,q,me).call(this,o)?o.__staleWhileFetching:o;if(u!==void 0&&t(u,A(this,he)[r],this))return this.get(A(this,he)[r],n)}}forEach(t,n=this){for(let r of Q(this,q,Zt).call(this)){let o=A(this,ue)[r],u=Q(this,q,me).call(this,o)?o.__staleWhileFetching:o;u!==void 0&&t.call(n,u,A(this,he)[r],this)}}rforEach(t,n=this){for(let r of Q(this,q,Yt).call(this)){let o=A(this,ue)[r],u=Q(this,q,me).call(this,o)?o.__staleWhileFetching:o;u!==void 0&&t.call(n,u,A(this,he)[r],this)}}purgeStale(){let t=!1;for(let n of Q(this,q,Yt).call(this,{allowStale:!0}))A(this,rt).call(this,n)&&(Q(this,q,Kt).call(this,A(this,he)[n],"expire"),t=!0);return t}info(t){let n=A(this,xe).get(t);if(n===void 0)return;let r=A(this,ue)[n],o=Q(this,q,me).call(this,r)?r.__staleWhileFetching:r;if(o===void 0)return;let u={value:o};if(A(this,tt)&&A(this,bt)){let a=A(this,tt)[n],s=A(this,bt)[n];if(a&&s){let l=a-(A(this,ht).now()-s);u.ttl=l,u.start=Date.now()}}return A(this,gt)&&(u.size=A(this,gt)[n]),u}dump(){let t=[];for(let n of Q(this,q,Zt).call(this,{allowStale:!0})){let r=A(this,he)[n],o=A(this,ue)[n],u=Q(this,q,me).call(this,o)?o.__staleWhileFetching:o;if(u===void 0||r===void 0)continue;let a={value:u};if(A(this,tt)&&A(this,bt)){a.ttl=A(this,tt)[n];let s=A(this,ht).now()-A(this,bt)[n];a.start=Math.floor(Date.now()-s)}A(this,gt)&&(a.size=A(this,gt)[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=A(this,ht).now()-o}this.set(n,r.value,r)}}set(t,n,r={}){var h,p,m,x,y,v,g;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=A(this,Tr).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,Kt).call(this,t,"set"),this;let c=A(this,Ce)===0?void 0:A(this,xe).get(t);if(c===void 0)c=A(this,Ce)===0?A(this,De):A(this,pt).length!==0?A(this,pt).pop():A(this,Ce)===A(this,it)?Q(this,q,ju).call(this,!1):A(this,Ce),A(this,he)[c]=t,A(this,ue)[c]=n,A(this,xe).set(t,c),A(this,$e)[A(this,De)]=c,A(this,et)[c]=A(this,De),ne(this,De,c),zu(this,Ce)._++,A(this,In).call(this,c,f,l),l&&(l.set="add"),d=!1,A(this,Nn)&&((h=A(this,un))==null||h.call(this,n,t,"add"));else{Q(this,q,Or).call(this,c);let b=A(this,ue)[c];if(n!==b){if(A(this,Xt)&&Q(this,q,me).call(this,b)){b.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:w}=b;w!==void 0&&!a&&(A(this,yt)&&((p=A(this,dt))==null||p.call(this,w,t,"set")),A(this,Ue)&&((m=A(this,Fe))==null||m.push([w,t,"set"])))}else a||(A(this,yt)&&((x=A(this,dt))==null||x.call(this,b,t,"set")),A(this,Ue)&&((y=A(this,Fe))==null||y.push([b,t,"set"])));if(A(this,an).call(this,c),A(this,In).call(this,c,f,l),A(this,ue)[c]=n,l){l.set="replace";let w=b&&Q(this,q,me).call(this,b)?b.__staleWhileFetching:b;w!==void 0&&(l.oldValue=w)}}else l&&(l.set="update");A(this,Nn)&&((v=this.onInsert)==null||v.call(this,n,t,n===b?"update":"replace"))}if(o!==0&&!A(this,tt)&&Q(this,q,pi).call(this),A(this,tt)&&(d||A(this,Fr).call(this,c,o,u),l&&A(this,Ot).call(this,l,c)),!a&&A(this,Ue)&&A(this,Fe)){let b=A(this,Fe),w;for(;w=b==null?void 0:b.shift();)(g=A(this,ft))==null||g.call(this,...w)}return this}pop(){var t;try{for(;A(this,Ce);){let n=A(this,ue)[A(this,Re)];if(Q(this,q,ju).call(this,!0),Q(this,q,me).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(A(this,Ue)&&A(this,Fe)){let n=A(this,Fe),r;for(;r=n==null?void 0:n.shift();)(t=A(this,ft))==null||t.call(this,...r)}}}has(t,n={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:o}=n,u=A(this,xe).get(t);if(u!==void 0){let a=A(this,ue)[u];if(Q(this,q,me).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(A(this,rt).call(this,u))o&&(o.has="stale",A(this,Ot).call(this,o,u));else return r&&A(this,on).call(this,u),o&&(o.has="hit",A(this,Ot).call(this,o,u)),!0}else o&&(o.has="miss");return!1}peek(t,n={}){let{allowStale:r=this.allowStale}=n,o=A(this,xe).get(t);if(o===void 0||!r&&A(this,rt).call(this,o))return;let u=A(this,ue)[o];return Q(this,q,me).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:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:x,forceRefresh:y=!1,status:v,signal:g}=n;if(!A(this,Xt))return v&&(v.fetch="get"),this.get(t,{allowStale:r,updateAgeOnGet:o,noDeleteOnStaleGet:u,status:v});let b={allowStale:r,updateAgeOnGet:o,noDeleteOnStaleGet:u,ttl:a,noDisposeOnSet:s,size:l,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:v,signal:g},w=A(this,xe).get(t);if(w===void 0){v&&(v.fetch="miss");let k=Q(this,q,Hu).call(this,t,w,b,x);return k.__returned=k}else{let k=A(this,ue)[w];if(Q(this,q,me).call(this,k)){let X=r&&k.__staleWhileFetching!==void 0;return v&&(v.fetch="inflight",X&&(v.returnedStale=!0)),X?k.__staleWhileFetching:k.__returned=k}let D=A(this,rt).call(this,w);if(!y&&!D)return v&&(v.fetch="hit"),Q(this,q,Or).call(this,w),o&&A(this,on).call(this,w),v&&A(this,Ot).call(this,v,w),k;let S=Q(this,q,Hu).call(this,t,w,b,x),_=S.__staleWhileFetching!==void 0&&r;return v&&(v.fetch=D?"stale":"refresh",_&&D&&(v.returnedStale=!0)),_?S.__staleWhileFetching:S.__returned=S}}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=A(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=A(this,xe).get(t);if(s!==void 0){let l=A(this,ue)[s],d=Q(this,q,me).call(this,l);return a&&A(this,Ot).call(this,a,s),A(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,Kt).call(this,t,"expire"),a&&r&&(a.returnedStale=!0),r?l:void 0)):(a&&(a.get="hit"),d?l.__staleWhileFetching:(Q(this,q,Or).call(this,s),o&&A(this,on).call(this,s),l))}else a&&(a.get="miss")}delete(t){return Q(this,q,Kt).call(this,t,"delete")}clear(){return Q(this,q,yi).call(this,"delete")}},it=new WeakMap,Je=new WeakMap,dt=new WeakMap,un=new WeakMap,ft=new WeakMap,Fn=new WeakMap,Tn=new WeakMap,ht=new WeakMap,Ce=new WeakMap,mt=new WeakMap,xe=new WeakMap,he=new WeakMap,ue=new WeakMap,$e=new WeakMap,et=new WeakMap,Re=new WeakMap,De=new WeakMap,pt=new WeakMap,Fe=new WeakMap,gt=new WeakMap,bt=new WeakMap,tt=new WeakMap,nt=new WeakMap,yt=new WeakMap,Xt=new WeakMap,Ue=new WeakMap,Nn=new WeakMap,q=new WeakSet,pi=function(){let t=new pu(A(this,it)),n=new pu(A(this,it));ne(this,tt,t),ne(this,bt,n);let r=this.ttlAutopurge?new Array(A(this,it)):void 0;ne(this,nt,r),ne(this,Fr,(s,l,d=A(this,ht).now())=>{n[s]=l!==0?d:0,t[s]=l,o(s,l)}),ne(this,on,s=>{n[s]=t[s]!==0?A(this,ht).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(()=>{A(this,rt).call(this,s)&&Q(this,q,Kt).call(this,A(this,he)[s],"expire")},l+1);d.unref&&d.unref(),r[s]=d}}:()=>{};ne(this,Ot,(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=A(this,ht).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=A(this,xe).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})},on=new WeakMap,Ot=new WeakMap,Fr=new WeakMap,rt=new WeakMap,ic=function(){let t=new pu(A(this,it));ne(this,mt,0),ne(this,gt,t),ne(this,an,n=>{ne(this,mt,A(this,mt)-t[n]),t[n]=0}),ne(this,Tr,(n,r,o,u)=>{if(Q(this,q,me).call(this,r))return 0;if(!Ut(o))if(u){if(typeof u!="function")throw new TypeError("sizeCalculation must be a function");if(o=u(r,n),!Ut(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,A(this,Je)){let u=A(this,Je)-t[n];for(;A(this,mt)>u;)Q(this,q,ju).call(this,!0)}ne(this,mt,A(this,mt)+t[n]),o&&(o.entrySize=r,o.totalCalculatedSize=A(this,mt))})},an=new WeakMap,In=new WeakMap,Tr=new WeakMap,Zt=function*({allowStale:t=this.allowStale}={}){if(A(this,Ce))for(let n=A(this,De);!(!Q(this,q,gi).call(this,n)||((t||!A(this,rt).call(this,n))&&(yield n),n===A(this,Re)));)n=A(this,et)[n]},Yt=function*({allowStale:t=this.allowStale}={}){if(A(this,Ce))for(let n=A(this,Re);!(!Q(this,q,gi).call(this,n)||((t||!A(this,rt).call(this,n))&&(yield n),n===A(this,De)));)n=A(this,$e)[n]},gi=function(t){return t!==void 0&&A(this,xe).get(A(this,he)[t])===t},ju=function(t){var u,a,s;let n=A(this,Re),r=A(this,he)[n],o=A(this,ue)[n];return A(this,Xt)&&Q(this,q,me).call(this,o)?o.__abortController.abort(new Error("evicted")):(A(this,yt)||A(this,Ue))&&(A(this,yt)&&((u=A(this,dt))==null||u.call(this,o,r,"evict")),A(this,Ue)&&((a=A(this,Fe))==null||a.push([o,r,"evict"]))),A(this,an).call(this,n),(s=A(this,nt))!=null&&s[n]&&(clearTimeout(A(this,nt)[n]),A(this,nt)[n]=void 0),t&&(A(this,he)[n]=void 0,A(this,ue)[n]=void 0,A(this,pt).push(n)),A(this,Ce)===1?(ne(this,Re,ne(this,De,0)),A(this,pt).length=0):ne(this,Re,A(this,$e)[n]),A(this,xe).delete(r),zu(this,Ce)._--,n},Hu=function(t,n,r,o){let u=n===void 0?void 0:A(this,ue)[n];if(Q(this,q,me).call(this,u))return u;let a=new mu,{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=(x,y=!1)=>{let{aborted:v}=a.signal,g=r.ignoreFetchAbort&&x!==void 0,b=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&x!==void 0);if(r.status&&(v&&!y?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,g&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),v&&!g&&!y)return c(a.signal.reason,b);let w=p,k=A(this,ue)[n];return(k===p||g&&y&&k===void 0)&&(x===void 0?w.__staleWhileFetching!==void 0?A(this,ue)[n]=w.__staleWhileFetching:Q(this,q,Kt).call(this,t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(t,x,l.options))),x},f=x=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=x),c(x,!1)),c=(x,y)=>{let{aborted:v}=a.signal,g=v&&r.allowStaleOnFetchAbort,b=g||r.allowStaleOnFetchRejection,w=b||r.noDeleteOnFetchRejection,k=p;if(A(this,ue)[n]===p&&(!w||!y&&k.__staleWhileFetching===void 0?Q(this,q,Kt).call(this,t,"fetch"):g||(A(this,ue)[n]=k.__staleWhileFetching)),b)return r.status&&k.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw x},h=(x,y)=>{var g;let v=(g=A(this,Fn))==null?void 0:g.call(this,t,u,l);v&&v instanceof Promise&&v.then(b=>x(b===void 0?void 0:b),y),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(x(void 0),r.allowStaleOnFetchAbort&&(x=b=>d(b,!0)))})};r.status&&(r.status.fetchDispatched=!0);let p=new Promise(h).then(d,f),m=Object.assign(p,{__abortController:a,__staleWhileFetching:u,__returned:void 0});return n===void 0?(this.set(t,m,{...l.options,status:void 0}),n=A(this,xe).get(t)):A(this,ue)[n]=m,m},me=function(t){if(!A(this,Xt))return!1;let n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof mu},bi=function(t,n){A(this,et)[n]=t,A(this,$e)[t]=n},Or=function(t){t!==A(this,De)&&(t===A(this,Re)?ne(this,Re,A(this,$e)[t]):Q(this,q,bi).call(this,A(this,et)[t],A(this,$e)[t]),Q(this,q,bi).call(this,A(this,De),t),ne(this,De,t))},Kt=function(t,n){var o,u,a,s,l,d;let r=!1;if(A(this,Ce)!==0){let f=A(this,xe).get(t);if(f!==void 0)if((o=A(this,nt))!=null&&o[f]&&(clearTimeout((u=A(this,nt))==null?void 0:u[f]),A(this,nt)[f]=void 0),r=!0,A(this,Ce)===1)Q(this,q,yi).call(this,n);else{A(this,an).call(this,f);let c=A(this,ue)[f];if(Q(this,q,me).call(this,c)?c.__abortController.abort(new Error("deleted")):(A(this,yt)||A(this,Ue))&&(A(this,yt)&&((a=A(this,dt))==null||a.call(this,c,t,n)),A(this,Ue)&&((s=A(this,Fe))==null||s.push([c,t,n]))),A(this,xe).delete(t),A(this,he)[f]=void 0,A(this,ue)[f]=void 0,f===A(this,De))ne(this,De,A(this,et)[f]);else if(f===A(this,Re))ne(this,Re,A(this,$e)[f]);else{let h=A(this,et)[f];A(this,$e)[h]=A(this,$e)[f];let p=A(this,$e)[f];A(this,et)[p]=A(this,et)[f]}zu(this,Ce)._--,A(this,pt).push(f)}}if(A(this,Ue)&&((l=A(this,Fe))!=null&&l.length)){let f=A(this,Fe),c;for(;c=f==null?void 0:f.shift();)(d=A(this,ft))==null||d.call(this,...c)}return r},yi=function(t){var n,r,o,u;for(let a of Q(this,q,Yt).call(this,{allowStale:!0})){let s=A(this,ue)[a];if(Q(this,q,me).call(this,s))s.__abortController.abort(new Error("deleted"));else{let l=A(this,he)[a];A(this,yt)&&((n=A(this,dt))==null||n.call(this,s,l,t)),A(this,Ue)&&((r=A(this,Fe))==null||r.push([s,l,t]))}}if(A(this,xe).clear(),A(this,ue).fill(void 0),A(this,he).fill(void 0),A(this,tt)&&A(this,bt)){A(this,tt).fill(0),A(this,bt).fill(0);for(let a of A(this,nt)??[])a!==void 0&&clearTimeout(a);(o=A(this,nt))==null||o.fill(void 0)}if(A(this,gt)&&A(this,gt).fill(0),ne(this,Re,0),ne(this,De,0),A(this,pt).length=0,ne(this,mt,0),ne(this,Ce,0),A(this,Ue)&&A(this,Fe)){let a=A(this,Fe),s;for(;s=a==null?void 0:a.shift();)(u=A(this,ft))==null||u.call(this,...s)}},On);/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var en=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},gu=function(t){return t.tagName==="IMG"},Um=function(t){return NodeList.prototype.isPrototypeOf(t)},bu=function(t){return t&&t.nodeType===1},Vs=function(t){var n=t.currentSrc||t.src;return n.substr(-4).toLowerCase()===".svg"},Ps=function(t){try{return Array.isArray(t)?t.filter(gu):Um(t)?[].slice.call(t).filter(gu):bu(t)?[t].filter(gu):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(gu):[]}catch{throw new TypeError(`The provided selector is invalid.
|
|
36
36
|
Expects a CSS selector, a Node element, a NodeList or an array.
|
|
37
|
-
See: https://github.com/francoischalifour/medium-zoom`)}},Up=function(t){var n=document.createElement("div");return n.classList.add("medium-zoom-overlay"),n.style.background=t,n},Wp=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=en({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},Gp=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=window.Promise||function(H){function I(){}H(I,I)},o=function(H){var I=H.target;if(I===X){p();return}g.indexOf(I)!==-1&&x({target:I})},u=function(){if(!(k||!_.original)){var H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(D-H)>S.scrollOffset&&setTimeout(p,150)}},a=function(H){var I=H.key||H.keyCode;(I==="Escape"||I==="Esc"||I===27)&&p()},s=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=H;if(H.background&&(X.style.background=H.background),H.container&&H.container instanceof Object&&(I.container=en({},S.container,H.container)),H.template){var W=bu(H.template)?H.template:document.querySelector(H.template);I.template=W}return S=en({},S,I),g.forEach(function(G){G.dispatchEvent(kn("medium-zoom:update",{detail:{zoom:j}}))}),j},l=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(en({},S,H))},d=function(){for(var H=arguments.length,I=Array(H),W=0;W<H;W++)I[W]=arguments[W];var G=I.reduce(function(T,C){return[].concat(T,Vs(C))},[]);return G.filter(function(T){return g.indexOf(T)===-1}).forEach(function(T){g.push(T),T.classList.add("medium-zoom-image")}),w.forEach(function(T){var C=T.type,F=T.listener,P=T.options;G.forEach(function(M){M.addEventListener(C,F,P)})}),j},f=function(){for(var H=arguments.length,I=Array(H),W=0;W<H;W++)I[W]=arguments[W];_.zoomed&&p();var G=I.length>0?I.reduce(function(T,C){return[].concat(T,Vs(C))},[]):g;return G.forEach(function(T){T.classList.remove("medium-zoom-image"),T.dispatchEvent(kn("medium-zoom:detach",{detail:{zoom:j}}))}),g=g.filter(function(T){return G.indexOf(T)===-1}),j},c=function(H,I){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(G){G.addEventListener("medium-zoom:"+H,I,W)}),w.push({type:"medium-zoom:"+H,listener:I,options:W}),j},h=function(H,I){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(G){G.removeEventListener("medium-zoom:"+H,I,W)}),w=w.filter(function(G){return!(G.type==="medium-zoom:"+H&&G.listener.toString()===I.toString())}),j},m=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=H.target,W=function(){var T={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},C=void 0,F=void 0;if(S.container)if(S.container instanceof Object)T=en({},T,S.container),C=T.width-T.left-T.right-S.margin*2,F=T.height-T.top-T.bottom-S.margin*2;else{var P=bu(S.container)?S.container:document.querySelector(S.container),M=P.getBoundingClientRect(),z=M.width,N=M.height,V=M.left,L=M.top;T=en({},T,{width:z,height:N,left:V,top:L})}C=C||T.width-S.margin*2,F=F||T.height-S.margin*2;var O=_.zoomedHd||_.original,U=Ls(O)?C:O.naturalWidth||C,J=Ls(O)?F:O.naturalHeight||F,Y=O.getBoundingClientRect(),K=Y.top,re=Y.left,ae=Y.width,ve=Y.height,Te=Math.min(Math.max(ae,U),C)/ae,yt=Math.min(Math.max(ve,J),F)/ve,Me=Math.min(Te,yt),Ln=(-re+(C-ae)/2+S.margin+T.left)/Me,qt=(-K+(F-ve)/2+S.margin+T.top)/Me,Ot="scale("+Me+") translate3d("+Ln+"px, "+qt+"px, 0)";_.zoomed.style.transform=Ot,_.zoomedHd&&(_.zoomedHd.style.transform=Ot)};return new r(function(G){if(I&&g.indexOf(I)===-1){G(j);return}var T=function z(){k=!1,_.zoomed.removeEventListener("transitionend",z),_.original.dispatchEvent(kn("medium-zoom:opened",{detail:{zoom:j}})),G(j)};if(_.zoomed){G(j);return}if(I)_.original=I;else if(g.length>0){var C=g;_.original=C[0]}else{G(j);return}if(_.original.dispatchEvent(kn("medium-zoom:open",{detail:{zoom:j}})),D=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,k=!0,_.zoomed=Wp(_.original),document.body.appendChild(X),S.template){var F=bu(S.template)?S.template:document.querySelector(S.template);_.template=document.createElement("div"),_.template.appendChild(F.content.cloneNode(!0)),document.body.appendChild(_.template)}if(_.original.parentElement&&_.original.parentElement.tagName==="PICTURE"&&_.original.currentSrc&&(_.zoomed.src=_.original.currentSrc),document.body.appendChild(_.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),_.original.classList.add("medium-zoom-image--hidden"),_.zoomed.classList.add("medium-zoom-image--opened"),_.zoomed.addEventListener("click",p),_.zoomed.addEventListener("transitionend",T),_.original.getAttribute("data-zoom-src")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("srcset"),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading"),_.zoomedHd.src=_.zoomed.getAttribute("data-zoom-src"),_.zoomedHd.onerror=function(){clearInterval(P),console.warn("Unable to reach the zoom image target "+_.zoomedHd.src),_.zoomedHd=null,W()};var P=setInterval(function(){_.zoomedHd.complete&&(clearInterval(P),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",p),document.body.appendChild(_.zoomedHd),W())},10)}else if(_.original.hasAttribute("srcset")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading");var M=_.zoomedHd.addEventListener("load",function(){_.zoomedHd.removeEventListener("load",M),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",p),document.body.appendChild(_.zoomedHd),W()})}else W()})},p=function(){return new r(function(H){if(k||!_.original){H(j);return}var I=function W(){_.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(_.zoomed),_.zoomedHd&&document.body.removeChild(_.zoomedHd),document.body.removeChild(X),_.zoomed.classList.remove("medium-zoom-image--opened"),_.template&&document.body.removeChild(_.template),k=!1,_.zoomed.removeEventListener("transitionend",W),_.original.dispatchEvent(kn("medium-zoom:closed",{detail:{zoom:j}})),_.original=null,_.zoomed=null,_.zoomedHd=null,_.template=null,H(j)};k=!0,document.body.classList.remove("medium-zoom--opened"),_.zoomed.style.transform="",_.zoomedHd&&(_.zoomedHd.style.transform=""),_.template&&(_.template.style.transition="opacity 150ms",_.template.style.opacity=0),_.original.dispatchEvent(kn("medium-zoom:close",{detail:{zoom:j}})),_.zoomed.addEventListener("transitionend",I)})},x=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=H.target;return _.original?p():m({target:I})},y=function(){return S},A=function(){return g},b=function(){return _.original},g=[],w=[],k=!1,D=0,S=n,_={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?S=t:(t||typeof t=="string")&&d(t),S=en({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},S);var X=Up(S.background);document.addEventListener("click",o),document.addEventListener("keyup",a),document.addEventListener("scroll",u),window.addEventListener("resize",p);var j={open:m,close:p,toggle:x,update:s,clone:l,attach:d,detach:f,on:c,off:h,getOptions:y,getImages:A,getZoomedImage:b};return j};function Xp(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 qp=".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}";Xp(qp);const Wt={hljs:`${Z}-hljs`,hlcss:`${Z}-hlCss`,mermaidM:`${Z}-mermaid-m`,mermaid:`${Z}-mermaid`,katexjs:`${Z}-katex`,katexcss:`${Z}-katexCss`,echarts:`${Z}-echarts`},Zp=(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={...zo,...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]:zo.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={...Cs,...lt.editorConfig.languageUserDefined};return Mo(lr(Cs["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}},Yp=e=>{const t=i.useId();return e.id||e.editorId||`${Z}-${t}`},Kp=(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} .${Z}-preview .${Z}-code`).forEach(f=>{let c=-1;const h=f.querySelector(`.${Z}-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:x,successTips:y,failTips:A}=u.value.copyCode;let b=y;Es(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=x:h.innerHTML=x},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)},Qp=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 x;if(e.noEcharts||a)return;const p=o.echarts.js;$t("script",{...(x=u.echarts)==null?void 0:x.js,src:p,id:Wt.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 x=[],y=[],A=[];d.forEach((b,g)=>{var D,S;const w=f[g],k=c[g];if(p||!b||!b.isConnected||r!=null&&r.value&&!r.value.contains(b)){(D=w==null?void 0:w.dispose)==null||D.call(w),(S=k==null?void 0:k.disconnect)==null||S.call(k);return}x.push(b),w&&y.push(w),k&&A.push(k)}),d=x,f=y,c=A},m=()=>{h(),!e.noEcharts&&a&&Array.from(r.value.querySelectorAll(`#${t} div.${Z}-echarts:not([data-processed])`)).forEach(p=>{if(p.dataset.closed==="false")return!1;try{const x=new Function(`return ${p.innerText}`)(),y=a.init(p,n.value);y.setOption(x),p.setAttribute("data-processed",""),d.push(p),f.push(y);const A=new ResizeObserver(()=>{y.resize()});A.observe(p),c.push(A)}catch(x){ot.emit(t,jo,{name:"echarts",message:x==null?void 0:x.message,error:x})}})};return i.onBeforeUnmount(()=>{h(!0)}),{reRenderEcharts:s,replaceEcharts:m}},Jp=e=>{const t=i.inject("highlight"),n=i.shallowRef(lt.editorExtensions.highlight.instance);return i.onMounted(()=>{e.noHighlight||n.value||($t("link",{...t.value.css,rel:"stylesheet",id:Wt.hlcss}),$t("script",{...t.value.js,id:Wt.hljs,onload(){n.value=window.hljs}},"hljs"))}),i.watch(()=>t.value.css,()=>{e.noHighlight||lt.editorExtensions.highlight.instance||Sp("link",{...t.value.css,rel:"stylesheet",id:Wt.hlcss})}),n},em=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;$t("script",{...(o=r.katex)==null?void 0:o.js,src:n.katex.js,id:Wt.katexjs,onload(){t.value=window.katex}},"katex"),$t("link",{...(u=r.katex)==null?void 0:u.css,rel:"stylesheet",href:n.katex.css,id:Wt.katexcss})}),t},yu=new Hp({max:1e3,ttl:6e5}),tm=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,()=>{yu.clear(),d()}),i.onMounted(()=>{var c,h;if(e.noMermaid||s)return;const f=o.mermaid.js;/\.mjs/.test(f)?($t("link",{...(c=u.mermaid)==null?void 0:c.js,rel:"modulepreload",href:f,id:Wt.mermaidM}),import(f).then(m=>{s=m.default,d()}).catch(m=>{ot.emit(t,jo,{name:"mermaid",message:`Failed to load mermaid module: ${m.message}`,error:m})})):$t("script",{...(h=u.mermaid)==null?void 0:h.js,src:f,id:Wt.mermaid,onload(){s=window.mermaid,d()}},"mermaid")}),{reRenderRef:l,replaceMermaid:async()=>{if(!e.noMermaid&&s){const f=r.value.querySelectorAll(`div.${Z}-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(x=>(async y=>{var g;if(y.dataset.closed==="false")return!1;const A=y.innerText;let b=yu.get(A);if(!b){const w=Ro();let k={svg:""};try{k=await s.render(w,A,c),b=await e.sanitizeMermaid(k.svg);const D=document.createElement("p");D.className=`${Z}-mermaid`,D.setAttribute("data-processed",""),D.setAttribute("data-content",A),D.innerHTML=b,(g=D.children[0])==null||g.removeAttribute("height"),yu.set(A,D.innerHTML),y.dataset.line!==void 0&&(D.dataset.line=y.dataset.line),y.replaceWith(D)}catch(D){ot.emit(t,jo,{name:"mermaid",message:D.message,error:D})}--p===0&&c.remove()}})(x)))}}}},nm=(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 x=f[c];return x.type==="admonition_open"?f[c].attrPush(["class",`${Z}-admonition ${Z}-admonition-${x.info}`]):x.type==="admonition_title_open"&&f[c].attrPush(["class",`${Z}-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,x,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 w=Math.floor((p-b)/u);if(w!==n)return!1;p-=(p-b)%u;const k=f.src.slice(b,p),D=f.src.slice(p,g);if(d(D),m)return!0;for(x=c;x++,!(x>=h||(b=f.bMarks[x]+f.tShift[x],g=f.eMarks[x],b<g&&f.sCount[x]<f.blkIndent));)if(o===f.src.charCodeAt(b)&&!(f.sCount[x]-f.blkIndent>=4)){for(p=b+1;p<=g&&r[(p-b)%u]===f.src[p];p++);if(!(Math.floor((p-b)/u)<w)&&(p-=(p-b)%u,p=f.skipSpaces(p),!(p<g))){A=!0;break}}const S=f.parentType,_=f.lineMax;return f.parentType="root",f.lineMax=x,y=f.push("admonition_open","div",1),y.markup=k,y.block=!0,y.info=a,y.map=[c,x],s&&(y=f.push("admonition_title_open","p",1),y.markup=k+" "+a,y.map=[c,x],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,x),y=f.push("admonition_close","div",-1),y.markup=f.src.slice(b,p),y.block=!0,f.parentType=S,f.lineMax=_,f.line=x+(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},Uo=(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},rm=(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(`
|
|
38
|
-
`).length<t.autoFoldThreshold,
|
|
37
|
+
See: https://github.com/francoischalifour/medium-zoom`)}},Wm=function(t){var n=document.createElement("div");return n.classList.add("medium-zoom-overlay"),n.style.background=t,n},Gm=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=en({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},Xm=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=window.Promise||function(H){function I(){}H(I,I)},o=function(H){var I=H.target;if(I===X){m();return}b.indexOf(I)!==-1&&x({target:I})},u=function(){if(!(k||!_.original)){var H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(D-H)>S.scrollOffset&&setTimeout(m,150)}},a=function(H){var I=H.key||H.keyCode;(I==="Escape"||I==="Esc"||I===27)&&m()},s=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=H;if(H.background&&(X.style.background=H.background),H.container&&H.container instanceof Object&&(I.container=en({},S.container,H.container)),H.template){var W=bu(H.template)?H.template:document.querySelector(H.template);I.template=W}return S=en({},S,I),b.forEach(function(G){G.dispatchEvent(kn("medium-zoom:update",{detail:{zoom:j}}))}),j},l=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(en({},S,H))},d=function(){for(var H=arguments.length,I=Array(H),W=0;W<H;W++)I[W]=arguments[W];var G=I.reduce(function(T,C){return[].concat(T,Ps(C))},[]);return G.filter(function(T){return b.indexOf(T)===-1}).forEach(function(T){b.push(T),T.classList.add("medium-zoom-image")}),w.forEach(function(T){var C=T.type,F=T.listener,P=T.options;G.forEach(function(M){M.addEventListener(C,F,P)})}),j},f=function(){for(var H=arguments.length,I=Array(H),W=0;W<H;W++)I[W]=arguments[W];_.zoomed&&m();var G=I.length>0?I.reduce(function(T,C){return[].concat(T,Ps(C))},[]):b;return G.forEach(function(T){T.classList.remove("medium-zoom-image"),T.dispatchEvent(kn("medium-zoom:detach",{detail:{zoom:j}}))}),b=b.filter(function(T){return G.indexOf(T)===-1}),j},c=function(H,I){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return b.forEach(function(G){G.addEventListener("medium-zoom:"+H,I,W)}),w.push({type:"medium-zoom:"+H,listener:I,options:W}),j},h=function(H,I){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return b.forEach(function(G){G.removeEventListener("medium-zoom:"+H,I,W)}),w=w.filter(function(G){return!(G.type==="medium-zoom:"+H&&G.listener.toString()===I.toString())}),j},p=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=H.target,W=function(){var T={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},C=void 0,F=void 0;if(S.container)if(S.container instanceof Object)T=en({},T,S.container),C=T.width-T.left-T.right-S.margin*2,F=T.height-T.top-T.bottom-S.margin*2;else{var P=bu(S.container)?S.container:document.querySelector(S.container),M=P.getBoundingClientRect(),z=M.width,N=M.height,V=M.left,L=M.top;T=en({},T,{width:z,height:N,left:V,top:L})}C=C||T.width-S.margin*2,F=F||T.height-S.margin*2;var O=_.zoomedHd||_.original,U=Vs(O)?C:O.naturalWidth||C,J=Vs(O)?F:O.naturalHeight||F,Y=O.getBoundingClientRect(),K=Y.top,re=Y.left,ae=Y.width,ve=Y.height,Te=Math.min(Math.max(ae,U),C)/ae,wt=Math.min(Math.max(ve,J),F)/ve,Me=Math.min(Te,wt),Ln=(-re+(C-ae)/2+S.margin+T.left)/Me,qt=(-K+(F-ve)/2+S.margin+T.top)/Me,Lt="scale("+Me+") translate3d("+Ln+"px, "+qt+"px, 0)";_.zoomed.style.transform=Lt,_.zoomedHd&&(_.zoomedHd.style.transform=Lt)};return new r(function(G){if(I&&b.indexOf(I)===-1){G(j);return}var T=function z(){k=!1,_.zoomed.removeEventListener("transitionend",z),_.original.dispatchEvent(kn("medium-zoom:opened",{detail:{zoom:j}})),G(j)};if(_.zoomed){G(j);return}if(I)_.original=I;else if(b.length>0){var C=b;_.original=C[0]}else{G(j);return}if(_.original.dispatchEvent(kn("medium-zoom:open",{detail:{zoom:j}})),D=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,k=!0,_.zoomed=Gm(_.original),document.body.appendChild(X),S.template){var F=bu(S.template)?S.template:document.querySelector(S.template);_.template=document.createElement("div"),_.template.appendChild(F.content.cloneNode(!0)),document.body.appendChild(_.template)}if(_.original.parentElement&&_.original.parentElement.tagName==="PICTURE"&&_.original.currentSrc&&(_.zoomed.src=_.original.currentSrc),document.body.appendChild(_.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),_.original.classList.add("medium-zoom-image--hidden"),_.zoomed.classList.add("medium-zoom-image--opened"),_.zoomed.addEventListener("click",m),_.zoomed.addEventListener("transitionend",T),_.original.getAttribute("data-zoom-src")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("srcset"),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading"),_.zoomedHd.src=_.zoomed.getAttribute("data-zoom-src"),_.zoomedHd.onerror=function(){clearInterval(P),console.warn("Unable to reach the zoom image target "+_.zoomedHd.src),_.zoomedHd=null,W()};var P=setInterval(function(){_.zoomedHd.complete&&(clearInterval(P),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",m),document.body.appendChild(_.zoomedHd),W())},10)}else if(_.original.hasAttribute("srcset")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading");var M=_.zoomedHd.addEventListener("load",function(){_.zoomedHd.removeEventListener("load",M),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",m),document.body.appendChild(_.zoomedHd),W()})}else W()})},m=function(){return new r(function(H){if(k||!_.original){H(j);return}var I=function W(){_.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(_.zoomed),_.zoomedHd&&document.body.removeChild(_.zoomedHd),document.body.removeChild(X),_.zoomed.classList.remove("medium-zoom-image--opened"),_.template&&document.body.removeChild(_.template),k=!1,_.zoomed.removeEventListener("transitionend",W),_.original.dispatchEvent(kn("medium-zoom:closed",{detail:{zoom:j}})),_.original=null,_.zoomed=null,_.zoomedHd=null,_.template=null,H(j)};k=!0,document.body.classList.remove("medium-zoom--opened"),_.zoomed.style.transform="",_.zoomedHd&&(_.zoomedHd.style.transform=""),_.template&&(_.template.style.transition="opacity 150ms",_.template.style.opacity=0),_.original.dispatchEvent(kn("medium-zoom:close",{detail:{zoom:j}})),_.zoomed.addEventListener("transitionend",I)})},x=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=H.target;return _.original?m():p({target:I})},y=function(){return S},v=function(){return b},g=function(){return _.original},b=[],w=[],k=!1,D=0,S=n,_={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?S=t:(t||typeof t=="string")&&d(t),S=en({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},S);var X=Wm(S.background);document.addEventListener("click",o),document.addEventListener("keyup",a),document.addEventListener("scroll",u),window.addEventListener("resize",m);var j={open:p,close:m,toggle:x,update:s,clone:l,attach:d,detach:f,on:c,off:h,getOptions:y,getImages:v,getZoomedImage:g};return j};function qm(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 Zm=".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}";qm(Zm);const Wt={hljs:`${Z}-hljs`,hlcss:`${Z}-hlCss`,mermaidM:`${Z}-mermaid-m`,mermaid:`${Z}-mermaid`,katexjs:`${Z}-katex`,katexcss:`${Z}-katexCss`,echarts:`${Z}-echarts`},Ym=(e,{editorId:t,rootRef:n,setting:r})=>{const o=ct.editorExtensions.highlight,u=ct.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={...zo,...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]:zo.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={..._s,...ct.editorConfig.languageUserDefined};return Mo(cr(_s["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}},Km=e=>{const t=i.useId();return e.id||e.editorId||`${Z}-${t}`},Qm=(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} .${Z}-preview .${Z}-code`).forEach(f=>{let c=-1;const h=f.querySelector(`.${Z}-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:x,successTips:y,failTips:v}=u.value.copyCode;let g=y;Ss(e.formatCopiedText(m||"")).catch(()=>{g=v}).finally(()=>{h.dataset.isIcon?h.dataset.tips=g:h.innerHTML=g,c=window.setTimeout(()=>{h.dataset.isIcon?h.dataset.tips=x:h.innerHTML=x},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)},Jm=e=>{const t=i.inject("editorId"),n=i.inject("theme"),r=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:u}=ct;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 x;if(e.noEcharts||a)return;const m=o.echarts.js;$t("script",{...(x=u.echarts)==null?void 0:x.js,src:m,id:Wt.echarts,onload(){a=window.echarts,l()}},"echarts")});let d=[],f=[],c=[];const h=(m=!1)=>{if(!d.length){m&&(f.forEach(g=>{var b;(b=g.dispose)==null||b.call(g)}),c.forEach(g=>{var b;(b=g.disconnect)==null||b.call(g)}),f=[],c=[]);return}const x=[],y=[],v=[];d.forEach((g,b)=>{var D,S;const w=f[b],k=c[b];if(m||!g||!g.isConnected||r!=null&&r.value&&!r.value.contains(g)){(D=w==null?void 0:w.dispose)==null||D.call(w),(S=k==null?void 0:k.disconnect)==null||S.call(k);return}x.push(g),w&&y.push(w),k&&v.push(k)}),d=x,f=y,c=v},p=()=>{h(),!e.noEcharts&&a&&Array.from(r.value.querySelectorAll(`#${t} div.${Z}-echarts:not([data-processed])`)).forEach(m=>{if(m.dataset.closed==="false")return!1;try{const x=new Function(`return ${m.innerText}`)(),y=a.init(m,n.value);y.setOption(x),m.setAttribute("data-processed",""),d.push(m),f.push(y);const v=new ResizeObserver(()=>{y.resize()});v.observe(m),c.push(v)}catch(x){ot.emit(t,jo,{name:"echarts",message:x==null?void 0:x.message,error:x})}})};return i.onBeforeUnmount(()=>{h(!0)}),{reRenderEcharts:s,replaceEcharts:p}},ep=e=>{const t=i.inject("highlight"),n=i.shallowRef(ct.editorExtensions.highlight.instance);return i.onMounted(()=>{e.noHighlight||n.value||($t("link",{...t.value.css,rel:"stylesheet",id:Wt.hlcss}),$t("script",{...t.value.js,id:Wt.hljs,onload(){n.value=window.hljs}},"hljs"))}),i.watch(()=>t.value.css,()=>{e.noHighlight||ct.editorExtensions.highlight.instance||Dm("link",{...t.value.css,rel:"stylesheet",id:Wt.hlcss})}),n},tp=e=>{const t=i.shallowRef(ct.editorExtensions.katex.instance);return i.onMounted(()=>{var o,u;if(e.noKatex||t.value)return;const{editorExtensions:n,editorExtensionsAttrs:r}=ct;$t("script",{...(o=r.katex)==null?void 0:o.js,src:n.katex.js,id:Wt.katexjs,onload(){t.value=window.katex}},"katex"),$t("link",{...(u=r.katex)==null?void 0:u.css,rel:"stylesheet",href:n.katex.css,id:Wt.katexcss})}),t},yu=new $m({max:1e3,ttl:6e5}),np=e=>{const t=i.inject("editorId"),n=i.inject("theme"),r=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:u,mermaidConfig:a}=ct;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,()=>{yu.clear(),d()}),i.onMounted(()=>{var c,h;if(e.noMermaid||s)return;const f=o.mermaid.js;/\.mjs/.test(f)?($t("link",{...(c=u.mermaid)==null?void 0:c.js,rel:"modulepreload",href:f,id:Wt.mermaidM}),import(f).then(p=>{s=p.default,d()}).catch(p=>{ot.emit(t,jo,{name:"mermaid",message:`Failed to load mermaid module: ${p.message}`,error:p})})):$t("script",{...(h=u.mermaid)==null?void 0:h.js,src:f,id:Wt.mermaid,onload(){s=window.mermaid,d()}},"mermaid")}),{reRenderRef:l,replaceMermaid:async()=>{if(!e.noMermaid&&s){const f=r.value.querySelectorAll(`div.${Z}-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(x=>(async y=>{var b;if(y.dataset.closed==="false")return!1;const v=y.innerText;let g=yu.get(v);if(!g){const w=Ro();let k={svg:""};try{k=await s.render(w,v,c),g=await e.sanitizeMermaid(k.svg);const D=document.createElement("p");D.className=`${Z}-mermaid`,D.setAttribute("data-processed",""),D.setAttribute("data-content",v),D.innerHTML=g,(b=D.children[0])==null||b.removeAttribute("height"),yu.set(v,D.innerHTML),y.dataset.line!==void 0&&(D.dataset.line=y.dataset.line),y.replaceWith(D)}catch(D){ot.emit(t,jo,{name:"mermaid",message:D.message,error:D})}--m===0&&c.remove()}})(x)))}}}},rp=(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,p,m)=>{const x=f[c];return x.type==="admonition_open"?f[c].attrPush(["class",`${Z}-admonition ${Z}-admonition-${x.info}`]):x.type==="admonition_title_open"&&f[c].attrPush(["class",`${Z}-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,x,y,v=!1,g=f.bMarks[c]+f.tShift[c],b=f.eMarks[c];if(o!==f.src.charCodeAt(g))return!1;for(m=g+1;m<=b&&r[(m-g)%u]===f.src[m];m++);const w=Math.floor((m-g)/u);if(w!==n)return!1;m-=(m-g)%u;const k=f.src.slice(g,m),D=f.src.slice(m,b);if(d(D),p)return!0;for(x=c;x++,!(x>=h||(g=f.bMarks[x]+f.tShift[x],b=f.eMarks[x],g<b&&f.sCount[x]<f.blkIndent));)if(o===f.src.charCodeAt(g)&&!(f.sCount[x]-f.blkIndent>=4)){for(m=g+1;m<=b&&r[(m-g)%u]===f.src[m];m++);if(!(Math.floor((m-g)/u)<w)&&(m-=(m-g)%u,m=f.skipSpaces(m),!(m<b))){v=!0;break}}const S=f.parentType,_=f.lineMax;return f.parentType="root",f.lineMax=x,y=f.push("admonition_open","div",1),y.markup=k,y.block=!0,y.info=a,y.map=[c,x],s&&(y=f.push("admonition_title_open","p",1),y.markup=k+" "+a,y.map=[c,x],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,x),y=f.push("admonition_close","div",-1),y.markup=f.src.slice(g,m),y.block=!0,f.parentType=S,f.lineMax=_,f.line=x+(v?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},Uo=(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},up=(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),[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(u)||[],p=h[1]==="open"||h[1]!=="close"&&t.codeFoldable&&c.content.trim().split(`
|
|
38
|
+
`).length<t.autoFoldThreshold,m=h[1]||t.codeFoldable?"details":"div",x=h[1]||t.codeFoldable?"summary":"div";return{open:p,tagContainer:m,tagHeader:x}},f=(c,h,p,m,x)=>{var C;if(c[h].hidden)return"";const y=(C=t.usedLanguageTextRef.value)==null?void 0:C.copyCode.text,v=t.customIconRef.value.copy||y,g=!!t.customIconRef.value.copy,b=`<span class="${Z}-collapse-tips">${Dt("collapse-tips",t.customIconRef.value)}</span>`,[w]=s(c[h]);if(w===null){const{open:F,tagContainer:P,tagHeader:M}=d(c[h]),z=[["class",`${Z}-code`]];F&&z.push(["open",""]);const N={attrs:Uo(c[h],z)};c[h].info=c[h].info.replace(u,"");const V=n(c,h,p,m,x);return`
|
|
39
39
|
<${P} ${x.renderAttrs(N)}>
|
|
40
40
|
<${M} class="${Z}-code-head">
|
|
41
41
|
<div class="${Z}-code-flag"><span></span><span></span><span></span></div>
|
|
42
42
|
<div class="${Z}-code-action">
|
|
43
43
|
<span class="${Z}-code-lang">${e.utils.escapeHtml(c[h].info.trim())}</span>
|
|
44
|
-
<span class="${Z}-copy-button" data-tips="${y}"${
|
|
44
|
+
<span class="${Z}-copy-button" data-tips="${y}"${g?" data-is-icon=true":""}>${v}</span>
|
|
45
45
|
${t.extraTools instanceof Function?t.extraTools({lang:c[h].info.trim()}):t.extraTools||""}
|
|
46
|
-
${P==="details"?
|
|
46
|
+
${P==="details"?b:""}
|
|
47
47
|
</div>
|
|
48
48
|
</${M}>
|
|
49
49
|
${V}
|
|
@@ -71,7 +71,7 @@ See: https://github.com/francoischalifour/medium-zoom`)}},Up=function(t){var n=d
|
|
|
71
71
|
class="${P}"
|
|
72
72
|
${_}
|
|
73
73
|
role="presentation">
|
|
74
|
-
${n(c,F,m,
|
|
74
|
+
${n(c,F,p,m,x)}
|
|
75
75
|
</div>`,B+=`
|
|
76
76
|
<input
|
|
77
77
|
type="radio"
|
|
@@ -87,19 +87,19 @@ See: https://github.com/francoischalifour/medium-zoom`)}},Up=function(t){var n=d
|
|
|
87
87
|
</div>
|
|
88
88
|
<div class="${Z}-code-action">
|
|
89
89
|
<span class="${Z}-codetab-lang">${B}</span>
|
|
90
|
-
<span class="${Z}-copy-button" data-tips="${y}"${
|
|
90
|
+
<span class="${Z}-copy-button" data-tips="${y}"${g?" data-is-icon=true":""}>${v}</span>
|
|
91
91
|
${t.extraTools instanceof Function?t.extraTools({lang:c[h].info.trim()}):t.extraTools||""}
|
|
92
|
-
${I==="details"?
|
|
92
|
+
${I==="details"?b:""}
|
|
93
93
|
</div>
|
|
94
94
|
</${W}>
|
|
95
95
|
${j}
|
|
96
96
|
</${I}>
|
|
97
|
-
`};e.renderer.rules.fence=f,e.renderer.rules.code_block=f},
|
|
98
|
-
`)})));let _=()=>{},X=()=>{};const j=()=>{var T;const G=(T=f.value)==null?void 0:T.querySelectorAll(`#${o} p.${Z}-mermaid:not([data-closed=false])`);X(),X=
|
|
99
|
-
`)}))},I=i.computed(()=>(e.noKatex||!!
|
|
100
|
-
`),
|
|
101
|
-
`))):ot.emit(n,kp,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})},Em=(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)},Bs={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}};({...Bs});const zs=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes)},Sm=(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,Dm=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(!Sm(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=zs(o),s=zs(u||"");r(a,s)}),()=>i.createVNode("div",{id:e.id,class:e.class,innerHTML:n,ref:t},null)}}),Fm=i.defineComponent({name:"ContentPreview",props:Bs,setup(e){const t=i.inject("editorId"),n=i.inject("setting"),r=i.inject("previewTheme"),o=i.inject("showCodeRowNumber"),{html:u,key:a}=km(e,e.previewOnly);Kp(e,u,a),Cm(e,u),_m(e,u),Em(e,u,a);const s=i.computed(()=>[`${Z}-preview`,`${r==null?void 0:r.value}-theme`,o&&`${Z}-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(Dm,{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:`${Z}-preview-wrapper`,key:"content-preview-wrapper"},[l()])),n.value.htmlPreview&&i.createVNode("div",{id:`${t}-html-wrapper`,class:`${Z}-preview-wrapper`,key:"html-preview-wrapper"},[i.createVNode("div",{class:`${Z}-html`},[u.value])])])}}),Tm=({text:e})=>e,js={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:Tm},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}};({...js});const Hs=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"];[...Hs];const Nm=(e,t,n)=>{const{editorId:r}=n,o={rerender(){ot.emit(r,_s)}};t.expose(o)},wu=i.defineComponent({name:"MdPreview",props:js,emits:Hs,setup(e,t){const{noKatex:n,noMermaid:r,noHighlight:o}=e,u=i.ref(),a=Yp(e);Zp(e,{rootRef:u,editorId:a}),Nm(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:[Z,e.class,e.theme==="dark"&&`${Z}-dark`,`${Z}-previewOnly`],style:e.style,ref:u},[i.createVNode(Fm,{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)])}});wu.install=e=>(e.component(wu.name,wu),e);const Im={onClick:{type:Function,default:void 0},language:{type:String,default:void 0},theme:{type:String,default:void 0},disabled:{type:Boolean,default:void 0}},Wo=i.defineComponent({name:"NormalFooterToolbar",props:Im,emits:["onClick"],setup(e,t){return()=>{const n=xp({props:e,ctx:t});return i.createVNode("div",{class:[`${Z}-footer-item`,e.disabled&&`${Z}-disabled`],onClick:r=>{var o;e.disabled||((o=e.onClick)==null||o.call(e,r),t.emit("onClick",r))}},[n])}}});Wo.install=e=>(e.component(Wo.name,Wo),e);var Go={exports:{}},me={},Xo={exports:{}},tn={},$s;function Us(){if($s)return tn;$s=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 tn.whiteList=e(),tn.getDefaultWhiteList=e,tn.onAttr=t,tn.onIgnoreAttr=n,tn.safeAttrValue=o,tn}var Ws,Gs;function Xs(){return Gs||(Gs=1,Ws={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,"")}}),Ws}var qo,qs;function Om(){if(qs)return qo;qs=1;var e=Xs();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)),x=e.trim(h.slice(m+1));if(p){var y=r(a,l.length,p,x,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===`
|
|
102
|
-
`&&d()}return e.trim(l)}return qo=t,qo}var Zo,Zs;function Lm(){if(Zs)return Zo;Zs=1;var e=Us(),t=Om();Xs();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,x,y,A){var b=l[x],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(x,y),!!y){var w={position:p,sourcePosition:m,source:A,isWhite:g};if(g){var k=d(x,y,w);return n(k)?x+":"+y:k}else{var k=f(x,y,w);if(!n(k))return k}}});return h},Zo=o,Zo}var Ys;function Yo(){return Ys||(Ys=1,function(e,t){var n=Us(),r=Lm();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)}(Xo,Xo.exports)),Xo.exports}var Ks,Qs;function Ko(){return Qs||(Qs=1,Ks={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}}),Ks}var Js;function el(){if(Js)return me;Js=1;var e=Yo().FilterCSS,t=Yo().getDefaultWhiteList,n=Ko();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(T,C,F){}function a(T,C,F){}function s(T,C,F){}function l(T,C,F){}function d(T){return T.replace(c,"<").replace(h,">")}function f(T,C,F,P){if(F=j(F),C==="href"||C==="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(C==="background"){if(b.lastIndex=0,b.test(F))return""}else if(C==="style"){if(g.lastIndex=0,g.test(F)||(w.lastIndex=0,w.test(F)&&(b.lastIndex=0,b.test(F))))return"";P!==!1&&(P=P||o,F=P.process(F))}return F=B(F),F}var c=/</g,h=/>/g,m=/"/g,p=/"/g,x=/&#([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,w=/u\s*r\s*l\s*\(.*/gi;function k(T){return T.replace(m,""")}function D(T){return T.replace(p,'"')}function S(T){return T.replace(x,function(C,F){return F[0]==="x"||F[0]==="X"?String.fromCharCode(parseInt(F.substr(1),16)):String.fromCharCode(parseInt(F,10))})}function _(T){return T.replace(y,":").replace(A," ")}function X(T){for(var C="",F=0,P=T.length;F<P;F++)C+=T.charCodeAt(F)<32?" ":T.charAt(F);return n.trim(C)}function j(T){return T=D(T),T=S(T),T=_(T),T=X(T),T}function B(T){return T=k(T),T=d(T),T}function H(){return""}function I(T,C){typeof C!="function"&&(C=function(){});var F=!Array.isArray(T);function P(N){return F?!0:n.indexOf(T,N)!==-1}var M=[],z=!1;return{onIgnoreTag:function(N,V,L){if(P(N))if(L.isClosing){var O="[/removed]",U=L.position+O.length;return M.push([z!==!1?z:L.position,U]),z=!1,O}else return z||(z=L.position),"[removed]";else return C(N,V,L)},remove:function(N){var V="",L=0;return n.forEach(M,function(O){V+=N.slice(L,O[0]),L=O[1]}),V+=N.slice(L),V}}}function W(T){for(var C="",F=0;F<T.length;){var P=T.indexOf("<!--",F);if(P===-1){C+=T.slice(F);break}C+=T.slice(F,P);var M=T.indexOf("-->",P);if(M===-1)break;F=M+3}return C}function G(T){var C=T.split("");return C=C.filter(function(F){var P=F.charCodeAt(0);return P===127?!1:P<=31?P===10||P===13:!0}),C.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=D,me.escapeHtmlEntities=S,me.escapeDangerHtml5Entities=_,me.clearNonPrintableCharacter=X,me.friendlyAttrValue=j,me.escapeAttrValue=B,me.onIgnoreTagStripAll=H,me.StripTagBody=I,me.stripCommentTag=W,me.stripBlankChar=G,me.attributeWrapSign='"',me.cssFilter=o,me.getDefaultCSSWhiteList=t,me}var xu={},tl;function nl(){if(tl)return xu;tl=1;var e=Ko();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="",x=0,y=!1,A=!1,b=0,g=c.length,w="",k="";e:for(b=0;b<g;b++){var D=c.charAt(b);if(y===!1){if(D==="<"){y=b;continue}}else if(A===!1){if(D==="<"){p+=m(c.slice(x,b)),y=b,x=b;continue}if(D===">"||b===g-1){p+=m(c.slice(x,y)),k=c.slice(y,b+1),w=t(k),p+=h(y,p.length,w,k,n(k)),x=b+1,y=!1;continue}if(D==='"'||D==="'")for(var S=1,_=c.charAt(b-S);_.trim()===""||_==="=";){if(_==="="){A=D;continue e}_=c.charAt(b-++S)}}else if(D===A){A=!1;continue}}return x<g&&(p+=m(c.substr(x))),p}var o=/[^a-zA-Z0-9\\_:.-]/gim;function u(c,h){var m=0,p=0,x=[],y=!1,A=c.length;function b(S,_){if(S=e.trim(S),S=S.replace(o,"").toLowerCase(),!(S.length<1)){var X=h(S,_||"");X&&x.push(X)}}for(var g=0;g<A;g++){var w=c.charAt(g),k,D;if(y===!1&&w==="="){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(D=c.indexOf(w,g+1),D===-1)break;k=e.trim(c.slice(p+1,D)),b(y,k),y=!1,g=D,m=g+1;continue}if(/\s|\n|\t/.test(w))if(c=c.replace(/\s|\n|\t/g," "),y===!1)if(D=a(c,g),D===-1){k=e.trim(c.slice(m,g)),b(k),y=!1,m=g+1;continue}else{g=D-1;continue}else if(D=l(c,g-1),D===-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(x.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 xu.parseTag=r,xu.parseAttr=u,xu}var Qo,rl;function Vm(){if(rl)return Qo;rl=1;var e=Yo().FilterCSS,t=el(),n=nl(),r=n.parseTag,o=n.parseAttr,u=Ko();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,x=m.onTag,y=m.onIgnoreTag,A=m.onTagAttr,b=m.onIgnoreTagAttr,g=m.safeAttrValue,w=m.escapeHtml,k=h.attributeWrapSign,D=h.cssFilter;m.stripBlankChar&&(c=t.stripBlankChar(c)),m.allowCommentTag||(c=t.stripCommentTag(c));var S=!1;m.stripIgnoreTagBody&&(S=t.StripTagBody(m.stripIgnoreTagBody,y),y=S.onIgnoreTag);var _=r(c,function(X,j,B,H,I){var W={sourcePosition:X,position:j,isClosing:I,isWhite:Object.prototype.hasOwnProperty.call(p,B)},G=x(B,H,W);if(!a(G))return G;if(W.isWhite){if(W.isClosing)return"</"+B+">";var T=s(H),C=p[B],F=o(T.html,function(P,M){var z=u.indexOf(C,P)!==-1,N=A(B,P,M,z);return a(N)?z?(M=g(B,P,M,D),M?P+"="+k+M+k:P):(N=b(B,P,M,z),a(N)?void 0:N):N});return H="<"+B,F&&(H+=" "+F),T.closing&&(H+=" /"),H+=">",H}else return G=y(B,H,W),a(G)?w(H):G},w);return S&&(_=S.remove(_)),_},Qo=f,Qo}var ul;function Pm(){return ul||(ul=1,function(e,t){var n=el(),r=nl(),o=Vm();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)}(Go,Go.exports)),Go.exports}Pm();const nn=i.defineComponent({name:"FMarkdownPreview",props:As,setup(e){return()=>i.createVNode("div",{class:"f-markdown-preview-container"},[i.createVNode(wu,{modelValue:e.content},null)])}});nn.install=e=>{e.component(nn.name,nn)};const Jo="farris-x-preview-bridge",ei=1,ti="assistant.message";function ol(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function il(e){return e!==null&&typeof e=="object"}function al(e){if(!il(e)||e.source!==Jo||e.v!==ei||e.type!==ti)return!1;const t=e.payload;return!(!il(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function Rm(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function sl(e,t,n){const r=ol(n);try{return e.postMessage({source:Jo,v:ei,type:ti,payload:r},t),!0}catch{return!1}}function ll(e){const t=e.allowTopAsSource!==!1,n=r=>{var o;Rm(r,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(r.origin)||al(r.data)&&((o=e.onAssistantMessage)==null||o.call(e,r.data.payload)))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}const Mm="/platform/common/web/renderer/index.html#/preview",Bm="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",zm="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",jm="67441dbb-0219-46f2-b247-51555c317995";function cl(e){if(e.url)return e.url;const t=e.baseUri??Mm,n=e.metadataPath??Bm,r=e.projectPath??zm,o=e.baseMetadataId??jm;return`${t}?metadataPath=${encodeURIComponent(n)}&projectPath=${encodeURIComponent(r)}&baseMetadataId=${encodeURIComponent(o)}`}function Hm(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=cl(e),n=new URL(t,window.location.href).origin;return n==="null"||n===""?window.location.origin:n}catch{return null}}const cr=i.defineComponent({name:"ChatPreview",props:vs,setup(e,{expose:t}){const n=i.ref(null),r=i.ref(null),o=i.ref(!1),u=i.ref(!1),a=i.computed(()=>cl(e.previewConfig??{})),s=i.computed(()=>{var T;return((T=e.previewConfig)==null?void 0:T.contentType)==="markdown"}),l=i.computed(()=>{var T;return Object.keys(((T=e.previewConfig)==null?void 0:T.contentMap)??{})}),d=i.computed(()=>l.value.filter(T=>T).length>0),f=i.ref(),c=i.ref(),h=i.ref(!1);let m=null;i.onBeforeUnmount(()=>{m==null||m(),m=null,H()}),i.watch(()=>[a.value,n.value,s.value],()=>{if(m==null||m(),m=null,s.value)return;const T=n.value;if(!T)return;h.value=!1,o.value=!1,u.value=!1;const C=Date.now(),F=200,P=300,M=1e4;let z=!1,N=null,V=null;V=window.setTimeout(()=>{V=null,z||(u.value=!0)},F);const L=()=>{if(z)return;if(z=!0,N&&(window.clearTimeout(N),N=null),V&&(window.clearTimeout(V),V=null),h.value=!0,I(T),u.value){const J=Date.now()-C,Y=Math.max(0,P-J);setTimeout(()=>{o.value=!0},Y)}else o.value=!0;const U=()=>{var J;return(J=e.onIframeLoad)==null?void 0:J.call(e)};U(),window.setTimeout(U,0),window.setTimeout(U,120)},O=()=>{var U;z||(z=!0,V&&(window.clearTimeout(V),V=null),console.warn("ChatPreview: iframe load timeout"),h.value=!0,o.value=!0,(U=e.onIframeLoad)==null||U.call(e))};T.addEventListener("load",L,{once:!0}),N=window.setTimeout(O,M),m=()=>{T.removeEventListener("load",L),N&&(window.clearTimeout(N),N=null),V&&(window.clearTimeout(V),V=null)}},{flush:"post"}),i.watch([s,()=>{var T;return(T=e.previewConfig)==null?void 0:T.contentMap}],()=>{H(),s.value&&i.nextTick(()=>B())},{flush:"post"}),i.watch(()=>{var T;return(T=e.previewConfig)==null?void 0:T.contentMap},T=>{if(T){const C=Object.keys(T);f.value=C[0]??""}else f.value="";p()},{immediate:!0});function p(T){var C,F;T&&(f.value=T),d.value&&f.value?c.value=((F=(C=e.previewConfig)==null?void 0:C.contentMap)==null?void 0:F[f.value])||"":c.value=""}function x(T){var P;if(s.value||!h.value)return!1;const C=(P=n.value)==null?void 0:P.contentWindow;if(!C)return!1;const F=Hm(e.previewConfig??{});return F?sl(C,F,T):!1}t({postAssistantPayload:x});const y=i.ref(!1);let A=null;const b=800;function g(){y.value=!0,j(!0),A!=null&&(window.clearTimeout(A),A=null)}function w(){A!=null&&window.clearTimeout(A),A=window.setTimeout(()=>{y.value=!1,j(!1),A=null},b)}function k(){g(),w()}function D(){g()}function S(){w()}let _=[];function X(){const T=r.value;if(!T)return[];const C=[],F=T.querySelectorAll(".f-markdown-preview-container");return F.length>0&&F.forEach(P=>C.push(P)),C.length===0&&T.scrollHeight>T.clientHeight&&C.push(T),C}function j(T){const C=r.value;C&&C.querySelectorAll(".f-markdown-preview-container").forEach(F=>{F.classList.toggle("f-chat-preview-scrollbar-visible",T)})}function B(){const T=X();_=T,T.forEach(C=>{C.addEventListener("scroll",k,{passive:!0}),C.addEventListener("mouseenter",D),C.addEventListener("mouseleave",S)})}function H(){_.forEach(T=>{T.removeEventListener("scroll",k),T.removeEventListener("mouseenter",D),T.removeEventListener("mouseleave",S)}),_=[]}function I(T){try{const C=T.contentDocument;if(!C)return;const F="f-chat-preview-injected-scrollbar-style";if(C.getElementById(F))return;const P=C.createElement("style");P.id=F,P.textContent=`
|
|
97
|
+
`};e.renderer.rules.fence=f,e.renderer.rules.code_block=f},op=(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",`${Z}-echarts`),l.attrSet("data-echarts-theme",t.themeRef.value),l.map&&l.level===0){const h=l.map[1]-1,p=!!((c=(f=a.srcLines[h])==null?void 0:f.trim())!=null&&c.startsWith("```"));l.attrSet("data-closed",`${p}`),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)}},ip=(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)},Rs={block:[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}],inline:[{open:"$$",close:"$$"},{open:"$",close:"$"},{open:"\\[",close:"\\]"},{open:"\\(",close:"\\)"}]},ap=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},sp=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(),p=h==="",m=h===d.close,x=h.endsWith(d.close);if(!p&&!m&&!x)continue;if(o)return!0;if(m)return l("",n+1,d.open);if(!p&&x){const w=h.slice(0,-d.close.length);return l(w,n+1,d.open)}let y=n+1,v=!1,g="";for(;y<r;y++){const w=t.bMarks[y]+t.tShift[y],k=t.eMarks[y];if(w<k&&t.tShift[y]<t.blkIndent)break;if(t.src.slice(w,k).trim().endsWith(d.close)){const D=t.src.slice(0,k).lastIndexOf(d.close);g=t.src.slice(w,D),v=!0;break}}if(!v)continue;const b=t.getLines(n+1,y,t.tShift[n],!0)+(g.trim()?g:"");return l(b,y+1,d.open)}return!1},lp=(e,{katexRef:t,inlineDelimiters:n,blockDelimiters:r})=>{const o=(s,l,d,f,c=!1)=>{const h={attrs:Uo(s,[["class",l]])},p=f.renderAttrs(h);if(!t.value)return`<${d} ${p}>${s.content}</${d}>`;const m=t.value.renderToString(s.content,ct.katexConfig({throwOnError:!1,displayMode:c}));return`<${d} ${p} data-processed>${m}</${d}>`},u=(s,l,d,f,c)=>o(s[l],`${Z}-katex-inline`,"span",c),a=(s,l,d,f,c)=>o(s[l],`${Z}-katex-block`,"p",c,!0);e.inline.ruler.before("escape","math_inline",ap({delimiters:n||Rs.inline})),e.block.ruler.after("blockquote","math_block",sp({delimiters:r||Rs.block}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=u,e.renderer.rules.math_block=a},cp=(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",`${Z}-mermaid`),l.attrSet("data-mermaid-theme",t.themeRef.value),l.map&&l.level===0){const p=l.map[1]-1,m=!!((c=(f=a.srcLines[p])==null?void 0:f.trim())!=null&&c.startsWith("```"));l.attrSet("data-closed",`${m}`),l.attrSet("data-line",String(l.map[0]))}const h=yu.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)}},Ms=(e,t,n)=>{const r=e.attrIndex(t),o=[t,n];r<0?e.attrPush(o):(e.attrs=e.attrs||[],e.attrs[r]=o)},dp=e=>e.type==="inline",fp=e=>e.type==="paragraph_open",hp=e=>e.type==="list_item_open",mp=e=>e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0,pp=(e,t)=>dp(e[t])&&fp(e[t-1])&&hp(e[t-2])&&mp(e[t]),gp=(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},bp=e=>{const t=new e("html_inline","",0);return t.content="<label>",t},yp=e=>{const t=new e("html_inline","",0);return t.content="</label>",t},wp=(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},xp=(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},vp=(e,t,n)=>{if(e.children=e.children||[],e.children.unshift(xp(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(wp(e.content,r,t))}else e.children.unshift(bp(t)),e.children.push(yp(t))},Ap=(e,t={})=>{e.core.ruler.after("inline","github-task-lists",n=>{const r=n.tokens;for(let o=2;o<r.length;o++)pp(r,o)&&(vp(r[o],n.Token,t),Ms(r[o-2],"class","task-list-item"+(t.enabled?" enabled":" ")),Ms(r[gp(r,o-2)],"class","contains-task-list"))})},kp=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))},Cp=(e,t)=>{const{editorConfig:n,markdownItPlugins:r}=ct,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([]),p=ep(e),m=tp(e),{reRenderRef:x,replaceMermaid:y}=np(e),{reRenderEcharts:v,replaceEcharts:g}=Jm(e),b=Ze({html:!0,breaks:!0,linkify:!0}),w=[{type:"image",plugin:Om,options:{figcaption:!0,classes:"md-zoom"}},{type:"admonition",plugin:rp,options:{}},{type:"taskList",plugin:Ap,options:{}},{type:"heading",plugin:ip,options:{mdHeadingId:e.mdHeadingId,headsRef:h}},{type:"code",plugin:up,options:{editorId:o,usedLanguageTextRef:a,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,customIconRef:d}},{type:"sub",plugin:Pm,options:{}},{type:"sup",plugin:Bm,options:{}}];e.noKatex||w.push({type:"katex",plugin:lp,options:{katexRef:m}}),e.noMermaid||w.push({type:"mermaid",plugin:cp,options:{themeRef:l}}),e.noEcharts||w.push({type:"echarts",plugin:op,options:{themeRef:l}}),r(w,{editorId:o}).forEach(G=>{b.use(G.plugin,G.options)});const k=b.options.highlight;b.set({highlight:(G,T,C)=>{if(k){const M=k(G,T,C);if(M)return M}let F;!e.noHighlight&&p.value?p.value.getLanguage(T)?F=p.value.highlight(G,{language:T,ignoreIllegals:!0}).value:F=p.value.highlightAuto(G).value:F=b.utils.escapeHtml(G);const P=s?Em(F.replace(/^\n+|\n+$/g,""),G.replace(/^\n+|\n+$/g,"")):`<span class="${Z}-code-block">${F.replace(/^\n+|\n+$/g,"")}</span>`;return`<pre><code class="language-${T}" language=${T}>${P}</code></pre>`}}),kp(b);const D=i.ref(`_article-key_${Ro()}`),S=i.ref(e.sanitize(b.render(e.modelValue,{srcLines:e.modelValue.split(`
|
|
98
|
+
`)})));let _=()=>{},X=()=>{};const j=()=>{var T;const G=(T=f.value)==null?void 0:T.querySelectorAll(`#${o} p.${Z}-mermaid:not([data-closed=false])`);X(),X=Tm(G,{customIcon:d.value}),_(),_=Nm(G,{customIcon:d.value})},B=()=>{ot.emit(o,Am,S.value),e.onHtmlChanged(S.value),e.onGetCatalog(h.value),ot.emit(o,Ho,h.value),i.nextTick(()=>{y().then(j),g()})},H=()=>{h.value=[],S.value=e.sanitize(b.render(e.modelValue,{srcLines:e.modelValue.split(`
|
|
99
|
+
`)}))},I=i.computed(()=>(e.noKatex||!!m.value)&&(e.noHighlight||!!p.value));let W=-1;return i.watch([i.toRef(e,"modelValue"),I,x,u],()=>{W=window.setTimeout(()=>{H()},t?0:n.renderDelay)}),i.watch(()=>c.value.preview,()=>{c.value.preview&&i.nextTick(()=>{y().then(j),g(),ot.emit(o,Ho,h.value)})}),i.watch([S,v],()=>{B()}),i.onMounted(B),i.onMounted(()=>{ot.on(o,{name:km,callback(){ot.emit(o,Ho,h.value)}}),ot.on(o,{name:Es,callback:()=>{D.value=`_article-key_${Ro()}`,H()}})}),i.onBeforeUnmount(()=>{_(),X(),clearTimeout(W)}),{html:S,key:D}},_p=(e,t)=>{const n=i.inject("editorId"),r=i.inject("setting"),{noImgZoomIn:o}=e,u=fm(()=>{const a=document.querySelectorAll(`#${n}-preview img:not(.not-zoom):not(.medium-zoom-image)`);a.length!==0&&Xm(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()})},Bs={checked:{regexp:/- \[x\]/,value:"- [ ]"},unChecked:{regexp:/- \[\s\]/,value:"- [x]"}},Ep=(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 m;l.preventDefault();const d=l.target.checked?"unChecked":"checked",f=(m=l.target.parentElement)==null?void 0:m.dataset.line;if(!f)return;const c=Number(f),h=e.modelValue.split(`
|
|
100
|
+
`),p=h[Number(c)].replace(Bs[d].regexp,Bs[d].value);e.previewOnly?(h[Number(c)]=p,e.onChange(h.join(`
|
|
101
|
+
`))):ot.emit(n,Cm,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(u)},{immediate:!0})},Sp=(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)},zs={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}};({...zs});const js=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,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(!Dp(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=js(o),s=js(u||"");r(a,s)}),()=>i.createVNode("div",{id:e.id,class:e.class,innerHTML:n,ref:t},null)}}),Tp=i.defineComponent({name:"ContentPreview",props:zs,setup(e){const t=i.inject("editorId"),n=i.inject("setting"),r=i.inject("previewTheme"),o=i.inject("showCodeRowNumber"),{html:u,key:a}=Cp(e,e.previewOnly);Qm(e,u,a),_p(e,u),Ep(e,u),Sp(e,u,a);const s=i.computed(()=>[`${Z}-preview`,`${r==null?void 0:r.value}-theme`,o&&`${Z}-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(Fp,{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:`${Z}-preview-wrapper`,key:"content-preview-wrapper"},[l()])),n.value.htmlPreview&&i.createVNode("div",{id:`${t}-html-wrapper`,class:`${Z}-preview-wrapper`,key:"html-preview-wrapper"},[i.createVNode("div",{class:`${Z}-html`},[u.value])])])}}),Np=({text:e})=>e,Hs={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:Np},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}};({...Hs});const $s=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"];[...$s];const Ip=(e,t,n)=>{const{editorId:r}=n,o={rerender(){ot.emit(r,Es)}};t.expose(o)},wu=i.defineComponent({name:"MdPreview",props:Hs,emits:$s,setup(e,t){const{noKatex:n,noMermaid:r,noHighlight:o}=e,u=i.ref(),a=Km(e);Ym(e,{rootRef:u,editorId:a}),Ip(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:[Z,e.class,e.theme==="dark"&&`${Z}-dark`,`${Z}-previewOnly`],style:e.style,ref:u},[i.createVNode(Tp,{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)])}});wu.install=e=>(e.component(wu.name,wu),e);const Op={onClick:{type:Function,default:void 0},language:{type:String,default:void 0},theme:{type:String,default:void 0},disabled:{type:Boolean,default:void 0}},Wo=i.defineComponent({name:"NormalFooterToolbar",props:Op,emits:["onClick"],setup(e,t){return()=>{const n=vm({props:e,ctx:t});return i.createVNode("div",{class:[`${Z}-footer-item`,e.disabled&&`${Z}-disabled`],onClick:r=>{var o;e.disabled||((o=e.onClick)==null||o.call(e,r),t.emit("onClick",r))}},[n])}}});Wo.install=e=>(e.component(Wo.name,Wo),e);var Go={exports:{}},pe={},Xo={exports:{}},tn={},Us;function Ws(){if(Us)return tn;Us=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 tn.whiteList=e(),tn.getDefaultWhiteList=e,tn.onAttr=t,tn.onIgnoreAttr=n,tn.safeAttrValue=o,tn}var Gs,Xs;function qs(){return Xs||(Xs=1,Gs={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,"")}}),Gs}var qo,Zs;function Lp(){if(Zs)return qo;Zs=1;var e=qs();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)),p=h.indexOf(":");if(p!==-1){var m=e.trim(h.slice(0,p)),x=e.trim(h.slice(p+1));if(m){var y=r(a,l.length,m,x,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===`
|
|
102
|
+
`&&d()}return e.trim(l)}return qo=t,qo}var Zo,Ys;function Vp(){if(Ys)return Zo;Ys=1;var e=Ws(),t=Lp();qs();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(p,m,x,y,v){var g=l[x],b=!1;if(g===!0?b=g:typeof g=="function"?b=g(y):g instanceof RegExp&&(b=g.test(y)),b!==!0&&(b=!1),y=c(x,y),!!y){var w={position:m,sourcePosition:p,source:v,isWhite:b};if(b){var k=d(x,y,w);return n(k)?x+":"+y:k}else{var k=f(x,y,w);if(!n(k))return k}}});return h},Zo=o,Zo}var Ks;function Yo(){return Ks||(Ks=1,function(e,t){var n=Ws(),r=Vp();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)}(Xo,Xo.exports)),Xo.exports}var Qs,Js;function Ko(){return Js||(Js=1,Qs={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}}),Qs}var el;function tl(){if(el)return pe;el=1;var e=Yo().FilterCSS,t=Yo().getDefaultWhiteList,n=Ko();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(T,C,F){}function a(T,C,F){}function s(T,C,F){}function l(T,C,F){}function d(T){return T.replace(c,"<").replace(h,">")}function f(T,C,F,P){if(F=j(F),C==="href"||C==="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(C==="background"){if(g.lastIndex=0,g.test(F))return""}else if(C==="style"){if(b.lastIndex=0,b.test(F)||(w.lastIndex=0,w.test(F)&&(g.lastIndex=0,g.test(F))))return"";P!==!1&&(P=P||o,F=P.process(F))}return F=B(F),F}var c=/</g,h=/>/g,p=/"/g,m=/"/g,x=/&#([a-zA-Z0-9]*);?/gim,y=/:?/gim,v=/&newline;?/gim,g=/((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,b=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,w=/u\s*r\s*l\s*\(.*/gi;function k(T){return T.replace(p,""")}function D(T){return T.replace(m,'"')}function S(T){return T.replace(x,function(C,F){return F[0]==="x"||F[0]==="X"?String.fromCharCode(parseInt(F.substr(1),16)):String.fromCharCode(parseInt(F,10))})}function _(T){return T.replace(y,":").replace(v," ")}function X(T){for(var C="",F=0,P=T.length;F<P;F++)C+=T.charCodeAt(F)<32?" ":T.charAt(F);return n.trim(C)}function j(T){return T=D(T),T=S(T),T=_(T),T=X(T),T}function B(T){return T=k(T),T=d(T),T}function H(){return""}function I(T,C){typeof C!="function"&&(C=function(){});var F=!Array.isArray(T);function P(N){return F?!0:n.indexOf(T,N)!==-1}var M=[],z=!1;return{onIgnoreTag:function(N,V,L){if(P(N))if(L.isClosing){var O="[/removed]",U=L.position+O.length;return M.push([z!==!1?z:L.position,U]),z=!1,O}else return z||(z=L.position),"[removed]";else return C(N,V,L)},remove:function(N){var V="",L=0;return n.forEach(M,function(O){V+=N.slice(L,O[0]),L=O[1]}),V+=N.slice(L),V}}}function W(T){for(var C="",F=0;F<T.length;){var P=T.indexOf("<!--",F);if(P===-1){C+=T.slice(F);break}C+=T.slice(F,P);var M=T.indexOf("-->",P);if(M===-1)break;F=M+3}return C}function G(T){var C=T.split("");return C=C.filter(function(F){var P=F.charCodeAt(0);return P===127?!1:P<=31?P===10||P===13:!0}),C.join("")}return pe.whiteList=r(),pe.getDefaultWhiteList=r,pe.onTag=u,pe.onIgnoreTag=a,pe.onTagAttr=s,pe.onIgnoreTagAttr=l,pe.safeAttrValue=f,pe.escapeHtml=d,pe.escapeQuote=k,pe.unescapeQuote=D,pe.escapeHtmlEntities=S,pe.escapeDangerHtml5Entities=_,pe.clearNonPrintableCharacter=X,pe.friendlyAttrValue=j,pe.escapeAttrValue=B,pe.onIgnoreTagStripAll=H,pe.StripTagBody=I,pe.stripCommentTag=W,pe.stripBlankChar=G,pe.attributeWrapSign='"',pe.cssFilter=o,pe.getDefaultCSSWhiteList=t,pe}var xu={},nl;function rl(){if(nl)return xu;nl=1;var e=Ko();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 r(c,h,p){var m="",x=0,y=!1,v=!1,g=0,b=c.length,w="",k="";e:for(g=0;g<b;g++){var D=c.charAt(g);if(y===!1){if(D==="<"){y=g;continue}}else if(v===!1){if(D==="<"){m+=p(c.slice(x,g)),y=g,x=g;continue}if(D===">"||g===b-1){m+=p(c.slice(x,y)),k=c.slice(y,g+1),w=t(k),m+=h(y,m.length,w,k,n(k)),x=g+1,y=!1;continue}if(D==='"'||D==="'")for(var S=1,_=c.charAt(g-S);_.trim()===""||_==="=";){if(_==="="){v=D;continue e}_=c.charAt(g-++S)}}else if(D===v){v=!1;continue}}return x<b&&(m+=p(c.substr(x))),m}var o=/[^a-zA-Z0-9\\_:.-]/gim;function u(c,h){var p=0,m=0,x=[],y=!1,v=c.length;function g(S,_){if(S=e.trim(S),S=S.replace(o,"").toLowerCase(),!(S.length<1)){var X=h(S,_||"");X&&x.push(X)}}for(var b=0;b<v;b++){var w=c.charAt(b),k,D;if(y===!1&&w==="="){y=c.slice(p,b),p=b+1,m=c.charAt(p)==='"'||c.charAt(p)==="'"?p:s(c,b+1);continue}if(y!==!1&&b===m){if(D=c.indexOf(w,b+1),D===-1)break;k=e.trim(c.slice(m+1,D)),g(y,k),y=!1,b=D,p=b+1;continue}if(/\s|\n|\t/.test(w))if(c=c.replace(/\s|\n|\t/g," "),y===!1)if(D=a(c,b),D===-1){k=e.trim(c.slice(p,b)),g(k),y=!1,p=b+1;continue}else{b=D-1;continue}else if(D=l(c,b-1),D===-1){k=e.trim(c.slice(p,b)),k=f(k),g(y,k),y=!1,p=b+1;continue}else continue}return p<c.length&&(y===!1?g(c.slice(p)):g(y,f(e.trim(c.slice(p))))),e.trim(x.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 xu.parseTag=r,xu.parseAttr=u,xu}var Qo,ul;function Pp(){if(ul)return Qo;ul=1;var e=Yo().FilterCSS,t=tl(),n=rl(),r=n.parseTag,o=n.parseAttr,u=Ko();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 p=c[c.length-1]==="/";return p&&(c=u.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,x=p.onTag,y=p.onIgnoreTag,v=p.onTagAttr,g=p.onIgnoreTagAttr,b=p.safeAttrValue,w=p.escapeHtml,k=h.attributeWrapSign,D=h.cssFilter;p.stripBlankChar&&(c=t.stripBlankChar(c)),p.allowCommentTag||(c=t.stripCommentTag(c));var S=!1;p.stripIgnoreTagBody&&(S=t.StripTagBody(p.stripIgnoreTagBody,y),y=S.onIgnoreTag);var _=r(c,function(X,j,B,H,I){var W={sourcePosition:X,position:j,isClosing:I,isWhite:Object.prototype.hasOwnProperty.call(m,B)},G=x(B,H,W);if(!a(G))return G;if(W.isWhite){if(W.isClosing)return"</"+B+">";var T=s(H),C=m[B],F=o(T.html,function(P,M){var z=u.indexOf(C,P)!==-1,N=v(B,P,M,z);return a(N)?z?(M=b(B,P,M,D),M?P+"="+k+M+k:P):(N=g(B,P,M,z),a(N)?void 0:N):N});return H="<"+B,F&&(H+=" "+F),T.closing&&(H+=" /"),H+=">",H}else return G=y(B,H,W),a(G)?w(H):G},w);return S&&(_=S.remove(_)),_},Qo=f,Qo}var ol;function Rp(){return ol||(ol=1,function(e,t){var n=tl(),r=rl(),o=Pp();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)}(Go,Go.exports)),Go.exports}Rp();const nn=i.defineComponent({name:"FMarkdownPreview",props:ks,setup(e){return()=>i.createVNode("div",{class:"f-markdown-preview-container"},[i.createVNode(wu,{modelValue:e.content},null)])}});nn.install=e=>{e.component(nn.name,nn)};const Jo="farris-x-preview-bridge",ei=1,ti="assistant.message";function il(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function al(e){return e!==null&&typeof e=="object"}function sl(e){if(!al(e)||e.source!==Jo||e.v!==ei||e.type!==ti)return!1;const t=e.payload;return!(!al(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function Mp(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function ll(e,t,n){const r=il(n);try{return e.postMessage({source:Jo,v:ei,type:ti,payload:r},t),!0}catch{return!1}}function cl(e){const t=e.allowTopAsSource!==!1,n=r=>{var o;Mp(r,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(r.origin)||sl(r.data)&&((o=e.onAssistantMessage)==null||o.call(e,r.data.payload)))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}const Bp="/platform/common/web/renderer/index.html#/preview",zp="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",jp="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",Hp="67441dbb-0219-46f2-b247-51555c317995";function dl(e){if(e.url)return e.url;const t=e.baseUri??Bp,n=e.metadataPath??zp,r=e.projectPath??jp,o=e.baseMetadataId??Hp;return`${t}?metadataPath=${encodeURIComponent(n)}&projectPath=${encodeURIComponent(r)}&baseMetadataId=${encodeURIComponent(o)}`}function $p(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=dl(e),n=new URL(t,window.location.href).origin;return n==="null"||n===""?window.location.origin:n}catch{return null}}const dr=i.defineComponent({name:"ChatPreview",props:As,setup(e,{expose:t}){const n=i.ref(null),r=i.ref(null),o=i.ref(!1),u=i.ref(!1),a=i.computed(()=>dl(e.previewConfig??{})),s=i.computed(()=>{var T;return((T=e.previewConfig)==null?void 0:T.contentType)==="markdown"}),l=i.computed(()=>{var T;return Object.keys(((T=e.previewConfig)==null?void 0:T.contentMap)??{})}),d=i.computed(()=>l.value.filter(T=>T).length>0),f=i.ref(),c=i.ref(),h=i.ref(!1);let p=null;i.onBeforeUnmount(()=>{p==null||p(),p=null,H()}),i.watch(()=>[a.value,n.value,s.value],()=>{if(p==null||p(),p=null,s.value)return;const T=n.value;if(!T)return;h.value=!1,o.value=!1,u.value=!1;const C=Date.now(),F=200,P=300,M=1e4;let z=!1,N=null,V=null;V=window.setTimeout(()=>{V=null,z||(u.value=!0)},F);const L=()=>{if(z)return;if(z=!0,N&&(window.clearTimeout(N),N=null),V&&(window.clearTimeout(V),V=null),h.value=!0,I(T),u.value){const J=Date.now()-C,Y=Math.max(0,P-J);setTimeout(()=>{o.value=!0},Y)}else o.value=!0;const U=()=>{var J;return(J=e.onIframeLoad)==null?void 0:J.call(e)};U(),window.setTimeout(U,0),window.setTimeout(U,120)},O=()=>{var U;z||(z=!0,V&&(window.clearTimeout(V),V=null),console.warn("ChatPreview: iframe load timeout"),h.value=!0,o.value=!0,(U=e.onIframeLoad)==null||U.call(e))};T.addEventListener("load",L,{once:!0}),N=window.setTimeout(O,M),p=()=>{T.removeEventListener("load",L),N&&(window.clearTimeout(N),N=null),V&&(window.clearTimeout(V),V=null)}},{flush:"post"}),i.watch([s,()=>{var T;return(T=e.previewConfig)==null?void 0:T.contentMap}],()=>{H(),s.value&&i.nextTick(()=>B())},{flush:"post"}),i.watch(()=>{var T;return(T=e.previewConfig)==null?void 0:T.contentMap},T=>{if(T){const C=Object.keys(T);f.value=C[0]??""}else f.value="";m()},{immediate:!0});function m(T){var C,F;T&&(f.value=T),d.value&&f.value?c.value=((F=(C=e.previewConfig)==null?void 0:C.contentMap)==null?void 0:F[f.value])||"":c.value=""}function x(T){var P;if(s.value||!h.value)return!1;const C=(P=n.value)==null?void 0:P.contentWindow;if(!C)return!1;const F=$p(e.previewConfig??{});return F?ll(C,F,T):!1}t({postAssistantPayload:x});const y=i.ref(!1);let v=null;const g=800;function b(){y.value=!0,j(!0),v!=null&&(window.clearTimeout(v),v=null)}function w(){v!=null&&window.clearTimeout(v),v=window.setTimeout(()=>{y.value=!1,j(!1),v=null},g)}function k(){b(),w()}function D(){b()}function S(){w()}let _=[];function X(){const T=r.value;if(!T)return[];const C=[],F=T.querySelectorAll(".f-markdown-preview-container");return F.length>0&&F.forEach(P=>C.push(P)),C.length===0&&T.scrollHeight>T.clientHeight&&C.push(T),C}function j(T){const C=r.value;C&&C.querySelectorAll(".f-markdown-preview-container").forEach(F=>{F.classList.toggle("f-chat-preview-scrollbar-visible",T)})}function B(){const T=X();_=T,T.forEach(C=>{C.addEventListener("scroll",k,{passive:!0}),C.addEventListener("mouseenter",D),C.addEventListener("mouseleave",S)})}function H(){_.forEach(T=>{T.removeEventListener("scroll",k),T.removeEventListener("mouseenter",D),T.removeEventListener("mouseleave",S)}),_=[]}function I(T){try{const C=T.contentDocument;if(!C)return;const F="f-chat-preview-injected-scrollbar-style";if(C.getElementById(F))return;const P=C.createElement("style");P.id=F,P.textContent=`
|
|
103
103
|
html, body {
|
|
104
104
|
scrollbar-width: thin;
|
|
105
105
|
scrollbar-color: transparent transparent;
|
|
@@ -146,8 +146,8 @@ See: https://github.com/francoischalifour/medium-zoom`)}},Up=function(t){var n=d
|
|
|
146
146
|
document.addEventListener('mouseenter', show);
|
|
147
147
|
document.addEventListener('mouseleave', scheduleHide);
|
|
148
148
|
})();
|
|
149
|
-
`,(C.head||C.documentElement).appendChild(z)}catch{}}const W=()=>{var T;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"},[((T=e.previewConfig)==null?void 0:T.title)||"预览"])])]),i.createVNode("div",{class:"f-chat-preview-header-right"},[i.createVNode("button",{class:"f-chat-preview-tool-btn",title:"关闭预览","aria-label":"关闭预览",onClick:()=>{var C;return(C=e.onClose)==null?void 0:C.call(e)}},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_close"},null)])])])},G=()=>{var T;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(
|
|
150
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
149
|
+
`,(C.head||C.documentElement).appendChild(z)}catch{}}const W=()=>{var T;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"},[((T=e.previewConfig)==null?void 0:T.title)||"预览"])])]),i.createVNode("div",{class:"f-chat-preview-header-right"},[i.createVNode("button",{class:"f-chat-preview-tool-btn",title:"关闭预览","aria-label":"关闭预览",onClick:()=>{var C;return(C=e.onClose)==null?void 0:C.call(e)}},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_close"},null)])])])},G=()=>{var T;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(lr,{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((C,F)=>i.createVNode("div",{key:F,class:["f-chat-preview-content-nav-item",C===f.value?"active-nav-item":""],title:C,onClick:()=>m(C)},[C]))])])]}),i.createVNode(lr,{position:"right",resizable:!0,width:600,class:"f-chat-preview-pane-right"},{default:()=>[i.createVNode(nn,{content:c.value},null)]})]})]):null:i.createVNode(nn,{content:((T=e.previewConfig)==null?void 0:T.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?G():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 Up(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 Wp(e){return cl(e)}let Gp=0;const fr=[];function rn(){var e;return((e=fr[fr.length-1])==null?void 0:e.h)??{}}function Xp(e){const t=++Gp;return fr.push({id:t,h:e}),()=>{const n=fr.findIndex(r=>r.id===t);n>=0&&fr.splice(n,1)}}const qp={showPreview(e){var t,n;(n=(t=rn()).showPreview)==null||n.call(t,e)},replaceRightPreview(e){var t,n;(n=(t=rn()).showPreview)==null||n.call(t,e)},closePreviewPane(){var e,t;(t=(e=rn()).closePreviewPane)==null||t.call(e)},closeRightPreview(){var e,t;(t=(e=rn()).closeRightPreview)==null||t.call(e)},showFullScreenPreview(e){var t,n;(n=(t=rn()).showFullScreenPreview)==null||n.call(t,e)},closeFullScreenPreview(){var e,t;(t=(e=rn()).closeFullScreenPreview)==null||t.call(e)},isPreviewLayoutActive(){return typeof rn().showPreview=="function"}};dr.install=e=>{e.component(dr.name,dr)};const fl={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}},hr=i.defineComponent({name:"FXConfirmDialog",props:fl,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}});hr.install=e=>{e.component(hr.name,hr)};function hl(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 Zp(e){if(Array.isArray(e))return e}function Yp(e,t,n){return(t=r1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kp(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 Qp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
150
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ml(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 pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ml(Object(n),!0).forEach(function(r){Yp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jp(e,t){if(e==null)return{};var n,r,o=e1(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 e1(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 t1(e,t){return Zp(e)||Kp(e,t)||u1(e,t)||Qp()}function n1(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 r1(e){var t=n1(e,"string");return typeof t=="symbol"?t:t+""}function u1(e,t){if(e){if(typeof e=="string")return hl(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)?hl(e,t):void 0}}function o1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gl(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 bl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gl(Object(n),!0).forEach(function(r){o1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gl(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i1(){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 mr(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 vu(e){return{}.toString.call(e).includes("Object")}function a1(e){return!Object.keys(e).length}function pr(e){return typeof e=="function"}function s1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l1(e,t){return vu(t)||Gt("changeType"),Object.keys(t).some(function(n){return!s1(e,n)})&&Gt("changeField"),t}function c1(e){pr(e)||Gt("selectorType")}function d1(e){pr(e)||vu(e)||Gt("handlerType"),vu(e)&&Object.values(e).some(function(t){return!pr(t)})&&Gt("handlersType")}function f1(e){e||Gt("initialIsRequired"),vu(e)||Gt("initialType"),a1(e)&&Gt("initialContent")}function h1(e,t){throw new Error(e[t]||e.default)}var m1={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"},Gt=mr(h1)(m1),Au={changes:l1,selector:c1,handler:d1,initial:f1};function p1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Au.initial(e),Au.handler(t);var n={current:e},r=mr(y1)(n,t),o=mr(b1)(n),u=mr(Au.changes)(e),a=mr(g1)(n);function s(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return Au.selector(d),d(n.current)}function l(d){i1(r,o,u,a)(d)}return[s,l]}function g1(e,t){return pr(t)?t(e.current):t}function b1(e,t){return e.current=bl(bl({},e.current),t),t}function y1(e,t,n){return pr(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 w1={create:p1},x1={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function v1(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 A1(e){return{}.toString.call(e).includes("Object")}function k1(e){return e||wl("configIsRequired"),A1(e)||wl("configType"),e.urls?(C1(),{paths:{vs:e.urls.monacoBase}}):e}function C1(){console.warn(yl.deprecation)}function _1(e,t){throw new Error(e[t]||e.default)}var yl={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!
|
|
151
151
|
You are using deprecated way of configuration.
|
|
152
152
|
|
|
153
153
|
Instead of using
|
|
@@ -156,6 +156,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
156
156
|
monaco.config({ paths: { vs: '...' } })
|
|
157
157
|
|
|
158
158
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
159
|
-
`},
|
|
159
|
+
`},wl=v1(_1)(yl),E1={config:k1},S1=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 xl(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],xl(e[n],t[n]))}),pl(pl({},e),t)}var D1={type:"cancelation",msg:"operation is manually canceled"};function ni(e){var t=!1,n=new Promise(function(r,o){e.then(function(u){return t?o(D1):r(u)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var F1=["monaco"],T1=w1.create({config:x1,isInitialized:!1,resolve:null,reject:null,monaco:null}),vl=t1(T1,2),gr=vl[0],ku=vl[1];function N1(e){var t=E1.config(e),n=t.monaco,r=Jp(t,F1);ku(function(o){return{config:xl(o.config,r),monaco:n}})}function I1(){var e=gr(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(ku({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ni(ri);if(window.monaco&&window.monaco.editor)return Al(window.monaco),e.resolve(window.monaco),ni(ri);S1(O1,V1)(P1)}return ni(ri)}function O1(e){return document.body.appendChild(e)}function L1(e){var t=document.createElement("script");return e&&(t.src=e),t}function V1(e){var t=gr(function(r){var o=r.config,u=r.reject;return{config:o,reject:u}}),n=L1("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function P1(){var e=gr(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;Al(r),e.resolve(r)},function(n){e.reject(n)})}function Al(e){gr().monaco||ku({monaco:e})}function R1(){return gr(function(e){var t=e.monaco;return t})}var ri=new Promise(function(e,t){return ku({resolve:e,reject:t})}),M1={config:N1,init:I1,__getMonacoInstance:R1};const kl={content:{type:Object,required:!0}},Cl=20,B1=16,Cn=180;function z1(e){typeof requestIdleCallback<"u"?requestIdleCallback(e,{timeout:500}):setTimeout(e,0)}const br=i.defineComponent({name:"FXCodingMessage",props:kl,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 g,b,w,k;const m=(g=e.content)==null?void 0:g.code;if(!m)return Cn;const y=o.value;let v;if(y!=null&&y.getOriginalEditor&&(y!=null&&y.getModifiedEditor)){const D=((b=y.getOriginalEditor().getModel())==null?void 0:b.getLineCount())??0,S=((w=y.getModifiedEditor().getModel())==null?void 0:w.getLineCount())??0;v=D+S}else if(y!=null&&y.getModel)v=((k=y.getModel())==null?void 0:k.getLineCount())??0;else{const{value:D,originalValue:S}=m,_=(D||"").split(`
|
|
160
160
|
`).length,X=S?S.split(`
|
|
161
|
-
`).length:0;A=S?X+_:_}return M1+A*kl}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 x=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(x,{timeout:100}):setTimeout(x,0)}function h(){if(a.value)return;const p=r.value,x=o.value;if(!p||!(x!=null&&x.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)||R1.init().then(x=>{var w;if(a.value||!r.value||!((w=e.content)!=null&&w.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:kl,padding:{top:8,bottom:8}};if(A){const k=x.editor.createDiffEditor(r.value,{...g,renderSideBySide:!1,renderOverviewRuler:!1});k.setModel({original:x.editor.createModel(A,b),modified:x.editor.createModel(y,b)}),k.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),k.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),i.nextTick(()=>{var S;if(a.value)return;const D=(S=k.getContainerDomNode)==null?void 0:S.call(k);if(D){const _=D.querySelector('.diff-editor-cell.original, [class*="original"]');_&&(_.style.display="none")}}),o.value=k}else{const k=x.editor.create(r.value,{value:y,language:b,...g});o.value=k}u.value=Cn,i.nextTick(()=>h())})}return i.onMounted(()=>{B1(()=>{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,x;return(x=(p=e.content)==null?void 0:p.code)==null?void 0:x.value},()=>{a.value||(n.value?u.value=l():u.value=Cn,h())}),()=>{const p=e.content;if(!p)return null;const{message:x,fileIcon:y,fileName:A,code:b}=p;return i.createVNode("div",{class:"f-chat-message-coding"},[i.createVNode("div",{class:"f-chat-coding-message"},[x]),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 w;g.target.style.display="none",(w=g.target.parentElement)==null||w.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)])])])])}}});gr.install=e=>{e.component(gr.name,gr)};const Cl={content:{type:Object,required:!0}};function z1(e){return"file"in e&&"path"in e}const br=i.defineComponent({name:"FileOperationMessage",props:Cl,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,x,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)}},(x=h.details)!=null&&x.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)=>z1(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:w=>{const k=w.target;k.style.display="none";const D=k.parentElement;D&&D.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])]))])])})])])}}});br.install=e=>{e.component(br.name,br)};const _l={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:()=>({})}},j1="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",yr=i.defineComponent({name:"FXGenerateProcess",props:_l,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(()=>ke({},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?Vr(e.icon):i.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:j1},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()])])])}}});yr.install=e=>{e.component(yr.name,yr)};const El={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},H1=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],wr=i.defineComponent({name:"FXChatHistory",props:El,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&&H1.map(a=>u(a.label,o.value[a.key]))])])}});wr.install=e=>{e.component(wr.name,wr)};const Sl={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 Dl=(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))(Dl||{});const Fl={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:Dl.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},Cu=i.defineComponent({name:"FPrompt",props:Fl,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=ke({},(h=e.styles)==null?void 0:h.item);return ke(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},[Vr(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:Sl,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=ke(f,(c=e.styles)==null?void 0:c.items),f=ke(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(Cu,{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(Cu.name,Cu)};const Tl={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:Tl,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="",x();return}const b=window.getSelection();if(!b||b.rangeCount===0)return;const g=b.getRangeAt(0),w=g.cloneRange();w.selectNodeContents(n.value),w.setEnd(g.endContainer,g.endOffset);const k=w.toString(),D=k.lastIndexOf(e.promptChar);if(s.value=n.value.textContent||"",D!==-1&&k.substring(D+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 j=document.createRange();j.setStart(n.value,0),j.setEnd(g.endContainer,g.endOffset);const{top:B,right:H}=j.getBoundingClientRect(),I=c();u.value={top:B-I-5,left:H+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 w=b.getRangeAt(0);w.selectNodeContents(n.value),w.collapse(!1),b.removeAllRanges(),b.addRange(w),x()},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":x();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)&&x()},x=()=>{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 Nl={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},vr=i.defineComponent({name:"Todo",props:Nl,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(ur,{items:e.items},null)])])])}});vr.install=e=>{e.component(vr.name,vr),e.component(ur.name,ur),e.component(du.name,du),e.directive("overflow-tooltip",Ei)};function En(e){return e.toolResultApplied===!0||String(e.result??"").trim().length>0}const Ar=i.defineComponent({name:"FXToolUseBatch",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>{const c=e.content.toolCalls;return!c||c.length===0?!0:c.every(En)}),{getToolIconClass:n}=Gu(),r=i.computed(()=>t.value?`共调用 ${e.content.totalCount??e.content.toolCalls.length} 个工具`:"正在调用工具"),o=i.ref(!t.value),u=()=>{o.value=!o.value};i.watch(t,c=>{c&&(o.value=!1)});const a=c=>{En(c)&&(c._expanded=!c._expanded)},s=c=>{const h=En(c),m=c.success===!1;return{"f-chat-tool-use-batch-item":!0,"is-done":h&&!m,"is-error":m,"is-run":!h&&!m}},l=c=>{const h=En(c);return c.success===!1?"执行失败":h?"执行成功":"调用中"},d=c=>{const h=En(c);return c.success===!1?"Error":h?"Done":"Working"},f=c=>c.toolDescription?c.toolDescription:c.command?`{ command: ${c.command} }`:c.toolName??"tool";return()=>i.createVNode("div",{class:"f-chat-tool-use-batch"},[i.createVNode("div",{class:"f-chat-tool-use-batch-header",onClick:u},[i.createVNode("span",{class:"f-chat-tool-use-batch-title"},[r.value]),i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:o.value?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),o.value&&i.createVNode("div",{class:"f-chat-tool-use-batch-body"},[e.content.toolCalls.map(c=>{const h=En(c),m=c.success===!1,p=h||m,x=!!c._expanded;return i.createVNode("div",{class:s(c)},[i.createVNode("div",{class:"f-chat-tool-use-batch-item-header",onClick:()=>a(c)},[i.createVNode("i",{class:"fx-icon fx-icon-"+n(c.toolName)+" tool-icon"},null),i.createVNode("span",{class:"f-chat-tool-use-batch-item-text"},[f(c)]),i.createVNode("div",{class:"f-chat-tool-use-batch-item-status"},[i.createVNode(rr,{status:d(c),variant:"tool-use"},null),i.createVNode("span",null,[l(c)])]),p&&i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:x?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),x&&p&&i.createVNode("div",{class:"f-chat-tool-use-batch-item-result"},[c.errorMessage||c.result])])})])])}});Ar.install=e=>{e.component(Ar.name,Ar)};const Il={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:()=>({})}},kr=i.defineComponent({name:"FXWelcome",props:Il,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(()=>ke({},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},[Vr(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()])}});kr.install=e=>{e.component(kr.name,kr)};const Ol={content:{type:Object,required:!0},onOpen:{type:Function}},$1="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",U1="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",W1="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==",Ll="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",G1="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",Cr=i.defineComponent({name:"FChatAttachmentPreview",props:Ol,emits:[],setup(e){function t(s){switch(s.toLowerCase()){case"doc":case"docx":return $1;case"xlsx":case"xls":return U1;case"ppt":case"mobi":return W1;case"txt":return Ll;case"png":case"jpg":case"jpeg":case"gif":return G1;default:return Ll}}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=ln(l);d&&await Lr(d,l.name)}function a(s,l){const d=r(s.size||0),f=n(s),c=ln(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))])])}}});Cr.install=e=>{e.component(Cr.name,Cr)},wn.install=e=>{e.component(wn.name,wn)},xn.install=e=>{e.component(xn.name,xn)};const Vl={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:""}},_r=i.defineComponent({name:"FXNav",props:Vl,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(()=>ke({},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)])]))])}}});_r.install=e=>{e.component(_r.name,_r)};const Pl={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}},Rl={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}},_u=i.defineComponent({name:"FXSearchBoxContainer",props:Rl,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("无匹配结果")])])])}}),Er=i.defineComponent({name:"FXSearchBox",props:Pl,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,w=>{var k;(k=o.value)==null||k.search(w),t.emit("update:modelValue",w)}),i.watch(()=>e.modelValue,w=>{u.value=w});function d(w){u.value=w,p()}function f(w){const k=u.value;t.emit("change",w,{oldValue:k,newValue:w})}function c(w){t.emit("selectedValue",w)}function h(){t.emit("clickButton",{})}async function m(){var w;a.value=!0,await i.nextTick(),(w=r.value)==null||w.show(n.value)}function p(){var w;(w=r.value)==null||w.hide(),a.value=!1}function x(){a.value?p():m()}function y(w){const k=w.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:x,hidePopup:p,showPopup:m});const g=i.computed(()=>{const w=ye({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof w=="string"?[w]:Array.isArray(w)?w:[]]});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(Qt,{ref:r,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost},{default:()=>[i.createVNode(_u,{ref:o,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:d,onSearchedValue:w=>c(w),loading:e.loading,maxHeight:e.maxHeight},t.slots)]})])}});Er.install=e=>{e.component(Er.name,Er),e.component(_u.name,_u)};const ui={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 X1(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],x=new Map;c.forEach(A=>{const b=String(A[p]??"");x.has(b)||x.set(b,[]),x.get(b).push(A)});let y=0;return x.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 q1=i.defineComponent({name:"FXListViewItem",props:{...ui,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]])])}}),Z1=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])])])}}),Sr=i.defineComponent({name:"FXListView",props:ui,emits:["clickItem"],setup(e,t){const{visualData:n,activeItemId:r,updateDataSource:o,activeRowById:u,clearSelection:a,toggleSelection:s,isSelected:l}=X1({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(Z1,{key:`group_${c.groupValue}_${h}`,groupData:c.data,groupField:c.groupField,groupValue:c.groupValue,index:h},{default:t.slots.group}):i.createVNode(q1,{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}))])])])}});Sr.install=e=>{e.component(Sr.name,Sr)};const Eu=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])}}});Eu.install=e=>{e.component(Eu.name,Eu)};function Y1(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function K1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function Q1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const Su=i.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>K1(e.content.media)),n=i.computed(()=>ln(Q1(e.content.media)));async function r(o){o.preventDefault(),o.stopPropagation();const u=n.value;u&&await Lr(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"},[Y1(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])}}});Su.install=e=>{e.component(Su.name,Su)};const J1={0:"高",1:"中",2:"低"},Du=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"},[J1[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])}}});Du.install=e=>{e.component(Du.name,Du)};const Nt="__hitl_other__";function oi(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 Fu=i.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!0},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(C){const F={},P={};for(const M of C){const z=Sn(M.ui_type);if(z==="confirm")F[M.id]=void 0;else if(z==="text"||z==="select")F[M.id]=M.default_value??"";else if(z==="multi_select")F[M.id]=M.default_value?JSON.parse(M.default_value):[];else if(z==="form"){const N={};if(Array.isArray(M.fields))for(const V of M.fields)N[V.name]=V.default_value??"";F[M.id]=N}else F[M.id]=M.default_value??"";P[M.id]={active:!1,text:""}}r.value=F,o.value=P,n.value=0}i.watch(()=>e.content.questions,C=>{Array.isArray(C)&&C.length&&a(C)},{immediate:!0}),i.watch(()=>e.content.answers,C=>{if(!Array.isArray(C)||C.length===0)return;const F={...r.value},P={...o.value};for(const M of C){F[M.id]=M.answer;const z=e.content.questions.find(N=>N.id===M.id);z&&Sn(z.ui_type)==="select"&&typeof M.answer=="string"&&!(z.options??[]).some(L=>L.label===M.answer)&&M.answer!==""&&(P[M.id]={active:!0,text:M.answer},F[M.id]=Nt)}r.value=F,o.value=P,t.value=!0},{immediate:!0});const s=i.computed(()=>e.content.questions.length),l=i.computed(()=>{const C=e.content.questions;if(C.length===0)return null;const F=Math.max(0,Math.min(n.value,C.length-1));return C[F]}),d=i.computed(()=>n.value<=0),f=i.computed(()=>n.value>=s.value-1),c=i.computed(()=>{const C=l.value;return C?p(C):!0});function h(){e.required&&!c.value||f.value||(n.value+=1)}function m(){d.value||(n.value-=1)}function p(C){var M,z;const F=Sn(C.ui_type),P=r.value[C.id];if(F==="text"&&(typeof P!="string"||P.trim()==="")||F==="select"&&(typeof P!="string"||P.trim()===""||P===Nt&&(((z=(M=o.value[C.id])==null?void 0:M.text)==null?void 0:z.trim())??"")==="")||F==="confirm"&&typeof P!="boolean"||F==="multi_select"&&(!Array.isArray(P)||P.length===0))return!1;if(F==="form"){const N=C.fields??[],V=P;for(const L of N)if(L.required){const O=V[L.name];if(typeof O!="string"||O.trim()==="")return!1}}return!((F==="date"||F==="number")&&(typeof P!="string"||P.trim()===""))}const x=i.computed(()=>u.value?!1:e.content.questions.every(C=>p(C)));function y(C,F){r.value={...r.value,[C]:F}}function A(C,F,P){const M=r.value[C]??{};y(C,{...M,[F]:P})}function b(C,F){var P;F===Nt?(o.value={...o.value,[C.id]:{...o.value[C.id],active:!0,text:((P=o.value[C.id])==null?void 0:P.text)??""}},y(C.id,Nt)):(o.value={...o.value,[C.id]:{active:!1,text:""}},y(C.id,F))}function g(C,F){const P=r.value[C.id]??[];P.includes(F)?y(C.id,P.filter(M=>M!==F)):y(C.id,[...P,F])}function w(){var F,P,M;if(!x.value)return;const C=[];for(const z of e.content.questions){const N=Sn(z.ui_type);let V=r.value[z.id];N==="select"&&V===Nt&&(V=((P=(F=o.value[z.id])==null?void 0:F.text)==null?void 0:P.trim())??""),N==="number"&&(V=Number(V)),C.push({id:z.id,answer:V})}t.value=!0,(M=e.onSubmitAnswers)==null||M.call(e,C)}function k(C,F,P){return i.createVNode("div",{class:"f-hitl-date-wrap"},[i.createVNode("input",{class:"f-hitl-input",type:"date",value:C,disabled:F,onInput:M=>P(M.target.value)},null)])}function D(C,F,P,M,z){const N=O=>{let U=Number(C)||0;U+=O,M!==void 0&&(U=Math.max(M,U)),z!==void 0&&(U=Math.min(z,U)),P(String(U))},V=z!==void 0&&Number(C||0)>=z,L=M!==void 0&&Number(C||0)<=M;return i.createVNode("div",{class:"f-hitl-num-wrap"},[i.createVNode("input",{class:"f-hitl-input f-hitl-num-input",type:"number",value:C,min:M,max:z,disabled:F,onInput:O=>P(O.target.value)},null),i.createVNode("div",{class:"f-hitl-num-btns"},[i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:F||V,onClick:()=>N(1)},[i.createVNode("span",{class:"fx-icon fx-icon-foldup"},null)]),i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:F||L,onClick:()=>N(-1)},[i.createVNode("span",{class:"fx-icon fx-icon-expanddown"},null)])])])}function S(C,F,P,M){return i.createVNode("div",{key:C.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":P}],onClick:M},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[F+1]),i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[C.label]),C.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[oi(C.description)]):null]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[P?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}function _(C,F){return i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),F])}function X(C,F,P){const M=r.value[C.id]??"",z=r.value[C.id]??[],N=o.value[C.id]??{active:!1,text:""},V=P==="single",L=V&&M===Nt||N.active,O=C.allow_other&&L,U=re=>V?M===re.label&&!N.active:z.includes(re.label),J=re=>()=>{u.value||(V?b(C,re.label):g(C,re.label))},Y=()=>{if(!u.value)if(V)b(C,Nt);else{const re=N.text;N.active?(y(C.id,z.filter(ae=>ae!==re)),o.value={...o.value,[C.id]:{active:!1,text:""}}):(o.value={...o.value,[C.id]:{active:!0,text:N.text}},N.text&&!z.includes(N.text)&&y(C.id,[...z,N.text]))}},K=re=>{const ae=re.target.value;o.value={...o.value,[C.id]:{active:!0,text:ae}},V?y(C.id,Nt):y(C.id,[...z.filter(ve=>ve!==N.text),ae])};return i.createVNode("div",{key:C.id},[i.createVNode("div",{class:"f-hitl-option-list"},[F.map((re,ae)=>S(re,ae,U(re),J(re))),C.allow_other?i.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":L}],onClick:Y},[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"},[L?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),O?i.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:N.text,placeholder:"请输入自定义内容",disabled:u.value,onInput:K},null):null])}function j(C){const F=r.value[C.id]??{},P=C.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-form-group"},[P.map(M=>{const z=F[M.name]??"";return M.type==="select"?_(M,i.createVNode("div",{class:"f-hitl-select-group"},[(M.options??[]).map(N=>{const V=typeof N=="string"?N:N.label??"";return i.createVNode("button",{key:V,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":z===V}],disabled:u.value,onClick:()=>A(C.id,M.name,V)},[V])})])):M.type==="number"?_(M,D(z,u.value,N=>A(C.id,M.name,N),M.min,M.max)):M.type==="date"?_(M,k(z,u.value,N=>A(C.id,M.name,N))):_(M,i.createVNode("input",{class:"f-hitl-input",type:"text",value:z,placeholder:M.default_value??"请输入",disabled:u.value,onInput:N=>A(C.id,M.name,N.target.value)},null))})])])}function B(C){const F=Sn(C.ui_type);if(F==="text"){const P=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("input",{class:"f-hitl-input",type:"text",value:P,placeholder:C.placeholder??"请输入",disabled:u.value,onInput:M=>y(C.id,M.target.value)},null)])}if(F==="multi_select"){const P=Array.isArray(C.options)?C.options:[];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[X(C,P,"multi")])}if(F==="form")return j(C);if(F==="select"){let P=Array.isArray(C.options)?C.options:[];return P.length===0&&(P=[{label:"暂无"}]),i.createVNode("div",{class:"f-hitl-field",key:C.id},[X(C,P,"single")])}if(F==="confirm"){const P=r.value[C.id];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":P===!0}],disabled:u.value,onClick:()=>y(C.id,!0)},[i.createTextVNode("是")]),i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":P===!1}],disabled:u.value,onClick:()=>y(C.id,!1)},[i.createTextVNode("否")])])])}if(F==="date"){const P=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[k(P,u.value,M=>y(C.id,M))])}if(F==="number"){const P=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[D(P,u.value,M=>y(C.id,M),C.min,C.max)])}return i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:C.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持 ui_type「"),String(C.ui_type),i.createTextVNode("」,请升级前端。")])])}function H(C){const F=Sn(C.ui_type),P=(z,N,V)=>i.createVNode("input",{class:"f-hitl-input",type:z,value:N,readonly:!0,min:V==null?void 0:V.min,max:V==null?void 0:V.max},null);if(F==="text"){const z=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[P("text",z)])}if(F==="multi_select"){const z=r.value[C.id]??[],N=Array.isArray(C.options)?C.options:[],V=new Set(N.map(O=>O.label)),L=z.filter(O=>!V.has(O));return i.createVNode("div",{key:C.id},[i.createVNode("div",{class:"f-hitl-option-list"},[N.filter(O=>z.includes(O.label)).map(O=>i.createVNode("div",{class:"f-hitl-opt-row",key:O.label},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[O.label]),O.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[oi(O.description)]):null])])),L.map(O=>i.createVNode("div",{class:"f-hitl-opt-row",key:O},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[O])])]))])])}if(F==="select"){const z=r.value[C.id]??"",N=o.value[C.id]??{active:!1,text:""},V=Array.isArray(C.options)?C.options:[],L=z===Nt||N.active;return i.createVNode("div",{key:C.id},[i.createVNode("div",{class:"f-hitl-option-list"},[L?i.createVNode("div",{class:"f-hitl-opt-row"},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[N.text||"其他"])])]):V.filter(O=>O.label===z).map(O=>i.createVNode("div",{class:"f-hitl-opt-row",key:O.label},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[O.label]),O.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[oi(O.description)]):null])]))])])}if(F==="confirm"){const z=r.value[C.id];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn","f-hitl-cbtn--readonly"]},[z===!0?"是":"否"])])])}if(F==="form"){const z=r.value[C.id]??{},N=C.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-form-group"},[N.map(V=>{const L=z[V.name]??"";let O;return V.type==="number"?O=P("number",L,{min:V.min,max:V.max}):V.type==="date"?O=P("date",L):O=P("text",L),_(V,O)})])])}if(F==="date"){const z=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[P("date",z)])}if(F==="number"){const z=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[P("number",z)])}const M=r.value[C.id];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("span",{class:"f-hitl-submitted-value"},[String(M??"")])])}function I(C){return i.createVNode("div",{class:"f-hitl-card__title-wrap"},[i.createVNode("span",{class:"f-hitl-card__title"},[C.question]),i.createVNode("span",{class:"f-hitl-card__subtitle"},[C.header])])}function W(){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:m},[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:h},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-right"},null)])])}function G(){const C=e.pinnedWidth?{width:`calc(${e.pinnedWidth} * 0.8)`,minWidth:"343px",maxWidth:"800px"}:void 0;return i.createVNode("div",{class:"f-hitl-card",style:C},[i.createVNode("div",{class:"f-hitl-submitted-flat"},[e.content.questions.map(F=>i.createVNode("div",{class:"f-hitl-submitted-item",key:F.id},[i.createVNode("div",{class:"f-hitl-card__header"},[I(F)]),i.createVNode("div",{class:"f-hitl-card__body"},[H(F)])]))])])}function T(){const C=l.value;if(!C)return null;const F=e.pinned?"f-hitl-card--pinned":"",P=e.pinned&&e.pinnedWidth?{width:e.pinnedWidth}:void 0;return i.createVNode("div",{class:["f-hitl-card",F],style:P},[i.createVNode("div",{class:"f-hitl-card__header"},[I(C),W()]),i.createVNode("div",{class:"f-hitl-card__body"},[B(C)]),!u.value&&i.createVNode("div",{class:"f-hitl-card__footer"},[s.value>1&&!f.value&&i.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:e.required&&!c.value,onClick:h},[i.createTextVNode("下一条")]),f.value&&i.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:!x.value,onClick:w},[i.createTextVNode("提交")])])])}return()=>u.value?G():T()}});Fu.install=e=>{e.component(Fu.name,Fu)};function e2(e,t){var r;const n=(r=e.pickActions)==null?void 0:r[t];return n||e.pickActionDefault}const Tu=i.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(n,r)=>{var o;e2(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]))])])}});Tu.install=e=>{e.component(Tu.name,Tu)};const Nu=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])])}}});Nu.install=e=>{e.component(Nu.name,Nu)};const Iu=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])]))])])}});Iu.install=e=>{e.component(Iu.name,Iu)};const Ou=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??"客户端无法识别此消息类型,已按占位展示。"])])}});Ou.install=e=>{e.component(Ou.name,Ou)},or.install=e=>{e.component(or.name,or)};const t2={install(e){e.use(at).use(ir).use(ar).use(cr).use(fr).use(gr).use(br).use(yr).use(wr).use(mn).use(nn).use(_n).use(Jt).use(xr).use(vr).use(Ar).use(kr).use(Cr).use(wn).use(xn).use(Qt).use(An).use(_r).use(Er).use(Sr)}};R.FXAgentThinking=Eu,R.FXAppPreview=at,R.FXAttachmentFile=Su,R.FXAttachmentPreview=Cr,R.FXBubble=ir,R.FXBubbleAction=Po,R.FXCarousel=ar,R.FXCarouselItem=fu,R.FXChatPreview=cr,R.FXCoding=gr,R.FXConfirmDialog=fr,R.FXDynamicComponent=xn,R.FXErrorReminder=Du,R.FXFileOperation=br,R.FXGenerateProcess=yr,R.FXHistory=wr,R.FXHitlQuestion=Fu,R.FXInputRecommend=Tu,R.FXLinkCard=Nu,R.FXListView=Sr,R.FXMarkdown=mn,R.FXMarkdownPreview=nn,R.FXNav=_r,R.FXPopover=Qt,R.FXPopoverDirective=hs,R.FXPrompt=Cu,R.FXPrompts=_n,R.FXReferenceSources=Iu,R.FXSearchBox=Er,R.FXSearchBoxContainer=_u,R.FXSplitter=An,R.FXSplitterPane=sr,R.FXStartedTodo=Jt,R.FXSuggestion=xr,R.FXTodo=vr,R.FXTodoListItemView=du,R.FXTodoListView=ur,R.FXToolUse=vn,R.FXToolUseBatch=Ar,R.FXUnknownEnterprise=Ou,R.FXUserAuth=or,R.FXWelcome=kr,R.FXWidgetContainer=wn,R.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=ti,R.PREVIEW_BRIDGE_SOURCE=Jo,R.PREVIEW_BRIDGE_VERSION=ei,R.appPreviewMessageProps=be,R.attachmentPreviewProps=Ol,R.bubbleActionProps=bs,R.bubbleProps=Or,R.carouselItemProps=ws,R.carouselProps=ys,R.chatHistoryProps=El,R.chatPreviewProps=vs,R.clonePreviewPayloadForPostMessage=ol,R.codingMessageProps=Al,R.confirmDialogProps=dl,R.createPreviewIframeSdk=Um,R.default=t2,R.extractFileIdFromRuntimeDownloadUrl=wi,R.fileOperationMessageProps=Cl,R.generateProcessProps=_l,R.getCustomClass=ye,R.getCustomStyle=ke,R.getDynamicComponentRegistryDebugSnapshot=Oo,R.invokeAgentWorkbenchSdkApi=$m,R.isImageUrl=Ai,R.isPreviewBridgeAssistantMessage=al,R.listViewProps=ui,R.loadDynamicComponent=as,R.markdownMessageProps=Va,R.markdownPreviewProps=As,R.navProps=Vl,R.normalizeDynamicComponentRegisterClaim=Pe,R.overflowTooltipDirective=Ei,R.peekDynamicComponentRegisterBootstrapId=Mh,R.popoverProps=cs,R.postAssistantToPreviewIframe=sl,R.postDynamicComponentAssistantMessage=$h,R.previewLayoutBridge=Xm,R.promptProps=Fl,R.promptsProps=Sl,R.registerPreviewChromeSdk=Gm,R.renderIconNode=Vr,R.renderNode=Bn,R.resolveHrefForAttachmentDownload=ln,R.resolveRuntimeAttachmentDownloadUrl=Uu,R.searchBoxContainerProps=Rl,R.searchBoxProps=Pl,R.splitterProps=xs,R.startedTodoProps=ps,R.subscribeAssistantInPreviewIframe=ll,R.suggestionProps=Tl,R.todoListItemProps=gs,R.todoListViewProps=ms,R.todoProps=Nl,R.triggerAttachmentDownload=Lr,R.unloadDynamicComponent=ss,R.useSequentialStreaming=Pr,R.useStreamingOutput=ki,R.useTimer=Wu,R.useToolIcon=Gu,R.welcomeProps=Il,R.widgetContainerProps=ts,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
161
|
+
`).length:0;v=S?X+_:_}return B1+v*Cl}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 x=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(x,{timeout:100}):setTimeout(x,0)}function h(){if(a.value)return;const m=r.value,x=o.value;if(!m||!(x!=null&&x.layout))return;const y=m.clientWidth||m.offsetWidth,v=u.value;requestAnimationFrame(()=>{var g,b;a.value||!o.value||(b=(g=o.value)==null?void 0:g.layout)==null||b.call(g,{width:y,height:v})})}function p(){var m;a.value||!r.value||!((m=e.content)!=null&&m.code)||M1.init().then(x=>{var w;if(a.value||!r.value||!((w=e.content)!=null&&w.code))return;const{value:y,originalValue:v,language:g="typescript"}=e.content.code,b={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(v){const k=x.editor.createDiffEditor(r.value,{...b,renderSideBySide:!1,renderOverviewRuler:!1});k.setModel({original:x.editor.createModel(v,g),modified:x.editor.createModel(y,g)}),k.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),k.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),i.nextTick(()=>{var S;if(a.value)return;const D=(S=k.getContainerDomNode)==null?void 0:S.call(k);if(D){const _=D.querySelector('.diff-editor-cell.original, [class*="original"]');_&&(_.style.display="none")}}),o.value=k}else{const k=x.editor.create(r.value,{value:y,language:g,...b});o.value=k}u.value=Cn,i.nextTick(()=>h())})}return i.onMounted(()=>{z1(()=>{a.value||!r.value||p()})}),i.watch(t,m=>{m&&!a.value&&i.nextTick(()=>h())}),i.onBeforeUnmount(()=>{a.value=!0,c()}),i.watch(()=>{var m,x;return(x=(m=e.content)==null?void 0:m.code)==null?void 0:x.value},()=>{a.value||(n.value?u.value=l():u.value=Cn,h())}),()=>{const m=e.content;if(!m)return null;const{message:x,fileIcon:y,fileName:v,code:g}=m;return i.createVNode("div",{class:"f-chat-message-coding"},[i.createVNode("div",{class:"f-chat-coding-message"},[x]),i.createVNode("div",{class:"f-chat-coding-card"},[i.createVNode("div",{class:"f-chat-coding-header",onClick:s,role:"button",tabindex:0,onKeydown:b=>b.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:b=>{var w;b.target.style.display="none",(w=b.target.parentElement)==null||w.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"},[v]),i.createVNode("span",{class:"f-chat-coding-header-stats"},[i.createVNode("span",{class:"f-chat-coding-stat-add"},[i.createTextVNode("+"),g.addedLines]),i.createVNode("span",{class:"f-chat-coding-stat-del"},[i.createTextVNode("-"),g.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)])])])])}}});br.install=e=>{e.component(br.name,br)};const _l={content:{type:Object,required:!0}};function j1(e){return"file"in e&&"path"in e}const yr=i.defineComponent({name:"FileOperationMessage",props:_l,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,p)=>{var m,x,y,v;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 g;return((g=h.details)==null?void 0:g.length)&&a(p)}},(x=h.details)!=null&&x.length?{role:"button",tabIndex:0}:{},{onKeydown:g=>{var b;return((b=h.details)==null?void 0:b.length)&&g.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])]),((v=h.details)==null?void 0:v.length)&&s(p)&&i.createVNode("div",{class:"f-chat-file-op-details"},[h.details.map((g,b)=>j1(g)?i.createVNode("div",{key:b,class:"f-chat-file-op-detail-file"},[i.createVNode("span",{class:"f-chat-file-op-file-icon"},[i.createVNode("img",{src:g.icon,alt:"",onError:w=>{const k=w.target;k.style.display="none";const D=k.parentElement;D&&D.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"},[g.file]),i.createVNode("span",{class:"f-chat-file-op-file-path",title:g.path},[g.path])]):i.createVNode("div",{key:b,class:"f-chat-file-op-detail-text"},[i.createVNode("div",{class:"f-chat-file-op-detail-title"},[g.title]),i.createVNode("div",{class:"f-chat-file-op-detail-content"},[g.text])]))])])})])])}}});yr.install=e=>{e.component(yr.name,yr)};const El={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:()=>({})}},H1="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",wr=i.defineComponent({name:"FXGenerateProcess",props:El,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(()=>ke({},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?Pr(e.icon):i.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:H1},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()])])])}}});wr.install=e=>{e.component(wr.name,wr)};const Sl={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},$1=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],xr=i.defineComponent({name:"FXChatHistory",props:Sl,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&&$1.map(a=>u(a.label,o.value[a.key]))])])}});xr.install=e=>{e.component(xr.name,xr)};const Dl={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 Fl=(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))(Fl||{});const Tl={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:Fl.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},Cu=i.defineComponent({name:"FPrompt",props:Tl,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=ke({},(h=e.styles)==null?void 0:h.item);return ke(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},[Pr(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,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: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:Dl,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=ke(f,(c=e.styles)==null?void 0:c.items),f=ke(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(Cu,{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(Cu.name,Cu)};const Nl={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助理"}},vr=i.defineComponent({name:"FXSuggestion",props:Nl,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 v;return(((v=e.items)==null?void 0:v.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="",x();return}const g=window.getSelection();if(!g||g.rangeCount===0)return;const b=g.getRangeAt(0),w=b.cloneRange();w.selectNodeContents(n.value),w.setEnd(b.endContainer,b.endOffset);const k=w.toString(),D=k.lastIndexOf(e.promptChar);if(s.value=n.value.textContent||"",D!==-1&&k.substring(D+1).trim()===""&&(n.value.textContent=k.replace(/@$/,`@${e.promptAgentName} `),s.value=n.value.textContent,r.value=!0,b.selectNodeContents(n.value),b.collapse(!1),g.removeAllRanges(),g.addRange(b)),r.value===!1){o.value=!1,a.value=-1;return}if((n.value.textContent||"").lastIndexOf(`@${e.promptAgentName} `)!==-1){const j=document.createRange();j.setStart(n.value,0),j.setEnd(b.endContainer,b.endOffset);const{top:B,right:H}=j.getBoundingClientRect(),I=c();u.value={top:B-I-5,left:H+5,height:I},a.value===-1&&(a.value=0),o.value=!0}else o.value=!1,a.value=-1},c=()=>{const g=e.items.length*38-6;return Math.min(g+28+20,e.height)},h=v=>{var k;if(!n.value)return;const g=window.getSelection();if(!g||g.rangeCount===0)return;const b=((k=n.value.textContent)==null?void 0:k.replace(/\s*$/,""))||"";n.value.textContent=`${b} ${v.label}`;const w=g.getRangeAt(0);w.selectNodeContents(n.value),w.collapse(!1),g.removeAllRanges(),g.addRange(w),x()},p=async v=>{if(!o.value||!e.items||e.items.length===0)return;switch(["ArrowUp","ArrowDown","Enter","Escape"].includes(v.key)&&v.preventDefault(),v.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":x();break}await i.nextTick();const g=a.value>0?".f-chat-suggestion-panel-item--current":".f-chat-suggestion-panel-header",b=document.querySelector(g);b==null||b.scrollIntoView({block:"nearest",behavior:"smooth"})},m=v=>{n.value&&!n.value.contains(v.target)&&x()},x=()=>{r.value=!1,o.value=!1,a.value=-1};i.onMounted(()=>{document.addEventListener("click",m)}),i.onUnmounted(()=>{document.removeEventListener("click",m)});const y=v=>{const g=v.iconUrl||"",b=v.icon||"fx-icon fx-icon-sender_task";return i.createVNode(i.Fragment,null,[g?i.createVNode("img",{alt:"suggestion item icon",src:g},null):i.createVNode("i",{class:b},null),i.createVNode("span",{class:"f-chat-suggestion-panel-item-label"},[v.label])])};return()=>{var v;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:`${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"},[(v=e.items)==null?void 0:v.map((g,b)=>i.createVNode("div",{key:b,class:["f-chat-suggestion-panel-item",{"f-chat-suggestion-panel-item--current":b===a.value}],onClick:()=>h(g),onMouseenter:()=>a.value===b},[y(g)]))])])])}}});vr.install=e=>{e.component(vr.name,vr)};const Il={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},Ar=i.defineComponent({name:"Todo",props:Il,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(or,{items:e.items},null)])])])}});Ar.install=e=>{e.component(Ar.name,Ar),e.component(or.name,or),e.component(du.name,du),e.directive("overflow-tooltip",Ei)};function En(e){return e.toolResultApplied===!0||String(e.result??"").trim().length>0}const kr=i.defineComponent({name:"FXToolUseBatch",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>{const c=e.content.toolCalls;return!c||c.length===0?!0:c.every(En)}),{getToolIconClass:n}=Gu(),r=i.computed(()=>t.value?`共调用 ${e.content.totalCount??e.content.toolCalls.length} 个工具`:"正在调用工具"),o=i.ref(!t.value),u=()=>{o.value=!o.value};i.watch(t,c=>{c&&(o.value=!1)});const a=c=>{En(c)&&(c._expanded=!c._expanded)},s=c=>{const h=En(c),p=c.success===!1;return{"f-chat-tool-use-batch-item":!0,"is-done":h&&!p,"is-error":p,"is-run":!h&&!p}},l=c=>{const h=En(c);return c.success===!1?"执行失败":h?"执行成功":"调用中"},d=c=>{const h=En(c);return c.success===!1?"Error":h?"Done":"Working"},f=c=>c.toolDescription?c.toolDescription:c.command?`{ command: ${c.command} }`:c.toolName??"tool";return()=>i.createVNode("div",{class:"f-chat-tool-use-batch"},[i.createVNode("div",{class:"f-chat-tool-use-batch-header",onClick:u},[i.createVNode("span",{class:"f-chat-tool-use-batch-title"},[r.value]),i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:o.value?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),o.value&&i.createVNode("div",{class:"f-chat-tool-use-batch-body"},[e.content.toolCalls.map(c=>{const h=En(c),p=c.success===!1,m=h||p,x=!!c._expanded;return i.createVNode("div",{class:s(c)},[i.createVNode("div",{class:"f-chat-tool-use-batch-item-header",onClick:()=>a(c)},[i.createVNode("i",{class:"fx-icon fx-icon-"+n(c.toolName)+" tool-icon"},null),i.createVNode("span",{class:"f-chat-tool-use-batch-item-text"},[f(c)]),i.createVNode("div",{class:"f-chat-tool-use-batch-item-status"},[i.createVNode(ur,{status:d(c),variant:"tool-use"},null),i.createVNode("span",null,[l(c)])]),m&&i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:x?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),x&&m&&i.createVNode("div",{class:"f-chat-tool-use-batch-item-result"},[c.errorMessage||c.result])])})])])}});kr.install=e=>{e.component(kr.name,kr)};const Ol={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:()=>({})}},Cr=i.defineComponent({name:"FXWelcome",props:Ol,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(()=>ke({},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},[Pr(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()])}});Cr.install=e=>{e.component(Cr.name,Cr)};const Ll={content:{type:Object,required:!0},onOpen:{type:Function}},U1="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",W1="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",G1="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",X1="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",_r=i.defineComponent({name:"FChatAttachmentPreview",props:Ll,emits:[],setup(e){function t(s){switch(s.toLowerCase()){case"doc":case"docx":return U1;case"xlsx":case"xls":return W1;case"ppt":case"mobi":return G1;case"txt":return Vl;case"png":case"jpg":case"jpeg":case"gif":return X1;default:return Vl}}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=ln(l);d&&await Vr(d,l.name)}function a(s,l){const d=r(s.size||0),f=n(s),c=ln(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))])])}}});_r.install=e=>{e.component(_r.name,_r)},wn.install=e=>{e.component(wn.name,wn)},xn.install=e=>{e.component(xn.name,xn)};const Pl={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:""}},Er=i.defineComponent({name:"FXNav",props:Pl,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(()=>ke({},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)])]))])}}});Er.install=e=>{e.component(Er.name,Er)};const Rl={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}},Ml={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}},_u=i.defineComponent({name:"FXSearchBoxContainer",props:Ml,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("无匹配结果")])])])}}),Sr=i.defineComponent({name:"FXSearchBox",props:Rl,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,w=>{var k;(k=o.value)==null||k.search(w),t.emit("update:modelValue",w)}),i.watch(()=>e.modelValue,w=>{u.value=w});function d(w){u.value=w,m()}function f(w){const k=u.value;t.emit("change",w,{oldValue:k,newValue:w})}function c(w){t.emit("selectedValue",w)}function h(){t.emit("clickButton",{})}async function p(){var w;a.value=!0,await i.nextTick(),(w=r.value)==null||w.show(n.value)}function m(){var w;(w=r.value)==null||w.hide(),a.value=!1}function x(){a.value?m():p()}function y(w){const k=w.target.value;u.value=k,f(k),e.showDropdown&&k&&p()}function v(){e.showDropdown&&u.value&&p()}function g(){u.value="",t.emit("update:modelValue",""),m()}t.expose({togglePopup:x,hidePopup:m,showPopup:p});const b=i.computed(()=>{const w=ye({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof w=="string"?[w]:Array.isArray(w)?w:[]]});return()=>i.createVNode("div",{class:b.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:v},null),u.value&&!e.disable&&i.createVNode("span",{class:"f-search-box-clear",onClick:g},[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(Qt,{ref:r,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost},{default:()=>[i.createVNode(_u,{ref:o,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:d,onSearchedValue:w=>c(w),loading:e.loading,maxHeight:e.maxHeight},t.slots)]})])}});Sr.install=e=>{e.component(Sr.name,Sr),e.component(_u.name,_u)};const ui={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 q1(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((p,m)=>({type:0,data:p,originalIndex:m}))});function u(c,h){const p=[],m=h.groupFields[0],x=new Map;c.forEach(v=>{const g=String(v[m]??"");x.has(g)||x.set(g,[]),x.get(g).push(v)});let y=0;return x.forEach((v,g)=>{p.push({type:1,data:{[m]:g},groupField:m,groupValue:g,originalIndex:y++}),v.forEach(b=>{p.push({type:0,data:b,groupField:m,groupValue:g,originalIndex:y++})})}),p}function a(c){t.value=[...c],n.value=[],r.value=""}function s(c){r.value=c;const h=t.value.find(p=>p[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 Z1=i.defineComponent({name:"FXListViewItem",props:{...ui,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]])])}}),Y1=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])])])}}),Dr=i.defineComponent({name:"FXListView",props:ui,emits:["clickItem"],setup(e,t){const{visualData:n,activeItemId:r,updateDataSource:o,activeRowById:u,clearSelection:a,toggleSelection:s,isSelected:l}=q1({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(Y1,{key:`group_${c.groupValue}_${h}`,groupData:c.data,groupField:c.groupField,groupValue:c.groupValue,index:h},{default:t.slots.group}):i.createVNode(Z1,{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}))])])])}});Dr.install=e=>{e.component(Dr.name,Dr)};const Eu=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])}}});Eu.install=e=>{e.component(Eu.name,Eu)};function K1(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Q1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function J1(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const Su=i.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>Q1(e.content.media)),n=i.computed(()=>ln(J1(e.content.media)));async function r(o){o.preventDefault(),o.stopPropagation();const u=n.value;u&&await Vr(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"},[K1(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])}}});Su.install=e=>{e.component(Su.name,Su)};const e2={0:"高",1:"中",2:"低"},Du=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"},[e2[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])}}});Du.install=e=>{e.component(Du.name,Du)};const It="__hitl_other__";function oi(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 Fu=i.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!0},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(C){const F={},P={};for(const M of C){const z=Sn(M.ui_type);if(z==="confirm")F[M.id]=void 0;else if(z==="text"||z==="select")F[M.id]=M.default_value??"";else if(z==="multi_select")F[M.id]=M.default_value?JSON.parse(M.default_value):[];else if(z==="form"){const N={};if(Array.isArray(M.fields))for(const V of M.fields)N[V.name]=V.default_value??"";F[M.id]=N}else F[M.id]=M.default_value??"";P[M.id]={active:!1,text:""}}r.value=F,o.value=P,n.value=0}i.watch(()=>e.content.questions,C=>{Array.isArray(C)&&C.length&&a(C)},{immediate:!0}),i.watch(()=>e.content.answers,C=>{if(!Array.isArray(C)||C.length===0)return;const F={...r.value},P={...o.value};for(const M of C){F[M.id]=M.answer;const z=e.content.questions.find(N=>N.id===M.id);z&&Sn(z.ui_type)==="select"&&typeof M.answer=="string"&&!(z.options??[]).some(L=>L.label===M.answer)&&M.answer!==""&&(P[M.id]={active:!0,text:M.answer},F[M.id]=It)}r.value=F,o.value=P,t.value=!0},{immediate:!0});const s=i.computed(()=>e.content.questions.length),l=i.computed(()=>{const C=e.content.questions;if(C.length===0)return null;const F=Math.max(0,Math.min(n.value,C.length-1));return C[F]}),d=i.computed(()=>n.value<=0),f=i.computed(()=>n.value>=s.value-1),c=i.computed(()=>{const C=l.value;return C?m(C):!0});function h(){e.required&&!c.value||f.value||(n.value+=1)}function p(){d.value||(n.value-=1)}function m(C){var M,z;const F=Sn(C.ui_type),P=r.value[C.id];if(F==="text"&&(typeof P!="string"||P.trim()==="")||F==="select"&&(typeof P!="string"||P.trim()===""||P===It&&(((z=(M=o.value[C.id])==null?void 0:M.text)==null?void 0:z.trim())??"")==="")||F==="confirm"&&typeof P!="boolean"||F==="multi_select"&&(!Array.isArray(P)||P.length===0))return!1;if(F==="form"){const N=C.fields??[],V=P;for(const L of N)if(L.required){const O=V[L.name];if(typeof O!="string"||O.trim()==="")return!1}}return!((F==="date"||F==="number")&&(typeof P!="string"||P.trim()===""))}const x=i.computed(()=>u.value?!1:e.content.questions.every(C=>m(C)));function y(C,F){r.value={...r.value,[C]:F}}function v(C,F,P){const M=r.value[C]??{};y(C,{...M,[F]:P})}function g(C,F){var P;F===It?(o.value={...o.value,[C.id]:{...o.value[C.id],active:!0,text:((P=o.value[C.id])==null?void 0:P.text)??""}},y(C.id,It)):(o.value={...o.value,[C.id]:{active:!1,text:""}},y(C.id,F))}function b(C,F){const P=r.value[C.id]??[];P.includes(F)?y(C.id,P.filter(M=>M!==F)):y(C.id,[...P,F])}function w(){var F,P,M;if(!x.value)return;const C=[];for(const z of e.content.questions){const N=Sn(z.ui_type);let V=r.value[z.id];N==="select"&&V===It&&(V=((P=(F=o.value[z.id])==null?void 0:F.text)==null?void 0:P.trim())??""),N==="number"&&(V=Number(V)),C.push({id:z.id,answer:V})}t.value=!0,(M=e.onSubmitAnswers)==null||M.call(e,C)}function k(C,F,P){return i.createVNode("div",{class:"f-hitl-date-wrap"},[i.createVNode("input",{class:"f-hitl-input",type:"date",value:C,disabled:F,onInput:M=>P(M.target.value)},null)])}function D(C,F,P,M,z){const N=O=>{let U=Number(C)||0;U+=O,M!==void 0&&(U=Math.max(M,U)),z!==void 0&&(U=Math.min(z,U)),P(String(U))},V=z!==void 0&&Number(C||0)>=z,L=M!==void 0&&Number(C||0)<=M;return i.createVNode("div",{class:"f-hitl-num-wrap"},[i.createVNode("input",{class:"f-hitl-input f-hitl-num-input",type:"number",value:C,min:M,max:z,disabled:F,onInput:O=>P(O.target.value)},null),i.createVNode("div",{class:"f-hitl-num-btns"},[i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:F||V,onClick:()=>N(1)},[i.createVNode("span",{class:"fx-icon fx-icon-foldup"},null)]),i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:F||L,onClick:()=>N(-1)},[i.createVNode("span",{class:"fx-icon fx-icon-expanddown"},null)])])])}function S(C,F,P,M){return i.createVNode("div",{key:C.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":P}],onClick:M},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[F+1]),i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[C.label]),C.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[oi(C.description)]):null]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[P?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}function _(C,F){return i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),F])}function X(C,F,P){const M=r.value[C.id]??"",z=r.value[C.id]??[],N=o.value[C.id]??{active:!1,text:""},V=P==="single",L=V&&M===It||N.active,O=C.allow_other&&L,U=re=>V?M===re.label&&!N.active:z.includes(re.label),J=re=>()=>{u.value||(V?g(C,re.label):b(C,re.label))},Y=()=>{if(!u.value)if(V)g(C,It);else{const re=N.text;N.active?(y(C.id,z.filter(ae=>ae!==re)),o.value={...o.value,[C.id]:{active:!1,text:""}}):(o.value={...o.value,[C.id]:{active:!0,text:N.text}},N.text&&!z.includes(N.text)&&y(C.id,[...z,N.text]))}},K=re=>{const ae=re.target.value;o.value={...o.value,[C.id]:{active:!0,text:ae}},V?y(C.id,It):y(C.id,[...z.filter(ve=>ve!==N.text),ae])};return i.createVNode("div",{key:C.id},[i.createVNode("div",{class:"f-hitl-option-list"},[F.map((re,ae)=>S(re,ae,U(re),J(re))),C.allow_other?i.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":L}],onClick:Y},[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"},[L?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),O?i.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:N.text,placeholder:"请输入自定义内容",disabled:u.value,onInput:K},null):null])}function j(C){const F=r.value[C.id]??{},P=C.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-form-group"},[P.map(M=>{const z=F[M.name]??"";return M.type==="select"?_(M,i.createVNode("div",{class:"f-hitl-select-group"},[(M.options??[]).map(N=>{const V=typeof N=="string"?N:N.label??"";return i.createVNode("button",{key:V,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":z===V}],disabled:u.value,onClick:()=>v(C.id,M.name,V)},[V])})])):M.type==="number"?_(M,D(z,u.value,N=>v(C.id,M.name,N),M.min,M.max)):M.type==="date"?_(M,k(z,u.value,N=>v(C.id,M.name,N))):_(M,i.createVNode("input",{class:"f-hitl-input",type:"text",value:z,placeholder:M.default_value??"请输入",disabled:u.value,onInput:N=>v(C.id,M.name,N.target.value)},null))})])])}function B(C){const F=Sn(C.ui_type);if(F==="text"){const P=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("input",{class:"f-hitl-input",type:"text",value:P,placeholder:C.placeholder??"请输入",disabled:u.value,onInput:M=>y(C.id,M.target.value)},null)])}if(F==="multi_select"){const P=Array.isArray(C.options)?C.options:[];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[X(C,P,"multi")])}if(F==="form")return j(C);if(F==="select"){let P=Array.isArray(C.options)?C.options:[];return P.length===0&&(P=[{label:"暂无"}]),i.createVNode("div",{class:"f-hitl-field",key:C.id},[X(C,P,"single")])}if(F==="confirm"){const P=r.value[C.id];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":P===!0}],disabled:u.value,onClick:()=>y(C.id,!0)},[i.createTextVNode("是")]),i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":P===!1}],disabled:u.value,onClick:()=>y(C.id,!1)},[i.createTextVNode("否")])])])}if(F==="date"){const P=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[k(P,u.value,M=>y(C.id,M))])}if(F==="number"){const P=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[D(P,u.value,M=>y(C.id,M),C.min,C.max)])}return i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:C.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持 ui_type「"),String(C.ui_type),i.createTextVNode("」,请升级前端。")])])}function H(C){const F=Sn(C.ui_type),P=(z,N,V)=>i.createVNode("input",{class:"f-hitl-input",type:z,value:N,readonly:!0,min:V==null?void 0:V.min,max:V==null?void 0:V.max},null);if(F==="text"){const z=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[P("text",z)])}if(F==="multi_select"){const z=r.value[C.id]??[],N=Array.isArray(C.options)?C.options:[],V=new Set(N.map(O=>O.label)),L=z.filter(O=>!V.has(O));return i.createVNode("div",{key:C.id},[i.createVNode("div",{class:"f-hitl-option-list"},[N.filter(O=>z.includes(O.label)).map(O=>i.createVNode("div",{class:"f-hitl-opt-row",key:O.label},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[O.label]),O.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[oi(O.description)]):null])])),L.map(O=>i.createVNode("div",{class:"f-hitl-opt-row",key:O},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[O])])]))])])}if(F==="select"){const z=r.value[C.id]??"",N=o.value[C.id]??{active:!1,text:""},V=Array.isArray(C.options)?C.options:[],L=z===It||N.active;return i.createVNode("div",{key:C.id},[i.createVNode("div",{class:"f-hitl-option-list"},[L?i.createVNode("div",{class:"f-hitl-opt-row"},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[N.text||"其他"])])]):V.filter(O=>O.label===z).map(O=>i.createVNode("div",{class:"f-hitl-opt-row",key:O.label},[i.createVNode("div",{class:"f-hitl-opt-row__label"},[i.createVNode("span",null,[O.label]),O.description?i.createVNode("span",{class:"f-hitl-opt-row__desc"},[oi(O.description)]):null])]))])])}if(F==="confirm"){const z=r.value[C.id];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn","f-hitl-cbtn--readonly"]},[z===!0?"是":"否"])])])}if(F==="form"){const z=r.value[C.id]??{},N=C.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("div",{class:"f-hitl-form-group"},[N.map(V=>{const L=z[V.name]??"";let O;return V.type==="number"?O=P("number",L,{min:V.min,max:V.max}):V.type==="date"?O=P("date",L):O=P("text",L),_(V,O)})])])}if(F==="date"){const z=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[P("date",z)])}if(F==="number"){const z=r.value[C.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:C.id},[P("number",z)])}const M=r.value[C.id];return i.createVNode("div",{class:"f-hitl-field",key:C.id},[i.createVNode("span",{class:"f-hitl-submitted-value"},[String(M??"")])])}function I(C){return i.createVNode("div",{class:"f-hitl-card__title-wrap"},[i.createVNode("span",{class:"f-hitl-card__title"},[C.question]),i.createVNode("span",{class:"f-hitl-card__subtitle"},[C.header])])}function W(){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:p},[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:h},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-right"},null)])])}function G(){const C=e.pinnedWidth?{width:`calc(${e.pinnedWidth} * 0.8)`,minWidth:"343px",maxWidth:"800px"}:void 0;return i.createVNode("div",{class:"f-hitl-card",style:C},[i.createVNode("div",{class:"f-hitl-submitted-flat"},[e.content.questions.map(F=>i.createVNode("div",{class:"f-hitl-submitted-item",key:F.id},[i.createVNode("div",{class:"f-hitl-card__header"},[I(F)]),i.createVNode("div",{class:"f-hitl-card__body"},[H(F)])]))])])}function T(){const C=l.value;if(!C)return null;const F=e.pinned?"f-hitl-card--pinned":"",P=e.pinned&&e.pinnedWidth?{width:e.pinnedWidth}:void 0;return i.createVNode("div",{class:["f-hitl-card",F],style:P},[i.createVNode("div",{class:"f-hitl-card__header"},[I(C),W()]),i.createVNode("div",{class:"f-hitl-card__body"},[B(C)]),!u.value&&i.createVNode("div",{class:"f-hitl-card__footer"},[s.value>1&&!f.value&&i.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:e.required&&!c.value,onClick:h},[i.createTextVNode("下一条")]),f.value&&i.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:!x.value,onClick:w},[i.createTextVNode("提交")])])])}return()=>u.value?G():T()}});Fu.install=e=>{e.component(Fu.name,Fu)};function t2(e,t){var r;const n=(r=e.pickActions)==null?void 0:r[t];return n||e.pickActionDefault}const Tu=i.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(n,r)=>{var o;t2(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]))])])}});Tu.install=e=>{e.component(Tu.name,Tu)};const Nu=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])])}}});Nu.install=e=>{e.component(Nu.name,Nu)};const Iu=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])]))])])}});Iu.install=e=>{e.component(Iu.name,Iu)};const Ou=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??"客户端无法识别此消息类型,已按占位展示。"])])}});Ou.install=e=>{e.component(Ou.name,Ou)},ir.install=e=>{e.component(ir.name,ir)};const n2={install(e){e.use(at).use(ar).use(sr).use(dr).use(hr).use(br).use(yr).use(wr).use(xr).use(pn).use(nn).use(_n).use(Jt).use(vr).use(Ar).use(kr).use(Cr).use(_r).use(wn).use(xn).use(Qt).use(An).use(Er).use(Sr).use(Dr)}};R.FXAgentThinking=Eu,R.FXAppPreview=at,R.FXAttachmentFile=Su,R.FXAttachmentPreview=_r,R.FXBubble=ar,R.FXBubbleAction=Po,R.FXCarousel=sr,R.FXCarouselItem=fu,R.FXChatPreview=dr,R.FXCoding=br,R.FXConfirmDialog=hr,R.FXDynamicComponent=xn,R.FXErrorReminder=Du,R.FXFileOperation=yr,R.FXGenerateProcess=wr,R.FXHistory=xr,R.FXHitlQuestion=Fu,R.FXInputRecommend=Tu,R.FXLinkCard=Nu,R.FXListView=Dr,R.FXMarkdown=pn,R.FXMarkdownPreview=nn,R.FXNav=Er,R.FXPopover=Qt,R.FXPopoverDirective=ms,R.FXPrompt=Cu,R.FXPrompts=_n,R.FXReferenceSources=Iu,R.FXSearchBox=Sr,R.FXSearchBoxContainer=_u,R.FXSplitter=An,R.FXSplitterPane=lr,R.FXStartedTodo=Jt,R.FXSuggestion=vr,R.FXTodo=Ar,R.FXTodoListItemView=du,R.FXTodoListView=or,R.FXToolUse=vn,R.FXToolUseBatch=kr,R.FXUnknownEnterprise=Ou,R.FXUserAuth=ir,R.FXWelcome=Cr,R.FXWidgetContainer=wn,R.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=ti,R.PREVIEW_BRIDGE_SOURCE=Jo,R.PREVIEW_BRIDGE_VERSION=ei,R.appPreviewMessageProps=be,R.attachmentPreviewProps=Ll,R.bubbleActionProps=ys,R.bubbleProps=Lr,R.carouselItemProps=xs,R.carouselProps=ws,R.chatHistoryProps=Sl,R.chatPreviewProps=As,R.clonePreviewPayloadForPostMessage=il,R.codingMessageProps=kl,R.confirmDialogProps=fl,R.createPreviewIframeSdk=Wp,R.default=n2,R.extractFileIdFromRuntimeDownloadUrl=wi,R.fileOperationMessageProps=_l,R.generateProcessProps=El,R.getCustomClass=ye,R.getCustomStyle=ke,R.getDynamicComponentRegistryDebugSnapshot=Oo,R.invokeAgentWorkbenchSdkApi=Up,R.isImageUrl=Ai,R.isPreviewBridgeAssistantMessage=sl,R.listViewProps=ui,R.loadDynamicComponent=ss,R.markdownMessageProps=Pa,R.markdownPreviewProps=ks,R.navProps=Pl,R.normalizeDynamicComponentRegisterClaim=Pe,R.overflowTooltipDirective=Ei,R.peekDynamicComponentRegisterBootstrapId=Bh,R.popoverProps=ds,R.postAssistantToPreviewIframe=ll,R.postDynamicComponentAssistantMessage=Uh,R.previewLayoutBridge=qp,R.promptProps=Tl,R.promptsProps=Dl,R.registerPreviewChromeSdk=Xp,R.renderIconNode=Pr,R.renderNode=Bn,R.resolveHrefForAttachmentDownload=ln,R.resolveRuntimeAttachmentDownloadUrl=Uu,R.searchBoxContainerProps=Ml,R.searchBoxProps=Rl,R.splitterProps=vs,R.startedTodoProps=ps,R.subscribeAssistantInPreviewIframe=cl,R.suggestionProps=Nl,R.todoListItemProps=bs,R.todoListViewProps=gs,R.todoProps=Il,R.triggerAttachmentDownload=Vr,R.unloadDynamicComponent=ls,R.useSequentialStreaming=Rr,R.useStreamingOutput=ki,R.useTimer=Wu,R.useToolIcon=Gu,R.welcomeProps=Ol,R.widgetContainerProps=ns,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|