bi-components-library 1.2.65 → 1.2.67
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/dist/bi-components-library.css +1 -1
- package/dist/index.es.js +185 -185
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -42,7 +42,7 @@ ${(e||"").replace(/\r\n/g,`
|
|
|
42
42
|
`);for(let U=0;U<j.length;U++)k.appendChild(document.createTextNode(j[U])),V&&U<j.length-1&&k.appendChild(document.createElement("br"));H.insertNode(k),$.removeAllRanges();const P=document.createRange();P.selectNodeContents(D),P.collapse(!1),$.addRange(P)}r();return}}}}let S=!1,L="";const I=window.getSelection();if(I&&I.rangeCount>0){const M=I.anchorNode;if(M){let D=null;if(M.nodeType===Node.ELEMENT_NODE?D=M.closest('[data-type="variable"]'):M.nodeType===Node.TEXT_NODE&&M.parentElement&&(D=M.parentElement.closest('[data-type="variable"]')),D){const _=D.getAttribute("data-node-type")||"",T=D.dataset.key;if(_==="markdown"&&T&&/20\d{2}-\d{2}-\d{2}/.test(O))S=!0,L=T,c.current[T]=O,d(F=>({...F,[T]:{...F[T],status:"loading",error:void 0}}));else if(_==="report-url"&&T){document.execCommand("insertText",!1,O),r();return}else if(_==="markdown-name"&&T){document.execCommand("insertText",!1,O),r(),setTimeout(()=>{const F=D.innerText.replace(/[\u200B\n]/g,"").trim();s.current(T,F)},0);return}}}}if(S&&L){setTimeout(()=>{i.current(L,O)},0);return}document.execCommand("insertText",!1,O),r(),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(O)&&o.current.tableData?.status==="success"&&(d(D=>({...D,tableData:{status:"loading",modules:[],lastParsedText:O,error:void 0}})),setTimeout(()=>{c.current.tableData=O,i.current("tableData",O)},0))},0)},[t,e,n,r,i,o,c,a,E,u,h,f,y,d,l]);async function jr(e){const t=e.split("/").pop()?.split("?")[0]||"file",a=decodeURIComponent(t),l=async n=>{const r=await n.blob();return new File([r],a,{type:r.type||"application/octet-stream"})};try{const n=`/api/image-proxy?url=${encodeURIComponent(e)}`,r=await fetch(n);if(r.ok)return l(r)}catch{}return null}const Rc=({config:e,files:t,footerFiles:a,onFooterFilesClear:l,onSend:n,isProcessing:r,disabled:i,loading:u,isFormValid:s,editorRef:o,markdownAnalyzeState:c,markdownNameAnalyzeState:d,videoState:h})=>w.useCallback(()=>{if(r||i||u||!s||!o.current)return;if(e.length===0){const m=o.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!m&&a.length===0)return;if(a.length>0){const b=new FormData;b.append("fullPrompt",m),a.forEach(x=>{b.append("fileUrls",x)}),n(b,m),l()}else n(m,m);if(o.current){o.current.textContent="";const b=new Event("input",{bubbles:!0});o.current.dispatchEvent(b)}return}const f=o.current;let y="";const E={},v=m=>{if(!(m.nodeType===Node.ELEMENT_NODE&&m.style.display==="none")){if(m.nodeType===Node.TEXT_NODE)y+=(m.textContent||"").replace(/\u200B/g,"");else if(m.nodeType===Node.ELEMENT_NODE){const b=m,x=b.dataset.type,C=b.dataset.key;if(x==="variable"&&C){let A="";const O=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:L=>{const I=b.querySelector(".variable-info-icon");return I&&I.contains(L)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;O.nextNode();)A+=O.currentNode.textContent||"";const S=b.getAttribute("data-report-url")||A.replace(/[\u200B\n]/g,"").trim();if(S){const L=b.dataset.multiKey;if(L){(!E[L]||!Array.isArray(E[L]))&&(E[L]=[]);const I=E[L];I.push(S),I.length>1&&(y+=" "),y+=S}else E[C]=S,y+=S;if(b.dataset.nodeType==="report-url")if(E.url===void 0)E.url=S;else{const I=E.url;Array.isArray(I)?I.push(S):E.url=[String(I),S]}if(b.dataset.nodeType==="markdown-name"){const I=`${C}__sourceText`;E[I]===void 0&&(E[I]=S)}if(b.dataset.nodeType==="markdown"){const I=b.dataset.sourceTextKey||`${C}__sourceText`;if(E[I]===void 0)E[I]=S;else{const D=E[I];Array.isArray(D)?D.push(S):E[I]=[String(D),S]}const M=`${C}__markdown`;E[M]===void 0&&(E[M]=[Gr(S)])}}}else if((x==="select"||x==="searchable-select"||x==="cascader")&&C){const A=(b.getAttribute("data-value")||"").trim();A&&(E[C]=A,y+=A)}else if(x==="textarea"&&C){const O=(b.value||"").replace(/\u200B/g,"").trim();O&&(E[C]=O,y+=O)}else if(x==="richtext"&&C){const A=b,O=A.dataset.nodeType,N=(A.textContent||"").replace(/\u200B/g,"").trim();if(N)if(O==="report-module"||O==="markdown-module"){(!E[C]||!Array.isArray(E[C]))&&(E[C]=[]);const S=E[C];S.push(N),S.length>1&&(y+=" "),y+=N}else E[C]=N,y+=N}else if(x==="datepicker"&&C){const O=(b.getAttribute("data-value")||"").trim();if(O)if(O.includes(",")){const N=O.split(",");N.length===2?(E[C]=N,y+=`[${N[0]}, ${N[1]}]`):(E[C]=O,y+=O)}else E[C]=O,y+=O}else if(x==="number-input"&&C){const O=(b.value||"").trim();O&&(E[C]=O,y+=O)}else if(x==="upload"&&C){const A=b.dataset.batchKey;if(A){const O=e.find(N=>N.type==="upload"&&N.key===A);if(O&&typeof O.maxCount=="number"&&typeof O.minCount=="number"){const N=[];for(let S=0;S<O.maxCount;S++){const L=`${A}-${S}`,I=t[L];I&&N.push(I)}E[A]||(E[A]=N.length>0?N:null,N.length>0&&(y+=` [附带${N.length}个文件: ${N.map(S=>typeof S=="string"?S.split("/").pop()||"file":S.name).join(", ")}] `))}else if(E[C]=t[C]??null,t[C]){const N=t[C];y+=` [附带文件: ${typeof N=="string"?N.split("/").pop()||"file":N.name}] `}}else if(E[C]=t[C]??null,t[C]){const O=t[C];y+=` [附带文件: ${typeof O=="string"?O.split("/").pop()||"file":O.name}] `}}else if((x==="video-url"||x==="video-upload")&&C){const A=h?.[C];if(A?.status==="success"&&A.videoUrl){E[C]=A.videoUrl,A.file&&(E[`${C}__file`]=A.file);const O=A.fileName||"视频";y+=` [附带视频: ${O}] `}}else{if(b.classList.contains("tag-close-btn")||b.classList.contains("file-remove-btn")||b.classList.contains("video-remove-btn"))return;b.getAttribute("contenteditable")==="false"&&!x&&b.classList.contains("tag-node")?y+=b.innerText:b.childNodes.forEach(v)}}}};if(f.childNodes.forEach(v),y=y.trim(),!y)return;Object.keys(c).forEach(m=>{const b=c[m];if(!b||!b.modules||b.modules.length===0)return;const x=b.modules.map(C=>(C?.markdown||"").trim()).filter(C=>C.length>0);x.length!==0&&(E[`${m}__markdown`]=x)}),Object.keys(d).forEach(m=>{const b=d[m];if(!b||!b.modules||b.modules.length===0)return;const x=b.modules.map(C=>(C?.markdown||"").trim()).filter(C=>C.length>0);x.length!==0&&(E[`${m}__markdown`]=x)}),(async()=>{for(const b of Object.keys(E)){const x=E[b];if(typeof x=="string"&&x.startsWith("http")){if(e.find(A=>A.type==="upload"&&A.key===b)){const A=await jr(x);A&&(E[b]=A)}}else if(Array.isArray(x)&&e.find(A=>A.type==="upload"&&A.key===b)){for(let A=0;A<x.length;A++)if(typeof x[A]=="string"&&x[A].startsWith("http")){const O=await jr(x[A]);O&&(x[A]=O)}}}const m=new FormData;m.append("fullPrompt",y),Object.keys(E).forEach(b=>{const x=E[b];if(x!=null)if(x instanceof File)m.append(b,x);else if(Array.isArray(x)){const C=e.some(S=>Ue(S.type)&&S.key===b),A=e.some(S=>S.type==="report-url"&&S.key===b),O=b.endsWith("__markdown");C||A||O||b==="url"?x.forEach(S=>{S!=null&&S!==""&&m.append(b,String(S))}):x.forEach((S,L)=>{S!=null&&(S instanceof File?m.append(`${b}[${L}]`,S):typeof S=="string"?m.append(`${b}[${L}]`,S):m.append(`${b}[${L}]`,String(S)))})}else typeof x=="string"?m.append(b,x):m.append(b,String(x))}),a.length>0&&a.forEach(b=>{m.append("fileUrls",b)}),n(m,y),a.length>0&&l()})()},[e,t,a,l,n,r,i,u,s,o,c,d,h]);function Kr(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Wl(e={},t={}){const a=["__proto__","constructor","prototype"];Object.keys(t).filter(l=>a.indexOf(l)<0).forEach(l=>{typeof e[l]>"u"?e[l]=t[l]:Kr(t[l])&&Kr(e[l])&&Object.keys(t[l]).length>0&&Wl(e[l],t[l])})}const Xr={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Dt(){const e=typeof document<"u"?document:{};return Wl(e,Xr),e}const Hc={document:Xr,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Ge(){const e=typeof window<"u"?window:{};return Wl(e,Hc),e}function $c(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function Uc(e){const t=e;Object.keys(t).forEach(a=>{try{t[a]=null}catch{}try{delete t[a]}catch{}})}function Qr(e,t=0){return setTimeout(e,t)}function ll(){return Date.now()}function qc(e){const t=Ge();let a;return t.getComputedStyle&&(a=t.getComputedStyle(e,null)),!a&&e.currentStyle&&(a=e.currentStyle),a||(a=e.style),a}function zc(e,t="x"){const a=Ge();let l,n,r;const i=qc(e);return a.WebKitCSSMatrix?(n=i.transform||i.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map(u=>u.replace(",",".")).join(", ")),r=new a.WebKitCSSMatrix(n==="none"?"":n)):(r=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),l=r.toString().split(",")),t==="x"&&(a.WebKitCSSMatrix?n=r.m41:l.length===16?n=parseFloat(l[12]):n=parseFloat(l[4])),t==="y"&&(a.WebKitCSSMatrix?n=r.m42:l.length===16?n=parseFloat(l[13]):n=parseFloat(l[5])),n||0}function nl(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Vc(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Qe(...e){const t=Object(e[0]),a=["__proto__","constructor","prototype"];for(let l=1;l<e.length;l+=1){const n=e[l];if(n!=null&&!Vc(n)){const r=Object.keys(Object(n)).filter(i=>a.indexOf(i)<0);for(let i=0,u=r.length;i<u;i+=1){const s=r[i],o=Object.getOwnPropertyDescriptor(n,s);o!==void 0&&o.enumerable&&(nl(t[s])&&nl(n[s])?n[s].__swiper__?t[s]=n[s]:Qe(t[s],n[s]):!nl(t[s])&&nl(n[s])?(t[s]={},n[s].__swiper__?t[s]=n[s]:Qe(t[s],n[s])):t[s]=n[s])}}}return t}function Wt(e,t,a){e.style.setProperty(t,a)}function Jr({swiper:e,targetPosition:t,side:a}){const l=Ge(),n=-e.translate;let r=null,i;const u=e.params.speed;e.wrapperEl.style.scrollSnapType="none",l.cancelAnimationFrame(e.cssModeFrameID);const s=t>n?"next":"prev",o=(d,h)=>s==="next"&&d>=h||s==="prev"&&d<=h,c=()=>{i=new Date().getTime(),r===null&&(r=i);const d=Math.max(Math.min((i-r)/u,1),0),h=.5-Math.cos(d*Math.PI)/2;let f=n+h*(t-n);if(o(f,t)&&(f=t),e.wrapperEl.scrollTo({[a]:f}),o(f,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[a]:f})}),l.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=l.requestAnimationFrame(c)};c()}function st(e,t=""){const a=Ge(),l=[...e.children];return a.HTMLSlotElement&&e instanceof HTMLSlotElement&&l.push(...e.assignedElements()),t?l.filter(n=>n.matches(t)):l}function Gc(e,t){const a=[t];for(;a.length>0;){const l=a.shift();if(e===l)return!0;a.push(...l.children,...l.shadowRoot?l.shadowRoot.children:[],...l.assignedElements?l.assignedElements():[])}}function Yc(e,t){const a=Ge();let l=t.contains(e);return!l&&a.HTMLSlotElement&&t instanceof HTMLSlotElement&&(l=[...t.assignedElements()].includes(e),l||(l=Gc(e,t))),l}function rl(e){try{console.warn(e);return}catch{}}function il(e,t=[]){const a=document.createElement(e);return a.classList.add(...Array.isArray(t)?t:$c(t)),a}function Wc(e,t){const a=[];for(;e.previousElementSibling;){const l=e.previousElementSibling;t?l.matches(t)&&a.push(l):a.push(l),e=l}return a}function jc(e,t){const a=[];for(;e.nextElementSibling;){const l=e.nextElementSibling;t?l.matches(t)&&a.push(l):a.push(l),e=l}return a}function St(e,t){return Ge().getComputedStyle(e,null).getPropertyValue(t)}function ul(e){let t=e,a;if(t){for(a=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(a+=1);return a}}function Zr(e,t){const a=[];let l=e.parentElement;for(;l;)t?l.matches(t)&&a.push(l):a.push(l),l=l.parentElement;return a}function jl(e,t,a){const l=Ge();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(l.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(l.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function Be(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function pa(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:a=>a}).createHTML(t):e.innerHTML=t}let Kl;function Kc(){const e=Ge(),t=Dt();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function ei(){return Kl||(Kl=Kc()),Kl}let Xl;function Xc({userAgent:e}={}){const t=ei(),a=Ge(),l=a.navigator.platform,n=e||a.navigator.userAgent,r={ios:!1,android:!1},i=a.screen.width,u=a.screen.height,s=n.match(/(Android);?[\s\/]+([\d.]+)?/);let o=n.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const c=n.match(/(iPod)(.*OS\s([\d_]+))?/),d=!o&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h=l==="Win32";let f=l==="MacIntel";const y=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!o&&f&&t.touch&&y.indexOf(`${i}x${u}`)>=0&&(o=n.match(/(Version)\/([\d.]+)/),o||(o=[0,1,"13_0_0"]),f=!1),s&&!h&&(r.os="android",r.android=!0),(o||d||c)&&(r.os="ios",r.ios=!0),r}function ti(e={}){return Xl||(Xl=Xc(e)),Xl}let Ql;function Qc(){const e=Ge(),t=ti();let a=!1;function l(){const u=e.navigator.userAgent.toLowerCase();return u.indexOf("safari")>=0&&u.indexOf("chrome")<0&&u.indexOf("android")<0}if(l()){const u=String(e.navigator.userAgent);if(u.includes("Version/")){const[s,o]=u.split("Version/")[1].split(" ")[0].split(".").map(c=>Number(c));a=s<16||s===16&&o<2}}const n=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=l(),i=r||n&&t.ios;return{isSafari:a||r,needPerspectiveFix:a,need3dFix:i,isWebView:n}}function ai(){return Ql||(Ql=Qc()),Ql}function Jc({swiper:e,on:t,emit:a}){const l=Ge();let n=null,r=null;const i=()=>{!e||e.destroyed||!e.initialized||(a("beforeResize"),a("resize"))},u=()=>{!e||e.destroyed||!e.initialized||(n=new ResizeObserver(c=>{r=l.requestAnimationFrame(()=>{const{width:d,height:h}=e;let f=d,y=h;c.forEach(({contentBoxSize:E,contentRect:v,target:g})=>{g&&g!==e.el||(f=v?v.width:(E[0]||E).inlineSize,y=v?v.height:(E[0]||E).blockSize)}),(f!==d||y!==h)&&i()})}),n.observe(e.el))},s=()=>{r&&l.cancelAnimationFrame(r),n&&n.unobserve&&e.el&&(n.unobserve(e.el),n=null)},o=()=>{!e||e.destroyed||!e.initialized||a("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof l.ResizeObserver<"u"){u();return}l.addEventListener("resize",i),l.addEventListener("orientationchange",o)}),t("destroy",()=>{s(),l.removeEventListener("resize",i),l.removeEventListener("orientationchange",o)})}function Zc({swiper:e,extendParams:t,on:a,emit:l}){const n=[],r=Ge(),i=(o,c={})=>{const d=r.MutationObserver||r.WebkitMutationObserver,h=new d(f=>{if(e.__preventObserver__)return;if(f.length===1){l("observerUpdate",f[0]);return}const y=function(){l("observerUpdate",f[0])};r.requestAnimationFrame?r.requestAnimationFrame(y):r.setTimeout(y,0)});h.observe(o,{attributes:typeof c.attributes>"u"?!0:c.attributes,childList:e.isElement||(typeof c.childList>"u"?!0:c).childList,characterData:typeof c.characterData>"u"?!0:c.characterData}),n.push(h)},u=()=>{if(e.params.observer){if(e.params.observeParents){const o=Zr(e.hostEl);for(let c=0;c<o.length;c+=1)i(o[c])}i(e.hostEl,{childList:e.params.observeSlideChildren}),i(e.wrapperEl,{attributes:!1})}},s=()=>{n.forEach(o=>{o.disconnect()}),n.splice(0,n.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),a("init",u),a("destroy",s)}var ed={on(e,t,a){const l=this;if(!l.eventsListeners||l.destroyed||typeof t!="function")return l;const n=a?"unshift":"push";return e.split(" ").forEach(r=>{l.eventsListeners[r]||(l.eventsListeners[r]=[]),l.eventsListeners[r][n](t)}),l},once(e,t,a){const l=this;if(!l.eventsListeners||l.destroyed||typeof t!="function")return l;function n(...r){l.off(e,n),n.__emitterProxy&&delete n.__emitterProxy,t.apply(l,r)}return n.__emitterProxy=t,l.on(e,n,a)},onAny(e,t){const a=this;if(!a.eventsListeners||a.destroyed||typeof e!="function")return a;const l=t?"unshift":"push";return a.eventsAnyListeners.indexOf(e)<0&&a.eventsAnyListeners[l](e),a},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const a=t.eventsAnyListeners.indexOf(e);return a>=0&&t.eventsAnyListeners.splice(a,1),t},off(e,t){const a=this;return!a.eventsListeners||a.destroyed||!a.eventsListeners||e.split(" ").forEach(l=>{typeof t>"u"?a.eventsListeners[l]=[]:a.eventsListeners[l]&&a.eventsListeners[l].forEach((n,r)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&a.eventsListeners[l].splice(r,1)})}),a},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let a,l,n;return typeof e[0]=="string"||Array.isArray(e[0])?(a=e[0],l=e.slice(1,e.length),n=t):(a=e[0].events,l=e[0].data,n=e[0].context||t),l.unshift(n),(Array.isArray(a)?a:a.split(" ")).forEach(i=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(u=>{u.apply(n,[i,...l])}),t.eventsListeners&&t.eventsListeners[i]&&t.eventsListeners[i].forEach(u=>{u.apply(n,l)})}),t}};function td(){const e=this;let t,a;const l=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=l.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?a=e.params.height:a=l.clientHeight,!(t===0&&e.isHorizontal()||a===0&&e.isVertical())&&(t=t-parseInt(St(l,"padding-left")||0,10)-parseInt(St(l,"padding-right")||0,10),a=a-parseInt(St(l,"padding-top")||0,10)-parseInt(St(l,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(a)&&(a=0),Object.assign(e,{width:t,height:a,size:e.isHorizontal()?t:a}))}function ad(){const e=this;function t(L,I){return parseFloat(L.getPropertyValue(e.getDirectionLabel(I))||0)}const a=e.params,{wrapperEl:l,slidesEl:n,rtlTranslate:r,wrongRTL:i}=e,u=e.virtual&&a.virtual.enabled,s=u?e.virtual.slides.length:e.slides.length,o=st(n,`.${e.params.slideClass}, swiper-slide`),c=u?e.virtual.slides.length:o.length;let d=[];const h=[],f=[];let y=a.slidesOffsetBefore;typeof y=="function"&&(y=a.slidesOffsetBefore.call(e));let E=a.slidesOffsetAfter;typeof E=="function"&&(E=a.slidesOffsetAfter.call(e));const v=e.snapGrid.length,g=e.slidesGrid.length,m=e.size-y-E;let b=a.spaceBetween,x=-y,C=0,A=0;if(typeof m>"u")return;typeof b=="string"&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*m:typeof b=="string"&&(b=parseFloat(b)),e.virtualSize=-b-y-E,o.forEach(L=>{r?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),a.centeredSlides&&a.cssMode&&(Wt(l,"--swiper-centered-offset-before",""),Wt(l,"--swiper-centered-offset-after","")),a.cssMode&&(Wt(l,"--swiper-slides-offset-before",`${y}px`),Wt(l,"--swiper-slides-offset-after",`${E}px`));const O=a.grid&&a.grid.rows>1&&e.grid;O?e.grid.initSlides(o):e.grid&&e.grid.unsetSlides();let N;const S=a.slidesPerView==="auto"&&a.breakpoints&&Object.keys(a.breakpoints).filter(L=>typeof a.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L<c;L+=1){N=0;const I=o[L];if(!(I&&(O&&e.grid.updateSlide(L,I,o),St(I,"display")==="none"))){if(u&&a.slidesPerView==="auto")a.virtual.slidesPerViewAutoSlideSize&&(N=a.virtual.slidesPerViewAutoSlideSize),N&&I&&(a.roundLengths&&(N=Math.floor(N)),I.style[e.getDirectionLabel("width")]=`${N}px`);else if(a.slidesPerView==="auto"){S&&(I.style[e.getDirectionLabel("width")]="");const M=getComputedStyle(I),D=I.style.transform,_=I.style.webkitTransform;if(D&&(I.style.transform="none"),_&&(I.style.webkitTransform="none"),a.roundLengths)N=e.isHorizontal()?jl(I,"width"):jl(I,"height");else{const T=t(M,"width"),F=t(M,"padding-left"),V=t(M,"padding-right"),$=t(M,"margin-left"),H=t(M,"margin-right"),k=M.getPropertyValue("box-sizing");if(k&&k==="border-box")N=T+$+H;else{const{clientWidth:G,offsetWidth:j}=I;N=T+F+V+$+H+(j-G)}}D&&(I.style.transform=D),_&&(I.style.webkitTransform=_),a.roundLengths&&(N=Math.floor(N))}else N=(m-(a.slidesPerView-1)*b)/a.slidesPerView,a.roundLengths&&(N=Math.floor(N)),I&&(I.style[e.getDirectionLabel("width")]=`${N}px`);I&&(I.swiperSlideSize=N),f.push(N),a.centeredSlides?(x=x+N/2+C/2+b,C===0&&L!==0&&(x=x-m/2-b),L===0&&(x=x-m/2-b),Math.abs(x)<1/1e3&&(x=0),a.roundLengths&&(x=Math.floor(x)),A%a.slidesPerGroup===0&&d.push(x),h.push(x)):(a.roundLengths&&(x=Math.floor(x)),(A-Math.min(e.params.slidesPerGroupSkip,A))%e.params.slidesPerGroup===0&&d.push(x),h.push(x),x=x+N+b),e.virtualSize+=N+b,C=N,A+=1}}if(e.virtualSize=Math.max(e.virtualSize,m)+E,r&&i&&(a.effect==="slide"||a.effect==="coverflow")&&(l.style.width=`${e.virtualSize+b}px`),a.setWrapperSize&&(l.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),O&&e.grid.updateWrapperSize(N,d),!a.centeredSlides){const L=a.slidesPerView!=="auto"&&a.slidesPerView%1!==0,I=a.snapToSlideEdge&&!a.loop&&(a.slidesPerView==="auto"||L);let M=d.length;if(I){let _;if(a.slidesPerView==="auto"){_=1;let T=0;for(let F=f.length-1;F>=0&&(T+=f[F]+(F<f.length-1?b:0),T<=m);F-=1)_=f.length-F}else _=Math.floor(a.slidesPerView);M=Math.max(c-_,0)}const D=[];for(let _=0;_<d.length;_+=1){let T=d[_];a.roundLengths&&(T=Math.floor(T)),I?_<=M&&D.push(T):d[_]<=e.virtualSize-m&&D.push(T)}d=D,Math.floor(e.virtualSize-m)-Math.floor(d[d.length-1])>1&&(I||d.push(e.virtualSize-m))}if(u&&a.loop){const L=f[0]+b;if(a.slidesPerGroup>1){const I=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/a.slidesPerGroup),M=L*a.slidesPerGroup;for(let D=0;D<I;D+=1)d.push(d[d.length-1]+M)}for(let I=0;I<e.virtual.slidesBefore+e.virtual.slidesAfter;I+=1)a.slidesPerGroup===1&&d.push(d[d.length-1]+L),h.push(h[h.length-1]+L),e.virtualSize+=L}if(d.length===0&&(d=[0]),b!==0){const L=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");o.filter((I,M)=>!a.cssMode||a.loop?!0:M!==o.length-1).forEach(I=>{I.style[L]=`${b}px`})}if(a.centeredSlides&&a.centeredSlidesBounds){let L=0;f.forEach(M=>{L+=M+(b||0)}),L-=b;const I=L>m?L-m:0;d=d.map(M=>M<=0?-y:M>I?I+E:M)}if(a.centerInsufficientSlides){let L=0;f.forEach(M=>{L+=M+(b||0)}),L-=b;const I=(y||0)+(E||0);if(L+I<m){const M=(m-L-I)/2;d.forEach((D,_)=>{d[_]=D-M}),h.forEach((D,_)=>{h[_]=D+M})}}if(Object.assign(e,{slides:o,snapGrid:d,slidesGrid:h,slidesSizesGrid:f}),a.centeredSlides&&a.cssMode&&!a.centeredSlidesBounds){Wt(l,"--swiper-centered-offset-before",`${-d[0]}px`),Wt(l,"--swiper-centered-offset-after",`${e.size/2-f[f.length-1]/2}px`);const L=-e.snapGrid[0],I=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(M=>M+L),e.slidesGrid=e.slidesGrid.map(M=>M+I)}if(c!==s&&e.emit("slidesLengthChange"),d.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==g&&e.emit("slidesGridLengthChange"),a.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!u&&!a.cssMode&&(a.effect==="slide"||a.effect==="fade")){const L=`${a.containerModifierClass}backface-hidden`,I=e.el.classList.contains(L);c<=a.maxBackfaceHiddenSlides?I||e.el.classList.add(L):I&&e.el.classList.remove(L)}}function ld(e){const t=this,a=[],l=t.virtual&&t.params.virtual.enabled;let n=0,r;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const i=u=>l?t.slides[t.getSlideIndexByData(u)]:t.slides[u];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(u=>{a.push(u)});else for(r=0;r<Math.ceil(t.params.slidesPerView);r+=1){const u=t.activeIndex+r;if(u>t.slides.length&&!l)break;a.push(i(u))}else a.push(i(t.activeIndex));for(r=0;r<a.length;r+=1)if(typeof a[r]<"u"){const u=a[r].offsetHeight;n=u>n?u:n}(n||n===0)&&(t.wrapperEl.style.height=`${n}px`)}function nd(){const e=this,t=e.slides,a=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let l=0;l<t.length;l+=1)t[l].swiperSlideOffset=(e.isHorizontal()?t[l].offsetLeft:t[l].offsetTop)-a-e.cssOverflowAdjustment()}const li=(e,t,a)=>{t&&!e.classList.contains(a)?e.classList.add(a):!t&&e.classList.contains(a)&&e.classList.remove(a)};function rd(e=this&&this.translate||0){const t=this,a=t.params,{slides:l,rtlTranslate:n,snapGrid:r}=t;if(l.length===0)return;typeof l[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let i=-e;n&&(i=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let u=a.spaceBetween;typeof u=="string"&&u.indexOf("%")>=0?u=parseFloat(u.replace("%",""))/100*t.size:typeof u=="string"&&(u=parseFloat(u));for(let s=0;s<l.length;s+=1){const o=l[s];let c=o.swiperSlideOffset;a.cssMode&&a.centeredSlides&&(c-=l[0].swiperSlideOffset);const d=(i+(a.centeredSlides?t.minTranslate():0)-c)/(o.swiperSlideSize+u),h=(i-r[0]+(a.centeredSlides?t.minTranslate():0)-c)/(o.swiperSlideSize+u),f=-(i-c),y=f+t.slidesSizesGrid[s],E=f>=0&&f<=t.size-t.slidesSizesGrid[s],v=f>=0&&f<t.size-1||y>1&&y<=t.size||f<=0&&y>=t.size;v&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(s)),li(o,v,a.slideVisibleClass),li(o,E,a.slideFullyVisibleClass),o.progress=n?-d:d,o.originalProgress=n?-h:h}}function id(e){const t=this;if(typeof e>"u"){const c=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*c||0}const a=t.params,l=t.maxTranslate()-t.minTranslate();let{progress:n,isBeginning:r,isEnd:i,progressLoop:u}=t;const s=r,o=i;if(l===0)n=0,r=!0,i=!0;else{n=(e-t.minTranslate())/l;const c=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;r=c||n<=0,i=d||n>=1,c&&(n=0),d&&(n=1)}if(a.loop){const c=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),h=t.slidesGrid[c],f=t.slidesGrid[d],y=t.slidesGrid[t.slidesGrid.length-1],E=Math.abs(e);E>=h?u=(E-h)/y:u=(E+y-f)/y,u>1&&(u-=1)}Object.assign(t,{progress:n,progressLoop:u,isBeginning:r,isEnd:i}),(a.watchSlidesProgress||a.centeredSlides&&a.autoHeight)&&t.updateSlidesProgress(e),r&&!s&&t.emit("reachBeginning toEdge"),i&&!o&&t.emit("reachEnd toEdge"),(s&&!r||o&&!i)&&t.emit("fromEdge"),t.emit("progress",n)}const Jl=(e,t,a)=>{t&&!e.classList.contains(a)?e.classList.add(a):!t&&e.classList.contains(a)&&e.classList.remove(a)};function ud(){const e=this,{slides:t,params:a,slidesEl:l,activeIndex:n}=e,r=e.virtual&&a.virtual.enabled,i=e.grid&&a.grid&&a.grid.rows>1,u=d=>st(l,`.${a.slideClass}${d}, swiper-slide${d}`)[0];let s,o,c;if(r)if(a.loop){let d=n-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),s=u(`[data-swiper-slide-index="${d}"]`)}else s=u(`[data-swiper-slide-index="${n}"]`);else i?(s=t.find(d=>d.column===n),c=t.find(d=>d.column===n+1),o=t.find(d=>d.column===n-1)):s=t[n];s&&(i||(c=jc(s,`.${a.slideClass}, swiper-slide`)[0],a.loop&&!c&&(c=t[0]),o=Wc(s,`.${a.slideClass}, swiper-slide`)[0],a.loop&&!o===0&&(o=t[t.length-1]))),t.forEach(d=>{Jl(d,d===s,a.slideActiveClass),Jl(d,d===c,a.slideNextClass),Jl(d,d===o,a.slidePrevClass)}),e.emitSlidesClasses()}const sl=(e,t)=>{if(!e||e.destroyed||!e.params)return;const a=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,l=t.closest(a());if(l){let n=l.querySelector(`.${e.params.lazyPreloaderClass}`);!n&&e.isElement&&(l.shadowRoot?n=l.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{l.shadowRoot&&(n=l.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),n&&!n.lazyPreloaderManaged&&n.remove())})),n&&!n.lazyPreloaderManaged&&n.remove()}},Zl=(e,t)=>{if(!e.slides[t])return;const a=e.slides[t].querySelector('[loading="lazy"]');a&&a.removeAttribute("loading")},en=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const a=e.slides.length;if(!a||!t||t<0)return;t=Math.min(t,a);const l=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),n=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const i=n,u=[i-t];u.push(...Array.from({length:t}).map((s,o)=>i+l+o)),e.slides.forEach((s,o)=>{u.includes(s.column)&&Zl(e,o)});return}const r=n+l-1;if(e.params.rewind||e.params.loop)for(let i=n-t;i<=r+t;i+=1){const u=(i%a+a)%a;(u<n||u>r)&&Zl(e,u)}else for(let i=Math.max(n-t,0);i<=Math.min(r+t,a-1);i+=1)i!==n&&(i>r||i<n)&&Zl(e,i)};function sd(e){const{slidesGrid:t,params:a}=e,l=e.rtlTranslate?e.translate:-e.translate;let n;for(let r=0;r<t.length;r+=1)typeof t[r+1]<"u"?l>=t[r]&&l<t[r+1]-(t[r+1]-t[r])/2?n=r:l>=t[r]&&l<t[r+1]&&(n=r+1):l>=t[r]&&(n=r);return a.normalizeSlideIndex&&(n<0||typeof n>"u")&&(n=0),n}function od(e){const t=this,a=t.rtlTranslate?t.translate:-t.translate,{snapGrid:l,params:n,activeIndex:r,realIndex:i,snapIndex:u}=t;let s=e,o;const c=f=>{let y=f-t.virtual.slidesBefore;return y<0&&(y=t.virtual.slides.length+y),y>=t.virtual.slides.length&&(y-=t.virtual.slides.length),y};if(typeof s>"u"&&(s=sd(t)),l.indexOf(a)>=0)o=l.indexOf(a);else{const f=Math.min(n.slidesPerGroupSkip,s);o=f+Math.floor((s-f)/n.slidesPerGroup)}if(o>=l.length&&(o=l.length-1),s===r&&!t.params.loop){o!==u&&(t.snapIndex=o,t.emit("snapIndexChange"));return}if(s===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=c(s);return}const d=t.grid&&n.grid&&n.grid.rows>1;let h;if(t.virtual&&n.virtual.enabled)n.loop?h=c(s):h=s;else if(d){const f=t.slides.find(E=>E.column===s);let y=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(y)&&(y=Math.max(t.slides.indexOf(f),0)),h=Math.floor(y/n.grid.rows)}else if(t.slides[s]){const f=t.slides[s].getAttribute("data-swiper-slide-index");f?h=parseInt(f,10):h=s}else h=s;Object.assign(t,{previousSnapIndex:u,snapIndex:o,previousRealIndex:i,realIndex:h,previousIndex:r,activeIndex:s}),t.initialized&&en(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(i!==h&&t.emit("realIndexChange"),t.emit("slideChange"))}function cd(e,t){const a=this,l=a.params;let n=e.closest(`.${l.slideClass}, swiper-slide`);!n&&a.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(u=>{!n&&u.matches&&u.matches(`.${l.slideClass}, swiper-slide`)&&(n=u)});let r=!1,i;if(n){for(let u=0;u<a.slides.length;u+=1)if(a.slides[u]===n){r=!0,i=u;break}}if(n&&r)a.clickedSlide=n,a.virtual&&a.params.virtual.enabled?a.clickedIndex=parseInt(n.getAttribute("data-swiper-slide-index"),10):a.clickedIndex=i;else{a.clickedSlide=void 0,a.clickedIndex=void 0;return}l.slideToClickedSlide&&a.clickedIndex!==void 0&&a.clickedIndex!==a.activeIndex&&a.slideToClickedSlide()}var dd={updateSize:td,updateSlides:ad,updateAutoHeight:ld,updateSlidesOffset:nd,updateSlidesProgress:rd,updateProgress:id,updateSlidesClasses:ud,updateActiveIndex:od,updateClickedSlide:cd};function fd(e=this.isHorizontal()?"x":"y"){const t=this,{params:a,rtlTranslate:l,translate:n,wrapperEl:r}=t;if(a.virtualTranslate)return l?-n:n;if(a.cssMode)return n;let i=zc(r,e);return i+=t.cssOverflowAdjustment(),l&&(i=-i),i||0}function pd(e,t){const a=this,{rtlTranslate:l,params:n,wrapperEl:r,progress:i}=a;let u=0,s=0;const o=0;a.isHorizontal()?u=l?-e:e:s=e,n.roundLengths&&(u=Math.floor(u),s=Math.floor(s)),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?u:s,n.cssMode?r[a.isHorizontal()?"scrollLeft":"scrollTop"]=a.isHorizontal()?-u:-s:n.virtualTranslate||(a.isHorizontal()?u-=a.cssOverflowAdjustment():s-=a.cssOverflowAdjustment(),r.style.transform=`translate3d(${u}px, ${s}px, ${o}px)`);let c;const d=a.maxTranslate()-a.minTranslate();d===0?c=0:c=(e-a.minTranslate())/d,c!==i&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)}function hd(){return-this.snapGrid[0]}function bd(){return-this.snapGrid[this.snapGrid.length-1]}function md(e=0,t=this.params.speed,a=!0,l=!0,n){const r=this,{params:i,wrapperEl:u}=r;if(r.animating&&i.preventInteractionOnTransition)return!1;const s=r.minTranslate(),o=r.maxTranslate();let c;if(l&&e>s?c=s:l&&e<o?c=o:c=e,r.updateProgress(c),i.cssMode){const d=r.isHorizontal();if(t===0)u[d?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return Jr({swiper:r,targetPosition:-c,side:d?"left":"top"}),!0;u.scrollTo({[d?"left":"top"]:-c,behavior:"smooth"})}return!0}return t===0?(r.setTransition(0),r.setTranslate(c),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(h){!r||r.destroyed||h.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,a&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}var vd={getTranslate:fd,setTranslate:pd,minTranslate:hd,maxTranslate:bd,translateTo:md};function gd(e,t){const a=this;a.params.cssMode||(a.wrapperEl.style.transitionDuration=`${e}ms`,a.wrapperEl.style.transitionDelay=e===0?"0ms":""),a.emit("setTransition",e,t)}function ni({swiper:e,runCallbacks:t,direction:a,step:l}){const{activeIndex:n,previousIndex:r}=e;let i=a;i||(n>r?i="next":n<r?i="prev":i="reset"),e.emit(`transition${l}`),t&&i==="reset"?e.emit(`slideResetTransition${l}`):t&&n!==r&&(e.emit(`slideChangeTransition${l}`),i==="next"?e.emit(`slideNextTransition${l}`):e.emit(`slidePrevTransition${l}`))}function Ed(e=!0,t){const a=this,{params:l}=a;l.cssMode||(l.autoHeight&&a.updateAutoHeight(),ni({swiper:a,runCallbacks:e,direction:t,step:"Start"}))}function yd(e=!0,t){const a=this,{params:l}=a;a.animating=!1,!l.cssMode&&(a.setTransition(0),ni({swiper:a,runCallbacks:e,direction:t,step:"End"}))}var Td={setTransition:gd,transitionStart:Ed,transitionEnd:yd};function xd(e=0,t,a=!0,l,n){typeof e=="string"&&(e=parseInt(e,10));const r=this;let i=e;i<0&&(i=0);const{params:u,snapGrid:s,slidesGrid:o,previousIndex:c,activeIndex:d,rtlTranslate:h,wrapperEl:f,enabled:y}=r;if(!y&&!l&&!n||r.destroyed||r.animating&&u.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=r.params.speed);const E=Math.min(r.params.slidesPerGroupSkip,i);let v=E+Math.floor((i-E)/r.params.slidesPerGroup);v>=s.length&&(v=s.length-1);const g=-s[v];if(u.normalizeSlideIndex)for(let O=0;O<o.length;O+=1){const N=-Math.floor(g*100),S=Math.floor(o[O]*100),L=Math.floor(o[O+1]*100);typeof o[O+1]<"u"?N>=S&&N<L-(L-S)/2?i=O:N>=S&&N<L&&(i=O+1):N>=S&&(i=O)}if(r.initialized&&i!==d&&(!r.allowSlideNext&&(h?g>r.translate&&g>r.minTranslate():g<r.translate&&g<r.minTranslate())||!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(d||0)!==i))return!1;i!==(c||0)&&a&&r.emit("beforeSlideChangeStart"),r.updateProgress(g);let m;i>d?m="next":i<d?m="prev":m="reset";const b=r.virtual&&r.params.virtual.enabled;if(!(b&&n)&&(h&&-g===r.translate||!h&&g===r.translate))return r.updateActiveIndex(i),u.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),u.effect!=="slide"&&r.setTranslate(g),m!=="reset"&&(r.transitionStart(a,m),r.transitionEnd(a,m)),!1;if(u.cssMode){const O=r.isHorizontal(),N=h?g:-g;if(t===0)b&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),b&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{f[O?"scrollLeft":"scrollTop"]=N})):f[O?"scrollLeft":"scrollTop"]=N,b&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return Jr({swiper:r,targetPosition:N,side:O?"left":"top"}),!0;f.scrollTo({[O?"left":"top"]:N,behavior:"smooth"})}return!0}const A=ai().isSafari;return b&&!n&&A&&r.isElement&&r.virtual.update(!1,!1,i),r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(i),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,l),r.transitionStart(a,m),t===0?r.transitionEnd(a,m):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(N){!r||r.destroyed||N.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(a,m))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0}function Cd(e=0,t,a=!0,l){typeof e=="string"&&(e=parseInt(e,10));const n=this;if(n.destroyed)return;typeof t>"u"&&(t=n.params.speed);const r=n.grid&&n.params.grid&&n.params.grid.rows>1;let i=e;if(n.params.loop)if(n.virtual&&n.params.virtual.enabled)i=i+n.virtual.slidesBefore;else{let u;if(r){const E=i*n.params.grid.rows;u=n.slides.find(v=>v.getAttribute("data-swiper-slide-index")*1===E).column}else u=n.getSlideIndexByData(i);const s=r?Math.ceil(n.slides.length/n.params.grid.rows):n.slides.length,{centeredSlides:o,slidesOffsetBefore:c,slidesOffsetAfter:d}=n.params,h=o||!!c||!!d;let f=n.params.slidesPerView;f==="auto"?f=n.slidesPerViewDynamic():(f=Math.ceil(parseFloat(n.params.slidesPerView,10)),h&&f%2===0&&(f=f+1));let y=s-u<f;if(h&&(y=y||u<Math.ceil(f/2)),l&&h&&n.params.slidesPerView!=="auto"&&!r&&(y=!1),y){const E=h?u<n.activeIndex?"prev":"next":u-n.activeIndex-1<n.params.slidesPerView?"next":"prev";n.loopFix({direction:E,slideTo:!0,activeSlideIndex:E==="next"?u+1:u-s+1,slideRealIndex:E==="next"?n.realIndex:void 0})}if(r){const E=i*n.params.grid.rows;i=n.slides.find(v=>v.getAttribute("data-swiper-slide-index")*1===E).column}else i=n.getSlideIndexByData(i)}return requestAnimationFrame(()=>{n.slideTo(i,t,a,l)}),n}function Sd(e,t=!0,a){const l=this,{enabled:n,params:r,animating:i}=l;if(!n||l.destroyed)return l;typeof e>"u"&&(e=l.params.speed);let u=r.slidesPerGroup;r.slidesPerView==="auto"&&r.slidesPerGroup===1&&r.slidesPerGroupAuto&&(u=Math.max(l.slidesPerViewDynamic("current",!0),1));const s=l.activeIndex<r.slidesPerGroupSkip?1:u,o=l.virtual&&r.virtual.enabled;if(r.loop){if(i&&!o&&r.loopPreventsSliding)return!1;if(l.loopFix({direction:"next"}),l._clientLeft=l.wrapperEl.clientLeft,l.activeIndex===l.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{l.slideTo(l.activeIndex+s,e,t,a)}),!0}return r.rewind&&l.isEnd?l.slideTo(0,e,t,a):l.slideTo(l.activeIndex+s,e,t,a)}function Ad(e,t=!0,a){const l=this,{params:n,snapGrid:r,slidesGrid:i,rtlTranslate:u,enabled:s,animating:o}=l;if(!s||l.destroyed)return l;typeof e>"u"&&(e=l.params.speed);const c=l.virtual&&n.virtual.enabled;if(n.loop){if(o&&!c&&n.loopPreventsSliding)return!1;l.loopFix({direction:"prev"}),l._clientLeft=l.wrapperEl.clientLeft}const d=u?l.translate:-l.translate;function h(m){return m<0?-Math.floor(Math.abs(m)):Math.floor(m)}const f=h(d),y=r.map(m=>h(m)),E=n.freeMode&&n.freeMode.enabled;let v=r[y.indexOf(f)-1];if(typeof v>"u"&&(n.cssMode||E)){let m;r.forEach((b,x)=>{f>=b&&(m=x)}),typeof m<"u"&&(v=E?r[m]:r[m>0?m-1:m])}let g=0;if(typeof v<"u"&&(g=i.indexOf(v),g<0&&(g=l.activeIndex-1),n.slidesPerView==="auto"&&n.slidesPerGroup===1&&n.slidesPerGroupAuto&&(g=g-l.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),n.rewind&&l.isBeginning){const m=l.params.virtual&&l.params.virtual.enabled&&l.virtual?l.virtual.slides.length-1:l.slides.length-1;return l.slideTo(m,e,t,a)}else if(n.loop&&l.activeIndex===0&&n.cssMode)return requestAnimationFrame(()=>{l.slideTo(g,e,t,a)}),!0;return l.slideTo(g,e,t,a)}function wd(e,t=!0,a){const l=this;if(!l.destroyed)return typeof e>"u"&&(e=l.params.speed),l.slideTo(l.activeIndex,e,t,a)}function _d(e,t=!0,a,l=.5){const n=this;if(n.destroyed)return;typeof e>"u"&&(e=n.params.speed);let r=n.activeIndex;const i=Math.min(n.params.slidesPerGroupSkip,r),u=i+Math.floor((r-i)/n.params.slidesPerGroup),s=n.rtlTranslate?n.translate:-n.translate;if(s>=n.snapGrid[u]){const o=n.snapGrid[u],c=n.snapGrid[u+1];s-o>(c-o)*l&&(r+=n.params.slidesPerGroup)}else{const o=n.snapGrid[u-1],c=n.snapGrid[u];s-o<=(c-o)*l&&(r-=n.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,n.slidesGrid.length-1),n.slideTo(r,e,t,a)}function kd(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:a}=e,l=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let n=e.getSlideIndexWhenGrid(e.clickedIndex),r;const i=e.isElement?"swiper-slide":`.${t.slideClass}`,u=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;r=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(r):n>(u?(e.slides.length-l)/2-(e.params.grid.rows-1):e.slides.length-l)?(e.loopFix(),n=e.getSlideIndex(st(a,`${i}[data-swiper-slide-index="${r}"]`)[0]),Qr(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}var Nd={slideTo:xd,slideToLoop:Cd,slideNext:Sd,slidePrev:Ad,slideReset:wd,slideToClosest:_d,slideToClickedSlide:kd};function Id(e,t){const a=this,{params:l,slidesEl:n}=a;if(!l.loop||a.virtual&&a.params.virtual.enabled)return;const r=()=>{st(n,`.${l.slideClass}, swiper-slide`).forEach((y,E)=>{y.setAttribute("data-swiper-slide-index",E)})},i=()=>{const f=st(n,`.${l.slideBlankClass}`);f.forEach(y=>{y.remove()}),f.length>0&&(a.recalcSlides(),a.updateSlides())},u=a.grid&&l.grid&&l.grid.rows>1;l.loopAddBlankSlides&&(l.slidesPerGroup>1||u)&&i();const s=l.slidesPerGroup*(u?l.grid.rows:1),o=a.slides.length%s!==0,c=u&&a.slides.length%l.grid.rows!==0,d=f=>{for(let y=0;y<f;y+=1){const E=a.isElement?il("swiper-slide",[l.slideBlankClass]):il("div",[l.slideClass,l.slideBlankClass]);a.slidesEl.append(E)}};if(o){if(l.loopAddBlankSlides){const f=s-a.slides.length%s;d(f),a.recalcSlides(),a.updateSlides()}else rl("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else if(c){if(l.loopAddBlankSlides){const f=l.grid.rows-a.slides.length%l.grid.rows;d(f),a.recalcSlides(),a.updateSlides()}else rl("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else r();const h=l.centeredSlides||!!l.slidesOffsetBefore||!!l.slidesOffsetAfter;a.loopFix({slideRealIndex:e,direction:h?void 0:"next",initial:t})}function Ld({slideRealIndex:e,slideTo:t=!0,direction:a,setTranslate:l,activeSlideIndex:n,initial:r,byController:i,byMousewheel:u}={}){const s=this;if(!s.params.loop)return;s.emit("beforeLoopFix");const{slides:o,allowSlidePrev:c,allowSlideNext:d,slidesEl:h,params:f}=s,{centeredSlides:y,slidesOffsetBefore:E,slidesOffsetAfter:v,initialSlide:g}=f,m=y||!!E||!!v;if(s.allowSlidePrev=!0,s.allowSlideNext=!0,s.virtual&&f.virtual.enabled){t&&(!m&&s.snapIndex===0?s.slideTo(s.virtual.slides.length,0,!1,!0):m&&s.snapIndex<f.slidesPerView?s.slideTo(s.virtual.slides.length+s.snapIndex,0,!1,!0):s.snapIndex===s.snapGrid.length-1&&s.slideTo(s.virtual.slidesBefore,0,!1,!0)),s.allowSlidePrev=c,s.allowSlideNext=d,s.emit("loopFix");return}let b=f.slidesPerView;b==="auto"?b=s.slidesPerViewDynamic():(b=Math.ceil(parseFloat(f.slidesPerView,10)),m&&b%2===0&&(b=b+1));const x=f.slidesPerGroupAuto?b:f.slidesPerGroup;let C=m?Math.max(x,Math.ceil(b/2)):x;C%x!==0&&(C+=x-C%x),C+=f.loopAdditionalSlides,s.loopedSlides=C;const A=s.grid&&f.grid&&f.grid.rows>1;o.length<b+C||s.params.effect==="cards"&&o.length<b+C*2?rl("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):A&&f.grid.fill==="row"&&rl("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const O=[],N=[],S=A?Math.ceil(o.length/f.grid.rows):o.length,L=r&&S-g<b&&!m;let I=L?g:s.activeIndex;typeof n>"u"?n=s.getSlideIndex(o.find($=>$.classList.contains(f.slideActiveClass))):I=n;const M=a==="next"||!a,D=a==="prev"||!a;let _=0,T=0;const V=(A?o[n].column:n)+(m&&typeof l>"u"?-b/2+.5:0);if(V<C){_=Math.max(C-V,x);for(let $=0;$<C-V;$+=1){const H=$-Math.floor($/S)*S;if(A){const k=S-H-1;for(let G=o.length-1;G>=0;G-=1)o[G].column===k&&O.push(G)}else O.push(S-H-1)}}else if(V+b>S-C){T=Math.max(V-(S-C*2),x),L&&(T=Math.max(T,b-S+g+1));for(let $=0;$<T;$+=1){const H=$-Math.floor($/S)*S;A?o.forEach((k,G)=>{k.column===H&&N.push(G)}):N.push(H)}}if(s.__preventObserver__=!0,requestAnimationFrame(()=>{s.__preventObserver__=!1}),s.params.effect==="cards"&&o.length<b+C*2&&(N.includes(n)&&N.splice(N.indexOf(n),1),O.includes(n)&&O.splice(O.indexOf(n),1)),D&&O.forEach($=>{o[$].swiperLoopMoveDOM=!0,h.prepend(o[$]),o[$].swiperLoopMoveDOM=!1}),M&&N.forEach($=>{o[$].swiperLoopMoveDOM=!0,h.append(o[$]),o[$].swiperLoopMoveDOM=!1}),s.recalcSlides(),f.slidesPerView==="auto"?s.updateSlides():A&&(O.length>0&&D||N.length>0&&M)&&s.slides.forEach(($,H)=>{s.grid.updateSlide(H,$,s.slides)}),f.watchSlidesProgress&&s.updateSlidesOffset(),t){if(O.length>0&&D){if(typeof e>"u"){const $=s.slidesGrid[I],k=s.slidesGrid[I+_]-$;u?s.setTranslate(s.translate-k):(s.slideTo(I+Math.ceil(_),0,!1,!0),l&&(s.touchEventsData.startTranslate=s.touchEventsData.startTranslate-k,s.touchEventsData.currentTranslate=s.touchEventsData.currentTranslate-k))}else if(l){const $=A?O.length/f.grid.rows:O.length;s.slideTo(s.activeIndex+$,0,!1,!0),s.touchEventsData.currentTranslate=s.translate}}else if(N.length>0&&M)if(typeof e>"u"){const $=s.slidesGrid[I],k=s.slidesGrid[I-T]-$;u?s.setTranslate(s.translate-k):(s.slideTo(I-T,0,!1,!0),l&&(s.touchEventsData.startTranslate=s.touchEventsData.startTranslate-k,s.touchEventsData.currentTranslate=s.touchEventsData.currentTranslate-k))}else{const $=A?N.length/f.grid.rows:N.length;s.slideTo(s.activeIndex-$,0,!1,!0)}}if(s.allowSlidePrev=c,s.allowSlideNext=d,s.controller&&s.controller.control&&!i){const $={slideRealIndex:e,direction:a,setTranslate:l,activeSlideIndex:n,byController:!0};Array.isArray(s.controller.control)?s.controller.control.forEach(H=>{!H.destroyed&&H.params.loop&&H.loopFix({...$,slideTo:H.params.slidesPerView===f.slidesPerView?t:!1})}):s.controller.control instanceof s.constructor&&s.controller.control.params.loop&&s.controller.control.loopFix({...$,slideTo:s.controller.control.params.slidesPerView===f.slidesPerView?t:!1})}s.emit("loopFix")}function Od(){const e=this,{params:t,slidesEl:a}=e;if(!t.loop||!a||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const l=[];e.slides.forEach(n=>{const r=typeof n.swiperSlideIndex>"u"?n.getAttribute("data-swiper-slide-index")*1:n.swiperSlideIndex;l[r]=n}),e.slides.forEach(n=>{n.removeAttribute("data-swiper-slide-index")}),l.forEach(n=>{a.append(n)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Dd={loopCreate:Id,loopFix:Ld,loopDestroy:Od};function Pd(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const a=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),a.style.cursor="move",a.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Md(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var Bd={setGrabCursor:Pd,unsetGrabCursor:Md};function Fd(e,t=this){function a(l){if(!l||l===Dt()||l===Ge())return null;l.assignedSlot&&(l=l.assignedSlot);const n=l.closest(e);return!n&&!l.getRootNode?null:n||a(l.getRootNode().host)}return a(t)}function ri(e,t,a){const l=Ge(),{params:n}=e,r=n.edgeSwipeDetection,i=n.edgeSwipeThreshold;return r&&(a<=i||a>=l.innerWidth-i)?r==="prevent"?(t.preventDefault(),!0):!1:!0}function Rd(e){const t=this,a=Dt();let l=e;l.originalEvent&&(l=l.originalEvent);const n=t.touchEventsData;if(l.type==="pointerdown"){if(n.pointerId!==null&&n.pointerId!==l.pointerId)return;n.pointerId=l.pointerId}else l.type==="touchstart"&&l.targetTouches.length===1&&(n.touchId=l.targetTouches[0].identifier);if(l.type==="touchstart"){ri(t,l,l.targetTouches[0].pageX);return}const{params:r,touches:i,enabled:u}=t;if(!u||!r.simulateTouch&&l.pointerType==="mouse"||t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let s=l.target;if(r.touchEventsTarget==="wrapper"&&!Yc(s,t.wrapperEl)||"which"in l&&l.which===3||"button"in l&&l.button>0||n.isTouched&&n.isMoved)return;const o=!!r.noSwipingClass&&r.noSwipingClass!=="",c=l.composedPath?l.composedPath():l.path;o&&l.target&&l.target.shadowRoot&&c&&(s=c[0]);const d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!!(l.target&&l.target.shadowRoot);if(r.noSwiping&&(h?Fd(d,s):s.closest(d))){t.allowClick=!0;return}if(r.swipeHandler&&!s.closest(r.swipeHandler))return;i.currentX=l.pageX,i.currentY=l.pageY;const f=i.currentX,y=i.currentY;if(!ri(t,l,f))return;Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),i.startX=f,i.startY=y,n.touchStartTime=ll(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(n.allowThresholdMove=!1);let E=!0;s.matches(n.focusableElements)&&(E=!1,s.nodeName==="SELECT"&&(n.isTouched=!1)),a.activeElement&&a.activeElement.matches(n.focusableElements)&&a.activeElement!==s&&(l.pointerType==="mouse"||l.pointerType!=="mouse"&&!s.matches(n.focusableElements))&&a.activeElement.blur();const v=E&&t.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||v)&&!s.isContentEditable&&l.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",l)}function Hd(e){const t=Dt(),a=this,l=a.touchEventsData,{params:n,touches:r,rtlTranslate:i,enabled:u}=a;if(!u||!n.simulateTouch&&e.pointerType==="mouse")return;let s=e;if(s.originalEvent&&(s=s.originalEvent),s.type==="pointermove"&&(l.touchId!==null||s.pointerId!==l.pointerId))return;let o;if(s.type==="touchmove"){if(o=[...s.changedTouches].find(C=>C.identifier===l.touchId),!o||o.identifier!==l.touchId)return}else o=s;if(!l.isTouched){l.startMoving&&l.isScrolling&&a.emit("touchMoveOpposite",s);return}const c=o.pageX,d=o.pageY;if(s.preventedByNestedSwiper){r.startX=c,r.startY=d;return}if(!a.allowTouchMove){s.target.matches(l.focusableElements)||(a.allowClick=!1),l.isTouched&&(Object.assign(r,{startX:c,startY:d,currentX:c,currentY:d}),l.touchStartTime=ll());return}if(n.touchReleaseOnEdges&&!n.loop)if(a.isVertical()){if(d<r.startY&&a.translate<=a.maxTranslate()||d>r.startY&&a.translate>=a.minTranslate()){l.isTouched=!1,l.isMoved=!1;return}}else{if(i&&(c>r.startX&&-a.translate<=a.maxTranslate()||c<r.startX&&-a.translate>=a.minTranslate()))return;if(!i&&(c<r.startX&&a.translate<=a.maxTranslate()||c>r.startX&&a.translate>=a.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(l.focusableElements)&&t.activeElement!==s.target&&s.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&s.target===t.activeElement&&s.target.matches(l.focusableElements)){l.isMoved=!0,a.allowClick=!1;return}l.allowTouchCallbacks&&a.emit("touchMove",s),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=c,r.currentY=d;const h=r.currentX-r.startX,f=r.currentY-r.startY;if(a.params.threshold&&Math.sqrt(h**2+f**2)<a.params.threshold)return;if(typeof l.isScrolling>"u"){let C;a.isHorizontal()&&r.currentY===r.startY||a.isVertical()&&r.currentX===r.startX?l.isScrolling=!1:h*h+f*f>=25&&(C=Math.atan2(Math.abs(f),Math.abs(h))*180/Math.PI,l.isScrolling=a.isHorizontal()?C>n.touchAngle:90-C>n.touchAngle)}if(l.isScrolling&&a.emit("touchMoveOpposite",s),typeof l.startMoving>"u"&&(r.currentX!==r.startX||r.currentY!==r.startY)&&(l.startMoving=!0),l.isScrolling||s.type==="touchmove"&&l.preventTouchMoveFromPointerMove){l.isTouched=!1;return}if(!l.startMoving)return;a.allowClick=!1,!n.cssMode&&s.cancelable&&s.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&s.stopPropagation();let y=a.isHorizontal()?h:f,E=a.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;n.oneWayMovement&&(y=Math.abs(y)*(i?1:-1),E=Math.abs(E)*(i?1:-1)),r.diff=y,y*=n.touchRatio,i&&(y=-y,E=-E);const v=a.touchesDirection;a.swipeDirection=y>0?"prev":"next",a.touchesDirection=E>0?"prev":"next";const g=a.params.loop&&!n.cssMode,m=a.touchesDirection==="next"&&a.allowSlideNext||a.touchesDirection==="prev"&&a.allowSlidePrev;if(!l.isMoved){if(g&&m&&a.loopFix({direction:a.swipeDirection}),l.startTranslate=a.getTranslate(),a.setTransition(0),a.animating){const C=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});a.wrapperEl.dispatchEvent(C)}l.allowMomentumBounce=!1,n.grabCursor&&(a.allowSlideNext===!0||a.allowSlidePrev===!0)&&a.setGrabCursor(!0),a.emit("sliderFirstMove",s)}if(new Date().getTime(),n._loopSwapReset!==!1&&l.isMoved&&l.allowThresholdMove&&v!==a.touchesDirection&&g&&m&&Math.abs(y)>=1){Object.assign(r,{startX:c,startY:d,currentX:c,currentY:d,startTranslate:l.currentTranslate}),l.loopSwapReset=!0,l.startTranslate=l.currentTranslate;return}a.emit("sliderMove",s),l.isMoved=!0,l.currentTranslate=y+l.startTranslate;let b=!0,x=n.resistanceRatio;if(n.touchReleaseOnEdges&&(x=0),y>0?(g&&m&&l.allowThresholdMove&&l.currentTranslate>(n.centeredSlides?a.minTranslate()-a.slidesSizesGrid[a.activeIndex+1]-(n.slidesPerView!=="auto"&&a.slides.length-n.slidesPerView>=2?a.slidesSizesGrid[a.activeIndex+1]+a.params.spaceBetween:0)-a.params.spaceBetween:a.minTranslate())&&a.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),l.currentTranslate>a.minTranslate()&&(b=!1,n.resistance&&(l.currentTranslate=a.minTranslate()-1+(-a.minTranslate()+l.startTranslate+y)**x))):y<0&&(g&&m&&l.allowThresholdMove&&l.currentTranslate<(n.centeredSlides?a.maxTranslate()+a.slidesSizesGrid[a.slidesSizesGrid.length-1]+a.params.spaceBetween+(n.slidesPerView!=="auto"&&a.slides.length-n.slidesPerView>=2?a.slidesSizesGrid[a.slidesSizesGrid.length-1]+a.params.spaceBetween:0):a.maxTranslate())&&a.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:a.slides.length-(n.slidesPerView==="auto"?a.slidesPerViewDynamic():Math.ceil(parseFloat(n.slidesPerView,10)))}),l.currentTranslate<a.maxTranslate()&&(b=!1,n.resistance&&(l.currentTranslate=a.maxTranslate()+1-(a.maxTranslate()-l.startTranslate-y)**x))),b&&(s.preventedByNestedSwiper=!0),!a.allowSlideNext&&a.swipeDirection==="next"&&l.currentTranslate<l.startTranslate&&(l.currentTranslate=l.startTranslate),!a.allowSlidePrev&&a.swipeDirection==="prev"&&l.currentTranslate>l.startTranslate&&(l.currentTranslate=l.startTranslate),!a.allowSlidePrev&&!a.allowSlideNext&&(l.currentTranslate=l.startTranslate),n.threshold>0)if(Math.abs(y)>n.threshold||l.allowThresholdMove){if(!l.allowThresholdMove){l.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,l.currentTranslate=l.startTranslate,r.diff=a.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY;return}}else{l.currentTranslate=l.startTranslate;return}!n.followFinger||n.cssMode||((n.freeMode&&n.freeMode.enabled&&a.freeMode||n.watchSlidesProgress)&&(a.updateActiveIndex(),a.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&a.freeMode&&a.freeMode.onTouchMove(),a.updateProgress(l.currentTranslate),a.setTranslate(l.currentTranslate))}function $d(e){const t=this,a=t.touchEventsData;let l=e;l.originalEvent&&(l=l.originalEvent);let n;if(l.type==="touchend"||l.type==="touchcancel"){if(n=[...l.changedTouches].find(C=>C.identifier===a.touchId),!n||n.identifier!==a.touchId)return}else{if(a.touchId!==null||l.pointerId!==a.pointerId)return;n=l}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(l.type)&&!(["pointercancel","contextmenu"].includes(l.type)&&(t.browser.isSafari||t.browser.isWebView)))return;a.pointerId=null,a.touchId=null;const{params:i,touches:u,rtlTranslate:s,slidesGrid:o,enabled:c}=t;if(!c||!i.simulateTouch&&l.pointerType==="mouse")return;if(a.allowTouchCallbacks&&t.emit("touchEnd",l),a.allowTouchCallbacks=!1,!a.isTouched){a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,a.startMoving=!1;return}i.grabCursor&&a.isMoved&&a.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=ll(),h=d-a.touchStartTime;if(t.allowClick){const C=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(C&&C[0]||l.target,C),t.emit("tap click",l),h<300&&d-a.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(a.lastClickTime=ll(),Qr(()=>{t.destroyed||(t.allowClick=!0)}),!a.isTouched||!a.isMoved||!t.swipeDirection||u.diff===0&&!a.loopSwapReset||a.currentTranslate===a.startTranslate&&!a.loopSwapReset){a.isTouched=!1,a.isMoved=!1,a.startMoving=!1;return}a.isTouched=!1,a.isMoved=!1,a.startMoving=!1;let f;if(i.followFinger?f=s?t.translate:-t.translate:f=-a.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:f});return}const y=f>=-t.maxTranslate()&&!t.params.loop;let E=0,v=t.slidesSizesGrid[0];for(let C=0;C<o.length;C+=C<i.slidesPerGroupSkip?1:i.slidesPerGroup){const A=C<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;typeof o[C+A]<"u"?(y||f>=o[C]&&f<o[C+A])&&(E=C,v=o[C+A]-o[C]):(y||f>=o[C])&&(E=C,v=o[o.length-1]-o[o.length-2])}let g=null,m=null;i.rewind&&(t.isBeginning?m=i.virtual&&i.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const b=(f-o[E])/v,x=E<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(h>i.longSwipesMs){if(!i.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(b>=i.longSwipesRatio?t.slideTo(i.rewind&&t.isEnd?g:E+x):t.slideTo(E)),t.swipeDirection==="prev"&&(b>1-i.longSwipesRatio?t.slideTo(E+x):m!==null&&b<0&&Math.abs(b)>i.longSwipesRatio?t.slideTo(m):t.slideTo(E))}else{if(!i.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(l.target===t.navigation.nextEl||l.target===t.navigation.prevEl)?l.target===t.navigation.nextEl?t.slideTo(E+x):t.slideTo(E):(t.swipeDirection==="next"&&t.slideTo(g!==null?g:E+x),t.swipeDirection==="prev"&&t.slideTo(m!==null?m:E))}}function ii(){const e=this,{params:t,el:a}=e;if(a&&a.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:l,allowSlidePrev:n,snapGrid:r}=e,i=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const u=i&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!u?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!i?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=n,e.allowSlideNext=l,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function Ud(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function qd(){const e=this,{wrapperEl:t,rtlTranslate:a,enabled:l}=e;if(!l)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let n;const r=e.maxTranslate()-e.minTranslate();r===0?n=0:n=(e.translate-e.minTranslate())/r,n!==e.progress&&e.updateProgress(a?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function zd(e){const t=this;sl(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function Vd(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const ui=(e,t)=>{const a=Dt(),{params:l,el:n,wrapperEl:r,device:i}=e,u=!!l.nested,s=t==="on"?"addEventListener":"removeEventListener",o=t;!n||typeof n=="string"||(a[s]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:u}),n[s]("touchstart",e.onTouchStart,{passive:!1}),n[s]("pointerdown",e.onTouchStart,{passive:!1}),a[s]("touchmove",e.onTouchMove,{passive:!1,capture:u}),a[s]("pointermove",e.onTouchMove,{passive:!1,capture:u}),a[s]("touchend",e.onTouchEnd,{passive:!0}),a[s]("pointerup",e.onTouchEnd,{passive:!0}),a[s]("pointercancel",e.onTouchEnd,{passive:!0}),a[s]("touchcancel",e.onTouchEnd,{passive:!0}),a[s]("pointerout",e.onTouchEnd,{passive:!0}),a[s]("pointerleave",e.onTouchEnd,{passive:!0}),a[s]("contextmenu",e.onTouchEnd,{passive:!0}),(l.preventClicks||l.preventClicksPropagation)&&n[s]("click",e.onClick,!0),l.cssMode&&r[s]("scroll",e.onScroll),l.updateOnWindowResize?e[o](i.ios||i.android?"resize orientationchange observerUpdate":"resize observerUpdate",ii,!0):e[o]("observerUpdate",ii,!0),n[s]("load",e.onLoad,{capture:!0}))};function Gd(){const e=this,{params:t}=e;e.onTouchStart=Rd.bind(e),e.onTouchMove=Hd.bind(e),e.onTouchEnd=$d.bind(e),e.onDocumentTouchStart=Vd.bind(e),t.cssMode&&(e.onScroll=qd.bind(e)),e.onClick=Ud.bind(e),e.onLoad=zd.bind(e),ui(e,"on")}function Yd(){ui(this,"off")}var Wd={attachEvents:Gd,detachEvents:Yd};const si=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function jd(){const e=this,{realIndex:t,initialized:a,params:l,el:n}=e,r=l.breakpoints;if(!r||r&&Object.keys(r).length===0)return;const i=Dt(),u=l.breakpointsBase==="window"||!l.breakpointsBase?l.breakpointsBase:"container",s=["window","container"].includes(l.breakpointsBase)||!l.breakpointsBase?e.el:i.querySelector(l.breakpointsBase),o=e.getBreakpoint(r,u,s);if(!o||e.currentBreakpoint===o)return;const d=(o in r?r[o]:void 0)||e.originalParams,h=si(e,l),f=si(e,d),y=e.params.grabCursor,E=d.grabCursor,v=l.enabled;h&&!f?(n.classList.remove(`${l.containerModifierClass}grid`,`${l.containerModifierClass}grid-column`),e.emitContainerClasses()):!h&&f&&(n.classList.add(`${l.containerModifierClass}grid`),(d.grid.fill&&d.grid.fill==="column"||!d.grid.fill&&l.grid.fill==="column")&&n.classList.add(`${l.containerModifierClass}grid-column`),e.emitContainerClasses()),y&&!E?e.unsetGrabCursor():!y&&E&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(A=>{if(typeof d[A]>"u")return;const O=l[A]&&l[A].enabled,N=d[A]&&d[A].enabled;O&&!N&&e[A].disable(),!O&&N&&e[A].enable()});const g=d.direction&&d.direction!==l.direction,m=l.loop&&(d.slidesPerView!==l.slidesPerView||g),b=l.loop;g&&a&&e.changeDirection(),Qe(e.params,d);const x=e.params.enabled,C=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),v&&!x?e.disable():!v&&x&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",d),a&&(m?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!b&&C?(e.loopCreate(t),e.updateSlides()):b&&!C&&e.loopDestroy()),e.emit("breakpoint",d)}function Kd(e,t="window",a){if(!e||t==="container"&&!a)return;let l=!1;const n=Ge(),r=t==="window"?n.innerHeight:a.clientHeight,i=Object.keys(e).map(u=>{if(typeof u=="string"&&u.indexOf("@")===0){const s=parseFloat(u.substr(1));return{value:r*s,point:u}}return{value:u,point:u}});i.sort((u,s)=>parseInt(u.value,10)-parseInt(s.value,10));for(let u=0;u<i.length;u+=1){const{point:s,value:o}=i[u];t==="window"?n.matchMedia(`(min-width: ${o}px)`).matches&&(l=s):o<=a.clientWidth&&(l=s)}return l||"max"}var Xd={setBreakpoint:jd,getBreakpoint:Kd};function Qd(e,t){const a=[];return e.forEach(l=>{typeof l=="object"?Object.keys(l).forEach(n=>{l[n]&&a.push(t+n)}):typeof l=="string"&&a.push(t+l)}),a}function Jd(){const e=this,{classNames:t,params:a,rtl:l,el:n,device:r}=e,i=Qd(["initialized",a.direction,{"free-mode":e.params.freeMode&&a.freeMode.enabled},{autoheight:a.autoHeight},{rtl:l},{grid:a.grid&&a.grid.rows>1},{"grid-column":a.grid&&a.grid.rows>1&&a.grid.fill==="column"},{android:r.android},{ios:r.ios},{"css-mode":a.cssMode},{centered:a.cssMode&&a.centeredSlides},{"watch-progress":a.watchSlidesProgress}],a.containerModifierClass);t.push(...i),n.classList.add(...t),e.emitContainerClasses()}function Zd(){const e=this,{el:t,classNames:a}=e;!t||typeof t=="string"||(t.classList.remove(...a),e.emitContainerClasses())}var ef={addClasses:Jd,removeClasses:Zd};function tf(){const e=this,{isLocked:t,params:a}=e,{slidesOffsetBefore:l}=a;if(l){const n=e.slides.length-1,r=e.slidesGrid[n]+e.slidesSizesGrid[n]+l*2;e.isLocked=e.size>r}else e.isLocked=e.snapGrid.length===1;a.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),a.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var af={checkOverflow:tf},tn={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function lf(e,t){return function(l={}){const n=Object.keys(l)[0],r=l[n];if(typeof r!="object"||r===null){Qe(t,l);return}if(e[n]===!0&&(e[n]={enabled:!0}),n==="navigation"&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),!(n in e&&"enabled"in r)){Qe(t,l);return}typeof e[n]=="object"&&!("enabled"in e[n])&&(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),Qe(t,l)}}const an={eventsEmitter:ed,update:dd,translate:vd,transition:Td,slide:Nd,loop:Dd,grabCursor:Bd,events:Wd,breakpoints:Xd,checkOverflow:af,classes:ef},ln={};let nn=class Ct{constructor(...t){let a,l;t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?l=t[0]:[a,l]=t,l||(l={}),l=Qe({},l),a&&!l.el&&(l.el=a);const n=Dt();if(l.el&&typeof l.el=="string"&&n.querySelectorAll(l.el).length>1){const s=[];return n.querySelectorAll(l.el).forEach(o=>{const c=Qe({},l,{el:o});s.push(new Ct(c))}),s}const r=this;r.__swiper__=!0,r.support=ei(),r.device=ti({userAgent:l.userAgent}),r.browser=ai(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],l.modules&&Array.isArray(l.modules)&&r.modules.push(...l.modules);const i={};r.modules.forEach(s=>{s({params:l,swiper:r,extendParams:lf(l,i),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const u=Qe({},tn,i);return r.params=Qe({},u,ln,l),r.originalParams=Qe({},r.params),r.passedParams=Qe({},l),r.params&&r.params.on&&Object.keys(r.params.on).forEach(s=>{r.on(s,r.params.on[s])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),Object.assign(r,{enabled:r.params.enabled,el:a,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return r.params.direction==="horizontal"},isVertical(){return r.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:a,params:l}=this,n=st(a,`.${l.slideClass}, swiper-slide`),r=ul(n[0]);return ul(t)-r}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(a=>a.getAttribute("data-swiper-slide-index")*1===t))}getSlideIndexWhenGrid(t){return this.grid&&this.params.grid&&this.params.grid.rows>1&&(this.params.grid.fill==="column"?t=Math.floor(t/this.params.grid.rows):this.params.grid.fill==="row"&&(t=t%Math.ceil(this.slides.length/this.params.grid.rows))),t}recalcSlides(){const t=this,{slidesEl:a,params:l}=t;t.slides=st(a,`.${l.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,a){const l=this;t=Math.min(Math.max(t,0),1);const n=l.minTranslate(),i=(l.maxTranslate()-n)*t+n;l.translateTo(i,typeof a>"u"?0:a),l.updateActiveIndex(),l.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const a=t.el.className.split(" ").filter(l=>l.indexOf("swiper")===0||l.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",a.join(" "))}getSlideClasses(t){const a=this;return a.destroyed?"":t.className.split(" ").filter(l=>l.indexOf("swiper-slide")===0||l.indexOf(a.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const a=[];t.slides.forEach(l=>{const n=t.getSlideClasses(l);a.push({slideEl:l,classNames:n}),t.emit("_slideClass",l,n)}),t.emit("_slideClasses",a)}slidesPerViewDynamic(t="current",a=!1){const l=this,{params:n,slides:r,slidesGrid:i,slidesSizesGrid:u,size:s,activeIndex:o}=l;let c=1;if(typeof n.slidesPerView=="number")return n.slidesPerView;if(n.centeredSlides){let d=r[o]?Math.ceil(r[o].swiperSlideSize):0,h;for(let f=o+1;f<r.length;f+=1)r[f]&&!h&&(d+=Math.ceil(r[f].swiperSlideSize),c+=1,d>s&&(h=!0));for(let f=o-1;f>=0;f-=1)r[f]&&!h&&(d+=r[f].swiperSlideSize,c+=1,d>s&&(h=!0))}else if(t==="current")for(let d=o+1;d<r.length;d+=1)(a?i[d]+u[d]-i[o]<s:i[d]-i[o]<s)&&(c+=1);else for(let d=o-1;d>=0;d-=1)i[o]-i[d]<s&&(c+=1);return c}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:a,params:l}=t;l.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(i=>{i.complete&&sl(t,i)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function n(){const i=t.rtlTranslate?t.translate*-1:t.translate,u=Math.min(Math.max(i,t.maxTranslate()),t.minTranslate());t.setTranslate(u),t.updateActiveIndex(),t.updateSlidesClasses()}let r;if(l.freeMode&&l.freeMode.enabled&&!l.cssMode)n(),l.autoHeight&&t.updateAutoHeight();else{if((l.slidesPerView==="auto"||l.slidesPerView>1)&&t.isEnd&&!l.centeredSlides){const i=t.virtual&&l.virtual.enabled?t.virtual.slides:t.slides;r=t.slideTo(i.length-1,0,!1,!0)}else r=t.slideTo(t.activeIndex,0,!1,!0);r||n()}l.watchOverflow&&a!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,a=!0){const l=this,n=l.params.direction;return t||(t=n==="horizontal"?"vertical":"horizontal"),t===n||t!=="horizontal"&&t!=="vertical"||(l.el.classList.remove(`${l.params.containerModifierClass}${n}`),l.el.classList.add(`${l.params.containerModifierClass}${t}`),l.emitContainerClasses(),l.params.direction=t,l.slides.forEach(r=>{t==="vertical"?r.style.width="":r.style.height=""}),l.emit("changeDirection"),a&&l.update()),l}changeLanguageDirection(t){const a=this;a.rtl&&t==="rtl"||!a.rtl&&t==="ltr"||(a.rtl=t==="rtl",a.rtlTranslate=a.params.direction==="horizontal"&&a.rtl,a.rtl?(a.el.classList.add(`${a.params.containerModifierClass}rtl`),a.el.dir="rtl"):(a.el.classList.remove(`${a.params.containerModifierClass}rtl`),a.el.dir="ltr"),a.update())}mount(t){const a=this;if(a.mounted)return!0;let l=t||a.params.el;if(typeof l=="string"&&(l=document.querySelector(l)),!l)return!1;l.swiper=a,l.parentNode&&l.parentNode.host&&l.parentNode.host.nodeName===a.params.swiperElementNodeName.toUpperCase()&&(a.isElement=!0);const n=()=>`.${(a.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=l&&l.shadowRoot&&l.shadowRoot.querySelector?l.shadowRoot.querySelector(n()):st(l,n())[0];return!i&&a.params.createElements&&(i=il("div",a.params.wrapperClass),l.append(i),st(l,`.${a.params.slideClass}`).forEach(u=>{i.append(u)})),Object.assign(a,{el:l,wrapperEl:i,slidesEl:a.isElement&&!l.parentNode.host.slideSlots?l.parentNode.host:i,hostEl:a.isElement?l.parentNode.host:l,mounted:!0,rtl:l.dir.toLowerCase()==="rtl"||St(l,"direction")==="rtl",rtlTranslate:a.params.direction==="horizontal"&&(l.dir.toLowerCase()==="rtl"||St(l,"direction")==="rtl"),wrongRTL:St(i,"display")==="-webkit-box"}),!0}init(t){const a=this;if(a.initialized||a.mount(t)===!1)return a;a.emit("beforeInit"),a.params.breakpoints&&a.setBreakpoint(),a.addClasses(),a.updateSize(),a.updateSlides(),a.params.watchOverflow&&a.checkOverflow(),a.params.grabCursor&&a.enabled&&a.setGrabCursor(),a.params.loop&&a.virtual&&a.params.virtual.enabled?a.slideTo(a.params.initialSlide+a.virtual.slidesBefore,0,a.params.runCallbacksOnInit,!1,!0):a.slideTo(a.params.initialSlide,0,a.params.runCallbacksOnInit,!1,!0),a.params.loop&&a.loopCreate(void 0,!0),a.attachEvents();const n=[...a.el.querySelectorAll('[loading="lazy"]')];return a.isElement&&n.push(...a.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(r=>{r.complete?sl(a,r):r.addEventListener("load",i=>{sl(a,i.target)})}),en(a),a.initialized=!0,en(a),a.emit("init"),a.emit("afterInit"),a}destroy(t=!0,a=!0){const l=this,{params:n,el:r,wrapperEl:i,slides:u}=l;return typeof l.params>"u"||l.destroyed||(l.emit("beforeDestroy"),l.initialized=!1,l.detachEvents(),n.loop&&l.loopDestroy(),a&&(l.removeClasses(),r&&typeof r!="string"&&r.removeAttribute("style"),i&&i.removeAttribute("style"),u&&u.length&&u.forEach(s=>{s.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),s.removeAttribute("style"),s.removeAttribute("data-swiper-slide-index")})),l.emit("destroy"),Object.keys(l.eventsListeners).forEach(s=>{l.off(s)}),t!==!1&&(l.el&&typeof l.el!="string"&&(l.el.swiper=null),Uc(l)),l.destroyed=!0),null}static extendDefaults(t){Qe(ln,t)}static get extendedDefaults(){return ln}static get defaults(){return tn}static installModule(t){Ct.prototype.__modules__||(Ct.prototype.__modules__=[]);const a=Ct.prototype.__modules__;typeof t=="function"&&a.indexOf(t)<0&&a.push(t)}static use(t){return Array.isArray(t)?(t.forEach(a=>Ct.installModule(a)),Ct):(Ct.installModule(t),Ct)}};Object.keys(an).forEach(e=>{Object.keys(an[e]).forEach(t=>{nn.prototype[t]=an[e][t]})}),nn.use([Jc,Zc]);const oi=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_snapToSlideEdge","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Pt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function jt(e,t){const a=["__proto__","constructor","prototype"];Object.keys(t).filter(l=>a.indexOf(l)<0).forEach(l=>{typeof e[l]>"u"?e[l]=t[l]:Pt(t[l])&&Pt(e[l])&&Object.keys(t[l]).length>0?t[l].__swiper__?e[l]=t[l]:jt(e[l],t[l]):e[l]=t[l]})}function ci(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function di(e={}){return e.pagination&&typeof e.pagination.el>"u"}function fi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function pi(e=""){const t=e.split(" ").map(l=>l.trim()).filter(l=>!!l),a=[];return t.forEach(l=>{a.indexOf(l)<0&&a.push(l)}),a.join(" ")}function nf(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function rf({swiper:e,slides:t,passedParams:a,changedParams:l,nextEl:n,prevEl:r,scrollbarEl:i,paginationEl:u}){const s=l.filter(N=>N!=="children"&&N!=="direction"&&N!=="wrapperClass"),{params:o,pagination:c,navigation:d,scrollbar:h,virtual:f,thumbs:y}=e;let E,v,g,m,b,x,C,A;l.includes("thumbs")&&a.thumbs&&a.thumbs.swiper&&!a.thumbs.swiper.destroyed&&o.thumbs&&(!o.thumbs.swiper||o.thumbs.swiper.destroyed)&&(E=!0),l.includes("controller")&&a.controller&&a.controller.control&&o.controller&&!o.controller.control&&(v=!0),l.includes("pagination")&&a.pagination&&(a.pagination.el||u)&&(o.pagination||o.pagination===!1)&&c&&!c.el&&(g=!0),l.includes("scrollbar")&&a.scrollbar&&(a.scrollbar.el||i)&&(o.scrollbar||o.scrollbar===!1)&&h&&!h.el&&(m=!0),l.includes("navigation")&&a.navigation&&(a.navigation.prevEl||r)&&(a.navigation.nextEl||n)&&(o.navigation||o.navigation===!1)&&d&&!d.prevEl&&!d.nextEl&&(b=!0);const O=N=>{e[N]&&(e[N].destroy(),N==="navigation"?(e.isElement&&(e[N].prevEl.remove(),e[N].nextEl.remove()),o[N].prevEl=void 0,o[N].nextEl=void 0,e[N].prevEl=void 0,e[N].nextEl=void 0):(e.isElement&&e[N].el.remove(),o[N].el=void 0,e[N].el=void 0))};l.includes("loop")&&e.isElement&&(o.loop&&!a.loop?x=!0:!o.loop&&a.loop?C=!0:A=!0),s.forEach(N=>{if(Pt(o[N])&&Pt(a[N]))Object.assign(o[N],a[N]),(N==="navigation"||N==="pagination"||N==="scrollbar")&&"enabled"in a[N]&&!a[N].enabled&&O(N);else{const S=a[N];(S===!0||S===!1)&&(N==="navigation"||N==="pagination"||N==="scrollbar")?S===!1&&O(N):o[N]=a[N]}}),s.includes("controller")&&!v&&e.controller&&e.controller.control&&o.controller&&o.controller.control&&(e.controller.control=o.controller.control),l.includes("children")&&t&&f&&o.virtual.enabled?(f.slides=t,f.update(!0)):l.includes("virtual")&&f&&o.virtual.enabled&&(t&&(f.slides=t),f.update(!0)),l.includes("children")&&t&&o.loop&&(A=!0),E&&y.init()&&y.update(!0),v&&(e.controller.control=o.controller.control),g&&(e.isElement&&(!u||typeof u=="string")&&(u=document.createElement("div"),u.classList.add("swiper-pagination"),u.part.add("pagination"),e.el.appendChild(u)),u&&(o.pagination.el=u),c.init(),c.render(),c.update()),m&&(e.isElement&&(!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-scrollbar"),i.part.add("scrollbar"),e.el.appendChild(i)),i&&(o.scrollbar.el=i),h.init(),h.updateSize(),h.setTranslate()),b&&(e.isElement&&((!n||typeof n=="string")&&(n=document.createElement("div"),n.classList.add("swiper-button-next"),pa(n,e.navigation.arrowSvg),n.part.add("button-next"),e.el.appendChild(n)),(!r||typeof r=="string")&&(r=document.createElement("div"),r.classList.add("swiper-button-prev"),pa(r,e.navigation.arrowSvg),r.part.add("button-prev"),e.el.appendChild(r))),n&&(o.navigation.nextEl=n),r&&(o.navigation.prevEl=r),d.init(),d.update()),l.includes("allowSlideNext")&&(e.allowSlideNext=a.allowSlideNext),l.includes("allowSlidePrev")&&(e.allowSlidePrev=a.allowSlidePrev),l.includes("direction")&&e.changeDirection(a.direction,!1),(x||A)&&e.loopDestroy(),(C||A)&&e.loopCreate(),e.update()}function uf(e={},t=!0){const a={on:{}},l={},n={};jt(a,tn),a._emitClasses=!0,a.init=!1;const r={},i=oi.map(s=>s.replace(/_/,"")),u=Object.assign({},e);return Object.keys(u).forEach(s=>{typeof e[s]>"u"||(i.indexOf(s)>=0?Pt(e[s])?(a[s]={},n[s]={},jt(a[s],e[s]),jt(n[s],e[s])):(a[s]=e[s],n[s]=e[s]):s.search(/on[A-Z]/)===0&&typeof e[s]=="function"?t?l[`${s[2].toLowerCase()}${s.substr(3)}`]=e[s]:a.on[`${s[2].toLowerCase()}${s.substr(3)}`]=e[s]:r[s]=e[s])}),["navigation","pagination","scrollbar"].forEach(s=>{a[s]===!0&&(a[s]={}),a[s]===!1&&delete a[s]}),{params:a,passedParams:n,rest:r,events:l}}function sf({el:e,nextEl:t,prevEl:a,paginationEl:l,scrollbarEl:n,swiper:r},i){ci(i)&&t&&a&&(r.params.navigation.nextEl=t,r.originalParams.navigation.nextEl=t,r.params.navigation.prevEl=a,r.originalParams.navigation.prevEl=a),di(i)&&l&&(r.params.pagination.el=l,r.originalParams.pagination.el=l),fi(i)&&n&&(r.params.scrollbar.el=n,r.originalParams.scrollbar.el=n),r.init(e)}function of(e,t,a,l,n){const r=[];if(!t)return r;const i=s=>{r.indexOf(s)<0&&r.push(s)};if(a&&l){const s=l.map(n),o=a.map(n);s.join("")!==o.join("")&&i("children"),l.length!==a.length&&i("children")}return oi.filter(s=>s[0]==="_").map(s=>s.replace(/_/,"")).forEach(s=>{if(s in e&&s in t)if(Pt(e[s])&&Pt(t[s])){const o=Object.keys(e[s]),c=Object.keys(t[s]);o.length!==c.length?i(s):(o.forEach(d=>{e[s][d]!==t[s][d]&&i(s)}),c.forEach(d=>{e[s][d]!==t[s][d]&&i(s)}))}else e[s]!==t[s]&&i(s)}),r}const cf=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function ol(){return ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},ol.apply(this,arguments)}function hi(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function bi(e){const t=[];return w.Children.toArray(e).forEach(a=>{hi(a)?t.push(a):a.props&&a.props.children&&bi(a.props.children).forEach(l=>t.push(l))}),t}function df(e){const t=[],a={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return w.Children.toArray(e).forEach(l=>{if(hi(l))t.push(l);else if(l.props&&l.props.slot&&a[l.props.slot])a[l.props.slot].push(l);else if(l.props&&l.props.children){const n=bi(l.props.children);n.length>0?n.forEach(r=>t.push(r)):a["container-end"].push(l)}else a["container-end"].push(l)}),{slides:t,slots:a}}function ff(e,t,a){if(!a)return null;const l=c=>{let d=c;return c<0?d=t.length+c:d>=t.length&&(d=d-t.length),d},n=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${a.offset}px`}:{top:`${a.offset}px`},{from:r,to:i}=a,u=e.params.loop?-t.length:0,s=e.params.loop?t.length*2:t.length,o=[];for(let c=u;c<s;c+=1)c>=r&&c<=i&&o.push(t[l(c)]);return o.map((c,d)=>w.cloneElement(c,{swiper:e,style:n,key:c.props.virtualIndex||c.key||`slide-${d}`}))}function ha(e,t){return typeof window>"u"?w.useEffect(e,t):w.useLayoutEffect(e,t)}const mi=w.createContext(null),pf=w.createContext(null),vi=w.forwardRef(({className:e,tag:t="div",wrapperTag:a="div",children:l,onSwiper:n,...r}={},i)=>{let u=!1;const[s,o]=w.useState("swiper"),[c,d]=w.useState(null),[h,f]=w.useState(!1),y=w.useRef(!1),E=w.useRef(null),v=w.useRef(null),g=w.useRef(null),m=w.useRef(null),b=w.useRef(null),x=w.useRef(null),C=w.useRef(null),A=w.useRef(null),{params:O,passedParams:N,rest:S,events:L}=uf(r),{slides:I,slots:M}=df(l),D=()=>{f(!h)};Object.assign(O.on,{_containerClasses($,H){o(H)}});const _=()=>{Object.assign(O.on,L),u=!0;const $={...O};if(delete $.wrapperClass,v.current=new nn($),v.current.virtual&&v.current.params.virtual.enabled){v.current.virtual.slides=I;const H={cache:!1,slides:I,renderExternal:d,renderExternalUpdate:!1};jt(v.current.params.virtual,H),jt(v.current.originalParams.virtual,H)}};E.current||_(),v.current&&v.current.on("_beforeBreakpoint",D);const T=()=>{u||!L||!v.current||Object.keys(L).forEach($=>{v.current.on($,L[$])})},F=()=>{!L||!v.current||Object.keys(L).forEach($=>{v.current.off($,L[$])})};w.useEffect(()=>()=>{v.current&&v.current.off("_beforeBreakpoint",D)}),w.useEffect(()=>{!y.current&&v.current&&(v.current.emitSlidesClasses(),y.current=!0)}),ha(()=>{if(i&&(i.current=E.current),!!E.current)return v.current.destroyed&&_(),sf({el:E.current,nextEl:b.current,prevEl:x.current,paginationEl:C.current,scrollbarEl:A.current,swiper:v.current},O),n&&!v.current.destroyed&&n(v.current),()=>{v.current&&!v.current.destroyed&&v.current.destroy(!0,!1)}},[]),ha(()=>{T();const $=of(N,g.current,I,m.current,H=>H.key);return g.current=N,m.current=I,$.length&&v.current&&!v.current.destroyed&&rf({swiper:v.current,slides:I,passedParams:N,changedParams:$,nextEl:b.current,prevEl:x.current,scrollbarEl:A.current,paginationEl:C.current}),()=>{F()}}),ha(()=>{cf(v.current)},[c]);function V(){return O.virtual?ff(v.current,I,c):I.map(($,H)=>w.cloneElement($,{swiper:v.current,swiperSlideIndex:H}))}return w.createElement(t,ol({ref:E,className:pi(`${s}${e?` ${e}`:""}`)},S),w.createElement(pf.Provider,{value:v.current},M["container-start"],w.createElement(a,{className:nf(O.wrapperClass)},M["wrapper-start"],V(),M["wrapper-end"]),ci(O)&&w.createElement(w.Fragment,null,w.createElement("div",{ref:x,className:"swiper-button-prev"}),w.createElement("div",{ref:b,className:"swiper-button-next"})),fi(O)&&w.createElement("div",{ref:A,className:"swiper-scrollbar"}),di(O)&&w.createElement("div",{ref:C,className:"swiper-pagination"}),M["container-end"]))});vi.displayName="Swiper";const gi=w.forwardRef(({tag:e="div",children:t,className:a="",swiper:l,zoom:n,lazy:r,virtualIndex:i,swiperSlideIndex:u,...s}={},o)=>{const c=w.useRef(null),[d,h]=w.useState("swiper-slide"),[f,y]=w.useState(!1);function E(b,x,C){x===c.current&&h(C)}ha(()=>{if(typeof u<"u"&&(c.current.swiperSlideIndex=u),o&&(o.current=c.current),!(!c.current||!l)){if(l.destroyed){d!=="swiper-slide"&&h("swiper-slide");return}return l.on("_slideClass",E),()=>{l&&l.off("_slideClass",E)}}}),ha(()=>{l&&c.current&&!l.destroyed&&h(l.getSlideClasses(c.current))},[l]);const v={isActive:d.indexOf("swiper-slide-active")>=0,isVisible:d.indexOf("swiper-slide-visible")>=0,isPrev:d.indexOf("swiper-slide-prev")>=0,isNext:d.indexOf("swiper-slide-next")>=0},g=()=>typeof t=="function"?t(v):t,m=()=>{y(!0)};return w.createElement(e,ol({ref:c,className:pi(`${d}${a?` ${a}`:""}`),"data-swiper-slide-index":i,onLoad:m},s),n&&w.createElement(mi.Provider,{value:v},w.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof n=="number"?n:void 0},g(),r&&!f&&w.createElement("div",{className:"swiper-lazy-preloader",ref:b=>{b&&(b.lazyPreloaderManaged=!0)}}))),!n&&w.createElement(mi.Provider,{value:v},g(),r&&!f&&w.createElement("div",{className:"swiper-lazy-preloader",ref:b=>{b&&(b.lazyPreloaderManaged=!0)}})))});gi.displayName="SwiperSlide";function Ei(e,t,a,l){return e.params.createElements&&Object.keys(l).forEach(n=>{if(!a[n]&&a.auto===!0){let r=st(e.el,`.${l[n]}`)[0];r||(r=il("div",l[n]),r.className=l[n],e.el.append(r)),a[n]=r,t[n]=r}}),a}const yi='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function hf({swiper:e,extendParams:t,on:a,emit:l}){t({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null,arrowSvg:yi};function n(f){let y;return f&&typeof f=="string"&&e.isElement&&(y=e.el.querySelector(f)||e.hostEl.querySelector(f),y)?y:(f&&(typeof f=="string"&&(y=[...document.querySelectorAll(f)]),e.params.uniqueNavElements&&typeof f=="string"&&y&&y.length>1&&e.el.querySelectorAll(f).length===1?y=e.el.querySelector(f):y&&y.length===1&&(y=y[0])),f&&!y?f:y)}function r(f,y){const E=e.params.navigation;f=Be(f),f.forEach(v=>{v&&(v.classList[y?"add":"remove"](...E.disabledClass.split(" ")),v.tagName==="BUTTON"&&(v.disabled=y),e.params.watchOverflow&&e.enabled&&v.classList[e.isLocked?"add":"remove"](E.lockClass))})}function i(){const{nextEl:f,prevEl:y}=e.navigation;if(e.params.loop){r(y,!1),r(f,!1);return}r(y,e.isBeginning&&!e.params.rewind),r(f,e.isEnd&&!e.params.rewind)}function u(f){f.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),l("navigationPrev"))}function s(f){f.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),l("navigationNext"))}function o(){const f=e.params.navigation;if(e.params.navigation=Ei(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(f.nextEl||f.prevEl))return;let y=n(f.nextEl),E=n(f.prevEl);Object.assign(e.navigation,{nextEl:y,prevEl:E}),y=Be(y),E=Be(E);const v=(g,m)=>{if(g){if(f.addIcons&&g.matches(".swiper-button-next,.swiper-button-prev")&&!g.querySelector("svg")){const b=document.createElement("div");pa(b,yi),g.appendChild(b.querySelector("svg")),b.remove()}g.addEventListener("click",m==="next"?s:u)}!e.enabled&&g&&g.classList.add(...f.lockClass.split(" "))};y.forEach(g=>v(g,"next")),E.forEach(g=>v(g,"prev"))}function c(){let{nextEl:f,prevEl:y}=e.navigation;f=Be(f),y=Be(y);const E=(v,g)=>{v.removeEventListener("click",g==="next"?s:u),v.classList.remove(...e.params.navigation.disabledClass.split(" "))};f.forEach(v=>E(v,"next")),y.forEach(v=>E(v,"prev"))}a("init",()=>{e.params.navigation.enabled===!1?h():(o(),i())}),a("toEdge fromEdge lock unlock",()=>{i()}),a("destroy",()=>{c()}),a("enable disable",()=>{let{nextEl:f,prevEl:y}=e.navigation;if(f=Be(f),y=Be(y),e.enabled){i();return}[...f,...y].filter(E=>!!E).forEach(E=>E.classList.add(e.params.navigation.lockClass))}),a("click",(f,y)=>{let{nextEl:E,prevEl:v}=e.navigation;E=Be(E),v=Be(v);const g=y.target;let m=v.includes(g)||E.includes(g);if(e.isElement&&!m){const b=y.path||y.composedPath&&y.composedPath();b&&(m=b.find(x=>E.includes(x)||v.includes(x)))}if(e.params.navigation.hideOnClick&&!m){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===g||e.pagination.el.contains(g)))return;let b;E.length?b=E[0].classList.contains(e.params.navigation.hiddenClass):v.length&&(b=v[0].classList.contains(e.params.navigation.hiddenClass)),l(b===!0?"navigationShow":"navigationHide"),[...E,...v].filter(x=>!!x).forEach(x=>x.classList.toggle(e.params.navigation.hiddenClass))}});const d=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),o(),i()},h=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),c()};Object.assign(e.navigation,{enable:d,disable:h,update:i,init:o,destroy:c})}function ba(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function bf({swiper:e,extendParams:t,on:a,emit:l}){const n="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:g=>g,formatFractionTotal:g=>g,bulletClass:`${n}-bullet`,bulletActiveClass:`${n}-bullet-active`,modifierClass:`${n}-`,currentClass:`${n}-current`,totalClass:`${n}-total`,hiddenClass:`${n}-hidden`,progressbarFillClass:`${n}-progressbar-fill`,progressbarOppositeClass:`${n}-progressbar-opposite`,clickableClass:`${n}-clickable`,lockClass:`${n}-lock`,horizontalClass:`${n}-horizontal`,verticalClass:`${n}-vertical`,paginationDisabledClass:`${n}-disabled`}}),e.pagination={el:null,bullets:[]};let r,i=0;function u(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function s(g,m){const{bulletActiveClass:b}=e.params.pagination;g&&(g=g[`${m==="prev"?"previous":"next"}ElementSibling`],g&&(g.classList.add(`${b}-${m}`),g=g[`${m==="prev"?"previous":"next"}ElementSibling`],g&&g.classList.add(`${b}-${m}-${m}`)))}function o(g,m,b){if(g=g%b,m=m%b,m===g+1)return"next";if(m===g-1)return"previous"}function c(g){const m=g.target.closest(ba(e.params.pagination.bulletClass));if(!m)return;g.preventDefault();const b=ul(m)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===b)return;const x=o(e.realIndex,b,e.slides.length);x==="next"?e.slideNext():x==="previous"?e.slidePrev():e.slideToLoop(b)}else e.slideTo(b)}function d(){const g=e.rtl,m=e.params.pagination;if(u())return;let b=e.pagination.el;b=Be(b);let x,C;const A=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,O=e.params.loop?Math.ceil(A/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(C=e.previousRealIndex||0,x=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(x=e.snapIndex,C=e.previousSnapIndex):(C=e.previousIndex||0,x=e.activeIndex||0),m.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const N=e.pagination.bullets;let S,L,I;if(m.dynamicBullets&&(r=jl(N[0],e.isHorizontal()?"width":"height"),b.forEach(M=>{M.style[e.isHorizontal()?"width":"height"]=`${r*(m.dynamicMainBullets+4)}px`}),m.dynamicMainBullets>1&&C!==void 0&&(i+=x-(C||0),i>m.dynamicMainBullets-1?i=m.dynamicMainBullets-1:i<0&&(i=0)),S=Math.max(x-i,0),L=S+(Math.min(N.length,m.dynamicMainBullets)-1),I=(L+S)/2),N.forEach(M=>{const D=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(_=>`${m.bulletActiveClass}${_}`)].map(_=>typeof _=="string"&&_.includes(" ")?_.split(" "):_).flat();M.classList.remove(...D)}),b.length>1)N.forEach(M=>{const D=ul(M);D===x?M.classList.add(...m.bulletActiveClass.split(" ")):e.isElement&&M.setAttribute("part","bullet"),m.dynamicBullets&&(D>=S&&D<=L&&M.classList.add(...`${m.bulletActiveClass}-main`.split(" ")),D===S&&s(M,"prev"),D===L&&s(M,"next"))});else{const M=N[x];if(M&&M.classList.add(...m.bulletActiveClass.split(" ")),e.isElement&&N.forEach((D,_)=>{D.setAttribute("part",_===x?"bullet-active":"bullet")}),m.dynamicBullets){const D=N[S],_=N[L];for(let T=S;T<=L;T+=1)N[T]&&N[T].classList.add(...`${m.bulletActiveClass}-main`.split(" "));s(D,"prev"),s(_,"next")}}if(m.dynamicBullets){const M=Math.min(N.length,m.dynamicMainBullets+4),D=(r*M-r)/2-I*r,_=g?"right":"left";N.forEach(T=>{T.style[e.isHorizontal()?_:"top"]=`${D}px`})}}b.forEach((N,S)=>{if(m.type==="fraction"&&(N.querySelectorAll(ba(m.currentClass)).forEach(L=>{L.textContent=m.formatFractionCurrent(x+1)}),N.querySelectorAll(ba(m.totalClass)).forEach(L=>{L.textContent=m.formatFractionTotal(O)})),m.type==="progressbar"){let L;m.progressbarOpposite?L=e.isHorizontal()?"vertical":"horizontal":L=e.isHorizontal()?"horizontal":"vertical";const I=(x+1)/O;let M=1,D=1;L==="horizontal"?M=I:D=I,N.querySelectorAll(ba(m.progressbarFillClass)).forEach(_=>{_.style.transform=`translate3d(0,0,0) scaleX(${M}) scaleY(${D})`,_.style.transitionDuration=`${e.params.speed}ms`})}m.type==="custom"&&m.renderCustom?(pa(N,m.renderCustom(e,x+1,O)),S===0&&l("paginationRender",N)):(S===0&&l("paginationRender",N),l("paginationUpdate",N)),e.params.watchOverflow&&e.enabled&&N.classList[e.isLocked?"add":"remove"](m.lockClass)})}function h(){const g=e.params.pagination;if(u())return;const m=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let b=e.pagination.el;b=Be(b);let x="";if(g.type==="bullets"){let C=e.params.loop?Math.ceil(m/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&C>m&&(C=m);for(let A=0;A<C;A+=1)g.renderBullet?x+=g.renderBullet.call(e,A,g.bulletClass):x+=`<${g.bulletElement} ${e.isElement?'part="bullet"':""} class="${g.bulletClass}"></${g.bulletElement}>`}g.type==="fraction"&&(g.renderFraction?x=g.renderFraction.call(e,g.currentClass,g.totalClass):x=`<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`),g.type==="progressbar"&&(g.renderProgressbar?x=g.renderProgressbar.call(e,g.progressbarFillClass):x=`<span class="${g.progressbarFillClass}"></span>`),e.pagination.bullets=[],b.forEach(C=>{g.type!=="custom"&&pa(C,x||""),g.type==="bullets"&&e.pagination.bullets.push(...C.querySelectorAll(ba(g.bulletClass)))}),g.type!=="custom"&&l("paginationRender",b[0])}function f(){e.params.pagination=Ei(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const g=e.params.pagination;if(!g.el)return;let m;typeof g.el=="string"&&e.isElement&&(m=e.el.querySelector(g.el)),!m&&typeof g.el=="string"&&(m=[...document.querySelectorAll(g.el)]),m||(m=g.el),!(!m||m.length===0)&&(e.params.uniqueNavElements&&typeof g.el=="string"&&Array.isArray(m)&&m.length>1&&(m=[...e.el.querySelectorAll(g.el)],m.length>1&&(m=m.find(b=>Zr(b,".swiper")[0]===e.el))),Array.isArray(m)&&m.length===1&&(m=m[0]),Object.assign(e.pagination,{el:m}),m=Be(m),m.forEach(b=>{g.type==="bullets"&&g.clickable&&b.classList.add(...(g.clickableClass||"").split(" ")),b.classList.add(g.modifierClass+g.type),b.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.type==="bullets"&&g.dynamicBullets&&(b.classList.add(`${g.modifierClass}${g.type}-dynamic`),i=0,g.dynamicMainBullets<1&&(g.dynamicMainBullets=1)),g.type==="progressbar"&&g.progressbarOpposite&&b.classList.add(g.progressbarOppositeClass),g.clickable&&b.addEventListener("click",c),e.enabled||b.classList.add(g.lockClass)}))}function y(){const g=e.params.pagination;if(u())return;let m=e.pagination.el;m&&(m=Be(m),m.forEach(b=>{b.classList.remove(g.hiddenClass),b.classList.remove(g.modifierClass+g.type),b.classList.remove(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.clickable&&(b.classList.remove(...(g.clickableClass||"").split(" ")),b.removeEventListener("click",c))})),e.pagination.bullets&&e.pagination.bullets.forEach(b=>b.classList.remove(...g.bulletActiveClass.split(" ")))}a("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const g=e.params.pagination;let{el:m}=e.pagination;m=Be(m),m.forEach(b=>{b.classList.remove(g.horizontalClass,g.verticalClass),b.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass)})}),a("init",()=>{e.params.pagination.enabled===!1?v():(f(),h(),d())}),a("activeIndexChange",()=>{typeof e.snapIndex>"u"&&d()}),a("snapIndexChange",()=>{d()}),a("snapGridLengthChange",()=>{h(),d()}),a("destroy",()=>{y()}),a("enable disable",()=>{let{el:g}=e.pagination;g&&(g=Be(g),g.forEach(m=>m.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),a("lock unlock",()=>{d()}),a("click",(g,m)=>{const b=m.target,x=Be(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&x&&x.length>0&&!b.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&b===e.navigation.nextEl||e.navigation.prevEl&&b===e.navigation.prevEl))return;const C=x[0].classList.contains(e.params.pagination.hiddenClass);l(C===!0?"paginationShow":"paginationHide"),x.forEach(A=>A.classList.toggle(e.params.pagination.hiddenClass))}});const E=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Be(g),g.forEach(m=>m.classList.remove(e.params.pagination.paginationDisabledClass))),f(),h(),d()},v=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Be(g),g.forEach(m=>m.classList.add(e.params.pagination.paginationDisabledClass))),y()};Object.assign(e.pagination,{enable:E,disable:v,render:h,update:d,init:f,destroy:y})}function Iy(){}function Ly(){}function Ti(e){const t=[],a=String(e||"");let l=a.indexOf(","),n=0,r=!1;for(;!r;){l===-1&&(l=a.length,r=!0);const i=a.slice(n,l).trim();(i||!r)&&t.push(i),n=l+1,l=a.indexOf(",",n)}return t}function xi(e,t){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const mf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gf={};function Ci(e,t){return(gf.jsx?vf:mf).test(e)}const Ef=/[ \t\n\f\r]/g;function yf(e){return typeof e=="object"?e.type==="text"?Si(e.value):!1:Si(e)}function Si(e){return e.replace(Ef,"")===""}class ma{constructor(t,a,l){this.normal=a,this.property=t,l&&(this.space=l)}}ma.prototype.normal={},ma.prototype.property={},ma.prototype.space=void 0;function Ai(e,t){const a={},l={};for(const n of e)Object.assign(a,n.property),Object.assign(l,n.normal);return new ma(a,l,t)}function va(e){return e.toLowerCase()}class je{constructor(t,a){this.attribute=a,this.property=t}}je.prototype.attribute="",je.prototype.booleanish=!1,je.prototype.boolean=!1,je.prototype.commaOrSpaceSeparated=!1,je.prototype.commaSeparated=!1,je.prototype.defined=!1,je.prototype.mustUseProperty=!1,je.prototype.number=!1,je.prototype.overloadedBoolean=!1,je.prototype.property="",je.prototype.spaceSeparated=!1,je.prototype.space=void 0;let Tf=0;const me=Mt(),Me=Mt(),rn=Mt(),ae=Mt(),ke=Mt(),Kt=Mt(),Je=Mt();function Mt(){return 2**++Tf}const un=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:Me,commaOrSpaceSeparated:Je,commaSeparated:Kt,number:ae,overloadedBoolean:rn,spaceSeparated:ke},Symbol.toStringTag,{value:"Module"})),sn=Object.keys(un);class on extends je{constructor(t,a,l,n){let r=-1;if(super(t,a),wi(this,"space",n),typeof l=="number")for(;++r<sn.length;){const i=sn[r];wi(this,sn[r],(l&un[i])===un[i])}}}on.prototype.defined=!0;function wi(e,t,a){a&&(e[t]=a)}function Xt(e){const t={},a={};for(const[l,n]of Object.entries(e.properties)){const r=new on(l,e.transform(e.attributes||{},l),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),t[l]=r,a[va(l)]=l,a[va(r.attribute)]=l}return new ma(t,a,e.space)}const _i=Xt({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:ke,ariaCurrent:null,ariaDescribedBy:ke,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:ke,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:ke,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ke,ariaLevel:ae,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:ke,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:ke,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:Me,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ki(e,t){return t in e?e[t]:t}function Ni(e,t){return ki(e,t.toLowerCase())}const xf=Xt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Kt,acceptCharset:ke,accessKey:ke,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:ke,autoFocus:me,autoPlay:me,blocking:ke,capture:null,charSet:null,checked:me,cite:null,className:ke,cols:ae,colSpan:null,content:null,contentEditable:Me,controls:me,controlsList:ke,coords:ae|Kt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:rn,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:ke,height:ae,hidden:rn,high:ae,href:null,hrefLang:null,htmlFor:ke,httpEquiv:ke,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:ke,itemRef:ke,itemScope:me,itemType:ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:me,optimum:ae,pattern:null,ping:ke,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:ke,required:me,reversed:me,rows:ae,rowSpan:ae,sandbox:ke,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:Me,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ke,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:Ni}),Cf=Xt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Je,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:ke,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Kt,g2:Kt,glyphName:Kt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Je,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Je,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Je,rev:Je,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Je,requiredFeatures:Je,requiredFonts:Je,requiredFormats:Je,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Je,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Je,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Je,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ki}),Ii=Xt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Li=Xt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ni}),Oi=Xt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Sf={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Af=/[A-Z]/g,Di=/-[a-z]/g,wf=/^data[-\w.:]+$/i;function cl(e,t){const a=va(t);let l=t,n=je;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&wf.test(t)){if(t.charAt(4)==="-"){const r=t.slice(5).replace(Di,kf);l="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=t.slice(4);if(!Di.test(r)){let i=r.replace(Af,_f);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=on}return new n(l,t)}function _f(e){return"-"+e.toLowerCase()}function kf(e){return e.charAt(1).toUpperCase()}const ga=Ai([_i,xf,Ii,Li,Oi],"html"),At=Ai([_i,Cf,Ii,Li,Oi],"svg");function Pi(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Mi(e){return e.join(" ").trim()}function cn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qt={},dn,Bi;function Nf(){if(Bi)return dn;Bi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,u=/^\s+|\s+$/g,s=`
|
|
43
43
|
`,o="/",c="*",d="",h="comment",f="declaration";function y(v,g){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];g=g||{};var m=1,b=1;function x(_){var T=_.match(t);T&&(m+=T.length);var F=_.lastIndexOf(s);b=~F?_.length-F:b+_.length}function C(){var _={line:m,column:b};return function(T){return T.position=new A(_),S(),T}}function A(_){this.start=_,this.end={line:m,column:b},this.source=g.source}A.prototype.content=v;function O(_){var T=new Error(g.source+":"+m+":"+b+": "+_);if(T.reason=_,T.filename=g.source,T.line=m,T.column=b,T.source=v,!g.silent)throw T}function N(_){var T=_.exec(v);if(T){var F=T[0];return x(F),v=v.slice(F.length),T}}function S(){N(a)}function L(_){var T;for(_=_||[];T=I();)T!==!1&&_.push(T);return _}function I(){var _=C();if(!(o!=v.charAt(0)||c!=v.charAt(1))){for(var T=2;d!=v.charAt(T)&&(c!=v.charAt(T)||o!=v.charAt(T+1));)++T;if(T+=2,d===v.charAt(T-1))return O("End of comment missing");var F=v.slice(2,T-2);return b+=2,x(F),v=v.slice(T),b+=2,_({type:h,comment:F})}}function M(){var _=C(),T=N(l);if(T){if(I(),!N(n))return O("property missing ':'");var F=N(r),V=_({type:f,property:E(T[0].replace(e,d)),value:F?E(F[0].replace(e,d)):d});return N(i),V}}function D(){var _=[];L(_);for(var T;T=M();)T!==!1&&(_.push(T),L(_));return _}return S(),D()}function E(v){return v?v.replace(u,d):d}return dn=y,dn}var Fi;function If(){if(Fi)return Qt;Fi=1;var e=Qt&&Qt.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=a;const t=e(Nf());function a(l,n){let r=null;if(!l||typeof l!="string")return r;const i=(0,t.default)(l),u=typeof n=="function";return i.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:c}=s;u?n(o,c,s):c&&(r=r||{},r[o]=c)}),r}return Qt}var Ea={},Ri;function Lf(){if(Ri)return Ea;Ri=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,a=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,n=/^-(ms)-/,r=function(o){return!o||a.test(o)||e.test(o)},i=function(o,c){return c.toUpperCase()},u=function(o,c){return"".concat(c,"-")},s=function(o,c){return c===void 0&&(c={}),r(o)?o:(o=o.toLowerCase(),c.reactCompat?o=o.replace(n,u):o=o.replace(l,u),o.replace(t,i))};return Ea.camelCase=s,Ea}var ya,Hi;function Of(){if(Hi)return ya;Hi=1;var e=ya&&ya.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},t=e(If()),a=Lf();function l(n,r){var i={};return!n||typeof n!="string"||(0,t.default)(n,function(u,s){u&&s&&(i[(0,a.camelCase)(u,r)]=s)}),i}return l.default=l,ya=l,ya}var Df=Of();const Pf=cn(Df),dl=$i("end"),ot=$i("start");function $i(e){return t;function t(a){const l=a&&a.position&&a.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function Ui(e){const t=ot(e),a=dl(e);if(t&&a)return{start:t,end:a}}function Ta(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qi(e.position):"start"in e||"end"in e?qi(e):"line"in e||"column"in e?fn(e):""}function fn(e){return zi(e&&e.line)+":"+zi(e&&e.column)}function qi(e){return fn(e&&e.start)+"-"+fn(e&&e.end)}function zi(e){return e&&typeof e=="number"?e:1}class qe extends Error{constructor(t,a,l){super(),typeof a=="string"&&(l=a,a=void 0);let n="",r={},i=!1;if(a&&("line"in a&&"column"in a?r={place:a}:"start"in a&&"end"in a?r={place:a}:"type"in a?r={ancestors:[a],place:a.position}:r={...a}),typeof t=="string"?n=t:!r.cause&&t&&(i=!0,n=t.message,r.cause=t),!r.ruleId&&!r.source&&typeof l=="string"){const s=l.indexOf(":");s===-1?r.ruleId=l:(r.source=l.slice(0,s),r.ruleId=l.slice(s+1))}if(!r.place&&r.ancestors&&r.ancestors){const s=r.ancestors[r.ancestors.length-1];s&&(r.place=s.position)}const u=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=u?u.line:void 0,this.name=Ta(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=i&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qe.prototype.file="",qe.prototype.name="",qe.prototype.reason="",qe.prototype.message="",qe.prototype.stack="",qe.prototype.column=void 0,qe.prototype.line=void 0,qe.prototype.ancestors=void 0,qe.prototype.cause=void 0,qe.prototype.fatal=void 0,qe.prototype.place=void 0,qe.prototype.ruleId=void 0,qe.prototype.source=void 0;const pn={}.hasOwnProperty,Mf=new Map,Bf=/[A-Z]/g,Ff=new Set(["table","tbody","thead","tfoot","tr"]),Rf=new Set(["td","th"]),Vi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Hf(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=t.filePath||void 0;let l;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=Wf(a,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=Yf(a,t.jsx,t.jsxs)}const n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:l,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?At:ga,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},r=Gi(n,e,void 0);return r&&typeof r!="string"?r:n.create(e,n.Fragment,{children:r||void 0},void 0)}function Gi(e,t,a){if(t.type==="element")return $f(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Uf(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zf(e,t,a);if(t.type==="mdxjsEsm")return qf(e,t);if(t.type==="root")return Vf(e,t,a);if(t.type==="text")return Gf(e,t)}function $f(e,t,a){const l=e.schema;let n=l;t.tagName.toLowerCase()==="svg"&&l.space==="html"&&(n=At,e.schema=n),e.ancestors.push(t);const r=Wi(e,t.tagName,!1),i=jf(e,t);let u=bn(e,t);return Ff.has(t.tagName)&&(u=u.filter(function(s){return typeof s=="string"?!yf(s):!0})),Yi(e,i,r,t),hn(i,u),e.ancestors.pop(),e.schema=l,e.create(t,r,i,a)}function Uf(e,t){if(t.data&&t.data.estree&&e.evaluater){const l=t.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}xa(e,t.position)}function qf(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xa(e,t.position)}function zf(e,t,a){const l=e.schema;let n=l;t.name==="svg"&&l.space==="html"&&(n=At,e.schema=n),e.ancestors.push(t);const r=t.name===null?e.Fragment:Wi(e,t.name,!0),i=Kf(e,t),u=bn(e,t);return Yi(e,i,r,t),hn(i,u),e.ancestors.pop(),e.schema=l,e.create(t,r,i,a)}function Vf(e,t,a){const l={};return hn(l,bn(e,t)),e.create(t,e.Fragment,l,a)}function Gf(e,t){return t.value}function Yi(e,t,a,l){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=l)}function hn(e,t){if(t.length>0){const a=t.length>1?t:t[0];a&&(e.children=a)}}function Yf(e,t,a){return l;function l(n,r,i,u){const o=Array.isArray(i.children)?a:t;return u?o(r,i,u):o(r,i)}}function Wf(e,t){return a;function a(l,n,r,i){const u=Array.isArray(r.children),s=ot(l);return t(n,r,i,u,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function jf(e,t){const a={};let l,n;for(n in t.properties)if(n!=="children"&&pn.call(t.properties,n)){const r=Xf(e,n,t.properties[n]);if(r){const[i,u]=r;e.tableCellAlignToStyle&&i==="align"&&typeof u=="string"&&Rf.has(t.tagName)?l=u:a[i]=u}}if(l){const r=a.style||(a.style={});r[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return a}function Kf(e,t){const a={};for(const l of t.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const r=l.data.estree.body[0];r.type;const i=r.expression;i.type;const u=i.properties[0];u.type,Object.assign(a,e.evaluater.evaluateExpression(u.argument))}else xa(e,t.position);else{const n=l.name;let r;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const u=l.value.data.estree.body[0];u.type,r=e.evaluater.evaluateExpression(u.expression)}else xa(e,t.position);else r=l.value===null?!0:l.value;a[n]=r}return a}function bn(e,t){const a=[];let l=-1;const n=e.passKeys?new Map:Mf;for(;++l<t.children.length;){const r=t.children[l];let i;if(e.passKeys){const s=r.type==="element"?r.tagName:r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement"?r.name:void 0;if(s){const o=n.get(s)||0;i=s+"-"+o,n.set(s,o+1)}}const u=Gi(e,r,i);u!==void 0&&a.push(u)}return a}function Xf(e,t,a){const l=cl(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=l.commaSeparated?xi(a):Mi(a)),l.property==="style"){let n=typeof a=="object"?a:Qf(e,String(a));return e.stylePropertyNameCase==="css"&&(n=Jf(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&l.space?Sf[l.property]||l.property:l.attribute,a]}}function Qf(e,t){try{return Pf(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const l=a,n=new qe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Vi+"#cannot-parse-style-attribute",n}}function Wi(e,t,a){let l;if(!a)l={type:"Literal",value:t};else if(t.includes(".")){const n=t.split(".");let r=-1,i;for(;++r<n.length;){const u=Ci(n[r])?{type:"Identifier",name:n[r]}:{type:"Literal",value:n[r]};i=i?{type:"MemberExpression",object:i,property:u,computed:!!(r&&u.type==="Literal"),optional:!1}:u}l=i}else l=Ci(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(l.type==="Literal"){const n=l.value;return pn.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(l);xa(e)}function xa(e,t){const a=new qe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Vi+"#cannot-handle-mdx-estrees-without-createevaluater",a}function Jf(e){const t={};let a;for(a in e)pn.call(e,a)&&(t[Zf(a)]=e[a]);return t}function Zf(e){let t=e.replace(Bf,ep);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ep(e){return"-"+e.toLowerCase()}const mn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},tp={};function ap(e,t){const a=tp,l=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,n=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return ji(e,l,n)}function ji(e,t,a){if(lp(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ki(e.children,t,a)}return Array.isArray(e)?Ki(e,t,a):""}function Ki(e,t,a){const l=[];let n=-1;for(;++n<e.length;)l[n]=ji(e[n],t,a);return l.join("")}function lp(e){return!!(e&&typeof e=="object")}const Xi=document.createElement("i");function Ca(e){const t="&"+e+";";Xi.innerHTML=t;const a=Xi.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}function ct(e,t,a,l){const n=e.length;let r=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,a=a>0?a:0,l.length<1e4)i=Array.from(l),i.unshift(t,a),e.splice(...i);else for(a&&e.splice(t,a);r<l.length;)i=l.slice(r,r+1e4),i.unshift(t,0),e.splice(...i),r+=1e4,t+=1e4}function tt(e,t){return e.length>0?(ct(e,e.length,0,t),e):t}const Qi={}.hasOwnProperty;function np(e){const t={};let a=-1;for(;++a<e.length;)rp(t,e[a]);return t}function rp(e,t){let a;for(a in t){const n=(Qi.call(e,a)?e[a]:void 0)||(e[a]={}),r=t[a];let i;if(r)for(i in r){Qi.call(n,i)||(n[i]=[]);const u=r[i];ip(n[i],Array.isArray(u)?u:u?[u]:[])}}}function ip(e,t){let a=-1;const l=[];for(;++a<t.length;)(t[a].add==="after"?e:l).push(t[a]);ct(e,0,0,l)}function Ji(e,t){const a=Number.parseInt(e,t);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function Jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dt=wt(/[A-Za-z]/),Ze=wt(/[\dA-Za-z]/),up=wt(/[#-'*+\--9=?A-Z^-~]/);function vn(e){return e!==null&&(e<32||e===127)}const gn=wt(/\d/),sp=wt(/[\dA-Fa-f]/),op=wt(/[!-/:-@[-`{-~]/);function se(e){return e!==null&&e<-2}function Oe(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const Sa=wt(new RegExp("\\p{P}|\\p{S}","u")),Aa=wt(/\s/);function wt(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function Zt(e){const t=[];let a=-1,l=0,n=0;for(;++a<e.length;){const r=e.charCodeAt(a);let i="";if(r===37&&Ze(e.charCodeAt(a+1))&&Ze(e.charCodeAt(a+2)))n=2;else if(r<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))||(i=String.fromCharCode(r));else if(r>55295&&r<57344){const u=e.charCodeAt(a+1);r<56320&&u>56319&&u<57344?(i=String.fromCharCode(r,u),n=1):i="�"}else i=String.fromCharCode(r);i&&(t.push(e.slice(l,a),encodeURIComponent(i)),l=a+n+1,i=""),n&&(a+=n,n=0)}return t.join("")+e.slice(l)}function Se(e,t,a,l){const n=l?l-1:Number.POSITIVE_INFINITY;let r=0;return i;function i(s){return Ce(s)?(e.enter(a),u(s)):t(s)}function u(s){return Ce(s)&&r++<n?(e.consume(s),u):(e.exit(a),t(s))}}const cp={tokenize:dp};function dp(e){const t=e.attempt(this.parser.constructs.contentInitial,l,n);let a;return t;function l(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Se(e,t,"linePrefix")}function n(u){return e.enter("paragraph"),r(u)}function r(u){const s=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=s),a=s,i(u)}function i(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return se(u)?(e.consume(u),e.exit("chunkText"),r):(e.consume(u),i)}}const fp={tokenize:pp},Zi={tokenize:hp};function pp(e){const t=this,a=[];let l=0,n,r,i;return u;function u(b){if(l<a.length){const x=a[l];return t.containerState=x[1],e.attempt(x[0].continuation,s,o)(b)}return o(b)}function s(b){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&m();const x=t.events.length;let C=x,A;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){A=t.events[C][1].end;break}g(l);let O=x;for(;O<t.events.length;)t.events[O][1].end={...A},O++;return ct(t.events,C+1,0,t.events.slice(x)),t.events.length=O,o(b)}return u(b)}function o(b){if(l===a.length){if(!n)return h(b);if(n.currentConstruct&&n.currentConstruct.concrete)return y(b);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zi,c,d)(b)}function c(b){return n&&m(),g(l),h(b)}function d(b){return t.parser.lazy[t.now().line]=l!==a.length,i=t.now().offset,y(b)}function h(b){return t.containerState={},e.attempt(Zi,f,y)(b)}function f(b){return l++,a.push([t.currentConstruct,t.containerState]),h(b)}function y(b){if(b===null){n&&m(),g(0),e.consume(b);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:r}),E(b)}function E(b){if(b===null){v(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return se(b)?(e.consume(b),v(e.exit("chunkFlow")),l=0,t.interrupt=void 0,u):(e.consume(b),E)}function v(b,x){const C=t.sliceStream(b);if(x&&C.push(null),b.previous=r,r&&(r.next=b),r=b,n.defineSkip(b.start),n.write(C),t.parser.lazy[b.start.line]){let A=n.events.length;for(;A--;)if(n.events[A][1].start.offset<i&&(!n.events[A][1].end||n.events[A][1].end.offset>i))return;const O=t.events.length;let N=O,S,L;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(S){L=t.events[N][1].end;break}S=!0}for(g(l),A=O;A<t.events.length;)t.events[A][1].end={...L},A++;ct(t.events,N+1,0,t.events.slice(O)),t.events.length=A}}function g(b){let x=a.length;for(;x-- >b;){const C=a[x];t.containerState=C[1],C[0].exit.call(t,e)}a.length=b}function m(){n.write([null]),r=void 0,n=void 0,t.containerState._closeFlow=void 0}}function hp(e,t,a){return Se(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function eu(e){if(e===null||Oe(e)||Aa(e))return 1;if(Sa(e))return 2}function En(e,t,a){const l=[];let n=-1;for(;++n<e.length;){const r=e[n].resolveAll;r&&!l.includes(r)&&(t=r(t,a),l.push(r))}return t}const yn={name:"attention",resolveAll:bp,tokenize:mp};function bp(e,t){let a=-1,l,n,r,i,u,s,o,c;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(l=a;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&t.sliceSerialize(e[l][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[l][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;s=e[l][1].end.offset-e[l][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const d={...e[l][1].end},h={...e[a][1].start};tu(d,-s),tu(h,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[l][1].end}},u={type:s>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:h},r={type:s>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[a][1].start}},n={type:s>1?"strong":"emphasis",start:{...i.start},end:{...u.end}},e[l][1].end={...i.start},e[a][1].start={...u.end},o=[],e[l][1].end.offset-e[l][1].start.offset&&(o=tt(o,[["enter",e[l][1],t],["exit",e[l][1],t]])),o=tt(o,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",r,t]]),o=tt(o,En(t.parser.constructs.insideSpan.null,e.slice(l+1,a),t)),o=tt(o,[["exit",r,t],["enter",u,t],["exit",u,t],["exit",n,t]]),e[a][1].end.offset-e[a][1].start.offset?(c=2,o=tt(o,[["enter",e[a][1],t],["exit",e[a][1],t]])):c=0,ct(e,l-1,a-l+3,o),a=l+o.length-c-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function mp(e,t){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,n=eu(l);let r;return i;function i(s){return r=s,e.enter("attentionSequence"),u(s)}function u(s){if(s===r)return e.consume(s),u;const o=e.exit("attentionSequence"),c=eu(s),d=!c||c===2&&n||a.includes(s),h=!n||n===2&&c||a.includes(l);return o._open=!!(r===42?d:d&&(n||!h)),o._close=!!(r===42?h:h&&(c||!d)),t(s)}}function tu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vp={name:"autolink",tokenize:gp};function gp(e,t,a){let l=0;return n;function n(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r}function r(f){return dt(f)?(e.consume(f),i):f===64?a(f):o(f)}function i(f){return f===43||f===45||f===46||Ze(f)?(l=1,u(f)):o(f)}function u(f){return f===58?(e.consume(f),l=0,s):(f===43||f===45||f===46||Ze(f))&&l++<32?(e.consume(f),u):(l=0,o(f))}function s(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||vn(f)?a(f):(e.consume(f),s)}function o(f){return f===64?(e.consume(f),c):up(f)?(e.consume(f),o):a(f)}function c(f){return Ze(f)?d(f):a(f)}function d(f){return f===46?(e.consume(f),l=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||Ze(f))&&l++<63){const y=f===45?h:d;return e.consume(f),y}return a(f)}}const fl={partial:!0,tokenize:Ep};function Ep(e,t,a){return l;function l(r){return Ce(r)?Se(e,n,"linePrefix")(r):n(r)}function n(r){return r===null||se(r)?t(r):a(r)}}const au={continuation:{tokenize:Tp},exit:xp,name:"blockQuote",tokenize:yp};function yp(e,t,a){const l=this;return n;function n(i){if(i===62){const u=l.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),r}return a(i)}function r(i){return Ce(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function Tp(e,t,a){const l=this;return n;function n(i){return Ce(i)?Se(e,r,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):r(i)}function r(i){return e.attempt(au,t,a)(i)}}function xp(e){e.exit("blockQuote")}const lu={name:"characterEscape",tokenize:Cp};function Cp(e,t,a){return l;function l(r){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(r),e.exit("escapeMarker"),n}function n(r){return op(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(r)}}const nu={name:"characterReference",tokenize:Sp};function Sp(e,t,a){const l=this;let n=0,r,i;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),s}function s(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),o):(e.enter("characterReferenceValue"),r=31,i=Ze,c(d))}function o(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=sp,c):(e.enter("characterReferenceValue"),r=7,i=gn,c(d))}function c(d){if(d===59&&n){const h=e.exit("characterReferenceValue");return i===Ze&&!Ca(l.sliceSerialize(h))?a(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(d)&&n++<r?(e.consume(d),c):a(d)}}const ru={partial:!0,tokenize:wp},iu={concrete:!0,name:"codeFenced",tokenize:Ap};function Ap(e,t,a){const l=this,n={partial:!0,tokenize:C};let r=0,i=0,u;return s;function s(A){return o(A)}function o(A){const O=l.events[l.events.length-1];return r=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===u?(i++,e.consume(A),c):i<3?a(A):(e.exit("codeFencedFenceSequence"),Ce(A)?Se(e,d,"whitespace")(A):d(A))}function d(A){return A===null||se(A)?(e.exit("codeFencedFence"),l.interrupt?t(A):e.check(ru,E,x)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===null||se(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(A)):Ce(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Se(e,f,"whitespace")(A)):A===96&&A===u?a(A):(e.consume(A),h)}function f(A){return A===null||se(A)?d(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||se(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(A)):A===96&&A===u?a(A):(e.consume(A),y)}function E(A){return e.attempt(n,x,v)(A)}function v(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),g}function g(A){return r>0&&Ce(A)?Se(e,m,"linePrefix",r+1)(A):m(A)}function m(A){return A===null||se(A)?e.check(ru,E,x)(A):(e.enter("codeFlowValue"),b(A))}function b(A){return A===null||se(A)?(e.exit("codeFlowValue"),m(A)):(e.consume(A),b)}function x(A){return e.exit("codeFenced"),t(A)}function C(A,O,N){let S=0;return L;function L(T){return A.enter("lineEnding"),A.consume(T),A.exit("lineEnding"),I}function I(T){return A.enter("codeFencedFence"),Ce(T)?Se(A,M,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):M(T)}function M(T){return T===u?(A.enter("codeFencedFenceSequence"),D(T)):N(T)}function D(T){return T===u?(S++,A.consume(T),D):S>=i?(A.exit("codeFencedFenceSequence"),Ce(T)?Se(A,_,"whitespace")(T):_(T)):N(T)}function _(T){return T===null||se(T)?(A.exit("codeFencedFence"),O(T)):N(T)}}}function wp(e,t,a){const l=this;return n;function n(i){return i===null?a(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r)}function r(i){return l.parser.lazy[l.now().line]?a(i):t(i)}}const Tn={name:"codeIndented",tokenize:kp},_p={partial:!0,tokenize:Np};function kp(e,t,a){const l=this;return n;function n(o){return e.enter("codeIndented"),Se(e,r,"linePrefix",5)(o)}function r(o){const c=l.events[l.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(o):a(o)}function i(o){return o===null?s(o):se(o)?e.attempt(_p,i,s)(o):(e.enter("codeFlowValue"),u(o))}function u(o){return o===null||se(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),u)}function s(o){return e.exit("codeIndented"),t(o)}}function Np(e,t,a){const l=this;return n;function n(i){return l.parser.lazy[l.now().line]?a(i):se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):Se(e,r,"linePrefix",5)(i)}function r(i){const u=l.events[l.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(i):se(i)?n(i):a(i)}}const Ip={name:"codeText",previous:Op,resolve:Lp,tokenize:Dp};function Lp(e){let t=e.length-4,a=3,l,n;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(l=a;++l<t;)if(e[l][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(l=a-1,t++;++l<=t;)n===void 0?l!==t&&e[l][1].type!=="lineEnding"&&(n=l):(l===t||e[l][1].type==="lineEnding")&&(e[n][1].type="codeTextData",l!==n+2&&(e[n][1].end=e[l-1][1].end,e.splice(n+2,l-n-2),t-=l-n-2,l=n+2),n=void 0);return e}function Op(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Dp(e,t,a){let l=0,n,r;return i;function i(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),l++,u):(e.exit("codeTextSequence"),s(d))}function s(d){return d===null?a(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),s):d===96?(r=e.enter("codeTextSequence"),n=0,c(d)):se(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):(e.enter("codeTextData"),o(d))}function o(d){return d===null||d===32||d===96||se(d)?(e.exit("codeTextData"),s(d)):(e.consume(d),o)}function c(d){return d===96?(e.consume(d),n++,c):n===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(r.type="codeTextData",o(d))}}class Pp{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){const l=a??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(t,l):t>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(t,a,l){const n=a||0;this.setCursor(Math.trunc(t));const r=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return l&&wa(this.left,l),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),wa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),wa(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const a=this.left.splice(t,Number.POSITIVE_INFINITY);wa(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);wa(this.left,a.reverse())}}}function wa(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}function uu(e){const t={};let a=-1,l,n,r,i,u,s,o;const c=new Pp(e);for(;++a<c.length;){for(;a in t;)a=t[a];if(l=c.get(a),a&&l[1].type==="chunkFlow"&&c.get(a-1)[1].type==="listItemPrefix"&&(s=l[1]._tokenizer.events,r=0,r<s.length&&s[r][1].type==="lineEndingBlank"&&(r+=2),r<s.length&&s[r][1].type==="content"))for(;++r<s.length&&s[r][1].type!=="content";)s[r][1].type==="chunkText"&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if(l[0]==="enter")l[1].contentType&&(Object.assign(t,Mp(c,a)),a=t[a],o=!0);else if(l[1]._container){for(r=a,n=void 0;r--;)if(i=c.get(r),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;n&&(l[1].end={...c.get(n)[1].start},u=c.slice(n,a),u.unshift(l),c.splice(n,a-n+1,u))}}return ct(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!o}function Mp(e,t){const a=e.get(t)[1],l=e.get(t)[2];let n=t-1;const r=[];let i=a._tokenizer;i||(i=l.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const u=i.events,s=[],o={};let c,d,h=-1,f=a,y=0,E=0;const v=[E];for(;f;){for(;e.get(++n)[1]!==f;);r.push(n),f._tokenizer||(c=l.sliceStream(f),f.next||c.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=a;++h<u.length;)u[h][0]==="exit"&&u[h-1][0]==="enter"&&u[h][1].type===u[h-1][1].type&&u[h][1].start.line!==u[h][1].end.line&&(E=h+1,v.push(E),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):v.pop(),h=v.length;h--;){const g=u.slice(v[h],v[h+1]),m=r.pop();s.push([m,m+g.length-1]),e.splice(m,2,g)}for(s.reverse(),h=-1;++h<s.length;)o[y+s[h][0]]=y+s[h][1],y+=s[h][1]-s[h][0]-1;return o}const Bp={resolve:Rp,tokenize:Hp},Fp={partial:!0,tokenize:$p};function Rp(e){return uu(e),e}function Hp(e,t){let a;return l;function l(u){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),n(u)}function n(u){return u===null?r(u):se(u)?e.check(Fp,i,r)(u):(e.consume(u),n)}function r(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function i(u){return e.consume(u),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,n}}function $p(e,t,a){const l=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Se(e,r,"linePrefix")}function r(i){if(i===null||se(i))return a(i);const u=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(i):e.interrupt(l.parser.constructs.flow,a,t)(i)}}function su(e,t,a,l,n,r,i,u,s){const o=s||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(l),e.enter(n),e.enter(r),e.consume(g),e.exit(r),h):g===null||g===32||g===41||vn(g)?a(g):(e.enter(l),e.enter(i),e.enter(u),e.enter("chunkString",{contentType:"string"}),E(g))}function h(g){return g===62?(e.enter(r),e.consume(g),e.exit(r),e.exit(n),e.exit(l),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(u),h(g)):g===null||g===60||se(g)?a(g):(e.consume(g),g===92?y:f)}function y(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function E(g){return!c&&(g===null||g===41||Oe(g))?(e.exit("chunkString"),e.exit(u),e.exit(i),e.exit(l),t(g)):c<o&&g===40?(e.consume(g),c++,E):g===41?(e.consume(g),c--,E):g===null||g===32||g===40||vn(g)?a(g):(e.consume(g),g===92?v:E)}function v(g){return g===40||g===41||g===92?(e.consume(g),E):E(g)}}function ou(e,t,a,l,n,r){const i=this;let u=0,s;return o;function o(f){return e.enter(l),e.enter(n),e.consume(f),e.exit(n),e.enter(r),c}function c(f){return u>999||f===null||f===91||f===93&&!s||f===94&&!u&&"_hiddenFootnoteSupport"in i.parser.constructs?a(f):f===93?(e.exit(r),e.enter(n),e.consume(f),e.exit(n),e.exit(l),t):se(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||se(f)||u++>999?(e.exit("chunkString"),c(f)):(e.consume(f),s||(s=!Ce(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),u++,d):d(f)}}function cu(e,t,a,l,n,r){let i;return u;function u(h){return h===34||h===39||h===40?(e.enter(l),e.enter(n),e.consume(h),e.exit(n),i=h===40?41:h,s):a(h)}function s(h){return h===i?(e.enter(n),e.consume(h),e.exit(n),e.exit(l),t):(e.enter(r),o(h))}function o(h){return h===i?(e.exit(r),s(i)):h===null?a(h):se(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Se(e,o,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===i||h===null||se(h)?(e.exit("chunkString"),o(h)):(e.consume(h),h===92?d:c)}function d(h){return h===i||h===92?(e.consume(h),c):c(h)}}function vt(e,t){let a;return l;function l(n){return se(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),a=!0,l):Ce(n)?Se(e,l,a?"linePrefix":"lineSuffix")(n):t(n)}}const Up={name:"definition",tokenize:zp},qp={partial:!0,tokenize:Vp};function zp(e,t,a){const l=this;let n;return r;function r(f){return e.enter("definition"),i(f)}function i(f){return ou.call(l,e,u,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function u(f){return n=Jt(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s):a(f)}function s(f){return Oe(f)?vt(e,o)(f):o(f)}function o(f){return su(e,c,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(qp,d,d)(f)}function d(f){return Ce(f)?Se(e,h,"whitespace")(f):h(f)}function h(f){return f===null||se(f)?(e.exit("definition"),l.parser.defined.push(n),t(f)):a(f)}}function Vp(e,t,a){return l;function l(u){return Oe(u)?vt(e,n)(u):a(u)}function n(u){return cu(e,r,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function r(u){return Ce(u)?Se(e,i,"whitespace")(u):i(u)}function i(u){return u===null||se(u)?t(u):a(u)}}const Gp={name:"hardBreakEscape",tokenize:Yp};function Yp(e,t,a){return l;function l(r){return e.enter("hardBreakEscape"),e.consume(r),n}function n(r){return se(r)?(e.exit("hardBreakEscape"),t(r)):a(r)}}const Wp={name:"headingAtx",resolve:jp,tokenize:Kp};function jp(e,t){let a=e.length-2,l=3,n,r;return e[l][1].type==="whitespace"&&(l+=2),a-2>l&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(l===a-1||a-4>l&&e[a-2][1].type==="whitespace")&&(a-=l+1===a?2:4),a>l&&(n={type:"atxHeadingText",start:e[l][1].start,end:e[a][1].end},r={type:"chunkText",start:e[l][1].start,end:e[a][1].end,contentType:"text"},ct(e,l,a-l+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}function Kp(e,t,a){let l=0;return n;function n(c){return e.enter("atxHeading"),r(c)}function r(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&l++<6?(e.consume(c),i):c===null||Oe(c)?(e.exit("atxHeadingSequence"),u(c)):a(c)}function u(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||se(c)?(e.exit("atxHeading"),t(c)):Ce(c)?Se(e,u,"whitespace")(c):(e.enter("atxHeadingText"),o(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),u(c))}function o(c){return c===null||c===35||Oe(c)?(e.exit("atxHeadingText"),u(c)):(e.consume(c),o)}}const Xp=["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"],du=["pre","script","style","textarea"],Qp={concrete:!0,name:"htmlFlow",resolveTo:eh,tokenize:th},Jp={partial:!0,tokenize:lh},Zp={partial:!0,tokenize:ah};function eh(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function th(e,t,a){const l=this;let n,r,i,u,s;return o;function o(P){return c(P)}function c(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),h):P===47?(e.consume(P),r=!0,E):P===63?(e.consume(P),n=3,l.interrupt?t:k):dt(P)?(e.consume(P),i=String.fromCharCode(P),v):a(P)}function h(P){return P===45?(e.consume(P),n=2,f):P===91?(e.consume(P),n=5,u=0,y):dt(P)?(e.consume(P),n=4,l.interrupt?t:k):a(P)}function f(P){return P===45?(e.consume(P),l.interrupt?t:k):a(P)}function y(P){const U="CDATA[";return P===U.charCodeAt(u++)?(e.consume(P),u===U.length?l.interrupt?t:M:y):a(P)}function E(P){return dt(P)?(e.consume(P),i=String.fromCharCode(P),v):a(P)}function v(P){if(P===null||P===47||P===62||Oe(P)){const U=P===47,X=i.toLowerCase();return!U&&!r&&du.includes(X)?(n=1,l.interrupt?t(P):M(P)):Xp.includes(i.toLowerCase())?(n=6,U?(e.consume(P),g):l.interrupt?t(P):M(P)):(n=7,l.interrupt&&!l.parser.lazy[l.now().line]?a(P):r?m(P):b(P))}return P===45||Ze(P)?(e.consume(P),i+=String.fromCharCode(P),v):a(P)}function g(P){return P===62?(e.consume(P),l.interrupt?t:M):a(P)}function m(P){return Ce(P)?(e.consume(P),m):L(P)}function b(P){return P===47?(e.consume(P),L):P===58||P===95||dt(P)?(e.consume(P),x):Ce(P)?(e.consume(P),b):L(P)}function x(P){return P===45||P===46||P===58||P===95||Ze(P)?(e.consume(P),x):C(P)}function C(P){return P===61?(e.consume(P),A):Ce(P)?(e.consume(P),C):b(P)}function A(P){return P===null||P===60||P===61||P===62||P===96?a(P):P===34||P===39?(e.consume(P),s=P,O):Ce(P)?(e.consume(P),A):N(P)}function O(P){return P===s?(e.consume(P),s=null,S):P===null||se(P)?a(P):(e.consume(P),O)}function N(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Oe(P)?C(P):(e.consume(P),N)}function S(P){return P===47||P===62||Ce(P)?b(P):a(P)}function L(P){return P===62?(e.consume(P),I):a(P)}function I(P){return P===null||se(P)?M(P):Ce(P)?(e.consume(P),I):a(P)}function M(P){return P===45&&n===2?(e.consume(P),F):P===60&&n===1?(e.consume(P),V):P===62&&n===4?(e.consume(P),G):P===63&&n===3?(e.consume(P),k):P===93&&n===5?(e.consume(P),H):se(P)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(Jp,j,D)(P)):P===null||se(P)?(e.exit("htmlFlowData"),D(P)):(e.consume(P),M)}function D(P){return e.check(Zp,_,j)(P)}function _(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),T}function T(P){return P===null||se(P)?D(P):(e.enter("htmlFlowData"),M(P))}function F(P){return P===45?(e.consume(P),k):M(P)}function V(P){return P===47?(e.consume(P),i="",$):M(P)}function $(P){if(P===62){const U=i.toLowerCase();return du.includes(U)?(e.consume(P),G):M(P)}return dt(P)&&i.length<8?(e.consume(P),i+=String.fromCharCode(P),$):M(P)}function H(P){return P===93?(e.consume(P),k):M(P)}function k(P){return P===62?(e.consume(P),G):P===45&&n===2?(e.consume(P),k):M(P)}function G(P){return P===null||se(P)?(e.exit("htmlFlowData"),j(P)):(e.consume(P),G)}function j(P){return e.exit("htmlFlow"),t(P)}}function ah(e,t,a){const l=this;return n;function n(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r):a(i)}function r(i){return l.parser.lazy[l.now().line]?a(i):t(i)}}function lh(e,t,a){return l;function l(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(fl,t,a)}}const nh={name:"htmlText",tokenize:rh};function rh(e,t,a){const l=this;let n,r,i;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),s}function s(k){return k===33?(e.consume(k),o):k===47?(e.consume(k),C):k===63?(e.consume(k),b):dt(k)?(e.consume(k),N):a(k)}function o(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),r=0,y):dt(k)?(e.consume(k),m):a(k)}function c(k){return k===45?(e.consume(k),f):a(k)}function d(k){return k===null?a(k):k===45?(e.consume(k),h):se(k)?(i=d,V(k)):(e.consume(k),d)}function h(k){return k===45?(e.consume(k),f):d(k)}function f(k){return k===62?F(k):k===45?h(k):d(k)}function y(k){const G="CDATA[";return k===G.charCodeAt(r++)?(e.consume(k),r===G.length?E:y):a(k)}function E(k){return k===null?a(k):k===93?(e.consume(k),v):se(k)?(i=E,V(k)):(e.consume(k),E)}function v(k){return k===93?(e.consume(k),g):E(k)}function g(k){return k===62?F(k):k===93?(e.consume(k),g):E(k)}function m(k){return k===null||k===62?F(k):se(k)?(i=m,V(k)):(e.consume(k),m)}function b(k){return k===null?a(k):k===63?(e.consume(k),x):se(k)?(i=b,V(k)):(e.consume(k),b)}function x(k){return k===62?F(k):b(k)}function C(k){return dt(k)?(e.consume(k),A):a(k)}function A(k){return k===45||Ze(k)?(e.consume(k),A):O(k)}function O(k){return se(k)?(i=O,V(k)):Ce(k)?(e.consume(k),O):F(k)}function N(k){return k===45||Ze(k)?(e.consume(k),N):k===47||k===62||Oe(k)?S(k):a(k)}function S(k){return k===47?(e.consume(k),F):k===58||k===95||dt(k)?(e.consume(k),L):se(k)?(i=S,V(k)):Ce(k)?(e.consume(k),S):F(k)}function L(k){return k===45||k===46||k===58||k===95||Ze(k)?(e.consume(k),L):I(k)}function I(k){return k===61?(e.consume(k),M):se(k)?(i=I,V(k)):Ce(k)?(e.consume(k),I):S(k)}function M(k){return k===null||k===60||k===61||k===62||k===96?a(k):k===34||k===39?(e.consume(k),n=k,D):se(k)?(i=M,V(k)):Ce(k)?(e.consume(k),M):(e.consume(k),_)}function D(k){return k===n?(e.consume(k),n=void 0,T):k===null?a(k):se(k)?(i=D,V(k)):(e.consume(k),D)}function _(k){return k===null||k===34||k===39||k===60||k===61||k===96?a(k):k===47||k===62||Oe(k)?S(k):(e.consume(k),_)}function T(k){return k===47||k===62||Oe(k)?S(k):a(k)}function F(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):a(k)}function V(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),$}function $(k){return Ce(k)?Se(e,H,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):H(k)}function H(k){return e.enter("htmlTextData"),i(k)}}const xn={name:"labelEnd",resolveAll:oh,resolveTo:ch,tokenize:dh},ih={tokenize:fh},uh={tokenize:ph},sh={tokenize:hh};function oh(e){let t=-1;const a=[];for(;++t<e.length;){const l=e[t][1];if(a.push(e[t]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const n=l.type==="labelImage"?4:2;l.type="data",t+=n}}return e.length!==a.length&&ct(e,0,e.length,a),e}function ch(e,t){let a=e.length,l=0,n,r,i,u;for(;a--;)if(n=e[a][1],r){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[a][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[a][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(r=a,n.type!=="labelLink")){l=2;break}}else n.type==="labelEnd"&&(i=a);const s={type:e[r][1].type==="labelLink"?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},o={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[i-2][1].start}};return u=[["enter",s,t],["enter",o,t]],u=tt(u,e.slice(r+1,r+l+3)),u=tt(u,[["enter",c,t]]),u=tt(u,En(t.parser.constructs.insideSpan.null,e.slice(r+l+4,i-3),t)),u=tt(u,[["exit",c,t],e[i-2],e[i-1],["exit",o,t]]),u=tt(u,e.slice(i+1)),u=tt(u,[["exit",s,t]]),ct(e,r,e.length,u),e}function dh(e,t,a){const l=this;let n=l.events.length,r,i;for(;n--;)if((l.events[n][1].type==="labelImage"||l.events[n][1].type==="labelLink")&&!l.events[n][1]._balanced){r=l.events[n][1];break}return u;function u(h){return r?r._inactive?d(h):(i=l.parser.defined.includes(Jt(l.sliceSerialize({start:r.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):a(h)}function s(h){return h===40?e.attempt(ih,c,i?c:d)(h):h===91?e.attempt(uh,c,i?o:d)(h):i?c(h):d(h)}function o(h){return e.attempt(sh,c,d)(h)}function c(h){return t(h)}function d(h){return r._balanced=!0,a(h)}}function fh(e,t,a){return l;function l(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),n}function n(d){return Oe(d)?vt(e,r)(d):r(d)}function r(d){return d===41?c(d):su(e,i,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return Oe(d)?vt(e,s)(d):c(d)}function u(d){return a(d)}function s(d){return d===34||d===39||d===40?cu(e,o,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function o(d){return Oe(d)?vt(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):a(d)}}function ph(e,t,a){const l=this;return n;function n(u){return ou.call(l,e,r,i,"reference","referenceMarker","referenceString")(u)}function r(u){return l.parser.defined.includes(Jt(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?t(u):a(u)}function i(u){return a(u)}}function hh(e,t,a){return l;function l(r){return e.enter("reference"),e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),n}function n(r){return r===93?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):a(r)}}const bh={name:"labelStartImage",resolveAll:xn.resolveAll,tokenize:mh};function mh(e,t,a){const l=this;return n;function n(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),r}function r(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),i):a(u)}function i(u){return u===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(u):t(u)}}const vh={name:"labelStartLink",resolveAll:xn.resolveAll,tokenize:gh};function gh(e,t,a){const l=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),r}function r(i){return i===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(i):t(i)}}const Cn={name:"lineEnding",tokenize:Eh};function Eh(e,t){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Se(e,t,"linePrefix")}}const pl={name:"thematicBreak",tokenize:yh};function yh(e,t,a){let l=0,n;return r;function r(o){return e.enter("thematicBreak"),i(o)}function i(o){return n=o,u(o)}function u(o){return o===n?(e.enter("thematicBreakSequence"),s(o)):l>=3&&(o===null||se(o))?(e.exit("thematicBreak"),t(o)):a(o)}function s(o){return o===n?(e.consume(o),l++,s):(e.exit("thematicBreakSequence"),Ce(o)?Se(e,u,"whitespace")(o):u(o))}}const Ke={continuation:{tokenize:Sh},exit:wh,name:"list",tokenize:Ch},Th={partial:!0,tokenize:_h},xh={partial:!0,tokenize:Ah};function Ch(e,t,a){const l=this,n=l.events[l.events.length-1];let r=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return u;function u(f){const y=l.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!l.containerState.marker||f===l.containerState.marker:gn(f)){if(l.containerState.type||(l.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(pl,a,o)(f):o(f);if(!l.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(f)}return a(f)}function s(f){return gn(f)&&++i<10?(e.consume(f),s):(!l.interrupt||i<2)&&(l.containerState.marker?f===l.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),o(f)):a(f)}function o(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||f,e.check(fl,l.interrupt?a:c,e.attempt(Th,h,d))}function c(f){return l.containerState.initialBlankLine=!0,r++,h(f)}function d(f){return Ce(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):a(f)}function h(f){return l.containerState.size=r+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Sh(e,t,a){const l=this;return l.containerState._closeFlow=void 0,e.check(fl,n,r);function n(u){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Se(e,t,"listItemIndent",l.containerState.size+1)(u)}function r(u){return l.containerState.furtherBlankLines||!Ce(u)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,i(u)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(xh,t,i)(u))}function i(u){return l.containerState._closeFlow=!0,l.interrupt=void 0,Se(e,e.attempt(Ke,t,a),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Ah(e,t,a){const l=this;return Se(e,n,"listItemIndent",l.containerState.size+1);function n(r){const i=l.events[l.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===l.containerState.size?t(r):a(r)}}function wh(e){e.exit(this.containerState.type)}function _h(e,t,a){const l=this;return Se(e,n,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(r){const i=l.events[l.events.length-1];return!Ce(r)&&i&&i[1].type==="listItemPrefixWhitespace"?t(r):a(r)}}const fu={name:"setextUnderline",resolveTo:kh,tokenize:Nh};function kh(e,t){let a=e.length,l,n,r;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){l=a;break}e[a][1].type==="paragraph"&&(n=a)}else e[a][1].type==="content"&&e.splice(a,1),!r&&e[a][1].type==="definition"&&(r=a);const i={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",r?(e.splice(n,0,["enter",i,t]),e.splice(r+1,0,["exit",e[l][1],t]),e[l][1].end={...e[r][1].end}):e[l][1]=i,e.push(["exit",i,t]),e}function Nh(e,t,a){const l=this;let n;return r;function r(o){let c=l.events.length,d;for(;c--;)if(l.events[c][1].type!=="lineEnding"&&l.events[c][1].type!=="linePrefix"&&l.events[c][1].type!=="content"){d=l.events[c][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||d)?(e.enter("setextHeadingLine"),n=o,i(o)):a(o)}function i(o){return e.enter("setextHeadingLineSequence"),u(o)}function u(o){return o===n?(e.consume(o),u):(e.exit("setextHeadingLineSequence"),Ce(o)?Se(e,s,"lineSuffix")(o):s(o))}function s(o){return o===null||se(o)?(e.exit("setextHeadingLine"),t(o)):a(o)}}const Ih={tokenize:Lh};function Lh(e){const t=this,a=e.attempt(fl,l,e.attempt(this.parser.constructs.flowInitial,n,Se(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Bp,n)),"linePrefix")));return a;function l(r){if(r===null){e.consume(r);return}return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function n(r){if(r===null){e.consume(r);return}return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,a}}const Oh={resolveAll:hu()},Dh=pu("string"),Ph=pu("text");function pu(e){return{resolveAll:hu(e==="text"?Mh:void 0),tokenize:t};function t(a){const l=this,n=this.parser.constructs[e],r=a.attempt(n,i,u);return i;function i(c){return o(c)?r(c):u(c)}function u(c){if(c===null){a.consume(c);return}return a.enter("data"),a.consume(c),s}function s(c){return o(c)?(a.exit("data"),r(c)):(a.consume(c),s)}function o(c){if(c===null)return!0;const d=n[c];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(l,l.previous))return!0}return!1}}}function hu(e){return t;function t(a,l){let n=-1,r;for(;++n<=a.length;)r===void 0?a[n]&&a[n][1].type==="data"&&(r=n,n++):(!a[n]||a[n][1].type!=="data")&&(n!==r+2&&(a[r][1].end=a[n-1][1].end,a.splice(r+2,n-r-2),n=r+2),r=void 0);return e?e(a,l):a}}function Mh(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const l=e[a-1][1],n=t.sliceStream(l);let r=n.length,i=-1,u=0,s;for(;r--;){const o=n[r];if(typeof o=="string"){for(i=o.length;o.charCodeAt(i-1)===32;)u++,i--;if(i)break;i=-1}else if(o===-2)s=!0,u++;else if(o!==-1){r++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(u=0),u){const o={type:a===e.length||s||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:r?i:l.start._bufferIndex+i,_index:l.start._index+r,line:l.end.line,column:l.end.column-u,offset:l.end.offset-u},end:{...l.end}};l.end={...o.start},l.start.offset===l.end.offset?Object.assign(l,o):(e.splice(a,0,["enter",o,t],["exit",o,t]),a+=2)}a++}return e}const Bh=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Up},disable:{null:[]},document:{42:Ke,43:Ke,45:Ke,48:Ke,49:Ke,50:Ke,51:Ke,52:Ke,53:Ke,54:Ke,55:Ke,56:Ke,57:Ke,62:au},flow:{35:Wp,42:pl,45:[fu,pl],60:Qp,61:fu,95:pl,96:iu,126:iu},flowInitial:{[-2]:Tn,[-1]:Tn,32:Tn},insideSpan:{null:[yn,Oh]},string:{38:nu,92:lu},text:{[-5]:Cn,[-4]:Cn,[-3]:Cn,33:bh,38:nu,42:yn,60:[vp,nh],91:vh,92:[Gp,lu],93:xn,95:yn,96:Ip}},Symbol.toStringTag,{value:"Module"}));function Fh(e,t,a){let l={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const n={},r=[];let i=[],u=[];const s={attempt:O(C),check:O(A),consume:m,enter:b,exit:x,interrupt:O(A,{interrupt:!0})},o={code:null,containerState:{},defineSkip:E,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let c=t.tokenize.call(o,s);return t.resolveAll&&r.push(t),o;function d(I){return i=tt(i,I),v(),i[i.length-1]!==null?[]:(N(t,0),o.events=En(r,o.events,o),o.events)}function h(I,M){return Hh(f(I),M)}function f(I){return Rh(i,I)}function y(){const{_bufferIndex:I,_index:M,line:D,column:_,offset:T}=l;return{_bufferIndex:I,_index:M,line:D,column:_,offset:T}}function E(I){n[I.line]=I.column,L()}function v(){let I;for(;l._index<i.length;){const M=i[l._index];if(typeof M=="string")for(I=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===I&&l._bufferIndex<M.length;)g(M.charCodeAt(l._bufferIndex));else g(M)}}function g(I){c=c(I)}function m(I){se(I)?(l.line++,l.column=1,l.offset+=I===-3?2:1,L()):I!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===i[l._index].length&&(l._bufferIndex=-1,l._index++)),o.previous=I}function b(I,M){const D=M||{};return D.type=I,D.start=y(),o.events.push(["enter",D,o]),u.push(D),D}function x(I){const M=u.pop();return M.end=y(),o.events.push(["exit",M,o]),M}function C(I,M){N(I,M.from)}function A(I,M){M.restore()}function O(I,M){return D;function D(_,T,F){let V,$,H,k;return Array.isArray(_)?j(_):"tokenize"in _?j([_]):G(_);function G(Z){return W;function W(le){const oe=le!==null&&Z[le],pe=le!==null&&Z.null,ve=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return j(ve)(le)}}function j(Z){return V=Z,$=0,Z.length===0?F:P(Z[$])}function P(Z){return W;function W(le){return k=S(),H=Z,Z.partial||(o.currentConstruct=Z),Z.name&&o.parser.constructs.disable.null.includes(Z.name)?X():Z.tokenize.call(M?Object.assign(Object.create(o),M):o,s,U,X)(le)}}function U(Z){return I(H,k),T}function X(Z){return k.restore(),++$<V.length?P(V[$]):F}}}function N(I,M){I.resolveAll&&!r.includes(I)&&r.push(I),I.resolve&&ct(o.events,M,o.events.length-M,I.resolve(o.events.slice(M),o)),I.resolveTo&&(o.events=I.resolveTo(o.events,o))}function S(){const I=y(),M=o.previous,D=o.currentConstruct,_=o.events.length,T=Array.from(u);return{from:_,restore:F};function F(){l=I,o.previous=M,o.currentConstruct=D,o.events.length=_,u=T,L()}}function L(){l.line in n&&l.column<2&&(l.column=n[l.line],l.offset+=n[l.line]-1)}}function Rh(e,t){const a=t.start._index,l=t.start._bufferIndex,n=t.end._index,r=t.end._bufferIndex;let i;if(a===n)i=[e[a].slice(l,r)];else{if(i=e.slice(a,n),l>-1){const u=i[0];typeof u=="string"?i[0]=u.slice(l):i.shift()}r>0&&i.push(e[n].slice(0,r))}return i}function Hh(e,t){let a=-1;const l=[];let n;for(;++a<e.length;){const r=e[a];let i;if(typeof r=="string")i=r;else switch(r){case-5:{i="\r";break}case-4:{i=`
|
|
44
44
|
`;break}case-3:{i=`\r
|
|
45
|
-
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&n)continue;i=" ";break}default:i=String.fromCharCode(r)}n=r===-2,l.push(i)}return l.join("")}function $h(e){const l={constructs:np([Bh,...(e||{}).extensions||[]]),content:n(cp),defined:[],document:n(fp),flow:n(Ih),lazy:{},string:n(Dh),text:n(Ph)};return l;function n(r){return i;function i(u){return Fh(l,r,u)}}}function Uh(e){for(;!uu(e););return e}const bu=/[\0\t\n\r]/g;function qh(){let e=1,t="",a=!0,l;return n;function n(r,i,u){const s=[];let o,c,d,h,f;for(r=t+(typeof r=="string"?r.toString():new TextDecoder(i||void 0).decode(r)),d=0,t="",a&&(r.charCodeAt(0)===65279&&d++,a=void 0);d<r.length;){if(bu.lastIndex=d,o=bu.exec(r),h=o&&o.index!==void 0?o.index:r.length,f=r.charCodeAt(h),!o){t=r.slice(d);break}if(f===10&&d===h&&l)s.push(-3),l=void 0;else switch(l&&(s.push(-5),l=void 0),d<h&&(s.push(r.slice(d,h)),e+=h-d),f){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:l=!0,e=1}d=h+1}return u&&(l&&s.push(-5),t&&s.push(t),s.push(null)),s}}const zh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vh(e){return e.replace(zh,Gh)}function Gh(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const n=a.charCodeAt(1),r=n===120||n===88;return Ji(a.slice(r?2:1),r?16:10)}return Ca(a)||e}const mu={}.hasOwnProperty;function Yh(e,t,a){return typeof t!="string"&&(a=t,t=void 0),Wh(a)(Uh($h(a).document().write(qh()(e,t,!0))))}function Wh(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(Ga),autolinkProtocol:S,autolinkEmail:S,atxHeading:r(lt),blockQuote:r(pe),characterEscape:S,characterReference:S,codeFenced:r(ve),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(ve,i),codeText:r(Ye,i),codeTextData:S,data:S,codeFlowValue:S,definition:r(Pe),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(Ut),hardBreakEscape:r(Et),hardBreakTrailing:r(Et),htmlFlow:r(sa,i),htmlFlowData:S,htmlText:r(sa,i),htmlTextData:S,image:r(Cr),label:i,link:r(Ga),listItem:r(Bl),listItemValue:h,listOrdered:r(Ml,d),listUnordered:r(Ml),paragraph:r(Sr),reference:P,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(lt),strong:r(Fl),thematicBreak:r(Ya)},exit:{atxHeading:s(),atxHeadingSequence:C,autolink:s(),autolinkEmail:oe,autolinkProtocol:le,blockQuote:s(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:Z,characterReference:W,codeFenced:s(v),codeFencedFence:E,codeFencedFenceInfo:f,codeFencedFenceMeta:y,codeFlowValue:L,codeIndented:s(g),codeText:s(T),codeTextData:L,data:L,definition:s(),definitionDestinationString:x,definitionLabelString:m,definitionTitleString:b,emphasis:s(),hardBreakEscape:s(M),hardBreakTrailing:s(M),htmlFlow:s(D),htmlFlowData:L,htmlText:s(_),htmlTextData:L,image:s(V),label:H,labelText:$,lineEnding:I,link:s(F),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:U,resourceDestinationString:k,resourceTitleString:G,resource:j,setextHeading:s(N),setextHeadingLineSequence:O,setextHeadingText:A,strong:s(),thematicBreak:s()}};vu(t,(e||{}).mdastExtensions||[]);const a={};return l;function l(Q){let ne={type:"root",children:[]};const de={stack:[ne],tokenStack:[],config:t,enter:u,exit:o,buffer:i,resume:c,data:a},ye=[];let we=-1;for(;++we<Q.length;)if(Q[we][1].type==="listOrdered"||Q[we][1].type==="listUnordered")if(Q[we][0]==="enter")ye.push(we);else{const We=ye.pop();we=n(Q,We,we)}for(we=-1;++we<Q.length;){const We=t[Q[we][0]];mu.call(We,Q[we][1].type)&&We[Q[we][1].type].call(Object.assign({sliceSerialize:Q[we][2].sliceSerialize},de),Q[we][1])}if(de.tokenStack.length>0){const We=de.tokenStack[de.tokenStack.length-1];(We[1]||gu).call(de,void 0,We[0])}for(ne.position={start:_t(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:_t(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},we=-1;++we<t.transforms.length;)ne=t.transforms[we](ne)||ne;return ne}function n(Q,ne,de){let ye=ne-1,we=-1,We=!1,yt,Ve,qt,zt;for(;++ye<=de;){const He=Q[ye];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{He[0]==="enter"?we++:we--,zt=void 0;break}case"lineEndingBlank":{He[0]==="enter"&&(yt&&!zt&&!we&&!qt&&(qt=ye),zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:zt=void 0}if(!we&&He[0]==="enter"&&He[1].type==="listItemPrefix"||we===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(yt){let Tt=ye;for(Ve=void 0;Tt--;){const it=Q[Tt];if(it[1].type==="lineEnding"||it[1].type==="lineEndingBlank"){if(it[0]==="exit")continue;Ve&&(Q[Ve][1].type="lineEndingBlank",We=!0),it[1].type="lineEnding",Ve=Tt}else if(!(it[1].type==="linePrefix"||it[1].type==="blockQuotePrefix"||it[1].type==="blockQuotePrefixWhitespace"||it[1].type==="blockQuoteMarker"||it[1].type==="listItemIndent"))break}qt&&(!Ve||qt<Ve)&&(yt._spread=!0),yt.end=Object.assign({},Ve?Q[Ve][1].start:He[1].end),Q.splice(Ve||ye,0,["exit",yt,He[2]]),ye++,de++}if(He[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};yt=Tt,Q.splice(ye,0,["enter",Tt,He[2]]),ye++,de++,qt=void 0,zt=!0}}}return Q[ne][1]._spread=We,de}function r(Q,ne){return de;function de(ye){u.call(this,Q(ye),ye),ne&&ne.call(this,ye)}}function i(){this.stack.push({type:"fragment",children:[]})}function u(Q,ne,de){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ne,de||void 0]),Q.position={start:_t(ne.start),end:void 0}}function s(Q){return ne;function ne(de){Q&&Q.call(this,de),o.call(this,de)}}function o(Q,ne){const de=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==Q.type&&(ne?ne.call(this,Q,ye[0]):(ye[1]||gu).call(this,Q,ye[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Ta({start:Q.start,end:Q.end})+"): it’s not open");de.position.end=_t(Q.end)}function c(){return ap(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(Q){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function f(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=Q}function y(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=Q}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q.replace(/(\r?\n|\r)$/g,"")}function m(Q){const ne=this.resume(),de=this.stack[this.stack.length-1];de.label=ne,de.identifier=Jt(this.sliceSerialize(Q)).toLowerCase()}function b(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Q}function x(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Q}function C(Q){const ne=this.stack[this.stack.length-1];if(!ne.depth){const de=this.sliceSerialize(Q).length;ne.depth=de}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function O(Q){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function S(Q){const de=this.stack[this.stack.length-1].children;let ye=de[de.length-1];(!ye||ye.type!=="text")&&(ye=rt(),ye.position={start:_t(Q.start),end:void 0},de.push(ye)),this.stack.push(ye)}function L(Q){const ne=this.stack.pop();ne.value+=this.sliceSerialize(Q),ne.position.end=_t(Q.end)}function I(Q){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=ne.children[ne.children.length-1];de.position.end=_t(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(S.call(this,Q),L.call(this,Q))}function M(){this.data.atHardBreak=!0}function D(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q}function _(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q}function T(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q}function F(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ne,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function V(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ne,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function $(Q){const ne=this.sliceSerialize(Q),de=this.stack[this.stack.length-2];de.label=Vh(ne),de.identifier=Jt(ne).toLowerCase()}function H(){const Q=this.stack[this.stack.length-1],ne=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const ye=Q.children;de.children=ye}else de.alt=ne}function k(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Q}function G(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Q}function j(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function U(Q){const ne=this.resume(),de=this.stack[this.stack.length-1];de.label=ne,de.identifier=Jt(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function X(Q){this.data.characterReferenceType=Q.type}function Z(Q){const ne=this.sliceSerialize(Q),de=this.data.characterReferenceType;let ye;de?(ye=Ji(ne,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Ca(ne);const we=this.stack[this.stack.length-1];we.value+=ye}function W(Q){const ne=this.stack.pop();ne.position.end=_t(Q.end)}function le(Q){L.call(this,Q);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(Q)}function oe(Q){L.call(this,Q);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(Q)}function pe(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function Ye(){return{type:"inlineCode",value:""}}function Pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ut(){return{type:"emphasis",children:[]}}function lt(){return{type:"heading",depth:0,children:[]}}function Et(){return{type:"break"}}function sa(){return{type:"html",value:""}}function Cr(){return{type:"image",title:null,url:"",alt:null}}function Ga(){return{type:"link",title:null,url:"",children:[]}}function Ml(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Bl(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Sr(){return{type:"paragraph",children:[]}}function Fl(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function Ya(){return{type:"thematicBreak"}}}function _t(e){return{line:e.line,column:e.column,offset:e.offset}}function vu(e,t){let a=-1;for(;++a<t.length;){const l=t[a];Array.isArray(l)?vu(e,l):jh(e,l)}}function jh(e,t){let a;for(a in t)if(mu.call(t,a))switch(a){case"canContainEols":{const l=t[a];l&&e[a].push(...l);break}case"transforms":{const l=t[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=t[a];l&&Object.assign(e[a],l);break}}}function gu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ta({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ta({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ta({start:t.start,end:t.end})+") is still open")}function Kh(e){const t=this;t.parser=a;function a(l){return Yh(l,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Xh(e,t){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}function Qh(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
45
|
+
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&n)continue;i=" ";break}default:i=String.fromCharCode(r)}n=r===-2,l.push(i)}return l.join("")}function $h(e){const l={constructs:np([Bh,...(e||{}).extensions||[]]),content:n(cp),defined:[],document:n(fp),flow:n(Ih),lazy:{},string:n(Dh),text:n(Ph)};return l;function n(r){return i;function i(u){return Fh(l,r,u)}}}function Uh(e){for(;!uu(e););return e}const bu=/[\0\t\n\r]/g;function qh(){let e=1,t="",a=!0,l;return n;function n(r,i,u){const s=[];let o,c,d,h,f;for(r=t+(typeof r=="string"?r.toString():new TextDecoder(i||void 0).decode(r)),d=0,t="",a&&(r.charCodeAt(0)===65279&&d++,a=void 0);d<r.length;){if(bu.lastIndex=d,o=bu.exec(r),h=o&&o.index!==void 0?o.index:r.length,f=r.charCodeAt(h),!o){t=r.slice(d);break}if(f===10&&d===h&&l)s.push(-3),l=void 0;else switch(l&&(s.push(-5),l=void 0),d<h&&(s.push(r.slice(d,h)),e+=h-d),f){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:l=!0,e=1}d=h+1}return u&&(l&&s.push(-5),t&&s.push(t),s.push(null)),s}}const zh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vh(e){return e.replace(zh,Gh)}function Gh(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const n=a.charCodeAt(1),r=n===120||n===88;return Ji(a.slice(r?2:1),r?16:10)}return Ca(a)||e}const mu={}.hasOwnProperty;function Yh(e,t,a){return typeof t!="string"&&(a=t,t=void 0),Wh(a)(Uh($h(a).document().write(qh()(e,t,!0))))}function Wh(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(Ga),autolinkProtocol:S,autolinkEmail:S,atxHeading:r(lt),blockQuote:r(pe),characterEscape:S,characterReference:S,codeFenced:r(ve),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(ve,i),codeText:r(Ye,i),codeTextData:S,data:S,codeFlowValue:S,definition:r(Pe),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(Ut),hardBreakEscape:r(Et),hardBreakTrailing:r(Et),htmlFlow:r(sa,i),htmlFlowData:S,htmlText:r(sa,i),htmlTextData:S,image:r(Cr),label:i,link:r(Ga),listItem:r(Bl),listItemValue:h,listOrdered:r(Ml,d),listUnordered:r(Ml),paragraph:r(Sr),reference:P,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(lt),strong:r(Fl),thematicBreak:r(Ya)},exit:{atxHeading:s(),atxHeadingSequence:C,autolink:s(),autolinkEmail:oe,autolinkProtocol:le,blockQuote:s(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:Z,characterReference:W,codeFenced:s(v),codeFencedFence:E,codeFencedFenceInfo:f,codeFencedFenceMeta:y,codeFlowValue:L,codeIndented:s(g),codeText:s(T),codeTextData:L,data:L,definition:s(),definitionDestinationString:x,definitionLabelString:m,definitionTitleString:b,emphasis:s(),hardBreakEscape:s(M),hardBreakTrailing:s(M),htmlFlow:s(D),htmlFlowData:L,htmlText:s(_),htmlTextData:L,image:s(V),label:H,labelText:$,lineEnding:I,link:s(F),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:U,resourceDestinationString:k,resourceTitleString:G,resource:j,setextHeading:s(N),setextHeadingLineSequence:O,setextHeadingText:A,strong:s(),thematicBreak:s()}};vu(t,(e||{}).mdastExtensions||[]);const a={};return l;function l(J){let ne={type:"root",children:[]};const de={stack:[ne],tokenStack:[],config:t,enter:u,exit:o,buffer:i,resume:c,data:a},ye=[];let we=-1;for(;++we<J.length;)if(J[we][1].type==="listOrdered"||J[we][1].type==="listUnordered")if(J[we][0]==="enter")ye.push(we);else{const We=ye.pop();we=n(J,We,we)}for(we=-1;++we<J.length;){const We=t[J[we][0]];mu.call(We,J[we][1].type)&&We[J[we][1].type].call(Object.assign({sliceSerialize:J[we][2].sliceSerialize},de),J[we][1])}if(de.tokenStack.length>0){const We=de.tokenStack[de.tokenStack.length-1];(We[1]||gu).call(de,void 0,We[0])}for(ne.position={start:_t(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:_t(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},we=-1;++we<t.transforms.length;)ne=t.transforms[we](ne)||ne;return ne}function n(J,ne,de){let ye=ne-1,we=-1,We=!1,yt,Ve,qt,zt;for(;++ye<=de;){const He=J[ye];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{He[0]==="enter"?we++:we--,zt=void 0;break}case"lineEndingBlank":{He[0]==="enter"&&(yt&&!zt&&!we&&!qt&&(qt=ye),zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:zt=void 0}if(!we&&He[0]==="enter"&&He[1].type==="listItemPrefix"||we===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(yt){let Tt=ye;for(Ve=void 0;Tt--;){const it=J[Tt];if(it[1].type==="lineEnding"||it[1].type==="lineEndingBlank"){if(it[0]==="exit")continue;Ve&&(J[Ve][1].type="lineEndingBlank",We=!0),it[1].type="lineEnding",Ve=Tt}else if(!(it[1].type==="linePrefix"||it[1].type==="blockQuotePrefix"||it[1].type==="blockQuotePrefixWhitespace"||it[1].type==="blockQuoteMarker"||it[1].type==="listItemIndent"))break}qt&&(!Ve||qt<Ve)&&(yt._spread=!0),yt.end=Object.assign({},Ve?J[Ve][1].start:He[1].end),J.splice(Ve||ye,0,["exit",yt,He[2]]),ye++,de++}if(He[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};yt=Tt,J.splice(ye,0,["enter",Tt,He[2]]),ye++,de++,qt=void 0,zt=!0}}}return J[ne][1]._spread=We,de}function r(J,ne){return de;function de(ye){u.call(this,J(ye),ye),ne&&ne.call(this,ye)}}function i(){this.stack.push({type:"fragment",children:[]})}function u(J,ne,de){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ne,de||void 0]),J.position={start:_t(ne.start),end:void 0}}function s(J){return ne;function ne(de){J&&J.call(this,de),o.call(this,de)}}function o(J,ne){const de=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==J.type&&(ne?ne.call(this,J,ye[0]):(ye[1]||gu).call(this,J,ye[0]));else throw new Error("Cannot close `"+J.type+"` ("+Ta({start:J.start,end:J.end})+"): it’s not open");de.position.end=_t(J.end)}function c(){return ap(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(J){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function f(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=J}function y(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=J}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J.replace(/(\r?\n|\r)$/g,"")}function m(J){const ne=this.resume(),de=this.stack[this.stack.length-1];de.label=ne,de.identifier=Jt(this.sliceSerialize(J)).toLowerCase()}function b(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.title=J}function x(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.url=J}function C(J){const ne=this.stack[this.stack.length-1];if(!ne.depth){const de=this.sliceSerialize(J).length;ne.depth=de}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function O(J){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function S(J){const de=this.stack[this.stack.length-1].children;let ye=de[de.length-1];(!ye||ye.type!=="text")&&(ye=rt(),ye.position={start:_t(J.start),end:void 0},de.push(ye)),this.stack.push(ye)}function L(J){const ne=this.stack.pop();ne.value+=this.sliceSerialize(J),ne.position.end=_t(J.end)}function I(J){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=ne.children[ne.children.length-1];de.position.end=_t(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(S.call(this,J),L.call(this,J))}function M(){this.data.atHardBreak=!0}function D(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J}function _(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J}function T(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.value=J}function F(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ne,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function V(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ne,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function $(J){const ne=this.sliceSerialize(J),de=this.stack[this.stack.length-2];de.label=Vh(ne),de.identifier=Jt(ne).toLowerCase()}function H(){const J=this.stack[this.stack.length-1],ne=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const ye=J.children;de.children=ye}else de.alt=ne}function k(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.url=J}function G(){const J=this.resume(),ne=this.stack[this.stack.length-1];ne.title=J}function j(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function U(J){const ne=this.resume(),de=this.stack[this.stack.length-1];de.label=ne,de.identifier=Jt(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function X(J){this.data.characterReferenceType=J.type}function Z(J){const ne=this.sliceSerialize(J),de=this.data.characterReferenceType;let ye;de?(ye=Ji(ne,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Ca(ne);const we=this.stack[this.stack.length-1];we.value+=ye}function W(J){const ne=this.stack.pop();ne.position.end=_t(J.end)}function le(J){L.call(this,J);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(J)}function oe(J){L.call(this,J);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(J)}function pe(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function Ye(){return{type:"inlineCode",value:""}}function Pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ut(){return{type:"emphasis",children:[]}}function lt(){return{type:"heading",depth:0,children:[]}}function Et(){return{type:"break"}}function sa(){return{type:"html",value:""}}function Cr(){return{type:"image",title:null,url:"",alt:null}}function Ga(){return{type:"link",title:null,url:"",children:[]}}function Ml(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Bl(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Sr(){return{type:"paragraph",children:[]}}function Fl(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function Ya(){return{type:"thematicBreak"}}}function _t(e){return{line:e.line,column:e.column,offset:e.offset}}function vu(e,t){let a=-1;for(;++a<t.length;){const l=t[a];Array.isArray(l)?vu(e,l):jh(e,l)}}function jh(e,t){let a;for(a in t)if(mu.call(t,a))switch(a){case"canContainEols":{const l=t[a];l&&e[a].push(...l);break}case"transforms":{const l=t[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=t[a];l&&Object.assign(e[a],l);break}}}function gu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ta({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ta({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ta({start:t.start,end:t.end})+") is still open")}function Kh(e){const t=this;t.parser=a;function a(l){return Yh(l,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Xh(e,t){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}function Qh(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
46
46
|
`}]}function Jh(e,t){const a=t.value?t.value+`
|
|
47
47
|
`:"",l={},n=t.lang?t.lang.split(/\s+/):[];n.length>0&&(l.className=["language-"+n[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:a}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r}function Zh(e,t){const a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function eb(e,t){const a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function tb(e,t){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(t.identifier).toUpperCase(),n=Zt(l.toLowerCase()),r=e.footnoteOrder.indexOf(l);let i,u=e.footnoteCounts.get(l);u===void 0?(u=0,e.footnoteOrder.push(l),i=e.footnoteOrder.length):i=r+1,u+=1,e.footnoteCounts.set(l,u);const s={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+n,id:a+"fnref-"+n+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,s);const o={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,o),e.applyData(t,o)}function ab(e,t){const a={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function lb(e,t){if(e.options.allowDangerousHtml){const a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}function Eu(e,t){const a=t.referenceType;let l="]";if(a==="collapsed"?l+="[]":a==="full"&&(l+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+l}];const n=e.all(t),r=n[0];r&&r.type==="text"?r.value="["+r.value:n.unshift({type:"text",value:"["});const i=n[n.length-1];return i&&i.type==="text"?i.value+=l:n.push({type:"text",value:l}),n}function nb(e,t){const a=String(t.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return Eu(e,t);const n={src:Zt(l.url||""),alt:t.alt};l.title!==null&&l.title!==void 0&&(n.title=l.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rb(e,t){const a={src:Zt(t.url)};t.alt!==null&&t.alt!==void 0&&(a.alt=t.alt),t.title!==null&&t.title!==void 0&&(a.title=t.title);const l={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,l),e.applyData(t,l)}function ib(e,t){const a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);const l={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)}function ub(e,t){const a=String(t.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return Eu(e,t);const n={href:Zt(l.url||"")};l.title!==null&&l.title!==void 0&&(n.title=l.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sb(e,t){const a={href:Zt(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);const l={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function ob(e,t,a){const l=e.all(t),n=a?cb(a):yu(t),r={},i=[];if(typeof t.checked=="boolean"){const c=l[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},l.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let u=-1;for(;++u<l.length;){const c=l[u];(n||u!==0||c.type!=="element"||c.tagName!=="p")&&i.push({type:"text",value:`
|
|
48
48
|
`}),c.type==="element"&&c.tagName==="p"&&!n?i.push(...c.children):i.push(c)}const s=l[l.length-1];s&&(n||s.type!=="element"||s.tagName!=="p")&&i.push({type:"text",value:`
|
|
@@ -61,7 +61,7 @@ ${(e||"").replace(/\r\n/g,`
|
|
|
61
61
|
`).trim():""}catch{T=F.trim()}}else{const F=(D.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
62
62
|
`);T=F.replace(/\n/g,"").trim().length>0?F:""}if(T)f.current.add(_);else if(f.current.has(_)){N.add(_);const F=D.getAttribute("data-node-type");F==="report-url"?N.add(`${_}__url`):F==="markdown-name"&&N.add(`${_}__name`)}})}const I=e.current.__tempVariableValues;if(I?(A=I,setTimeout(()=>{if(e.current){const M=e.current;M.__tempVariableValues===I&&delete M.__tempVariableValues}},100)):C||(e.current.querySelectorAll('[data-type="variable"]').forEach(H=>{const k=H.dataset.key;if(k){const G=H.getAttribute("data-report-url");if(G){const U=H.dataset.multiKey,X=U?`${U}::${k}`:k;O[X]={url:G,name:H.getAttribute("data-report-name")||H.innerText.replace(/\u200B/g,"").trim(),multiKey:U}}const j=()=>{if(H.dataset.variableRender==="antd-textarea"){const Z=(H.getAttribute("data-value")||"").trim();if(!Z)return"";try{return decodeURIComponent(Z).replace(/\r\n/g,`
|
|
63
63
|
`).trim()}catch{return Z.trim()}}const U=(H.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
64
|
-
`);return U.replace(/\n/g,"").trim().length>0?U:""},P=H.getAttribute("data-node-type");if(P==="report-url")if(G)A[`${k}__url`]=G;else{const U=j().replace(/\n/g,"").trim();U&&(A[`${k}__url`]=U)}else{const U=j();U&&(P==="markdown-name"?A[`${k}__name`]=U:A[k]=U)}}}),e.current.querySelectorAll('[data-type="select"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.getAttribute("data-value")||"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="searchable-select"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.getAttribute("data-value")||"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(H=>{const k=H.dataset.key;if(k){const G=H.value.replace(/[\u200B]/g,"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(H=>{const k=H.dataset.key;if(k){const G=H.getAttribute("data-node-type")||"",j=G==="report-module"||G==="markdown-module",P=j?(H.innerHTML||"").replace(/[\u200B]/g,"").trim():(H.textContent||"").replace(/[\u200B]/g,"").trim();if(j){const U=Number.parseInt(H.getAttribute("data-module-index")||"0",10);A[`${k}__module_${Number.isFinite(U)?U:0}`]=P}else P&&(A[k]=P)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.getAttribute("data-value")||"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.value||"").trim();G&&(A[k]=G)}})),o&&Object.keys(o).length>0){const M=new Set(t.filter(_=>_.type==="upload"&&_.key).map(_=>_.key)),D={};C||Object.entries(o).forEach(([_,T])=>{if(!Array.isArray(T))return;let F=0;for(let $=0;$<T.length;$++)`${_}_${$}`in A&&F++;let V=-1;for(let $=0;$<T.length;$++)f.current.has(`${_}_${$}`)&&(V=$);if(V>=F&&F<T.length)for(let $=F;$<T.length;$++)N.add(`${_}_${$}`)}),Object.entries(o).forEach(([_,T])=>{M.has(_)||(Array.isArray(T)?T.forEach((F,V)=>{F!=null&&String(F).trim()!==""&&(D[`${_}_${V}`]=String(F))}):T!=null&&String(T).trim()!==""&&(t.find(V=>V.key===_&&V.type==="report-url")?D[`${_}__url`]=String(T):D[_]=String(T)))}),Object.entries(D).forEach(([_,T])=>{const F=_ in A,V=N.has(_),$=g.current[_]!==T;!V&&(!F||$)&&(A[_]=T)});for(const _ of Object.keys(g.current))!(_ in D)&&_ in A&&delete A[_];g.current=D}if(o1(e,t,a,l,A,n,u,s,c,d),v.current=b,h&&e.current)for(const[M,{name:D,url:_}]of Object.entries(h.current)){const T=e.current.querySelector(`[data-type="variable"][data-key="${M}"]`);if(!T)continue;const F=T.querySelector(".rte-report-dropdown-host");F&&(F.style.display="",F.style.visibility="",F.classList.remove("hidden"),F.classList.add("rte-report-dropdown-host-quiet"));const V=[document.createTextNode(D)];F&&V.push(F),T.setAttribute("data-report-url",_),T.setAttribute("data-report-name",D),T.removeAttribute("data-tooltip"),T.contentEditable="false",T.classList.add("rte-report-name-chip"),T.classList.remove("show-placeholder","rte-variable-with-icon"),T.replaceChildren(...V),Vl(T)}if(C&&(E.current=!1),setTimeout(()=>{if(da(e),h?.current)for(const[M,D]of Object.entries(h.current))O[M]||(O[M]=D);if(Object.keys(O).length>0&&e.current)for(const[M,D]of Object.entries(O)){let _=null;if(D.multiKey){const V=M.split("::")[1];_=e.current.querySelector(`[data-type="variable"][data-multi-key="${D.multiKey}"][data-key="${V}"]`)}else _=e.current.querySelector(`[data-type="variable"][data-key="${M}"]`);if(!_)continue;const T=_.querySelector(".rte-report-dropdown-host");T&&(T.style.display="",T.style.visibility="",T.classList.remove("hidden"),T.classList.add("rte-report-dropdown-host-quiet"));const F=[document.createTextNode(D.name)];T&&F.push(T),_.classList.remove("show-placeholder","rte-variable-with-icon"),_.classList.add("rte-report-name-chip"),_.setAttribute("data-report-url",D.url),_.setAttribute("data-report-name",D.name),_.contentEditable="false",_.replaceChildren(...F),Vl(_)}fa(e,t,a,c)},0),r?.current){const{key:M,offset:D}=r.current;setTimeout(()=>{if(!e.current)return;const _=e.current.querySelector(`[data-type="variable"][data-key="${M}"]`);if(_){if(_.dataset.variableRender==="antd-textarea"){const T=_.querySelector("textarea");if(T){T.focus();try{const F=T.value?.length??0;T.setSelectionRange(Math.min(D,F),Math.min(D,F))}catch{}r.current=null;return}}try{const T=document.createRange(),F=document.createTreeWalker(_,NodeFilter.SHOW_TEXT,null);let V=0,$=null,H=0;for(;F.nextNode();){const k=F.currentNode,G=k.textContent?.length||0;if(V+G>=D){$=k,H=D-V;break}V+=G}if($){T.setStart($,Math.min(H,$.textContent?.length||0)),T.collapse(!0);const k=window.getSelection();k&&(k.removeAllRanges(),k.addRange(T),_.focus())}else{T.selectNodeContents(_),T.collapse(!1);const k=window.getSelection();k&&(k.removeAllRanges(),k.addRange(T),_.focus())}}catch{const T=document.createRange();T.selectNodeContents(_),T.collapse(!1);const F=window.getSelection();F&&(F.removeAllRanges(),F.addRange(T),_.focus())}r.current=null}},0)}},[t,a,l,e,n,r,i,u,s,o,c,d]);w.useEffect(()=>{m()},[m])}function h1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=o=>typeof o=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(o):o.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(o.name||""),u=o=>{const c=o.target?.closest(".upload-info-icon");if(c&&c.classList.contains("upload-info-icon")){const h=c.dataset.uploadKey;if(h){const f=c.dataset.tooltip||"";let y=!1;try{const v=JSON.parse(f);v&&v.type==="steps"&&Array.isArray(v.images)&&(y=!0)}catch{}if(y){const E=c.closest('[data-type="upload"], [data-type="video-upload"]');l({key:h,anchorEl:E||c,type:"upload"})}else{const E=c.closest('[data-type="upload"], [data-type="video-upload"]');l({key:h,anchorEl:E||c,type:"upload"})}}return}const d=o.target?.closest('[data-type="upload"]');if(d){const h=d.dataset.key;if(h){const f=a[h];f&&i(f)&&l({key:h,anchorEl:d,type:"upload-preview"})}}},s=o=>{if(n)return;const c=o.target?.closest(".upload-info-icon"),d=o.relatedTarget;if(d?.closest?.(".rte-tooltip-overlay"))return;if(c&&c.classList.contains("upload-info-icon")){const f=c.closest('[data-type="upload"], [data-type="video-upload"]');if(d&&f&&f.contains(d))return;if(!d||!r.contains(d))l(null);else{const y=d.closest('[data-type="upload"], [data-type="video-upload"]');(!y||y!==f)&&l(null)}return}const h=o.target?.closest('[data-type="upload"], [data-type="video-upload"]');if(h){const f=d;if(f?.closest?.(".rte-tooltip-overlay")||f&&h.contains(f))return;l(null)}};return r.addEventListener("mouseover",u,!0),r.addEventListener("mouseout",s,!0),()=>{r.removeEventListener("mouseover",u,!0),r.removeEventListener("mouseout",s,!0)}},[t,a,e,l,n])}function b1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=c=>{if(l==="hideTagClose")return;const d=c.currentTarget,h=d.dataset.tooltip,f=d.dataset.tagKey||"";h&&a({key:f,anchorEl:d,type:"tag"})},u=c=>{n||c.relatedTarget?.closest?.(".rte-tooltip-overlay")||a(null)};let s;const o=()=>{r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.addEventListener("mouseenter",i),d.addEventListener("mouseleave",u)})};return s=requestAnimationFrame(()=>{s=requestAnimationFrame(o)}),()=>{cancelAnimationFrame(s),r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.removeEventListener("mouseenter",i),d.removeEventListener("mouseleave",u)})}},[t,e,a,l,n])}function m1(e,t,a,l){w.useEffect(()=>{const n=e.current;if(!n)return;const r=u=>{if(u.target?.closest(".rte-report-dropdown-host"))return;const o=u.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const c=o.dataset.variableKey;c&&a({key:c,anchorEl:o,type:"variable"});return}},i=u=>{if(l)return;const s=u.target,o=u.relatedTarget;if(o?.closest?.(".rte-tooltip-overlay"))return;if(s?.closest?.(".variable-info-icon")){if(!o||!n.contains(o)){a(null);return}!!o.closest?.(".variable-info-icon")||a(null)}};return n.addEventListener("mouseover",r,!0),n.addEventListener("mouseout",i,!0),()=>{n.removeEventListener("mouseover",r,!0),n.removeEventListener("mouseout",i,!0)}},[t,e,a,l])}function v1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=d=>typeof d=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(d):d.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(d.name||""),u=d=>{const h=d.currentTarget,f=h.dataset.fileName,y=h.closest('[data-type="upload"]'),E=y?.dataset.key||"",v=E?a[E]:null;if(v&&i(v)){l({key:E,anchorEl:y||h,type:"upload-preview"});return}f&&l({key:E,anchorEl:y||h,type:"upload-label"})},s=d=>{n||d.relatedTarget?.closest?.(".rte-tooltip-overlay")||l(null)};let o;const c=()=>{r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.addEventListener("mouseenter",u),h.addEventListener("mouseleave",s)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(c)}),()=>{cancelAnimationFrame(o),r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.removeEventListener("mouseenter",u),h.removeEventListener("mouseleave",s)})}},[t,a,e,l,n])}function g1(e,t,a,l,n,r,i,u){w.useEffect(()=>{const s=setTimeout(()=>{fa(e,t,a,n),Yl(e,t,a,l,n,{reportAnalyzeState:i,requireReportUrlAnalyze:u})},0);return()=>clearTimeout(s)},[a,t,e,l,n,r,i,u])}function E1(e,t){const a=w.useRef(0),l=w.useRef(0);w.useEffect(()=>{if(!e.current)return;let n=!1,r=0;const i=m=>m instanceof HTMLElement?!!(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker")||m.closest(".ant-picker-dropdown")):!1,u=m=>m instanceof HTMLElement?!!(m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown")):!1,s=m=>{n=!0,i(m.target)&&(a.current=Date.now()),u(m.target)&&(l.current=Date.now())},o=()=>{n=!1,r=Date.now()};let c=!1,d=0;const h=()=>{c=!0},f=()=>{c=!1,d=Date.now()},y=()=>{d=Date.now()},E=m=>{i(m.target)&&(a.current=Date.now()),u(m.target)&&(l.current=Date.now())},v=()=>{if(Date.now()-a.current<800||Date.now()-l.current<800)return;const m=document.activeElement;if(m&&(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker-dropdown")||m.tagName==="INPUT"&&m.closest(".ant-picker")||m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown"))||!e.current)return;const b=window.getSelection();if(!b||b.rangeCount===0||t.current||n||c||Date.now()-d<500)return;const x=b.getRangeAt(0);if(!x.collapsed)return e.current.contains(x.commonAncestorContainer),void 0;const C=b.anchorNode;if(!C||!e.current.contains(C))return;let A=!1,O=!1;if(C.nodeType===Node.ELEMENT_NODE){const S=C;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(O=!0)}else if(C.parentElement){const S=C.parentElement;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(O=!0)}if(A||O)return;let N=null;if(C.nodeType===Node.ELEMENT_NODE?N=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(N=C.parentElement.closest('[data-type="variable"]')),!N){if(Date.now()-r>500)return;const S=e.current.querySelectorAll('[data-type="variable"]');if(S.length>0){let L=null;for(const I of Array.from(S))if(I.style.display!=="none"){L=I;break}if(!L&&S.length>0&&(L=S[0]),L){const I=document.createRange();I.selectNodeContents(L),I.collapse(!1),b.removeAllRanges(),b.addRange(I),L.focus()}else b.removeAllRanges()}else b.removeAllRanges()}},g=e.current;return g&&(g.addEventListener("compositionstart",h),g.addEventListener("compositionend",f),g.addEventListener("input",y)),document.addEventListener("mousedown",s),document.addEventListener("mouseup",o),document.addEventListener("focusin",E),document.addEventListener("selectionchange",v),()=>{g&&(g.removeEventListener("compositionstart",h),g.removeEventListener("compositionend",f),g.removeEventListener("input",y)),document.removeEventListener("mousedown",s),document.removeEventListener("mouseup",o),document.removeEventListener("focusin",E),document.removeEventListener("selectionchange",v)}},[e,t])}var Ol={exports:{}},y1=Ol.exports,co;function fo(){return co||(co=1,function(e,t){(function(a,l){e.exports=l()})(y1,function(){var a=1e3,l=6e4,n=36e5,r="millisecond",i="second",u="minute",s="hour",o="day",c="week",d="month",h="quarter",f="year",y="date",E="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var T=["th","st","nd","rd"],F=_%100;return"["+_+(T[(F-20)%10]||T[F]||T[0])+"]"}},b=function(_,T,F){var V=String(_);return!V||V.length>=T?_:""+Array(T+1-V.length).join(F)+_},x={s:b,z:function(_){var T=-_.utcOffset(),F=Math.abs(T),V=Math.floor(F/60),$=F%60;return(T<=0?"+":"-")+b(V,2,"0")+":"+b($,2,"0")},m:function _(T,F){if(T.date()<F.date())return-_(F,T);var V=12*(F.year()-T.year())+(F.month()-T.month()),$=T.clone().add(V,d),H=F-$<0,k=T.clone().add(V+(H?-1:1),d);return+(-(V+(F-$)/(H?$-k:k-$))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:d,y:f,w:c,d:o,D:y,h:s,m:u,s:i,ms:r,Q:h}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},C="en",A={};A[C]=m;var O="$isDayjsObject",N=function(_){return _ instanceof M||!(!_||!_[O])},S=function _(T,F,V){var $;if(!T)return C;if(typeof T=="string"){var H=T.toLowerCase();A[H]&&($=H),F&&(A[H]=F,$=H);var k=T.split("-");if(!$&&k.length>1)return _(k[0])}else{var G=T.name;A[G]=T,$=G}return!V&&$&&(C=$),$||!V&&C},L=function(_,T){if(N(_))return _.clone();var F=typeof T=="object"?T:{};return F.date=_,F.args=arguments,new M(F)},I=x;I.l=S,I.i=N,I.w=function(_,T){return L(_,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var M=function(){function _(F){this.$L=S(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[O]=!0}var T=_.prototype;return T.parse=function(F){this.$d=function(V){var $=V.date,H=V.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var k=$.match(v);if(k){var G=k[2]-1||0,j=(k[7]||"0").substring(0,3);return H?new Date(Date.UTC(k[1],G,k[3]||1,k[4]||0,k[5]||0,k[6]||0,j)):new Date(k[1],G,k[3]||1,k[4]||0,k[5]||0,k[6]||0,j)}}return new Date($)}(F),this.init()},T.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},T.$utils=function(){return I},T.isValid=function(){return this.$d.toString()!==E},T.isSame=function(F,V){var $=L(F);return this.startOf(V)<=$&&$<=this.endOf(V)},T.isAfter=function(F,V){return L(F)<this.startOf(V)},T.isBefore=function(F,V){return this.endOf(V)<L(F)},T.$g=function(F,V,$){return I.u(F)?this[V]:this.set($,F)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(F,V){var $=this,H=!!I.u(V)||V,k=I.p(F),G=function(oe,pe){var ve=I.w($.$u?Date.UTC($.$y,pe,oe):new Date($.$y,pe,oe),$);return H?ve:ve.endOf(o)},j=function(oe,pe){return I.w($.toDate()[oe].apply($.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(pe)),$)},P=this.$W,U=this.$M,X=this.$D,Z="set"+(this.$u?"UTC":"");switch(k){case f:return H?G(1,0):G(31,11);case d:return H?G(1,U):G(0,U+1);case c:var W=this.$locale().weekStart||0,le=(P<W?P+7:P)-W;return G(H?X-le:X+(6-le),U);case o:case y:return j(Z+"Hours",0);case s:return j(Z+"Minutes",1);case u:return j(Z+"Seconds",2);case i:return j(Z+"Milliseconds",3);default:return this.clone()}},T.endOf=function(F){return this.startOf(F,!1)},T.$set=function(F,V){var $,H=I.p(F),k="set"+(this.$u?"UTC":""),G=($={},$[o]=k+"Date",$[y]=k+"Date",$[d]=k+"Month",$[f]=k+"FullYear",$[s]=k+"Hours",$[u]=k+"Minutes",$[i]=k+"Seconds",$[r]=k+"Milliseconds",$)[H],j=H===o?this.$D+(V-this.$W):V;if(H===d||H===f){var P=this.clone().set(y,1);P.$d[G](j),P.init(),this.$d=P.set(y,Math.min(this.$D,P.daysInMonth())).$d}else G&&this.$d[G](j);return this.init(),this},T.set=function(F,V){return this.clone().$set(F,V)},T.get=function(F){return this[I.p(F)]()},T.add=function(F,V){var $,H=this;F=Number(F);var k=I.p(V),G=function(U){var X=L(H);return I.w(X.date(X.date()+Math.round(U*F)),H)};if(k===d)return this.set(d,this.$M+F);if(k===f)return this.set(f,this.$y+F);if(k===o)return G(1);if(k===c)return G(7);var j=($={},$[u]=l,$[s]=n,$[i]=a,$)[k]||1,P=this.$d.getTime()+F*j;return I.w(P,this)},T.subtract=function(F,V){return this.add(-1*F,V)},T.format=function(F){var V=this,$=this.$locale();if(!this.isValid())return $.invalidDate||E;var H=F||"YYYY-MM-DDTHH:mm:ssZ",k=I.z(this),G=this.$H,j=this.$m,P=this.$M,U=$.weekdays,X=$.months,Z=$.meridiem,W=function(pe,ve,Ye,Pe){return pe&&(pe[ve]||pe(V,H))||Ye[ve].slice(0,Pe)},le=function(pe){return I.s(G%12||12,pe,"0")},oe=Z||function(pe,ve,Ye){var Pe=pe<12?"AM":"PM";return Ye?Pe.toLowerCase():Pe};return H.replace(g,function(pe,ve){return ve||function(Ye){switch(Ye){case"YY":return String(V.$y).slice(-2);case"YYYY":return I.s(V.$y,4,"0");case"M":return P+1;case"MM":return I.s(P+1,2,"0");case"MMM":return W($.monthsShort,P,X,3);case"MMMM":return W(X,P);case"D":return V.$D;case"DD":return I.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return W($.weekdaysMin,V.$W,U,2);case"ddd":return W($.weekdaysShort,V.$W,U,3);case"dddd":return U[V.$W];case"H":return String(G);case"HH":return I.s(G,2,"0");case"h":return le(1);case"hh":return le(2);case"a":return oe(G,j,!0);case"A":return oe(G,j,!1);case"m":return String(j);case"mm":return I.s(j,2,"0");case"s":return String(V.$s);case"ss":return I.s(V.$s,2,"0");case"SSS":return I.s(V.$ms,3,"0");case"Z":return k}return null}(pe)||k.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(F,V,$){var H,k=this,G=I.p(V),j=L(F),P=(j.utcOffset()-this.utcOffset())*l,U=this-j,X=function(){return I.m(k,j)};switch(G){case f:H=X()/12;break;case d:H=X();break;case h:H=X()/3;break;case c:H=(U-P)/6048e5;break;case o:H=(U-P)/864e5;break;case s:H=U/n;break;case u:H=U/l;break;case i:H=U/a;break;default:H=U}return $?H:I.a(H)},T.daysInMonth=function(){return this.endOf(d).$D},T.$locale=function(){return A[this.$L]},T.locale=function(F,V){if(!F)return this.$L;var $=this.clone(),H=S(F,V,!0);return H&&($.$L=H),$},T.clone=function(){return I.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},_}(),D=M.prototype;return L.prototype=D,[["$ms",r],["$s",i],["$m",u],["$H",s],["$W",o],["$M",d],["$y",f],["$D",y]].forEach(function(_){D[_[1]]=function(T){return this.$g(T,_[0],_[1])}}),L.extend=function(_,T){return _.$i||(_(T,M,L),_.$i=!0),L},L.locale=S,L.isDayjs=N,L.unix=function(_){return L(1e3*_)},L.en=A[C],L.Ls=A,L.p={},L})}(Ol)),Ol.exports}var T1=fo();const Dl=cn(T1);var Pl={exports:{}},x1=Pl.exports,po;function C1(){return po||(po=1,function(e,t){(function(a,l){e.exports=l(fo())})(x1,function(a){function l(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var n=l(a),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(i,u){return u==="W"?i+"周":i+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(i,u){var s=100*i+u;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return n.default.locale(r,null,!0),r})}(Pl)),Pl.exports}C1();function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function S1(e,t){if(qa(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var l=a.call(e,t);if(qa(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A1(e){var t=S1(e,"string");return qa(t)=="symbol"?t:t+""}function w1(e,t,a){return(t=A1(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ho(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,l)}return a}function bo(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ho(Object(a),!0).forEach(function(l){w1(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ho(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}var _1={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},k1=bo(bo({},_1),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});const N1={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},mo={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},k1),timePickerLocale:Object.assign({},N1)};mo.lang.ok="确定",Dl.locale("zh-cn");const{RangePicker:I1}=fe.DatePicker,L1=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.value,n=e.dataset.placeholder,r=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,i=e.dataset.disableFuture==="true",[u,s]=w.useState(()=>{if(!l)return null;const E=l.split(",");return E.length===2&&E[0]&&E[1]?[Dl(E[0]),Dl(E[1])]:null}),[o,c]=w.useState(null),d=E=>E?i&&E.isAfter(Dl(),"day")?!0:!r||!o||!o[0]?!1:Math.abs(E.diff(o[0],"days"))>r:!1,h=E=>{c(E)},f=E=>{if(s(E),c(null),E&&E[0]&&E[1]){const v=`${E[0].format("YYYY-MM-DD")},${E[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",v),t(a,v)}else e.setAttribute("data-value",""),t(a,"")},y=E=>{c(E?u:null)};return mt.createPortal(z.jsx("div",{className:"rte-datepicker-wrapper",contentEditable:!1,style:{display:"inline-block",verticalAlign:"middle",width:"260px",marginLeft:"4px",marginRight:"4px",fontSize:"16px",height:"30px",lineHeight:"30px"},children:z.jsx(I1,{value:u,disabledDate:d,onCalendarChange:h,onChange:f,onOpenChange:y,placeholder:[n||"开始日期",n||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:mo,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},O1=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-datepicker-host"),u=[];i.forEach(s=>{const o=s.getAttribute("data-key");o&&u.push(z.jsx(L1,{host:s,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`datepicker-${o}`))}),a(u)};n();const r=new MutationObserver(i=>{let u=!1;for(const s of i)if(s.type==="childList"){let o=!1;if(s.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),s.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),o){u=!0;break}}u&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},vo=({config:e,onSend:t,isProcessing:a=!1,disabled:l=!1,width:n,lockStructure:r=!1,agentOptions:i=[],onAgentSelect:u,onAgentExit:s,loading:o=!1,placeholder:c,border:d,background:h="transparent",hideButtons:f,maxHeight:y,minHeight:E,editorMinHeight:v,editorPadding:g,footerPadding:m,collapsed:b=!1,reportAnalyze:x,markdownAnalyze:C,markdownNameAnalyze:A,onCollapsedChange:O,collapseTransitionMs:N=260,debugTooltipSticky:S=!1,nodeValues:L,onFilesChange:I,onFooterFilesChange:M,showFooterUpload:D=!0,footerFiles:_,videoUrlParse:T,videoUpload:F,reportListFetch:V,onReportGoGenerate:$,onViewReport:H,hideCurrentSessionReport:k,reportNameResolve:G})=>{const[j,P]=fe.message.useMessage(),U=w.useRef(null),X=w.useRef(null),Z=w.useRef(null),W=w.useRef(null),le=w.useRef(null),oe=w.useRef(null),[pe,ve]=w.useState(!1),Ye=w.useRef("");if(!Ye.current){const J=Math.random().toString(36).slice(2,8);Ye.current=`rte_${J}`}const[Pe,Ut]=w.useState({});w.useEffect(()=>{I?.(Pe)},[Pe,I]);const[lt,Et]=w.useState([]),sa=w.useRef(!1);w.useEffect(()=>{if(!_)return;if(!(_.length===lt.length&&_.every((ie,re)=>{const he=lt[re];return he&&ie.name===he.name&&ie.size===he.size&&ie.lastModified===he.lastModified})))if(_.reduce((he,ge)=>he+ge.size,0)>52428800){const he=[];let ge=0;for(const ue of _){if(ge+ue.size>52428800)break;he.push(ue),ge+=ue.size}j.error("文件总大小不能超过 50MB"),Et(he)}else sa.current=!0,Et(_)},[_]),w.useEffect(()=>{if(sa.current){sa.current=!1;return}M?.(lt)},[lt,M]);const[Cr,Ga]=w.useState(null),[Ml,Bl]=w.useState(null),[Sr,Fl]=w.useState(null),[rt,Ya]=w.useState({}),[Q,ne]=w.useState(""),[de,ye]=w.useState(!1),we=w.useRef(null),We=w.useRef(null),{tooltipPortal:yt,setPopoverVisible:Ve}=DE({config:e,files:Pe,debugTooltipSticky:S,videoState:rt}),{handleFileChange:qt,handleRemoveFile:zt}=gc({config:e,messageApi:j,activeBatchKey:Ml,activeFileKey:Cr,activeBatchStartIndex:Sr,setActiveFileKey:Ga,setActiveBatchKey:Bl,setActiveBatchStartIndex:Fl,setFiles:Ut}),He=w.useRef(null),[Tt,it]=w.useState({showLeft:!1,showRight:!1}),Wa=w.useCallback(()=>{const J=He.current;J&&it({showLeft:J.scrollLeft>0,showRight:J.scrollLeft+J.clientWidth<J.scrollWidth-1})},[]),Y1=w.useCallback(J=>{if(!J.target.files||J.target.files.length===0)return;const ie=10*1024*1024,re=50*1024*1024,he=ue=>ue.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(ue.name||""),ge=Array.from(J.target.files).filter(ue=>he(ue)&&ue.size>ie?(j.error("图片大小不能超过 10MB"),!1):!0);Et(ue=>{const be=ue.reduce((_e,Ie)=>_e+Ie.size,0),Ee=[];let xe=be;for(const _e of ge){if(xe+_e.size>re){j.error("文件总大小不能超过 50MB");break}Ee.push(_e),xe+=_e.size}return Ee.length>0?[...ue,...Ee]:ue}),J.target.value="",setTimeout(Wa,0)},[j,Wa]),W1=w.useCallback(J=>{Et(ie=>ie.filter((re,he)=>he!==J)),setTimeout(Wa,0)},[Wa]),j1=w.useCallback(()=>{const J=He.current;J&&J.scrollBy({left:200,behavior:"smooth"})},[]),K1=w.useCallback(()=>{const J=He.current;J&&J.scrollBy({left:-200,behavior:"smooth"})},[]),wo=w.useCallback(()=>{l||ve(!0)},[l]);w.useEffect(()=>{l&&ve(!1)},[l]),w.useEffect(()=>{const J=he=>he instanceof Element?!!he.closest([".rte-agent-dropdown",".rte-report-dropdown-overlay",".rte-tooltip-overlay",".ant-picker-dropdown",".ant-select-dropdown",".ant-image-preview-root"].join(",")):!1,ie=he=>{const ge=U.current,ue=he.target;ge&&(ue instanceof Node&&ge.contains(ue)||J(ue)||ve(!1))},re=he=>{const ge=U.current,ue=he.target;if(ge){if(ue instanceof Node&&ge.contains(ue)){l||ve(!0);return}J(ue)||ve(!1)}};return document.addEventListener("mousedown",ie,!0),document.addEventListener("focusin",re,!0),()=>{document.removeEventListener("mousedown",ie,!0),document.removeEventListener("focusin",re,!0)}},[l]);const Ar=w.useRef(!1),X1=w.useRef(null),{handleMouseDown:Q1,handleMouseMove:J1,handleMouseUp:Z1,handleDoubleClick:ey}=Bc({lockStructure:r,onAgentExit:s,editorRef:W,setPopoverVisible:Ve,isDraggingRef:Ar,mouseDownPosRef:X1}),[_o,Rl]=w.useState(!1),wr=w.useRef(null),[ko,No]=w.useState(!0),ty=w.useRef(0),[Io,ay]=w.useState(58),[ly,ny]=w.useState(58),[Lo,ry]=w.useState(!1),[Hl,_r]=w.useState(null),ja=w.useRef(!1),Ka=w.useRef(!1),ht=w.useRef(null),[oa,Xa]=w.useState({}),Ot=w.useRef(()=>{}),Vt=w.useRef({}),kr=w.useRef(!1),$l=w.useRef(null),Qa=w.useCallback(()=>{kr.current=!0,$l.current!==null&&window.clearTimeout($l.current),$l.current=window.setTimeout(()=>{kr.current=!1,$l.current=null},50)},[]),[Gt,Ul]=w.useState({}),Oo=w.useRef(()=>{}),iy=w.useRef({}),Nr=w.useRef(Gt);w.useEffect(()=>{Nr.current=Gt},[Gt]);const[Yt,Ir]=w.useState({}),Do=w.useRef(()=>{}),Po=w.useRef(Yt);w.useEffect(()=>{Po.current=Yt},[Yt]);const[xt,Ja]=w.useState(()=>{const J={};return e.forEach(ie=>{Ue(ie.type)&&ie.key&&(J[ie.key]=1)}),J});Ac({config:e,editorRef:W,files:Pe,setFiles:Ut,multiVariableCounts:xt,setMultiVariableCounts:Ja,reportAnalyzeState:oa,setReportAnalyzeState:Xa,markdownAnalyzeState:Gt,setMarkdownAnalyzeState:Ul,markdownNameAnalyzeState:Yt,setMarkdownNameAnalyzeState:Ir,nodeValues:L,resolvedReportNamesRef:Vt});const Mo=w.useRef(L);if(L!==Mo.current&&(Mo.current=L,L)){const J={};let ie=!1;e.forEach(re=>{if(Ue(re.type)&&re.key){const he=L[re.key],ge=Array.isArray(he)?he.filter(ue=>ue.trim().length>0):he;if(Array.isArray(ge)&&ge.length>0){const ue=re.maxCount??9,be=Math.min(ge.length+1,ue);xt[re.key]!==be&&(J[re.key]=be,ie=!0)}}}),ie&&(Qa(),Ja(re=>({...re,...J})))}const Ne=Ic({config:e,reportAnalyzeState:oa,markdownAnalyzeState:Gt,markdownNameAnalyzeState:Yt}),ql=w.useRef(()=>{}),{handleReportUrlBlur:uy,handleMarkdownBlur:sy,handleMarkdownNameBlur:oy,handleMultiVariableNameResolve:Bo}=_c({reportAnalyze:x,markdownAnalyze:C,markdownNameAnalyze:A,reportAnalyzeState:oa,setReportAnalyzeState:Xa,markdownAnalyzeState:Gt,setMarkdownAnalyzeState:Ul,markdownNameAnalyzeState:Yt,setMarkdownNameAnalyzeState:Ir,editorRef:W,reportAnalyzeRef:Ot,markdownAnalyzeRef:Oo,markdownNameAnalyzeRef:Do,markdownAnalyzeStateRef:Nr,markdownNameAnalyzeStateRef:Po,reportNameResolve:G,applyReportNameChipRef:ql});uc(W,uy,[Ne]),mc(W,oy,[Ne]),vc(W,sy,[Ne]),w.useEffect(()=>{const J=W.current;if(!J||!G)return;const ie=re=>{const he=re.target;if(!he)return;const ge=he.closest?.('[data-type="variable"][data-multi-key]');if(!ge)return;const ue=ge.dataset.key;if(!ue)return;const be=wr.current?.key===ue;if(kr.current&&(be||!J.contains(ge)))return;const Ee=J.contains(ge)?ge:J.querySelector(`[data-type="variable"][data-key="${ue}"]`);if(!Ee||Ee.getAttribute("data-report-url"))return;const xe=(Ee.innerText||"").replace(/[\u200B\n]/g,"").trim(),_e=Ee.dataset.multiKey,$e=(_e?Ne.find(ut=>Ue(ut.type)&&ut.key===_e):void 0)?.type==="multi-variable-select"?"multi-variable-select":"multi-variable";Bo(ue,xe,$e)};return J.addEventListener("focusout",ie),()=>J.removeEventListener("focusout",ie)},[W,Bo,Ne,G]),ic(W,[Ne]),ql.current=(J,ie,re,he)=>{const ge=W.current;if(!ge)return;let ue=ge.querySelector(`[data-type="variable"][data-key="${J}"]`);if(ue&&!document.body.contains(ue)){const xe=document.querySelectorAll(`.rte-editor [data-type="variable"][data-key="${J}"]`);let _e=null;xe.forEach(Ie=>{!_e&&document.body.contains(Ie)&&(_e=Ie)}),ue=_e}if(!ue){Vt.current[J]={name:ie,url:re};return}if(ue.getAttribute("data-report-url")===re){Vt.current[J]={name:ie,url:re};return}if(!he?.forceApply){const xe=ue.getAttribute("data-report-url"),_e=(ue.innerText||"").replace(/[\u200B\n]/g,"").trim();if(!(!xe&&_e==="")&&!(xe===re||_e===re))return}Vt.current[J]={name:ie,url:re};const be=ue.querySelector(".rte-report-dropdown-host");be&&(be.style.display="",be.style.visibility="",be.classList.remove("hidden"),be.classList.add("rte-report-dropdown-host-quiet"));const Ee=[document.createTextNode(ie)];be&&Ee.push(be),ue.classList.remove("show-placeholder","rte-variable-with-icon"),ue.classList.add("rte-report-name-chip"),ue.setAttribute("data-report-url",re),ue.setAttribute("data-report-name",ie),ue.contentEditable="false",ue.replaceChildren(...Ee),Vl(ue),document.dispatchEvent(new CustomEvent("rte-report-dropdown-force-close",{detail:{key:J}})),setTimeout(()=>{Dr.current()},0)};const cy=w.useCallback((J,ie,re)=>{W.current&&(ie==="report-url"?(ql.current(J,re.name,re.url,{forceApply:!0}),setTimeout(()=>{Ot.current(J,re.url)},0)):(ie==="multi-variable"||ie==="multi-variable-select")&&(ql.current(J,re.name,re.url,{forceApply:!0}),ie==="multi-variable-select"&&setTimeout(()=>{Ot.current(J,re.url)},0)))},[W,Ot]),dy=Ne.map(J=>`${J.type}:${J.key??""}:${J.placeholder??""}`).join("|"),fy=fc(W,V,cy,$,H,`${dy}::${JSON.stringify(xt)}`,k);p1(W,Ne,Pe,r,xt,wr,void 0,f,void 0,L,rt,!!V,Vt);const Lr=w.useRef(new Set),Fo=w.useRef(Ne),Ro=w.useRef(L);(Fo.current!==Ne||Ro.current!==L)&&(Fo.current=Ne,Ro.current=L,Lr.current=new Set),w.useEffect(()=>{if(!L||!Ne||Ne.length===0)return;const J=Ne.filter(be=>be.type==="upload"&&be.key);if(J.length===0)return;const ie={},re=(be,Ee)=>{Ee&&(Ee instanceof File?ie[be]=Ee:typeof Ee=="string"&&Ee.trim()&&(ie[be]=Ee.trim()))};for(const be of J){const Ee=be.key;if(Lr.current.has(Ee))continue;const xe=L[Ee],_e=typeof be.maxCount=="number"&&be.maxCount>1;if(Array.isArray(xe)&&xe.length>0){_e?xe.forEach((Ie,$e)=>re(`${Ee}-${$e}`,Ie)):re(Ee,xe[0]);continue}if(xe&&!Array.isArray(xe)){re(Ee,xe);continue}if(_e)for(let Ie=0;Ie<be.maxCount;Ie++){const $e=`${Ee}-${Ie}`,ut=L[$e];if(!ut)break;re($e,ut)}}if(Object.keys(ie).length===0)return;for(const be of J)L[be.key]!==void 0&&Lr.current.add(be.key);Ut(be=>{const Ee={...be};let xe=!1;for(const _e of J){const Ie=_e.key;if(L[Ie]===void 0)continue;if(typeof _e.maxCount=="number"&&_e.maxCount>1)for(let ut=0;ut<_e.maxCount;ut++){const Mr=`${Ie}-${ut}`;!ie[Mr]&&be[Mr]&&(Ee[Mr]=null,xe=!0)}}for(const[_e,Ie]of Object.entries(ie))be[_e]!==Ie&&(Ee[_e]=Ie,xe=!0);return xe?Ee:be});const he=Object.entries(ie).filter(([,be])=>typeof be=="string");if(he.length===0)return;const ge=async be=>{const Ee=be.split("/").pop()?.split("?")[0]||"file",xe=decodeURIComponent(Ee),_e=async Ie=>{const $e=await Ie.blob();return new File([$e],xe,{type:$e.type||"application/octet-stream"})};try{const Ie=`/api/image-proxy?url=${encodeURIComponent(be)}`,$e=await fetch(Ie);if($e.ok)return _e($e)}catch{}return null};let ue=!1;return Promise.all(he.map(async([be,Ee])=>{const xe=await ge(Ee);return xe?{key:be,file:xe}:null})).then(be=>{if(ue)return;const Ee={};for(const xe of be)xe&&(Ee[xe.key]=xe.file);Object.keys(Ee).length>0&&Ut(xe=>{const _e={...xe};let Ie=!1;for(const[$e,ut]of Object.entries(Ee))typeof _e[$e]=="string"&&(_e[$e]=ut,Ie=!0);return Ie?_e:xe})}),()=>{ue=!0}},[L,Ne]);const Za=w.useRef(new Set),Ho=w.useRef(""),$o=(e||[]).filter(J=>J.key&&J.type!=="report-module"&&J.type!=="markdown-module").map(J=>`${J.type}:${J.key}`).join("|");Ho.current!==$o&&(Ho.current=$o,Za.current=new Set),w.useEffect(()=>{if(!L||!e||e.length===0)return;const J=e.filter(re=>re.type==="report-url"&&re.key),ie=e.filter(re=>re.type==="multi-variable-select"&&re.key);if(!(J.length===0&&ie.length===0)){for(const re of J){const he=re.key;if(Za.current.has(he))continue;const ge=L[he]??L[`${he}__url`];if(!ge||typeof ge=="string"&&!ge.trim())continue;const ue=Array.isArray(ge)?ge[0]:String(ge);ue&&(Za.current.add(he),setTimeout(()=>{Ot.current(he,ue)},100))}for(const re of ie){const he=re.key,ge=L[he];!Array.isArray(ge)||ge.length===0||ge.forEach((ue,be)=>{const Ee=typeof ue=="string"?ue.trim():"";if(!Ee)return;const xe=`${he}_${be}`;Za.current.has(xe)||(Za.current.add(xe),setTimeout(()=>{Ot.current(xe,Ee)},100))})}}},[L,e,Ot]),h1(W,Ne,Pe,Ve,S),b1(W,Ne,Ve,f,S),v1(W,Ne,Pe,Ve,S),m1(W,Ne,Ve,S);const Or=!!x;g1(W,Ne,Pe,Rl,rt,L,oa,Or),xc(W,T,rt,Ya,[Ne]);const py=Cc(F,Ya,W);Sc(W,rt,Ve,S),E1(W,Ar);const Uo=Xo(W),hy=Jo(W),by=ec(W),qo=rc(W);w.useEffect(()=>{if(!W.current)return;W.current.querySelectorAll(".rte-richtext-toggle").forEach(ie=>{const re=ie.getAttribute("data-expanded")==="true";ie.innerHTML=re?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})},[Ne,W]);const zo=O1(W),{measureExpandedContentHeight:el}=kc({collapsed:b,collapseTransitionMs:N,contentRef:X,contentBodyRef:Z,editorRef:W,debugIdRef:Ye,setCollapsedContentMaxHeightPx:ay,setExpandedContentMaxHeightPx:ny,setIsCollapseAnimating:ry,effectiveConfig:Ne,files:Pe,multiVariableCounts:xt,selectPortalsLength:Uo.length,datePickerPortalsLength:zo.length,variablePortalsLength:qo.length}),my=()=>{if(b)return;const J=Z.current;if(!J)return;const ie=Math.ceil(J.getBoundingClientRect().height||0);ie>0&&_r(ie),ja.current=!0,Ka.current=!1,ht.current&&(window.clearTimeout(ht.current),ht.current=null)};w.useEffect(()=>{const J=()=>{ja.current&&(Ka.current=!0,ht.current&&window.clearTimeout(ht.current),ht.current=window.setTimeout(()=>{ht.current=null,ja.current=!1,Ka.current=!1,_r(null),window.requestAnimationFrame(()=>el())},450))};return window.addEventListener("focus",J),()=>window.removeEventListener("focus",J)},[el]),w.useEffect(()=>{!ja.current||!Ka.current||(ht.current&&(window.clearTimeout(ht.current),ht.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{_r(null),el(),ja.current=!1,Ka.current=!1})}))},[Pe,el]),Nc({config:e,editorRef:W,setIsEmpty:No,setIsFormValid:Rl});const vy=Dc({disabled:l,collapsed:b,onCollapsedChange:O,config:e,lockStructure:r,editorRef:W,containerRef:U,fileInputRef:le,onBeforeFilePickerOpen:my,files:Pe,setFiles:Ut,handleRemoveFile:zt,setActiveBatchKey:Bl,setActiveBatchStartIndex:Fl,setActiveFileKey:Ga,isDraggingRef:Ar,richtextPrevScrollTopRef:ty,videoState:rt,setVideoState:Ya,videoFileInputRef:we,activeVideoKeyRef:We,onImagePreview:J=>{ne(J),ye(!0)}}),tl=Pc({config:e,editorRef:W,setIsEmpty:No,setIsFormValid:Rl,setReportAnalyzeState:Xa,setMarkdownAnalyzeState:Ul,setMarkdownNameAnalyzeState:Ir,collapsed:b,measureExpandedContentHeight:el,effectiveConfig:Ne,files:Pe,multiVariableCounts:xt,setMultiVariableCounts:Ja,savedCursorRef:wr,videoState:rt,resolvedReportNamesRef:Vt,reportAnalyzeState:oa,requireReportUrlAnalyze:Or}),Dr=w.useRef(tl);Dr.current=tl;const gy=Fc({disabled:l,config:e,multiVariableCounts:xt,setMultiVariableCounts:Ja,editorRef:W,handleInput:tl,markdownAnalyzeRef:Oo,reportAnalyzeRef:Ot,markdownNameAnalyzeRef:Do,markdownAnalyzeStateRef:Nr,markdownRawTextRef:iy,setMarkdownAnalyzeState:Ul,setFooterFiles:Et,footerFiles:lt,messageApi:j,onPasteUnsupported:()=>j.warning("暂不支持上传该文件类型")});Oc({config:e,effectiveConfig:Ne,files:Pe,editorRef:W,setIsFormValid:Rl,multiVariableCounts:xt,setMultiVariableCounts:Ja,videoState:rt,reportAnalyzeState:oa,requireReportUrlAnalyze:Or});const Pr=w.useCallback((J,ie)=>{delete Vt.current[J],ca({keys:[J]}),ie==="report-url"&&Xa(re=>({...re,[J]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}))},[Xa]),Ey=w.useCallback(J=>{Qa();const{nodeKey:ie,nodeType:re}=bc(J);Pr(ie,re),J.focus(),Dr.current()},[Pr,Qa]),yy=hc(W,Ey,xt),Vo=Rc({config:e,files:Pe,footerFiles:lt,onFooterFilesClear:()=>Et([]),onSend:t,isProcessing:a,disabled:l,loading:o,isFormValid:_o,editorRef:W,markdownAnalyzeState:Gt,markdownNameAnalyzeState:Yt,videoState:rt}),Ty=Mc({disabled:l,lockStructure:r,config:e,editorRef:W,handleInput:tl,onEnterSend:Vo,onReportChipDeleted:Pr}),xy={...n?{width:typeof n=="number"?`${n}px`:n}:{},...d?{border:d}:{},...h?{background:h}:{},...y?{maxHeight:typeof y=="number"?`${y}px`:y}:{},...E&&!b?{minHeight:typeof E=="number"?`${E}px`:E}:{},...lt.length>0?{height:"220px"}:{},...y?{"--rte-richtext-fullscreen-height":typeof y=="number"?`${y}px`:y}:{},...v?{"--rte-editor-min-height":typeof v=="number"?`${v}px`:v}:{},...g?{"--rte-editor-padding":g}:{},...m?{"--rte-footer-padding":m}:{}},Cy=typeof N=="number"&&Number.isFinite(N)&&N>=0?N:260,Sy={overflow:"hidden"},Ay=Hl!=null?`${Hl}px`:b?`${Io}px`:`${Math.max(ly,Io)}px`,wy=e.length===0&&ko&&!b,_y=Hl!=null||b||Lo||wy?"hidden":"auto",Go=w.useRef(b),Yo=Go.current!==b;Yo&&(Go.current=b);const ky=Hl!=null?"none":Yo||Lo?`max-height ${Cy}ms cubic-bezier(0.4, 0, 0.2, 1)`:"none",Ny={maxHeight:Ay,minHeight:b?0:void 0,overflow:_y,overscrollBehavior:pe?"contain":"auto",transition:ky,willChange:"max-height"};return z.jsxs("div",{className:`rich-text-editor ${pe?"rte-editor-selected":""}`,style:xy,"data-disabled":l,ref:U,onMouseDownCapture:wo,onFocusCapture:wo,children:[P,z.jsxs("div",{className:"rich-text-editor-content",ref:X,style:Sy,children:[lt.length>0&&z.jsxs("div",{className:"rte-footer-files-wrapper",children:[Tt.showLeft&&z.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-left",children:z.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-left",onClick:K1,children:z.jsx("svg",{style:{width:"16px",height:"16px",transform:"rotate(180deg)"},"aria-hidden":"true",children:z.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})}),z.jsx("div",{className:"rte-footer-files-list",ref:He,onScroll:Wa,children:lt.map((J,ie)=>{const re=J.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(J.name||""),he=J.size<1024?`${J.size}B`:J.size<1024*1024?`${Math.round(J.size/1024)}KB`:`${(J.size/(1024*1024)).toFixed(1)}MB`,ge=re?URL.createObjectURL(J):"";return z.jsxs("div",{className:"rte-footer-file-chip",style:re?{cursor:"pointer"}:void 0,onClick:re?()=>{ne(ge),ye(!0)}:void 0,children:[re?z.jsx("img",{style:{width:"32px",height:"32px",objectFit:"cover"},className:"rte-footer-file-thumb",src:ge,alt:J.name}):z.jsx("div",{className:"rte-footer-file-icon",children:z.jsx("svg",{style:{width:"18px",height:"18px"},"aria-hidden":"true",children:z.jsx("use",{xlinkHref:`#${(()=>{const ue=(J.name||"").split(".").pop()?.toLowerCase()||"";return["xls","xla","xlb","xlc","xlm","xlsx","xlt","xlw","csv","tsv","iif"].includes(ue)?"icon-a-xlsxcsv":["doc","docx","dot","odt","rtf","wiz"].includes(ue)?"icon-docx":["ppt","pptx","pot","ppa","pps","pwz"].includes(ue)?"icon-ppt":["txt","asm","bat","c","cc","conf","cpp","css","cxx","def","dic","eml","h","hh","in","js","ksh","php","pkl","rb","tar","tex","ts","xml"].includes(ue)?"icon-txt":ue==="pdf"?"icon-pdf":["html","htm","json","ics","ifb"].includes(ue)?"icon-a-htmljson":ue==="md"?"icon-md":"icon-lianjie"})()}`})})}),z.jsxs("div",{className:"rte-footer-file-info",children:[z.jsx("span",{className:"rte-footer-file-name",title:J.name,children:J.name}),z.jsx("span",{className:"rte-footer-file-size",children:he})]}),z.jsx("span",{className:"rte-footer-file-remove",onClick:ue=>{ue.stopPropagation(),W1(ie)},children:z.jsx("i",{className:"iconfont icon-guanbi ",style:{width:"8px",height:"8px",fontSize:"8px",display:"flex",alignItems:"center"}})})]},`${J.name}-${J.size}-${ie}`)})}),Tt.showRight&&z.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-right",children:z.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-right",onClick:j1,children:z.jsx("svg",{style:{width:"16px",height:"16px"},"aria-hidden":"true",children:z.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})})]}),z.jsxs("div",{ref:Z,className:`rich-text-editor-content-body ${e.length===0?"rich-text-editor-content-body-default":""}`,style:Ny,children:[z.jsx("div",{ref:W,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${ko&&c?"rte-editor-empty":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":c,onMouseDown:Q1,onMouseMove:J1,onMouseUp:Z1,onClick:vy,onDoubleClick:ey,onInput:()=>{Qa(),tl()},onKeyDown:Ty,onPaste:J=>{Qa(),gy(J)}}),z.jsx("input",{type:"file",ref:le,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:qt}),z.jsx("input",{type:"file",ref:we,className:"rte-file-input",accept:"video/*",onChange:J=>{const ie=J.target.files?.[0],re=We.current;ie&&ie.size>1024*1024*1024?j.warning("视频文件不能超过1GB"):ie&&re&&py(re,ie),We.current=null,we.current&&(we.current.value="")}})]})]}),z.jsxs("div",{className:"rich-text-editor-footer",children:[z.jsxs("div",{className:"rich-text-editor-footer-left",children:[z.jsx("div",{className:"rich-text-editor-brand",children:f!=="hideAgent"&&z.jsx(fe.Dropdown,{placement:"topLeft",menu:{items:i.filter(J=>J.isShowNew!==1).map(J=>({key:J.key,label:z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[J.icon&&z.jsx("i",{className:J.icon}),z.jsx("span",{children:J.label})]}),onClick:()=>{u?.(J)}}))},trigger:["click"],disabled:l||a,overlayClassName:"rte-agent-dropdown",children:z.jsxs("div",{className:"rte-agent-badge",style:{cursor:i.length>0?"pointer":"default"},children:[z.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),z.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})}),!e.find(J=>J.type==="tag")&&z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"rte-footer-upload-btn",onClick:()=>oe.current?.click(),title:"上传文件",children:z.jsx("i",{className:"iconfont icon-lianjie",style:{fontSize:"16px"}})}),z.jsx("input",{type:"file",ref:oe,className:"rte-file-input",accept:".pdf,.xla,.xlb,.xlc,.xlm,.xls,.xlsx,.xlt,.xlw,.csv,.tsv,.iif,.doc,.docx,.dot,.odt,.rtf,.pot,.ppa,.pps,.ppt,.pptx,.pwz,.wiz,.asm,.bat,.c,.cc,.conf,.cpp,.css,.cxx,.def,.dic,.eml,.h,.hh,.htm,.html,.ics,.ifb,.in,.js,.json,.ksh,.png,.jpeg,.jpg,.gif,.webp,.md,.php,.pkl,.rb,.tar,.tex,.ts,.txt,.xml,",multiple:!0,onChange:Y1})]})]}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[z.jsxs("div",{className:"rte-brand-badge",children:[z.jsx("div",{className:"rte-brand-badge",children:z.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""})}),z.jsx("span",{className:"rte-brand-text",style:{marginLeft:"4px"},children:"SealSeek 2.0"})]}),(()=>{const J=e.find(re=>re.type==="tag");if(!J||!J.text)return null;const ie=i.find(re=>re.label===J.text);return!ie||ie.points===void 0||ie.points===null?null:z.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[z.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),z.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(ie.points)]}),ie.labelValue===2&&z.jsx("div",{className:"rte-limited-free-badge",children:z.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),z.jsx("button",{type:"button",onClick:Vo,disabled:a||l||o||!_o,className:"rich-text-editor-send-button",children:a||o?z.jsx("span",{className:"rte-send-spinner"}):z.jsx("i",{className:"iconfont icon-fasong"})})]})]}),yt,z.jsx(fe.Image,{style:{display:"none"},src:Q,preview:{visible:de,onVisibleChange:J=>ye(J)}}),zo,Uo,hy,by,qo,fy,yy]})};vo.__docgenInfo={displayName:"RichTextEditor",description:"结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",props:{config:{name:"config",required:!0,description:"结构化输入配置节点数组",type:{name:"InputNode[]",raw:"InputNode[]"}},onSend:{name:"onSend",required:!0,description:"点击发送按钮时的回调,返回数据与拼接后的 Prompt",type:{name:"function",raw:"(data: Record<string, any>, fullPrompt: string) => void"}},isProcessing:{name:"isProcessing",required:!1,description:"是否处于处理状态(禁用输入与发送)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}}}};const go="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",D1=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],P1=({autoLoading:e,batchSize:t,loadingProgress:a,loadIcon:l,onBatchSizeChange:n,onLoadNextPage:r,onStartAutoLoad:i,onStopLoad:u})=>e&&a?z.jsxs("div",{className:"auto_load_progress",children:[l||z.jsx("img",{src:go,alt:"自动加载",width:14,height:14}),z.jsxs("span",{children:["正在加载第",a.currentPage,"/",a.totalPages,"页"]}),z.jsx(fe.Progress,{percent:a.percentage,type:"line",size:[160,8]}),z.jsx("span",{onClick:u,className:"auto_load_stop_btn",children:"停止加载"})]}):z.jsxs("div",{className:"auto_load_container",children:[z.jsx("div",{onClick:r,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),z.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[z.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:i,children:[l||z.jsx("img",{src:go,alt:"自动加载",width:14,height:14}),z.jsx("span",{children:"自动加载"})]}),z.jsx(fe.Select,{value:t,onChange:n,options:D1,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),M1=({current:e,loadIcon:t,pageSize:a,total:l,cachedPages:n,loadedCount:r,autoLoading:i=!1,loadingProgress:u,onChange:s,onLoadNextPage:o,onStartAutoLoad:c,onStopLoading:d})=>{const[h,f]=w.useState(5),y=Math.ceil(l/a),E=w.useMemo(()=>n.length>=y,[n,y]),v=()=>Array.from({length:y},(b,x)=>x+1).filter(b=>!n.includes(b)).slice(0,h),g=(m,b,x)=>{const C=n.includes(m);return b==="prev"||b==="next"||b==="jump-prev"||b==="jump-next"?z.jsx("div",{className:"pageBox",children:x}):z.jsxs("div",{className:"pageBox",style:{backgroundColor:e===m?"#2563EB":"#f5f5f5",color:e===m?"#fff":C?"#171717":"#a3a3a3"},children:[m,!C&&z.jsx("span",{className:"unload_spot"})]})};return z.jsxs("div",{className:"pagination_footer",children:[z.jsxs("div",{className:"pagination_leftWrap",children:[z.jsxs("span",{className:"pagination_total",children:[z.jsx(bt.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",r,"/",l,"条数据"]}),!E&&z.jsx(P1,{loadIcon:t||void 0,autoLoading:i,batchSize:h,loadingProgress:u,disabled:!o||!c,onBatchSizeChange:f,onLoadNextPage:()=>o?.(),onStartAutoLoad:()=>{const m=v();c?.(m)},onStopLoad:()=>d?.()})]}),z.jsx(fe.Pagination,{current:e,pageSize:a,total:l,onChange:m=>s(m),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:g})]})},Eo=e=>{const{loading:t,autoLoading:a,loadingProgress:l,columns:n=[],dataSource:r=[],total:i,current:u,pageSize:s,cachedPages:o,onChangePage:c,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f,...y}=e,E=w.useRef(null),v=w.useCallback(g=>{c(g),o.includes(g)&&E.current?.scrollTo({key:`${(g-1)*s+1}`})},[o,c,s]);return z.jsxs("div",{className:"flex flex-col",children:[z.jsx(fe.Table,{ref:E,...y,columns:n,dataSource:r,pagination:!1,virtual:!0}),z.jsx(M1,{loading:t,autoLoading:a,loadingProgress:l,current:u,pageSize:s,total:i,loadedCount:r.length,cachedPages:o,onChange:v,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f})]})};Eo.__docgenInfo={displayName:"VirtualTable",description:"虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",props:{loading:{description:"加载状态",name:"loading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},total:{description:"总数据条数",name:"total",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"0"}},current:{description:"当前页码",name:"current",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"1"}},pageSize:{description:"每页数据条数",name:"pageSize",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"10"}},cachedPages:{description:"已缓存的页码数组",name:"cachedPages",required:!0,type:{name:"number[]",raw:"number[]"},defaultValue:{value:"[]"}},dataSource:{description:"数据源",name:"dataSource",required:!0,type:{name:"Array<T>",raw:"Array<T>"},defaultValue:{value:"[]"}},onChangePage:{description:"页码变更回调函数",name:"onChangePage",required:!0,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},autoLoading:{description:"是否正在自动加载",name:"autoLoading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},loadingProgress:{description:"加载进度信息",name:"loadingProgress",required:!0,type:{name:"object",raw:"{percentage: 0, currentPage: 1, totalPages: 5}"},defaultValue:{value:"-"}},onLoadNextPage:{description:"加载下一页回调函数",name:"onLoadNextPage",required:!1,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},onStartAutoLoad:{description:"开始自动加载回调函数",name:"onStartAutoLoad",required:!1,type:{name:"function",raw:"function(loadNextPages: number[]): void"},defaultValue:{value:"-"}},onStopLoading:{description:"停止加载回调函数",name:"onStopLoading",required:!1,type:{name:"function",raw:"function(): void"},defaultValue:{value:"-"}},columns:{description:"表格列配置",name:"columns",required:!0,type:{name:"Array<object>",raw:"Array<object>"},defaultValue:{value:"[]"}}}};const yo=({texts:e=[],placeholder:t="请输入内容",animationSpeed:a=100,autoPlay:l=!0,value:n,onChange:r,...i})=>{const[u,s]=w.useState(""),[o,c]=w.useState(0),[d,h]=w.useState(!1),[f,y]=w.useState(!1),[E,v]=w.useState(!1),g=w.useRef(void 0),m=w.useRef(void 0),b=w.useRef(e),x=w.useRef(o),C=w.useRef(f),A=w.useRef(u);w.useEffect(()=>{b.current=e,x.current=o,C.current=f,A.current=u});const O=w.useCallback((_,T)=>{let F=0;v(!0);const V=()=>{F<_.length?(s(_.slice(0,F+1)),F++,m.current=window.setTimeout(V,a)):(v(!1),T?.())};V()},[a]),N=w.useCallback(_=>{let T=A.current.length;const F=()=>{T>0?(s(A.current.slice(0,T-1)),T--,m.current=window.setTimeout(F,a/2)):_?.()};F()},[a]),S=w.useCallback(()=>{if(b.current.length===0||C.current)return;h(!0);const _=b.current[x.current];A.current?N(()=>{O(_,()=>{g.current=window.setTimeout(()=>{c(T=>(T+1)%b.current.length),h(!1)},2e3)})}):O(_,()=>{g.current=window.setTimeout(()=>{c(T=>(T+1)%b.current.length),h(!1)},2e3)})},[N,O]);w.useEffect(()=>(l&&e.length>0&&!f&&S(),()=>{g.current&&window.clearTimeout(g.current),m.current&&window.clearTimeout(m.current)}),[o,f,l,e.length,S]),w.useEffect(()=>{!d&&l&&e.length>0&&!f&&S()},[o,d,l,e.length,f,S]);const L=_=>{y(!0),g.current&&window.clearTimeout(g.current),m.current&&window.clearTimeout(m.current),h(!1),v(!1),i.onFocus?.(_)},I=_=>{y(!1),!n&&e.length>0&&(s(""),c(0)),i.onBlur?.(_)},M=_=>{r?.(_.target.value),i.onChange?.(_)},D=()=>f||n?t:u||t;return z.jsxs("div",{style:{position:"relative"},children:[z.jsx(fe.Input,{...i,value:n,onChange:M,onFocus:L,onBlur:I,placeholder:D(),style:{...i.style,position:"relative",zIndex:1}}),!f&&!n&&u&&z.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",paddingLeft:11,paddingRight:11,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit"},children:[z.jsx("span",{children:u}),E&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("style",{children:`
|
|
64
|
+
`);return U.replace(/\n/g,"").trim().length>0?U:""},P=H.getAttribute("data-node-type");if(P==="report-url")if(G)A[`${k}__url`]=G;else{const U=j().replace(/\n/g,"").trim();U&&(A[`${k}__url`]=U)}else{const U=j();U&&(P==="markdown-name"?A[`${k}__name`]=U:A[k]=U)}}}),e.current.querySelectorAll('[data-type="select"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.getAttribute("data-value")||"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="searchable-select"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.getAttribute("data-value")||"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(H=>{const k=H.dataset.key;if(k){const G=H.value.replace(/[\u200B]/g,"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(H=>{const k=H.dataset.key;if(k){const G=H.getAttribute("data-node-type")||"",j=G==="report-module"||G==="markdown-module",P=j?(H.innerHTML||"").replace(/[\u200B]/g,"").trim():(H.textContent||"").replace(/[\u200B]/g,"").trim();if(j){const U=Number.parseInt(H.getAttribute("data-module-index")||"0",10);A[`${k}__module_${Number.isFinite(U)?U:0}`]=P}else P&&(A[k]=P)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.getAttribute("data-value")||"").trim();G&&(A[k]=G)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(H=>{const k=H.dataset.key;if(k){const G=(H.value||"").trim();G&&(A[k]=G)}})),o&&Object.keys(o).length>0){const M=new Set(t.filter(_=>_.type==="upload"&&_.key).map(_=>_.key)),D={};C||Object.entries(o).forEach(([_,T])=>{if(!Array.isArray(T))return;let F=0;for(let $=0;$<T.length;$++)`${_}_${$}`in A&&F++;let V=-1;for(let $=0;$<T.length;$++)f.current.has(`${_}_${$}`)&&(V=$);if(V>=F&&F<T.length)for(let $=F;$<T.length;$++)N.add(`${_}_${$}`)}),Object.entries(o).forEach(([_,T])=>{M.has(_)||(Array.isArray(T)?T.forEach((F,V)=>{F!=null&&String(F).trim()!==""&&(D[`${_}_${V}`]=String(F))}):T!=null&&String(T).trim()!==""&&(t.find(V=>V.key===_&&V.type==="report-url")?D[`${_}__url`]=String(T):D[_]=String(T)))}),Object.entries(D).forEach(([_,T])=>{const F=_ in A,V=N.has(_),$=g.current[_]!==T;!V&&(!F||$)&&(A[_]=T)});for(const _ of Object.keys(g.current))!(_ in D)&&_ in A&&delete A[_];g.current=D}if(o1(e,t,a,l,A,n,u,s,c,d),v.current=b,h&&e.current)for(const[M,{name:D,url:_}]of Object.entries(h.current)){const T=e.current.querySelector(`[data-type="variable"][data-key="${M}"]`);if(!T)continue;const F=T.querySelector(".rte-report-dropdown-host");F&&(F.style.display="",F.style.visibility="",F.classList.remove("hidden"),F.classList.add("rte-report-dropdown-host-quiet"));const V=[document.createTextNode(D)];F&&V.push(F),T.setAttribute("data-report-url",_),T.setAttribute("data-report-name",D),T.removeAttribute("data-tooltip"),T.contentEditable="false",T.classList.add("rte-report-name-chip"),T.classList.remove("show-placeholder","rte-variable-with-icon"),T.replaceChildren(...V),Vl(T)}if(C&&(E.current=!1),setTimeout(()=>{if(da(e),h?.current)for(const[M,D]of Object.entries(h.current))O[M]||(O[M]=D);if(Object.keys(O).length>0&&e.current)for(const[M,D]of Object.entries(O)){let _=null;if(D.multiKey){const V=M.split("::")[1];_=e.current.querySelector(`[data-type="variable"][data-multi-key="${D.multiKey}"][data-key="${V}"]`)}else _=e.current.querySelector(`[data-type="variable"][data-key="${M}"]`);if(!_)continue;const T=_.querySelector(".rte-report-dropdown-host");T&&(T.style.display="",T.style.visibility="",T.classList.remove("hidden"),T.classList.add("rte-report-dropdown-host-quiet"));const F=[document.createTextNode(D.name)];T&&F.push(T),_.classList.remove("show-placeholder","rte-variable-with-icon"),_.classList.add("rte-report-name-chip"),_.setAttribute("data-report-url",D.url),_.setAttribute("data-report-name",D.name),_.contentEditable="false",_.replaceChildren(...F),Vl(_)}fa(e,t,a,c)},0),r?.current){const{key:M,offset:D}=r.current;setTimeout(()=>{if(!e.current)return;const _=e.current.querySelector(`[data-type="variable"][data-key="${M}"]`);if(_){if(_.dataset.variableRender==="antd-textarea"){const T=_.querySelector("textarea");if(T){T.focus();try{const F=T.value?.length??0;T.setSelectionRange(Math.min(D,F),Math.min(D,F))}catch{}r.current=null;return}}try{const T=document.createRange(),F=document.createTreeWalker(_,NodeFilter.SHOW_TEXT,null);let V=0,$=null,H=0;for(;F.nextNode();){const k=F.currentNode,G=k.textContent?.length||0;if(V+G>=D){$=k,H=D-V;break}V+=G}if($){T.setStart($,Math.min(H,$.textContent?.length||0)),T.collapse(!0);const k=window.getSelection();k&&(k.removeAllRanges(),k.addRange(T),_.focus())}else{T.selectNodeContents(_),T.collapse(!1);const k=window.getSelection();k&&(k.removeAllRanges(),k.addRange(T),_.focus())}}catch{const T=document.createRange();T.selectNodeContents(_),T.collapse(!1);const F=window.getSelection();F&&(F.removeAllRanges(),F.addRange(T),_.focus())}r.current=null}},0)}},[t,a,l,e,n,r,i,u,s,o,c,d]);w.useEffect(()=>{m()},[m])}function h1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=o=>typeof o=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(o):o.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(o.name||""),u=o=>{const c=o.target?.closest(".upload-info-icon");if(c&&c.classList.contains("upload-info-icon")){const h=c.dataset.uploadKey;if(h){const f=c.dataset.tooltip||"";let y=!1;try{const v=JSON.parse(f);v&&v.type==="steps"&&Array.isArray(v.images)&&(y=!0)}catch{}if(y){const E=c.closest('[data-type="upload"], [data-type="video-upload"]');l({key:h,anchorEl:E||c,type:"upload"})}else{const E=c.closest('[data-type="upload"], [data-type="video-upload"]');l({key:h,anchorEl:E||c,type:"upload"})}}return}const d=o.target?.closest('[data-type="upload"]');if(d){const h=d.dataset.key;if(h){const f=a[h];f&&i(f)&&l({key:h,anchorEl:d,type:"upload-preview"})}}},s=o=>{if(n)return;const c=o.target?.closest(".upload-info-icon"),d=o.relatedTarget;if(d?.closest?.(".rte-tooltip-overlay"))return;if(c&&c.classList.contains("upload-info-icon")){const f=c.closest('[data-type="upload"], [data-type="video-upload"]');if(d&&f&&f.contains(d))return;if(!d||!r.contains(d))l(null);else{const y=d.closest('[data-type="upload"], [data-type="video-upload"]');(!y||y!==f)&&l(null)}return}const h=o.target?.closest('[data-type="upload"], [data-type="video-upload"]');if(h){const f=d;if(f?.closest?.(".rte-tooltip-overlay")||f&&h.contains(f))return;l(null)}};return r.addEventListener("mouseover",u,!0),r.addEventListener("mouseout",s,!0),()=>{r.removeEventListener("mouseover",u,!0),r.removeEventListener("mouseout",s,!0)}},[t,a,e,l,n])}function b1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=c=>{if(l==="hideTagClose")return;const d=c.currentTarget,h=d.dataset.tooltip,f=d.dataset.tagKey||"";h&&a({key:f,anchorEl:d,type:"tag"})},u=c=>{n||c.relatedTarget?.closest?.(".rte-tooltip-overlay")||a(null)};let s;const o=()=>{r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.addEventListener("mouseenter",i),d.addEventListener("mouseleave",u)})};return s=requestAnimationFrame(()=>{s=requestAnimationFrame(o)}),()=>{cancelAnimationFrame(s),r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.removeEventListener("mouseenter",i),d.removeEventListener("mouseleave",u)})}},[t,e,a,l,n])}function m1(e,t,a,l){w.useEffect(()=>{const n=e.current;if(!n)return;const r=u=>{if(u.target?.closest(".rte-report-dropdown-host"))return;const o=u.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const c=o.dataset.variableKey;c&&a({key:c,anchorEl:o,type:"variable"});return}},i=u=>{if(l)return;const s=u.target,o=u.relatedTarget;if(o?.closest?.(".rte-tooltip-overlay"))return;if(s?.closest?.(".variable-info-icon")){if(!o||!n.contains(o)){a(null);return}!!o.closest?.(".variable-info-icon")||a(null)}};return n.addEventListener("mouseover",r,!0),n.addEventListener("mouseout",i,!0),()=>{n.removeEventListener("mouseover",r,!0),n.removeEventListener("mouseout",i,!0)}},[t,e,a,l])}function v1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=d=>typeof d=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(d):d.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(d.name||""),u=d=>{const h=d.currentTarget,f=h.dataset.fileName,y=h.closest('[data-type="upload"]'),E=y?.dataset.key||"",v=E?a[E]:null;if(v&&i(v)){l({key:E,anchorEl:y||h,type:"upload-preview"});return}f&&l({key:E,anchorEl:y||h,type:"upload-label"})},s=d=>{n||d.relatedTarget?.closest?.(".rte-tooltip-overlay")||l(null)};let o;const c=()=>{r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.addEventListener("mouseenter",u),h.addEventListener("mouseleave",s)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(c)}),()=>{cancelAnimationFrame(o),r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.removeEventListener("mouseenter",u),h.removeEventListener("mouseleave",s)})}},[t,a,e,l,n])}function g1(e,t,a,l,n,r,i,u){w.useEffect(()=>{const s=setTimeout(()=>{fa(e,t,a,n),Yl(e,t,a,l,n,{reportAnalyzeState:i,requireReportUrlAnalyze:u})},0);return()=>clearTimeout(s)},[a,t,e,l,n,r,i,u])}function E1(e,t){const a=w.useRef(0),l=w.useRef(0);w.useEffect(()=>{if(!e.current)return;let n=!1,r=0;const i=m=>m instanceof HTMLElement?!!(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker")||m.closest(".ant-picker-dropdown")):!1,u=m=>m instanceof HTMLElement?!!(m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown")):!1,s=m=>{n=!0,i(m.target)&&(a.current=Date.now()),u(m.target)&&(l.current=Date.now())},o=()=>{n=!1,r=Date.now()};let c=!1,d=0;const h=()=>{c=!0},f=()=>{c=!1,d=Date.now()},y=()=>{d=Date.now()},E=m=>{i(m.target)&&(a.current=Date.now()),u(m.target)&&(l.current=Date.now())},v=()=>{if(Date.now()-a.current<800||Date.now()-l.current<800)return;const m=document.activeElement;if(m&&(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker-dropdown")||m.tagName==="INPUT"&&m.closest(".ant-picker")||m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown"))||!e.current)return;const b=window.getSelection();if(!b||b.rangeCount===0||t.current||n||c||Date.now()-d<500)return;const x=b.getRangeAt(0);if(!x.collapsed)return e.current.contains(x.commonAncestorContainer),void 0;const C=b.anchorNode;if(!C||!e.current.contains(C))return;let A=!1,O=!1;if(C.nodeType===Node.ELEMENT_NODE){const S=C;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(O=!0)}else if(C.parentElement){const S=C.parentElement;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(O=!0)}if(A||O)return;let N=null;if(C.nodeType===Node.ELEMENT_NODE?N=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(N=C.parentElement.closest('[data-type="variable"]')),!N){if(Date.now()-r>500)return;const S=e.current.querySelectorAll('[data-type="variable"]');if(S.length>0){let L=null;for(const I of Array.from(S))if(I.style.display!=="none"){L=I;break}if(!L&&S.length>0&&(L=S[0]),L){const I=document.createRange();I.selectNodeContents(L),I.collapse(!1),b.removeAllRanges(),b.addRange(I),L.focus()}else b.removeAllRanges()}else b.removeAllRanges()}},g=e.current;return g&&(g.addEventListener("compositionstart",h),g.addEventListener("compositionend",f),g.addEventListener("input",y)),document.addEventListener("mousedown",s),document.addEventListener("mouseup",o),document.addEventListener("focusin",E),document.addEventListener("selectionchange",v),()=>{g&&(g.removeEventListener("compositionstart",h),g.removeEventListener("compositionend",f),g.removeEventListener("input",y)),document.removeEventListener("mousedown",s),document.removeEventListener("mouseup",o),document.removeEventListener("focusin",E),document.removeEventListener("selectionchange",v)}},[e,t])}var Ol={exports:{}},y1=Ol.exports,co;function fo(){return co||(co=1,function(e,t){(function(a,l){e.exports=l()})(y1,function(){var a=1e3,l=6e4,n=36e5,r="millisecond",i="second",u="minute",s="hour",o="day",c="week",d="month",h="quarter",f="year",y="date",E="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var T=["th","st","nd","rd"],F=_%100;return"["+_+(T[(F-20)%10]||T[F]||T[0])+"]"}},b=function(_,T,F){var V=String(_);return!V||V.length>=T?_:""+Array(T+1-V.length).join(F)+_},x={s:b,z:function(_){var T=-_.utcOffset(),F=Math.abs(T),V=Math.floor(F/60),$=F%60;return(T<=0?"+":"-")+b(V,2,"0")+":"+b($,2,"0")},m:function _(T,F){if(T.date()<F.date())return-_(F,T);var V=12*(F.year()-T.year())+(F.month()-T.month()),$=T.clone().add(V,d),H=F-$<0,k=T.clone().add(V+(H?-1:1),d);return+(-(V+(F-$)/(H?$-k:k-$))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:d,y:f,w:c,d:o,D:y,h:s,m:u,s:i,ms:r,Q:h}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},C="en",A={};A[C]=m;var O="$isDayjsObject",N=function(_){return _ instanceof M||!(!_||!_[O])},S=function _(T,F,V){var $;if(!T)return C;if(typeof T=="string"){var H=T.toLowerCase();A[H]&&($=H),F&&(A[H]=F,$=H);var k=T.split("-");if(!$&&k.length>1)return _(k[0])}else{var G=T.name;A[G]=T,$=G}return!V&&$&&(C=$),$||!V&&C},L=function(_,T){if(N(_))return _.clone();var F=typeof T=="object"?T:{};return F.date=_,F.args=arguments,new M(F)},I=x;I.l=S,I.i=N,I.w=function(_,T){return L(_,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var M=function(){function _(F){this.$L=S(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[O]=!0}var T=_.prototype;return T.parse=function(F){this.$d=function(V){var $=V.date,H=V.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var k=$.match(v);if(k){var G=k[2]-1||0,j=(k[7]||"0").substring(0,3);return H?new Date(Date.UTC(k[1],G,k[3]||1,k[4]||0,k[5]||0,k[6]||0,j)):new Date(k[1],G,k[3]||1,k[4]||0,k[5]||0,k[6]||0,j)}}return new Date($)}(F),this.init()},T.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},T.$utils=function(){return I},T.isValid=function(){return this.$d.toString()!==E},T.isSame=function(F,V){var $=L(F);return this.startOf(V)<=$&&$<=this.endOf(V)},T.isAfter=function(F,V){return L(F)<this.startOf(V)},T.isBefore=function(F,V){return this.endOf(V)<L(F)},T.$g=function(F,V,$){return I.u(F)?this[V]:this.set($,F)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(F,V){var $=this,H=!!I.u(V)||V,k=I.p(F),G=function(oe,pe){var ve=I.w($.$u?Date.UTC($.$y,pe,oe):new Date($.$y,pe,oe),$);return H?ve:ve.endOf(o)},j=function(oe,pe){return I.w($.toDate()[oe].apply($.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(pe)),$)},P=this.$W,U=this.$M,X=this.$D,Z="set"+(this.$u?"UTC":"");switch(k){case f:return H?G(1,0):G(31,11);case d:return H?G(1,U):G(0,U+1);case c:var W=this.$locale().weekStart||0,le=(P<W?P+7:P)-W;return G(H?X-le:X+(6-le),U);case o:case y:return j(Z+"Hours",0);case s:return j(Z+"Minutes",1);case u:return j(Z+"Seconds",2);case i:return j(Z+"Milliseconds",3);default:return this.clone()}},T.endOf=function(F){return this.startOf(F,!1)},T.$set=function(F,V){var $,H=I.p(F),k="set"+(this.$u?"UTC":""),G=($={},$[o]=k+"Date",$[y]=k+"Date",$[d]=k+"Month",$[f]=k+"FullYear",$[s]=k+"Hours",$[u]=k+"Minutes",$[i]=k+"Seconds",$[r]=k+"Milliseconds",$)[H],j=H===o?this.$D+(V-this.$W):V;if(H===d||H===f){var P=this.clone().set(y,1);P.$d[G](j),P.init(),this.$d=P.set(y,Math.min(this.$D,P.daysInMonth())).$d}else G&&this.$d[G](j);return this.init(),this},T.set=function(F,V){return this.clone().$set(F,V)},T.get=function(F){return this[I.p(F)]()},T.add=function(F,V){var $,H=this;F=Number(F);var k=I.p(V),G=function(U){var X=L(H);return I.w(X.date(X.date()+Math.round(U*F)),H)};if(k===d)return this.set(d,this.$M+F);if(k===f)return this.set(f,this.$y+F);if(k===o)return G(1);if(k===c)return G(7);var j=($={},$[u]=l,$[s]=n,$[i]=a,$)[k]||1,P=this.$d.getTime()+F*j;return I.w(P,this)},T.subtract=function(F,V){return this.add(-1*F,V)},T.format=function(F){var V=this,$=this.$locale();if(!this.isValid())return $.invalidDate||E;var H=F||"YYYY-MM-DDTHH:mm:ssZ",k=I.z(this),G=this.$H,j=this.$m,P=this.$M,U=$.weekdays,X=$.months,Z=$.meridiem,W=function(pe,ve,Ye,Pe){return pe&&(pe[ve]||pe(V,H))||Ye[ve].slice(0,Pe)},le=function(pe){return I.s(G%12||12,pe,"0")},oe=Z||function(pe,ve,Ye){var Pe=pe<12?"AM":"PM";return Ye?Pe.toLowerCase():Pe};return H.replace(g,function(pe,ve){return ve||function(Ye){switch(Ye){case"YY":return String(V.$y).slice(-2);case"YYYY":return I.s(V.$y,4,"0");case"M":return P+1;case"MM":return I.s(P+1,2,"0");case"MMM":return W($.monthsShort,P,X,3);case"MMMM":return W(X,P);case"D":return V.$D;case"DD":return I.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return W($.weekdaysMin,V.$W,U,2);case"ddd":return W($.weekdaysShort,V.$W,U,3);case"dddd":return U[V.$W];case"H":return String(G);case"HH":return I.s(G,2,"0");case"h":return le(1);case"hh":return le(2);case"a":return oe(G,j,!0);case"A":return oe(G,j,!1);case"m":return String(j);case"mm":return I.s(j,2,"0");case"s":return String(V.$s);case"ss":return I.s(V.$s,2,"0");case"SSS":return I.s(V.$ms,3,"0");case"Z":return k}return null}(pe)||k.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(F,V,$){var H,k=this,G=I.p(V),j=L(F),P=(j.utcOffset()-this.utcOffset())*l,U=this-j,X=function(){return I.m(k,j)};switch(G){case f:H=X()/12;break;case d:H=X();break;case h:H=X()/3;break;case c:H=(U-P)/6048e5;break;case o:H=(U-P)/864e5;break;case s:H=U/n;break;case u:H=U/l;break;case i:H=U/a;break;default:H=U}return $?H:I.a(H)},T.daysInMonth=function(){return this.endOf(d).$D},T.$locale=function(){return A[this.$L]},T.locale=function(F,V){if(!F)return this.$L;var $=this.clone(),H=S(F,V,!0);return H&&($.$L=H),$},T.clone=function(){return I.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},_}(),D=M.prototype;return L.prototype=D,[["$ms",r],["$s",i],["$m",u],["$H",s],["$W",o],["$M",d],["$y",f],["$D",y]].forEach(function(_){D[_[1]]=function(T){return this.$g(T,_[0],_[1])}}),L.extend=function(_,T){return _.$i||(_(T,M,L),_.$i=!0),L},L.locale=S,L.isDayjs=N,L.unix=function(_){return L(1e3*_)},L.en=A[C],L.Ls=A,L.p={},L})}(Ol)),Ol.exports}var T1=fo();const Dl=cn(T1);var Pl={exports:{}},x1=Pl.exports,po;function C1(){return po||(po=1,function(e,t){(function(a,l){e.exports=l(fo())})(x1,function(a){function l(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var n=l(a),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(i,u){return u==="W"?i+"周":i+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(i,u){var s=100*i+u;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return n.default.locale(r,null,!0),r})}(Pl)),Pl.exports}C1();function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function S1(e,t){if(qa(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var l=a.call(e,t);if(qa(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A1(e){var t=S1(e,"string");return qa(t)=="symbol"?t:t+""}function w1(e,t,a){return(t=A1(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ho(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,l)}return a}function bo(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ho(Object(a),!0).forEach(function(l){w1(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ho(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}var _1={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},k1=bo(bo({},_1),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});const N1={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},mo={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},k1),timePickerLocale:Object.assign({},N1)};mo.lang.ok="确定",Dl.locale("zh-cn");const{RangePicker:I1}=fe.DatePicker,L1=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.value,n=e.dataset.placeholder,r=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,i=e.dataset.disableFuture==="true",[u,s]=w.useState(()=>{if(!l)return null;const E=l.split(",");return E.length===2&&E[0]&&E[1]?[Dl(E[0]),Dl(E[1])]:null}),[o,c]=w.useState(null),d=E=>E?i&&E.isAfter(Dl(),"day")?!0:!r||!o||!o[0]?!1:Math.abs(E.diff(o[0],"days"))>r:!1,h=E=>{c(E)},f=E=>{if(s(E),c(null),E&&E[0]&&E[1]){const v=`${E[0].format("YYYY-MM-DD")},${E[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",v),t(a,v)}else e.setAttribute("data-value",""),t(a,"")},y=E=>{c(E?u:null)};return mt.createPortal(z.jsx("div",{className:"rte-datepicker-wrapper",contentEditable:!1,style:{display:"inline-block",verticalAlign:"middle",width:"260px",marginLeft:"4px",marginRight:"4px",fontSize:"16px",height:"30px",lineHeight:"30px"},children:z.jsx(I1,{value:u,disabledDate:d,onCalendarChange:h,onChange:f,onOpenChange:y,placeholder:[n||"开始日期",n||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:mo,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},O1=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-datepicker-host"),u=[];i.forEach(s=>{const o=s.getAttribute("data-key");o&&u.push(z.jsx(L1,{host:s,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`datepicker-${o}`))}),a(u)};n();const r=new MutationObserver(i=>{let u=!1;for(const s of i)if(s.type==="childList"){let o=!1;if(s.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),s.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),o){u=!0;break}}u&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},vo=({config:e,onSend:t,isProcessing:a=!1,disabled:l=!1,width:n,lockStructure:r=!1,agentOptions:i=[],onAgentSelect:u,onAgentExit:s,loading:o=!1,placeholder:c,border:d,background:h="transparent",hideButtons:f,maxHeight:y,minHeight:E,editorMinHeight:v,editorPadding:g,footerPadding:m,collapsed:b=!1,reportAnalyze:x,markdownAnalyze:C,markdownNameAnalyze:A,onCollapsedChange:O,collapseTransitionMs:N=260,debugTooltipSticky:S=!1,nodeValues:L,onFilesChange:I,onFooterFilesChange:M,showFooterUpload:D=!0,footerFiles:_,videoUrlParse:T,videoUpload:F,reportListFetch:V,onReportGoGenerate:$,onViewReport:H,hideCurrentSessionReport:k,reportNameResolve:G})=>{const[j,P]=fe.message.useMessage(),U=w.useRef(null),X=w.useRef(null),Z=w.useRef(null),W=w.useRef(null),le=w.useRef(null),oe=w.useRef(null),[pe,ve]=w.useState(!1),Ye=w.useRef("");if(!Ye.current){const Q=Math.random().toString(36).slice(2,8);Ye.current=`rte_${Q}`}const[Pe,Ut]=w.useState({});w.useEffect(()=>{I?.(Pe)},[Pe,I]);const[lt,Et]=w.useState([]),sa=w.useRef(!1);w.useEffect(()=>{if(!_)return;if(!(_.length===lt.length&&_.every((ie,re)=>{const he=lt[re];return he&&ie.name===he.name&&ie.size===he.size&&ie.lastModified===he.lastModified})))if(_.reduce((he,ge)=>he+ge.size,0)>52428800){const he=[];let ge=0;for(const ue of _){if(ge+ue.size>52428800)break;he.push(ue),ge+=ue.size}j.error("文件总大小不能超过 50MB"),Et(he)}else sa.current=!0,Et(_)},[_]),w.useEffect(()=>{if(sa.current){sa.current=!1;return}M?.(lt)},[lt,M]);const[Cr,Ga]=w.useState(null),[Ml,Bl]=w.useState(null),[Sr,Fl]=w.useState(null),[rt,Ya]=w.useState({}),[J,ne]=w.useState(""),[de,ye]=w.useState(!1),we=w.useRef(null),We=w.useRef(null),{tooltipPortal:yt,setPopoverVisible:Ve}=DE({config:e,files:Pe,debugTooltipSticky:S,videoState:rt}),{handleFileChange:qt,handleRemoveFile:zt}=gc({config:e,messageApi:j,activeBatchKey:Ml,activeFileKey:Cr,activeBatchStartIndex:Sr,setActiveFileKey:Ga,setActiveBatchKey:Bl,setActiveBatchStartIndex:Fl,setFiles:Ut}),He=w.useRef(null),[Tt,it]=w.useState({showLeft:!1,showRight:!1}),Wa=w.useCallback(()=>{const Q=He.current;Q&&it({showLeft:Q.scrollLeft>0,showRight:Q.scrollLeft+Q.clientWidth<Q.scrollWidth-1})},[]),Y1=w.useCallback(Q=>{if(!Q.target.files||Q.target.files.length===0)return;const ie=10*1024*1024,re=50*1024*1024,he=ue=>ue.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(ue.name||""),ge=Array.from(Q.target.files).filter(ue=>he(ue)&&ue.size>ie?(j.error("图片大小不能超过 10MB"),!1):!0);Et(ue=>{const be=ue.reduce((_e,Ie)=>_e+Ie.size,0),Ee=[];let xe=be;for(const _e of ge){if(xe+_e.size>re){j.error("文件总大小不能超过 50MB");break}Ee.push(_e),xe+=_e.size}return Ee.length>0?[...ue,...Ee]:ue}),Q.target.value="",setTimeout(Wa,0)},[j,Wa]),W1=w.useCallback(Q=>{Et(ie=>ie.filter((re,he)=>he!==Q)),setTimeout(Wa,0)},[Wa]),j1=w.useCallback(()=>{const Q=He.current;Q&&Q.scrollBy({left:200,behavior:"smooth"})},[]),K1=w.useCallback(()=>{const Q=He.current;Q&&Q.scrollBy({left:-200,behavior:"smooth"})},[]),wo=w.useCallback(()=>{l||ve(!0)},[l]);w.useEffect(()=>{l&&ve(!1)},[l]),w.useEffect(()=>{const Q=he=>he instanceof Element?!!he.closest([".rte-agent-dropdown",".rte-report-dropdown-overlay",".rte-tooltip-overlay",".ant-picker-dropdown",".ant-select-dropdown",".ant-image-preview-root"].join(",")):!1,ie=he=>{const ge=U.current,ue=he.target;ge&&(ue instanceof Node&&ge.contains(ue)||Q(ue)||ve(!1))},re=he=>{const ge=U.current,ue=he.target;if(ge){if(ue instanceof Node&&ge.contains(ue)){l||ve(!0);return}Q(ue)||ve(!1)}};return document.addEventListener("mousedown",ie,!0),document.addEventListener("focusin",re,!0),()=>{document.removeEventListener("mousedown",ie,!0),document.removeEventListener("focusin",re,!0)}},[l]);const Ar=w.useRef(!1),X1=w.useRef(null),{handleMouseDown:Q1,handleMouseMove:J1,handleMouseUp:Z1,handleDoubleClick:ey}=Bc({lockStructure:r,onAgentExit:s,editorRef:W,setPopoverVisible:Ve,isDraggingRef:Ar,mouseDownPosRef:X1}),[_o,Rl]=w.useState(!1),wr=w.useRef(null),[ko,No]=w.useState(!0),ty=w.useRef(0),[Io,ay]=w.useState(58),[ly,ny]=w.useState(58),[Lo,ry]=w.useState(!1),[Hl,_r]=w.useState(null),ja=w.useRef(!1),Ka=w.useRef(!1),ht=w.useRef(null),[oa,Xa]=w.useState({}),Ot=w.useRef(()=>{}),Vt=w.useRef({}),kr=w.useRef(!1),$l=w.useRef(null),Qa=w.useCallback(()=>{kr.current=!0,$l.current!==null&&window.clearTimeout($l.current),$l.current=window.setTimeout(()=>{kr.current=!1,$l.current=null},50)},[]),[Gt,Ul]=w.useState({}),Oo=w.useRef(()=>{}),iy=w.useRef({}),Nr=w.useRef(Gt);w.useEffect(()=>{Nr.current=Gt},[Gt]);const[Yt,Ir]=w.useState({}),Do=w.useRef(()=>{}),Po=w.useRef(Yt);w.useEffect(()=>{Po.current=Yt},[Yt]);const[xt,Ja]=w.useState(()=>{const Q={};return e.forEach(ie=>{Ue(ie.type)&&ie.key&&(Q[ie.key]=1)}),Q});Ac({config:e,editorRef:W,files:Pe,setFiles:Ut,multiVariableCounts:xt,setMultiVariableCounts:Ja,reportAnalyzeState:oa,setReportAnalyzeState:Xa,markdownAnalyzeState:Gt,setMarkdownAnalyzeState:Ul,markdownNameAnalyzeState:Yt,setMarkdownNameAnalyzeState:Ir,nodeValues:L,resolvedReportNamesRef:Vt});const Mo=w.useRef(L);if(L!==Mo.current&&(Mo.current=L,L)){const Q={};let ie=!1;e.forEach(re=>{if(Ue(re.type)&&re.key){const he=L[re.key],ge=Array.isArray(he)?he.filter(ue=>ue.trim().length>0):he;if(Array.isArray(ge)&&ge.length>0){const ue=re.maxCount??9,be=Math.min(ge.length+1,ue);xt[re.key]!==be&&(Q[re.key]=be,ie=!0)}}}),ie&&(Qa(),Ja(re=>({...re,...Q})))}const Ne=Ic({config:e,reportAnalyzeState:oa,markdownAnalyzeState:Gt,markdownNameAnalyzeState:Yt}),ql=w.useRef(()=>{}),{handleReportUrlBlur:uy,handleMarkdownBlur:sy,handleMarkdownNameBlur:oy,handleMultiVariableNameResolve:Bo}=_c({reportAnalyze:x,markdownAnalyze:C,markdownNameAnalyze:A,reportAnalyzeState:oa,setReportAnalyzeState:Xa,markdownAnalyzeState:Gt,setMarkdownAnalyzeState:Ul,markdownNameAnalyzeState:Yt,setMarkdownNameAnalyzeState:Ir,editorRef:W,reportAnalyzeRef:Ot,markdownAnalyzeRef:Oo,markdownNameAnalyzeRef:Do,markdownAnalyzeStateRef:Nr,markdownNameAnalyzeStateRef:Po,reportNameResolve:G,applyReportNameChipRef:ql});uc(W,uy,[Ne]),mc(W,oy,[Ne]),vc(W,sy,[Ne]),w.useEffect(()=>{const Q=W.current;if(!Q||!G)return;const ie=re=>{const he=re.target;if(!he)return;const ge=he.closest?.('[data-type="variable"][data-multi-key]');if(!ge)return;const ue=ge.dataset.key;if(!ue)return;const be=wr.current?.key===ue;if(kr.current&&(be||!Q.contains(ge)))return;const Ee=Q.contains(ge)?ge:Q.querySelector(`[data-type="variable"][data-key="${ue}"]`);if(!Ee||Ee.getAttribute("data-report-url"))return;const xe=(Ee.innerText||"").replace(/[\u200B\n]/g,"").trim(),_e=Ee.dataset.multiKey,$e=(_e?Ne.find(ut=>Ue(ut.type)&&ut.key===_e):void 0)?.type==="multi-variable-select"?"multi-variable-select":"multi-variable";Bo(ue,xe,$e)};return Q.addEventListener("focusout",ie),()=>Q.removeEventListener("focusout",ie)},[W,Bo,Ne,G]),ic(W,[Ne]),ql.current=(Q,ie,re,he)=>{const ge=W.current;if(!ge)return;let ue=ge.querySelector(`[data-type="variable"][data-key="${Q}"]`);if(ue&&!document.body.contains(ue)){const xe=document.querySelectorAll(`.rte-editor [data-type="variable"][data-key="${Q}"]`);let _e=null;xe.forEach(Ie=>{!_e&&document.body.contains(Ie)&&(_e=Ie)}),ue=_e}if(!ue){Vt.current[Q]={name:ie,url:re};return}if(ue.getAttribute("data-report-url")===re){Vt.current[Q]={name:ie,url:re};return}if(!he?.forceApply){const xe=ue.getAttribute("data-report-url"),_e=(ue.innerText||"").replace(/[\u200B\n]/g,"").trim();if(!(!xe&&_e==="")&&!(xe===re||_e===re))return}Vt.current[Q]={name:ie,url:re};const be=ue.querySelector(".rte-report-dropdown-host");be&&(be.style.display="",be.style.visibility="",be.classList.remove("hidden"),be.classList.add("rte-report-dropdown-host-quiet"));const Ee=[document.createTextNode(ie)];be&&Ee.push(be),ue.classList.remove("show-placeholder","rte-variable-with-icon"),ue.classList.add("rte-report-name-chip"),ue.setAttribute("data-report-url",re),ue.setAttribute("data-report-name",ie),ue.contentEditable="false",ue.replaceChildren(...Ee),Vl(ue),document.dispatchEvent(new CustomEvent("rte-report-dropdown-force-close",{detail:{key:Q}})),setTimeout(()=>{Dr.current()},0)};const cy=w.useCallback((Q,ie,re)=>{W.current&&(ie==="report-url"?(ql.current(Q,re.name,re.url,{forceApply:!0}),setTimeout(()=>{Ot.current(Q,re.url)},0)):(ie==="multi-variable"||ie==="multi-variable-select")&&(ql.current(Q,re.name,re.url,{forceApply:!0}),ie==="multi-variable-select"&&setTimeout(()=>{Ot.current(Q,re.url)},0)))},[W,Ot]),dy=Ne.map(Q=>`${Q.type}:${Q.key??""}:${Q.placeholder??""}`).join("|"),fy=fc(W,V,cy,$,H,`${dy}::${JSON.stringify(xt)}`,k);p1(W,Ne,Pe,r,xt,wr,void 0,f,void 0,L,rt,!!V,Vt);const Lr=w.useRef(new Set),Fo=w.useRef(Ne),Ro=w.useRef(L);(Fo.current!==Ne||Ro.current!==L)&&(Fo.current=Ne,Ro.current=L,Lr.current=new Set),w.useEffect(()=>{if(!L||!Ne||Ne.length===0)return;const Q=Ne.filter(be=>be.type==="upload"&&be.key);if(Q.length===0)return;const ie={},re=(be,Ee)=>{Ee&&(Ee instanceof File?ie[be]=Ee:typeof Ee=="string"&&Ee.trim()&&(ie[be]=Ee.trim()))};for(const be of Q){const Ee=be.key;if(Lr.current.has(Ee))continue;const xe=L[Ee],_e=typeof be.maxCount=="number"&&be.maxCount>1;if(Array.isArray(xe)&&xe.length>0){_e?xe.forEach((Ie,$e)=>re(`${Ee}-${$e}`,Ie)):re(Ee,xe[0]);continue}if(xe&&!Array.isArray(xe)){re(Ee,xe);continue}if(_e)for(let Ie=0;Ie<be.maxCount;Ie++){const $e=`${Ee}-${Ie}`,ut=L[$e];if(!ut)break;re($e,ut)}}if(Object.keys(ie).length===0)return;for(const be of Q)L[be.key]!==void 0&&Lr.current.add(be.key);Ut(be=>{const Ee={...be};let xe=!1;for(const _e of Q){const Ie=_e.key;if(L[Ie]===void 0)continue;if(typeof _e.maxCount=="number"&&_e.maxCount>1)for(let ut=0;ut<_e.maxCount;ut++){const Mr=`${Ie}-${ut}`;!ie[Mr]&&be[Mr]&&(Ee[Mr]=null,xe=!0)}}for(const[_e,Ie]of Object.entries(ie))be[_e]!==Ie&&(Ee[_e]=Ie,xe=!0);return xe?Ee:be});const he=Object.entries(ie).filter(([,be])=>typeof be=="string");if(he.length===0)return;const ge=async be=>{const Ee=be.split("/").pop()?.split("?")[0]||"file",xe=decodeURIComponent(Ee),_e=async Ie=>{const $e=await Ie.blob();return new File([$e],xe,{type:$e.type||"application/octet-stream"})};try{const Ie=`/api/image-proxy?url=${encodeURIComponent(be)}`,$e=await fetch(Ie);if($e.ok)return _e($e)}catch{}return null};let ue=!1;return Promise.all(he.map(async([be,Ee])=>{const xe=await ge(Ee);return xe?{key:be,file:xe}:null})).then(be=>{if(ue)return;const Ee={};for(const xe of be)xe&&(Ee[xe.key]=xe.file);Object.keys(Ee).length>0&&Ut(xe=>{const _e={...xe};let Ie=!1;for(const[$e,ut]of Object.entries(Ee))typeof _e[$e]=="string"&&(_e[$e]=ut,Ie=!0);return Ie?_e:xe})}),()=>{ue=!0}},[L,Ne]);const Za=w.useRef(new Set),Ho=w.useRef(""),$o=(e||[]).filter(Q=>Q.key&&Q.type!=="report-module"&&Q.type!=="markdown-module").map(Q=>`${Q.type}:${Q.key}`).join("|");Ho.current!==$o&&(Ho.current=$o,Za.current=new Set),w.useEffect(()=>{if(!L||!e||e.length===0)return;const Q=e.filter(re=>re.type==="report-url"&&re.key),ie=e.filter(re=>re.type==="multi-variable-select"&&re.key);if(!(Q.length===0&&ie.length===0)){for(const re of Q){const he=re.key;if(Za.current.has(he))continue;const ge=L[he]??L[`${he}__url`];if(!ge||typeof ge=="string"&&!ge.trim())continue;const ue=Array.isArray(ge)?ge[0]:String(ge);ue&&(Za.current.add(he),setTimeout(()=>{Ot.current(he,ue)},100))}for(const re of ie){const he=re.key,ge=L[he];!Array.isArray(ge)||ge.length===0||ge.forEach((ue,be)=>{const Ee=typeof ue=="string"?ue.trim():"";if(!Ee)return;const xe=`${he}_${be}`;Za.current.has(xe)||(Za.current.add(xe),setTimeout(()=>{Ot.current(xe,Ee)},100))})}}},[L,e,Ot]),h1(W,Ne,Pe,Ve,S),b1(W,Ne,Ve,f,S),v1(W,Ne,Pe,Ve,S),m1(W,Ne,Ve,S);const Or=!!x;g1(W,Ne,Pe,Rl,rt,L,oa,Or),xc(W,T,rt,Ya,[Ne]);const py=Cc(F,Ya,W);Sc(W,rt,Ve,S),E1(W,Ar);const Uo=Xo(W),hy=Jo(W),by=ec(W),qo=rc(W);w.useEffect(()=>{if(!W.current)return;W.current.querySelectorAll(".rte-richtext-toggle").forEach(ie=>{const re=ie.getAttribute("data-expanded")==="true";ie.innerHTML=re?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})},[Ne,W]);const zo=O1(W),{measureExpandedContentHeight:el}=kc({collapsed:b,collapseTransitionMs:N,contentRef:X,contentBodyRef:Z,editorRef:W,debugIdRef:Ye,setCollapsedContentMaxHeightPx:ay,setExpandedContentMaxHeightPx:ny,setIsCollapseAnimating:ry,effectiveConfig:Ne,files:Pe,multiVariableCounts:xt,selectPortalsLength:Uo.length,datePickerPortalsLength:zo.length,variablePortalsLength:qo.length}),my=()=>{if(b)return;const Q=Z.current;if(!Q)return;const ie=Math.ceil(Q.getBoundingClientRect().height||0);ie>0&&_r(ie),ja.current=!0,Ka.current=!1,ht.current&&(window.clearTimeout(ht.current),ht.current=null)};w.useEffect(()=>{const Q=()=>{ja.current&&(Ka.current=!0,ht.current&&window.clearTimeout(ht.current),ht.current=window.setTimeout(()=>{ht.current=null,ja.current=!1,Ka.current=!1,_r(null),window.requestAnimationFrame(()=>el())},450))};return window.addEventListener("focus",Q),()=>window.removeEventListener("focus",Q)},[el]),w.useEffect(()=>{!ja.current||!Ka.current||(ht.current&&(window.clearTimeout(ht.current),ht.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{_r(null),el(),ja.current=!1,Ka.current=!1})}))},[Pe,el]),Nc({config:e,editorRef:W,setIsEmpty:No,setIsFormValid:Rl});const vy=Dc({disabled:l,collapsed:b,onCollapsedChange:O,config:e,lockStructure:r,editorRef:W,containerRef:U,fileInputRef:le,onBeforeFilePickerOpen:my,files:Pe,setFiles:Ut,handleRemoveFile:zt,setActiveBatchKey:Bl,setActiveBatchStartIndex:Fl,setActiveFileKey:Ga,isDraggingRef:Ar,richtextPrevScrollTopRef:ty,videoState:rt,setVideoState:Ya,videoFileInputRef:we,activeVideoKeyRef:We,onImagePreview:Q=>{ne(Q),ye(!0)}}),tl=Pc({config:e,editorRef:W,setIsEmpty:No,setIsFormValid:Rl,setReportAnalyzeState:Xa,setMarkdownAnalyzeState:Ul,setMarkdownNameAnalyzeState:Ir,collapsed:b,measureExpandedContentHeight:el,effectiveConfig:Ne,files:Pe,multiVariableCounts:xt,setMultiVariableCounts:Ja,savedCursorRef:wr,videoState:rt,resolvedReportNamesRef:Vt,reportAnalyzeState:oa,requireReportUrlAnalyze:Or}),Dr=w.useRef(tl);Dr.current=tl;const gy=Fc({disabled:l,config:e,multiVariableCounts:xt,setMultiVariableCounts:Ja,editorRef:W,handleInput:tl,markdownAnalyzeRef:Oo,reportAnalyzeRef:Ot,markdownNameAnalyzeRef:Do,markdownAnalyzeStateRef:Nr,markdownRawTextRef:iy,setMarkdownAnalyzeState:Ul,setFooterFiles:Et,footerFiles:lt,messageApi:j,onPasteUnsupported:()=>j.warning("暂不支持上传该文件类型")});Oc({config:e,effectiveConfig:Ne,files:Pe,editorRef:W,setIsFormValid:Rl,multiVariableCounts:xt,setMultiVariableCounts:Ja,videoState:rt,reportAnalyzeState:oa,requireReportUrlAnalyze:Or});const Pr=w.useCallback((Q,ie)=>{delete Vt.current[Q],ca({keys:[Q]}),ie==="report-url"&&Xa(re=>({...re,[Q]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}))},[Xa]),Ey=w.useCallback(Q=>{Qa();const{nodeKey:ie,nodeType:re}=bc(Q);Pr(ie,re),Q.focus(),Dr.current()},[Pr,Qa]),yy=hc(W,Ey,xt),Vo=Rc({config:e,files:Pe,footerFiles:lt,onFooterFilesClear:()=>Et([]),onSend:t,isProcessing:a,disabled:l,loading:o,isFormValid:_o,editorRef:W,markdownAnalyzeState:Gt,markdownNameAnalyzeState:Yt,videoState:rt}),Ty=Mc({disabled:l,lockStructure:r,config:e,editorRef:W,handleInput:tl,onEnterSend:Vo,onReportChipDeleted:Pr}),xy={...n?{width:typeof n=="number"?`${n}px`:n}:{},...d?{border:d}:{},...h?{background:h}:{},...y?{maxHeight:typeof y=="number"?`${y}px`:y}:{},...E&&!b?{minHeight:typeof E=="number"?`${E}px`:E}:{},...lt.length>0?{height:"220px"}:{},...y?{"--rte-richtext-fullscreen-height":typeof y=="number"?`${y}px`:y}:{},...v?{"--rte-editor-min-height":typeof v=="number"?`${v}px`:v}:{},...g?{"--rte-editor-padding":g}:{},...m?{"--rte-footer-padding":m}:{}},Cy=typeof N=="number"&&Number.isFinite(N)&&N>=0?N:260,Sy={overflow:"hidden"},Ay=Hl!=null?`${Hl}px`:b?`${Io}px`:`${Math.max(ly,Io)}px`,wy=e.length===0&&ko&&!b,_y=Hl!=null||b||Lo||wy?"hidden":"auto",Go=w.useRef(b),Yo=Go.current!==b;Yo&&(Go.current=b);const ky=Hl!=null?"none":Yo||Lo?`max-height ${Cy}ms cubic-bezier(0.4, 0, 0.2, 1)`:"none",Ny={maxHeight:Ay,minHeight:b?0:void 0,overflow:_y,overscrollBehavior:pe?"contain":"auto",transition:ky,willChange:"max-height"};return z.jsxs("div",{className:`rich-text-editor ${pe?"rte-editor-selected":""}`,style:xy,"data-disabled":l,ref:U,onMouseDownCapture:wo,onFocusCapture:wo,children:[P,z.jsxs("div",{className:"rich-text-editor-content",ref:X,style:Sy,children:[lt.length>0&&z.jsxs("div",{className:"rte-footer-files-wrapper",children:[Tt.showLeft&&z.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-left",children:z.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-left",onClick:K1,children:z.jsx("svg",{style:{width:"16px",height:"16px",transform:"rotate(180deg)"},"aria-hidden":"true",children:z.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})}),z.jsx("div",{className:"rte-footer-files-list",ref:He,onScroll:Wa,children:lt.map((Q,ie)=>{const re=Q.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(Q.name||""),he=Q.size<1024?`${Q.size}B`:Q.size<1024*1024?`${Math.round(Q.size/1024)}KB`:`${(Q.size/(1024*1024)).toFixed(1)}MB`,ge=re?URL.createObjectURL(Q):"";return z.jsxs("div",{className:"rte-footer-file-chip",style:re?{cursor:"pointer"}:void 0,onClick:re?()=>{ne(ge),ye(!0)}:void 0,children:[re?z.jsx("img",{style:{width:"32px",height:"32px",objectFit:"cover"},className:"rte-footer-file-thumb",src:ge,alt:Q.name}):z.jsx("div",{className:"rte-footer-file-icon",children:z.jsx("svg",{style:{width:"18px",height:"18px"},"aria-hidden":"true",children:z.jsx("use",{xlinkHref:`#${(()=>{const ue=(Q.name||"").split(".").pop()?.toLowerCase()||"";return["xls","xla","xlb","xlc","xlm","xlsx","xlt","xlw","csv","tsv","iif"].includes(ue)?"icon-a-xlsxcsv":["doc","docx","dot","odt","rtf","wiz"].includes(ue)?"icon-docx":["ppt","pptx","pot","ppa","pps","pwz"].includes(ue)?"icon-ppt":["txt","asm","bat","c","cc","conf","cpp","css","cxx","def","dic","eml","h","hh","in","js","ksh","php","pkl","rb","tar","tex","ts","xml"].includes(ue)?"icon-txt":ue==="pdf"?"icon-pdf":["html","htm","json","ics","ifb"].includes(ue)?"icon-a-htmljson":ue==="md"?"icon-md":"icon-lianjie"})()}`})})}),z.jsxs("div",{className:"rte-footer-file-info",children:[z.jsx("span",{className:"rte-footer-file-name",title:Q.name,children:Q.name}),z.jsx("span",{className:"rte-footer-file-size",children:he})]}),z.jsx("span",{className:"rte-footer-file-remove",onClick:ue=>{ue.stopPropagation(),W1(ie)},children:z.jsx("i",{className:"iconfont icon-guanbi ",style:{width:"8px",height:"8px",fontSize:"8px",display:"flex",alignItems:"center"}})})]},`${Q.name}-${Q.size}-${ie}`)})}),Tt.showRight&&z.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-right",children:z.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-right",onClick:j1,children:z.jsx("svg",{style:{width:"16px",height:"16px"},"aria-hidden":"true",children:z.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})})]}),z.jsxs("div",{ref:Z,className:`rich-text-editor-content-body ${e.length===0?"rich-text-editor-content-body-default":""}`,style:Ny,children:[z.jsx("div",{ref:W,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${ko&&c?"rte-editor-empty":""} ${e.some(Q=>Q.type==="tag")?"rte-editor-with-agent":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":c,onMouseDown:Q1,onMouseMove:J1,onMouseUp:Z1,onClick:vy,onDoubleClick:ey,onInput:()=>{Qa(),tl()},onKeyDown:Ty,onPaste:Q=>{Qa(),gy(Q)}}),z.jsx("input",{type:"file",ref:le,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:qt}),z.jsx("input",{type:"file",ref:we,className:"rte-file-input",accept:"video/*",onChange:Q=>{const ie=Q.target.files?.[0],re=We.current;ie&&ie.size>1024*1024*1024?j.warning("视频文件不能超过1GB"):ie&&re&&py(re,ie),We.current=null,we.current&&(we.current.value="")}})]})]}),z.jsxs("div",{className:"rich-text-editor-footer",children:[z.jsxs("div",{className:"rich-text-editor-footer-left",children:[z.jsx("div",{className:"rich-text-editor-brand",children:f!=="hideAgent"&&z.jsx(fe.Dropdown,{placement:"topLeft",menu:{items:i.filter(Q=>Q.isShowNew!==1).map(Q=>({key:Q.key,label:z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Q.icon&&z.jsx("i",{className:Q.icon}),z.jsx("span",{children:Q.label})]}),onClick:()=>{u?.(Q)}}))},trigger:["click"],disabled:l||a,overlayClassName:"rte-agent-dropdown",children:z.jsxs("div",{className:"rte-agent-badge",style:{cursor:i.length>0?"pointer":"default"},children:[z.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),z.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})}),!e.find(Q=>Q.type==="tag")&&z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"rte-footer-upload-btn",onClick:()=>oe.current?.click(),title:"上传文件",children:z.jsx("i",{className:"iconfont icon-lianjie",style:{fontSize:"16px"}})}),z.jsx("input",{type:"file",ref:oe,className:"rte-file-input",accept:".pdf,.xla,.xlb,.xlc,.xlm,.xls,.xlsx,.xlt,.xlw,.csv,.tsv,.iif,.doc,.docx,.dot,.odt,.rtf,.pot,.ppa,.pps,.ppt,.pptx,.pwz,.wiz,.asm,.bat,.c,.cc,.conf,.cpp,.css,.cxx,.def,.dic,.eml,.h,.hh,.htm,.html,.ics,.ifb,.in,.js,.json,.ksh,.png,.jpeg,.jpg,.gif,.webp,.md,.php,.pkl,.rb,.tar,.tex,.ts,.txt,.xml,",multiple:!0,onChange:Y1})]})]}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[z.jsxs("div",{className:"rte-brand-badge",children:[z.jsx("div",{className:"rte-brand-badge",children:z.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""})}),z.jsx("span",{className:"rte-brand-text",style:{marginLeft:"4px"},children:"SealSeek 2.0"})]}),(()=>{const Q=e.find(re=>re.type==="tag");if(!Q||!Q.text)return null;const ie=i.find(re=>re.label===Q.text);return!ie||ie.points===void 0||ie.points===null?null:z.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[z.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),z.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(ie.points)]}),ie.labelValue===2&&z.jsx("div",{className:"rte-limited-free-badge",children:z.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),z.jsx("button",{type:"button",onClick:Vo,disabled:a||l||o||!_o,className:"rich-text-editor-send-button",children:a||o?z.jsx("span",{className:"rte-send-spinner"}):z.jsx("i",{className:"iconfont icon-fasong"})})]})]}),yt,z.jsx(fe.Image,{style:{display:"none"},src:J,preview:{visible:de,onVisibleChange:Q=>ye(Q)}}),zo,Uo,hy,by,qo,fy,yy]})};vo.__docgenInfo={displayName:"RichTextEditor",description:"结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",props:{config:{name:"config",required:!0,description:"结构化输入配置节点数组",type:{name:"InputNode[]",raw:"InputNode[]"}},onSend:{name:"onSend",required:!0,description:"点击发送按钮时的回调,返回数据与拼接后的 Prompt",type:{name:"function",raw:"(data: Record<string, any>, fullPrompt: string) => void"}},isProcessing:{name:"isProcessing",required:!1,description:"是否处于处理状态(禁用输入与发送)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}}}};const go="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",D1=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],P1=({autoLoading:e,batchSize:t,loadingProgress:a,loadIcon:l,onBatchSizeChange:n,onLoadNextPage:r,onStartAutoLoad:i,onStopLoad:u})=>e&&a?z.jsxs("div",{className:"auto_load_progress",children:[l||z.jsx("img",{src:go,alt:"自动加载",width:14,height:14}),z.jsxs("span",{children:["正在加载第",a.currentPage,"/",a.totalPages,"页"]}),z.jsx(fe.Progress,{percent:a.percentage,type:"line",size:[160,8]}),z.jsx("span",{onClick:u,className:"auto_load_stop_btn",children:"停止加载"})]}):z.jsxs("div",{className:"auto_load_container",children:[z.jsx("div",{onClick:r,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),z.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[z.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:i,children:[l||z.jsx("img",{src:go,alt:"自动加载",width:14,height:14}),z.jsx("span",{children:"自动加载"})]}),z.jsx(fe.Select,{value:t,onChange:n,options:D1,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),M1=({current:e,loadIcon:t,pageSize:a,total:l,cachedPages:n,loadedCount:r,autoLoading:i=!1,loadingProgress:u,onChange:s,onLoadNextPage:o,onStartAutoLoad:c,onStopLoading:d})=>{const[h,f]=w.useState(5),y=Math.ceil(l/a),E=w.useMemo(()=>n.length>=y,[n,y]),v=()=>Array.from({length:y},(b,x)=>x+1).filter(b=>!n.includes(b)).slice(0,h),g=(m,b,x)=>{const C=n.includes(m);return b==="prev"||b==="next"||b==="jump-prev"||b==="jump-next"?z.jsx("div",{className:"pageBox",children:x}):z.jsxs("div",{className:"pageBox",style:{backgroundColor:e===m?"#2563EB":"#f5f5f5",color:e===m?"#fff":C?"#171717":"#a3a3a3"},children:[m,!C&&z.jsx("span",{className:"unload_spot"})]})};return z.jsxs("div",{className:"pagination_footer",children:[z.jsxs("div",{className:"pagination_leftWrap",children:[z.jsxs("span",{className:"pagination_total",children:[z.jsx(bt.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",r,"/",l,"条数据"]}),!E&&z.jsx(P1,{loadIcon:t||void 0,autoLoading:i,batchSize:h,loadingProgress:u,disabled:!o||!c,onBatchSizeChange:f,onLoadNextPage:()=>o?.(),onStartAutoLoad:()=>{const m=v();c?.(m)},onStopLoad:()=>d?.()})]}),z.jsx(fe.Pagination,{current:e,pageSize:a,total:l,onChange:m=>s(m),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:g})]})},Eo=e=>{const{loading:t,autoLoading:a,loadingProgress:l,columns:n=[],dataSource:r=[],total:i,current:u,pageSize:s,cachedPages:o,onChangePage:c,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f,...y}=e,E=w.useRef(null),v=w.useCallback(g=>{c(g),o.includes(g)&&E.current?.scrollTo({key:`${(g-1)*s+1}`})},[o,c,s]);return z.jsxs("div",{className:"flex flex-col",children:[z.jsx(fe.Table,{ref:E,...y,columns:n,dataSource:r,pagination:!1,virtual:!0}),z.jsx(M1,{loading:t,autoLoading:a,loadingProgress:l,current:u,pageSize:s,total:i,loadedCount:r.length,cachedPages:o,onChange:v,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f})]})};Eo.__docgenInfo={displayName:"VirtualTable",description:"虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",props:{loading:{description:"加载状态",name:"loading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},total:{description:"总数据条数",name:"total",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"0"}},current:{description:"当前页码",name:"current",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"1"}},pageSize:{description:"每页数据条数",name:"pageSize",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"10"}},cachedPages:{description:"已缓存的页码数组",name:"cachedPages",required:!0,type:{name:"number[]",raw:"number[]"},defaultValue:{value:"[]"}},dataSource:{description:"数据源",name:"dataSource",required:!0,type:{name:"Array<T>",raw:"Array<T>"},defaultValue:{value:"[]"}},onChangePage:{description:"页码变更回调函数",name:"onChangePage",required:!0,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},autoLoading:{description:"是否正在自动加载",name:"autoLoading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},loadingProgress:{description:"加载进度信息",name:"loadingProgress",required:!0,type:{name:"object",raw:"{percentage: 0, currentPage: 1, totalPages: 5}"},defaultValue:{value:"-"}},onLoadNextPage:{description:"加载下一页回调函数",name:"onLoadNextPage",required:!1,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},onStartAutoLoad:{description:"开始自动加载回调函数",name:"onStartAutoLoad",required:!1,type:{name:"function",raw:"function(loadNextPages: number[]): void"},defaultValue:{value:"-"}},onStopLoading:{description:"停止加载回调函数",name:"onStopLoading",required:!1,type:{name:"function",raw:"function(): void"},defaultValue:{value:"-"}},columns:{description:"表格列配置",name:"columns",required:!0,type:{name:"Array<object>",raw:"Array<object>"},defaultValue:{value:"[]"}}}};const yo=({texts:e=[],placeholder:t="请输入内容",animationSpeed:a=100,autoPlay:l=!0,value:n,onChange:r,...i})=>{const[u,s]=w.useState(""),[o,c]=w.useState(0),[d,h]=w.useState(!1),[f,y]=w.useState(!1),[E,v]=w.useState(!1),g=w.useRef(void 0),m=w.useRef(void 0),b=w.useRef(e),x=w.useRef(o),C=w.useRef(f),A=w.useRef(u);w.useEffect(()=>{b.current=e,x.current=o,C.current=f,A.current=u});const O=w.useCallback((_,T)=>{let F=0;v(!0);const V=()=>{F<_.length?(s(_.slice(0,F+1)),F++,m.current=window.setTimeout(V,a)):(v(!1),T?.())};V()},[a]),N=w.useCallback(_=>{let T=A.current.length;const F=()=>{T>0?(s(A.current.slice(0,T-1)),T--,m.current=window.setTimeout(F,a/2)):_?.()};F()},[a]),S=w.useCallback(()=>{if(b.current.length===0||C.current)return;h(!0);const _=b.current[x.current];A.current?N(()=>{O(_,()=>{g.current=window.setTimeout(()=>{c(T=>(T+1)%b.current.length),h(!1)},2e3)})}):O(_,()=>{g.current=window.setTimeout(()=>{c(T=>(T+1)%b.current.length),h(!1)},2e3)})},[N,O]);w.useEffect(()=>(l&&e.length>0&&!f&&S(),()=>{g.current&&window.clearTimeout(g.current),m.current&&window.clearTimeout(m.current)}),[o,f,l,e.length,S]),w.useEffect(()=>{!d&&l&&e.length>0&&!f&&S()},[o,d,l,e.length,f,S]);const L=_=>{y(!0),g.current&&window.clearTimeout(g.current),m.current&&window.clearTimeout(m.current),h(!1),v(!1),i.onFocus?.(_)},I=_=>{y(!1),!n&&e.length>0&&(s(""),c(0)),i.onBlur?.(_)},M=_=>{r?.(_.target.value),i.onChange?.(_)},D=()=>f||n?t:u||t;return z.jsxs("div",{style:{position:"relative"},children:[z.jsx(fe.Input,{...i,value:n,onChange:M,onFocus:L,onBlur:I,placeholder:D(),style:{...i.style,position:"relative",zIndex:1}}),!f&&!n&&u&&z.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",paddingLeft:11,paddingRight:11,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit"},children:[z.jsx("span",{children:u}),E&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("style",{children:`
|
|
65
65
|
@keyframes blink {
|
|
66
66
|
0%, 50% { opacity: 1; }
|
|
67
67
|
51%, 100% { opacity: 0; }
|