@cimulate/copilot-widget 1.31.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,52 @@
1
- (function(Be,We){typeof exports=="object"&&typeof module!="undefined"?We(exports):typeof define=="function"&&define.amd?define(["exports"],We):(Be=typeof globalThis!="undefined"?globalThis:Be||self,We(Be.CimulateMessaging={}))})(this,(function(Be){"use strict";var U7=Object.defineProperty,H7=Object.defineProperties;var j7=Object.getOwnPropertyDescriptors;var fd=Object.getOwnPropertySymbols;var b2=Object.prototype.hasOwnProperty,w2=Object.prototype.propertyIsEnumerable;var qo=(Be,We)=>(We=Symbol[Be])?We:Symbol.for("Symbol."+Be),z7=Be=>{throw TypeError(Be)},hd=Math.pow,a0=(Be,We,rt)=>We in Be?U7(Be,We,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Be[We]=rt,j=(Be,We)=>{for(var rt in We||(We={}))b2.call(We,rt)&&a0(Be,rt,We[rt]);if(fd)for(var rt of fd(We))w2.call(We,rt)&&a0(Be,rt,We[rt]);return Be},le=(Be,We)=>H7(Be,j7(We));var Sn=(Be,We)=>{var rt={};for(var gt in Be)b2.call(Be,gt)&&We.indexOf(gt)<0&&(rt[gt]=Be[gt]);if(Be!=null&&fd)for(var gt of fd(Be))We.indexOf(gt)<0&&w2.call(Be,gt)&&(rt[gt]=Be[gt]);return rt};var Je=(Be,We,rt)=>a0(Be,typeof We!="symbol"?We+"":We,rt);var Ue=(Be,We,rt)=>new Promise((gt,Pt)=>{var wt=xt=>{try{nn(rt.next(xt))}catch(yn){Pt(yn)}},je=xt=>{try{nn(rt.throw(xt))}catch(yn){Pt(yn)}},nn=xt=>xt.done?gt(xt.value):Promise.resolve(xt.value).then(wt,je);nn((rt=rt.apply(Be,We)).next())}),Ns=function(Be,We){this[0]=Be,this[1]=We},u0=(Be,We,rt)=>{var gt=(nn,xt,yn,ir)=>{try{var Hi=rt[nn](xt),Os=(xt=Hi.value)instanceof Ns,Is=Hi.done;Promise.resolve(Os?xt[0]:xt).then(vn=>Os?gt(nn==="return"?nn:"next",xt[1]?{done:vn.done,value:vn.value}:vn,yn,ir):yn({value:vn,done:Is})).catch(vn=>gt("throw",vn,yn,ir))}catch(vn){ir(vn)}},Pt=(nn,xt,yn,ir)=>je[nn]=Hi=>(xt=new Promise((Os,Is,vn)=>(vn=()=>gt(nn,Hi,Os,Is),wt?wt.then(vn):vn())),ir=()=>wt===yn&&(wt=0),wt=yn=xt.then(ir,ir),xt),wt,je={};return rt=rt.apply(Be,We),je[qo("asyncIterator")]=()=>je,Pt("next"),Pt("throw"),Pt("return"),je},l0=Be=>{var We=Be[qo("asyncIterator")],rt=!1,gt,Pt={};return We==null?(We=Be[qo("iterator")](),gt=wt=>Pt[wt]=je=>We[wt](je)):(We=We.call(Be),gt=wt=>Pt[wt]=je=>{if(rt){if(rt=!1,wt==="throw")throw je;return je}return rt=!0,{done:!1,value:new Ns(new Promise(nn=>{var xt=We[wt](je);xt instanceof Object||z7("Object expected"),nn(xt)}),1)}}),Pt[qo("iterator")]=()=>Pt,gt("next"),"throw"in We?gt("throw"):Pt.throw=wt=>{throw wt},"return"in We&&gt("return"),Pt},x2=(Be,We,rt)=>(We=Be[qo("asyncIterator")])?We.call(Be):(Be=Be[qo("iterator")](),We={},rt=(gt,Pt)=>(Pt=Be[gt])&&(We[gt]=wt=>new Promise((je,nn,xt)=>(wt=Pt.call(Be,wt),xt=wt.done,Promise.resolve(wt.value).then(yn=>je({value:yn,done:xt}),nn)))),rt("next"),rt("return"),We);var We=document.createElement("style");We.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.875rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-chip.inactive{opacity:.5}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
- /*$vite$:1*/`,document.head.appendChild(We);function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gt={exports:{}},Pt={},wt={exports:{}},je={};var nn;function xt(){if(nn)return je;nn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function A(M,J,P){this.props=M,this.context=J,this.refs=_,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,J){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,J,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=A.prototype;function k(M,J,P){this.props=M,this.context=J,this.refs=_,this.updater=P||y}var I=k.prototype=new S;I.constructor=k,x(I,A.prototype),I.isPureReactComponent=!0;var z=Array.isArray,W=Object.prototype.hasOwnProperty,D={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function ee(M,J,P){var Se,Ae={},me=null,Ie=null;if(J!=null)for(Se in J.ref!==void 0&&(Ie=J.ref),J.key!==void 0&&(me=""+J.key),J)W.call(J,Se)&&!V.hasOwnProperty(Se)&&(Ae[Se]=J[Se]);var Me=arguments.length-2;if(Me===1)Ae.children=P;else if(1<Me){for(var Xe=Array(Me),st=0;st<Me;st++)Xe[st]=arguments[st+2];Ae.children=Xe}if(M&&M.defaultProps)for(Se in Me=M.defaultProps,Me)Ae[Se]===void 0&&(Ae[Se]=Me[Se]);return{$$typeof:e,type:M,key:me,ref:Ie,props:Ae,_owner:D.current}}function ce(M,J){return{$$typeof:e,type:M.type,key:J,ref:M.ref,props:M.props,_owner:M._owner}}function H(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ie(M){var J={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(P){return J[P]})}var ne=/\/+/g;function ue(M,J){return typeof M=="object"&&M!==null&&M.key!=null?ie(""+M.key):J.toString(36)}function fe(M,J,P,Se,Ae){var me=typeof M;(me==="undefined"||me==="boolean")&&(M=null);var Ie=!1;if(M===null)Ie=!0;else switch(me){case"string":case"number":Ie=!0;break;case"object":switch(M.$$typeof){case e:case t:Ie=!0}}if(Ie)return Ie=M,Ae=Ae(Ie),M=Se===""?"."+ue(Ie,0):Se,z(Ae)?(P="",M!=null&&(P=M.replace(ne,"$&/")+"/"),fe(Ae,J,P,"",function(st){return st})):Ae!=null&&(H(Ae)&&(Ae=ce(Ae,P+(!Ae.key||Ie&&Ie.key===Ae.key?"":(""+Ae.key).replace(ne,"$&/")+"/")+M)),J.push(Ae)),1;if(Ie=0,Se=Se===""?".":Se+":",z(M))for(var Me=0;Me<M.length;Me++){me=M[Me];var Xe=Se+ue(me,Me);Ie+=fe(me,J,P,Xe,Ae)}else if(Xe=b(M),typeof Xe=="function")for(M=Xe.call(M),Me=0;!(me=M.next()).done;)me=me.value,Xe=Se+ue(me,Me++),Ie+=fe(me,J,P,Xe,Ae);else if(me==="object")throw J=String(M),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Ie}function ae(M,J,P){if(M==null)return M;var Se=[],Ae=0;return fe(M,Se,"","",function(me){return J.call(P,me,Ae++)}),Se}function ve(M){if(M._status===-1){var J=M._result;J=J(),J.then(function(P){(M._status===0||M._status===-1)&&(M._status=1,M._result=P)},function(P){(M._status===0||M._status===-1)&&(M._status=2,M._result=P)}),M._status===-1&&(M._status=0,M._result=J)}if(M._status===1)return M._result.default;throw M._result}var de={current:null},G={transition:null},se={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:G,ReactCurrentOwner:D};function C(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:ae,forEach:function(M,J,P){ae(M,function(){J.apply(this,arguments)},P)},count:function(M){var J=0;return ae(M,function(){J++}),J},toArray:function(M){return ae(M,function(J){return J})||[]},only:function(M){if(!H(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},je.Component=A,je.Fragment=n,je.Profiler=s,je.PureComponent=k,je.StrictMode=r,je.Suspense=d,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,je.act=C,je.cloneElement=function(M,J,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var Se=x({},M.props),Ae=M.key,me=M.ref,Ie=M._owner;if(J!=null){if(J.ref!==void 0&&(me=J.ref,Ie=D.current),J.key!==void 0&&(Ae=""+J.key),M.type&&M.type.defaultProps)var Me=M.type.defaultProps;for(Xe in J)W.call(J,Xe)&&!V.hasOwnProperty(Xe)&&(Se[Xe]=J[Xe]===void 0&&Me!==void 0?Me[Xe]:J[Xe])}var Xe=arguments.length-2;if(Xe===1)Se.children=P;else if(1<Xe){Me=Array(Xe);for(var st=0;st<Xe;st++)Me[st]=arguments[st+2];Se.children=Me}return{$$typeof:e,type:M.type,key:Ae,ref:me,props:Se,_owner:Ie}},je.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},je.createElement=ee,je.createFactory=function(M){var J=ee.bind(null,M);return J.type=M,J},je.createRef=function(){return{current:null}},je.forwardRef=function(M){return{$$typeof:l,render:M}},je.isValidElement=H,je.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:ve}},je.memo=function(M,J){return{$$typeof:f,type:M,compare:J===void 0?null:J}},je.startTransition=function(M){var J=G.transition;G.transition={};try{M()}finally{G.transition=J}},je.unstable_act=C,je.useCallback=function(M,J){return de.current.useCallback(M,J)},je.useContext=function(M){return de.current.useContext(M)},je.useDebugValue=function(){},je.useDeferredValue=function(M){return de.current.useDeferredValue(M)},je.useEffect=function(M,J){return de.current.useEffect(M,J)},je.useId=function(){return de.current.useId()},je.useImperativeHandle=function(M,J,P){return de.current.useImperativeHandle(M,J,P)},je.useInsertionEffect=function(M,J){return de.current.useInsertionEffect(M,J)},je.useLayoutEffect=function(M,J){return de.current.useLayoutEffect(M,J)},je.useMemo=function(M,J){return de.current.useMemo(M,J)},je.useReducer=function(M,J,P){return de.current.useReducer(M,J,P)},je.useRef=function(M){return de.current.useRef(M)},je.useState=function(M){return de.current.useState(M)},je.useSyncExternalStore=function(M,J,P){return de.current.useSyncExternalStore(M,J,P)},je.useTransition=function(){return de.current.useTransition()},je.version="18.3.1",je}var yn;function ir(){return yn||(yn=1,wt.exports=xt()),wt.exports}var Hi;function Os(){if(Hi)return Pt;Hi=1;var e=ir(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:b,ref:y,props:m,_owner:s.current}}return Pt.Fragment=n,Pt.jsx=u,Pt.jsxs=u,Pt}var Is;function vn(){return Is||(Is=1,gt.exports=Os()),gt.exports}var w=vn(),R=ir();const ji=rt(R),wr=Object.create(null);wr.open="0",wr.close="1",wr.ping="2",wr.pong="3",wr.message="4",wr.upgrade="5",wr.noop="6";const Au=Object.create(null);Object.keys(wr).forEach(e=>{Au[wr[e]]=e});const pd={type:"error",data:"parser error"},c0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",d0=typeof ArrayBuffer=="function",f0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,md=({type:e,data:t},n,r)=>c0&&t instanceof Blob?n?r(t):h0(t,r):d0&&(t instanceof ArrayBuffer||f0(t))?n?r(t):h0(new Blob([t]),r):r(wr[e]+(t||"")),h0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function p0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let gd;function A2(e,t){if(c0&&e.data instanceof Blob)return e.data.arrayBuffer().then(p0).then(t);if(d0&&(e.data instanceof ArrayBuffer||f0(e.data)))return t(p0(e.data));md(e,!1,n=>{gd||(gd=new TextEncoder),t(gd.encode(n))})}const m0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<m0.length;e++)Yo[m0.charCodeAt(e)]=e;const C2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Yo[e.charCodeAt(r)],u=Yo[e.charCodeAt(r+1)],l=Yo[e.charCodeAt(r+2)],d=Yo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|l>>2,p[s++]=(l&3)<<6|d&63;return f},k2=typeof ArrayBuffer=="function",Ed=(e,t)=>{if(typeof e!="string")return{type:"message",data:g0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:N2(e.substring(1),t)}:Au[n]?e.length>1?{type:Au[n],data:e.substring(1)}:{type:Au[n]}:pd},N2=(e,t)=>{if(k2){const n=C2(e);return g0(n,t)}else return{base64:!0,data:e}},g0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,E0="",O2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{md(a,!1,l=>{r[u]=l,++s===n&&t(r.join(E0))})})},I2=(e,t)=>{const n=e.split(E0),r=[];for(let s=0;s<n.length;s++){const a=Ed(n[s],t);if(r.push(a),a.type==="error")break}return r};function P2(){return new TransformStream({transform(e,t){A2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let yd;function Cu(e){return e.reduce((t,n)=>t+n.length,0)}function ku(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function R2(e,t){yd||(yd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(Cu(n)<1)break;const d=ku(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Cu(n)<2)break;const d=ku(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Cu(n)<8)break;const d=ku(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(pd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Cu(n)<s)break;const d=ku(n,s);l.enqueue(Ed(a?d:yd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(pd);break}}}})}const y0=4;function jt(e){if(e)return L2(e)}function L2(e){for(var t in jt.prototype)e[t]=jt.prototype[t];return e}jt.prototype.on=jt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},jt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},jt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},jt.prototype.emitReserved=jt.prototype.emit,jt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},jt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Nu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Gn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),D2="arraybuffer";function $7(){}function T0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const M2=Gn.setTimeout,F2=Gn.clearTimeout;function Ou(e,t){t.useNativeTimers?(e.setTimeoutFn=M2.bind(Gn),e.clearTimeoutFn=F2.bind(Gn)):(e.setTimeoutFn=Gn.setTimeout.bind(Gn),e.clearTimeoutFn=Gn.clearTimeout.bind(Gn))}const B2=1.33;function U2(e){return typeof e=="string"?H2(e):Math.ceil((e.byteLength||e.size)*B2)}function H2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function b0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function j2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function z2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class $2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Td extends jt{constructor(t){super(),this.writable=!1,Ou(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new $2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Ed(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=j2(t);return n.length?"?"+n:""}}class V2 extends Td{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};I2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,O2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=b0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let w0=!1;try{w0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const q2=w0;function Y2(){}class W2 extends V2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class xr extends jt{constructor(t,n,r){super(),this.createRequest=t,Ou(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=T0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=xr.requestsCount++,xr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=Y2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete xr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(xr.requestsCount=0,xr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",x0);else if(typeof addEventListener=="function"){const e="onpagehide"in Gn?"pagehide":"unload";addEventListener(e,x0,!1)}}function x0(){for(let e in xr.requests)xr.requests.hasOwnProperty(e)&&xr.requests[e].abort()}const G2=(function(){const e=_0({xdomain:!1});return e&&e.responseType!==null})();class X2 extends W2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=G2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xr(_0,this.uri(),t)}}function _0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||q2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Gn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const S0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Q2 extends Td{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=S0?{}:T0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;md(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Nu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=b0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const bd=Gn.WebSocket||Gn.MozWebSocket;class K2 extends Q2{createSocket(t,n,r){return S0?new bd(t,n,r):n?new bd(t,n):new bd(t)}doWrite(t,n){this.ws.send(n)}}class J2 extends Td{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=R2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=P2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Nu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Z2={websocket:K2,webtransport:J2,polling:X2},eS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,tS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=eS.exec(e||""),a={},u=14;for(;u--;)a[tS[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=nS(a,a.path),a.queryKey=rS(a,a.query),a}function nS(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function rS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const xd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Iu=[];xd&&addEventListener("offline",()=>{Iu.forEach(e=>e())},!1);class oi extends jt{constructor(t,n){if(super(),this.binaryType=D2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=wd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=wd(n.host).host);Ou(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=z2(this.opts.query)),xd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Iu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=y0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&oi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",oi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=U2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Nu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(oi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Iu.indexOf(this._offlineEventListener);r!==-1&&Iu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}oi.protocol=y0;class iS extends oi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;oi.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;oi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let sS=class extends iS{constructor(t,n={}){const r=typeof t=="object",s=r?j({},t):j({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>Z2[a]).filter(a=>!!a)),super(r?s:t,s)}};function oS(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=wd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const aS=typeof ArrayBuffer=="function",uS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,v0=Object.prototype.toString,lS=typeof Blob=="function"||typeof Blob!="undefined"&&v0.call(Blob)==="[object BlobConstructor]",cS=typeof File=="function"||typeof File!="undefined"&&v0.call(File)==="[object FileConstructor]";function _d(e){return aS&&(e instanceof ArrayBuffer||uS(e))||lS&&e instanceof Blob||cS&&e instanceof File}function Pu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Pu(e[n]))return!0;return!1}if(_d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Pu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Pu(e[n]))return!0;return!1}function dS(e){const t=[],n=e.data,r=e;return r.data=Ru(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ru(e,t,n){if(!e)return e;if(_d(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Ru(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Ru(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Ru(e[s],t));return r}return e}function fS(e,t){return e.data=Sd(e.data,t),delete e.attachments,e}function Sd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Sd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Sd(e[n],t));return e}const hS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ot;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ot||(ot={}));class pS{constructor(t){this.replacer=t}encode(t){return(t.type===ot.EVENT||t.type===ot.ACK)&&Pu(t)?this.encodeAsBinary({type:t.type===ot.EVENT?ot.BINARY_EVENT:ot.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ot.BINARY_EVENT||t.type===ot.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=dS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class vd extends jt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ot.BINARY_EVENT;r||n.type===ot.BINARY_ACK?(n.type=r?ot.EVENT:ot.ACK,this.reconstructor=new mS(n)):super.emitReserved("decoded",n)}else if(_d(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ot[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ot.BINARY_EVENT||r.type===ot.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!gS(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(vd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case ot.CONNECT:return A0(n);case ot.DISCONNECT:return n===void 0;case ot.CONNECT_ERROR:return typeof n=="string"||A0(n);case ot.EVENT:case ot.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&hS.indexOf(n[0])===-1);case ot.ACK:case ot.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class mS{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=fS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const gS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function A0(e){return Object.prototype.toString.call(e)==="[object Object]"}const ES=Object.freeze(Object.defineProperty({__proto__:null,Decoder:vd,Encoder:pS,get PacketType(){return ot}},Symbol.toStringTag,{value:"Module"}));function sr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const yS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class C0 extends jt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[sr(t,"open",this.onopen.bind(this)),sr(t,"packet",this.onpacket.bind(this)),sr(t,"error",this.onerror.bind(this)),sr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(yS.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:ot.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},s),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,l)=>u?s(u):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ot.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ot.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ot.EVENT:case ot.BINARY_EVENT:this.onevent(t);break;case ot.ACK:case ot.BINARY_ACK:this.onack(t);break;case ot.DISCONNECT:this.ondisconnect();break;case ot.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:ot.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ot.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ps(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ps.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Ps.prototype.reset=function(){this.attempts=0},Ps.prototype.setMin=function(e){this.ms=e},Ps.prototype.setMax=function(e){this.max=e},Ps.prototype.setJitter=function(e){this.jitter=e};class Ad extends jt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ou(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ps({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||ES;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new sS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=sr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=sr(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(sr(t,"ping",this.onping.bind(this)),sr(t,"data",this.ondata.bind(this)),sr(t,"error",this.onerror.bind(this)),sr(t,"close",this.onclose.bind(this)),sr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Nu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new C0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wo={};function Cd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=oS(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Wo[s]&&a in Wo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Ad(r,t):(Wo[s]||(Wo[s]=new Ad(r,t)),d=Wo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Cd,{Manager:Ad,Socket:C0,io:Cd,connect:Cd});const k0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&k0.call(Blob),typeof File=="function"||typeof File!="undefined"&&k0.call(File);var N0;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(N0||(N0={}));const kd="cimulate",Nd=`${kd}:pdp-update`,Od=`${kd}:ui-state-update`,Id=`${kd}:prompts-state-update`,TS=e=>{window.addEventListener(Nd,e)},bS=e=>{window.removeEventListener(Nd,e)},wS=(e,t,n)=>{const r=new CustomEvent(Nd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class xS{constructor(){Je(this,"initialParams",{productId:"",productName:"",pdpLink:""});Je(this,"proxy");Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>(wS(n,r),Reflect.set(t,n,r)));Je(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Go=new xS,O0=["ask_cim","search","browse","pdp"],I0=e=>O0.includes(e),P0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(P0)),new Map(Object.entries(P0).map(([e,t])=>[t,e]));const _t=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class _S{constructor(t=!1){Je(this,"isDevelopment");Je(this,"_log",(t,n,...r)=>{_t(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const SS=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!I0(e.type)){_t(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&_t(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){_t(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Go.updateProxy(e.params);return}_t(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};let vS=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const a of r)try{a(...n)}catch(u){}const s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class AS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return Ue(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:le(j({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return Ue(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let l;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
1
+ (function(He,We){typeof exports=="object"&&typeof module!="undefined"?We(exports):typeof define=="function"&&define.amd?define(["exports"],We):(He=typeof globalThis!="undefined"?globalThis:He||self,We(He.CimulateMessaging={}))})(this,(function(He){"use strict";var V7=Object.defineProperty,q7=Object.defineProperties;var Y7=Object.getOwnPropertyDescriptors;var hd=Object.getOwnPropertySymbols;var x2=Object.prototype.hasOwnProperty,_2=Object.prototype.propertyIsEnumerable;var Yo=(He,We)=>(We=Symbol[He])?We:Symbol.for("Symbol."+He),W7=He=>{throw TypeError(He)},pd=Math.pow,u0=(He,We,rt)=>We in He?V7(He,We,{enumerable:!0,configurable:!0,writable:!0,value:rt}):He[We]=rt,j=(He,We)=>{for(var rt in We||(We={}))x2.call(We,rt)&&u0(He,rt,We[rt]);if(hd)for(var rt of hd(We))_2.call(We,rt)&&u0(He,rt,We[rt]);return He},le=(He,We)=>q7(He,Y7(We));var vn=(He,We)=>{var rt={};for(var gt in He)x2.call(He,gt)&&We.indexOf(gt)<0&&(rt[gt]=He[gt]);if(He!=null&&hd)for(var gt of hd(He))We.indexOf(gt)<0&&_2.call(He,gt)&&(rt[gt]=He[gt]);return rt};var Qe=(He,We,rt)=>u0(He,typeof We!="symbol"?We+"":We,rt);var Be=(He,We,rt)=>new Promise((gt,Rt)=>{var wt=xt=>{try{rn(rt.next(xt))}catch(Tn){Rt(Tn)}},je=xt=>{try{rn(rt.throw(xt))}catch(Tn){Rt(Tn)}},rn=xt=>xt.done?gt(xt.value):Promise.resolve(xt.value).then(wt,je);rn((rt=rt.apply(He,We)).next())}),Ps=function(He,We){this[0]=He,this[1]=We},l0=(He,We,rt)=>{var gt=(rn,xt,Tn,sr)=>{try{var zi=rt[rn](xt),Rs=(xt=zi.value)instanceof Ps,Ls=zi.done;Promise.resolve(Rs?xt[0]:xt).then(An=>Rs?gt(rn==="return"?rn:"next",xt[1]?{done:An.done,value:An.value}:An,Tn,sr):Tn({value:An,done:Ls})).catch(An=>gt("throw",An,Tn,sr))}catch(An){sr(An)}},Rt=(rn,xt,Tn,sr)=>je[rn]=zi=>(xt=new Promise((Rs,Ls,An)=>(An=()=>gt(rn,zi,Rs,Ls),wt?wt.then(An):An())),sr=()=>wt===Tn&&(wt=0),wt=Tn=xt.then(sr,sr),xt),wt,je={};return rt=rt.apply(He,We),je[Yo("asyncIterator")]=()=>je,Rt("next"),Rt("throw"),Rt("return"),je},c0=He=>{var We=He[Yo("asyncIterator")],rt=!1,gt,Rt={};return We==null?(We=He[Yo("iterator")](),gt=wt=>Rt[wt]=je=>We[wt](je)):(We=We.call(He),gt=wt=>Rt[wt]=je=>{if(rt){if(rt=!1,wt==="throw")throw je;return je}return rt=!0,{done:!1,value:new Ps(new Promise(rn=>{var xt=We[wt](je);xt instanceof Object||W7("Object expected"),rn(xt)}),1)}}),Rt[Yo("iterator")]=()=>Rt,gt("next"),"throw"in We?gt("throw"):Rt.throw=wt=>{throw wt},"return"in We&&gt("return"),Rt},S2=(He,We,rt)=>(We=He[Yo("asyncIterator")])?We.call(He):(He=He[Yo("iterator")](),We={},rt=(gt,Rt)=>(Rt=He[gt])&&(We[gt]=wt=>new Promise((je,rn,xt)=>(wt=Rt.call(He,wt),xt=wt.done,Promise.resolve(wt.value).then(Tn=>je({value:Tn,done:xt}),rn)))),rt("next"),rt("return"),We);var We=document.createElement("style");We.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.875rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-chip.inactive{opacity:.5}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
+ /*$vite$:1*/`,document.head.appendChild(We);function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gt={exports:{}},Rt={},wt={exports:{}},je={};var rn;function xt(){if(rn)return je;rn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function A(M,J,P){this.props=M,this.context=J,this.refs=_,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,J){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,J,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=A.prototype;function C(M,J,P){this.props=M,this.context=J,this.refs=_,this.updater=P||y}var I=C.prototype=new S;I.constructor=C,x(I,A.prototype),I.isPureReactComponent=!0;var z=Array.isArray,W=Object.prototype.hasOwnProperty,D={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function ee(M,J,P){var _e,ve={},me=null,Ie=null;if(J!=null)for(_e in J.ref!==void 0&&(Ie=J.ref),J.key!==void 0&&(me=""+J.key),J)W.call(J,_e)&&!V.hasOwnProperty(_e)&&(ve[_e]=J[_e]);var Fe=arguments.length-2;if(Fe===1)ve.children=P;else if(1<Fe){for(var Ge=Array(Fe),st=0;st<Fe;st++)Ge[st]=arguments[st+2];ve.children=Ge}if(M&&M.defaultProps)for(_e in Fe=M.defaultProps,Fe)ve[_e]===void 0&&(ve[_e]=Fe[_e]);return{$$typeof:e,type:M,key:me,ref:Ie,props:ve,_owner:D.current}}function ce(M,J){return{$$typeof:e,type:M.type,key:J,ref:M.ref,props:M.props,_owner:M._owner}}function H(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ie(M){var J={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(P){return J[P]})}var te=/\/+/g;function ue(M,J){return typeof M=="object"&&M!==null&&M.key!=null?ie(""+M.key):J.toString(36)}function fe(M,J,P,_e,ve){var me=typeof M;(me==="undefined"||me==="boolean")&&(M=null);var Ie=!1;if(M===null)Ie=!0;else switch(me){case"string":case"number":Ie=!0;break;case"object":switch(M.$$typeof){case e:case t:Ie=!0}}if(Ie)return Ie=M,ve=ve(Ie),M=_e===""?"."+ue(Ie,0):_e,z(ve)?(P="",M!=null&&(P=M.replace(te,"$&/")+"/"),fe(ve,J,P,"",function(st){return st})):ve!=null&&(H(ve)&&(ve=ce(ve,P+(!ve.key||Ie&&Ie.key===ve.key?"":(""+ve.key).replace(te,"$&/")+"/")+M)),J.push(ve)),1;if(Ie=0,_e=_e===""?".":_e+":",z(M))for(var Fe=0;Fe<M.length;Fe++){me=M[Fe];var Ge=_e+ue(me,Fe);Ie+=fe(me,J,P,Ge,ve)}else if(Ge=b(M),typeof Ge=="function")for(M=Ge.call(M),Fe=0;!(me=M.next()).done;)me=me.value,Ge=_e+ue(me,Fe++),Ie+=fe(me,J,P,Ge,ve);else if(me==="object")throw J=String(M),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Ie}function ae(M,J,P){if(M==null)return M;var _e=[],ve=0;return fe(M,_e,"","",function(me){return J.call(P,me,ve++)}),_e}function Se(M){if(M._status===-1){var J=M._result;J=J(),J.then(function(P){(M._status===0||M._status===-1)&&(M._status=1,M._result=P)},function(P){(M._status===0||M._status===-1)&&(M._status=2,M._result=P)}),M._status===-1&&(M._status=0,M._result=J)}if(M._status===1)return M._result.default;throw M._result}var de={current:null},G={transition:null},se={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:G,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:ae,forEach:function(M,J,P){ae(M,function(){J.apply(this,arguments)},P)},count:function(M){var J=0;return ae(M,function(){J++}),J},toArray:function(M){return ae(M,function(J){return J})||[]},only:function(M){if(!H(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},je.Component=A,je.Fragment=n,je.Profiler=s,je.PureComponent=C,je.StrictMode=r,je.Suspense=d,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,je.act=k,je.cloneElement=function(M,J,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var _e=x({},M.props),ve=M.key,me=M.ref,Ie=M._owner;if(J!=null){if(J.ref!==void 0&&(me=J.ref,Ie=D.current),J.key!==void 0&&(ve=""+J.key),M.type&&M.type.defaultProps)var Fe=M.type.defaultProps;for(Ge in J)W.call(J,Ge)&&!V.hasOwnProperty(Ge)&&(_e[Ge]=J[Ge]===void 0&&Fe!==void 0?Fe[Ge]:J[Ge])}var Ge=arguments.length-2;if(Ge===1)_e.children=P;else if(1<Ge){Fe=Array(Ge);for(var st=0;st<Ge;st++)Fe[st]=arguments[st+2];_e.children=Fe}return{$$typeof:e,type:M.type,key:ve,ref:me,props:_e,_owner:Ie}},je.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},je.createElement=ee,je.createFactory=function(M){var J=ee.bind(null,M);return J.type=M,J},je.createRef=function(){return{current:null}},je.forwardRef=function(M){return{$$typeof:l,render:M}},je.isValidElement=H,je.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Se}},je.memo=function(M,J){return{$$typeof:f,type:M,compare:J===void 0?null:J}},je.startTransition=function(M){var J=G.transition;G.transition={};try{M()}finally{G.transition=J}},je.unstable_act=k,je.useCallback=function(M,J){return de.current.useCallback(M,J)},je.useContext=function(M){return de.current.useContext(M)},je.useDebugValue=function(){},je.useDeferredValue=function(M){return de.current.useDeferredValue(M)},je.useEffect=function(M,J){return de.current.useEffect(M,J)},je.useId=function(){return de.current.useId()},je.useImperativeHandle=function(M,J,P){return de.current.useImperativeHandle(M,J,P)},je.useInsertionEffect=function(M,J){return de.current.useInsertionEffect(M,J)},je.useLayoutEffect=function(M,J){return de.current.useLayoutEffect(M,J)},je.useMemo=function(M,J){return de.current.useMemo(M,J)},je.useReducer=function(M,J,P){return de.current.useReducer(M,J,P)},je.useRef=function(M){return de.current.useRef(M)},je.useState=function(M){return de.current.useState(M)},je.useSyncExternalStore=function(M,J,P){return de.current.useSyncExternalStore(M,J,P)},je.useTransition=function(){return de.current.useTransition()},je.version="18.3.1",je}var Tn;function sr(){return Tn||(Tn=1,wt.exports=xt()),wt.exports}var zi;function Rs(){if(zi)return Rt;zi=1;var e=sr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:b,ref:y,props:m,_owner:s.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var Ls;function An(){return Ls||(Ls=1,gt.exports=Rs()),gt.exports}var w=An(),R=sr();const $i=rt(R),xr=Object.create(null);xr.open="0",xr.close="1",xr.ping="2",xr.pong="3",xr.message="4",xr.upgrade="5",xr.noop="6";const ku=Object.create(null);Object.keys(xr).forEach(e=>{ku[xr[e]]=e});const md={type:"error",data:"parser error"},d0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",f0=typeof ArrayBuffer=="function",h0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,gd=({type:e,data:t},n,r)=>d0&&t instanceof Blob?n?r(t):p0(t,r):f0&&(t instanceof ArrayBuffer||h0(t))?n?r(t):p0(new Blob([t]),r):r(xr[e]+(t||"")),p0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function m0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ed;function C2(e,t){if(d0&&e.data instanceof Blob)return e.data.arrayBuffer().then(m0).then(t);if(f0&&(e.data instanceof ArrayBuffer||h0(e.data)))return t(m0(e.data));gd(e,!1,n=>{Ed||(Ed=new TextEncoder),t(Ed.encode(n))})}const g0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<g0.length;e++)Wo[g0.charCodeAt(e)]=e;const N2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Wo[e.charCodeAt(r)],u=Wo[e.charCodeAt(r+1)],l=Wo[e.charCodeAt(r+2)],d=Wo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|l>>2,p[s++]=(l&3)<<6|d&63;return f},O2=typeof ArrayBuffer=="function",yd=(e,t)=>{if(typeof e!="string")return{type:"message",data:E0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:I2(e.substring(1),t)}:ku[n]?e.length>1?{type:ku[n],data:e.substring(1)}:{type:ku[n]}:md},I2=(e,t)=>{if(O2){const n=N2(e);return E0(n,t)}else return{base64:!0,data:e}},E0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,y0="",P2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{gd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(y0))})})},R2=(e,t)=>{const n=e.split(y0),r=[];for(let s=0;s<n.length;s++){const a=yd(n[s],t);if(r.push(a),a.type==="error")break}return r};function L2(){return new TransformStream({transform(e,t){C2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Td;function Cu(e){return e.reduce((t,n)=>t+n.length,0)}function Nu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function D2(e,t){Td||(Td=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(Cu(n)<1)break;const d=Nu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Cu(n)<2)break;const d=Nu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Cu(n)<8)break;const d=Nu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(md);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Cu(n)<s)break;const d=Nu(n,s);l.enqueue(yd(a?d:Td.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(md);break}}}})}const T0=4;function zt(e){if(e)return M2(e)}function M2(e){for(var t in zt.prototype)e[t]=zt.prototype[t];return e}zt.prototype.on=zt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},zt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},zt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},zt.prototype.emitReserved=zt.prototype.emit,zt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},zt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ou=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Xn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),F2="arraybuffer";function G7(){}function b0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const B2=Xn.setTimeout,U2=Xn.clearTimeout;function Iu(e,t){t.useNativeTimers?(e.setTimeoutFn=B2.bind(Xn),e.clearTimeoutFn=U2.bind(Xn)):(e.setTimeoutFn=Xn.setTimeout.bind(Xn),e.clearTimeoutFn=Xn.clearTimeout.bind(Xn))}const H2=1.33;function j2(e){return typeof e=="string"?z2(e):Math.ceil((e.byteLength||e.size)*H2)}function z2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function w0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function V2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class q2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class bd extends zt{constructor(t){super(),this.writable=!1,Iu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new q2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=yd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=$2(t);return n.length?"?"+n:""}}class Y2 extends bd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};R2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,P2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=w0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let x0=!1;try{x0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const W2=x0;function G2(){}class X2 extends Y2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class _r extends zt{constructor(t,n,r){super(),this.createRequest=t,Iu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=b0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=_r.requestsCount++,_r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=G2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",_0);else if(typeof addEventListener=="function"){const e="onpagehide"in Xn?"pagehide":"unload";addEventListener(e,_0,!1)}}function _0(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const K2=(function(){const e=S0({xdomain:!1});return e&&e.responseType!==null})();class Q2 extends X2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=K2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(S0,this.uri(),t)}}function S0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||W2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Xn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const v0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class J2 extends bd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=v0?{}:b0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;gd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Ou(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=w0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const wd=Xn.WebSocket||Xn.MozWebSocket;class Z2 extends J2{createSocket(t,n,r){return v0?new wd(t,n,r):n?new wd(t,n):new wd(t)}doWrite(t,n){this.ws.send(n)}}class eS extends bd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=D2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=L2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Ou(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const tS={websocket:Z2,webtransport:eS,polling:Q2},nS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,rS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=nS.exec(e||""),a={},u=14;for(;u--;)a[rS[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=iS(a,a.path),a.queryKey=sS(a,a.query),a}function iS(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function sS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const _d=typeof addEventListener=="function"&&typeof removeEventListener=="function",Pu=[];_d&&addEventListener("offline",()=>{Pu.forEach(e=>e())},!1);class ui extends zt{constructor(t,n){if(super(),this.binaryType=F2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=xd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=xd(n.host).host);Iu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=V2(this.opts.query)),_d&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Pu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=T0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ui.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",ui.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=j2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ou(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ui.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),_d&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Pu.indexOf(this._offlineEventListener);r!==-1&&Pu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=T0;class oS extends ui{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;ui.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let aS=class extends oS{constructor(t,n={}){const r=typeof t=="object",s=r?j({},t):j({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>tS[a]).filter(a=>!!a)),super(r?s:t,s)}};function uS(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=xd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const lS=typeof ArrayBuffer=="function",cS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,A0=Object.prototype.toString,dS=typeof Blob=="function"||typeof Blob!="undefined"&&A0.call(Blob)==="[object BlobConstructor]",fS=typeof File=="function"||typeof File!="undefined"&&A0.call(File)==="[object FileConstructor]";function Sd(e){return lS&&(e instanceof ArrayBuffer||cS(e))||dS&&e instanceof Blob||fS&&e instanceof File}function Ru(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ru(e[n]))return!0;return!1}if(Sd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ru(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ru(e[n]))return!0;return!1}function hS(e){const t=[],n=e.data,r=e;return r.data=Lu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Lu(e,t,n){if(!e)return e;if(Sd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Lu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Lu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Lu(e[s],t));return r}return e}function pS(e,t){return e.data=vd(e.data,t),delete e.attachments,e}function vd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=vd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=vd(e[n],t));return e}const mS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ot;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ot||(ot={}));class gS{constructor(t){this.replacer=t}encode(t){return(t.type===ot.EVENT||t.type===ot.ACK)&&Ru(t)?this.encodeAsBinary({type:t.type===ot.EVENT?ot.BINARY_EVENT:ot.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ot.BINARY_EVENT||t.type===ot.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=hS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Ad extends zt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ot.BINARY_EVENT;r||n.type===ot.BINARY_ACK?(n.type=r?ot.EVENT:ot.ACK,this.reconstructor=new ES(n)):super.emitReserved("decoded",n)}else if(Sd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ot[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ot.BINARY_EVENT||r.type===ot.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!yS(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Ad.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case ot.CONNECT:return k0(n);case ot.DISCONNECT:return n===void 0;case ot.CONNECT_ERROR:return typeof n=="string"||k0(n);case ot.EVENT:case ot.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&mS.indexOf(n[0])===-1);case ot.ACK:case ot.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ES{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=pS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const yS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function k0(e){return Object.prototype.toString.call(e)==="[object Object]"}const TS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ad,Encoder:gS,get PacketType(){return ot}},Symbol.toStringTag,{value:"Module"}));function or(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const bS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class C0 extends zt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[or(t,"open",this.onopen.bind(this)),or(t,"packet",this.onpacket.bind(this)),or(t,"error",this.onerror.bind(this)),or(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(bS.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:ot.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},s),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,l)=>u?s(u):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ot.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ot.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ot.EVENT:case ot.BINARY_EVENT:this.onevent(t);break;case ot.ACK:case ot.BINARY_ACK:this.onack(t);break;case ot.DISCONNECT:this.ondisconnect();break;case ot.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:ot.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ot.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ds(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ds.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Ds.prototype.reset=function(){this.attempts=0},Ds.prototype.setMin=function(e){this.ms=e},Ds.prototype.setMax=function(e){this.max=e},Ds.prototype.setJitter=function(e){this.jitter=e};class kd extends zt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Iu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ds({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||TS;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new aS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=or(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=or(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(or(t,"ping",this.onping.bind(this)),or(t,"data",this.ondata.bind(this)),or(t,"error",this.onerror.bind(this)),or(t,"close",this.onclose.bind(this)),or(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Ou(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new C0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Go={};function Cd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=uS(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Go[s]&&a in Go[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new kd(r,t):(Go[s]||(Go[s]=new kd(r,t)),d=Go[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Cd,{Manager:kd,Socket:C0,io:Cd,connect:Cd});const N0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&N0.call(Blob),typeof File=="function"||typeof File!="undefined"&&N0.call(File);var O0;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(O0||(O0={}));const Nd="cimulate",Od=`${Nd}:pdp-update`,Id=`${Nd}:ui-state-update`,Pd=`${Nd}:prompts-state-update`,wS=e=>{window.addEventListener(Od,e)},xS=e=>{window.removeEventListener(Od,e)},_S=(e,t,n)=>{const r=new CustomEvent(Od,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class SS{constructor(){Qe(this,"initialParams",{productId:"",productName:"",pdpLink:""});Qe(this,"proxy");Qe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Qe(this,"_fullSet",(t,n,r)=>(_S(n,r),Reflect.set(t,n,r)));Qe(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Xo=new SS,I0=["ask_cim","search","browse","pdp"],P0=e=>I0.includes(e),R0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(R0)),new Map(Object.entries(R0).map(([e,t])=>[t,e]));const _t=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class vS{constructor(t=!1){Qe(this,"isDevelopment");Qe(this,"_log",(t,n,...r)=>{_t(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const AS=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!P0(e.type)){_t(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&_t(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){_t(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Xo.updateProxy(e.params);return}_t(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};let kS=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const a of r)try{a(...n)}catch(u){}const s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class CS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return Be(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:le(j({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return Be(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let l;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
3
3
  `).replace(/\r/g,`
4
4
  `);(l=s.indexOf(`
5
5
 
6
6
  `))>=0;){const d=s.slice(0,l);s=s.slice(l+2),this.parseFrame(d)}}}catch(a){return a instanceof DOMException&&a.name==="AbortError"?void this.logger.debug("SSE stream aborted (intentional disconnect)"):(this.logger.error("SSE stream error:",a),this.reading=!1,void this.onClose(a instanceof Error?a.message:"Unknown stream error"))}finally{n.releaseLock()}this.reading=!1,this.logger.info("SSE stream ended"),this.onClose("stream_ended")})}parseFrame(t){let n="message";const r=[];for(const a of t.split(`
7
7
  `))if(a.startsWith("event:"))n=a.slice(6).trim();else if(a.startsWith("data:")){const u=a.slice(5);r.push(u.startsWith(" ")?u.slice(1):u)}else a.startsWith(":");if(r.length===0)return;const s=r.join(`
8
- `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class jr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let CS=class extends jr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class R0 extends jr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Pd=class extends jr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class kS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}const NS="0Mw";let OS=class extends vS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,p,m,b;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(l=s.timeout)!=null?l:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(b=s.capabilitiesVersion)!=null?b:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new kS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return Ue(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return Ue(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return Ue(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new jr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return Ue(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return Ue(this,null,function*(){var u,l,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(l=a.openConversationsFound)!=null?l:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return Ue(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return Ue(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new jr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new jr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Ue(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return Ue(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new AS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>Ue(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var l;const n=t.conversationEntry;if(!n)return;const r=((l=n.sender)==null?void 0:l.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s,messagingSessionId:this.extractMessagingSessionId(n)})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),l=this.getNestedValue(u,"streamingToken");a=this.getNestedString(l,"token","text")||this.getNestedString(l,"token","content")||"";const d=this.getNestedValue(l,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(l,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(l,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",j(j(j({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,l,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var A,S,k;const b=p.participant,y=p.displayName||(b==null?void 0:b.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(b==null?void 0:b.role)||((k=(S=t.conversationEntry)==null?void 0:S.sender)==null?void 0:k.role)||"",_=p.operation||p.event||"";this.emit("participant_changed",j({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(_)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",j({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return Ue(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new Pd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return Ue(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let l;try{const d=new AbortController;l=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=j({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(l),!m.ok){const b=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new Pd(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new Pd(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new CS(`Request ${t} ${n} failed (${m.status}): ${b}`,m.status,b)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(l),d instanceof jr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new R0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new R0(`Network error: ${d.message}`,u,{cause:d})}throw new jr(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new jr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}extractMessagingSessionId(t){var n;return(n=t.relatedRecords)==null?void 0:n.find(r=>r.startsWith(NS))}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}};const L0="onCimulateWidgetReady",N="cim-widget",Un=`--${N}`,ai={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},IS=(e=ai)=>({[`${Un}-primary-color`]:e.primaryColor||ai.primaryColor,[`${Un}-secondary-color`]:e.secondaryColor||ai.secondaryColor,[`${Un}-font-color`]:e.fontColor||ai.fontColor,[`${Un}-font-family`]:e.fontFamily||ai.fontFamily,[`${Un}-background-color`]:e.backgroundColor||ai.backgroundColor,[`${Un}-border-color`]:e.borderColor||ai.borderColor,[`${Un}-border-radius`]:e.borderRadius||ai.borderRadius});class PS{constructor(){Je(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Je(this,"connectedProxy");Je(this,"modeProxy");Je(this,"entryTypeProxy");Je(this,"statusProxy");Je(this,"dialogProxy");Je(this,"modalProxy",{isFullscreen:!1});Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return DS(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const lt=new PS,RS=e=>{window.addEventListener(Od,e)},LS=e=>{window.removeEventListener(Od,e)},DS=(e,t)=>{const n=new CustomEvent(Od,{detail:{property:e,value:t}});window.dispatchEvent(n)},D0=e=>{lt.connectedProxy.connected=e},M0=e=>{if(!I0(e)){const t=O0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}lt.entryTypeProxy.entryType=e},zr=e=>{const t=lt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;lt.statusProxy.isOpen=n,n&&(lt.statusProxy.isMinimized=!1)},Lu=e=>{const t=lt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;lt.statusProxy.isMinimized=n,n&&(lt.statusProxy.isOpen=!1)},Rd=e=>{lt.modalProxy.isFullscreen=e},Du=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);lt.statusProxy.type=e,e==="dialog"||e==="chat"?lt.modeProxy.mode="embedded":lt.modeProxy.mode="standalone"},Ld=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);lt.dialogProxy.position=e},MS=e=>{const t=lt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;lt.dialogProxy.isFullHeight=n};function FS(){var e=R.useRef(!0);return e.current?(e.current=!1,!0):e.current}function BS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function US(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Dd=typeof window!="undefined",Mu=function(e){R.useEffect(e,[])},HS=function(e){var t=R.useRef(e);t.current=e,Mu(function(){return function(){return t.current()}})},jS=function(e){var t=R.useRef(0),n=R.useState(e),r=n[0],s=n[1],a=R.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return HS(function(){cancelAnimationFrame(t.current)}),[r,a]},zS=function(e,t){return e===t};function $S(e,t){t===void 0&&(t=zS);var n=R.useRef(),r=R.useRef(e),s=FS();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var VS=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,l=jS({width:Dd?window.innerWidth:r,height:Dd?window.innerHeight:a}),d=l[0],f=l[1];return R.useEffect(function(){if(Dd){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return BS(window,"resize",p),function(){US(window,"resize",p)}}},[]),d};const F0=R.createContext({mode:lt.modeProxy.mode,entryType:lt.entryType,status:lt.statusProxy,dialogPosition:lt.dialogProxy.position,isDialogFullHeight:lt.dialogProxy.isFullHeight,dialogWidth:lt.dialogProxy.width,isModalFullscreen:lt.modalProxy.isFullscreen,previousComponentType:lt.statusProxy.type}),qS=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=R.useState(e!=null?e:lt.entryTypeProxy.entryType),[u,l]=R.useState(lt.modeProxy.mode),[d,f]=R.useState({type:n||lt.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:lt.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:lt.statusProxy.isMinimized}),[p,m]=R.useState(lt.dialogProxy.position),[b,y]=R.useState(lt.dialogProxy.isFullHeight),[x,_]=R.useState(lt.dialogProxy.width),[A,S]=R.useState(lt.modalProxy.isFullscreen),k=$S(d.type);R.useEffect(()=>{const z=W=>{const{property:D,value:V}=W.detail||{};if(!(!D||V===void 0)){if(D==="mode"){l(V);return}if(D==="entryType"){a(V);return}if(D==="isMinimized"){f(ee=>le(j({},ee),{isMinimized:V}));return}if(D==="isOpen"){f(ee=>le(j({},ee),{isOpen:V}));return}if(D==="type"){f(ee=>le(j({},ee),{type:V}));return}if(D==="position"){m(V);return}if(D==="isFullHeight"){y(V);return}if(D==="width"){_(V);return}if(D==="isFullscreen"){S(V);return}}};return RS(z),()=>{LS(z)}},[]),Mu(()=>{e&&M0(e)}),Mu(()=>{const z=n||(t==null?void 0:t.type);z&&Du(z),t&&"isOpen"in t&&zr(!!t.isOpen),t&&"isMinimized"in t&&Lu(!!t.isMinimized)}),Mu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:z}=t.options;z&&Ld(z),"dialogFullHeight"in t.options&&MS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&_(t.options.dialogWidth),"isModalFullscreen"in t.options&&Rd(!!t.options.isModalFullscreen)});const I=R.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:x,isModalFullscreen:A}),[u,s,d,k,p,b,x,A]);return w.jsx(F0.Provider,{value:I,children:r})},$r=()=>{const e=R.useContext(F0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};function B0(e,t){return function(){return e.apply(t,arguments)}}const{toString:YS}=Object.prototype,{getPrototypeOf:Rs}=Object,{iterator:Xo,toStringTag:U0}=Symbol,Fu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Qo=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Fu(n,t))return!0;n=Rs(n)}return!1},WS=(e,t)=>e!=null&&Qo(e,t)?e[t]:void 0,Md=(e=>t=>{const n=YS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),or=e=>(e=e.toLowerCase(),t=>Md(t)===e),Bu=e=>t=>typeof t===e,{isArray:zi}=Array,Ls=Bu("undefined");function Ds(e){return e!==null&&!Ls(e)&&e.constructor!==null&&!Ls(e.constructor)&&An(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const H0=or("ArrayBuffer");function GS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&H0(e.buffer),t}const XS=Bu("string"),An=Bu("function"),j0=Bu("number"),Ms=e=>e!==null&&typeof e=="object",QS=e=>e===!0||e===!1,Uu=e=>{if(!Ms(e))return!1;const t=Rs(e);return(t===null||t===Object.prototype||Rs(t)===null)&&!Qo(e,U0)&&!Qo(e,Xo)},KS=e=>{if(!Ms(e)||Ds(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},JS=or("Date"),ZS=or("File"),ev=e=>!!(e&&typeof e.uri!="undefined"),tv=e=>e&&typeof e.getParts!="undefined",nv=or("Blob"),rv=or("FileList"),iv=e=>Ms(e)&&An(e.pipe);function sv(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const z0=sv(),$0=typeof z0.FormData!="undefined"?z0.FormData:void 0,ov=e=>{if(!e)return!1;if($0&&e instanceof $0)return!0;const t=Rs(e);if(!t||t===Object.prototype||!An(e.append))return!1;const n=Md(e);return n==="formdata"||n==="object"&&An(e.toString)&&e.toString()==="[object FormData]"},av=or("URLSearchParams"),[uv,lv,cv,dv]=["ReadableStream","Request","Response","Headers"].map(or),fv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ko(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),zi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Ds(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function V0(e,t){if(Ds(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const $i=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,q0=e=>!Ls(e)&&e!==$i;function Fd(...e){const{caseless:t,skipUndefined:n}=q0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&V0(r,u)||u,d=Fu(r,l)?r[l]:void 0;Uu(d)&&Uu(a)?r[l]=Fd(d,a):Uu(a)?r[l]=Fd({},a):zi(a)?r[l]=a.slice():(!n||!Ls(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Ds(l)||(Ko(l,s),typeof l!="object"||zi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];Sv.call(l,p)&&s(l[p],p)}}return r}const hv=(e,t,n,{allOwnKeys:r}={})=>(Ko(t,(s,a)=>{n&&An(s)?Object.defineProperty(e,a,{__proto__:null,value:B0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),pv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mv=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},gv=(e,t,n,r)=>{let s,a,u;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&Rs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ev=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},yv=e=>{if(!e)return null;if(zi(e))return e;let t=e.length;if(!j0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Rs(Uint8Array)),bv=(e,t)=>{const r=(e&&e[Xo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},wv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xv=or("HTMLFormElement"),_v=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:Sv}=Object.prototype,vv=or("RegExp"),Y0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ko(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},Av=e=>{Y0(e,(t,n)=>{if(An(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(An(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Cv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return zi(e)?r(e):r(String(e).split(t)),n},kv=()=>{},Nv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ov(e){return!!(e&&An(e.append)&&e[U0]==="FormData"&&e[Xo])}const Iv=e=>{const t=new WeakSet,n=r=>{if(Ms(r)){if(t.has(r))return;if(Ds(r))return r;if(!("toJSON"in r)){t.add(r);const s=zi(r)?[]:{};return Ko(r,(a,u)=>{const l=n(a);!Ls(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},Pv=or("AsyncFunction"),Rv=e=>e&&(Ms(e)||An(e))&&An(e.then)&&An(e.catch),W0=((e,t)=>e?setImmediate:t?((n,r)=>($i.addEventListener("message",({source:s,data:a})=>{s===$i&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),$i.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",An($i.postMessage)),Lv=typeof queueMicrotask!="undefined"?queueMicrotask.bind($i):typeof process!="undefined"&&process.nextTick||W0,G0=e=>e!=null&&An(e[Xo]),Y={isArray:zi,isArrayBuffer:H0,isBuffer:Ds,isFormData:ov,isArrayBufferView:GS,isString:XS,isNumber:j0,isBoolean:QS,isObject:Ms,isPlainObject:Uu,isEmptyObject:KS,isReadableStream:uv,isRequest:lv,isResponse:cv,isHeaders:dv,isUndefined:Ls,isDate:JS,isFile:ZS,isReactNativeBlob:ev,isReactNative:tv,isBlob:nv,isRegExp:vv,isFunction:An,isStream:iv,isURLSearchParams:av,isTypedArray:Tv,isFileList:rv,forEach:Ko,merge:Fd,extend:hv,trim:fv,stripBOM:pv,inherits:mv,toFlatObject:gv,kindOf:Md,kindOfTest:or,endsWith:Ev,toArray:yv,forEachEntry:bv,matchAll:wv,isHTMLForm:xv,hasOwnProperty:Fu,hasOwnProp:Fu,hasOwnInPrototypeChain:Qo,getSafeProp:WS,reduceDescriptors:Y0,freezeMethods:Av,toObjectSet:Cv,toCamelCase:_v,noop:kv,toFiniteNumber:Nv,findKey:V0,global:$i,isContextDefined:q0,isSpecCompliantForm:Ov,toJSONObject:Iv,isAsyncFn:Pv,isThenable:Rv,setImmediate:W0,asap:Lv,isIterable:G0,isSafeIterable:e=>e!=null&&Qo(e,Xo)&&G0(e)},Dv=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Mv=e=>{const t={};let n,r,s;return e&&e.split(`
9
- `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&Dv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Fv(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Bv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Uv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Bd(e,t){return Y.isArray(e)?e.map(n=>Bd(n,t)):Fv(String(e).replace(t,""))}const Hv=e=>Bd(e,Bv),jv=e=>Bd(e,Uv);function X0(e){const t=Object.create(null);return Y.forEach(e.toJSON(),(n,r)=>{t[r]=jv(n)}),t}const Q0=Symbol("internals");function Jo(e){return e&&String(e).trim().toLowerCase()}function Hu(e){return e===!1||e==null?e:Y.isArray(e)?e.map(Hu):Hv(String(e))}function zv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const $v=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ud(e,t,n,r,s){if(Y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function Vv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function qv(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let an=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const p=Jo(d);if(!p)return;const m=Y.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=Hu(l))}const u=(l,d)=>Y.forEach(l,(f,p)=>a(f,p,d));if(Y.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Y.isString(t)&&(t=t.trim())&&!$v(t))u(Mv(t),n);else if(Y.isObject(t)&&Y.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!Y.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],Y.hasOwnProp(l,f)?(d=l[f],l[f]=Y.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Jo(t),t){const r=Y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return zv(s);if(Y.isFunction(n))return n.call(this,s,r);if(Y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Jo(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ud(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=Jo(u),u){const l=Y.findKey(r,u);l&&(!n||Ud(r,r[l],l,n))&&(delete r[l],s=!0)}}return Y.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||Ud(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return Y.forEach(this,(s,a)=>{const u=Y.findKey(r,a);if(u){n[u]=Hu(s),delete n[a];return}const l=t?Vv(a):String(a).trim();l!==a&&delete n[a],n[l]=Hu(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
10
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Q0]=this[Q0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=Jo(u);r[l]||(qv(s,u),r[l]=!0)}return Y.isArray(t)?t.forEach(a):a(t),this}};an.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(an.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Y.freezeMethods(an);const Yv="[REDACTED ****]";function Wv(e){if(Y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Gv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||Y.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof an&&(a=a.toJSON()),r.push(a);let u;if(Y.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);Y.isUndefined(f)||(u[d]=f)});else{if(!Y.isPlainObject(a)&&Wv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?Yv:s(d);Y.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let ke=class _2 extends Error{static from(t,n,r,s,a,u){const l=new _2(t.message,n||t.code,r,s,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),u&&Object.assign(l,u),l}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&Y.hasOwnProp(t,"redact")?t.redact:void 0,r=Y.isArray(n)&&n.length>0?Gv(t,n):Y.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};ke.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ke.ERR_BAD_OPTION="ERR_BAD_OPTION",ke.ECONNABORTED="ECONNABORTED",ke.ETIMEDOUT="ETIMEDOUT",ke.ECONNREFUSED="ECONNREFUSED",ke.ERR_NETWORK="ERR_NETWORK",ke.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ke.ERR_DEPRECATED="ERR_DEPRECATED",ke.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ke.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ke.ERR_CANCELED="ERR_CANCELED",ke.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ke.ERR_INVALID_URL="ERR_INVALID_URL",ke.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Xv=null,K0=100;function Hd(e){return Y.isPlainObject(e)||Y.isArray(e)}function J0(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function jd(e,t,n){return e?e.concat(t).map(function(s,a){return s=J0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Qv(e){return Y.isArray(e)&&!e.some(Hd)}const Kv=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function ju(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,I){return!Y.isUndefined(I[k])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?K0:n.maxDepth,f=l&&Y.isSpecCompliantForm(t),p=[];if(!Y.isFunction(s))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(Y.isDate(S))return S.toISOString();if(Y.isBoolean(S))return S.toString();if(!f&&Y.isBlob(S))throw new ke("Blob is not supported. Use a Buffer instead.");if(Y.isArrayBuffer(S)||Y.isTypedArray(S)){if(f&&typeof l=="function")return new l([S]);if(typeof Buffer!="undefined")return Buffer.from(S);throw new ke("Blob is not supported. Use a Buffer instead.",ke.ERR_NOT_SUPPORT)}return S}function b(S){if(S>d)throw new ke("Object is too deeply nested ("+S+" levels). Max depth: "+d,ke.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(S,k){if(d===1/0)return JSON.stringify(S);const I=[];return JSON.stringify(S,function(W,D){if(!Y.isObject(D))return D;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(D),b(k+I.length-1),D})}function x(S,k,I){let z=S;if(Y.isReactNative(t)&&Y.isReactNativeBlob(S))return t.append(jd(I,k,a),m(S)),!1;if(S&&!I&&typeof S=="object"){if(Y.endsWith(k,"{}"))k=r?k:k.slice(0,-2),S=y(S,1);else if(Y.isArray(S)&&Qv(S)||(Y.isFileList(S)||Y.endsWith(k,"[]"))&&(z=Y.toArray(S)))return k=J0(k),z.forEach(function(D,V){!(Y.isUndefined(D)||D===null)&&t.append(u===!0?jd([k],V,a):u===null?k:k+"[]",m(D))}),!1}return Hd(S)?!0:(t.append(jd(I,k,a),m(S)),!1)}const _=Object.assign(Kv,{defaultVisitor:x,convertValue:m,isVisitable:Hd});function A(S,k,I=0){if(!Y.isUndefined(S)){if(b(I),p.indexOf(S)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(S),Y.forEach(S,function(W,D){(!(Y.isUndefined(W)||W===null)&&s.call(t,W,Y.isString(D)?D.trim():D,k,_))===!0&&A(W,k?k.concat(D):[D],I+1)}),p.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return A(e),t}function Z0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function zd(e,t){this._pairs=[],e&&ju(e,this,t)}const eg=zd.prototype;eg.append=function(t,n){this._pairs.push([t,n])},eg.toString=function(t){const n=t?r=>t.call(this,r,Z0):Z0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Jv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tg(e,t,n){if(!t)return e;e=e||"";const r=Y.isFunction(n)?{serialize:n}:n,s=Y.getSafeProp(r,"encode")||Jv,a=Y.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=Y.isURLSearchParams(t)?t.toString():new zd(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class ng{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const $d={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Zv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:zd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vd=typeof window!="undefined"&&typeof document!="undefined",qd=typeof navigator=="object"&&navigator||void 0,eA=Vd&&(!qd||["ReactNative","NativeScript","NS"].indexOf(qd.product)<0),tA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nA=Vd&&window.location.href||"http://localhost",rn=j(j({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vd,hasStandardBrowserEnv:eA,hasStandardBrowserWebWorkerEnv:tA,navigator:qd,origin:nA},Symbol.toStringTag,{value:"Module"}))),Zv);function rA(e,t){return ju(e,new rn.classes.URLSearchParams,j({visitor:function(n,r,s,a){return rn.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const rg=K0;function ig(e){if(e>rg)throw new ke("FormData field is too deeply nested ("+e+" levels). Max depth: "+rg,ke.ERR_FORM_DATA_DEPTH_EXCEEDED)}function iA(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)ig(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function sA(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function sg(e){function t(n,r,s,a){ig(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&Y.isArray(s)?s.length:u,d?(Y.hasOwnProp(s,u)?s[u]=Y.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!Y.hasOwnProp(s,u)||!Y.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&Y.isArray(s[u])&&(s[u]=sA(s[u])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,s)=>{t(iA(r),s,n,0)}),n}return null}const Fs=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function oA(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Zo={transitional:$d,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=Y.isObject(t);if(a&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return s?JSON.stringify(sg(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Fs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return rA(t,d).toString();if((l=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Fs(this,"env"),p=f&&f.FormData;return ju(l?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),oA(t)):t}],transformResponse:[function(t){const n=Fs(this,"transitional")||Zo.transitional,r=n&&n.forcedJSONParsing,s=Fs(this,"responseType"),a=s==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Fs(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?ke.from(d,ke.ERR_BAD_RESPONSE,this,null,Fs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch","query"],e=>{Zo.headers[e]={}});function Yd(e,t){const n=this||Zo,r=t||n,s=an.from(r.headers);let a=r.data;return Y.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function og(e){return!!(e&&e.__CANCEL__)}let ea=class extends ke{constructor(t,n,r){super(t==null?"canceled":t,ke.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ag(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ke("Request failed with status code "+n.status,n.status>=400&&n.status<500?ke.ERR_BAD_REQUEST:ke.ERR_BAD_RESPONSE,n.config,n.request,n))}function aA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function uA(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function lA(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const zu=(e,t,n=3)=>{let r=0;const s=uA(50,250);return lA(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=l!=null?Math.min(u,l):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},ug=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},lg=e=>(...t)=>Y.asap(()=>e(...t)),cA=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,dA=rn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&l.push(`path=${r}`),Y.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),Y.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function fA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const pA=/^https?:(?!\/\/)/i,mA=/[\t\n\r]/g;function gA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function EA(e){return gA(e).replace(mA,"")}function cg(e,t){if(typeof e=="string"&&pA.test(EA(e)))throw new ke('Invalid URL: missing "//" after protocol',ke.ERR_INVALID_URL,t)}function dg(e,t,n,r){cg(t,r);let s=!fA(t);return e&&(s||n===!1)?(cg(e,r),hA(e,t)):t}const fg=e=>e instanceof an?j({},e):e;function Vi(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,b,y){return Y.isPlainObject(p)&&Y.isPlainObject(m)?Y.merge.call({caseless:y},p,m):Y.isPlainObject(m)?Y.merge({},m):Y.isArray(m)?m.slice():m}function s(p,m,b,y){if(Y.isUndefined(m)){if(!Y.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!Y.isUndefined(m))return r(void 0,m)}function u(p,m){if(Y.isUndefined(m)){if(!Y.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=Y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Y.isUndefined(m))if(Y.isPlainObject(m)){if(Y.hasOwnProp(m,p))return m[p]}else return;const b=Y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Y.isPlainObject(b)&&Y.hasOwnProp(b,p))return b[p]}function d(p,m,b){if(Y.hasOwnProp(t,b))return r(p,m);if(Y.hasOwnProp(e,b))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,b)=>s(fg(p),fg(m),b,!0)};return Y.forEach(Object.keys(j(j({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=Y.hasOwnProp(f,m)?f[m]:s,y=Y.hasOwnProp(e,m)?e[m]:void 0,x=Y.hasOwnProp(t,m)?t[m]:void 0,_=b(y,x,m);Y.isUndefined(_)&&b!==d||(n[m]=_)}),Y.hasOwnProp(t,"validateStatus")&&Y.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const yA=["content-type","content-length"];function TA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{yA.includes(r.toLowerCase())&&e.set(r,s)})}const bA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function hg(e){const t=Vi({},e),n=b=>Y.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=an.from(l),t.url=tg(dg(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=Y.getSafeProp(d,"username")||"",y=Y.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(b+":"+(y?bA(y):"")))}catch(x){throw ke.from(x,ke.ERR_BAD_OPTION_VALUE,e)}}if(Y.isFormData(r)&&(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv||Y.isReactNative(r)?l.setContentType(void 0):Y.isFunction(r.getHeaders)&&TA(l,r.getHeaders(),n("formDataHeaderPolicy"))),rn.hasStandardBrowserEnv&&(Y.isFunction(s)&&(s=s(t)),s===!0||s==null&&cA(t.url))){const y=a&&u&&dA.read(u);y&&l.set(a,y)}return t}const wA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=hg(e);let a=s.data;const u=an.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,x;function _(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function S(){if(!A)return;const I=an.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};ag(function(V){n(V),_()},function(V){r(V),_()},W),A=null}"onloadend"in A?A.onloadend=S:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(S)},A.onabort=function(){A&&(r(new ke("Request aborted",ke.ECONNABORTED,e,A)),_(),A=null)},A.onerror=function(z){const W=z&&z.message?z.message:"Network Error",D=new ke(W,ke.ERR_NETWORK,e,A);D.event=z||null,r(D),_(),A=null},A.ontimeout=function(){let z=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const W=s.transitional||$d;s.timeoutErrorMessage&&(z=s.timeoutErrorMessage),r(new ke(z,W.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,A)),_(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(X0(u),function(z,W){A.setRequestHeader(W,z)}),Y.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([b,x]=zu(f,!0),A.addEventListener("progress",b)),d&&A.upload&&([m,y]=zu(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{A&&(r(!I||I.type?new ea(null,e,A):I),A.abort(),_(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=aA(s.url);if(k&&!rn.protocols.includes(k)){r(new ke("Unsupported protocol "+k+":",ke.ERR_BAD_REQUEST,e)),_();return}A.send(a||null)})},xA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof ke?f:new ea(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new ke(`timeout of ${t}ms exceeded`,ke.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>Y.asap(u),l},_A=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},SA=function(e,t){return u0(this,null,function*(){try{for(var n=x2(vA(e)),r,s,a;r=!(s=yield new Ns(n.next())).done;r=!1){const u=s.value;yield*l0(_A(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Ns(s.call(n)))}finally{if(a)throw a[0]}}})},vA=function(e){return u0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*l0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Ns(t.read());if(n)break;yield r}}finally{yield new Ns(t.cancel())}})},pg=(e,t,n,r)=>{const s=SA(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ue(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){l(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},$u=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,AA=(e,t,n)=>t+2<n&&$u(e.charCodeAt(t+1))&&$u(e.charCodeAt(t+2));function CA(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const l=r.length;for(let y=0;y<l;y++)if(r.charCodeAt(y)===37&&y+2<l){const x=r.charCodeAt(y+1),_=r.charCodeAt(y+2);$u(x)&&$u(_)&&(u-=2,y+=2)}let d=0,f=l-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&AA(r,u,l))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<l){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Wd="1.18.1",mg=64*1024,{isFunction:Vu}=Y,kA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),gg=e=>{if(!Y.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Eg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},NA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},OA=e=>{const t=Y.global!==void 0&&Y.global!==null?Y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?Vu(s):typeof fetch=="function",d=Vu(a),f=Vu(u);if(!l)return!1;const p=l&&Vu(n),m=l&&(typeof r=="function"?(S=>k=>S.encode(k))(new r):S=>Ue(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),b=d&&p&&Eg(()=>{let S=!1;const k=new a(rn.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),I=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),S&&!I}),y=f&&p&&Eg(()=>Y.isReadableStream(new u("").body)),x={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!x[S]&&(x[S]=(k,I)=>{let z=k&&k[S];if(z)return z.call(k);throw new ke(`Response type '${S}' is not supported`,ke.ERR_NOT_SUPPORT,I)})});const _=S=>Ue(null,null,function*(){if(S==null)return 0;if(Y.isBlob(S))return S.size;if(Y.isSpecCompliantForm(S))return(yield new a(rn.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(S)||Y.isArrayBuffer(S))return S.byteLength;if(Y.isURLSearchParams(S)&&(S=S+""),Y.isString(S))return(yield m(S)).byteLength}),A=(S,k)=>Ue(null,null,function*(){const I=Y.toFiniteNumber(S.getContentLength());return I==null?_(k):I});return S=>Ue(null,null,function*(){let{url:k,method:I,data:z,signal:W,cancelToken:D,timeout:V,onDownloadProgress:ee,onUploadProgress:ce,responseType:H,headers:ie,withCredentials:ne="same-origin",fetchOptions:ue,maxContentLength:fe,maxBodyLength:ae}=hg(S);const ve=Y.isNumber(fe)&&fe>-1,de=Y.isNumber(ae)&&ae>-1,G=me=>Y.hasOwnProp(S,me)?S[me]:void 0;let se=s||fetch;H=H?(H+"").toLowerCase():"text";let C=xA([W,D&&D.toAbortSignal()],V),M=null;const J=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let P,Se=null;const Ae=()=>new ke("Request body larger than maxBodyLength limit",ke.ERR_BAD_REQUEST,S,M);try{let me;const Ie=G("auth");if(Ie){const ze=Y.getSafeProp(Ie,"username")||"",Ne=Y.getSafeProp(Ie,"password")||"";me={username:ze,password:Ne}}if(NA(k)){const ze=new URL(k,rn.origin);if(!me&&(ze.username||ze.password)){const Ne=gg(ze.username),Qe=gg(ze.password);me={username:Ne,password:Qe}}(ze.username||ze.password)&&(ze.username="",ze.password="",k=ze.href)}if(me&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(kA((me.username||"")+":"+(me.password||""))))),ve&&typeof k=="string"&&k.startsWith("data:")&&CA(k)>fe)throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,S,M);if(de&&I!=="get"&&I!=="head"){const ze=yield _(z);if(typeof ze=="number"&&isFinite(ze)&&(P=ze,ze>ae))throw Ae()}const Me=de&&(Y.isReadableStream(z)||Y.isStream(z)),Xe=(ze,Ne,Qe)=>pg(ze,mg,tt=>{if(de&&tt>ae)throw Se=Ae();Ne&&Ne(tt)},Qe);if(b&&I!=="get"&&I!=="head"&&(ce||Me)){if(P=P==null?yield A(ie,z):P,P!==0||Me){let ze=new a(k,{method:"POST",body:z,duplex:"half"}),Ne;if(Y.isFormData(z)&&(Ne=ze.headers.get("content-type"))&&ie.setContentType(Ne),ze.body){const[Qe,tt]=ce&&ug(P,zu(lg(ce)))||[];z=Xe(ze.body,Qe,tt)}}}else if(Me&&!d&&p&&I!=="get"&&I!=="head")z=Xe(z);else if(Me&&d&&!b&&I!=="get"&&I!=="head")throw new ke("Stream request bodies are not supported by the current fetch implementation",ke.ERR_NOT_SUPPORT,S,M);Y.isString(ne)||(ne=ne?"include":"omit");const st=d&&"credentials"in a.prototype;if(Y.isFormData(z)){const ze=ie.getContentType();ze&&/^multipart\/form-data/i.test(ze)&&!/boundary=/i.test(ze)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+Wd,!1);const St=le(j({},ue),{signal:C,method:I.toUpperCase(),headers:X0(ie.normalize()),body:z,duplex:"half",credentials:st?ne:void 0});M=d&&new a(k,St);let Rt=yield d?se(M,ue):se(k,St);const hn=an.from(Rt.headers);if(ve){const ze=Y.toFiniteNumber(hn.getContentLength());if(ze!=null&&ze>fe)throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,S,M)}const wn=y&&(H==="stream"||H==="response");if(y&&Rt.body&&(ee||ve||wn&&J)){const ze={};["status","statusText","headers"].forEach(Rn=>{ze[Rn]=Rt[Rn]});const Ne=Y.toFiniteNumber(hn.getContentLength()),[Qe,tt]=ee&&ug(Ne,zu(lg(ee),!0))||[];let ht=0;const Dt=Rn=>{if(ve&&(ht=Rn,ht>fe))throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,S,M);Qe&&Qe(Rn)};Rt=new u(pg(Rt.body,mg,Dt,()=>{tt&&tt(),J&&J()}),ze)}H=H||"text";let Lt=yield x[Y.findKey(x,H)||"text"](Rt,S);if(ve&&!y&&!wn){let ze;if(Lt!=null&&(typeof Lt.byteLength=="number"?ze=Lt.byteLength:typeof Lt.size=="number"?ze=Lt.size:typeof Lt=="string"&&(ze=typeof r=="function"?new r().encode(Lt).byteLength:Lt.length)),typeof ze=="number"&&ze>fe)throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,S,M)}return!wn&&J&&J(),yield new Promise((ze,Ne)=>{ag(ze,Ne,{data:Lt,headers:an.from(Rt.headers),status:Rt.status,statusText:Rt.statusText,config:S,request:M})})}catch(me){if(J&&J(),C&&C.aborted&&C.reason instanceof ke){const Ie=C.reason;throw Ie.config=S,M&&(Ie.request=M),me!==Ie&&Object.defineProperty(Ie,"cause",{__proto__:null,value:me,writable:!0,enumerable:!1,configurable:!0}),Ie}if(Se)throw M&&!Se.request&&(Se.request=M),Se;if(me instanceof ke)throw M&&!me.request&&(me.request=M),me;if(me&&me.name==="TypeError"&&/Load failed|fetch/i.test(me.message)){const Ie=new ke("Network Error",ke.ERR_NETWORK,S,M,me&&me.response);throw Object.defineProperty(Ie,"cause",{__proto__:null,value:me.cause||me,writable:!0,enumerable:!1,configurable:!0}),Ie}throw ke.from(me,me&&me.code,S,M,me&&me.response)}})},IA=new Map,yg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,l=u,d,f,p=IA;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:OA(t)),p=f;return f};yg();const Gd={http:Xv,xhr:wA,fetch:{get:yg}};Y.forEach(Gd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Tg=e=>`- ${e}`,PA=e=>Y.isFunction(e)||e===null||e===!1;function RA(e,t){e=Y.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(s=r,!PA(r)&&(s=Gd[(l=String(r)).toLowerCase()],s===void 0))throw new ke(`Unknown adapter '${l}'`);if(s&&(Y.isFunction(s)||(s=s.get(t))))break;a[l||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?u.length>1?`since :
11
- `+u.map(Tg).join(`
12
- `):" "+Tg(u[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+l,ke.ERR_NOT_SUPPORT)}return s}const bg={getAdapter:RA,adapters:Gd};function Xd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ea(null,e)}function wg(e){return Xd(e),e.headers=an.from(e.headers),e.data=Yd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bg.getAdapter(e.adapter||Zo.adapter,e)(e).then(function(r){Xd(e),e.response=r;try{r.data=Yd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=an.from(r.headers),r},function(r){if(!og(r)&&(Xd(e),r&&r.response)){e.response=r.response;try{r.response.data=Yd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=an.from(r.response.headers)}return Promise.reject(r)})}const qu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xg={};qu.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Wd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new ke(s(u," has been removed"+(n?" in "+n:"")),ke.ERR_DEPRECATED);return n&&!xg[u]&&(xg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},qu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function LA(e,t,n){if(typeof e!="object"||e===null)throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new ke("option "+a+" must be "+d,ke.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ke("Unknown option "+a,ke.ERR_BAD_OPTION)}}const Yu={assertOptions:LA,validators:qu},un=Yu.validators;let qi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ng,response:new ng}}request(t,n){return Ue(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
8
+ `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class zr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let L0=class extends zr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class D0 extends zr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Rd=class extends zr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class NS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}const OS="0Mw";let IS=class extends kS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,p,m,b;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(l=s.timeout)!=null?l:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(b=s.capabilitiesVersion)!=null?b:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new NS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return Be(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return Be(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return Be(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new zr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return Be(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return Be(this,null,function*(){var u,l,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(l=a.openConversationsFound)!=null?l:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return Be(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return Be(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new zr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new zr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Be(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}getAuthLinkKey(){return Be(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/authlink");if(!t||!t.authLinkKey)throw new L0("Auth link response did not contain an authLinkKey",200,t);return this.logger.info("Auth link key retrieved"),t.authLinkKey})}openSSE(t){return Be(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new CS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>Be(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var l;const n=t.conversationEntry;if(!n)return;const r=((l=n.sender)==null?void 0:l.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s,messagingSessionId:this.extractMessagingSessionId(n)})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),l=this.getNestedValue(u,"streamingToken");a=this.getNestedString(l,"token","text")||this.getNestedString(l,"token","content")||"";const d=this.getNestedValue(l,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(l,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(l,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",j(j(j({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,l,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var A,S,C;const b=p.participant,y=p.displayName||(b==null?void 0:b.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(b==null?void 0:b.role)||((C=(S=t.conversationEntry)==null?void 0:S.sender)==null?void 0:C.role)||"",_=p.operation||p.event||"";this.emit("participant_changed",j({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(_)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",j({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return Be(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new Rd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return Be(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let l;try{const d=new AbortController;l=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=j({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(l),!m.ok){const b=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new Rd(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new Rd(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new L0(`Request ${t} ${n} failed (${m.status}): ${b}`,m.status,b)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(l),d instanceof zr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new D0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new D0(`Network error: ${d.message}`,u,{cause:d})}throw new zr(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new zr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}extractMessagingSessionId(t){var n;return(n=t.relatedRecords)==null?void 0:n.find(r=>r.startsWith(OS))}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}};const M0="onCimulateWidgetReady",N="cim-widget",Hn=`--${N}`,li={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},PS=(e=li)=>({[`${Hn}-primary-color`]:e.primaryColor||li.primaryColor,[`${Hn}-secondary-color`]:e.secondaryColor||li.secondaryColor,[`${Hn}-font-color`]:e.fontColor||li.fontColor,[`${Hn}-font-family`]:e.fontFamily||li.fontFamily,[`${Hn}-background-color`]:e.backgroundColor||li.backgroundColor,[`${Hn}-border-color`]:e.borderColor||li.borderColor,[`${Hn}-border-radius`]:e.borderRadius||li.borderRadius});class RS{constructor(){Qe(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Qe(this,"connectedProxy");Qe(this,"modeProxy");Qe(this,"entryTypeProxy");Qe(this,"statusProxy");Qe(this,"dialogProxy");Qe(this,"modalProxy",{isFullscreen:!1});Qe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Qe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return MS(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const ct=new RS,LS=e=>{window.addEventListener(Id,e)},DS=e=>{window.removeEventListener(Id,e)},MS=(e,t)=>{const n=new CustomEvent(Id,{detail:{property:e,value:t}});window.dispatchEvent(n)},F0=e=>{ct.connectedProxy.connected=e},B0=e=>{if(!P0(e)){const t=I0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}ct.entryTypeProxy.entryType=e},$r=e=>{const t=ct.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;ct.statusProxy.isOpen=n,n&&(ct.statusProxy.isMinimized=!1)},Du=e=>{const t=ct.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;ct.statusProxy.isMinimized=n,n&&(ct.statusProxy.isOpen=!1)},Ld=e=>{ct.modalProxy.isFullscreen=e},Mu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);ct.statusProxy.type=e,e==="dialog"||e==="chat"?ct.modeProxy.mode="embedded":ct.modeProxy.mode="standalone"},Dd=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);ct.dialogProxy.position=e},FS=e=>{const t=ct.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;ct.dialogProxy.isFullHeight=n};function BS(){var e=R.useRef(!0);return e.current?(e.current=!1,!0):e.current}function US(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function HS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Md=typeof window!="undefined",Fu=function(e){R.useEffect(e,[])},jS=function(e){var t=R.useRef(e);t.current=e,Fu(function(){return function(){return t.current()}})},zS=function(e){var t=R.useRef(0),n=R.useState(e),r=n[0],s=n[1],a=R.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return jS(function(){cancelAnimationFrame(t.current)}),[r,a]},$S=function(e,t){return e===t};function VS(e,t){t===void 0&&(t=$S);var n=R.useRef(),r=R.useRef(e),s=BS();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var qS=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,l=zS({width:Md?window.innerWidth:r,height:Md?window.innerHeight:a}),d=l[0],f=l[1];return R.useEffect(function(){if(Md){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return US(window,"resize",p),function(){HS(window,"resize",p)}}},[]),d};const U0=R.createContext({mode:ct.modeProxy.mode,entryType:ct.entryType,status:ct.statusProxy,dialogPosition:ct.dialogProxy.position,isDialogFullHeight:ct.dialogProxy.isFullHeight,dialogWidth:ct.dialogProxy.width,isModalFullscreen:ct.modalProxy.isFullscreen,previousComponentType:ct.statusProxy.type}),YS=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=R.useState(e!=null?e:ct.entryTypeProxy.entryType),[u,l]=R.useState(ct.modeProxy.mode),[d,f]=R.useState({type:n||ct.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:ct.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:ct.statusProxy.isMinimized}),[p,m]=R.useState(ct.dialogProxy.position),[b,y]=R.useState(ct.dialogProxy.isFullHeight),[x,_]=R.useState(ct.dialogProxy.width),[A,S]=R.useState(ct.modalProxy.isFullscreen),C=VS(d.type);R.useEffect(()=>{const z=W=>{const{property:D,value:V}=W.detail||{};if(!(!D||V===void 0)){if(D==="mode"){l(V);return}if(D==="entryType"){a(V);return}if(D==="isMinimized"){f(ee=>le(j({},ee),{isMinimized:V}));return}if(D==="isOpen"){f(ee=>le(j({},ee),{isOpen:V}));return}if(D==="type"){f(ee=>le(j({},ee),{type:V}));return}if(D==="position"){m(V);return}if(D==="isFullHeight"){y(V);return}if(D==="width"){_(V);return}if(D==="isFullscreen"){S(V);return}}};return LS(z),()=>{DS(z)}},[]),Fu(()=>{e&&B0(e)}),Fu(()=>{const z=n||(t==null?void 0:t.type);z&&Mu(z),t&&"isOpen"in t&&$r(!!t.isOpen),t&&"isMinimized"in t&&Du(!!t.isMinimized)}),Fu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:z}=t.options;z&&Dd(z),"dialogFullHeight"in t.options&&FS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&_(t.options.dialogWidth),"isModalFullscreen"in t.options&&Ld(!!t.options.isModalFullscreen)});const I=R.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:x,isModalFullscreen:A}),[u,s,d,C,p,b,x,A]);return w.jsx(U0.Provider,{value:I,children:r})},Vr=()=>{const e=R.useContext(U0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};function H0(e,t){return function(){return e.apply(t,arguments)}}const{toString:WS}=Object.prototype,{getPrototypeOf:Ms}=Object,{iterator:Ko,toStringTag:j0}=Symbol,Bu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Qo=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Bu(n,t))return!0;n=Ms(n)}return!1},GS=(e,t)=>e!=null&&Qo(e,t)?e[t]:void 0,Fd=(e=>t=>{const n=WS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ar=e=>(e=e.toLowerCase(),t=>Fd(t)===e),Uu=e=>t=>typeof t===e,{isArray:Vi}=Array,Fs=Uu("undefined");function Bs(e){return e!==null&&!Fs(e)&&e.constructor!==null&&!Fs(e.constructor)&&kn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const z0=ar("ArrayBuffer");function XS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&z0(e.buffer),t}const KS=Uu("string"),kn=Uu("function"),$0=Uu("number"),Us=e=>e!==null&&typeof e=="object",QS=e=>e===!0||e===!1,Hu=e=>{if(!Us(e))return!1;const t=Ms(e);return(t===null||t===Object.prototype||Ms(t)===null)&&!Qo(e,j0)&&!Qo(e,Ko)},JS=e=>{if(!Us(e)||Bs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},ZS=ar("Date"),ev=ar("File"),tv=e=>!!(e&&typeof e.uri!="undefined"),nv=e=>e&&typeof e.getParts!="undefined",rv=ar("Blob"),iv=ar("FileList"),sv=e=>Us(e)&&kn(e.pipe);function ov(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const V0=ov(),q0=typeof V0.FormData!="undefined"?V0.FormData:void 0,av=e=>{if(!e)return!1;if(q0&&e instanceof q0)return!0;const t=Ms(e);if(!t||t===Object.prototype||!kn(e.append))return!1;const n=Fd(e);return n==="formdata"||n==="object"&&kn(e.toString)&&e.toString()==="[object FormData]"},uv=ar("URLSearchParams"),[lv,cv,dv,fv]=["ReadableStream","Request","Response","Headers"].map(ar),hv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Vi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Bs(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function Y0(e,t){if(Bs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const qi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,W0=e=>!Fs(e)&&e!==qi;function Bd(...e){const{caseless:t,skipUndefined:n}=W0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&Y0(r,u)||u,d=Bu(r,l)?r[l]:void 0;Hu(d)&&Hu(a)?r[l]=Bd(d,a):Hu(a)?r[l]=Bd({},a):Vi(a)?r[l]=a.slice():(!n||!Fs(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Bs(l)||(Jo(l,s),typeof l!="object"||Vi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];vv.call(l,p)&&s(l[p],p)}}return r}const pv=(e,t,n,{allOwnKeys:r}={})=>(Jo(t,(s,a)=>{n&&kn(s)?Object.defineProperty(e,a,{__proto__:null,value:H0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),mv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gv=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Ev=(e,t,n,r)=>{let s,a,u;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&Ms(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yv=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Tv=e=>{if(!e)return null;if(Vi(e))return e;let t=e.length;if(!$0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},bv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ms(Uint8Array)),wv=(e,t)=>{const r=(e&&e[Ko]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},xv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},_v=ar("HTMLFormElement"),Sv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:vv}=Object.prototype,Av=ar("RegExp"),G0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},kv=e=>{G0(e,(t,n)=>{if(kn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(kn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Cv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Vi(e)?r(e):r(String(e).split(t)),n},Nv=()=>{},Ov=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Iv(e){return!!(e&&kn(e.append)&&e[j0]==="FormData"&&e[Ko])}const Pv=e=>{const t=new WeakSet,n=r=>{if(Us(r)){if(t.has(r))return;if(Bs(r))return r;if(!("toJSON"in r)){t.add(r);const s=Vi(r)?[]:{};return Jo(r,(a,u)=>{const l=n(a);!Fs(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},Rv=ar("AsyncFunction"),Lv=e=>e&&(Us(e)||kn(e))&&kn(e.then)&&kn(e.catch),X0=((e,t)=>e?setImmediate:t?((n,r)=>(qi.addEventListener("message",({source:s,data:a})=>{s===qi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),qi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",kn(qi.postMessage)),Dv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(qi):typeof process!="undefined"&&process.nextTick||X0,K0=e=>e!=null&&kn(e[Ko]),Y={isArray:Vi,isArrayBuffer:z0,isBuffer:Bs,isFormData:av,isArrayBufferView:XS,isString:KS,isNumber:$0,isBoolean:QS,isObject:Us,isPlainObject:Hu,isEmptyObject:JS,isReadableStream:lv,isRequest:cv,isResponse:dv,isHeaders:fv,isUndefined:Fs,isDate:ZS,isFile:ev,isReactNativeBlob:tv,isReactNative:nv,isBlob:rv,isRegExp:Av,isFunction:kn,isStream:sv,isURLSearchParams:uv,isTypedArray:bv,isFileList:iv,forEach:Jo,merge:Bd,extend:pv,trim:hv,stripBOM:mv,inherits:gv,toFlatObject:Ev,kindOf:Fd,kindOfTest:ar,endsWith:yv,toArray:Tv,forEachEntry:wv,matchAll:xv,isHTMLForm:_v,hasOwnProperty:Bu,hasOwnProp:Bu,hasOwnInPrototypeChain:Qo,getSafeProp:GS,reduceDescriptors:G0,freezeMethods:kv,toObjectSet:Cv,toCamelCase:Sv,noop:Nv,toFiniteNumber:Ov,findKey:Y0,global:qi,isContextDefined:W0,isSpecCompliantForm:Iv,toJSONObject:Pv,isAsyncFn:Rv,isThenable:Lv,setImmediate:X0,asap:Dv,isIterable:K0,isSafeIterable:e=>e!=null&&Qo(e,Ko)&&K0(e)},Mv=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fv=e=>{const t={};let n,r,s;return e&&e.split(`
9
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&Mv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Bv(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Uv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Hv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ud(e,t){return Y.isArray(e)?e.map(n=>Ud(n,t)):Bv(String(e).replace(t,""))}const jv=e=>Ud(e,Uv),zv=e=>Ud(e,Hv);function Q0(e){const t=Object.create(null);return Y.forEach(e.toJSON(),(n,r)=>{t[r]=zv(n)}),t}const J0=Symbol("internals");function Zo(e){return e&&String(e).trim().toLowerCase()}function ju(e){return e===!1||e==null?e:Y.isArray(e)?e.map(ju):jv(String(e))}function $v(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Vv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Hd(e,t,n,r,s){if(Y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function qv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Yv(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let un=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const p=Zo(d);if(!p)return;const m=Y.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=ju(l))}const u=(l,d)=>Y.forEach(l,(f,p)=>a(f,p,d));if(Y.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Y.isString(t)&&(t=t.trim())&&!Vv(t))u(Fv(t),n);else if(Y.isObject(t)&&Y.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!Y.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],Y.hasOwnProp(l,f)?(d=l[f],l[f]=Y.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Zo(t),t){const r=Y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return $v(s);if(Y.isFunction(n))return n.call(this,s,r);if(Y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Zo(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Hd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=Zo(u),u){const l=Y.findKey(r,u);l&&(!n||Hd(r,r[l],l,n))&&(delete r[l],s=!0)}}return Y.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||Hd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return Y.forEach(this,(s,a)=>{const u=Y.findKey(r,a);if(u){n[u]=ju(s),delete n[a];return}const l=t?qv(a):String(a).trim();l!==a&&delete n[a],n[l]=ju(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
10
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[J0]=this[J0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=Zo(u);r[l]||(Yv(s,u),r[l]=!0)}return Y.isArray(t)?t.forEach(a):a(t),this}};un.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(un.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Y.freezeMethods(un);const Wv="[REDACTED ****]";function Gv(e){if(Y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Xv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||Y.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof un&&(a=a.toJSON()),r.push(a);let u;if(Y.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);Y.isUndefined(f)||(u[d]=f)});else{if(!Y.isPlainObject(a)&&Gv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?Wv:s(d);Y.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ne=class v2 extends Error{static from(t,n,r,s,a,u){const l=new v2(t.message,n||t.code,r,s,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),u&&Object.assign(l,u),l}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&Y.hasOwnProp(t,"redact")?t.redact:void 0,r=Y.isArray(n)&&n.length>0?Xv(t,n):Y.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Kv=null,Z0=100;function jd(e){return Y.isPlainObject(e)||Y.isArray(e)}function eg(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function zd(e,t,n){return e?e.concat(t).map(function(s,a){return s=eg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Qv(e){return Y.isArray(e)&&!e.some(jd)}const Jv=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function zu(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,I){return!Y.isUndefined(I[C])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?Z0:n.maxDepth,f=l&&Y.isSpecCompliantForm(t),p=[];if(!Y.isFunction(s))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(Y.isDate(S))return S.toISOString();if(Y.isBoolean(S))return S.toString();if(!f&&Y.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");if(Y.isArrayBuffer(S)||Y.isTypedArray(S)){if(f&&typeof l=="function")return new l([S]);if(typeof Buffer!="undefined")return Buffer.from(S);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return S}function b(S){if(S>d)throw new Ne("Object is too deeply nested ("+S+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(S,C){if(d===1/0)return JSON.stringify(S);const I=[];return JSON.stringify(S,function(W,D){if(!Y.isObject(D))return D;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(D),b(C+I.length-1),D})}function x(S,C,I){let z=S;if(Y.isReactNative(t)&&Y.isReactNativeBlob(S))return t.append(zd(I,C,a),m(S)),!1;if(S&&!I&&typeof S=="object"){if(Y.endsWith(C,"{}"))C=r?C:C.slice(0,-2),S=y(S,1);else if(Y.isArray(S)&&Qv(S)||(Y.isFileList(S)||Y.endsWith(C,"[]"))&&(z=Y.toArray(S)))return C=eg(C),z.forEach(function(D,V){!(Y.isUndefined(D)||D===null)&&t.append(u===!0?zd([C],V,a):u===null?C:C+"[]",m(D))}),!1}return jd(S)?!0:(t.append(zd(I,C,a),m(S)),!1)}const _=Object.assign(Jv,{defaultVisitor:x,convertValue:m,isVisitable:jd});function A(S,C,I=0){if(!Y.isUndefined(S)){if(b(I),p.indexOf(S)!==-1)throw new Error("Circular reference detected in "+C.join("."));p.push(S),Y.forEach(S,function(W,D){(!(Y.isUndefined(W)||W===null)&&s.call(t,W,Y.isString(D)?D.trim():D,C,_))===!0&&A(W,C?C.concat(D):[D],I+1)}),p.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return A(e),t}function tg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function $d(e,t){this._pairs=[],e&&zu(e,this,t)}const ng=$d.prototype;ng.append=function(t,n){this._pairs.push([t,n])},ng.toString=function(t){const n=t?r=>t.call(this,r,tg):tg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Zv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rg(e,t,n){if(!t)return e;e=e||"";const r=Y.isFunction(n)?{serialize:n}:n,s=Y.getSafeProp(r,"encode")||Zv,a=Y.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=Y.isURLSearchParams(t)?t.toString():new $d(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class ig{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Vd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},eA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:$d,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},qd=typeof window!="undefined"&&typeof document!="undefined",Yd=typeof navigator=="object"&&navigator||void 0,tA=qd&&(!Yd||["ReactNative","NativeScript","NS"].indexOf(Yd.product)<0),nA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",rA=qd&&window.location.href||"http://localhost",sn=j(j({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qd,hasStandardBrowserEnv:tA,hasStandardBrowserWebWorkerEnv:nA,navigator:Yd,origin:rA},Symbol.toStringTag,{value:"Module"}))),eA);function iA(e,t){return zu(e,new sn.classes.URLSearchParams,j({visitor:function(n,r,s,a){return sn.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const sg=Z0;function og(e){if(e>sg)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+sg,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function sA(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)og(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function oA(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function ag(e){function t(n,r,s,a){og(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&Y.isArray(s)?s.length:u,d?(Y.hasOwnProp(s,u)?s[u]=Y.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!Y.hasOwnProp(s,u)||!Y.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&Y.isArray(s[u])&&(s[u]=oA(s[u])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,s)=>{t(sA(r),s,n,0)}),n}return null}const Hs=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function aA(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ea={transitional:Vd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=Y.isObject(t);if(a&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return s?JSON.stringify(ag(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Hs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return iA(t,d).toString();if((l=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Hs(this,"env"),p=f&&f.FormData;return zu(l?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),aA(t)):t}],transformResponse:[function(t){const n=Hs(this,"transitional")||ea.transitional,r=n&&n.forcedJSONParsing,s=Hs(this,"responseType"),a=s==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Hs(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Hs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch","query"],e=>{ea.headers[e]={}});function Wd(e,t){const n=this||ea,r=t||n,s=un.from(r.headers);let a=r.data;return Y.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function ug(e){return!!(e&&e.__CANCEL__)}let ta=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function lg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function uA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function lA(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function cA(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const $u=(e,t,n=3)=>{let r=0;const s=lA(50,250);return cA(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=l!=null?Math.min(u,l):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},cg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},dg=e=>(...t)=>Y.asap(()=>e(...t)),dA=sn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,fA=sn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&l.push(`path=${r}`),Y.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),Y.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function hA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const mA=/^https?:(?!\/\/)/i,gA=/[\t\n\r]/g;function EA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function yA(e){return EA(e).replace(gA,"")}function fg(e,t){if(typeof e=="string"&&mA.test(yA(e)))throw new Ne('Invalid URL: missing "//" after protocol',Ne.ERR_INVALID_URL,t)}function hg(e,t,n,r){fg(t,r);let s=!hA(t);return e&&(s||n===!1)?(fg(e,r),pA(e,t)):t}const pg=e=>e instanceof un?j({},e):e;function Yi(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,b,y){return Y.isPlainObject(p)&&Y.isPlainObject(m)?Y.merge.call({caseless:y},p,m):Y.isPlainObject(m)?Y.merge({},m):Y.isArray(m)?m.slice():m}function s(p,m,b,y){if(Y.isUndefined(m)){if(!Y.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!Y.isUndefined(m))return r(void 0,m)}function u(p,m){if(Y.isUndefined(m)){if(!Y.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=Y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Y.isUndefined(m))if(Y.isPlainObject(m)){if(Y.hasOwnProp(m,p))return m[p]}else return;const b=Y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Y.isPlainObject(b)&&Y.hasOwnProp(b,p))return b[p]}function d(p,m,b){if(Y.hasOwnProp(t,b))return r(p,m);if(Y.hasOwnProp(e,b))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,b)=>s(pg(p),pg(m),b,!0)};return Y.forEach(Object.keys(j(j({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=Y.hasOwnProp(f,m)?f[m]:s,y=Y.hasOwnProp(e,m)?e[m]:void 0,x=Y.hasOwnProp(t,m)?t[m]:void 0,_=b(y,x,m);Y.isUndefined(_)&&b!==d||(n[m]=_)}),Y.hasOwnProp(t,"validateStatus")&&Y.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const TA=["content-type","content-length"];function bA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{TA.includes(r.toLowerCase())&&e.set(r,s)})}const wA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function mg(e){const t=Yi({},e),n=b=>Y.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=un.from(l),t.url=rg(hg(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=Y.getSafeProp(d,"username")||"",y=Y.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(b+":"+(y?wA(y):"")))}catch(x){throw Ne.from(x,Ne.ERR_BAD_OPTION_VALUE,e)}}if(Y.isFormData(r)&&(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv||Y.isReactNative(r)?l.setContentType(void 0):Y.isFunction(r.getHeaders)&&bA(l,r.getHeaders(),n("formDataHeaderPolicy"))),sn.hasStandardBrowserEnv&&(Y.isFunction(s)&&(s=s(t)),s===!0||s==null&&dA(t.url))){const y=a&&u&&fA.read(u);y&&l.set(a,y)}return t}const xA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=mg(e);let a=s.data;const u=un.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,x;function _(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function S(){if(!A)return;const I=un.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};lg(function(V){n(V),_()},function(V){r(V),_()},W),A=null}"onloadend"in A?A.onloadend=S:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(S)},A.onabort=function(){A&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,A)),_(),A=null)},A.onerror=function(z){const W=z&&z.message?z.message:"Network Error",D=new Ne(W,Ne.ERR_NETWORK,e,A);D.event=z||null,r(D),_(),A=null},A.ontimeout=function(){let z=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const W=s.transitional||Vd;s.timeoutErrorMessage&&(z=s.timeoutErrorMessage),r(new Ne(z,W.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),_(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(Q0(u),function(z,W){A.setRequestHeader(W,z)}),Y.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([b,x]=$u(f,!0),A.addEventListener("progress",b)),d&&A.upload&&([m,y]=$u(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{A&&(r(!I||I.type?new ta(null,e,A):I),A.abort(),_(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const C=uA(s.url);if(C&&!sn.protocols.includes(C)){r(new Ne("Unsupported protocol "+C+":",Ne.ERR_BAD_REQUEST,e)),_();return}A.send(a||null)})},_A=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new ta(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>Y.asap(u),l},SA=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},vA=function(e,t){return l0(this,null,function*(){try{for(var n=S2(AA(e)),r,s,a;r=!(s=yield new Ps(n.next())).done;r=!1){const u=s.value;yield*c0(SA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Ps(s.call(n)))}finally{if(a)throw a[0]}}})},AA=function(e){return l0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*c0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Ps(t.read());if(n)break;yield r}}finally{yield new Ps(t.cancel())}})},gg=(e,t,n,r)=>{const s=vA(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Be(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){l(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},Vu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,kA=(e,t,n)=>t+2<n&&Vu(e.charCodeAt(t+1))&&Vu(e.charCodeAt(t+2));function CA(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const l=r.length;for(let y=0;y<l;y++)if(r.charCodeAt(y)===37&&y+2<l){const x=r.charCodeAt(y+1),_=r.charCodeAt(y+2);Vu(x)&&Vu(_)&&(u-=2,y+=2)}let d=0,f=l-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&kA(r,u,l))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<l){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Gd="1.18.1",Eg=64*1024,{isFunction:qu}=Y,NA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),yg=e=>{if(!Y.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},OA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},IA=e=>{const t=Y.global!==void 0&&Y.global!==null?Y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?qu(s):typeof fetch=="function",d=qu(a),f=qu(u);if(!l)return!1;const p=l&&qu(n),m=l&&(typeof r=="function"?(S=>C=>S.encode(C))(new r):S=>Be(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),b=d&&p&&Tg(()=>{let S=!1;const C=new a(sn.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),I=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),S&&!I}),y=f&&p&&Tg(()=>Y.isReadableStream(new u("").body)),x={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!x[S]&&(x[S]=(C,I)=>{let z=C&&C[S];if(z)return z.call(C);throw new Ne(`Response type '${S}' is not supported`,Ne.ERR_NOT_SUPPORT,I)})});const _=S=>Be(null,null,function*(){if(S==null)return 0;if(Y.isBlob(S))return S.size;if(Y.isSpecCompliantForm(S))return(yield new a(sn.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(S)||Y.isArrayBuffer(S))return S.byteLength;if(Y.isURLSearchParams(S)&&(S=S+""),Y.isString(S))return(yield m(S)).byteLength}),A=(S,C)=>Be(null,null,function*(){const I=Y.toFiniteNumber(S.getContentLength());return I==null?_(C):I});return S=>Be(null,null,function*(){let{url:C,method:I,data:z,signal:W,cancelToken:D,timeout:V,onDownloadProgress:ee,onUploadProgress:ce,responseType:H,headers:ie,withCredentials:te="same-origin",fetchOptions:ue,maxContentLength:fe,maxBodyLength:ae}=mg(S);const Se=Y.isNumber(fe)&&fe>-1,de=Y.isNumber(ae)&&ae>-1,G=me=>Y.hasOwnProp(S,me)?S[me]:void 0;let se=s||fetch;H=H?(H+"").toLowerCase():"text";let k=_A([W,D&&D.toAbortSignal()],V),M=null;const J=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let P,_e=null;const ve=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,S,M);try{let me;const Ie=G("auth");if(Ie){const ze=Y.getSafeProp(Ie,"username")||"",Oe=Y.getSafeProp(Ie,"password")||"";me={username:ze,password:Oe}}if(OA(C)){const ze=new URL(C,sn.origin);if(!me&&(ze.username||ze.password)){const Oe=yg(ze.username),Xe=yg(ze.password);me={username:Oe,password:Xe}}(ze.username||ze.password)&&(ze.username="",ze.password="",C=ze.href)}if(me&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(NA((me.username||"")+":"+(me.password||""))))),Se&&typeof C=="string"&&C.startsWith("data:")&&CA(C)>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,M);if(de&&I!=="get"&&I!=="head"){const ze=yield _(z);if(typeof ze=="number"&&isFinite(ze)&&(P=ze,ze>ae))throw ve()}const Fe=de&&(Y.isReadableStream(z)||Y.isStream(z)),Ge=(ze,Oe,Xe)=>gg(ze,Eg,tt=>{if(de&&tt>ae)throw _e=ve();Oe&&Oe(tt)},Xe);if(b&&I!=="get"&&I!=="head"&&(ce||Fe)){if(P=P==null?yield A(ie,z):P,P!==0||Fe){let ze=new a(C,{method:"POST",body:z,duplex:"half"}),Oe;if(Y.isFormData(z)&&(Oe=ze.headers.get("content-type"))&&ie.setContentType(Oe),ze.body){const[Xe,tt]=ce&&cg(P,$u(dg(ce)))||[];z=Ge(ze.body,Xe,tt)}}}else if(Fe&&!d&&p&&I!=="get"&&I!=="head")z=Ge(z);else if(Fe&&d&&!b&&I!=="get"&&I!=="head")throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,S,M);Y.isString(te)||(te=te?"include":"omit");const st=d&&"credentials"in a.prototype;if(Y.isFormData(z)){const ze=ie.getContentType();ze&&/^multipart\/form-data/i.test(ze)&&!/boundary=/i.test(ze)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+Gd,!1);const St=le(j({},ue),{signal:k,method:I.toUpperCase(),headers:Q0(ie.normalize()),body:z,duplex:"half",credentials:st?te:void 0});M=d&&new a(C,St);let Lt=yield d?se(M,ue):se(C,St);const pn=un.from(Lt.headers);if(Se){const ze=Y.toFiniteNumber(pn.getContentLength());if(ze!=null&&ze>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,M)}const xn=y&&(H==="stream"||H==="response");if(y&&Lt.body&&(ee||Se||xn&&J)){const ze={};["status","statusText","headers"].forEach(Ln=>{ze[Ln]=Lt[Ln]});const Oe=Y.toFiniteNumber(pn.getContentLength()),[Xe,tt]=ee&&cg(Oe,$u(dg(ee),!0))||[];let pt=0;const Mt=Ln=>{if(Se&&(pt=Ln,pt>fe))throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,M);Xe&&Xe(Ln)};Lt=new u(gg(Lt.body,Eg,Mt,()=>{tt&&tt(),J&&J()}),ze)}H=H||"text";let Dt=yield x[Y.findKey(x,H)||"text"](Lt,S);if(Se&&!y&&!xn){let ze;if(Dt!=null&&(typeof Dt.byteLength=="number"?ze=Dt.byteLength:typeof Dt.size=="number"?ze=Dt.size:typeof Dt=="string"&&(ze=typeof r=="function"?new r().encode(Dt).byteLength:Dt.length)),typeof ze=="number"&&ze>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,M)}return!xn&&J&&J(),yield new Promise((ze,Oe)=>{lg(ze,Oe,{data:Dt,headers:un.from(Lt.headers),status:Lt.status,statusText:Lt.statusText,config:S,request:M})})}catch(me){if(J&&J(),k&&k.aborted&&k.reason instanceof Ne){const Ie=k.reason;throw Ie.config=S,M&&(Ie.request=M),me!==Ie&&Object.defineProperty(Ie,"cause",{__proto__:null,value:me,writable:!0,enumerable:!1,configurable:!0}),Ie}if(_e)throw M&&!_e.request&&(_e.request=M),_e;if(me instanceof Ne)throw M&&!me.request&&(me.request=M),me;if(me&&me.name==="TypeError"&&/Load failed|fetch/i.test(me.message)){const Ie=new Ne("Network Error",Ne.ERR_NETWORK,S,M,me&&me.response);throw Object.defineProperty(Ie,"cause",{__proto__:null,value:me.cause||me,writable:!0,enumerable:!1,configurable:!0}),Ie}throw Ne.from(me,me&&me.code,S,M,me&&me.response)}})},PA=new Map,bg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,l=u,d,f,p=PA;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:IA(t)),p=f;return f};bg();const Xd={http:Kv,xhr:xA,fetch:{get:bg}};Y.forEach(Xd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const wg=e=>`- ${e}`,RA=e=>Y.isFunction(e)||e===null||e===!1;function LA(e,t){e=Y.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(s=r,!RA(r)&&(s=Xd[(l=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${l}'`);if(s&&(Y.isFunction(s)||(s=s.get(t))))break;a[l||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?u.length>1?`since :
11
+ `+u.map(wg).join(`
12
+ `):" "+wg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+l,Ne.ERR_NOT_SUPPORT)}return s}const xg={getAdapter:LA,adapters:Xd};function Kd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ta(null,e)}function _g(e){return Kd(e),e.headers=un.from(e.headers),e.data=Wd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xg.getAdapter(e.adapter||ea.adapter,e)(e).then(function(r){Kd(e),e.response=r;try{r.data=Wd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=un.from(r.headers),r},function(r){if(!ug(r)&&(Kd(e),r&&r.response)){e.response=r.response;try{r.response.data=Wd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=un.from(r.response.headers)}return Promise.reject(r)})}const Yu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Sg={};Yu.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Gd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Sg[u]&&(Sg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},Yu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function DA(e,t,n){if(typeof e!="object"||e===null)throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const Wu={assertOptions:DA,validators:Yu},ln=Wu.validators;let Wi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ig,response:new ig}}request(t,n){return Be(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
13
13
  `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
14
14
  `),l=u===-1?-1:a.indexOf(`
15
15
  `,u+1),d=l===-1?"":a.slice(l+1);String(r.stack).endsWith(d)||(r.stack+=`
16
- `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Vi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Yu.assertOptions(r,{silentJSONParsing:un.transitional(un.boolean),forcedJSONParsing:un.transitional(un.boolean),clarifyTimeoutError:un.transitional(un.boolean),legacyInterceptorReqResOrdering:un.transitional(un.boolean),advertiseZstdAcceptEncoding:un.transitional(un.boolean),validateStatusUndefinedResolves:un.transitional(un.boolean)},!1),s!=null&&(Y.isFunction(s)?n.paramsSerializer={serialize:s}:Yu.assertOptions(s,{encode:un.function,serialize:un.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Yu.assertOptions(n,{baseUrl:un.spelling("baseURL"),withXsrfToken:un.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=an.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(n)===!1)return;d=d&&_.synchronous;const A=n.transitional||$d;A&&A.legacyInterceptorReqResOrdering?l.unshift(_.fulfilled,_.rejected):l.push(_.fulfilled,_.rejected)});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let p,m=0,b;if(!d){const x=[wg.bind(this),void 0];for(x.unshift(...l),x.push(...f),b=x.length,p=Promise.resolve(n);m<b;)p=p.then(x[m++],x[m++]);return p}b=l.length;let y=n;for(;m<b;){const x=l[m++],_=l[m++];try{y=x(y)}catch(A){_.call(this,A);break}}try{p=wg.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Vi(this.defaults,t);const n=dg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return tg(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){qi.prototype[t]=function(n,r){return this.request(Vi(r||{},{method:t,url:n,data:r&&Y.hasOwnProp(r,"data")?r.data:void 0}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Vi(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}qi.prototype[t]=n(),t!=="query"&&(qi.prototype[t+"Form"]=n(!0))});let DA=class S2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(l=>{r.subscribe(l),a=l}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new ea(a,u,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new S2(function(s){t=s}),cancel:t}}};function MA(e){return function(n){return e.apply(null,n)}}function FA(e){return Y.isObject(e)&&e.isAxiosError===!0}const Qd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Qd).forEach(([e,t])=>{Qd[t]=e});function _g(e){const t=new qi(e),n=B0(qi.prototype.request,t);return Y.extend(n,qi.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return _g(Vi(e,s))},n}const Ft=_g(Zo);Ft.Axios=qi,Ft.CanceledError=ea,Ft.CancelToken=DA,Ft.isCancel=og,Ft.VERSION=Wd,Ft.toFormData=ju,Ft.AxiosError=ke,Ft.Cancel=Ft.CanceledError,Ft.all=function(t){return Promise.all(t)},Ft.spread=MA,Ft.isAxiosError=FA,Ft.mergeConfig=Vi,Ft.AxiosHeaders=an,Ft.formToJSON=e=>sg(Y.isHTMLForm(e)?new FormData(e):e),Ft.getAdapter=bg.getAdapter,Ft.HttpStatusCode=Qd,Ft.default=Ft;const{Axios:Q7,AxiosError:K7,CanceledError:J7,isCancel:Z7,CancelToken:eU,VERSION:tU,all:nU,Cancel:rU,isAxiosError:iU,spread:sU,toFormData:oU,AxiosHeaders:aU,HttpStatusCode:uU,formToJSON:lU,getAdapter:cU,mergeConfig:dU,create:fU}=Ft;class BA{constructor(t,n,r,s=!1,a,u){Je(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Je(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Je(this,"CIMULATE_SEARCH_API_PATH","api/v1");Je(this,"baseApiUrl");Je(this,"headers",{});Je(this,"fetchConfig",()=>Ue(this,null,function*(){try{const t=yield Ft.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Je(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class UA{constructor(t,n,r,s=!1,a,u){Je(this,"apiService");Je(this,"config",null);Je(this,"getConfig",()=>Ue(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Je(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Je(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Je(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Je(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Je(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Je(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Je(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Je(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Je(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Je(this,"getProductField",t=>this.config?this.config[t]:"");Je(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new BA(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const HA={copilot:"Your Search Assistant",messaging:"Commerce Client"},Sg=R.createContext(null),jA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:_=3,messageAlignment:A="start",autoScroll:S=!0,showProductDescription:k=!1,componentConfig:I,conversationHistory:z,resetConversationMessage:W="",apiKey:D,apiToken:V,baseUrl:ee,customerId:ce,tenantId:H,theme:ie,isDevelopment:ne,__features:ue,routingAttributes:fe,enableDownloadTranscript:ae=!0,enableEscalationToAgent:ve=!1,showProductCaptions:de=!1,children:G})=>{const se=e==="messaging",C=R.useMemo(()=>{const Ie=fe==null?void 0:fe.isCartMgmtSupported;return Ie===!0||Ie==="true"},[fe]),M=R.useMemo(()=>se?{config:null}:new UA(ee,D,V,ne,ce,H),[se,ee,D,V,ne,ce,H]),J=R.useMemo(()=>new _S(ne),[ne]);R.useEffect(()=>{se||!M||M.config||M.getConfig()},[M,se]);const P=R.useMemo(()=>IS(ie),[ie]),Se=R.useMemo(()=>{const Ie=(y==null?void 0:y.placeholder)||m,Me=(y==null?void 0:y.buttonLabel)||b;let Xe="icon";return y!=null&&y.buttonType?Xe=y.buttonType:b&&(Xe="text"),le(j({},y||{}),{placeholder:Ie,buttonLabel:Me,buttonType:Xe})},[y,m,b]),Ae=R.useMemo(()=>le(j({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||HA[e!=null?e:"copilot"]}),[r,t,n,e]),me=R.useMemo(()=>({configModule:M,mode:e!=null?e:"copilot",headerConfig:Ae,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:J,searchConfig:Se,suggestionButtonConfig:x,progressStepsLimit:_,messageAlignment:A,autoScroll:S,showProductDescription:!!k,enableMinimize:!!(I!=null&&I.enableMinimize),enableDownloadTranscript:ae,enableEscalationToAgent:ve,showProductCaptions:!!de,resetConversationMessage:W,conversationHistory:{sinceHours:typeof(z==null?void 0:z.sinceHours)=="number"?z.sinceHours:1,limit:z==null?void 0:z.limit},features:ue,isCartMgmtSupported:C}),[M,e,Ae,a,s,f,p,l,d,u,Se,x,A,S,k,I,ae,ve,de,W,J,P,z,ue,C]);return w.jsx(Sg.Provider,{value:me,children:G})},dt=()=>{const e=R.useContext(Sg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},vg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ui=-1;function Ag(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Cg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&vg.includes(t.type))return t;const n=Ag(t);return n?{type:"markdown",index:ui,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:ui,data:{content:e}}}function kg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!vg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return le(j({},n),{type:n.type,index:r})}function ta(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function zA(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=ta(t);if(n)return n.response;const r=kg(t);return[r&&r.type!=="markdown"?r:e]}function $A(e,t){var n,r;return(r=(n=ta(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function Ng(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function VA(e){return e.type==="markdown"&&e.index===ui?!Ng(e.data.content):!0}function qA(e){var s;const t=(s=ta(e))==null?void 0:s.response;if(!t)return null;const n=t.find(a=>a.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(a=>a.id)};const r=t.find(a=>a.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function YA(e,t){if(t.index===ui){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ui&&t.type==="markdown"){const a={type:"markdown",index:ui,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function Og(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const Ig={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,cartUpdating:!1};function WA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return j(le(j({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return le(j({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return le(j({},e),{conversationId:t.id});case"ADD_MESSAGE":return Og(e.messages,t.message)?e:le(j({},e),{messages:[...e.messages,le(j({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Cg(t.token);return n?le(j({},e),{streamingBlocks:YA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Og(e.messages,t.message))return j(j({},e),n);const r=le(j({},t.message),{type:"FLUSH_STREAMING"}),s=t.replaceMessageId?e.messages.findIndex(a=>a.id===t.replaceMessageId):-1;if(s>=0){const a=[...e.messages];return a[s]=le(j({},r),{id:e.messages[s].id}),j(le(j({},e),{messages:a}),n)}return j(le(j({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return le(j({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return j(le(j({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:le(j({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return le(j({},e),{routingResult:t.result});case"SET_ERROR":return le(j({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return le(j({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return le(j({},e),{sendError:null});case"LOAD_HISTORY":return le(j({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return le(j({},e),{sessionExpired:t.expired});case"SET_CART_UPDATING":return le(j({},e),{cartUpdating:t.isUpdating});case"RESET":return le(j({},Ig),{connectionStatus:e.connectionStatus});default:return e}}const Pg=R.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,cartUpdating:!1,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>Ue(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>Ue(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Ue(null,null,function*(){})}),GA=4320*60*1e3;function Kd(e,t){return`cim_af_conv_${e}_${t}`}function Jd(e,t){return Date.now()-e>t}function XA(e,t,n){try{const r=Kd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Jd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Wu(e,t,n){try{const r=Kd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Zd(e,t){try{const n=Kd(e,t);sessionStorage.removeItem(n)}catch(n){}}function ef(e,t){return`cim_af_ct_${e}_${t}`}function QA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(JA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function KA(e){const t=QA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function JA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function Rg(e,t){try{const n=ef(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:KA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function ZA(e,t,n,r){try{const s=ef(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function eC(e,t){try{const n=ef(e,t);sessionStorage.removeItem(n)}catch(n){}}function tC(e,t){return`cim_af_conv_${e}_${t}`}function nC(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=tC(e,t);return new BroadcastChannel(n)}catch(n){return null}}function rC(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var l;r||((l=u.data)==null?void 0:l.type)==="conversation_response"&&(r=!0,clearTimeout(s),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function iC(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(l){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function sC(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function oC(e){if(e)try{e.close()}catch(t){}}function aC(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function uC(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Lg(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function lC(e){if(e.entryType!=="Message")return null;const n=uC(e.entryPayload).abstractMessage;if(!n)return null;const r=Lg(n,"staticContent","text")||Lg(n,"content","text")||"";if(!r)return null;const s=aC(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function cC(e){const t=[];for(const n of e){const r=lC(n);r&&t.push(r)}return t}const dC=5e3;function Gu(e={}){const{routingAttributes:t,timeoutMs:n=dC}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=j({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},l={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(L0,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}const fC=200,hC=1e3;function pC(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=R.useRef(null),u=R.useRef(null),l=R.useRef(null),d=s.sinceHours*60*60*1e3,f=GA,p=R.useCallback(()=>(l.current||(l.current=rC(a.current)),l.current),[]);R.useEffect(()=>{const S=nC(t,n);a.current=S,l.current=null;const k=iC(S,()=>{const I=u.current;if(!I)return null;const z=Rg(t,n);return{conversationId:I,continuationToken:z==null?void 0:z.accessToken,lastEventId:z==null?void 0:z.lastEventId}},()=>{Zd(t,n),u.current=null});return()=>{k(),oC(S),a.current=null}},[t,n]);const m=R.useCallback((S,k)=>Ue(null,null,function*(){var D,V,ee;const I=(D=k==null?void 0:k.createIfMissing)!=null?D:!0,z=(V=k==null?void 0:k.isCurrent)!=null?V:(()=>!0);let W=XA(t,n,f);if(!W){const ce=yield p();ce&&!Jd(ce.storedAt,f)&&(W=ce)}if(!W){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const ce=yield Gu({routingAttributes:r});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=yield S.createConversation(ce);return z()?(Wu(t,n,H),u.current=H,{conversationId:H,restoredMessages:[],resumed:!1,outcome:"created"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const ce=yield S.listConversations({conversationId:W.conversationId,startTimestamp:Date.now()-f});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=ce.conversations.find(ne=>ne.conversationId===W.conversationId&&!ne.isConversationClosed);if(!H){if(Zd(t,n),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const ne=yield Gu({routingAttributes:r});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ue=yield S.createConversation(ne);return z()?(Wu(t,n,ue),u.current=ue,{conversationId:ue,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}S.resumeConversation(H.conversationId),u.current=H.conversationId,Wu(t,n,H.conversationId);let ie=[];try{const ne=yield S.listConversationEntries(H.conversationId,{limit:Math.min((ee=s.limit)!=null?ee:fC,hC),startTimestamp:Date.now()-d,direction:"FromEnd"});ie=cC(ne.conversationEntries).reverse()}catch(ne){}return{conversationId:H.conversationId,restoredMessages:ie,resumed:!0,outcome:"resumed"}}catch(ce){return{conversationId:W.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:ce}}}),[t,n,r,s,d,f,p]),b=R.useCallback(S=>{Wu(t,n,S),u.current=S},[t,n]),y=R.useCallback(()=>{Zd(t,n),eC(t,n),sC(a.current),u.current=null},[t,n]),x=R.useCallback(()=>{const S=Rg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),_=R.useCallback(()=>Ue(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||Jd(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),A=R.useCallback((S,k=()=>!0)=>Ue(null,null,function*(){try{const{accessToken:I,lastEventId:z}=yield S.generateContinuationToken();if(!k())return;ZA(t,n,I,z)}catch(I){}}),[t,n]);return{initializeConversation:m,persistConversationId:b,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:_,persistContinuationToken:A}}const mC="Your session ended due to inactivity. Starting a new session…",gC=300*1e3,EC=2e3,yC=1e4,TC=15e3,bC=2;function Dg(e,t,n){return e||t||n===!0}function na(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function wC(e){const t=!e.timedOut,n=!!e.options.silent,r=!!e.options.reconcileMessageId;return t&&n&&r}function Mg(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function tf(e){if(Mg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function xC(e){var b;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((b=e.variants)!=null?b:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",l=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:p,display:m}}function _C({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=TC,logger:f,isRecoveryInFlight:p}){const m=R.useRef(u);m.current=u;const b=R.useRef(l);b.current=l;const y=R.useRef(f);y.current=f;const x=R.useRef(p);x.current=p;const _=R.useRef(0),A=R.useRef(!1),S=R.useRef(0),[k,I]=R.useState(0);R.useEffect(()=>{if(!t||n){_.current=0,A.current=!1,S.current=0;return}const z=a||_.current>0;if(!(s&&z&&e==="connected"&&!r&&!A.current))return;const D=setTimeout(()=>{Ue(null,null,function*(){var H,ie;if((H=x.current)!=null&&H.call(x)){if(S.current+=1,S.current>bC){A.current=!0,b.current();return}I(ne=>ne+1);return}const V=_.current,ee=m.current;if(V>=ee.length){A.current=!0,b.current();return}S.current=0,(ie=y.current)==null||ie.warn("🦜 connect bootstrap stalled",{attempt:V});let ce;try{yield Promise.race([Promise.resolve(ee[V]()),new Promise((ne,ue)=>{ce=setTimeout(()=>{ue(new Error("connect bootstrap step timed out"))},d)})])}catch(ne){}finally{ce!==void 0&&clearTimeout(ce),_.current=V+1,I(ne=>ne+1)}})},d);return()=>{clearTimeout(D)}},[e,t,n,r,s,a,d,k])}const _r={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function SC(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function li(e){const{type:t,statusCode:n}=SC(e);if(t==="api"&&typeof n=="number")return n===429?_r.rateLimit:n>=500?_r.server:_r.default;switch(t){case"network":return _r.network;case"sse":return _r.interrupted;case"auth":return _r.connect;default:return _r.default}}function Fg(e){switch(e.code){case"MAX_RECONNECT":return _r.lost;case"ROUTING_FAILED":return _r.routing;default:return _r.connect}}const ra=Symbol("initialization-cancelled"),Bg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,children:p})=>{const{logger:m,conversationHistory:b}=dt(),{status:{isOpen:y}}=$r(),[x,_]=R.useReducer(WA,Ig),[A,S]=R.useState(!1),[k,I]=R.useState(!1),[z,W]=R.useState(!1),D=R.useRef(x);D.current=x;const V=pC({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:b}),ee=R.useRef(null),ce=R.useRef(l),H=R.useRef(d),ie=R.useRef(u),ne=R.useRef(f),ue=R.useRef(!1),fe=R.useRef(!1),ae=R.useRef(!1),ve=R.useRef(0),de=R.useRef(0),G=R.useRef(0),se=R.useRef(null),C=R.useRef(null),M=R.useRef(null),J=R.useRef(0),P=R.useRef(!1),Se=R.useRef(0),Ae=R.useRef(0),me=R.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),Ie=R.useRef([]),Me=R.useRef(null),Xe=R.useCallback(()=>{_({type:"SET_CART_UPDATING",isUpdating:Ie.current.some(wC)})},[]),st=R.useCallback((te,_e)=>{_e.outcome==="timeout"?(te.timedOut=!0,Ie.current=Ie.current.filter(Oe=>Oe===te||!Oe.timedOut)):Ie.current=Ie.current.filter(Oe=>Oe!==te),clearTimeout(te.timeoutId),Xe(),te.resolve(_e)},[Xe]);ce.current=l,H.current=d,ie.current=u,ne.current=f,R.useEffect(()=>{const te=new OS({baseURL:e,orgId:t,esDeveloperName:n,options:j({enableLogging:a},s?{capabilitiesVersion:s}:{})});ee.current=te,P.current=!1,W(!1),S(!1),I(!1),_({type:"RESET"}),te.on("connected",()=>{var Ee;_({type:"SET_CONNECTION_STATUS",status:"connected"}),(Ee=ie.current)==null||Ee.call(ie)}),te.on("disconnected",()=>{_({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),te.on("reconnecting",()=>{_({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),te.on("message",Ee=>{var wo,Kr;const He=le(j({id:Ee.messageId||crypto.randomUUID()},Ee.messageId?{serverId:Ee.messageId}:{}),{role:"agent",content:Ee.content,timestamp:Ee.timestamp,sender:Ee.sender,raw:Ee});m==null||m.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:He.id,tokensBeforeFlush:ve.current,streamedFinalOnly:ve.current===0}),ve.current=0;const Ge=na(Ie.current),$t=Ge==null?void 0:Ge.options.reconcileMessageId;_({type:"FLUSH_STREAMING",message:He,replaceMessageId:$t}),(wo=ce.current)==null||wo.call(ce,He),Ge&&st(Ge,{outcome:"success"});const{messagingSessionId:pt}=Ee,Dr=pt?qA(Ee.content):null;pt&&Dr&&((Kr=ne.current)==null||Kr.call(ne,{agentSessionId:pt,kind:Dr.kind,productIds:Dr.productIds}))}),te.on("streaming_token",Ee=>{var He;if(!((He=na(Ie.current))!=null&&He.options.silent)){if(ve.current+=1,m!=null&&m.isDevelopment){const Ge=Cg(Ee.token);Ge?Ge.index===ui?m.debug("🦜 streaming_token → markdown fallback",{token:Ee.token}):m.debug("🦜 streaming_token parsed",{type:Ge.type,index:Ge.index,outputName:Ge.type==="tool_results"?Ge.output_name:void 0}):m.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:Ee.token})}_({type:"APPEND_STREAMING_TOKEN",token:Ee.token})}}),te.on("typing_started",()=>{var Ee;(Ee=na(Ie.current))!=null&&Ee.options.silent||_({type:"SET_AGENT_TYPING",isTyping:!0})}),te.on("typing_stopped",()=>{var Ee;(Ee=na(Ie.current))!=null&&Ee.options.silent||_({type:"SET_AGENT_TYPING",isTyping:!1})}),te.on("progress_indicator",Ee=>{var He;(He=na(Ie.current))!=null&&He.options.silent||_({type:"ADD_PROGRESS_STEP",message:Ee.message})}),te.on("routing_result",Ee=>{var He;if(_({type:"SET_ROUTING_RESULT",result:Ee}),!Ee.isSuccessful){const Ge=`Routing failed: ${Ee.failureType||"unknown"}`;_({type:"SET_ERROR",error:Fg({code:"ROUTING_FAILED"})}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(He=H.current)==null||He.call(H,Ge)}}),te.on("participant_changed",Ee=>{if(Ee.participant.name==="Automated Process")return;const He=le(j({id:crypto.randomUUID()},Ee.entryId?{serverId:Ee.entryId}:{}),{role:"system",content:Ee.action==="add"?`${Ee.participant.name||"Agent"} joined the conversation`:`${Ee.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});m==null||m.log("🦜 MessagingProvider participant_changed event received",{event:Ee}),_({type:"ADD_MESSAGE",message:He})}),te.on("conversation_closed",()=>{const Ee={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};_({type:"ADD_MESSAGE",message:Ee}),_({type:"SET_CONVERSATION_ID",id:null}),V.clearPersistedConversation()}),te.on("error",Ee=>{var He;if(m==null||m.log("🦜 MessagingProvider ERROR event received",{event:Ee}),Ee.code==="SESSION_EXPIRED"){ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"}),_({type:"SET_LOADING",isLoading:!1});return}_({type:"SET_ERROR",error:Fg(Ee)}),Ee.recoverable||_({type:"SET_CONNECTION_STATUS",status:"error"}),(He=H.current)==null||He.call(H,Ee.message)});const _e=Ee=>{if(Ee!==Se.current)throw ra},Oe=Ee=>Ee===Se.current,Ce=Ee=>Ue(null,null,function*(){S(!1);let He=V.getStoredConnectOptions(),Ge=!1;He||(He=yield V.getPeerConnectOptions(),_e(Ee),Ge=!!He);let $t=!1;try{if(yield te.connect(He!=null?He:void 0),!Oe(Ee))throw te.disconnect(),ra;$t=!!(He!=null&&He.lastEventId)}catch(Dr){if(_e(Ee),He&&tf(Dr)){if(m==null||m.log("Stored token expired on connect — falling back to fresh connect"),Ge||V.clearPersistedConversation(),yield te.connect(),!Oe(Ee))throw te.disconnect(),ra;$t=!1}else throw Dr}I($t),yield V.persistContinuationToken(te,()=>Oe(Ee)),_e(Ee);const pt=yield V.initializeConversation(te,{isCurrent:()=>Oe(Ee)});if(_e(Ee),m==null||m.log("🦜 initial connect complete",{conversationId:pt.conversationId,resumed:pt.resumed,outcome:pt.outcome,restoredMessages:pt.restoredMessages.length}),pt.outcome==="unverified-error"){pt.conversationId&&(te.resumeConversation(pt.conversationId),_({type:"SET_CONVERSATION_ID",id:pt.conversationId})),S(!0);return}_({type:"SET_CONVERSATION_ID",id:pt.conversationId}),pt.resumed&&_({type:"LOAD_HISTORY",messages:pt.restoredMessages}),S(!0),_({type:"SET_LOADING",isLoading:!1})});return C.current=Ce,()=>{Se.current+=1,Ae.current+=1,te.disconnect(),te.off(),ee.current=null,C.current=null,M.current=null,P.current=!1}},[e,t,n,s,st]);const St=R.useCallback(()=>{if(P.current)return Promise.resolve();if(M.current)return J.current===Se.current?M.current:M.current.catch(Ce=>{if(Ce!==ra)throw Ce}).then(()=>me.current());const te=C.current;if(!te)return Promise.reject(new Error("Messaging is unavailable"));_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_CONNECTION_STATUS",status:"connecting"});const _e=++Se.current;J.current=_e;const Oe=te(_e).then(()=>{P.current=!0,W(!0)}).catch(Ce=>{var He;if(Ce===ra)throw Ce;const Ee=Ce instanceof Error?Ce.message:String(Ce);throw _({type:"SET_CONNECTION_STATUS",status:"error"}),_({type:"SET_ERROR",error:li(Ce)}),(He=H.current)==null||He.call(H,Ee),Ce}).finally(()=>{M.current===Oe&&(M.current=null)});return M.current=Oe,Oe},[]);me.current=St,R.useEffect(()=>{y&&St().catch(()=>{})},[y,e,t,n,s,St]);const Rt=R.useCallback(()=>Ue(null,null,function*(){const te=ee.current;if(!te)return!1;const _e=V.getStoredConnectOptions();if(!_e)return m==null||m.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;m==null||m.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{te.disconnect(),yield te.connect(_e)}catch(Ce){if(tf(Ce))return m==null||m.log("🦜 attemptResume: token expired (401) — will start fresh",{error:Ce instanceof Error?Ce.message:String(Ce)}),!1;throw m==null||m.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:Ce instanceof Error?Ce.message:String(Ce)}),Ce}yield V.persistContinuationToken(te);const Oe=yield V.initializeConversation(te,{createIfMissing:!1});return Oe.outcome==="not-found-or-closed"||!Oe.conversationId?(m==null||m.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(Oe.outcome==="unverified-error"&&(m==null||m.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:Oe.conversationId}),te.resumeConversation(Oe.conversationId)),m==null||m.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:Oe.conversationId}),_({type:"SET_CONVERSATION_ID",id:Oe.conversationId}),_({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Oe.conversationId),ae.current=!1,_({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[V,m]),hn=R.useCallback(te=>Ue(null,null,function*(){var Oe;const _e=ee.current;if(_e){te.options.silent||(_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield _e.sendMessage(te.text)}catch(Ce){const Ee=li(Ce);_({type:"SET_SEND_ERROR",error:{text:te.text,displayContent:te.displayContent,options:te.options,message:Ee}}),(Oe=H.current)==null||Oe.call(H,Ce instanceof Error?Ce.message:String(Ce)),st(te,{outcome:"failure",message:Ee})}}}),[st]),wn=R.useCallback(te=>Ue(null,null,function*(){var Oe;const _e=ee.current;if(!(!_e||ue.current)){ue.current=!0,fe.current=!0;try{if(yield Rt()){te&&(yield hn(te));return}m==null||m.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ae.current=!1,_({type:"SET_SESSION_EXPIRED",expired:!1}),_({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:mC,timestamp:new Date().toISOString()}}),V.clearPersistedConversation(),_({type:"SET_CONNECTION_STATUS",status:"connecting"}),_e.disconnect(),yield _e.connect(),yield V.persistContinuationToken(_e);const Ce=yield _e.createConversation(yield Gu({routingAttributes:r}));m==null||m.log("🦜 recoverExpiredSession: new conversation created",{conversationId:Ce}),_({type:"SET_CONVERSATION_ID",id:Ce}),_({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Ce),te&&(yield hn(te))}catch(Ce){const Ee=Ce instanceof Error?Ce.message:String(Ce);_({type:"SET_ERROR",error:li(Ce)}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(Oe=H.current)==null||Oe.call(H,Ee),te&&st(te,{outcome:"failure",message:li(Ce)})}finally{ue.current=!1,fe.current=!1}}}),[r,V,Rt,hn,m,st]),Lt=R.useRef(wn);Lt.current=wn;const ze=R.useCallback(()=>Ue(null,null,function*(){const te=ee.current;if(!te||!P.current||ue.current)return;if(!D.current.conversationId&&!ae.current){te.reconnect();return}ue.current=!0;const _e=Ue(null,null,function*(){try{(yield Rt())||(ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(Oe){ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{ue.current=!1,se.current=null}});se.current=_e,yield _e}),[Rt]),Ne=R.useRef(ze);Ne.current=ze;const Qe=R.useCallback(()=>Ue(null,null,function*(){const te=ee.current;if(!te||ue.current)return;const _e=V.getStoredConnectOptions(),Oe=_e==null?void 0:_e.continuationToken;if(Oe){ue.current=!0;try{te.disconnect(),yield te.connect({continuationToken:Oe}),yield V.persistContinuationToken(te);const Ce=D.current.conversationId;Ce&&te.resumeConversation(Ce)}catch(Ce){if(tf(Ce)){ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"}),_({type:"SET_LOADING",isLoading:!1});return}m==null||m.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:Ce instanceof Error?Ce.message:String(Ce)})}finally{ue.current=!1}}}),[V,m]);R.useEffect(()=>{const te=()=>{const Ge=Date.now();Ge-G.current<EC||(G.current=Ge,Ne.current())},_e=()=>{if(document.visibilityState==="hidden"){de.current=Date.now();return}const Ge=ee.current;if(!Ge)return;const $t=de.current?Date.now()-de.current:0;de.current=0,(ae.current||!Ge.isConnected||$t>gC)&&te()},Oe=Ge=>{Ge.persisted&&te()},Ce=()=>{de.current=Date.now()},Ee=()=>te(),He=()=>te();return document.addEventListener("visibilitychange",_e),window.addEventListener("pageshow",Oe),window.addEventListener("pagehide",Ce),document.addEventListener("resume",Ee),window.addEventListener("online",He),()=>{document.removeEventListener("visibilitychange",_e),window.removeEventListener("pageshow",Oe),window.removeEventListener("pagehide",Ce),document.removeEventListener("resume",Ee),window.removeEventListener("online",He)}},[]);const tt=R.useCallback((te,_e)=>Ue(null,null,function*(){var Ce;const Oe=ee.current;if(!Oe){st(te,{outcome:"failure",message:"Messaging is unavailable"});return}if(ae.current){yield Lt.current(te);return}try{yield Oe.sendMessage(te.text)}catch(Ee){if(Mg(Ee)){yield Lt.current(te);return}const He=li(Ee);_({type:"SET_SEND_ERROR",error:_e(He)}),(Ce=H.current)==null||Ce.call(H,Ee instanceof Error?Ee.message:String(Ee)),st(te,{outcome:"failure",message:He})}}),[st]),ht=R.useCallback(te=>Ue(null,null,function*(){const _e=se.current;_e&&(yield _e),yield te()}),[]),Dt=R.useCallback((te,_e,Oe={})=>new Promise(Ce=>{if(!ee.current){Ce({outcome:"failure",message:"Messaging is unavailable"});return}const He={};Object.assign(He,{text:te,displayContent:_e,options:Oe,resolve:Ce,timeoutId:setTimeout(()=>{_({type:"SET_LOADING",isLoading:!1}),st(He,{outcome:"timeout"})},yC)}),Ie.current.push(He),Xe(),_({type:"CLEAR_SEND_ERROR"}),Oe.silent||(_({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:_e!=null?_e:te,timestamp:new Date().toISOString()}}),_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_PROGRESS_MESSAGE",message:""})),ht(()=>tt(He,Ge=>({text:te,displayContent:_e,options:Oe,message:Ge})))}),[tt,ht,st,Xe]),Rn=R.useCallback((te,_e)=>{if(!te.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const Oe=Ae.current,Ce=()=>{const Ge=()=>Oe!==Ae.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):Dt(te,_e==null?void 0:_e.displayContent,_e);return P.current?Ge():St().then(Ge,$t=>({outcome:"failure",message:li($t)}))},Ee=Me.current?Me.current.then(Ce):Ce(),He=Ee.then(()=>{});return Me.current=He,He.finally(()=>{Me.current===He&&(Me.current=null)}),Ee},[Dt,St]),hs=R.useCallback(te=>{if(!ee.current)return;const _e=Ae.current,{prompt:Oe,display:Ce}=xC(te);St().then(()=>{if(_e===Ae.current)return Dt(Oe,Ce)}).catch(()=>{})},[Dt,St]),ps=R.useCallback(()=>{const te=ee.current,_e=D.current.sendError;if(!te||!_e)return;const Oe=()=>fe.current?Promise.resolve({outcome:"failure",message:_e.message}):Dt(_e.text,_e.displayContent,_e.options),Ce=Me.current?Me.current.then(Oe):Oe(),Ee=Ce.then(()=>{});return Me.current=Ee,Ee.finally(()=>{Me.current===Ee&&(Me.current=null)}),Ce},[Dt]),ms=R.useCallback(()=>{const te=ee.current;te&&(M.current||(ae.current=!1,P.current=!1,W(!1),te.disconnect(),_({type:"SET_CONNECTION_STATUS",status:"connecting"}),St().catch(()=>{})))},[St]),oe=R.useCallback(()=>{const te=ee.current;if(!te)return Promise.resolve();if(!P.current)return Se.current+=1,Ae.current+=1,te.disconnect(),V.clearPersistedConversation(),_({type:"RESET"}),Promise.resolve();const _e=++Ae.current;return ae.current=!1,I(!1),V.clearPersistedConversation(),_({type:"RESET"}),_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_CONNECTION_STATUS",status:"connecting"}),te.endConversation().then(()=>_e!==Ae.current||ee.current!==te?null:(te.disconnect(),te.connect().then(()=>te))).then(Oe=>Ue(null,null,function*(){return!Oe||_e!==Ae.current||(yield V.persistContinuationToken(Oe,()=>_e===Ae.current&&ee.current===Oe),_e!==Ae.current||ee.current!==Oe)?null:te.createConversation(yield Gu({routingAttributes:r}))})).then(Oe=>{!Oe||_e!==Ae.current||ee.current!==te||(_({type:"SET_CONVERSATION_ID",id:Oe}),_({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Oe))}).catch(Oe=>{var Ce;_e!==Ae.current||ee.current!==te||(_({type:"SET_ERROR",error:li(Oe)}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(Ce=H.current)==null||Ce.call(H,Oe.message))})},[r,V]);_C({connectionStatus:x.connectionStatus,loading:x.loading,hasMessages:x.messages.length>0,sessionExpired:x.sessionExpired,bootstrapSettled:A,resumeUsedLastEventId:k,recoverySteps:[Qe,oe],onExhausted:()=>{var _e;const te=li({type:"network"});_({type:"SET_ERROR",error:te}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(_e=H.current)==null||_e.call(H,te)},logger:m,isRecoveryInFlight:()=>ue.current||se.current!==null});const xe=R.useCallback(()=>Ue(null,null,function*(){var Ce;const te=ee.current;if(!te||!D.current.conversationId)return;const _e=yield te.retrieveConversationTranscript(),Oe=URL.createObjectURL(_e);try{const Ee=document.createElement("a");Ee.href=Oe,Ee.download=`transcript-${(Ce=te.conversationId)!=null?Ce:"conversation"}.pdf`,document.body.appendChild(Ee),Ee.click(),Ee.remove()}finally{URL.revokeObjectURL(Oe)}}),[]),$e=x.connectionStatus==="connected"&&x.conversationId!==null;R.useEffect(()=>{D0($e)},[$e]),R.useEffect(()=>()=>D0(!1),[]);const et=R.useMemo(()=>({connectionStatus:x.connectionStatus,isConnected:$e,isAgentTyping:x.isAgentTyping,conversationId:x.conversationId,messages:x.messages,streamingBlocks:x.streamingBlocks,progressMessage:x.progressMessage,progressSteps:x.progressSteps,error:x.error,sendError:x.sendError,canInitialize:!z&&x.error===null,loading:x.loading,sessionExpired:x.sessionExpired,cartUpdating:x.cartUpdating,sendMessage:Rn,addToCart:hs,resetConversation:oe,retryLastMessage:ps,retryConnection:ms,downloadTranscript:xe}),[x,$e,z,Rn,hs,oe,ps,ms,xe]);return w.jsx(Pg.Provider,{value:et,children:p})};var Ug=Symbol.for("immer-nothing"),Hg=Symbol.for("immer-draftable"),Hn=Symbol.for("immer-state");function ar(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Bs=Object.getPrototypeOf;function Us(e){return!!e&&!!e[Hn]}function Yi(e){var t;return e?jg(e)||Array.isArray(e)||!!e[Hg]||!!((t=e.constructor)!=null&&t[Hg])||ia(e)||Ku(e):!1}var vC=Object.prototype.constructor.toString();function jg(e){if(!e||typeof e!="object")return!1;const t=Bs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===vC}function Xu(e,t){Qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qu(e){const t=e[Hn];return t?t.type_:Array.isArray(e)?1:ia(e)?2:Ku(e)?3:0}function nf(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zg(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function AC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ia(e){return e instanceof Map}function Ku(e){return e instanceof Set}function Wi(e){return e.copy_||e.base_}function rf(e,t){if(ia(e))return new Map(e);if(Ku(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=jg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Hn];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Bs(e),r)}else{const r=Bs(e);if(r!==null&&n)return j({},e);const s=Object.create(r);return Object.assign(s,e)}}function sf(e,t=!1){return Zu(e)||Us(e)||!Yi(e)||(Qu(e)>1&&Object.defineProperties(e,{set:{value:Ju},add:{value:Ju},clear:{value:Ju},delete:{value:Ju}}),Object.freeze(e),t&&Object.values(e).forEach(n=>sf(n,!0))),e}function Ju(){ar(2)}function Zu(e){return Object.isFrozen(e)}var CC={};function Gi(e){const t=CC[e];return t||ar(0,e),t}var sa;function $g(){return sa}function kC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Vg(e,t){t&&(Gi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function of(e){af(e),e.drafts_.forEach(NC),e.drafts_=null}function af(e){e===sa&&(sa=e.parent_)}function qg(e){return sa=kC(sa,e)}function NC(e){const t=e[Hn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Hn].modified_&&(of(t),ar(4)),Yi(e)&&(e=el(t,e),t.parent_||tl(t,e)),t.patches_&&Gi("Patches").generateReplacementPatches_(n[Hn].base_,e,t.patches_,t.inversePatches_)):e=el(t,n,[]),of(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ug?e:void 0}function el(e,t,n){if(Zu(t))return t;const r=t[Hn];if(!r)return Xu(t,(s,a)=>Wg(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return tl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),Xu(a,(l,d)=>Wg(e,r,s,l,d,n,u)),tl(e,s,!1),n&&e.patches_&&Gi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Wg(e,t,n,r,s,a,u){if(Us(s)){const l=a&&t&&t.type_!==3&&!nf(t.assigned_,r)?a.concat(r):void 0,d=el(e,s,l);if(zg(n,r,d),Us(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Yi(s)&&!Zu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;el(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ia(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&tl(e,s)}}function tl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&sf(t,n)}function OC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:$g(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=uf;n&&(s=[r],a=oa);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var uf={get(e,t){if(t===Hn)return e;const n=Wi(e);if(!nf(n,t))return IC(e,n,t);const r=n[t];return e.finalized_||!Yi(r)?r:r===lf(e.base_,t)?(df(e),e.copy_[t]=ff(r,e)):r},has(e,t){return t in Wi(e)},ownKeys(e){return Reflect.ownKeys(Wi(e))},set(e,t,n){const r=Gg(Wi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=lf(Wi(e),t),a=s==null?void 0:s[Hn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(AC(n,s)&&(n!==void 0||nf(e.base_,t)))return!0;df(e),cf(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return lf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,df(e),cf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ar(11)},getPrototypeOf(e){return Bs(e.base_)},setPrototypeOf(){ar(12)}},oa={};Xu(uf,(e,t)=>{oa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),oa.deleteProperty=function(e,t){return oa.set.call(this,e,t,void 0)},oa.set=function(e,t,n){return uf.set.call(this,e[0],t,n,e[0])};function lf(e,t){const n=e[Hn];return(n?Wi(n):e)[t]}function IC(e,t,n){var s;const r=Gg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Gg(e,t){if(!(t in e))return;let n=Bs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Bs(n)}}function cf(e){e.modified_||(e.modified_=!0,e.parent_&&cf(e.parent_))}function df(e){e.copy_||(e.copy_=rf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var PC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&ar(6),r!==void 0&&typeof r!="function"&&ar(7);let s;if(Yi(t)){const a=qg(this),u=ff(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?of(a):af(a)}return Vg(a,r),Yg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Ug&&(s=void 0),this.autoFreeze_&&sf(s,!0),r){const a=[],u=[];Gi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else ar(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,s;return[this.produce(t,n,(u,l)=>{r=u,s=l}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Yi(e)||ar(8),Us(e)&&(e=RC(e));const t=qg(this),n=ff(e,void 0);return n[Hn].isManual_=!0,af(t),n}finishDraft(e,t){const n=e&&e[Hn];(!n||!n.isManual_)&&ar(9);const{scope_:r}=n;return Vg(r,t),Yg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Gi("Patches").applyPatches_;return Us(e)?r(e,t):this.produce(e,s=>r(s,t))}};function ff(e,t){const n=ia(e)?Gi("MapSet").proxyMap_(e,t):Ku(e)?Gi("MapSet").proxySet_(e,t):OC(e,t);return(t?t.scope_:$g()).drafts_.push(n),n}function RC(e){return Us(e)||ar(10,e),Xg(e)}function Xg(e){if(!Yi(e)||Zu(e))return e;const t=e[Hn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=rf(e,!0);return Xu(n,(r,s)=>{zg(n,r,Xg(s))}),t&&(t.finalized_=!1),n}var LC=new PC,DC=LC.produce;function MC(e,t,n){var r=R.useMemo(function(){return DC(e)},[e]);return R.useReducer(r,t,n)}const Tt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Qg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},FC=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),Kg=R.createContext(null),Jg=R.createContext(null),BC=({children:e,dispatch:t})=>{const n=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=R.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,l,d,f,p,m,b]);return w.jsx(Jg.Provider,{value:y,children:e})},UC=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Tt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Tt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Tt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Tt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Tt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Tt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Tt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},HC=({promptsConfig:e,children:t})=>{const[n,r]=MC(UC,le(j(j({},Qg),e||{}),{staticQuestions:FC((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(Kg.Provider,{value:n,children:w.jsx(BC,{dispatch:r,children:t})})},jC={productId:Go.productId,pdpLink:Go.pdpLink},Zg=R.createContext(jC),zC=({children:e})=>{const[t,n]=R.useState(Go.productId),[r,s]=R.useState(Go.pdpLink);R.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),s(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&s(l.value)};return TS(u),()=>{bS(u)}},[]);const a=R.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(Zg.Provider,{value:a,children:e})},$C=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){_t(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){_t(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(l)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(_t(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(_t(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),_t(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,_t(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),e1=R.createContext({overrides:{},isInitialized:!1}),VC=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=R.useState({}),[a,u]=R.useState(!1);R.useEffect(()=>{Ue(null,null,function*(){let f={};e?(_t(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield $C(e)):t&&typeof t=="object"?(_t(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(_t(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=R.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(e1.Provider,{value:l,children:n})},t1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:b,entryType:y,initialEntry:x,entryMessage:_,disclaimerText:A,disclaimerMarkdown:S,clientContext:k,searchPlaceholder:I,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:ee,promptsConfig:ce,showProductDescription:H,resetConversationMessage:ie,conversationHistory:ne,messagingConfig:ue,overrides:fe,overridesUrl:ae,inlineOverrides:ve,__features:de,children:G})=>{const se=R.useRef(!1);return se.current||(se.current=!0,SS({initialEntry:x,entryType:y,isDevelopment:p})),w.jsx(jA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:_,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:I,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:ee,showProductDescription:H,componentConfig:b,clientContext:k,disclaimerMarkdown:S,disclaimerText:A,resetConversationMessage:ie,conversationHistory:ne,isDevelopment:p,__features:de,progressStepsLimit:ue==null?void 0:ue.progressStepsLimit,routingAttributes:ue==null?void 0:ue.routingAttributes,enableDownloadTranscript:ue==null?void 0:ue.enableDownloadTranscript,enableEscalationToAgent:ue==null?void 0:ue.enableEscalationToAgent,showProductCaptions:ue==null?void 0:ue.showProductCaptions,children:w.jsx(qS,{entryType:y!=null?y:x==null?void 0:x.type,componentConfig:b,componentType:m,children:w.jsx(zC,{children:w.jsx(HC,{promptsConfig:ce,children:w.jsx(VC,{overridesUrl:ae,inlineOverrides:ve||fe,children:w.jsx(Bg,{scrt2Url:(ue==null?void 0:ue.scrt2Url)||"",orgId:(ue==null?void 0:ue.orgId)||"",esDeveloperName:(ue==null?void 0:ue.esDeveloperName)||"",routingAttributes:(ue==null?void 0:ue.routingAttributes)||{},capabilitiesVersion:ue==null?void 0:ue.capabilitiesVersion,enableLogging:p,onProductResult:ue==null?void 0:ue.onProductResult,children:G})})})})})})};var hf={exports:{}},Cn={},pf={exports:{}},mf={};var n1;function qC(){return n1||(n1=1,(function(e){function t(G,se){var C=G.length;G.push(se);e:for(;0<C;){var M=C-1>>>1,J=G[M];if(0<s(J,se))G[M]=se,G[C]=J,C=M;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var se=G[0],C=G.pop();if(C!==se){G[0]=C;e:for(var M=0,J=G.length,P=J>>>1;M<P;){var Se=2*(M+1)-1,Ae=G[Se],me=Se+1,Ie=G[me];if(0>s(Ae,C))me<J&&0>s(Ie,Ae)?(G[M]=Ie,G[me]=C,M=me):(G[M]=Ae,G[Se]=C,M=Se);else if(me<J&&0>s(Ie,C))G[M]=Ie,G[me]=C,M=me;else break e}}return se}function s(G,se){var C=G.sortIndex-se.sortIndex;return C!==0?C:G.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,b=3,y=!1,x=!1,_=!1,A=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(G){for(var se=n(f);se!==null;){if(se.callback===null)r(f);else if(se.startTime<=G)r(f),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(f)}}function z(G){if(_=!1,I(G),!x)if(n(d)!==null)x=!0,ve(W);else{var se=n(f);se!==null&&de(z,se.startTime-G)}}function W(G,se){x=!1,_&&(_=!1,S(ee),ee=-1),y=!0;var C=b;try{for(I(se),m=n(d);m!==null&&(!(m.expirationTime>se)||G&&!ie());){var M=m.callback;if(typeof M=="function"){m.callback=null,b=m.priorityLevel;var J=M(m.expirationTime<=se);se=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(d)&&r(d),I(se)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var Se=n(f);Se!==null&&de(z,Se.startTime-se),P=!1}return P}finally{m=null,b=C,y=!1}}var D=!1,V=null,ee=-1,ce=5,H=-1;function ie(){return!(e.unstable_now()-H<ce)}function ne(){if(V!==null){var G=e.unstable_now();H=G;var se=!0;try{se=V(!0,G)}finally{se?ue():(D=!1,V=null)}}else D=!1}var ue;if(typeof k=="function")ue=function(){k(ne)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,ae=fe.port2;fe.port1.onmessage=ne,ue=function(){ae.postMessage(null)}}else ue=function(){A(ne,0)};function ve(G){V=G,D||(D=!0,ue())}function de(G,se){ee=A(function(){G(e.unstable_now())},se)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,ve(W))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(G){switch(b){case 1:case 2:case 3:var se=3;break;default:se=b}var C=b;b=se;try{return G()}finally{b=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,se){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var C=b;b=G;try{return se()}finally{b=C}},e.unstable_scheduleCallback=function(G,se,C){var M=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?M+C:M):C=M,G){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=C+J,G={id:p++,callback:se,priorityLevel:G,startTime:C,expirationTime:J,sortIndex:-1},C>M?(G.sortIndex=C,t(f,G),n(d)===null&&G===n(f)&&(_?(S(ee),ee=-1):_=!0,de(z,C-M))):(G.sortIndex=J,t(d,G),x||y||(x=!0,ve(W))),G},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(G){var se=b;return function(){var C=b;b=se;try{return G.apply(this,arguments)}finally{b=C}}}})(mf)),mf}var r1;function YC(){return r1||(r1=1,pf.exports=qC()),pf.exports}var i1;function WC(){if(i1)return Cn;i1=1;var e=ir(),t=YC();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,c,h){if(o===null||typeof o=="undefined"||y(i,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function _(i,o,c,h,E,T,v){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=v}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new _(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];A[o]=new _(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new _(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new _(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new _(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new _(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new _(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new _(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new _(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function k(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(S,k);A[o]=new _(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(S,k);A[o]=new _(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(S,k);A[o]=new _(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new _(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new _(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,c,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,c,E,h)&&(c=null),h||E===null?b(o)&&(c===null?i.removeAttribute(o):i.setAttribute(o,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(o=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,o,c):i.setAttribute(o,c))))}var z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),D=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ie=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),G=Symbol.iterator;function se(i){return i===null||typeof i!="object"?null:(i=G&&i[G]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,M;function J(i){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
17
- `+M+i}var P=!1;function Se(i,o){if(!i||P)return"";P=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
16
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Wu.assertOptions(r,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean),legacyInterceptorReqResOrdering:ln.transitional(ln.boolean),advertiseZstdAcceptEncoding:ln.transitional(ln.boolean),validateStatusUndefinedResolves:ln.transitional(ln.boolean)},!1),s!=null&&(Y.isFunction(s)?n.paramsSerializer={serialize:s}:Wu.assertOptions(s,{encode:ln.function,serialize:ln.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wu.assertOptions(n,{baseUrl:ln.spelling("baseURL"),withXsrfToken:ln.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=un.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(n)===!1)return;d=d&&_.synchronous;const A=n.transitional||Vd;A&&A.legacyInterceptorReqResOrdering?l.unshift(_.fulfilled,_.rejected):l.push(_.fulfilled,_.rejected)});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let p,m=0,b;if(!d){const x=[_g.bind(this),void 0];for(x.unshift(...l),x.push(...f),b=x.length,p=Promise.resolve(n);m<b;)p=p.then(x[m++],x[m++]);return p}b=l.length;let y=n;for(;m<b;){const x=l[m++],_=l[m++];try{y=x(y)}catch(A){_.call(this,A);break}}try{p=_g.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Yi(this.defaults,t);const n=hg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return rg(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Wi.prototype[t]=function(n,r){return this.request(Yi(r||{},{method:t,url:n,data:r&&Y.hasOwnProp(r,"data")?r.data:void 0}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Yi(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Wi.prototype[t]=n(),t!=="query"&&(Wi.prototype[t+"Form"]=n(!0))});let MA=class A2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(l=>{r.subscribe(l),a=l}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new ta(a,u,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new A2(function(s){t=s}),cancel:t}}};function FA(e){return function(n){return e.apply(null,n)}}function BA(e){return Y.isObject(e)&&e.isAxiosError===!0}const Qd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Qd).forEach(([e,t])=>{Qd[t]=e});function vg(e){const t=new Wi(e),n=H0(Wi.prototype.request,t);return Y.extend(n,Wi.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return vg(Yi(e,s))},n}const Bt=vg(ea);Bt.Axios=Wi,Bt.CanceledError=ta,Bt.CancelToken=MA,Bt.isCancel=ug,Bt.VERSION=Gd,Bt.toFormData=zu,Bt.AxiosError=Ne,Bt.Cancel=Bt.CanceledError,Bt.all=function(t){return Promise.all(t)},Bt.spread=FA,Bt.isAxiosError=BA,Bt.mergeConfig=Yi,Bt.AxiosHeaders=un,Bt.formToJSON=e=>ag(Y.isHTMLForm(e)?new FormData(e):e),Bt.getAdapter=xg.getAdapter,Bt.HttpStatusCode=Qd,Bt.default=Bt;const{Axios:tU,AxiosError:nU,CanceledError:rU,isCancel:iU,CancelToken:sU,VERSION:oU,all:aU,Cancel:uU,isAxiosError:lU,spread:cU,toFormData:dU,AxiosHeaders:fU,HttpStatusCode:hU,formToJSON:pU,getAdapter:mU,mergeConfig:gU,create:EU}=Bt;class UA{constructor(t,n,r,s=!1,a,u){Qe(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Qe(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Qe(this,"CIMULATE_SEARCH_API_PATH","api/v1");Qe(this,"baseApiUrl");Qe(this,"headers",{});Qe(this,"fetchConfig",()=>Be(this,null,function*(){try{const t=yield Bt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Qe(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class HA{constructor(t,n,r,s=!1,a,u){Qe(this,"apiService");Qe(this,"config",null);Qe(this,"getConfig",()=>Be(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Qe(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Qe(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Qe(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Qe(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Qe(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Qe(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Qe(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Qe(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Qe(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Qe(this,"getProductField",t=>this.config?this.config[t]:"");Qe(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new UA(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const jA={copilot:"Your Search Assistant",messaging:"Commerce Client"},Ag=R.createContext(null),zA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:_=3,messageAlignment:A="start",autoScroll:S=!0,showProductDescription:C=!1,componentConfig:I,conversationHistory:z,resetConversationMessage:W="",apiKey:D,apiToken:V,baseUrl:ee,customerId:ce,tenantId:H,theme:ie,isDevelopment:te,__features:ue,routingAttributes:fe,enableDownloadTranscript:ae=!0,enableEscalationToAgent:Se=!1,showProductCaptions:de=!1,children:G})=>{const se=e==="messaging",k=R.useMemo(()=>{const Ie=fe==null?void 0:fe.isCartMgmtSupported;return Ie===!0||Ie==="true"},[fe]),M=R.useMemo(()=>se?{config:null}:new HA(ee,D,V,te,ce,H),[se,ee,D,V,te,ce,H]),J=R.useMemo(()=>new vS(te),[te]);R.useEffect(()=>{se||!M||M.config||M.getConfig()},[M,se]);const P=R.useMemo(()=>PS(ie),[ie]),_e=R.useMemo(()=>{const Ie=(y==null?void 0:y.placeholder)||m,Fe=(y==null?void 0:y.buttonLabel)||b;let Ge="icon";return y!=null&&y.buttonType?Ge=y.buttonType:b&&(Ge="text"),le(j({},y||{}),{placeholder:Ie,buttonLabel:Fe,buttonType:Ge})},[y,m,b]),ve=R.useMemo(()=>le(j({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||jA[e!=null?e:"copilot"]}),[r,t,n,e]),me=R.useMemo(()=>({configModule:M,mode:e!=null?e:"copilot",headerConfig:ve,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:J,searchConfig:_e,suggestionButtonConfig:x,progressStepsLimit:_,messageAlignment:A,autoScroll:S,showProductDescription:!!C,enableMinimize:!!(I!=null&&I.enableMinimize),enableDownloadTranscript:ae,enableEscalationToAgent:Se,showProductCaptions:!!de,resetConversationMessage:W,conversationHistory:{sinceHours:typeof(z==null?void 0:z.sinceHours)=="number"?z.sinceHours:1,limit:z==null?void 0:z.limit},features:ue,isCartMgmtSupported:k}),[M,e,ve,a,s,f,p,l,d,u,_e,x,A,S,C,I,ae,Se,de,W,J,P,z,ue,k]);return w.jsx(Ag.Provider,{value:me,children:G})},ft=()=>{const e=R.useContext(Ag);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},kg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ci=-1;function Cg(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Ng(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&kg.includes(t.type))return t;const n=Cg(t);return n?{type:"markdown",index:ci,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:ci,data:{content:e}}}function Og(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!kg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return le(j({},n),{type:n.type,index:r})}function na(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function $A(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=na(t);if(n)return n.response;const r=Og(t);return[r&&r.type!=="markdown"?r:e]}function VA(e,t){var n,r;return(r=(n=na(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function Ig(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function qA(e){return e.type==="markdown"&&e.index===ci?!Ig(e.data.content):!0}function YA(e){var s;const t=(s=na(e))==null?void 0:s.response;if(!t)return null;const n=t.find(a=>a.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(a=>a.id)};const r=t.find(a=>a.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function WA(e,t){if(t.index===ci){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ci&&t.type==="markdown"){const a={type:"markdown",index:ci,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function Pg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const Rg={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,cartUpdating:!1};function GA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return j(le(j({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return le(j({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return le(j({},e),{conversationId:t.id});case"ADD_MESSAGE":return Pg(e.messages,t.message)?e:le(j({},e),{messages:[...e.messages,le(j({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Ng(t.token);return n?le(j({},e),{streamingBlocks:WA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Pg(e.messages,t.message))return j(j({},e),n);const r=le(j({},t.message),{type:"FLUSH_STREAMING"}),s=t.replaceMessageId?e.messages.findIndex(a=>a.id===t.replaceMessageId):-1;if(s>=0){const a=[...e.messages];return a[s]=le(j({},r),{id:e.messages[s].id}),j(le(j({},e),{messages:a}),n)}return j(le(j({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return le(j({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return j(le(j({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:le(j({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return le(j({},e),{routingResult:t.result});case"SET_ERROR":return le(j({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return le(j({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return le(j({},e),{sendError:null});case"LOAD_HISTORY":return le(j({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return le(j({},e),{sessionExpired:t.expired});case"SET_CART_UPDATING":return le(j({},e),{cartUpdating:t.isUpdating});case"RESET":return le(j({},Rg),{connectionStatus:e.connectionStatus});default:return e}}const Lg=R.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,cartUpdating:!1,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>Be(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>Be(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Be(null,null,function*(){}),getAuthLinkKey:()=>Be(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),XA=4320*60*1e3;function Jd(e,t){return`cim_af_conv_${e}_${t}`}function Zd(e,t){return Date.now()-e>t}function KA(e,t,n){try{const r=Jd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Zd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Gu(e,t,n){try{const r=Jd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function ef(e,t){try{const n=Jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function tf(e,t){return`cim_af_ct_${e}_${t}`}function QA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(ZA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function JA(e){const t=QA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function ZA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function Dg(e,t){try{const n=tf(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:JA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function ek(e,t,n,r){try{const s=tf(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function tk(e,t){try{const n=tf(e,t);sessionStorage.removeItem(n)}catch(n){}}function nk(e,t){return`cim_af_conv_${e}_${t}`}function rk(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=nk(e,t);return new BroadcastChannel(n)}catch(n){return null}}function ik(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var l;r||((l=u.data)==null?void 0:l.type)==="conversation_response"&&(r=!0,clearTimeout(s),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function sk(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(l){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function ok(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function ak(e){if(e)try{e.close()}catch(t){}}function uk(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function lk(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Mg(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function ck(e){if(e.entryType!=="Message")return null;const n=lk(e.entryPayload).abstractMessage;if(!n)return null;const r=Mg(n,"staticContent","text")||Mg(n,"content","text")||"";if(!r)return null;const s=uk(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function dk(e){const t=[];for(const n of e){const r=ck(n);r&&t.push(r)}return t}const fk=5e3;function Xu(e={}){const{routingAttributes:t,timeoutMs:n=fk}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=j({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},l={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(M0,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}const hk=200,pk=1e3;function mk(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=R.useRef(null),u=R.useRef(null),l=R.useRef(null),d=s.sinceHours*60*60*1e3,f=XA,p=R.useCallback(()=>(l.current||(l.current=ik(a.current)),l.current),[]);R.useEffect(()=>{const S=rk(t,n);a.current=S,l.current=null;const C=sk(S,()=>{const I=u.current;if(!I)return null;const z=Dg(t,n);return{conversationId:I,continuationToken:z==null?void 0:z.accessToken,lastEventId:z==null?void 0:z.lastEventId}},()=>{ef(t,n),u.current=null});return()=>{C(),ak(S),a.current=null}},[t,n]);const m=R.useCallback((S,C)=>Be(null,null,function*(){var D,V,ee;const I=(D=C==null?void 0:C.createIfMissing)!=null?D:!0,z=(V=C==null?void 0:C.isCurrent)!=null?V:(()=>!0);let W=KA(t,n,f);if(!W){const ce=yield p();ce&&!Zd(ce.storedAt,f)&&(W=ce)}if(!W){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const ce=yield Xu({routingAttributes:r});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=yield S.createConversation(ce);return z()?(Gu(t,n,H),u.current=H,{conversationId:H,restoredMessages:[],resumed:!1,outcome:"created"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const ce=yield S.listConversations({conversationId:W.conversationId,startTimestamp:Date.now()-f});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=ce.conversations.find(te=>te.conversationId===W.conversationId&&!te.isConversationClosed);if(!H){if(ef(t,n),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const te=yield Xu({routingAttributes:r});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ue=yield S.createConversation(te);return z()?(Gu(t,n,ue),u.current=ue,{conversationId:ue,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield S.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}S.resumeConversation(H.conversationId),u.current=H.conversationId,Gu(t,n,H.conversationId);let ie=[];try{const te=yield S.listConversationEntries(H.conversationId,{limit:Math.min((ee=s.limit)!=null?ee:hk,pk),startTimestamp:Date.now()-d,direction:"FromEnd"});ie=dk(te.conversationEntries).reverse()}catch(te){}return{conversationId:H.conversationId,restoredMessages:ie,resumed:!0,outcome:"resumed"}}catch(ce){return{conversationId:W.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:ce}}}),[t,n,r,s,d,f,p]),b=R.useCallback(S=>{Gu(t,n,S),u.current=S},[t,n]),y=R.useCallback(()=>{ef(t,n),tk(t,n),ok(a.current),u.current=null},[t,n]),x=R.useCallback(()=>{const S=Dg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),_=R.useCallback(()=>Be(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||Zd(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),A=R.useCallback((S,C=()=>!0)=>Be(null,null,function*(){try{const{accessToken:I,lastEventId:z}=yield S.generateContinuationToken();if(!C())return;ek(t,n,I,z)}catch(I){}}),[t,n]);return{initializeConversation:m,persistConversationId:b,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:_,persistContinuationToken:A}}const gk="Your session ended due to inactivity. Starting a new session…",Ek=300*1e3,yk=2e3,Tk=1e4,bk=15e3,wk=2;function Fg(e,t,n){return e||t||n===!0}function ra(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function xk(e){const t=!e.timedOut,n=!!e.options.silent,r=!!e.options.reconcileMessageId;return t&&n&&r}function Bg(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function nf(e){if(Bg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function _k(e){var b;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((b=e.variants)!=null?b:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",l=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:p,display:m}}function Sk({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=bk,logger:f,isRecoveryInFlight:p}){const m=R.useRef(u);m.current=u;const b=R.useRef(l);b.current=l;const y=R.useRef(f);y.current=f;const x=R.useRef(p);x.current=p;const _=R.useRef(0),A=R.useRef(!1),S=R.useRef(0),[C,I]=R.useState(0);R.useEffect(()=>{if(!t||n){_.current=0,A.current=!1,S.current=0;return}const z=a||_.current>0;if(!(s&&z&&e==="connected"&&!r&&!A.current))return;const D=setTimeout(()=>{Be(null,null,function*(){var H,ie;if((H=x.current)!=null&&H.call(x)){if(S.current+=1,S.current>wk){A.current=!0,b.current();return}I(te=>te+1);return}const V=_.current,ee=m.current;if(V>=ee.length){A.current=!0,b.current();return}S.current=0,(ie=y.current)==null||ie.warn("🦜 connect bootstrap stalled",{attempt:V});let ce;try{yield Promise.race([Promise.resolve(ee[V]()),new Promise((te,ue)=>{ce=setTimeout(()=>{ue(new Error("connect bootstrap step timed out"))},d)})])}catch(te){}finally{ce!==void 0&&clearTimeout(ce),_.current=V+1,I(te=>te+1)}})},d);return()=>{clearTimeout(D)}},[e,t,n,r,s,a,d,C])}const Sr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function vk(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function di(e){const{type:t,statusCode:n}=vk(e);if(t==="api"&&typeof n=="number")return n===429?Sr.rateLimit:n>=500?Sr.server:Sr.default;switch(t){case"network":return Sr.network;case"sse":return Sr.interrupted;case"auth":return Sr.connect;default:return Sr.default}}function Ug(e){switch(e.code){case"MAX_RECONNECT":return Sr.lost;case"ROUTING_FAILED":return Sr.routing;default:return Sr.connect}}let Gi=null;function Ak(e){Gi&&Gi!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),Gi=e}function kk(e){Gi===e&&(Gi=null)}function Ck(){if(!Gi)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return Gi}const ia=Symbol("initialization-cancelled"),Hg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,children:p})=>{const{logger:m,conversationHistory:b}=ft(),{status:{isOpen:y}}=Vr(),[x,_]=R.useReducer(GA,Rg),[A,S]=R.useState(!1),[C,I]=R.useState(!1),[z,W]=R.useState(!1),D=R.useRef(x);D.current=x;const V=mk({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:b}),ee=R.useRef(null),ce=R.useRef(l),H=R.useRef(d),ie=R.useRef(u),te=R.useRef(f),ue=R.useRef(!1),fe=R.useRef(!1),ae=R.useRef(!1),Se=R.useRef(0),de=R.useRef(0),G=R.useRef(0),se=R.useRef(null),k=R.useRef(null),M=R.useRef(null),J=R.useRef(0),P=R.useRef(!1),_e=R.useRef(0),ve=R.useRef(0),me=R.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),Ie=R.useRef([]),Fe=R.useRef(null),Ge=R.useCallback(()=>{_({type:"SET_CART_UPDATING",isUpdating:Ie.current.some(xk)})},[]),st=R.useCallback((re,Ae)=>{Ae.outcome==="timeout"?(re.timedOut=!0,Ie.current=Ie.current.filter(ke=>ke===re||!ke.timedOut)):Ie.current=Ie.current.filter(ke=>ke!==re),clearTimeout(re.timeoutId),Ge(),re.resolve(Ae)},[Ge]);ce.current=l,H.current=d,ie.current=u,te.current=f,R.useEffect(()=>{const re=new IS({baseURL:e,orgId:t,esDeveloperName:n,options:j({enableLogging:a},s?{capabilitiesVersion:s}:{})});ee.current=re,P.current=!1,W(!1),S(!1),I(!1),_({type:"RESET"}),re.on("connected",()=>{var ye;_({type:"SET_CONNECTION_STATUS",status:"connected"}),(ye=ie.current)==null||ye.call(ie)}),re.on("disconnected",()=>{_({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),re.on("reconnecting",()=>{_({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),re.on("message",ye=>{var Jr,Zr;const Le=le(j({id:ye.messageId||crypto.randomUUID()},ye.messageId?{serverId:ye.messageId}:{}),{role:"agent",content:ye.content,timestamp:ye.timestamp,sender:ye.sender,raw:ye});m==null||m.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:Le.id,tokensBeforeFlush:Se.current,streamedFinalOnly:Se.current===0}),Se.current=0;const et=ra(Ie.current),Ot=et==null?void 0:et.options.reconcileMessageId;_({type:"FLUSH_STREAMING",message:Le,replaceMessageId:Ot}),(Jr=ce.current)==null||Jr.call(ce,Le),et&&st(et,{outcome:"success"});const{messagingSessionId:Wt}=ye,Mr=Wt?YA(ye.content):null;Wt&&Mr&&((Zr=te.current)==null||Zr.call(te,{agentSessionId:Wt,kind:Mr.kind,productIds:Mr.productIds}))}),re.on("streaming_token",ye=>{var Le;if(!((Le=ra(Ie.current))!=null&&Le.options.silent)){if(Se.current+=1,m!=null&&m.isDevelopment){const et=Ng(ye.token);et?et.index===ci?m.debug("🦜 streaming_token → markdown fallback",{token:ye.token}):m.debug("🦜 streaming_token parsed",{type:et.type,index:et.index,outputName:et.type==="tool_results"?et.output_name:void 0}):m.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:ye.token})}_({type:"APPEND_STREAMING_TOKEN",token:ye.token})}}),re.on("typing_started",()=>{var ye;(ye=ra(Ie.current))!=null&&ye.options.silent||_({type:"SET_AGENT_TYPING",isTyping:!0})}),re.on("typing_stopped",()=>{var ye;(ye=ra(Ie.current))!=null&&ye.options.silent||_({type:"SET_AGENT_TYPING",isTyping:!1})}),re.on("progress_indicator",ye=>{var Le;(Le=ra(Ie.current))!=null&&Le.options.silent||_({type:"ADD_PROGRESS_STEP",message:ye.message})}),re.on("routing_result",ye=>{var Le;if(_({type:"SET_ROUTING_RESULT",result:ye}),!ye.isSuccessful){const et=`Routing failed: ${ye.failureType||"unknown"}`;_({type:"SET_ERROR",error:Ug({code:"ROUTING_FAILED"})}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(Le=H.current)==null||Le.call(H,et)}}),re.on("participant_changed",ye=>{if(ye.participant.name==="Automated Process")return;const Le=le(j({id:crypto.randomUUID()},ye.entryId?{serverId:ye.entryId}:{}),{role:"system",content:ye.action==="add"?`${ye.participant.name||"Agent"} joined the conversation`:`${ye.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});m==null||m.log("🦜 MessagingProvider participant_changed event received",{event:ye}),_({type:"ADD_MESSAGE",message:Le})}),re.on("conversation_closed",()=>{const ye={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};_({type:"ADD_MESSAGE",message:ye}),_({type:"SET_CONVERSATION_ID",id:null}),V.clearPersistedConversation()}),re.on("error",ye=>{var Le;if(m==null||m.log("🦜 MessagingProvider ERROR event received",{event:ye}),ye.code==="SESSION_EXPIRED"){ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"}),_({type:"SET_LOADING",isLoading:!1});return}_({type:"SET_ERROR",error:Ug(ye)}),ye.recoverable||_({type:"SET_CONNECTION_STATUS",status:"error"}),(Le=H.current)==null||Le.call(H,ye.message)});const Ae=ye=>{if(ye!==_e.current)throw ia},ke=ye=>ye===_e.current,Ce=ye=>Be(null,null,function*(){S(!1);let Le=V.getStoredConnectOptions(),et=!1;Le||(Le=yield V.getPeerConnectOptions(),Ae(ye),et=!!Le);let Ot=!1;try{if(yield re.connect(Le!=null?Le:void 0),!ke(ye))throw re.disconnect(),ia;Ot=!!(Le!=null&&Le.lastEventId)}catch(Mr){if(Ae(ye),Le&&nf(Mr)){if(m==null||m.log("Stored token expired on connect — falling back to fresh connect"),et||V.clearPersistedConversation(),yield re.connect(),!ke(ye))throw re.disconnect(),ia;Ot=!1}else throw Mr}I(Ot),yield V.persistContinuationToken(re,()=>ke(ye)),Ae(ye);const Wt=yield V.initializeConversation(re,{isCurrent:()=>ke(ye)});if(Ae(ye),m==null||m.log("🦜 initial connect complete",{conversationId:Wt.conversationId,resumed:Wt.resumed,outcome:Wt.outcome,restoredMessages:Wt.restoredMessages.length}),Wt.outcome==="unverified-error"){Wt.conversationId&&(re.resumeConversation(Wt.conversationId),_({type:"SET_CONVERSATION_ID",id:Wt.conversationId})),S(!0);return}_({type:"SET_CONVERSATION_ID",id:Wt.conversationId}),Wt.resumed&&_({type:"LOAD_HISTORY",messages:Wt.restoredMessages}),S(!0),_({type:"SET_LOADING",isLoading:!1})});return k.current=Ce,()=>{_e.current+=1,ve.current+=1,re.disconnect(),re.off(),ee.current=null,k.current=null,M.current=null,P.current=!1}},[e,t,n,s,st]);const St=R.useCallback(()=>{if(P.current)return Promise.resolve();if(M.current)return J.current===_e.current?M.current:M.current.catch(Ce=>{if(Ce!==ia)throw Ce}).then(()=>me.current());const re=k.current;if(!re)return Promise.reject(new Error("Messaging is unavailable"));_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_CONNECTION_STATUS",status:"connecting"});const Ae=++_e.current;J.current=Ae;const ke=re(Ae).then(()=>{P.current=!0,W(!0)}).catch(Ce=>{var Le;if(Ce===ia)throw Ce;const ye=Ce instanceof Error?Ce.message:String(Ce);throw _({type:"SET_CONNECTION_STATUS",status:"error"}),_({type:"SET_ERROR",error:di(Ce)}),(Le=H.current)==null||Le.call(H,ye),Ce}).finally(()=>{M.current===ke&&(M.current=null)});return M.current=ke,ke},[]);me.current=St,R.useEffect(()=>{y&&St().catch(()=>{})},[y,e,t,n,s,St]);const Lt=R.useCallback(()=>Be(null,null,function*(){const re=ee.current;if(!re)return!1;const Ae=V.getStoredConnectOptions();if(!Ae)return m==null||m.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;m==null||m.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{re.disconnect(),yield re.connect(Ae)}catch(Ce){if(nf(Ce))return m==null||m.log("🦜 attemptResume: token expired (401) — will start fresh",{error:Ce instanceof Error?Ce.message:String(Ce)}),!1;throw m==null||m.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:Ce instanceof Error?Ce.message:String(Ce)}),Ce}yield V.persistContinuationToken(re);const ke=yield V.initializeConversation(re,{createIfMissing:!1});return ke.outcome==="not-found-or-closed"||!ke.conversationId?(m==null||m.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(ke.outcome==="unverified-error"&&(m==null||m.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:ke.conversationId}),re.resumeConversation(ke.conversationId)),m==null||m.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:ke.conversationId}),_({type:"SET_CONVERSATION_ID",id:ke.conversationId}),_({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(ke.conversationId),ae.current=!1,_({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[V,m]),pn=R.useCallback(re=>Be(null,null,function*(){var ke;const Ae=ee.current;if(Ae){re.options.silent||(_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield Ae.sendMessage(re.text)}catch(Ce){const ye=di(Ce);_({type:"SET_SEND_ERROR",error:{text:re.text,displayContent:re.displayContent,options:re.options,message:ye}}),(ke=H.current)==null||ke.call(H,Ce instanceof Error?Ce.message:String(Ce)),st(re,{outcome:"failure",message:ye})}}}),[st]),xn=R.useCallback(re=>Be(null,null,function*(){var ke;const Ae=ee.current;if(!(!Ae||ue.current)){ue.current=!0,fe.current=!0;try{if(yield Lt()){re&&(yield pn(re));return}m==null||m.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ae.current=!1,_({type:"SET_SESSION_EXPIRED",expired:!1}),_({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:gk,timestamp:new Date().toISOString()}}),V.clearPersistedConversation(),_({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ae.disconnect(),yield Ae.connect(),yield V.persistContinuationToken(Ae);const Ce=yield Ae.createConversation(yield Xu({routingAttributes:r}));m==null||m.log("🦜 recoverExpiredSession: new conversation created",{conversationId:Ce}),_({type:"SET_CONVERSATION_ID",id:Ce}),_({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Ce),re&&(yield pn(re))}catch(Ce){const ye=Ce instanceof Error?Ce.message:String(Ce);_({type:"SET_ERROR",error:di(Ce)}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(ke=H.current)==null||ke.call(H,ye),re&&st(re,{outcome:"failure",message:di(Ce)})}finally{ue.current=!1,fe.current=!1}}}),[r,V,Lt,pn,m,st]),Dt=R.useRef(xn);Dt.current=xn;const ze=R.useCallback(()=>Be(null,null,function*(){const re=ee.current;if(!re||!P.current||ue.current)return;if(!D.current.conversationId&&!ae.current){re.reconnect();return}ue.current=!0;const Ae=Be(null,null,function*(){try{(yield Lt())||(ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(ke){ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{ue.current=!1,se.current=null}});se.current=Ae,yield Ae}),[Lt]),Oe=R.useRef(ze);Oe.current=ze;const Xe=R.useCallback(()=>Be(null,null,function*(){const re=ee.current;if(!re||ue.current)return;const Ae=V.getStoredConnectOptions(),ke=Ae==null?void 0:Ae.continuationToken;if(ke){ue.current=!0;try{re.disconnect(),yield re.connect({continuationToken:ke}),yield V.persistContinuationToken(re);const Ce=D.current.conversationId;Ce&&re.resumeConversation(Ce)}catch(Ce){if(nf(Ce)){ae.current=!0,_({type:"SET_SESSION_EXPIRED",expired:!0}),_({type:"SET_CONNECTION_STATUS",status:"disconnected"}),_({type:"SET_LOADING",isLoading:!1});return}m==null||m.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:Ce instanceof Error?Ce.message:String(Ce)})}finally{ue.current=!1}}}),[V,m]);R.useEffect(()=>{const re=()=>{const et=Date.now();et-G.current<yk||(G.current=et,Oe.current())},Ae=()=>{if(document.visibilityState==="hidden"){de.current=Date.now();return}const et=ee.current;if(!et)return;const Ot=de.current?Date.now()-de.current:0;de.current=0,(ae.current||!et.isConnected||Ot>Ek)&&re()},ke=et=>{et.persisted&&re()},Ce=()=>{de.current=Date.now()},ye=()=>re(),Le=()=>re();return document.addEventListener("visibilitychange",Ae),window.addEventListener("pageshow",ke),window.addEventListener("pagehide",Ce),document.addEventListener("resume",ye),window.addEventListener("online",Le),()=>{document.removeEventListener("visibilitychange",Ae),window.removeEventListener("pageshow",ke),window.removeEventListener("pagehide",Ce),document.removeEventListener("resume",ye),window.removeEventListener("online",Le)}},[]);const tt=R.useCallback((re,Ae)=>Be(null,null,function*(){var Ce;const ke=ee.current;if(!ke){st(re,{outcome:"failure",message:"Messaging is unavailable"});return}if(ae.current){yield Dt.current(re);return}try{yield ke.sendMessage(re.text)}catch(ye){if(Bg(ye)){yield Dt.current(re);return}const Le=di(ye);_({type:"SET_SEND_ERROR",error:Ae(Le)}),(Ce=H.current)==null||Ce.call(H,ye instanceof Error?ye.message:String(ye)),st(re,{outcome:"failure",message:Le})}}),[st]),pt=R.useCallback(re=>Be(null,null,function*(){const Ae=se.current;Ae&&(yield Ae),yield re()}),[]),Mt=R.useCallback((re,Ae,ke={})=>new Promise(Ce=>{if(!ee.current){Ce({outcome:"failure",message:"Messaging is unavailable"});return}const Le={};Object.assign(Le,{text:re,displayContent:Ae,options:ke,resolve:Ce,timeoutId:setTimeout(()=>{_({type:"SET_LOADING",isLoading:!1}),st(Le,{outcome:"timeout"})},Tk)}),Ie.current.push(Le),Ge(),_({type:"CLEAR_SEND_ERROR"}),ke.silent||(_({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:Ae!=null?Ae:re,timestamp:new Date().toISOString()}}),_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_PROGRESS_MESSAGE",message:""})),pt(()=>tt(Le,et=>({text:re,displayContent:Ae,options:ke,message:et})))}),[tt,pt,st,Ge]),Ln=R.useCallback((re,Ae)=>{if(!re.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const ke=ve.current,Ce=()=>{const et=()=>ke!==ve.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):Mt(re,Ae==null?void 0:Ae.displayContent,Ae);return P.current?et():St().then(et,Ot=>({outcome:"failure",message:di(Ot)}))},ye=Fe.current?Fe.current.then(Ce):Ce(),Le=ye.then(()=>{});return Fe.current=Le,Le.finally(()=>{Fe.current===Le&&(Fe.current=null)}),ye},[Mt,St]),gs=R.useCallback(re=>{if(!ee.current)return;const Ae=ve.current,{prompt:ke,display:Ce}=_k(re);St().then(()=>{if(Ae===ve.current)return Mt(ke,Ce)}).catch(()=>{})},[Mt,St]),Es=R.useCallback(()=>{const re=ee.current,Ae=D.current.sendError;if(!re||!Ae)return;const ke=()=>fe.current?Promise.resolve({outcome:"failure",message:Ae.message}):Mt(Ae.text,Ae.displayContent,Ae.options),Ce=Fe.current?Fe.current.then(ke):ke(),ye=Ce.then(()=>{});return Fe.current=ye,ye.finally(()=>{Fe.current===ye&&(Fe.current=null)}),Ce},[Mt]),ys=R.useCallback(()=>{const re=ee.current;re&&(M.current||(ae.current=!1,P.current=!1,W(!1),re.disconnect(),_({type:"SET_CONNECTION_STATUS",status:"connecting"}),St().catch(()=>{})))},[St]),oe=R.useCallback(()=>{const re=ee.current;if(!re)return Promise.resolve();if(!P.current)return _e.current+=1,ve.current+=1,re.disconnect(),V.clearPersistedConversation(),_({type:"RESET"}),Promise.resolve();const Ae=++ve.current;return ae.current=!1,I(!1),V.clearPersistedConversation(),_({type:"RESET"}),_({type:"SET_LOADING",isLoading:!0}),_({type:"SET_CONNECTION_STATUS",status:"connecting"}),re.endConversation().then(()=>Ae!==ve.current||ee.current!==re?null:(re.disconnect(),re.connect().then(()=>re))).then(ke=>Be(null,null,function*(){return!ke||Ae!==ve.current||(yield V.persistContinuationToken(ke,()=>Ae===ve.current&&ee.current===ke),Ae!==ve.current||ee.current!==ke)?null:re.createConversation(yield Xu({routingAttributes:r}))})).then(ke=>{!ke||Ae!==ve.current||ee.current!==re||(_({type:"SET_CONVERSATION_ID",id:ke}),_({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(ke))}).catch(ke=>{var Ce;Ae!==ve.current||ee.current!==re||(_({type:"SET_ERROR",error:di(ke)}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(Ce=H.current)==null||Ce.call(H,ke.message))})},[r,V]);Sk({connectionStatus:x.connectionStatus,loading:x.loading,hasMessages:x.messages.length>0,sessionExpired:x.sessionExpired,bootstrapSettled:A,resumeUsedLastEventId:C,recoverySteps:[Xe,oe],onExhausted:()=>{var Ae;const re=di({type:"network"});_({type:"SET_ERROR",error:re}),_({type:"SET_CONNECTION_STATUS",status:"error"}),(Ae=H.current)==null||Ae.call(H,re)},logger:m,isRecoveryInFlight:()=>ue.current||se.current!==null});const xe=R.useCallback(()=>Be(null,null,function*(){var Ce;const re=ee.current;if(!re||!D.current.conversationId)return;const Ae=yield re.retrieveConversationTranscript(),ke=URL.createObjectURL(Ae);try{const ye=document.createElement("a");ye.href=ke,ye.download=`transcript-${(Ce=re.conversationId)!=null?Ce:"conversation"}.pdf`,document.body.appendChild(ye),ye.click(),ye.remove()}finally{URL.revokeObjectURL(ke)}}),[]),$e=R.useCallback(()=>Be(null,null,function*(){const re=ee.current;if(!re)throw new Error("getAuthLinkKey called before the messaging client connected");return m==null||m.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),re.getAuthLinkKey()}),[m]);R.useEffect(()=>{const re={getAuthLinkKey:$e};return Ak(re),()=>kk(re)},[$e]);const Ze=x.connectionStatus==="connected"&&x.conversationId!==null;R.useEffect(()=>{F0(Ze)},[Ze]),R.useEffect(()=>()=>F0(!1),[]);const at=R.useMemo(()=>({connectionStatus:x.connectionStatus,isConnected:Ze,isAgentTyping:x.isAgentTyping,conversationId:x.conversationId,messages:x.messages,streamingBlocks:x.streamingBlocks,progressMessage:x.progressMessage,progressSteps:x.progressSteps,error:x.error,sendError:x.sendError,canInitialize:!z&&x.error===null,loading:x.loading,sessionExpired:x.sessionExpired,cartUpdating:x.cartUpdating,sendMessage:Ln,addToCart:gs,resetConversation:oe,retryLastMessage:Es,retryConnection:ys,downloadTranscript:xe,getAuthLinkKey:$e}),[x,Ze,z,Ln,gs,oe,Es,ys,xe,$e]);return w.jsx(Lg.Provider,{value:at,children:p})};var jg=Symbol.for("immer-nothing"),zg=Symbol.for("immer-draftable"),jn=Symbol.for("immer-state");function ur(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var js=Object.getPrototypeOf;function zs(e){return!!e&&!!e[jn]}function Xi(e){var t;return e?$g(e)||Array.isArray(e)||!!e[zg]||!!((t=e.constructor)!=null&&t[zg])||sa(e)||Ju(e):!1}var Nk=Object.prototype.constructor.toString();function $g(e){if(!e||typeof e!="object")return!1;const t=js(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Nk}function Ku(e,t){Qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qu(e){const t=e[jn];return t?t.type_:Array.isArray(e)?1:sa(e)?2:Ju(e)?3:0}function rf(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Vg(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ok(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sa(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Ki(e){return e.copy_||e.base_}function sf(e,t){if(sa(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=$g(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[jn];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(js(e),r)}else{const r=js(e);if(r!==null&&n)return j({},e);const s=Object.create(r);return Object.assign(s,e)}}function of(e,t=!1){return el(e)||zs(e)||!Xi(e)||(Qu(e)>1&&Object.defineProperties(e,{set:{value:Zu},add:{value:Zu},clear:{value:Zu},delete:{value:Zu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>of(n,!0))),e}function Zu(){ur(2)}function el(e){return Object.isFrozen(e)}var Ik={};function Qi(e){const t=Ik[e];return t||ur(0,e),t}var oa;function qg(){return oa}function Pk(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Yg(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function af(e){uf(e),e.drafts_.forEach(Rk),e.drafts_=null}function uf(e){e===oa&&(oa=e.parent_)}function Wg(e){return oa=Pk(oa,e)}function Rk(e){const t=e[jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Gg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jn].modified_&&(af(t),ur(4)),Xi(e)&&(e=tl(t,e),t.parent_||nl(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[jn].base_,e,t.patches_,t.inversePatches_)):e=tl(t,n,[]),af(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==jg?e:void 0}function tl(e,t,n){if(el(t))return t;const r=t[jn];if(!r)return Ku(t,(s,a)=>Xg(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return nl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),Ku(a,(l,d)=>Xg(e,r,s,l,d,n,u)),nl(e,s,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Xg(e,t,n,r,s,a,u){if(zs(s)){const l=a&&t&&t.type_!==3&&!rf(t.assigned_,r)?a.concat(r):void 0,d=tl(e,s,l);if(Vg(n,r,d),zs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Xi(s)&&!el(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;tl(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(sa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&nl(e,s)}}function nl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&of(t,n)}function Lk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:qg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=lf;n&&(s=[r],a=aa);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var lf={get(e,t){if(t===jn)return e;const n=Ki(e);if(!rf(n,t))return Dk(e,n,t);const r=n[t];return e.finalized_||!Xi(r)?r:r===cf(e.base_,t)?(ff(e),e.copy_[t]=hf(r,e)):r},has(e,t){return t in Ki(e)},ownKeys(e){return Reflect.ownKeys(Ki(e))},set(e,t,n){const r=Kg(Ki(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=cf(Ki(e),t),a=s==null?void 0:s[jn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ok(n,s)&&(n!==void 0||rf(e.base_,t)))return!0;ff(e),df(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ff(e),df(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ki(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ur(11)},getPrototypeOf(e){return js(e.base_)},setPrototypeOf(){ur(12)}},aa={};Ku(lf,(e,t)=>{aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),aa.deleteProperty=function(e,t){return aa.set.call(this,e,t,void 0)},aa.set=function(e,t,n){return lf.set.call(this,e[0],t,n,e[0])};function cf(e,t){const n=e[jn];return(n?Ki(n):e)[t]}function Dk(e,t,n){var s;const r=Kg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Kg(e,t){if(!(t in e))return;let n=js(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=js(n)}}function df(e){e.modified_||(e.modified_=!0,e.parent_&&df(e.parent_))}function ff(e){e.copy_||(e.copy_=sf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Mk=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&ur(6),r!==void 0&&typeof r!="function"&&ur(7);let s;if(Xi(t)){const a=Wg(this),u=hf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?af(a):uf(a)}return Yg(a,r),Gg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===jg&&(s=void 0),this.autoFreeze_&&of(s,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else ur(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,s;return[this.produce(t,n,(u,l)=>{r=u,s=l}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Xi(e)||ur(8),zs(e)&&(e=Fk(e));const t=Wg(this),n=hf(e,void 0);return n[jn].isManual_=!0,uf(t),n}finishDraft(e,t){const n=e&&e[jn];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return Yg(r,t),Gg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Qi("Patches").applyPatches_;return zs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function hf(e,t){const n=sa(e)?Qi("MapSet").proxyMap_(e,t):Ju(e)?Qi("MapSet").proxySet_(e,t):Lk(e,t);return(t?t.scope_:qg()).drafts_.push(n),n}function Fk(e){return zs(e)||ur(10,e),Qg(e)}function Qg(e){if(!Xi(e)||el(e))return e;const t=e[jn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=sf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=sf(e,!0);return Ku(n,(r,s)=>{Vg(n,r,Qg(s))}),t&&(t.finalized_=!1),n}var Bk=new Mk,Uk=Bk.produce;function Hk(e,t,n){var r=R.useMemo(function(){return Uk(e)},[e]);return R.useReducer(r,t,n)}const Tt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Jg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},jk=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),Zg=R.createContext(null),e1=R.createContext(null),zk=({children:e,dispatch:t})=>{const n=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=R.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,l,d,f,p,m,b]);return w.jsx(e1.Provider,{value:y,children:e})},$k=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Tt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Tt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Tt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Tt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Tt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Tt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Tt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Vk=({promptsConfig:e,children:t})=>{const[n,r]=Hk($k,le(j(j({},Jg),e||{}),{staticQuestions:jk((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(Zg.Provider,{value:n,children:w.jsx(zk,{dispatch:r,children:t})})},qk={productId:Xo.productId,pdpLink:Xo.pdpLink},t1=R.createContext(qk),Yk=({children:e})=>{const[t,n]=R.useState(Xo.productId),[r,s]=R.useState(Xo.pdpLink);R.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),s(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&s(l.value)};return wS(u),()=>{xS(u)}},[]);const a=R.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(t1.Provider,{value:a,children:e})},Wk=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){_t(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){_t(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(l)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(_t(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(_t(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),_t(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,_t(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),n1=R.createContext({overrides:{},isInitialized:!1}),Gk=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=R.useState({}),[a,u]=R.useState(!1);R.useEffect(()=>{Be(null,null,function*(){let f={};e?(_t(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield Wk(e)):t&&typeof t=="object"?(_t(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(_t(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=R.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(n1.Provider,{value:l,children:n})},r1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:b,entryType:y,initialEntry:x,entryMessage:_,disclaimerText:A,disclaimerMarkdown:S,clientContext:C,searchPlaceholder:I,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:ee,promptsConfig:ce,showProductDescription:H,resetConversationMessage:ie,conversationHistory:te,messagingConfig:ue,overrides:fe,overridesUrl:ae,inlineOverrides:Se,__features:de,children:G})=>{const se=R.useRef(!1);return se.current||(se.current=!0,AS({initialEntry:x,entryType:y,isDevelopment:p})),w.jsx(zA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:_,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:I,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:ee,showProductDescription:H,componentConfig:b,clientContext:C,disclaimerMarkdown:S,disclaimerText:A,resetConversationMessage:ie,conversationHistory:te,isDevelopment:p,__features:de,progressStepsLimit:ue==null?void 0:ue.progressStepsLimit,routingAttributes:ue==null?void 0:ue.routingAttributes,enableDownloadTranscript:ue==null?void 0:ue.enableDownloadTranscript,enableEscalationToAgent:ue==null?void 0:ue.enableEscalationToAgent,showProductCaptions:ue==null?void 0:ue.showProductCaptions,children:w.jsx(YS,{entryType:y!=null?y:x==null?void 0:x.type,componentConfig:b,componentType:m,children:w.jsx(Yk,{children:w.jsx(Vk,{promptsConfig:ce,children:w.jsx(Gk,{overridesUrl:ae,inlineOverrides:Se||fe,children:w.jsx(Hg,{scrt2Url:(ue==null?void 0:ue.scrt2Url)||"",orgId:(ue==null?void 0:ue.orgId)||"",esDeveloperName:(ue==null?void 0:ue.esDeveloperName)||"",routingAttributes:(ue==null?void 0:ue.routingAttributes)||{},capabilitiesVersion:ue==null?void 0:ue.capabilitiesVersion,enableLogging:p,onProductResult:ue==null?void 0:ue.onProductResult,children:G})})})})})})};var pf={exports:{}},Cn={},mf={exports:{}},gf={};var i1;function Xk(){return i1||(i1=1,(function(e){function t(G,se){var k=G.length;G.push(se);e:for(;0<k;){var M=k-1>>>1,J=G[M];if(0<s(J,se))G[M]=se,G[k]=J,k=M;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var se=G[0],k=G.pop();if(k!==se){G[0]=k;e:for(var M=0,J=G.length,P=J>>>1;M<P;){var _e=2*(M+1)-1,ve=G[_e],me=_e+1,Ie=G[me];if(0>s(ve,k))me<J&&0>s(Ie,ve)?(G[M]=Ie,G[me]=k,M=me):(G[M]=ve,G[_e]=k,M=_e);else if(me<J&&0>s(Ie,k))G[M]=Ie,G[me]=k,M=me;else break e}}return se}function s(G,se){var k=G.sortIndex-se.sortIndex;return k!==0?k:G.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,b=3,y=!1,x=!1,_=!1,A=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(G){for(var se=n(f);se!==null;){if(se.callback===null)r(f);else if(se.startTime<=G)r(f),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(f)}}function z(G){if(_=!1,I(G),!x)if(n(d)!==null)x=!0,Se(W);else{var se=n(f);se!==null&&de(z,se.startTime-G)}}function W(G,se){x=!1,_&&(_=!1,S(ee),ee=-1),y=!0;var k=b;try{for(I(se),m=n(d);m!==null&&(!(m.expirationTime>se)||G&&!ie());){var M=m.callback;if(typeof M=="function"){m.callback=null,b=m.priorityLevel;var J=M(m.expirationTime<=se);se=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(d)&&r(d),I(se)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var _e=n(f);_e!==null&&de(z,_e.startTime-se),P=!1}return P}finally{m=null,b=k,y=!1}}var D=!1,V=null,ee=-1,ce=5,H=-1;function ie(){return!(e.unstable_now()-H<ce)}function te(){if(V!==null){var G=e.unstable_now();H=G;var se=!0;try{se=V(!0,G)}finally{se?ue():(D=!1,V=null)}}else D=!1}var ue;if(typeof C=="function")ue=function(){C(te)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,ae=fe.port2;fe.port1.onmessage=te,ue=function(){ae.postMessage(null)}}else ue=function(){A(te,0)};function Se(G){V=G,D||(D=!0,ue())}function de(G,se){ee=A(function(){G(e.unstable_now())},se)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,Se(W))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(G){switch(b){case 1:case 2:case 3:var se=3;break;default:se=b}var k=b;b=se;try{return G()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,se){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var k=b;b=G;try{return se()}finally{b=k}},e.unstable_scheduleCallback=function(G,se,k){var M=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,G){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=k+J,G={id:p++,callback:se,priorityLevel:G,startTime:k,expirationTime:J,sortIndex:-1},k>M?(G.sortIndex=k,t(f,G),n(d)===null&&G===n(f)&&(_?(S(ee),ee=-1):_=!0,de(z,k-M))):(G.sortIndex=J,t(d,G),x||y||(x=!0,Se(W))),G},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(G){var se=b;return function(){var k=b;b=se;try{return G.apply(this,arguments)}finally{b=k}}}})(gf)),gf}var s1;function Kk(){return s1||(s1=1,mf.exports=Xk()),mf.exports}var o1;function Qk(){if(o1)return Cn;o1=1;var e=sr(),t=Kk();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,c,h){if(o===null||typeof o=="undefined"||y(i,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function _(i,o,c,h,E,T,v){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=v}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new _(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];A[o]=new _(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new _(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new _(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new _(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new _(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new _(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new _(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new _(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function C(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(S,C);A[o]=new _(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(S,C);A[o]=new _(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(S,C);A[o]=new _(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new _(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new _(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,c,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,c,E,h)&&(c=null),h||E===null?b(o)&&(c===null?i.removeAttribute(o):i.setAttribute(o,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(o=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,o,c):i.setAttribute(o,c))))}var z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),D=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ie=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),G=Symbol.iterator;function se(i){return i===null||typeof i!="object"?null:(i=G&&i[G]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,M;function J(i){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
17
+ `+M+i}var P=!1;function _e(i,o){if(!i||P)return"";P=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
18
18
  `),T=h.stack.split(`
19
19
  `),v=E.length-1,F=T.length-1;1<=v&&0<=F&&E[v]!==T[F];)F--;for(;1<=v&&0<=F;v--,F--)if(E[v]!==T[F]){if(v!==1||F!==1)do if(v--,F--,0>F||E[v]!==T[F]){var $=`
20
- `+E[v].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=v&&0<=F);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?J(i):""}function Ae(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=Se(i.type,!1),i;case 11:return i=Se(i.type.render,!1),i;case 1:return i=Se(i.type,!0),i;default:return""}}function me(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case V:return"Fragment";case D:return"Portal";case ce:return"Profiler";case ee:return"StrictMode";case ue:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case ne:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return o=i.displayName||null,o!==null?o:me(i.type)||"Memo";case ve:o=i._payload,i=i._init;try{return me(i(o))}catch(c){}}return null}function Ie(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(o);case 8:return o===ee?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Me(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Xe(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function st(i){var o=Xe(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,T=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(v){h=""+v,T.call(this,v)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(v){h=""+v},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function St(i){i._valueTracker||(i._valueTracker=st(i))}function Rt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=Xe(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function hn(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function wn(i,o){var c=o.checked;return C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Lt(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Me(o.value!=null?o.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function ze(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function Ne(i,o){ze(i,o);var c=Me(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?tt(i,o.type,c):o.hasOwnProperty("defaultValue")&&tt(i,o.type,Me(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Qe(i,o,c){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,c||o===i.value||(i.value=o),i.defaultValue=o}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function tt(i,o,c){(o!=="number"||hn(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var ht=Array.isArray;function Dt(i,o,c,h){if(i=i.options,o){o={};for(var E=0;E<c.length;E++)o["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=o.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Me(c),o=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Rn(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function hs(i,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(ht(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Me(c)}}function ps(i,o){var c=Me(o.value),h=Me(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function ms(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function oe(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?oe(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var $e,et=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for($e=$e||document.createElement("div"),$e.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=$e.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function te(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var _e={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oe=["Webkit","ms","Moz","O"];Object.keys(_e).forEach(function(i){Oe.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),_e[o]=_e[i]})});function Ce(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||_e.hasOwnProperty(i)&&_e[i]?(""+o).trim():o+"px"}function Ee(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Ce(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var He=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ge(i,o){if(o){if(He[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function $t(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pt=null;function Dr(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var wo=null,Kr=null,xo=null;function Fw(i){if(i=du(i)){if(typeof wo!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Cc(o),wo(i.stateNode,i.type,o))}}function Bw(i){Kr?xo?xo.push(i):xo=[i]:Kr=i}function Uw(){if(Kr){var i=Kr,o=xo;if(xo=Kr=null,Fw(i),o)for(i=0;i<o.length;i++)Fw(o[i])}}function Hw(i,o){return i(o)}function jw(){}var Sp=!1;function zw(i,o,c){if(Sp)return i(o,c);Sp=!0;try{return Hw(i,o,c)}finally{Sp=!1,(Kr!==null||xo!==null)&&(jw(),Uw())}}function Va(i,o){var c=i.stateNode;if(c===null)return null;var h=Cc(c);if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var vp=!1;if(l)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){vp=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch(i){vp=!1}function qF(i,o,c,h,E,T,v,F,$){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(ge){this.onError(ge)}}var Ya=!1,sc=null,oc=!1,Ap=null,YF={onError:function(i){Ya=!0,sc=i}};function WF(i,o,c,h,E,T,v,F,$){Ya=!1,sc=null,qF.apply(YF,arguments)}function GF(i,o,c,h,E,T,v,F,$){if(WF.apply(this,arguments),Ya){if(Ya){var Z=sc;Ya=!1,sc=null}else throw Error(n(198));oc||(oc=!0,Ap=Z)}}function gs(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function $w(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function Vw(i){if(gs(i)!==i)throw Error(n(188))}function XF(i){var o=i.alternate;if(!o){if(o=gs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,h=o;;){var E=c.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return Vw(E),i;if(T===h)return Vw(E),o;T=T.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=T;else{for(var v=!1,F=E.child;F;){if(F===c){v=!0,c=E,h=T;break}if(F===h){v=!0,h=E,c=T;break}F=F.sibling}if(!v){for(F=T.child;F;){if(F===c){v=!0,c=T,h=E;break}if(F===h){v=!0,h=T,c=E;break}F=F.sibling}if(!v)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function qw(i){return i=XF(i),i!==null?Yw(i):null}function Yw(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Yw(i);if(o!==null)return o;i=i.sibling}return null}var Ww=t.unstable_scheduleCallback,Gw=t.unstable_cancelCallback,QF=t.unstable_shouldYield,KF=t.unstable_requestPaint,Ut=t.unstable_now,JF=t.unstable_getCurrentPriorityLevel,Cp=t.unstable_ImmediatePriority,Xw=t.unstable_UserBlockingPriority,ac=t.unstable_NormalPriority,ZF=t.unstable_LowPriority,Qw=t.unstable_IdlePriority,uc=null,Mr=null;function eB(i){if(Mr&&typeof Mr.onCommitFiberRoot=="function")try{Mr.onCommitFiberRoot(uc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var pr=Math.clz32?Math.clz32:rB,tB=Math.log,nB=Math.LN2;function rB(i){return i>>>=0,i===0?32:31-(tB(i)/nB|0)|0}var lc=64,cc=4194304;function Wa(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function dc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,v=c&268435455;if(v!==0){var F=v&~E;F!==0?h=Wa(F):(T&=v,T!==0&&(h=Wa(T)))}else v=c&~E,v!==0?h=Wa(v):T!==0&&(h=Wa(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-pr(o),E=1<<c,h|=i[c],o&=~E;return h}function iB(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sB(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var v=31-pr(T),F=1<<v,$=E[v];$===-1?((F&c)===0||(F&h)!==0)&&(E[v]=iB(F,o)):$<=o&&(i.expiredLanes|=F),T&=~F}}function kp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Kw(){var i=lc;return lc<<=1,(lc&4194240)===0&&(lc=64),i}function Np(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ga(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-pr(o),i[o]=c}function oB(i,o){var c=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-pr(c),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~T}}function Op(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-pr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var mt=0;function Jw(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Zw,Ip,ex,tx,nx,Pp=!1,fc=[],wi=null,xi=null,_i=null,Xa=new Map,Qa=new Map,Si=[],aB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function rx(i,o){switch(i){case"focusin":case"focusout":wi=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":Xa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qa.delete(o.pointerId)}}function Ka(i,o,c,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=du(o),o!==null&&Ip(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function uB(i,o,c,h,E){switch(o){case"focusin":return wi=Ka(wi,i,o,c,h,E),!0;case"dragenter":return xi=Ka(xi,i,o,c,h,E),!0;case"mouseover":return _i=Ka(_i,i,o,c,h,E),!0;case"pointerover":var T=E.pointerId;return Xa.set(T,Ka(Xa.get(T)||null,i,o,c,h,E)),!0;case"gotpointercapture":return T=E.pointerId,Qa.set(T,Ka(Qa.get(T)||null,i,o,c,h,E)),!0}return!1}function ix(i){var o=Es(i.target);if(o!==null){var c=gs(o);if(c!==null){if(o=c.tag,o===13){if(o=$w(c),o!==null){i.blockedOn=o,nx(i.priority,function(){ex(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function hc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Lp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);pt=h,c.target.dispatchEvent(h),pt=null}else return o=du(c),o!==null&&Ip(o),i.blockedOn=c,!1;o.shift()}return!0}function sx(i,o,c){hc(i)&&c.delete(o)}function lB(){Pp=!1,wi!==null&&hc(wi)&&(wi=null),xi!==null&&hc(xi)&&(xi=null),_i!==null&&hc(_i)&&(_i=null),Xa.forEach(sx),Qa.forEach(sx)}function Ja(i,o){i.blockedOn===o&&(i.blockedOn=null,Pp||(Pp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lB)))}function Za(i){function o(E){return Ja(E,i)}if(0<fc.length){Ja(fc[0],i);for(var c=1;c<fc.length;c++){var h=fc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(wi!==null&&Ja(wi,i),xi!==null&&Ja(xi,i),_i!==null&&Ja(_i,i),Xa.forEach(o),Qa.forEach(o),c=0;c<Si.length;c++)h=Si[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Si.length&&(c=Si[0],c.blockedOn===null);)ix(c),c.blockedOn===null&&Si.shift()}var _o=z.ReactCurrentBatchConfig,pc=!0;function cB(i,o,c,h){var E=mt,T=_o.transition;_o.transition=null;try{mt=1,Rp(i,o,c,h)}finally{mt=E,_o.transition=T}}function dB(i,o,c,h){var E=mt,T=_o.transition;_o.transition=null;try{mt=4,Rp(i,o,c,h)}finally{mt=E,_o.transition=T}}function Rp(i,o,c,h){if(pc){var E=Lp(i,o,c,h);if(E===null)Kp(i,o,h,mc,c),rx(i,h);else if(uB(E,i,o,c,h))h.stopPropagation();else if(rx(i,h),o&4&&-1<aB.indexOf(i)){for(;E!==null;){var T=du(E);if(T!==null&&Zw(T),T=Lp(i,o,c,h),T===null&&Kp(i,o,h,mc,c),T===E)break;E=T}E!==null&&h.stopPropagation()}else Kp(i,o,h,null,c)}}var mc=null;function Lp(i,o,c,h){if(mc=null,i=Dr(h),i=Es(i),i!==null)if(o=gs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=$w(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return mc=i,null}function ox(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(JF()){case Cp:return 1;case Xw:return 4;case ac:case ZF:return 16;case Qw:return 536870912;default:return 16}default:return 16}}var vi=null,Dp=null,gc=null;function ax(){if(gc)return gc;var i,o=Dp,c=o.length,h,E="value"in vi?vi.value:vi.textContent,T=E.length;for(i=0;i<c&&o[i]===E[i];i++);var v=c-i;for(h=1;h<=v&&o[c-h]===E[T-h];h++);return gc=E.slice(i,1<h?1-h:void 0)}function Ec(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function yc(){return!0}function ux(){return!1}function Vn(i){function o(c,h,E,T,v){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=v,this.currentTarget=null;for(var F in i)i.hasOwnProperty(F)&&(c=i[F],this[F]=c?c(T):T[F]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?yc:ux,this.isPropagationStopped=ux,this}return C(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=yc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=yc)},persist:function(){},isPersistent:yc}),o}var So={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mp=Vn(So),eu=C({},So,{view:0,detail:0}),fB=Vn(eu),Fp,Bp,tu,Tc=C({},eu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==tu&&(tu&&i.type==="mousemove"?(Fp=i.screenX-tu.screenX,Bp=i.screenY-tu.screenY):Bp=Fp=0,tu=i),Fp)},movementY:function(i){return"movementY"in i?i.movementY:Bp}}),lx=Vn(Tc),hB=C({},Tc,{dataTransfer:0}),pB=Vn(hB),mB=C({},eu,{relatedTarget:0}),Up=Vn(mB),gB=C({},So,{animationName:0,elapsedTime:0,pseudoElement:0}),EB=Vn(gB),yB=C({},So,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),TB=Vn(yB),bB=C({},So,{data:0}),cx=Vn(bB),wB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_B={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=_B[i])?!!o[i]:!1}function Hp(){return SB}var vB=C({},eu,{key:function(i){if(i.key){var o=wB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Ec(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hp,charCode:function(i){return i.type==="keypress"?Ec(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ec(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),AB=Vn(vB),CB=C({},Tc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dx=Vn(CB),kB=C({},eu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hp}),NB=Vn(kB),OB=C({},So,{propertyName:0,elapsedTime:0,pseudoElement:0}),IB=Vn(OB),PB=C({},Tc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),RB=Vn(PB),LB=[9,13,27,32],jp=l&&"CompositionEvent"in window,nu=null;l&&"documentMode"in document&&(nu=document.documentMode);var DB=l&&"TextEvent"in window&&!nu,fx=l&&(!jp||nu&&8<nu&&11>=nu),hx=" ",px=!1;function mx(i,o){switch(i){case"keyup":return LB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var vo=!1;function MB(i,o){switch(i){case"compositionend":return gx(o);case"keypress":return o.which!==32?null:(px=!0,hx);case"textInput":return i=o.data,i===hx&&px?null:i;default:return null}}function FB(i,o){if(vo)return i==="compositionend"||!jp&&mx(i,o)?(i=ax(),gc=Dp=vi=null,vo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return fx&&o.locale!=="ko"?null:o.data;default:return null}}var BB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ex(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!BB[i.type]:o==="textarea"}function yx(i,o,c,h){Bw(h),o=Sc(o,"onChange"),0<o.length&&(c=new Mp("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var ru=null,iu=null;function UB(i){Mx(i,0)}function bc(i){var o=Oo(i);if(Rt(o))return i}function HB(i,o){if(i==="change")return o}var Tx=!1;if(l){var zp;if(l){var $p="oninput"in document;if(!$p){var bx=document.createElement("div");bx.setAttribute("oninput","return;"),$p=typeof bx.oninput=="function"}zp=$p}else zp=!1;Tx=zp&&(!document.documentMode||9<document.documentMode)}function wx(){ru&&(ru.detachEvent("onpropertychange",xx),iu=ru=null)}function xx(i){if(i.propertyName==="value"&&bc(iu)){var o=[];yx(o,iu,i,Dr(i)),zw(UB,o)}}function jB(i,o,c){i==="focusin"?(wx(),ru=o,iu=c,ru.attachEvent("onpropertychange",xx)):i==="focusout"&&wx()}function zB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return bc(iu)}function $B(i,o){if(i==="click")return bc(o)}function VB(i,o){if(i==="input"||i==="change")return bc(o)}function qB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var mr=typeof Object.is=="function"?Object.is:qB;function su(i,o){if(mr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(o,E)||!mr(i[E],o[E]))return!1}return!0}function _x(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Sx(i,o){var c=_x(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=o&&h>=o)return{node:c,offset:o-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=_x(c)}}function vx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?vx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Ax(){for(var i=window,o=hn();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=o.contentWindow;else break;o=hn(i.document)}return o}function Vp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function YB(i){var o=Ax(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&vx(c.ownerDocument.documentElement,c)){if(h!==null&&Vp(c)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(i,c.value.length);else if(i=(o=c.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=Sx(c,T);var v=Sx(c,h);E&&v&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==v.node||i.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(v.node,v.offset)):(o.setEnd(v.node,v.offset),i.addRange(o)))}}for(o=[],i=c;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)i=o[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var WB=l&&"documentMode"in document&&11>=document.documentMode,Ao=null,qp=null,ou=null,Yp=!1;function Cx(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Yp||Ao==null||Ao!==hn(h)||(h=Ao,"selectionStart"in h&&Vp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),ou&&su(ou,h)||(ou=h,h=Sc(qp,"onSelect"),0<h.length&&(o=new Mp("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Ao)))}function wc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Co={animationend:wc("Animation","AnimationEnd"),animationiteration:wc("Animation","AnimationIteration"),animationstart:wc("Animation","AnimationStart"),transitionend:wc("Transition","TransitionEnd")},Wp={},kx={};l&&(kx=document.createElement("div").style,"AnimationEvent"in window||(delete Co.animationend.animation,delete Co.animationiteration.animation,delete Co.animationstart.animation),"TransitionEvent"in window||delete Co.transitionend.transition);function xc(i){if(Wp[i])return Wp[i];if(!Co[i])return i;var o=Co[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in kx)return Wp[i]=o[c];return i}var Nx=xc("animationend"),Ox=xc("animationiteration"),Ix=xc("animationstart"),Px=xc("transitionend"),Rx=new Map,Lx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ai(i,o){Rx.set(i,o),a(o,[i])}for(var Gp=0;Gp<Lx.length;Gp++){var Xp=Lx[Gp],GB=Xp.toLowerCase(),XB=Xp[0].toUpperCase()+Xp.slice(1);Ai(GB,"on"+XB)}Ai(Nx,"onAnimationEnd"),Ai(Ox,"onAnimationIteration"),Ai(Ix,"onAnimationStart"),Ai("dblclick","onDoubleClick"),Ai("focusin","onFocus"),Ai("focusout","onBlur"),Ai(Px,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var au="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),QB=new Set("cancel close invalid load scroll toggle".split(" ").concat(au));function Dx(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,GF(h,o,void 0,i),i.currentTarget=null}function Mx(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var v=h.length-1;0<=v;v--){var F=h[v],$=F.instance,Z=F.currentTarget;if(F=F.listener,$!==T&&E.isPropagationStopped())break e;Dx(E,F,Z),T=$}else for(v=0;v<h.length;v++){if(F=h[v],$=F.instance,Z=F.currentTarget,F=F.listener,$!==T&&E.isPropagationStopped())break e;Dx(E,F,Z),T=$}}}if(oc)throw i=Ap,oc=!1,Ap=null,i}function vt(i,o){var c=o[rm];c===void 0&&(c=o[rm]=new Set);var h=i+"__bubble";c.has(h)||(Fx(o,i,2,!1),c.add(h))}function Qp(i,o,c){var h=0;o&&(h|=4),Fx(c,i,h,o)}var _c="_reactListening"+Math.random().toString(36).slice(2);function uu(i){if(!i[_c]){i[_c]=!0,r.forEach(function(c){c!=="selectionchange"&&(QB.has(c)||Qp(c,!1,i),Qp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[_c]||(o[_c]=!0,Qp("selectionchange",!1,o))}}function Fx(i,o,c,h){switch(ox(o)){case 1:var E=cB;break;case 4:E=dB;break;default:E=Rp}c=E.bind(null,o,c,i),E=void 0,!vp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,c,{capture:!0,passive:E}):i.addEventListener(o,c,!0):E!==void 0?i.addEventListener(o,c,{passive:E}):i.addEventListener(o,c,!1)}function Kp(i,o,c,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var v=h.tag;if(v===3||v===4){var F=h.stateNode.containerInfo;if(F===E||F.nodeType===8&&F.parentNode===E)break;if(v===4)for(v=h.return;v!==null;){var $=v.tag;if(($===3||$===4)&&($=v.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;v=v.return}for(;F!==null;){if(v=Es(F),v===null)return;if($=v.tag,$===5||$===6){h=T=v;continue e}F=F.parentNode}}h=h.return}zw(function(){var Z=T,ge=Dr(c),Te=[];e:{var he=Rx.get(i);if(he!==void 0){var Pe=Mp,Le=i;switch(i){case"keypress":if(Ec(c)===0)break e;case"keydown":case"keyup":Pe=AB;break;case"focusin":Le="focus",Pe=Up;break;case"focusout":Le="blur",Pe=Up;break;case"beforeblur":case"afterblur":Pe=Up;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Pe=lx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pe=pB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pe=NB;break;case Nx:case Ox:case Ix:Pe=EB;break;case Px:Pe=IB;break;case"scroll":Pe=fB;break;case"wheel":Pe=RB;break;case"copy":case"cut":case"paste":Pe=TB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pe=dx}var De=(o&4)!==0,Ht=!De&&i==="scroll",X=De?he!==null?he+"Capture":null:he;De=[];for(var q=Z,K;q!==null;){K=q;var we=K.stateNode;if(K.tag===5&&we!==null&&(K=we,X!==null&&(we=Va(q,X),we!=null&&De.push(lu(q,we,K)))),Ht)break;q=q.return}0<De.length&&(he=new Pe(he,Le,null,c,ge),Te.push({event:he,listeners:De}))}}if((o&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",Pe=i==="mouseout"||i==="pointerout",he&&c!==pt&&(Le=c.relatedTarget||c.fromElement)&&(Es(Le)||Le[Jr]))break e;if((Pe||he)&&(he=ge.window===ge?ge:(he=ge.ownerDocument)?he.defaultView||he.parentWindow:window,Pe?(Le=c.relatedTarget||c.toElement,Pe=Z,Le=Le?Es(Le):null,Le!==null&&(Ht=gs(Le),Le!==Ht||Le.tag!==5&&Le.tag!==6)&&(Le=null)):(Pe=null,Le=Z),Pe!==Le)){if(De=lx,we="onMouseLeave",X="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(De=dx,we="onPointerLeave",X="onPointerEnter",q="pointer"),Ht=Pe==null?he:Oo(Pe),K=Le==null?he:Oo(Le),he=new De(we,q+"leave",Pe,c,ge),he.target=Ht,he.relatedTarget=K,we=null,Es(ge)===Z&&(De=new De(X,q+"enter",Le,c,ge),De.target=K,De.relatedTarget=Ht,we=De),Ht=we,Pe&&Le)t:{for(De=Pe,X=Le,q=0,K=De;K;K=ko(K))q++;for(K=0,we=X;we;we=ko(we))K++;for(;0<q-K;)De=ko(De),q--;for(;0<K-q;)X=ko(X),K--;for(;q--;){if(De===X||X!==null&&De===X.alternate)break t;De=ko(De),X=ko(X)}De=null}else De=null;Pe!==null&&Bx(Te,he,Pe,De,!1),Le!==null&&Ht!==null&&Bx(Te,Ht,Le,De,!0)}}e:{if(he=Z?Oo(Z):window,Pe=he.nodeName&&he.nodeName.toLowerCase(),Pe==="select"||Pe==="input"&&he.type==="file")var Fe=HB;else if(Ex(he))if(Tx)Fe=VB;else{Fe=zB;var qe=jB}else(Pe=he.nodeName)&&Pe.toLowerCase()==="input"&&(he.type==="checkbox"||he.type==="radio")&&(Fe=$B);if(Fe&&(Fe=Fe(i,Z))){yx(Te,Fe,c,ge);break e}qe&&qe(i,he,Z),i==="focusout"&&(qe=he._wrapperState)&&qe.controlled&&he.type==="number"&&tt(he,"number",he.value)}switch(qe=Z?Oo(Z):window,i){case"focusin":(Ex(qe)||qe.contentEditable==="true")&&(Ao=qe,qp=Z,ou=null);break;case"focusout":ou=qp=Ao=null;break;case"mousedown":Yp=!0;break;case"contextmenu":case"mouseup":case"dragend":Yp=!1,Cx(Te,c,ge);break;case"selectionchange":if(WB)break;case"keydown":case"keyup":Cx(Te,c,ge)}var Ye;if(jp)e:{switch(i){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else vo?mx(i,c)&&(Ke="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ke="onCompositionStart");Ke&&(fx&&c.locale!=="ko"&&(vo||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&vo&&(Ye=ax()):(vi=ge,Dp="value"in vi?vi.value:vi.textContent,vo=!0)),qe=Sc(Z,Ke),0<qe.length&&(Ke=new cx(Ke,i,null,c,ge),Te.push({event:Ke,listeners:qe}),Ye?Ke.data=Ye:(Ye=gx(c),Ye!==null&&(Ke.data=Ye)))),(Ye=DB?MB(i,c):FB(i,c))&&(Z=Sc(Z,"onBeforeInput"),0<Z.length&&(ge=new cx("onBeforeInput","beforeinput",null,c,ge),Te.push({event:ge,listeners:Z}),ge.data=Ye))}Mx(Te,o)})}function lu(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Sc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Va(i,c),T!=null&&h.unshift(lu(i,T,E)),T=Va(i,o),T!=null&&h.push(lu(i,T,E))),i=i.return}return h}function ko(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Bx(i,o,c,h,E){for(var T=o._reactName,v=[];c!==null&&c!==h;){var F=c,$=F.alternate,Z=F.stateNode;if($!==null&&$===h)break;F.tag===5&&Z!==null&&(F=Z,E?($=Va(c,T),$!=null&&v.unshift(lu(c,$,F))):E||($=Va(c,T),$!=null&&v.push(lu(c,$,F)))),c=c.return}v.length!==0&&i.push({event:o,listeners:v})}var KB=/\r\n?/g,JB=/\u0000|\uFFFD/g;function Ux(i){return(typeof i=="string"?i:""+i).replace(KB,`
21
- `).replace(JB,"")}function vc(i,o,c){if(o=Ux(o),Ux(i)!==o&&c)throw Error(n(425))}function Ac(){}var Jp=null,Zp=null;function em(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var tm=typeof setTimeout=="function"?setTimeout:void 0,ZB=typeof clearTimeout=="function"?clearTimeout:void 0,Hx=typeof Promise=="function"?Promise:void 0,e7=typeof queueMicrotask=="function"?queueMicrotask:typeof Hx!="undefined"?function(i){return Hx.resolve(null).then(i).catch(t7)}:tm;function t7(i){setTimeout(function(){throw i})}function nm(i,o){var c=o,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),Za(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);Za(o)}function Ci(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function jx(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}var No=Math.random().toString(36).slice(2),Fr="__reactFiber$"+No,cu="__reactProps$"+No,Jr="__reactContainer$"+No,rm="__reactEvents$"+No,n7="__reactListeners$"+No,r7="__reactHandles$"+No;function Es(i){var o=i[Fr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Jr]||c[Fr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=jx(i);i!==null;){if(c=i[Fr])return c;i=jx(i)}return o}i=c,c=i.parentNode}return null}function du(i){return i=i[Fr]||i[Jr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Oo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Cc(i){return i[cu]||null}var im=[],Io=-1;function ki(i){return{current:i}}function At(i){0>Io||(i.current=im[Io],im[Io]=null,Io--)}function bt(i,o){Io++,im[Io]=i.current,i.current=o}var Ni={},pn=ki(Ni),Ln=ki(!1),ys=Ni;function Po(i,o){var c=i.type.contextTypes;if(!c)return Ni;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in c)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Dn(i){return i=i.childContextTypes,i!=null}function kc(){At(Ln),At(pn)}function zx(i,o,c){if(pn.current!==Ni)throw Error(n(168));bt(pn,o),bt(Ln,c)}function $x(i,o,c){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Ie(i)||"Unknown",E));return C({},c,h)}function Nc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ni,ys=pn.current,bt(pn,i),bt(Ln,Ln.current),!0}function Vx(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=$x(i,o,ys),h.__reactInternalMemoizedMergedChildContext=i,At(Ln),At(pn),bt(pn,i)):At(Ln),bt(Ln,c)}var Zr=null,Oc=!1,sm=!1;function qx(i){Zr===null?Zr=[i]:Zr.push(i)}function i7(i){Oc=!0,qx(i)}function Oi(){if(!sm&&Zr!==null){sm=!0;var i=0,o=mt;try{var c=Zr;for(mt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Zr=null,Oc=!1}catch(E){throw Zr!==null&&(Zr=Zr.slice(i+1)),Ww(Cp,Oi),E}finally{mt=o,sm=!1}}return null}var Ro=[],Lo=0,Ic=null,Pc=0,Jn=[],Zn=0,Ts=null,ei=1,ti="";function bs(i,o){Ro[Lo++]=Pc,Ro[Lo++]=Ic,Ic=i,Pc=o}function Yx(i,o,c){Jn[Zn++]=ei,Jn[Zn++]=ti,Jn[Zn++]=Ts,Ts=i;var h=ei;i=ti;var E=32-pr(h)-1;h&=~(1<<E),c+=1;var T=32-pr(o)+E;if(30<T){var v=E-E%5;T=(h&(1<<v)-1).toString(32),h>>=v,E-=v,ei=1<<32-pr(o)+E|c<<E|h,ti=T+i}else ei=1<<T|c<<E|h,ti=i}function om(i){i.return!==null&&(bs(i,1),Yx(i,1,0))}function am(i){for(;i===Ic;)Ic=Ro[--Lo],Ro[Lo]=null,Pc=Ro[--Lo],Ro[Lo]=null;for(;i===Ts;)Ts=Jn[--Zn],Jn[Zn]=null,ti=Jn[--Zn],Jn[Zn]=null,ei=Jn[--Zn],Jn[Zn]=null}var qn=null,Yn=null,Nt=!1,gr=null;function Wx(i,o){var c=rr(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=i,o=i.deletions,o===null?(i.deletions=[c],i.flags|=16):o.push(c)}function Gx(i,o){switch(i.tag){case 5:var c=i.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,qn=i,Yn=Ci(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,qn=i,Yn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=Ts!==null?{id:ei,overflow:ti}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=rr(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,qn=i,Yn=null,!0):!1;default:return!1}}function um(i){return(i.mode&1)!==0&&(i.flags&128)===0}function lm(i){if(Nt){var o=Yn;if(o){var c=o;if(!Gx(i,o)){if(um(i))throw Error(n(418));o=Ci(c.nextSibling);var h=qn;o&&Gx(i,o)?Wx(h,c):(i.flags=i.flags&-4097|2,Nt=!1,qn=i)}}else{if(um(i))throw Error(n(418));i.flags=i.flags&-4097|2,Nt=!1,qn=i}}}function Xx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;qn=i}function Rc(i){if(i!==qn)return!1;if(!Nt)return Xx(i),Nt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!em(i.type,i.memoizedProps)),o&&(o=Yn)){if(um(i))throw Qx(),Error(n(418));for(;o;)Wx(i,o),o=Ci(o.nextSibling)}if(Xx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(o===0){Yn=Ci(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Yn=null}}else Yn=qn?Ci(i.stateNode.nextSibling):null;return!0}function Qx(){for(var i=Yn;i;)i=Ci(i.nextSibling)}function Do(){Yn=qn=null,Nt=!1}function cm(i){gr===null?gr=[i]:gr.push(i)}var s7=z.ReactCurrentBatchConfig;function fu(i,o,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(v){var F=E.refs;v===null?delete F[T]:F[T]=v},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Lc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Kx(i){var o=i._init;return o(i._payload)}function Jx(i){function o(X,q){if(i){var K=X.deletions;K===null?(X.deletions=[q],X.flags|=16):K.push(q)}}function c(X,q){if(!i)return null;for(;q!==null;)o(X,q),q=q.sibling;return null}function h(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function E(X,q){return X=Bi(X,q),X.index=0,X.sibling=null,X}function T(X,q,K){return X.index=K,i?(K=X.alternate,K!==null?(K=K.index,K<q?(X.flags|=2,q):K):(X.flags|=2,q)):(X.flags|=1048576,q)}function v(X){return i&&X.alternate===null&&(X.flags|=2),X}function F(X,q,K,we){return q===null||q.tag!==6?(q=t0(K,X.mode,we),q.return=X,q):(q=E(q,K),q.return=X,q)}function $(X,q,K,we){var Fe=K.type;return Fe===V?ge(X,q,K.props.children,we,K.key):q!==null&&(q.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===ve&&Kx(Fe)===q.type)?(we=E(q,K.props),we.ref=fu(X,q,K),we.return=X,we):(we=id(K.type,K.key,K.props,null,X.mode,we),we.ref=fu(X,q,K),we.return=X,we)}function Z(X,q,K,we){return q===null||q.tag!==4||q.stateNode.containerInfo!==K.containerInfo||q.stateNode.implementation!==K.implementation?(q=n0(K,X.mode,we),q.return=X,q):(q=E(q,K.children||[]),q.return=X,q)}function ge(X,q,K,we,Fe){return q===null||q.tag!==7?(q=ks(K,X.mode,we,Fe),q.return=X,q):(q=E(q,K),q.return=X,q)}function Te(X,q,K){if(typeof q=="string"&&q!==""||typeof q=="number")return q=t0(""+q,X.mode,K),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case W:return K=id(q.type,q.key,q.props,null,X.mode,K),K.ref=fu(X,null,q),K.return=X,K;case D:return q=n0(q,X.mode,K),q.return=X,q;case ve:var we=q._init;return Te(X,we(q._payload),K)}if(ht(q)||se(q))return q=ks(q,X.mode,K,null),q.return=X,q;Lc(X,q)}return null}function he(X,q,K,we){var Fe=q!==null?q.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Fe!==null?null:F(X,q,""+K,we);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case W:return K.key===Fe?$(X,q,K,we):null;case D:return K.key===Fe?Z(X,q,K,we):null;case ve:return Fe=K._init,he(X,q,Fe(K._payload),we)}if(ht(K)||se(K))return Fe!==null?null:ge(X,q,K,we,null);Lc(X,K)}return null}function Pe(X,q,K,we,Fe){if(typeof we=="string"&&we!==""||typeof we=="number")return X=X.get(K)||null,F(q,X,""+we,Fe);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case W:return X=X.get(we.key===null?K:we.key)||null,$(q,X,we,Fe);case D:return X=X.get(we.key===null?K:we.key)||null,Z(q,X,we,Fe);case ve:var qe=we._init;return Pe(X,q,K,qe(we._payload),Fe)}if(ht(we)||se(we))return X=X.get(K)||null,ge(q,X,we,Fe,null);Lc(q,we)}return null}function Le(X,q,K,we){for(var Fe=null,qe=null,Ye=q,Ke=q=0,tn=null;Ye!==null&&Ke<K.length;Ke++){Ye.index>Ke?(tn=Ye,Ye=null):tn=Ye.sibling;var ct=he(X,Ye,K[Ke],we);if(ct===null){Ye===null&&(Ye=tn);break}i&&Ye&&ct.alternate===null&&o(X,Ye),q=T(ct,q,Ke),qe===null?Fe=ct:qe.sibling=ct,qe=ct,Ye=tn}if(Ke===K.length)return c(X,Ye),Nt&&bs(X,Ke),Fe;if(Ye===null){for(;Ke<K.length;Ke++)Ye=Te(X,K[Ke],we),Ye!==null&&(q=T(Ye,q,Ke),qe===null?Fe=Ye:qe.sibling=Ye,qe=Ye);return Nt&&bs(X,Ke),Fe}for(Ye=h(X,Ye);Ke<K.length;Ke++)tn=Pe(Ye,X,Ke,K[Ke],we),tn!==null&&(i&&tn.alternate!==null&&Ye.delete(tn.key===null?Ke:tn.key),q=T(tn,q,Ke),qe===null?Fe=tn:qe.sibling=tn,qe=tn);return i&&Ye.forEach(function(Ui){return o(X,Ui)}),Nt&&bs(X,Ke),Fe}function De(X,q,K,we){var Fe=se(K);if(typeof Fe!="function")throw Error(n(150));if(K=Fe.call(K),K==null)throw Error(n(151));for(var qe=Fe=null,Ye=q,Ke=q=0,tn=null,ct=K.next();Ye!==null&&!ct.done;Ke++,ct=K.next()){Ye.index>Ke?(tn=Ye,Ye=null):tn=Ye.sibling;var Ui=he(X,Ye,ct.value,we);if(Ui===null){Ye===null&&(Ye=tn);break}i&&Ye&&Ui.alternate===null&&o(X,Ye),q=T(Ui,q,Ke),qe===null?Fe=Ui:qe.sibling=Ui,qe=Ui,Ye=tn}if(ct.done)return c(X,Ye),Nt&&bs(X,Ke),Fe;if(Ye===null){for(;!ct.done;Ke++,ct=K.next())ct=Te(X,ct.value,we),ct!==null&&(q=T(ct,q,Ke),qe===null?Fe=ct:qe.sibling=ct,qe=ct);return Nt&&bs(X,Ke),Fe}for(Ye=h(X,Ye);!ct.done;Ke++,ct=K.next())ct=Pe(Ye,X,Ke,ct.value,we),ct!==null&&(i&&ct.alternate!==null&&Ye.delete(ct.key===null?Ke:ct.key),q=T(ct,q,Ke),qe===null?Fe=ct:qe.sibling=ct,qe=ct);return i&&Ye.forEach(function(B7){return o(X,B7)}),Nt&&bs(X,Ke),Fe}function Ht(X,q,K,we){if(typeof K=="object"&&K!==null&&K.type===V&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case W:e:{for(var Fe=K.key,qe=q;qe!==null;){if(qe.key===Fe){if(Fe=K.type,Fe===V){if(qe.tag===7){c(X,qe.sibling),q=E(qe,K.props.children),q.return=X,X=q;break e}}else if(qe.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===ve&&Kx(Fe)===qe.type){c(X,qe.sibling),q=E(qe,K.props),q.ref=fu(X,qe,K),q.return=X,X=q;break e}c(X,qe);break}else o(X,qe);qe=qe.sibling}K.type===V?(q=ks(K.props.children,X.mode,we,K.key),q.return=X,X=q):(we=id(K.type,K.key,K.props,null,X.mode,we),we.ref=fu(X,q,K),we.return=X,X=we)}return v(X);case D:e:{for(qe=K.key;q!==null;){if(q.key===qe)if(q.tag===4&&q.stateNode.containerInfo===K.containerInfo&&q.stateNode.implementation===K.implementation){c(X,q.sibling),q=E(q,K.children||[]),q.return=X,X=q;break e}else{c(X,q);break}else o(X,q);q=q.sibling}q=n0(K,X.mode,we),q.return=X,X=q}return v(X);case ve:return qe=K._init,Ht(X,q,qe(K._payload),we)}if(ht(K))return Le(X,q,K,we);if(se(K))return De(X,q,K,we);Lc(X,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,q!==null&&q.tag===6?(c(X,q.sibling),q=E(q,K),q.return=X,X=q):(c(X,q),q=t0(K,X.mode,we),q.return=X,X=q),v(X)):c(X,q)}return Ht}var Mo=Jx(!0),Zx=Jx(!1),Dc=ki(null),Mc=null,Fo=null,dm=null;function fm(){dm=Fo=Mc=null}function hm(i){var o=Dc.current;At(Dc),i._currentValue=o}function pm(i,o,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===c)break;i=i.return}}function Bo(i,o){Mc=i,dm=Fo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Mn=!0),i.firstContext=null)}function er(i){var o=i._currentValue;if(dm!==i)if(i={context:i,memoizedValue:o,next:null},Fo===null){if(Mc===null)throw Error(n(308));Fo=i,Mc.dependencies={lanes:0,firstContext:i}}else Fo=Fo.next=i;return o}var ws=null;function mm(i){ws===null?ws=[i]:ws.push(i)}function e_(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,mm(o)):(c.next=E.next,E.next=c),o.interleaved=c,ni(i,h)}function ni(i,o){i.lanes|=o;var c=i.alternate;for(c!==null&&(c.lanes|=o),c=i,i=i.return;i!==null;)i.childLanes|=o,c=i.alternate,c!==null&&(c.childLanes|=o),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Ii=!1;function gm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function t_(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function ri(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Pi(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ut&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,ni(i,c)}return E=h.interleaved,E===null?(o.next=o,mm(h)):(o.next=E.next,E.next=o),h.interleaved=o,ni(i,c)}function Fc(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,Op(i,c)}}function n_(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var v={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};T===null?E=T=v:T=T.next=v,c=c.next}while(c!==null);T===null?E=T=o:T=T.next=o}else E=T=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Bc(i,o,c,h){var E=i.updateQueue;Ii=!1;var T=E.firstBaseUpdate,v=E.lastBaseUpdate,F=E.shared.pending;if(F!==null){E.shared.pending=null;var $=F,Z=$.next;$.next=null,v===null?T=Z:v.next=Z,v=$;var ge=i.alternate;ge!==null&&(ge=ge.updateQueue,F=ge.lastBaseUpdate,F!==v&&(F===null?ge.firstBaseUpdate=Z:F.next=Z,ge.lastBaseUpdate=$))}if(T!==null){var Te=E.baseState;v=0,ge=Z=$=null,F=T;do{var he=F.lane,Pe=F.eventTime;if((h&he)===he){ge!==null&&(ge=ge.next={eventTime:Pe,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var Le=i,De=F;switch(he=o,Pe=c,De.tag){case 1:if(Le=De.payload,typeof Le=="function"){Te=Le.call(Pe,Te,he);break e}Te=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=De.payload,he=typeof Le=="function"?Le.call(Pe,Te,he):Le,he==null)break e;Te=C({},Te,he);break e;case 2:Ii=!0}}F.callback!==null&&F.lane!==0&&(i.flags|=64,he=E.effects,he===null?E.effects=[F]:he.push(F))}else Pe={eventTime:Pe,lane:he,tag:F.tag,payload:F.payload,callback:F.callback,next:null},ge===null?(Z=ge=Pe,$=Te):ge=ge.next=Pe,v|=he;if(F=F.next,F===null){if(F=E.shared.pending,F===null)break;he=F,F=he.next,he.next=null,E.lastBaseUpdate=he,E.shared.pending=null}}while(!0);if(ge===null&&($=Te),E.baseState=$,E.firstBaseUpdate=Z,E.lastBaseUpdate=ge,o=E.shared.interleaved,o!==null){E=o;do v|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);Ss|=v,i.lanes=v,i.memoizedState=Te}}function r_(i,o,c){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var hu={},Br=ki(hu),pu=ki(hu),mu=ki(hu);function xs(i){if(i===hu)throw Error(n(174));return i}function Em(i,o){switch(bt(mu,o),bt(pu,i),bt(Br,hu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}At(Br),bt(Br,o)}function Uo(){At(Br),At(pu),At(mu)}function i_(i){xs(mu.current);var o=xs(Br.current),c=xe(o,i.type);o!==c&&(bt(pu,i),bt(Br,c))}function ym(i){pu.current===i&&(At(Br),At(pu))}var Ot=ki(0);function Uc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Tm=[];function bm(){for(var i=0;i<Tm.length;i++)Tm[i]._workInProgressVersionPrimary=null;Tm.length=0}var Hc=z.ReactCurrentDispatcher,wm=z.ReactCurrentBatchConfig,_s=0,It=null,Wt=null,Zt=null,jc=!1,gu=!1,Eu=0,o7=0;function mn(){throw Error(n(321))}function xm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!mr(i[c],o[c]))return!1;return!0}function _m(i,o,c,h,E,T){if(_s=T,It=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Hc.current=i===null||i.memoizedState===null?c7:d7,i=c(h,E),gu){T=0;do{if(gu=!1,Eu=0,25<=T)throw Error(n(301));T+=1,Zt=Wt=null,o.updateQueue=null,Hc.current=f7,i=c(h,E)}while(gu)}if(Hc.current=Vc,o=Wt!==null&&Wt.next!==null,_s=0,Zt=Wt=It=null,jc=!1,o)throw Error(n(300));return i}function Sm(){var i=Eu!==0;return Eu=0,i}function Ur(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?It.memoizedState=Zt=i:Zt=Zt.next=i,Zt}function tr(){if(Wt===null){var i=It.alternate;i=i!==null?i.memoizedState:null}else i=Wt.next;var o=Zt===null?It.memoizedState:Zt.next;if(o!==null)Zt=o,Wt=i;else{if(i===null)throw Error(n(310));Wt=i,i={memoizedState:Wt.memoizedState,baseState:Wt.baseState,baseQueue:Wt.baseQueue,queue:Wt.queue,next:null},Zt===null?It.memoizedState=Zt=i:Zt=Zt.next=i}return Zt}function yu(i,o){return typeof o=="function"?o(i):o}function vm(i){var o=tr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Wt,E=h.baseQueue,T=c.pending;if(T!==null){if(E!==null){var v=E.next;E.next=T.next,T.next=v}h.baseQueue=E=T,c.pending=null}if(E!==null){T=E.next,h=h.baseState;var F=v=null,$=null,Z=T;do{var ge=Z.lane;if((_s&ge)===ge)$!==null&&($=$.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var Te={lane:ge,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};$===null?(F=$=Te,v=h):$=$.next=Te,It.lanes|=ge,Ss|=ge}Z=Z.next}while(Z!==null&&Z!==T);$===null?v=h:$.next=F,mr(h,o.memoizedState)||(Mn=!0),o.memoizedState=h,o.baseState=v,o.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do T=E.lane,It.lanes|=T,Ss|=T,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Am(i){var o=tr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,T=o.memoizedState;if(E!==null){c.pending=null;var v=E=E.next;do T=i(T,v.action),v=v.next;while(v!==E);mr(T,o.memoizedState)||(Mn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),c.lastRenderedState=T}return[T,h]}function s_(){}function o_(i,o){var c=It,h=tr(),E=o(),T=!mr(h.memoizedState,E);if(T&&(h.memoizedState=E,Mn=!0),h=h.queue,Cm(l_.bind(null,c,h,i),[i]),h.getSnapshot!==o||T||Zt!==null&&Zt.memoizedState.tag&1){if(c.flags|=2048,Tu(9,u_.bind(null,c,h,E,o),void 0,null),en===null)throw Error(n(349));(_s&30)!==0||a_(c,o,E)}return E}function a_(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=It.updateQueue,o===null?(o={lastEffect:null,stores:null},It.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function u_(i,o,c,h){o.value=c,o.getSnapshot=h,c_(o)&&d_(i)}function l_(i,o,c){return c(function(){c_(o)&&d_(i)})}function c_(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!mr(i,c)}catch(h){return!0}}function d_(i){var o=ni(i,1);o!==null&&br(o,i,1,-1)}function f_(i){var o=Ur();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yu,lastRenderedState:i},o.queue=i,i=i.dispatch=l7.bind(null,It,i),[o.memoizedState,i]}function Tu(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=It.updateQueue,o===null?(o={lastEffect:null,stores:null},It.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,o.lastEffect=i)),i}function h_(){return tr().memoizedState}function zc(i,o,c,h){var E=Ur();It.flags|=i,E.memoizedState=Tu(1|o,c,void 0,h===void 0?null:h)}function $c(i,o,c,h){var E=tr();h=h===void 0?null:h;var T=void 0;if(Wt!==null){var v=Wt.memoizedState;if(T=v.destroy,h!==null&&xm(h,v.deps)){E.memoizedState=Tu(o,c,T,h);return}}It.flags|=i,E.memoizedState=Tu(1|o,c,T,h)}function p_(i,o){return zc(8390656,8,i,o)}function Cm(i,o){return $c(2048,8,i,o)}function m_(i,o){return $c(4,2,i,o)}function g_(i,o){return $c(4,4,i,o)}function E_(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function y_(i,o,c){return c=c!=null?c.concat([i]):null,$c(4,4,E_.bind(null,o,i),c)}function km(){}function T_(i,o){var c=tr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&xm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function b_(i,o){var c=tr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&xm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function w_(i,o,c){return(_s&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=c):(mr(c,o)||(c=Kw(),It.lanes|=c,Ss|=c,i.baseState=!0),o)}function a7(i,o){var c=mt;mt=c!==0&&4>c?c:4,i(!0);var h=wm.transition;wm.transition={};try{i(!1),o()}finally{mt=c,wm.transition=h}}function x_(){return tr().memoizedState}function u7(i,o,c){var h=Mi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},__(i))S_(o,c);else if(c=e_(i,o,c,h),c!==null){var E=_n();br(c,i,h,E),v_(c,o,h)}}function l7(i,o,c){var h=Mi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(__(i))S_(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var v=o.lastRenderedState,F=T(v,c);if(E.hasEagerState=!0,E.eagerState=F,mr(F,v)){var $=o.interleaved;$===null?(E.next=E,mm(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(Z){}c=e_(i,o,E,h),c!==null&&(E=_n(),br(c,i,h,E),v_(c,o,h))}}function __(i){var o=i.alternate;return i===It||o!==null&&o===It}function S_(i,o){gu=jc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function v_(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,Op(i,c)}}var Vc={readContext:er,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useInsertionEffect:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useSyncExternalStore:mn,useId:mn,unstable_isNewReconciler:!1},c7={readContext:er,useCallback:function(i,o){return Ur().memoizedState=[i,o===void 0?null:o],i},useContext:er,useEffect:p_,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,zc(4194308,4,E_.bind(null,o,i),c)},useLayoutEffect:function(i,o){return zc(4194308,4,i,o)},useInsertionEffect:function(i,o){return zc(4,2,i,o)},useMemo:function(i,o){var c=Ur();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Ur();return o=c!==void 0?c(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=u7.bind(null,It,i),[h.memoizedState,i]},useRef:function(i){var o=Ur();return i={current:i},o.memoizedState=i},useState:f_,useDebugValue:km,useDeferredValue:function(i){return Ur().memoizedState=i},useTransition:function(){var i=f_(!1),o=i[0];return i=a7.bind(null,i[1]),Ur().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=It,E=Ur();if(Nt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),en===null)throw Error(n(349));(_s&30)!==0||a_(h,o,c)}E.memoizedState=c;var T={value:c,getSnapshot:o};return E.queue=T,p_(l_.bind(null,h,T,i),[i]),h.flags|=2048,Tu(9,u_.bind(null,h,T,c,o),void 0,null),c},useId:function(){var i=Ur(),o=en.identifierPrefix;if(Nt){var c=ti,h=ei;c=(h&~(1<<32-pr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=Eu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=o7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},d7={readContext:er,useCallback:T_,useContext:er,useEffect:Cm,useImperativeHandle:y_,useInsertionEffect:m_,useLayoutEffect:g_,useMemo:b_,useReducer:vm,useRef:h_,useState:function(){return vm(yu)},useDebugValue:km,useDeferredValue:function(i){var o=tr();return w_(o,Wt.memoizedState,i)},useTransition:function(){var i=vm(yu)[0],o=tr().memoizedState;return[i,o]},useMutableSource:s_,useSyncExternalStore:o_,useId:x_,unstable_isNewReconciler:!1},f7={readContext:er,useCallback:T_,useContext:er,useEffect:Cm,useImperativeHandle:y_,useInsertionEffect:m_,useLayoutEffect:g_,useMemo:b_,useReducer:Am,useRef:h_,useState:function(){return Am(yu)},useDebugValue:km,useDeferredValue:function(i){var o=tr();return Wt===null?o.memoizedState=i:w_(o,Wt.memoizedState,i)},useTransition:function(){var i=Am(yu)[0],o=tr().memoizedState;return[i,o]},useMutableSource:s_,useSyncExternalStore:o_,useId:x_,unstable_isNewReconciler:!1};function Er(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Nm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:C({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var qc={isMounted:function(i){return(i=i._reactInternals)?gs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=_n(),E=Mi(i),T=ri(h,E);T.payload=o,c!=null&&(T.callback=c),o=Pi(i,T,E),o!==null&&(br(o,i,E,h),Fc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=_n(),E=Mi(i),T=ri(h,E);T.tag=1,T.payload=o,c!=null&&(T.callback=c),o=Pi(i,T,E),o!==null&&(br(o,i,E,h),Fc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=_n(),h=Mi(i),E=ri(c,h);E.tag=2,o!=null&&(E.callback=o),o=Pi(i,E,h),o!==null&&(br(o,i,h,c),Fc(o,i,h))}};function A_(i,o,c,h,E,T,v){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,v):o.prototype&&o.prototype.isPureReactComponent?!su(c,h)||!su(E,T):!0}function C_(i,o,c){var h=!1,E=Ni,T=o.contextType;return typeof T=="object"&&T!==null?T=er(T):(E=Dn(o)?ys:pn.current,h=o.contextTypes,T=(h=h!=null)?Po(i,E):Ni),o=new o(c,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=qc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function k_(i,o,c,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==i&&qc.enqueueReplaceState(o,o.state,null)}function Om(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},gm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=er(T):(T=Dn(o)?ys:pn.current,E.context=Po(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Nm(i,o,T,c),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&qc.enqueueReplaceState(E,E.state,null),Bc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Ho(i,o){try{var c="",h=o;do c+=Ae(h),h=h.return;while(h);var E=c}catch(T){E=`
20
+ `+E[v].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=v&&0<=F);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?J(i):""}function ve(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function me(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case V:return"Fragment";case D:return"Portal";case ce:return"Profiler";case ee:return"StrictMode";case ue:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case te:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return o=i.displayName||null,o!==null?o:me(i.type)||"Memo";case Se:o=i._payload,i=i._init;try{return me(i(o))}catch(c){}}return null}function Ie(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(o);case 8:return o===ee?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Fe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ge(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function st(i){var o=Ge(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,T=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(v){h=""+v,T.call(this,v)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(v){h=""+v},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function St(i){i._valueTracker||(i._valueTracker=st(i))}function Lt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=Ge(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function pn(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function xn(i,o){var c=o.checked;return k({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Dt(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Fe(o.value!=null?o.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function ze(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function Oe(i,o){ze(i,o);var c=Fe(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?tt(i,o.type,c):o.hasOwnProperty("defaultValue")&&tt(i,o.type,Fe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Xe(i,o,c){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,c||o===i.value||(i.value=o),i.defaultValue=o}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function tt(i,o,c){(o!=="number"||pn(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var pt=Array.isArray;function Mt(i,o,c,h){if(i=i.options,o){o={};for(var E=0;E<c.length;E++)o["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=o.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Fe(c),o=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Ln(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function gs(i,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(pt(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Fe(c)}}function Es(i,o){var c=Fe(o.value),h=Fe(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function ys(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function oe(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?oe(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var $e,Ze=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for($e=$e||document.createElement("div"),$e.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=$e.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function at(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var re={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ae=["Webkit","ms","Moz","O"];Object.keys(re).forEach(function(i){Ae.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),re[o]=re[i]})});function ke(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||re.hasOwnProperty(i)&&re[i]?(""+o).trim():o+"px"}function Ce(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=ke(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ye=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Le(i,o){if(o){if(ye[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function et(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ot=null;function Wt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Mr=null,Jr=null,Zr=null;function Uw(i){if(i=fu(i)){if(typeof Mr!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Cc(o),Mr(i.stateNode,i.type,o))}}function Hw(i){Jr?Zr?Zr.push(i):Zr=[i]:Jr=i}function jw(){if(Jr){var i=Jr,o=Zr;if(Zr=Jr=null,Uw(i),o)for(i=0;i<o.length;i++)Uw(o[i])}}function zw(i,o){return i(o)}function $w(){}var vp=!1;function Vw(i,o,c){if(vp)return i(o,c);vp=!0;try{return zw(i,o,c)}finally{vp=!1,(Jr!==null||Zr!==null)&&($w(),jw())}}function qa(i,o){var c=i.stateNode;if(c===null)return null;var h=Cc(c);if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var Ap=!1;if(l)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){Ap=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch(i){Ap=!1}function KF(i,o,c,h,E,T,v,F,$){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(ge){this.onError(ge)}}var Wa=!1,oc=null,ac=!1,kp=null,QF={onError:function(i){Wa=!0,oc=i}};function JF(i,o,c,h,E,T,v,F,$){Wa=!1,oc=null,KF.apply(QF,arguments)}function ZF(i,o,c,h,E,T,v,F,$){if(JF.apply(this,arguments),Wa){if(Wa){var Z=oc;Wa=!1,oc=null}else throw Error(n(198));ac||(ac=!0,kp=Z)}}function Ts(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function qw(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function Yw(i){if(Ts(i)!==i)throw Error(n(188))}function eB(i){var o=i.alternate;if(!o){if(o=Ts(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,h=o;;){var E=c.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return Yw(E),i;if(T===h)return Yw(E),o;T=T.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=T;else{for(var v=!1,F=E.child;F;){if(F===c){v=!0,c=E,h=T;break}if(F===h){v=!0,h=E,c=T;break}F=F.sibling}if(!v){for(F=T.child;F;){if(F===c){v=!0,c=T,h=E;break}if(F===h){v=!0,h=T,c=E;break}F=F.sibling}if(!v)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function Ww(i){return i=eB(i),i!==null?Gw(i):null}function Gw(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Gw(i);if(o!==null)return o;i=i.sibling}return null}var Xw=t.unstable_scheduleCallback,Kw=t.unstable_cancelCallback,tB=t.unstable_shouldYield,nB=t.unstable_requestPaint,Ht=t.unstable_now,rB=t.unstable_getCurrentPriorityLevel,Cp=t.unstable_ImmediatePriority,Qw=t.unstable_UserBlockingPriority,uc=t.unstable_NormalPriority,iB=t.unstable_LowPriority,Jw=t.unstable_IdlePriority,lc=null,Fr=null;function sB(i){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(lc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var mr=Math.clz32?Math.clz32:uB,oB=Math.log,aB=Math.LN2;function uB(i){return i>>>=0,i===0?32:31-(oB(i)/aB|0)|0}var cc=64,dc=4194304;function Ga(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function fc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,v=c&268435455;if(v!==0){var F=v&~E;F!==0?h=Ga(F):(T&=v,T!==0&&(h=Ga(T)))}else v=c&~E,v!==0?h=Ga(v):T!==0&&(h=Ga(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-mr(o),E=1<<c,h|=i[c],o&=~E;return h}function lB(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cB(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var v=31-mr(T),F=1<<v,$=E[v];$===-1?((F&c)===0||(F&h)!==0)&&(E[v]=lB(F,o)):$<=o&&(i.expiredLanes|=F),T&=~F}}function Np(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Zw(){var i=cc;return cc<<=1,(cc&4194240)===0&&(cc=64),i}function Op(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Xa(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-mr(o),i[o]=c}function dB(i,o){var c=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-mr(c),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~T}}function Ip(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-mr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var mt=0;function ex(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var tx,Pp,nx,rx,ix,Rp=!1,hc=[],_i=null,Si=null,vi=null,Ka=new Map,Qa=new Map,Ai=[],fB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function sx(i,o){switch(i){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":Ka.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qa.delete(o.pointerId)}}function Ja(i,o,c,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=fu(o),o!==null&&Pp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function hB(i,o,c,h,E){switch(o){case"focusin":return _i=Ja(_i,i,o,c,h,E),!0;case"dragenter":return Si=Ja(Si,i,o,c,h,E),!0;case"mouseover":return vi=Ja(vi,i,o,c,h,E),!0;case"pointerover":var T=E.pointerId;return Ka.set(T,Ja(Ka.get(T)||null,i,o,c,h,E)),!0;case"gotpointercapture":return T=E.pointerId,Qa.set(T,Ja(Qa.get(T)||null,i,o,c,h,E)),!0}return!1}function ox(i){var o=bs(i.target);if(o!==null){var c=Ts(o);if(c!==null){if(o=c.tag,o===13){if(o=qw(c),o!==null){i.blockedOn=o,ix(i.priority,function(){nx(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function pc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Dp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Ot=h,c.target.dispatchEvent(h),Ot=null}else return o=fu(c),o!==null&&Pp(o),i.blockedOn=c,!1;o.shift()}return!0}function ax(i,o,c){pc(i)&&c.delete(o)}function pB(){Rp=!1,_i!==null&&pc(_i)&&(_i=null),Si!==null&&pc(Si)&&(Si=null),vi!==null&&pc(vi)&&(vi=null),Ka.forEach(ax),Qa.forEach(ax)}function Za(i,o){i.blockedOn===o&&(i.blockedOn=null,Rp||(Rp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,pB)))}function eu(i){function o(E){return Za(E,i)}if(0<hc.length){Za(hc[0],i);for(var c=1;c<hc.length;c++){var h=hc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(_i!==null&&Za(_i,i),Si!==null&&Za(Si,i),vi!==null&&Za(vi,i),Ka.forEach(o),Qa.forEach(o),c=0;c<Ai.length;c++)h=Ai[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ai.length&&(c=Ai[0],c.blockedOn===null);)ox(c),c.blockedOn===null&&Ai.shift()}var So=z.ReactCurrentBatchConfig,mc=!0;function mB(i,o,c,h){var E=mt,T=So.transition;So.transition=null;try{mt=1,Lp(i,o,c,h)}finally{mt=E,So.transition=T}}function gB(i,o,c,h){var E=mt,T=So.transition;So.transition=null;try{mt=4,Lp(i,o,c,h)}finally{mt=E,So.transition=T}}function Lp(i,o,c,h){if(mc){var E=Dp(i,o,c,h);if(E===null)Jp(i,o,h,gc,c),sx(i,h);else if(hB(E,i,o,c,h))h.stopPropagation();else if(sx(i,h),o&4&&-1<fB.indexOf(i)){for(;E!==null;){var T=fu(E);if(T!==null&&tx(T),T=Dp(i,o,c,h),T===null&&Jp(i,o,h,gc,c),T===E)break;E=T}E!==null&&h.stopPropagation()}else Jp(i,o,h,null,c)}}var gc=null;function Dp(i,o,c,h){if(gc=null,i=Wt(h),i=bs(i),i!==null)if(o=Ts(i),o===null)i=null;else if(c=o.tag,c===13){if(i=qw(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return gc=i,null}function ux(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(rB()){case Cp:return 1;case Qw:return 4;case uc:case iB:return 16;case Jw:return 536870912;default:return 16}default:return 16}}var ki=null,Mp=null,Ec=null;function lx(){if(Ec)return Ec;var i,o=Mp,c=o.length,h,E="value"in ki?ki.value:ki.textContent,T=E.length;for(i=0;i<c&&o[i]===E[i];i++);var v=c-i;for(h=1;h<=v&&o[c-h]===E[T-h];h++);return Ec=E.slice(i,1<h?1-h:void 0)}function yc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Tc(){return!0}function cx(){return!1}function qn(i){function o(c,h,E,T,v){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=v,this.currentTarget=null;for(var F in i)i.hasOwnProperty(F)&&(c=i[F],this[F]=c?c(T):T[F]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Tc:cx,this.isPropagationStopped=cx,this}return k(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Tc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Tc)},persist:function(){},isPersistent:Tc}),o}var vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fp=qn(vo),tu=k({},vo,{view:0,detail:0}),EB=qn(tu),Bp,Up,nu,bc=k({},tu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==nu&&(nu&&i.type==="mousemove"?(Bp=i.screenX-nu.screenX,Up=i.screenY-nu.screenY):Up=Bp=0,nu=i),Bp)},movementY:function(i){return"movementY"in i?i.movementY:Up}}),dx=qn(bc),yB=k({},bc,{dataTransfer:0}),TB=qn(yB),bB=k({},tu,{relatedTarget:0}),Hp=qn(bB),wB=k({},vo,{animationName:0,elapsedTime:0,pseudoElement:0}),xB=qn(wB),_B=k({},vo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),SB=qn(_B),vB=k({},vo,{data:0}),fx=qn(vB),AB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},CB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function NB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=CB[i])?!!o[i]:!1}function jp(){return NB}var OB=k({},tu,{key:function(i){if(i.key){var o=AB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=yc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?kB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(i){return i.type==="keypress"?yc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?yc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),IB=qn(OB),PB=k({},bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hx=qn(PB),RB=k({},tu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),LB=qn(RB),DB=k({},vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),MB=qn(DB),FB=k({},bc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),BB=qn(FB),UB=[9,13,27,32],zp=l&&"CompositionEvent"in window,ru=null;l&&"documentMode"in document&&(ru=document.documentMode);var HB=l&&"TextEvent"in window&&!ru,px=l&&(!zp||ru&&8<ru&&11>=ru),mx=" ",gx=!1;function Ex(i,o){switch(i){case"keyup":return UB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ao=!1;function jB(i,o){switch(i){case"compositionend":return yx(o);case"keypress":return o.which!==32?null:(gx=!0,mx);case"textInput":return i=o.data,i===mx&&gx?null:i;default:return null}}function zB(i,o){if(Ao)return i==="compositionend"||!zp&&Ex(i,o)?(i=lx(),Ec=Mp=ki=null,Ao=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return px&&o.locale!=="ko"?null:o.data;default:return null}}var $B={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tx(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!$B[i.type]:o==="textarea"}function bx(i,o,c,h){Hw(h),o=vc(o,"onChange"),0<o.length&&(c=new Fp("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var iu=null,su=null;function VB(i){Bx(i,0)}function wc(i){var o=Io(i);if(Lt(o))return i}function qB(i,o){if(i==="change")return o}var wx=!1;if(l){var $p;if(l){var Vp="oninput"in document;if(!Vp){var xx=document.createElement("div");xx.setAttribute("oninput","return;"),Vp=typeof xx.oninput=="function"}$p=Vp}else $p=!1;wx=$p&&(!document.documentMode||9<document.documentMode)}function _x(){iu&&(iu.detachEvent("onpropertychange",Sx),su=iu=null)}function Sx(i){if(i.propertyName==="value"&&wc(su)){var o=[];bx(o,su,i,Wt(i)),Vw(VB,o)}}function YB(i,o,c){i==="focusin"?(_x(),iu=o,su=c,iu.attachEvent("onpropertychange",Sx)):i==="focusout"&&_x()}function WB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return wc(su)}function GB(i,o){if(i==="click")return wc(o)}function XB(i,o){if(i==="input"||i==="change")return wc(o)}function KB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var gr=typeof Object.is=="function"?Object.is:KB;function ou(i,o){if(gr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(o,E)||!gr(i[E],o[E]))return!1}return!0}function vx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Ax(i,o){var c=vx(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=o&&h>=o)return{node:c,offset:o-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=vx(c)}}function kx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?kx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Cx(){for(var i=window,o=pn();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=o.contentWindow;else break;o=pn(i.document)}return o}function qp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function QB(i){var o=Cx(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&kx(c.ownerDocument.documentElement,c)){if(h!==null&&qp(c)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(i,c.value.length);else if(i=(o=c.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=Ax(c,T);var v=Ax(c,h);E&&v&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==v.node||i.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(v.node,v.offset)):(o.setEnd(v.node,v.offset),i.addRange(o)))}}for(o=[],i=c;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)i=o[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var JB=l&&"documentMode"in document&&11>=document.documentMode,ko=null,Yp=null,au=null,Wp=!1;function Nx(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Wp||ko==null||ko!==pn(h)||(h=ko,"selectionStart"in h&&qp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),au&&ou(au,h)||(au=h,h=vc(Yp,"onSelect"),0<h.length&&(o=new Fp("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=ko)))}function xc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Co={animationend:xc("Animation","AnimationEnd"),animationiteration:xc("Animation","AnimationIteration"),animationstart:xc("Animation","AnimationStart"),transitionend:xc("Transition","TransitionEnd")},Gp={},Ox={};l&&(Ox=document.createElement("div").style,"AnimationEvent"in window||(delete Co.animationend.animation,delete Co.animationiteration.animation,delete Co.animationstart.animation),"TransitionEvent"in window||delete Co.transitionend.transition);function _c(i){if(Gp[i])return Gp[i];if(!Co[i])return i;var o=Co[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in Ox)return Gp[i]=o[c];return i}var Ix=_c("animationend"),Px=_c("animationiteration"),Rx=_c("animationstart"),Lx=_c("transitionend"),Dx=new Map,Mx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ci(i,o){Dx.set(i,o),a(o,[i])}for(var Xp=0;Xp<Mx.length;Xp++){var Kp=Mx[Xp],ZB=Kp.toLowerCase(),e7=Kp[0].toUpperCase()+Kp.slice(1);Ci(ZB,"on"+e7)}Ci(Ix,"onAnimationEnd"),Ci(Px,"onAnimationIteration"),Ci(Rx,"onAnimationStart"),Ci("dblclick","onDoubleClick"),Ci("focusin","onFocus"),Ci("focusout","onBlur"),Ci(Lx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),t7=new Set("cancel close invalid load scroll toggle".split(" ").concat(uu));function Fx(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,ZF(h,o,void 0,i),i.currentTarget=null}function Bx(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var v=h.length-1;0<=v;v--){var F=h[v],$=F.instance,Z=F.currentTarget;if(F=F.listener,$!==T&&E.isPropagationStopped())break e;Fx(E,F,Z),T=$}else for(v=0;v<h.length;v++){if(F=h[v],$=F.instance,Z=F.currentTarget,F=F.listener,$!==T&&E.isPropagationStopped())break e;Fx(E,F,Z),T=$}}}if(ac)throw i=kp,ac=!1,kp=null,i}function vt(i,o){var c=o[im];c===void 0&&(c=o[im]=new Set);var h=i+"__bubble";c.has(h)||(Ux(o,i,2,!1),c.add(h))}function Qp(i,o,c){var h=0;o&&(h|=4),Ux(c,i,h,o)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function lu(i){if(!i[Sc]){i[Sc]=!0,r.forEach(function(c){c!=="selectionchange"&&(t7.has(c)||Qp(c,!1,i),Qp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Sc]||(o[Sc]=!0,Qp("selectionchange",!1,o))}}function Ux(i,o,c,h){switch(ux(o)){case 1:var E=mB;break;case 4:E=gB;break;default:E=Lp}c=E.bind(null,o,c,i),E=void 0,!Ap||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,c,{capture:!0,passive:E}):i.addEventListener(o,c,!0):E!==void 0?i.addEventListener(o,c,{passive:E}):i.addEventListener(o,c,!1)}function Jp(i,o,c,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var v=h.tag;if(v===3||v===4){var F=h.stateNode.containerInfo;if(F===E||F.nodeType===8&&F.parentNode===E)break;if(v===4)for(v=h.return;v!==null;){var $=v.tag;if(($===3||$===4)&&($=v.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;v=v.return}for(;F!==null;){if(v=bs(F),v===null)return;if($=v.tag,$===5||$===6){h=T=v;continue e}F=F.parentNode}}h=h.return}Vw(function(){var Z=T,ge=Wt(c),Te=[];e:{var he=Dx.get(i);if(he!==void 0){var Pe=Fp,De=i;switch(i){case"keypress":if(yc(c)===0)break e;case"keydown":case"keyup":Pe=IB;break;case"focusin":De="focus",Pe=Hp;break;case"focusout":De="blur",Pe=Hp;break;case"beforeblur":case"afterblur":Pe=Hp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Pe=dx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pe=TB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pe=LB;break;case Ix:case Px:case Rx:Pe=xB;break;case Lx:Pe=MB;break;case"scroll":Pe=EB;break;case"wheel":Pe=BB;break;case"copy":case"cut":case"paste":Pe=SB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pe=hx}var Me=(o&4)!==0,jt=!Me&&i==="scroll",X=Me?he!==null?he+"Capture":null:he;Me=[];for(var q=Z,Q;q!==null;){Q=q;var we=Q.stateNode;if(Q.tag===5&&we!==null&&(Q=we,X!==null&&(we=qa(q,X),we!=null&&Me.push(cu(q,we,Q)))),jt)break;q=q.return}0<Me.length&&(he=new Pe(he,De,null,c,ge),Te.push({event:he,listeners:Me}))}}if((o&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",Pe=i==="mouseout"||i==="pointerout",he&&c!==Ot&&(De=c.relatedTarget||c.fromElement)&&(bs(De)||De[ei]))break e;if((Pe||he)&&(he=ge.window===ge?ge:(he=ge.ownerDocument)?he.defaultView||he.parentWindow:window,Pe?(De=c.relatedTarget||c.toElement,Pe=Z,De=De?bs(De):null,De!==null&&(jt=Ts(De),De!==jt||De.tag!==5&&De.tag!==6)&&(De=null)):(Pe=null,De=Z),Pe!==De)){if(Me=dx,we="onMouseLeave",X="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Me=hx,we="onPointerLeave",X="onPointerEnter",q="pointer"),jt=Pe==null?he:Io(Pe),Q=De==null?he:Io(De),he=new Me(we,q+"leave",Pe,c,ge),he.target=jt,he.relatedTarget=Q,we=null,bs(ge)===Z&&(Me=new Me(X,q+"enter",De,c,ge),Me.target=Q,Me.relatedTarget=jt,we=Me),jt=we,Pe&&De)t:{for(Me=Pe,X=De,q=0,Q=Me;Q;Q=No(Q))q++;for(Q=0,we=X;we;we=No(we))Q++;for(;0<q-Q;)Me=No(Me),q--;for(;0<Q-q;)X=No(X),Q--;for(;q--;){if(Me===X||X!==null&&Me===X.alternate)break t;Me=No(Me),X=No(X)}Me=null}else Me=null;Pe!==null&&Hx(Te,he,Pe,Me,!1),De!==null&&jt!==null&&Hx(Te,jt,De,Me,!0)}}e:{if(he=Z?Io(Z):window,Pe=he.nodeName&&he.nodeName.toLowerCase(),Pe==="select"||Pe==="input"&&he.type==="file")var Ue=qB;else if(Tx(he))if(wx)Ue=XB;else{Ue=WB;var qe=YB}else(Pe=he.nodeName)&&Pe.toLowerCase()==="input"&&(he.type==="checkbox"||he.type==="radio")&&(Ue=GB);if(Ue&&(Ue=Ue(i,Z))){bx(Te,Ue,c,ge);break e}qe&&qe(i,he,Z),i==="focusout"&&(qe=he._wrapperState)&&qe.controlled&&he.type==="number"&&tt(he,"number",he.value)}switch(qe=Z?Io(Z):window,i){case"focusin":(Tx(qe)||qe.contentEditable==="true")&&(ko=qe,Yp=Z,au=null);break;case"focusout":au=Yp=ko=null;break;case"mousedown":Wp=!0;break;case"contextmenu":case"mouseup":case"dragend":Wp=!1,Nx(Te,c,ge);break;case"selectionchange":if(JB)break;case"keydown":case"keyup":Nx(Te,c,ge)}var Ye;if(zp)e:{switch(i){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ao?Ex(i,c)&&(Ke="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ke="onCompositionStart");Ke&&(px&&c.locale!=="ko"&&(Ao||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ao&&(Ye=lx()):(ki=ge,Mp="value"in ki?ki.value:ki.textContent,Ao=!0)),qe=vc(Z,Ke),0<qe.length&&(Ke=new fx(Ke,i,null,c,ge),Te.push({event:Ke,listeners:qe}),Ye?Ke.data=Ye:(Ye=yx(c),Ye!==null&&(Ke.data=Ye)))),(Ye=HB?jB(i,c):zB(i,c))&&(Z=vc(Z,"onBeforeInput"),0<Z.length&&(ge=new fx("onBeforeInput","beforeinput",null,c,ge),Te.push({event:ge,listeners:Z}),ge.data=Ye))}Bx(Te,o)})}function cu(i,o,c){return{instance:i,listener:o,currentTarget:c}}function vc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=qa(i,c),T!=null&&h.unshift(cu(i,T,E)),T=qa(i,o),T!=null&&h.push(cu(i,T,E))),i=i.return}return h}function No(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Hx(i,o,c,h,E){for(var T=o._reactName,v=[];c!==null&&c!==h;){var F=c,$=F.alternate,Z=F.stateNode;if($!==null&&$===h)break;F.tag===5&&Z!==null&&(F=Z,E?($=qa(c,T),$!=null&&v.unshift(cu(c,$,F))):E||($=qa(c,T),$!=null&&v.push(cu(c,$,F)))),c=c.return}v.length!==0&&i.push({event:o,listeners:v})}var n7=/\r\n?/g,r7=/\u0000|\uFFFD/g;function jx(i){return(typeof i=="string"?i:""+i).replace(n7,`
21
+ `).replace(r7,"")}function Ac(i,o,c){if(o=jx(o),jx(i)!==o&&c)throw Error(n(425))}function kc(){}var Zp=null,em=null;function tm(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var nm=typeof setTimeout=="function"?setTimeout:void 0,i7=typeof clearTimeout=="function"?clearTimeout:void 0,zx=typeof Promise=="function"?Promise:void 0,s7=typeof queueMicrotask=="function"?queueMicrotask:typeof zx!="undefined"?function(i){return zx.resolve(null).then(i).catch(o7)}:nm;function o7(i){setTimeout(function(){throw i})}function rm(i,o){var c=o,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),eu(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);eu(o)}function Ni(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function $x(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}var Oo=Math.random().toString(36).slice(2),Br="__reactFiber$"+Oo,du="__reactProps$"+Oo,ei="__reactContainer$"+Oo,im="__reactEvents$"+Oo,a7="__reactListeners$"+Oo,u7="__reactHandles$"+Oo;function bs(i){var o=i[Br];if(o)return o;for(var c=i.parentNode;c;){if(o=c[ei]||c[Br]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=$x(i);i!==null;){if(c=i[Br])return c;i=$x(i)}return o}i=c,c=i.parentNode}return null}function fu(i){return i=i[Br]||i[ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Io(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Cc(i){return i[du]||null}var sm=[],Po=-1;function Oi(i){return{current:i}}function At(i){0>Po||(i.current=sm[Po],sm[Po]=null,Po--)}function bt(i,o){Po++,sm[Po]=i.current,i.current=o}var Ii={},mn=Oi(Ii),Dn=Oi(!1),ws=Ii;function Ro(i,o){var c=i.type.contextTypes;if(!c)return Ii;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in c)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Mn(i){return i=i.childContextTypes,i!=null}function Nc(){At(Dn),At(mn)}function Vx(i,o,c){if(mn.current!==Ii)throw Error(n(168));bt(mn,o),bt(Dn,c)}function qx(i,o,c){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Ie(i)||"Unknown",E));return k({},c,h)}function Oc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ii,ws=mn.current,bt(mn,i),bt(Dn,Dn.current),!0}function Yx(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=qx(i,o,ws),h.__reactInternalMemoizedMergedChildContext=i,At(Dn),At(mn),bt(mn,i)):At(Dn),bt(Dn,c)}var ti=null,Ic=!1,om=!1;function Wx(i){ti===null?ti=[i]:ti.push(i)}function l7(i){Ic=!0,Wx(i)}function Pi(){if(!om&&ti!==null){om=!0;var i=0,o=mt;try{var c=ti;for(mt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}ti=null,Ic=!1}catch(E){throw ti!==null&&(ti=ti.slice(i+1)),Xw(Cp,Pi),E}finally{mt=o,om=!1}}return null}var Lo=[],Do=0,Pc=null,Rc=0,Zn=[],er=0,xs=null,ni=1,ri="";function _s(i,o){Lo[Do++]=Rc,Lo[Do++]=Pc,Pc=i,Rc=o}function Gx(i,o,c){Zn[er++]=ni,Zn[er++]=ri,Zn[er++]=xs,xs=i;var h=ni;i=ri;var E=32-mr(h)-1;h&=~(1<<E),c+=1;var T=32-mr(o)+E;if(30<T){var v=E-E%5;T=(h&(1<<v)-1).toString(32),h>>=v,E-=v,ni=1<<32-mr(o)+E|c<<E|h,ri=T+i}else ni=1<<T|c<<E|h,ri=i}function am(i){i.return!==null&&(_s(i,1),Gx(i,1,0))}function um(i){for(;i===Pc;)Pc=Lo[--Do],Lo[Do]=null,Rc=Lo[--Do],Lo[Do]=null;for(;i===xs;)xs=Zn[--er],Zn[er]=null,ri=Zn[--er],Zn[er]=null,ni=Zn[--er],Zn[er]=null}var Yn=null,Wn=null,Nt=!1,Er=null;function Xx(i,o){var c=ir(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=i,o=i.deletions,o===null?(i.deletions=[c],i.flags|=16):o.push(c)}function Kx(i,o){switch(i.tag){case 5:var c=i.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Yn=i,Wn=Ni(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Yn=i,Wn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=xs!==null?{id:ni,overflow:ri}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=ir(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Yn=i,Wn=null,!0):!1;default:return!1}}function lm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function cm(i){if(Nt){var o=Wn;if(o){var c=o;if(!Kx(i,o)){if(lm(i))throw Error(n(418));o=Ni(c.nextSibling);var h=Yn;o&&Kx(i,o)?Xx(h,c):(i.flags=i.flags&-4097|2,Nt=!1,Yn=i)}}else{if(lm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Nt=!1,Yn=i}}}function Qx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Yn=i}function Lc(i){if(i!==Yn)return!1;if(!Nt)return Qx(i),Nt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!tm(i.type,i.memoizedProps)),o&&(o=Wn)){if(lm(i))throw Jx(),Error(n(418));for(;o;)Xx(i,o),o=Ni(o.nextSibling)}if(Qx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(o===0){Wn=Ni(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Wn=null}}else Wn=Yn?Ni(i.stateNode.nextSibling):null;return!0}function Jx(){for(var i=Wn;i;)i=Ni(i.nextSibling)}function Mo(){Wn=Yn=null,Nt=!1}function dm(i){Er===null?Er=[i]:Er.push(i)}var c7=z.ReactCurrentBatchConfig;function hu(i,o,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(v){var F=E.refs;v===null?delete F[T]:F[T]=v},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Dc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Zx(i){var o=i._init;return o(i._payload)}function e_(i){function o(X,q){if(i){var Q=X.deletions;Q===null?(X.deletions=[q],X.flags|=16):Q.push(q)}}function c(X,q){if(!i)return null;for(;q!==null;)o(X,q),q=q.sibling;return null}function h(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function E(X,q){return X=Hi(X,q),X.index=0,X.sibling=null,X}function T(X,q,Q){return X.index=Q,i?(Q=X.alternate,Q!==null?(Q=Q.index,Q<q?(X.flags|=2,q):Q):(X.flags|=2,q)):(X.flags|=1048576,q)}function v(X){return i&&X.alternate===null&&(X.flags|=2),X}function F(X,q,Q,we){return q===null||q.tag!==6?(q=n0(Q,X.mode,we),q.return=X,q):(q=E(q,Q),q.return=X,q)}function $(X,q,Q,we){var Ue=Q.type;return Ue===V?ge(X,q,Q.props.children,we,Q.key):q!==null&&(q.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===Se&&Zx(Ue)===q.type)?(we=E(q,Q.props),we.ref=hu(X,q,Q),we.return=X,we):(we=sd(Q.type,Q.key,Q.props,null,X.mode,we),we.ref=hu(X,q,Q),we.return=X,we)}function Z(X,q,Q,we){return q===null||q.tag!==4||q.stateNode.containerInfo!==Q.containerInfo||q.stateNode.implementation!==Q.implementation?(q=r0(Q,X.mode,we),q.return=X,q):(q=E(q,Q.children||[]),q.return=X,q)}function ge(X,q,Q,we,Ue){return q===null||q.tag!==7?(q=Is(Q,X.mode,we,Ue),q.return=X,q):(q=E(q,Q),q.return=X,q)}function Te(X,q,Q){if(typeof q=="string"&&q!==""||typeof q=="number")return q=n0(""+q,X.mode,Q),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case W:return Q=sd(q.type,q.key,q.props,null,X.mode,Q),Q.ref=hu(X,null,q),Q.return=X,Q;case D:return q=r0(q,X.mode,Q),q.return=X,q;case Se:var we=q._init;return Te(X,we(q._payload),Q)}if(pt(q)||se(q))return q=Is(q,X.mode,Q,null),q.return=X,q;Dc(X,q)}return null}function he(X,q,Q,we){var Ue=q!==null?q.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Ue!==null?null:F(X,q,""+Q,we);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:return Q.key===Ue?$(X,q,Q,we):null;case D:return Q.key===Ue?Z(X,q,Q,we):null;case Se:return Ue=Q._init,he(X,q,Ue(Q._payload),we)}if(pt(Q)||se(Q))return Ue!==null?null:ge(X,q,Q,we,null);Dc(X,Q)}return null}function Pe(X,q,Q,we,Ue){if(typeof we=="string"&&we!==""||typeof we=="number")return X=X.get(Q)||null,F(q,X,""+we,Ue);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case W:return X=X.get(we.key===null?Q:we.key)||null,$(q,X,we,Ue);case D:return X=X.get(we.key===null?Q:we.key)||null,Z(q,X,we,Ue);case Se:var qe=we._init;return Pe(X,q,Q,qe(we._payload),Ue)}if(pt(we)||se(we))return X=X.get(Q)||null,ge(q,X,we,Ue,null);Dc(q,we)}return null}function De(X,q,Q,we){for(var Ue=null,qe=null,Ye=q,Ke=q=0,nn=null;Ye!==null&&Ke<Q.length;Ke++){Ye.index>Ke?(nn=Ye,Ye=null):nn=Ye.sibling;var dt=he(X,Ye,Q[Ke],we);if(dt===null){Ye===null&&(Ye=nn);break}i&&Ye&&dt.alternate===null&&o(X,Ye),q=T(dt,q,Ke),qe===null?Ue=dt:qe.sibling=dt,qe=dt,Ye=nn}if(Ke===Q.length)return c(X,Ye),Nt&&_s(X,Ke),Ue;if(Ye===null){for(;Ke<Q.length;Ke++)Ye=Te(X,Q[Ke],we),Ye!==null&&(q=T(Ye,q,Ke),qe===null?Ue=Ye:qe.sibling=Ye,qe=Ye);return Nt&&_s(X,Ke),Ue}for(Ye=h(X,Ye);Ke<Q.length;Ke++)nn=Pe(Ye,X,Ke,Q[Ke],we),nn!==null&&(i&&nn.alternate!==null&&Ye.delete(nn.key===null?Ke:nn.key),q=T(nn,q,Ke),qe===null?Ue=nn:qe.sibling=nn,qe=nn);return i&&Ye.forEach(function(ji){return o(X,ji)}),Nt&&_s(X,Ke),Ue}function Me(X,q,Q,we){var Ue=se(Q);if(typeof Ue!="function")throw Error(n(150));if(Q=Ue.call(Q),Q==null)throw Error(n(151));for(var qe=Ue=null,Ye=q,Ke=q=0,nn=null,dt=Q.next();Ye!==null&&!dt.done;Ke++,dt=Q.next()){Ye.index>Ke?(nn=Ye,Ye=null):nn=Ye.sibling;var ji=he(X,Ye,dt.value,we);if(ji===null){Ye===null&&(Ye=nn);break}i&&Ye&&ji.alternate===null&&o(X,Ye),q=T(ji,q,Ke),qe===null?Ue=ji:qe.sibling=ji,qe=ji,Ye=nn}if(dt.done)return c(X,Ye),Nt&&_s(X,Ke),Ue;if(Ye===null){for(;!dt.done;Ke++,dt=Q.next())dt=Te(X,dt.value,we),dt!==null&&(q=T(dt,q,Ke),qe===null?Ue=dt:qe.sibling=dt,qe=dt);return Nt&&_s(X,Ke),Ue}for(Ye=h(X,Ye);!dt.done;Ke++,dt=Q.next())dt=Pe(Ye,X,Ke,dt.value,we),dt!==null&&(i&&dt.alternate!==null&&Ye.delete(dt.key===null?Ke:dt.key),q=T(dt,q,Ke),qe===null?Ue=dt:qe.sibling=dt,qe=dt);return i&&Ye.forEach(function($7){return o(X,$7)}),Nt&&_s(X,Ke),Ue}function jt(X,q,Q,we){if(typeof Q=="object"&&Q!==null&&Q.type===V&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:e:{for(var Ue=Q.key,qe=q;qe!==null;){if(qe.key===Ue){if(Ue=Q.type,Ue===V){if(qe.tag===7){c(X,qe.sibling),q=E(qe,Q.props.children),q.return=X,X=q;break e}}else if(qe.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===Se&&Zx(Ue)===qe.type){c(X,qe.sibling),q=E(qe,Q.props),q.ref=hu(X,qe,Q),q.return=X,X=q;break e}c(X,qe);break}else o(X,qe);qe=qe.sibling}Q.type===V?(q=Is(Q.props.children,X.mode,we,Q.key),q.return=X,X=q):(we=sd(Q.type,Q.key,Q.props,null,X.mode,we),we.ref=hu(X,q,Q),we.return=X,X=we)}return v(X);case D:e:{for(qe=Q.key;q!==null;){if(q.key===qe)if(q.tag===4&&q.stateNode.containerInfo===Q.containerInfo&&q.stateNode.implementation===Q.implementation){c(X,q.sibling),q=E(q,Q.children||[]),q.return=X,X=q;break e}else{c(X,q);break}else o(X,q);q=q.sibling}q=r0(Q,X.mode,we),q.return=X,X=q}return v(X);case Se:return qe=Q._init,jt(X,q,qe(Q._payload),we)}if(pt(Q))return De(X,q,Q,we);if(se(Q))return Me(X,q,Q,we);Dc(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,q!==null&&q.tag===6?(c(X,q.sibling),q=E(q,Q),q.return=X,X=q):(c(X,q),q=n0(Q,X.mode,we),q.return=X,X=q),v(X)):c(X,q)}return jt}var Fo=e_(!0),t_=e_(!1),Mc=Oi(null),Fc=null,Bo=null,fm=null;function hm(){fm=Bo=Fc=null}function pm(i){var o=Mc.current;At(Mc),i._currentValue=o}function mm(i,o,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===c)break;i=i.return}}function Uo(i,o){Fc=i,fm=Bo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Fn=!0),i.firstContext=null)}function tr(i){var o=i._currentValue;if(fm!==i)if(i={context:i,memoizedValue:o,next:null},Bo===null){if(Fc===null)throw Error(n(308));Bo=i,Fc.dependencies={lanes:0,firstContext:i}}else Bo=Bo.next=i;return o}var Ss=null;function gm(i){Ss===null?Ss=[i]:Ss.push(i)}function n_(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,gm(o)):(c.next=E.next,E.next=c),o.interleaved=c,ii(i,h)}function ii(i,o){i.lanes|=o;var c=i.alternate;for(c!==null&&(c.lanes|=o),c=i,i=i.return;i!==null;)i.childLanes|=o,c=i.alternate,c!==null&&(c.childLanes|=o),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Ri=!1;function Em(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r_(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function si(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Li(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(lt&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,ii(i,c)}return E=h.interleaved,E===null?(o.next=o,gm(h)):(o.next=E.next,E.next=o),h.interleaved=o,ii(i,c)}function Bc(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,Ip(i,c)}}function i_(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var v={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};T===null?E=T=v:T=T.next=v,c=c.next}while(c!==null);T===null?E=T=o:T=T.next=o}else E=T=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Uc(i,o,c,h){var E=i.updateQueue;Ri=!1;var T=E.firstBaseUpdate,v=E.lastBaseUpdate,F=E.shared.pending;if(F!==null){E.shared.pending=null;var $=F,Z=$.next;$.next=null,v===null?T=Z:v.next=Z,v=$;var ge=i.alternate;ge!==null&&(ge=ge.updateQueue,F=ge.lastBaseUpdate,F!==v&&(F===null?ge.firstBaseUpdate=Z:F.next=Z,ge.lastBaseUpdate=$))}if(T!==null){var Te=E.baseState;v=0,ge=Z=$=null,F=T;do{var he=F.lane,Pe=F.eventTime;if((h&he)===he){ge!==null&&(ge=ge.next={eventTime:Pe,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var De=i,Me=F;switch(he=o,Pe=c,Me.tag){case 1:if(De=Me.payload,typeof De=="function"){Te=De.call(Pe,Te,he);break e}Te=De;break e;case 3:De.flags=De.flags&-65537|128;case 0:if(De=Me.payload,he=typeof De=="function"?De.call(Pe,Te,he):De,he==null)break e;Te=k({},Te,he);break e;case 2:Ri=!0}}F.callback!==null&&F.lane!==0&&(i.flags|=64,he=E.effects,he===null?E.effects=[F]:he.push(F))}else Pe={eventTime:Pe,lane:he,tag:F.tag,payload:F.payload,callback:F.callback,next:null},ge===null?(Z=ge=Pe,$=Te):ge=ge.next=Pe,v|=he;if(F=F.next,F===null){if(F=E.shared.pending,F===null)break;he=F,F=he.next,he.next=null,E.lastBaseUpdate=he,E.shared.pending=null}}while(!0);if(ge===null&&($=Te),E.baseState=$,E.firstBaseUpdate=Z,E.lastBaseUpdate=ge,o=E.shared.interleaved,o!==null){E=o;do v|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);ks|=v,i.lanes=v,i.memoizedState=Te}}function s_(i,o,c){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var pu={},Ur=Oi(pu),mu=Oi(pu),gu=Oi(pu);function vs(i){if(i===pu)throw Error(n(174));return i}function ym(i,o){switch(bt(gu,o),bt(mu,i),bt(Ur,pu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}At(Ur),bt(Ur,o)}function Ho(){At(Ur),At(mu),At(gu)}function o_(i){vs(gu.current);var o=vs(Ur.current),c=xe(o,i.type);o!==c&&(bt(mu,i),bt(Ur,c))}function Tm(i){mu.current===i&&(At(Ur),At(mu))}var It=Oi(0);function Hc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var bm=[];function wm(){for(var i=0;i<bm.length;i++)bm[i]._workInProgressVersionPrimary=null;bm.length=0}var jc=z.ReactCurrentDispatcher,xm=z.ReactCurrentBatchConfig,As=0,Pt=null,Gt=null,en=null,zc=!1,Eu=!1,yu=0,d7=0;function gn(){throw Error(n(321))}function _m(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!gr(i[c],o[c]))return!1;return!0}function Sm(i,o,c,h,E,T){if(As=T,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,jc.current=i===null||i.memoizedState===null?m7:g7,i=c(h,E),Eu){T=0;do{if(Eu=!1,yu=0,25<=T)throw Error(n(301));T+=1,en=Gt=null,o.updateQueue=null,jc.current=E7,i=c(h,E)}while(Eu)}if(jc.current=qc,o=Gt!==null&&Gt.next!==null,As=0,en=Gt=Pt=null,zc=!1,o)throw Error(n(300));return i}function vm(){var i=yu!==0;return yu=0,i}function Hr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function nr(){if(Gt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Gt.next;var o=en===null?Pt.memoizedState:en.next;if(o!==null)en=o,Gt=i;else{if(i===null)throw Error(n(310));Gt=i,i={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function Tu(i,o){return typeof o=="function"?o(i):o}function Am(i){var o=nr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Gt,E=h.baseQueue,T=c.pending;if(T!==null){if(E!==null){var v=E.next;E.next=T.next,T.next=v}h.baseQueue=E=T,c.pending=null}if(E!==null){T=E.next,h=h.baseState;var F=v=null,$=null,Z=T;do{var ge=Z.lane;if((As&ge)===ge)$!==null&&($=$.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var Te={lane:ge,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};$===null?(F=$=Te,v=h):$=$.next=Te,Pt.lanes|=ge,ks|=ge}Z=Z.next}while(Z!==null&&Z!==T);$===null?v=h:$.next=F,gr(h,o.memoizedState)||(Fn=!0),o.memoizedState=h,o.baseState=v,o.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,ks|=T,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function km(i){var o=nr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,T=o.memoizedState;if(E!==null){c.pending=null;var v=E=E.next;do T=i(T,v.action),v=v.next;while(v!==E);gr(T,o.memoizedState)||(Fn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),c.lastRenderedState=T}return[T,h]}function a_(){}function u_(i,o){var c=Pt,h=nr(),E=o(),T=!gr(h.memoizedState,E);if(T&&(h.memoizedState=E,Fn=!0),h=h.queue,Cm(d_.bind(null,c,h,i),[i]),h.getSnapshot!==o||T||en!==null&&en.memoizedState.tag&1){if(c.flags|=2048,bu(9,c_.bind(null,c,h,E,o),void 0,null),tn===null)throw Error(n(349));(As&30)!==0||l_(c,o,E)}return E}function l_(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function c_(i,o,c,h){o.value=c,o.getSnapshot=h,f_(o)&&h_(i)}function d_(i,o,c){return c(function(){f_(o)&&h_(i)})}function f_(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!gr(i,c)}catch(h){return!0}}function h_(i){var o=ii(i,1);o!==null&&wr(o,i,1,-1)}function p_(i){var o=Hr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Tu,lastRenderedState:i},o.queue=i,i=i.dispatch=p7.bind(null,Pt,i),[o.memoizedState,i]}function bu(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,o.lastEffect=i)),i}function m_(){return nr().memoizedState}function $c(i,o,c,h){var E=Hr();Pt.flags|=i,E.memoizedState=bu(1|o,c,void 0,h===void 0?null:h)}function Vc(i,o,c,h){var E=nr();h=h===void 0?null:h;var T=void 0;if(Gt!==null){var v=Gt.memoizedState;if(T=v.destroy,h!==null&&_m(h,v.deps)){E.memoizedState=bu(o,c,T,h);return}}Pt.flags|=i,E.memoizedState=bu(1|o,c,T,h)}function g_(i,o){return $c(8390656,8,i,o)}function Cm(i,o){return Vc(2048,8,i,o)}function E_(i,o){return Vc(4,2,i,o)}function y_(i,o){return Vc(4,4,i,o)}function T_(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function b_(i,o,c){return c=c!=null?c.concat([i]):null,Vc(4,4,T_.bind(null,o,i),c)}function Nm(){}function w_(i,o){var c=nr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&_m(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function x_(i,o){var c=nr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&_m(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function __(i,o,c){return(As&21)===0?(i.baseState&&(i.baseState=!1,Fn=!0),i.memoizedState=c):(gr(c,o)||(c=Zw(),Pt.lanes|=c,ks|=c,i.baseState=!0),o)}function f7(i,o){var c=mt;mt=c!==0&&4>c?c:4,i(!0);var h=xm.transition;xm.transition={};try{i(!1),o()}finally{mt=c,xm.transition=h}}function S_(){return nr().memoizedState}function h7(i,o,c){var h=Bi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},v_(i))A_(o,c);else if(c=n_(i,o,c,h),c!==null){var E=Sn();wr(c,i,h,E),k_(c,o,h)}}function p7(i,o,c){var h=Bi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(v_(i))A_(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var v=o.lastRenderedState,F=T(v,c);if(E.hasEagerState=!0,E.eagerState=F,gr(F,v)){var $=o.interleaved;$===null?(E.next=E,gm(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(Z){}c=n_(i,o,E,h),c!==null&&(E=Sn(),wr(c,i,h,E),k_(c,o,h))}}function v_(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function A_(i,o){Eu=zc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function k_(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,Ip(i,c)}}var qc={readContext:tr,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},m7={readContext:tr,useCallback:function(i,o){return Hr().memoizedState=[i,o===void 0?null:o],i},useContext:tr,useEffect:g_,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,$c(4194308,4,T_.bind(null,o,i),c)},useLayoutEffect:function(i,o){return $c(4194308,4,i,o)},useInsertionEffect:function(i,o){return $c(4,2,i,o)},useMemo:function(i,o){var c=Hr();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Hr();return o=c!==void 0?c(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=h7.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Hr();return i={current:i},o.memoizedState=i},useState:p_,useDebugValue:Nm,useDeferredValue:function(i){return Hr().memoizedState=i},useTransition:function(){var i=p_(!1),o=i[0];return i=f7.bind(null,i[1]),Hr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Pt,E=Hr();if(Nt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),tn===null)throw Error(n(349));(As&30)!==0||l_(h,o,c)}E.memoizedState=c;var T={value:c,getSnapshot:o};return E.queue=T,g_(d_.bind(null,h,T,i),[i]),h.flags|=2048,bu(9,c_.bind(null,h,T,c,o),void 0,null),c},useId:function(){var i=Hr(),o=tn.identifierPrefix;if(Nt){var c=ri,h=ni;c=(h&~(1<<32-mr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=yu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=d7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},g7={readContext:tr,useCallback:w_,useContext:tr,useEffect:Cm,useImperativeHandle:b_,useInsertionEffect:E_,useLayoutEffect:y_,useMemo:x_,useReducer:Am,useRef:m_,useState:function(){return Am(Tu)},useDebugValue:Nm,useDeferredValue:function(i){var o=nr();return __(o,Gt.memoizedState,i)},useTransition:function(){var i=Am(Tu)[0],o=nr().memoizedState;return[i,o]},useMutableSource:a_,useSyncExternalStore:u_,useId:S_,unstable_isNewReconciler:!1},E7={readContext:tr,useCallback:w_,useContext:tr,useEffect:Cm,useImperativeHandle:b_,useInsertionEffect:E_,useLayoutEffect:y_,useMemo:x_,useReducer:km,useRef:m_,useState:function(){return km(Tu)},useDebugValue:Nm,useDeferredValue:function(i){var o=nr();return Gt===null?o.memoizedState=i:__(o,Gt.memoizedState,i)},useTransition:function(){var i=km(Tu)[0],o=nr().memoizedState;return[i,o]},useMutableSource:a_,useSyncExternalStore:u_,useId:S_,unstable_isNewReconciler:!1};function yr(i,o){if(i&&i.defaultProps){o=k({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Om(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:k({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Yc={isMounted:function(i){return(i=i._reactInternals)?Ts(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=Sn(),E=Bi(i),T=si(h,E);T.payload=o,c!=null&&(T.callback=c),o=Li(i,T,E),o!==null&&(wr(o,i,E,h),Bc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=Sn(),E=Bi(i),T=si(h,E);T.tag=1,T.payload=o,c!=null&&(T.callback=c),o=Li(i,T,E),o!==null&&(wr(o,i,E,h),Bc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=Sn(),h=Bi(i),E=si(c,h);E.tag=2,o!=null&&(E.callback=o),o=Li(i,E,h),o!==null&&(wr(o,i,h,c),Bc(o,i,h))}};function C_(i,o,c,h,E,T,v){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,v):o.prototype&&o.prototype.isPureReactComponent?!ou(c,h)||!ou(E,T):!0}function N_(i,o,c){var h=!1,E=Ii,T=o.contextType;return typeof T=="object"&&T!==null?T=tr(T):(E=Mn(o)?ws:mn.current,h=o.contextTypes,T=(h=h!=null)?Ro(i,E):Ii),o=new o(c,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Yc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function O_(i,o,c,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==i&&Yc.enqueueReplaceState(o,o.state,null)}function Im(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Em(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=tr(T):(T=Mn(o)?ws:mn.current,E.context=Ro(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Om(i,o,T,c),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&Yc.enqueueReplaceState(E,E.state,null),Uc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function jo(i,o){try{var c="",h=o;do c+=ve(h),h=h.return;while(h);var E=c}catch(T){E=`
22
22
  Error generating stack: `+T.message+`
23
- `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Im(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function Pm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var h7=typeof WeakMap=="function"?WeakMap:Map;function N_(i,o,c){c=ri(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Jc||(Jc=!0,Wm=h),Pm(i,o)},c}function O_(i,o,c){c=ri(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;c.payload=function(){return h(E)},c.callback=function(){Pm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(c.callback=function(){Pm(i,o),typeof h!="function"&&(Li===null?Li=new Set([this]):Li.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),c}function I_(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new h7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(c)||(E.add(c),i=C7.bind(null,i,o,c),o.then(i,i))}function P_(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function R_(i,o,c,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=ri(-1,1),o.tag=2,Pi(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var p7=z.ReactCurrentOwner,Mn=!1;function xn(i,o,c,h){o.child=i===null?Zx(o,null,c,h):Mo(o,i.child,c,h)}function L_(i,o,c,h,E){c=c.render;var T=o.ref;return Bo(o,E),h=_m(i,o,c,h,T,E),c=Sm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ii(i,o,E)):(Nt&&c&&om(o),o.flags|=1,xn(i,o,h,E),o.child)}function D_(i,o,c,h,E){if(i===null){var T=c.type;return typeof T=="function"&&!e0(T)&&T.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=T,M_(i,o,T,h,E)):(i=id(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var v=T.memoizedProps;if(c=c.compare,c=c!==null?c:su,c(v,h)&&i.ref===o.ref)return ii(i,o,E)}return o.flags|=1,i=Bi(T,h),i.ref=o.ref,i.return=o,o.child=i}function M_(i,o,c,h,E){if(i!==null){var T=i.memoizedProps;if(su(T,h)&&i.ref===o.ref)if(Mn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return o.lanes=i.lanes,ii(i,o,E)}return Rm(i,o,c,h,E)}function F_(i,o,c){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(zo,Wn),Wn|=c;else{if((c&1073741824)===0)return i=T!==null?T.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,bt(zo,Wn),Wn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:c,bt(zo,Wn),Wn|=h}else T!==null?(h=T.baseLanes|c,o.memoizedState=null):h=c,bt(zo,Wn),Wn|=h;return xn(i,o,E,c),o.child}function B_(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Rm(i,o,c,h,E){var T=Dn(c)?ys:pn.current;return T=Po(o,T),Bo(o,E),c=_m(i,o,c,h,T,E),h=Sm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ii(i,o,E)):(Nt&&h&&om(o),o.flags|=1,xn(i,o,c,E),o.child)}function U_(i,o,c,h,E){if(Dn(c)){var T=!0;Nc(o)}else T=!1;if(Bo(o,E),o.stateNode===null)Wc(i,o),C_(o,c,h),Om(o,c,h,E),h=!0;else if(i===null){var v=o.stateNode,F=o.memoizedProps;v.props=F;var $=v.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=er(Z):(Z=Dn(c)?ys:pn.current,Z=Po(o,Z));var ge=c.getDerivedStateFromProps,Te=typeof ge=="function"||typeof v.getSnapshotBeforeUpdate=="function";Te||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(F!==h||$!==Z)&&k_(o,v,h,Z),Ii=!1;var he=o.memoizedState;v.state=he,Bc(o,h,v,E),$=o.memoizedState,F!==h||he!==$||Ln.current||Ii?(typeof ge=="function"&&(Nm(o,c,ge,h),$=o.memoizedState),(F=Ii||A_(o,c,F,h,he,$,Z))?(Te||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),v.props=h,v.state=$,v.context=Z,h=F):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{v=o.stateNode,t_(i,o),F=o.memoizedProps,Z=o.type===o.elementType?F:Er(o.type,F),v.props=Z,Te=o.pendingProps,he=v.context,$=c.contextType,typeof $=="object"&&$!==null?$=er($):($=Dn(c)?ys:pn.current,$=Po(o,$));var Pe=c.getDerivedStateFromProps;(ge=typeof Pe=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(F!==Te||he!==$)&&k_(o,v,h,$),Ii=!1,he=o.memoizedState,v.state=he,Bc(o,h,v,E);var Le=o.memoizedState;F!==Te||he!==Le||Ln.current||Ii?(typeof Pe=="function"&&(Nm(o,c,Pe,h),Le=o.memoizedState),(Z=Ii||A_(o,c,Z,h,he,Le,$)||!1)?(ge||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,Le,$),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,Le,$)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Le),v.props=h,v.state=Le,v.context=$,h=Z):(typeof v.componentDidUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),h=!1)}return Lm(i,o,c,h,T,E)}function Lm(i,o,c,h,E,T){B_(i,o);var v=(o.flags&128)!==0;if(!h&&!v)return E&&Vx(o,c,!1),ii(i,o,T);h=o.stateNode,p7.current=o;var F=v&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&v?(o.child=Mo(o,i.child,null,T),o.child=Mo(o,null,F,T)):xn(i,o,F,T),o.memoizedState=h.state,E&&Vx(o,c,!0),o.child}function H_(i){var o=i.stateNode;o.pendingContext?zx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&zx(i,o.context,!1),Em(i,o.containerInfo)}function j_(i,o,c,h,E){return Do(),cm(E),o.flags|=256,xn(i,o,c,h),o.child}var Dm={dehydrated:null,treeContext:null,retryLane:0};function Mm(i){return{baseLanes:i,cachePool:null,transitions:null}}function z_(i,o,c){var h=o.pendingProps,E=Ot.current,T=!1,v=(o.flags&128)!==0,F;if((F=v)||(F=i!==null&&i.memoizedState===null?!1:(E&2)!==0),F?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Ot,E&1),i===null)return lm(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(v=h.children,i=h.fallback,T?(h=o.mode,T=o.child,v={mode:"hidden",children:v},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=v):T=sd(v,h,0,null),i=ks(i,h,c,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Mm(c),o.memoizedState=Dm,i):Fm(o,v));if(E=i.memoizedState,E!==null&&(F=E.dehydrated,F!==null))return m7(i,o,v,h,F,E,c);if(T){T=h.fallback,v=o.mode,E=i.child,F=E.sibling;var $={mode:"hidden",children:h.children};return(v&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=Bi(E,$),h.subtreeFlags=E.subtreeFlags&14680064),F!==null?T=Bi(F,T):(T=ks(T,v,c,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,v=i.child.memoizedState,v=v===null?Mm(c):{baseLanes:v.baseLanes|c,cachePool:null,transitions:v.transitions},T.memoizedState=v,T.childLanes=i.childLanes&~c,o.memoizedState=Dm,h}return T=i.child,i=T.sibling,h=Bi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=h,o.memoizedState=null,h}function Fm(i,o){return o=sd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Yc(i,o,c,h){return h!==null&&cm(h),Mo(o,i.child,null,c),i=Fm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function m7(i,o,c,h,E,T,v){if(c)return o.flags&256?(o.flags&=-257,h=Im(Error(n(422))),Yc(i,o,v,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=sd({mode:"visible",children:h.children},E,0,null),T=ks(T,E,v,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Mo(o,i.child,null,v),o.child.memoizedState=Mm(v),o.memoizedState=Dm,T);if((o.mode&1)===0)return Yc(i,o,v,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var F=h.dgst;return h=F,T=Error(n(419)),h=Im(T,h,void 0),Yc(i,o,v,h)}if(F=(v&i.childLanes)!==0,Mn||F){if(h=en,h!==null){switch(v&-v){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|v))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ni(i,E),br(h,i,E,-1))}return Zm(),h=Im(Error(n(421))),Yc(i,o,v,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=k7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Yn=Ci(E.nextSibling),qn=o,Nt=!0,gr=null,i!==null&&(Jn[Zn++]=ei,Jn[Zn++]=ti,Jn[Zn++]=Ts,ei=i.id,ti=i.overflow,Ts=o),o=Fm(o,h.children),o.flags|=4096,o)}function $_(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),pm(i.return,o,c)}function Bm(i,o,c,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=c,T.tailMode=E)}function V_(i,o,c){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(xn(i,o,h.children,c),h=Ot.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&$_(i,c,o);else if(i.tag===19)$_(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(Ot,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(c=o.child,E=null;c!==null;)i=c.alternate,i!==null&&Uc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Bm(o,!1,E,c,T);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Uc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Bm(o,!0,c,null,T);break;case"together":Bm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Wc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function ii(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Ss|=o.lanes,(c&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,c=Bi(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Bi(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function g7(i,o,c){switch(o.tag){case 3:H_(o),Do();break;case 5:i_(o);break;case 1:Dn(o.type)&&Nc(o);break;case 4:Em(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;bt(Dc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(Ot,Ot.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?z_(i,o,c):(bt(Ot,Ot.current&1),i=ii(i,o,c),i!==null?i.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return V_(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Ot,Ot.current),h)break;return null;case 22:case 23:return o.lanes=0,F_(i,o,c)}return ii(i,o,c)}var q_,Um,Y_,W_;q_=function(i,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Um=function(){},Y_=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,xs(Br.current);var T=null;switch(c){case"input":E=wn(i,E),h=wn(i,h),T=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),T=[];break;case"textarea":E=Rn(i,E),h=Rn(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Ac)}Ge(c,h);var v;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var F=E[Z];for(v in F)F.hasOwnProperty(v)&&(c||(c={}),c[v]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in h){var $=h[Z];if(F=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&$!==F&&($!=null||F!=null))if(Z==="style")if(F){for(v in F)!F.hasOwnProperty(v)||$&&$.hasOwnProperty(v)||(c||(c={}),c[v]="");for(v in $)$.hasOwnProperty(v)&&F[v]!==$[v]&&(c||(c={}),c[v]=$[v])}else c||(T||(T=[]),T.push(Z,c)),c=$;else Z==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,F=F?F.__html:void 0,$!=null&&F!==$&&(T=T||[]).push(Z,$)):Z==="children"?typeof $!="string"&&typeof $!="number"||(T=T||[]).push(Z,""+$):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?($!=null&&Z==="onScroll"&&vt("scroll",i),T||F===$||(T=[])):(T=T||[]).push(Z,$))}c&&(T=T||[]).push("style",c);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},W_=function(i,o,c,h){c!==h&&(o.flags|=4)};function bu(i,o){if(!Nt)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function gn(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(o)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,o}function E7(i,o,c){var h=o.pendingProps;switch(am(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gn(o),null;case 1:return Dn(o.type)&&kc(),gn(o),null;case 3:return h=o.stateNode,Uo(),At(Ln),At(pn),bm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Rc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,gr!==null&&(Qm(gr),gr=null))),Um(i,o),gn(o),null;case 5:ym(o);var E=xs(mu.current);if(c=o.type,i!==null&&o.stateNode!=null)Y_(i,o,c,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return gn(o),null}if(i=xs(Br.current),Rc(o)){h=o.stateNode,c=o.type;var T=o.memoizedProps;switch(h[Fr]=o,h[cu]=T,i=(o.mode&1)!==0,c){case"dialog":vt("cancel",h),vt("close",h);break;case"iframe":case"object":case"embed":vt("load",h);break;case"video":case"audio":for(E=0;E<au.length;E++)vt(au[E],h);break;case"source":vt("error",h);break;case"img":case"image":case"link":vt("error",h),vt("load",h);break;case"details":vt("toggle",h);break;case"input":Lt(h,T),vt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},vt("invalid",h);break;case"textarea":hs(h,T),vt("invalid",h)}Ge(c,T),E=null;for(var v in T)if(T.hasOwnProperty(v)){var F=T[v];v==="children"?typeof F=="string"?h.textContent!==F&&(T.suppressHydrationWarning!==!0&&vc(h.textContent,F,i),E=["children",F]):typeof F=="number"&&h.textContent!==""+F&&(T.suppressHydrationWarning!==!0&&vc(h.textContent,F,i),E=["children",""+F]):s.hasOwnProperty(v)&&F!=null&&v==="onScroll"&&vt("scroll",h)}switch(c){case"input":St(h),Qe(h,T,!0);break;case"textarea":St(h),ms(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Ac)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{v=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=oe(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=v.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=v.createElement(c,{is:h.is}):(i=v.createElement(c),c==="select"&&(v=i,h.multiple?v.multiple=!0:h.size&&(v.size=h.size))):i=v.createElementNS(i,c),i[Fr]=o,i[cu]=h,q_(i,o,!1,!1),o.stateNode=i;e:{switch(v=$t(c,h),c){case"dialog":vt("cancel",i),vt("close",i),E=h;break;case"iframe":case"object":case"embed":vt("load",i),E=h;break;case"video":case"audio":for(E=0;E<au.length;E++)vt(au[E],i);E=h;break;case"source":vt("error",i),E=h;break;case"img":case"image":case"link":vt("error",i),vt("load",i),E=h;break;case"details":vt("toggle",i),E=h;break;case"input":Lt(i,h),E=wn(i,h),vt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),vt("invalid",i);break;case"textarea":hs(i,h),E=Rn(i,h),vt("invalid",i);break;default:E=h}Ge(c,E),F=E;for(T in F)if(F.hasOwnProperty(T)){var $=F[T];T==="style"?Ee(i,$):T==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&et(i,$)):T==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&te(i,$):typeof $=="number"&&te(i,""+$):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?$!=null&&T==="onScroll"&&vt("scroll",i):$!=null&&I(i,T,$,v))}switch(c){case"input":St(i),Qe(i,h,!1);break;case"textarea":St(i),ms(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Me(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?Dt(i,!!h.multiple,T,!1):h.defaultValue!=null&&Dt(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Ac)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return gn(o),null;case 6:if(i&&o.stateNode!=null)W_(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=xs(mu.current),xs(Br.current),Rc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Fr]=o,(T=h.nodeValue!==c)&&(i=qn,i!==null))switch(i.tag){case 3:vc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&vc(h.nodeValue,c,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Fr]=o,o.stateNode=h}return gn(o),null;case 13:if(At(Ot),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Nt&&Yn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Qx(),Do(),o.flags|=98560,T=!1;else if(T=Rc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Fr]=o}else Do(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;gn(o),T=!1}else gr!==null&&(Qm(gr),gr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(Ot.current&1)!==0?Gt===0&&(Gt=3):Zm())),o.updateQueue!==null&&(o.flags|=4),gn(o),null);case 4:return Uo(),Um(i,o),i===null&&uu(o.stateNode.containerInfo),gn(o),null;case 10:return hm(o.type._context),gn(o),null;case 17:return Dn(o.type)&&kc(),gn(o),null;case 19:if(At(Ot),T=o.memoizedState,T===null)return gn(o),null;if(h=(o.flags&128)!==0,v=T.rendering,v===null)if(h)bu(T,!1);else{if(Gt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(v=Uc(i),v!==null){for(o.flags|=128,bu(T,!1),h=v.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)T=c,i=h,T.flags&=14680066,v=T.alternate,v===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=v.childLanes,T.lanes=v.lanes,T.child=v.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=v.memoizedProps,T.memoizedState=v.memoizedState,T.updateQueue=v.updateQueue,T.type=v.type,i=v.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return bt(Ot,Ot.current&1|2),o.child}i=i.sibling}T.tail!==null&&Ut()>$o&&(o.flags|=128,h=!0,bu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Uc(v),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),bu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!v.alternate&&!Nt)return gn(o),null}else 2*Ut()-T.renderingStartTime>$o&&c!==1073741824&&(o.flags|=128,h=!0,bu(T,!1),o.lanes=4194304);T.isBackwards?(v.sibling=o.child,o.child=v):(c=T.last,c!==null?c.sibling=v:o.child=v,T.last=v)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Ut(),o.sibling=null,c=Ot.current,bt(Ot,h?c&1|2:c&1),o):(gn(o),null);case 22:case 23:return Jm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Wn&1073741824)!==0&&(gn(o),o.subtreeFlags&6&&(o.flags|=8192)):gn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function y7(i,o){switch(am(o),o.tag){case 1:return Dn(o.type)&&kc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Uo(),At(Ln),At(pn),bm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return ym(o),null;case 13:if(At(Ot),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Do()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return At(Ot),null;case 4:return Uo(),null;case 10:return hm(o.type._context),null;case 22:case 23:return Jm(),null;case 24:return null;default:return null}}var Gc=!1,En=!1,T7=typeof WeakSet=="function"?WeakSet:Set,Re=null;function jo(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Mt(i,o,h)}else c.current=null}function Hm(i,o,c){try{c()}catch(h){Mt(i,o,h)}}var G_=!1;function b7(i,o){if(Jp=pc,i=Ax(),Vp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{c.nodeType,T.nodeType}catch(we){c=null;break e}var v=0,F=-1,$=-1,Z=0,ge=0,Te=i,he=null;t:for(;;){for(var Pe;Te!==c||E!==0&&Te.nodeType!==3||(F=v+E),Te!==T||h!==0&&Te.nodeType!==3||($=v+h),Te.nodeType===3&&(v+=Te.nodeValue.length),(Pe=Te.firstChild)!==null;)he=Te,Te=Pe;for(;;){if(Te===i)break t;if(he===c&&++Z===E&&(F=v),he===T&&++ge===h&&($=v),(Pe=Te.nextSibling)!==null)break;Te=he,he=Te.parentNode}Te=Pe}c=F===-1||$===-1?null:{start:F,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(Zp={focusedElem:i,selectionRange:c},pc=!1,Re=o;Re!==null;)if(o=Re,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Re=i;else for(;Re!==null;){o=Re;try{var Le=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var De=Le.memoizedProps,Ht=Le.memoizedState,X=o.stateNode,q=X.getSnapshotBeforeUpdate(o.elementType===o.type?De:Er(o.type,De),Ht);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(we){Mt(o,o.return,we)}if(i=o.sibling,i!==null){i.return=o.return,Re=i;break}Re=o.return}return Le=G_,G_=!1,Le}function wu(i,o,c){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Hm(o,c,T)}E=E.next}while(E!==h)}}function Xc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function jm(i){var o=i.ref;if(o!==null){var c=i.stateNode;i.tag,i=c,typeof o=="function"?o(i):o.current=i}}function X_(i){var o=i.alternate;o!==null&&(i.alternate=null,X_(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Fr],delete o[cu],delete o[rm],delete o[n7],delete o[r7])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Q_(i){return i.tag===5||i.tag===3||i.tag===4}function K_(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Q_(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function zm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=Ac));else if(h!==4&&(i=i.child,i!==null))for(zm(i,o,c),i=i.sibling;i!==null;)zm(i,o,c),i=i.sibling}function $m(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for($m(i,o,c),i=i.sibling;i!==null;)$m(i,o,c),i=i.sibling}var sn=null,yr=!1;function Ri(i,o,c){for(c=c.child;c!==null;)J_(i,o,c),c=c.sibling}function J_(i,o,c){if(Mr&&typeof Mr.onCommitFiberUnmount=="function")try{Mr.onCommitFiberUnmount(uc,c)}catch(F){}switch(c.tag){case 5:En||jo(c,o);case 6:var h=sn,E=yr;sn=null,Ri(i,o,c),sn=h,yr=E,sn!==null&&(yr?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(yr?(i=sn,c=c.stateNode,i.nodeType===8?nm(i.parentNode,c):i.nodeType===1&&nm(i,c),Za(i)):nm(sn,c.stateNode));break;case 4:h=sn,E=yr,sn=c.stateNode.containerInfo,yr=!0,Ri(i,o,c),sn=h,yr=E;break;case 0:case 11:case 14:case 15:if(!En&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,v=T.destroy;T=T.tag,v!==void 0&&((T&2)!==0||(T&4)!==0)&&Hm(c,o,v),E=E.next}while(E!==h)}Ri(i,o,c);break;case 1:if(!En&&(jo(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(F){Mt(c,o,F)}Ri(i,o,c);break;case 21:Ri(i,o,c);break;case 22:c.mode&1?(En=(h=En)||c.memoizedState!==null,Ri(i,o,c),En=h):Ri(i,o,c);break;default:Ri(i,o,c)}}function Z_(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new T7),o.forEach(function(h){var E=N7.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function Tr(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var T=i,v=o,F=v;e:for(;F!==null;){switch(F.tag){case 5:sn=F.stateNode,yr=!1;break e;case 3:sn=F.stateNode.containerInfo,yr=!0;break e;case 4:sn=F.stateNode.containerInfo,yr=!0;break e}F=F.return}if(sn===null)throw Error(n(160));J_(T,v,E),sn=null,yr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(Z){Mt(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)e2(o,i),o=o.sibling}function e2(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Tr(o,i),Hr(i),h&4){try{wu(3,i,i.return),Xc(3,i)}catch(De){Mt(i,i.return,De)}try{wu(5,i,i.return)}catch(De){Mt(i,i.return,De)}}break;case 1:Tr(o,i),Hr(i),h&512&&c!==null&&jo(c,c.return);break;case 5:if(Tr(o,i),Hr(i),h&512&&c!==null&&jo(c,c.return),i.flags&32){var E=i.stateNode;try{te(E,"")}catch(De){Mt(i,i.return,De)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,v=c!==null?c.memoizedProps:T,F=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{F==="input"&&T.type==="radio"&&T.name!=null&&ze(E,T),$t(F,v);var Z=$t(F,T);for(v=0;v<$.length;v+=2){var ge=$[v],Te=$[v+1];ge==="style"?Ee(E,Te):ge==="dangerouslySetInnerHTML"?et(E,Te):ge==="children"?te(E,Te):I(E,ge,Te,Z)}switch(F){case"input":Ne(E,T);break;case"textarea":ps(E,T);break;case"select":var he=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Pe=T.value;Pe!=null?Dt(E,!!T.multiple,Pe,!1):he!==!!T.multiple&&(T.defaultValue!=null?Dt(E,!!T.multiple,T.defaultValue,!0):Dt(E,!!T.multiple,T.multiple?[]:"",!1))}E[cu]=T}catch(De){Mt(i,i.return,De)}}break;case 6:if(Tr(o,i),Hr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(De){Mt(i,i.return,De)}}break;case 3:if(Tr(o,i),Hr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Za(o.containerInfo)}catch(De){Mt(i,i.return,De)}break;case 4:Tr(o,i),Hr(i);break;case 13:Tr(o,i),Hr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Ym=Ut())),h&4&&Z_(i);break;case 22:if(ge=c!==null&&c.memoizedState!==null,i.mode&1?(En=(Z=En)||ge,Tr(o,i),En=Z):Tr(o,i),Hr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ge&&(i.mode&1)!==0)for(Re=i,ge=i.child;ge!==null;){for(Te=Re=ge;Re!==null;){switch(he=Re,Pe=he.child,he.tag){case 0:case 11:case 14:case 15:wu(4,he,he.return);break;case 1:jo(he,he.return);var Le=he.stateNode;if(typeof Le.componentWillUnmount=="function"){h=he,c=he.return;try{o=h,Le.props=o.memoizedProps,Le.state=o.memoizedState,Le.componentWillUnmount()}catch(De){Mt(h,c,De)}}break;case 5:jo(he,he.return);break;case 22:if(he.memoizedState!==null){r2(Te);continue}}Pe!==null?(Pe.return=he,Re=Pe):r2(Te)}ge=ge.sibling}e:for(ge=null,Te=i;;){if(Te.tag===5){if(ge===null){ge=Te;try{E=Te.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(F=Te.stateNode,$=Te.memoizedProps.style,v=$!=null&&$.hasOwnProperty("display")?$.display:null,F.style.display=Ce("display",v))}catch(De){Mt(i,i.return,De)}}}else if(Te.tag===6){if(ge===null)try{Te.stateNode.nodeValue=Z?"":Te.memoizedProps}catch(De){Mt(i,i.return,De)}}else if((Te.tag!==22&&Te.tag!==23||Te.memoizedState===null||Te===i)&&Te.child!==null){Te.child.return=Te,Te=Te.child;continue}if(Te===i)break e;for(;Te.sibling===null;){if(Te.return===null||Te.return===i)break e;ge===Te&&(ge=null),Te=Te.return}ge===Te&&(ge=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:Tr(o,i),Hr(i),h&4&&Z_(i);break;case 21:break;default:Tr(o,i),Hr(i)}}function Hr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(Q_(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(te(E,""),h.flags&=-33);var T=K_(i);$m(i,T,E);break;case 3:case 4:var v=h.stateNode.containerInfo,F=K_(i);zm(i,F,v);break;default:throw Error(n(161))}}catch($){Mt(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function w7(i,o,c){Re=i,t2(i)}function t2(i,o,c){for(var h=(i.mode&1)!==0;Re!==null;){var E=Re,T=E.child;if(E.tag===22&&h){var v=E.memoizedState!==null||Gc;if(!v){var F=E.alternate,$=F!==null&&F.memoizedState!==null||En;F=Gc;var Z=En;if(Gc=v,(En=$)&&!Z)for(Re=E;Re!==null;)v=Re,$=v.child,v.tag===22&&v.memoizedState!==null?i2(E):$!==null?($.return=v,Re=$):i2(E);for(;T!==null;)Re=T,t2(T),T=T.sibling;Re=E,Gc=F,En=Z}n2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Re=T):n2(i)}}function n2(i){for(;Re!==null;){var o=Re;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:En||Xc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!En)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:Er(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&r_(o,T,h);break;case 3:var v=o.updateQueue;if(v!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}r_(o,v,c)}break;case 5:var F=o.stateNode;if(c===null&&o.flags&4){c=F;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var ge=Z.memoizedState;if(ge!==null){var Te=ge.dehydrated;Te!==null&&Za(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}En||o.flags&512&&jm(o)}catch(he){Mt(o,o.return,he)}}if(o===i){Re=null;break}if(c=o.sibling,c!==null){c.return=o.return,Re=c;break}Re=o.return}}function r2(i){for(;Re!==null;){var o=Re;if(o===i){Re=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Re=c;break}Re=o.return}}function i2(i){for(;Re!==null;){var o=Re;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Xc(4,o)}catch($){Mt(o,c,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){Mt(o,E,$)}}var T=o.return;try{jm(o)}catch($){Mt(o,T,$)}break;case 5:var v=o.return;try{jm(o)}catch($){Mt(o,v,$)}}}catch($){Mt(o,o.return,$)}if(o===i){Re=null;break}var F=o.sibling;if(F!==null){F.return=o.return,Re=F;break}Re=o.return}}var x7=Math.ceil,Qc=z.ReactCurrentDispatcher,Vm=z.ReactCurrentOwner,nr=z.ReactCurrentBatchConfig,ut=0,en=null,Vt=null,on=0,Wn=0,zo=ki(0),Gt=0,xu=null,Ss=0,Kc=0,qm=0,_u=null,Fn=null,Ym=0,$o=1/0,si=null,Jc=!1,Wm=null,Li=null,Zc=!1,Di=null,ed=0,Su=0,Gm=null,td=-1,nd=0;function _n(){return(ut&6)!==0?Ut():td!==-1?td:td=Ut()}function Mi(i){return(i.mode&1)===0?1:(ut&2)!==0&&on!==0?on&-on:s7.transition!==null?(nd===0&&(nd=Kw()),nd):(i=mt,i!==0||(i=window.event,i=i===void 0?16:ox(i.type)),i)}function br(i,o,c,h){if(50<Su)throw Su=0,Gm=null,Error(n(185));Ga(i,c,h),((ut&2)===0||i!==en)&&(i===en&&((ut&2)===0&&(Kc|=c),Gt===4&&Fi(i,on)),Bn(i,h),c===1&&ut===0&&(o.mode&1)===0&&($o=Ut()+500,Oc&&Oi()))}function Bn(i,o){var c=i.callbackNode;sB(i,o);var h=dc(i,i===en?on:0);if(h===0)c!==null&&Gw(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&Gw(c),o===1)i.tag===0?i7(o2.bind(null,i)):qx(o2.bind(null,i)),e7(function(){(ut&6)===0&&Oi()}),c=null;else{switch(Jw(h)){case 1:c=Cp;break;case 4:c=Xw;break;case 16:c=ac;break;case 536870912:c=Qw;break;default:c=ac}c=p2(c,s2.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function s2(i,o){if(td=-1,nd=0,(ut&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Vo()&&i.callbackNode!==c)return null;var h=dc(i,i===en?on:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=rd(i,h);else{o=h;var E=ut;ut|=2;var T=u2();(en!==i||on!==o)&&(si=null,$o=Ut()+500,As(i,o));do try{v7();break}catch(F){a2(i,F)}while(!0);fm(),Qc.current=T,ut=E,Vt!==null?o=0:(en=null,on=0,o=Gt)}if(o!==0){if(o===2&&(E=kp(i),E!==0&&(h=E,o=Xm(i,E))),o===1)throw c=xu,As(i,0),Fi(i,h),Bn(i,Ut()),c;if(o===6)Fi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!_7(E)&&(o=rd(i,h),o===2&&(T=kp(i),T!==0&&(h=T,o=Xm(i,T))),o===1))throw c=xu,As(i,0),Fi(i,h),Bn(i,Ut()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Cs(i,Fn,si);break;case 3:if(Fi(i,h),(h&130023424)===h&&(o=Ym+500-Ut(),10<o)){if(dc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){_n(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=tm(Cs.bind(null,i,Fn,si),o);break}Cs(i,Fn,si);break;case 4:if(Fi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var v=31-pr(h);T=1<<v,v=o[v],v>E&&(E=v),h&=~T}if(h=E,h=Ut()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*x7(h/1960))-h,10<h){i.timeoutHandle=tm(Cs.bind(null,i,Fn,si),h);break}Cs(i,Fn,si);break;case 5:Cs(i,Fn,si);break;default:throw Error(n(329))}}}return Bn(i,Ut()),i.callbackNode===c?s2.bind(null,i):null}function Xm(i,o){var c=_u;return i.current.memoizedState.isDehydrated&&(As(i,o).flags|=256),i=rd(i,o),i!==2&&(o=Fn,Fn=c,o!==null&&Qm(o)),i}function Qm(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function _7(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],T=E.getSnapshot;E=E.value;try{if(!mr(T(),E))return!1}catch(v){return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Fi(i,o){for(o&=~qm,o&=~Kc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-pr(o),h=1<<c;i[c]=-1,o&=~h}}function o2(i){if((ut&6)!==0)throw Error(n(327));Vo();var o=dc(i,0);if((o&1)===0)return Bn(i,Ut()),null;var c=rd(i,o);if(i.tag!==0&&c===2){var h=kp(i);h!==0&&(o=h,c=Xm(i,h))}if(c===1)throw c=xu,As(i,0),Fi(i,o),Bn(i,Ut()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Cs(i,Fn,si),Bn(i,Ut()),null}function Km(i,o){var c=ut;ut|=1;try{return i(o)}finally{ut=c,ut===0&&($o=Ut()+500,Oc&&Oi())}}function vs(i){Di!==null&&Di.tag===0&&(ut&6)===0&&Vo();var o=ut;ut|=1;var c=nr.transition,h=mt;try{if(nr.transition=null,mt=1,i)return i()}finally{mt=h,nr.transition=c,ut=o,(ut&6)===0&&Oi()}}function Jm(){Wn=zo.current,At(zo)}function As(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,ZB(c)),Vt!==null)for(c=Vt.return;c!==null;){var h=c;switch(am(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&kc();break;case 3:Uo(),At(Ln),At(pn),bm();break;case 5:ym(h);break;case 4:Uo();break;case 13:At(Ot);break;case 19:At(Ot);break;case 10:hm(h.type._context);break;case 22:case 23:Jm()}c=c.return}if(en=i,Vt=i=Bi(i.current,null),on=Wn=o,Gt=0,xu=null,qm=Kc=Ss=0,Fn=_u=null,ws!==null){for(o=0;o<ws.length;o++)if(c=ws[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,T=c.pending;if(T!==null){var v=T.next;T.next=E,h.next=v}c.pending=h}ws=null}return i}function a2(i,o){do{var c=Vt;try{if(fm(),Hc.current=Vc,jc){for(var h=It.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}jc=!1}if(_s=0,Zt=Wt=It=null,gu=!1,Eu=0,Vm.current=null,c===null||c.return===null){Gt=1,xu=o,Vt=null;break}e:{var T=i,v=c.return,F=c,$=o;if(o=on,F.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var Z=$,ge=F,Te=ge.tag;if((ge.mode&1)===0&&(Te===0||Te===11||Te===15)){var he=ge.alternate;he?(ge.updateQueue=he.updateQueue,ge.memoizedState=he.memoizedState,ge.lanes=he.lanes):(ge.updateQueue=null,ge.memoizedState=null)}var Pe=P_(v);if(Pe!==null){Pe.flags&=-257,R_(Pe,v,F,T,o),Pe.mode&1&&I_(T,Z,o),o=Pe,$=Z;var Le=o.updateQueue;if(Le===null){var De=new Set;De.add($),o.updateQueue=De}else Le.add($);break e}else{if((o&1)===0){I_(T,Z,o),Zm();break e}$=Error(n(426))}}else if(Nt&&F.mode&1){var Ht=P_(v);if(Ht!==null){(Ht.flags&65536)===0&&(Ht.flags|=256),R_(Ht,v,F,T,o),cm(Ho($,F));break e}}T=$=Ho($,F),Gt!==4&&(Gt=2),_u===null?_u=[T]:_u.push(T),T=v;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var X=N_(T,$,o);n_(T,X);break e;case 1:F=$;var q=T.type,K=T.stateNode;if((T.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Li===null||!Li.has(K)))){T.flags|=65536,o&=-o,T.lanes|=o;var we=O_(T,F,o);n_(T,we);break e}}T=T.return}while(T!==null)}c2(c)}catch(Fe){o=Fe,Vt===c&&c!==null&&(Vt=c=c.return);continue}break}while(!0)}function u2(){var i=Qc.current;return Qc.current=Vc,i===null?Vc:i}function Zm(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),en===null||(Ss&268435455)===0&&(Kc&268435455)===0||Fi(en,on)}function rd(i,o){var c=ut;ut|=2;var h=u2();(en!==i||on!==o)&&(si=null,As(i,o));do try{S7();break}catch(E){a2(i,E)}while(!0);if(fm(),ut=c,Qc.current=h,Vt!==null)throw Error(n(261));return en=null,on=0,Gt}function S7(){for(;Vt!==null;)l2(Vt)}function v7(){for(;Vt!==null&&!QF();)l2(Vt)}function l2(i){var o=h2(i.alternate,i,Wn);i.memoizedProps=i.pendingProps,o===null?c2(i):Vt=o,Vm.current=null}function c2(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=E7(c,o,Wn),c!==null){Vt=c;return}}else{if(c=y7(c,o),c!==null){c.flags&=32767,Vt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Gt=6,Vt=null;return}}if(o=o.sibling,o!==null){Vt=o;return}Vt=o=i}while(o!==null);Gt===0&&(Gt=5)}function Cs(i,o,c){var h=mt,E=nr.transition;try{nr.transition=null,mt=1,A7(i,o,c,h)}finally{nr.transition=E,mt=h}return null}function A7(i,o,c,h){do Vo();while(Di!==null);if((ut&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=c.lanes|c.childLanes;if(oB(i,T),i===en&&(Vt=en=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Zc||(Zc=!0,p2(ac,function(){return Vo(),null})),T=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||T){T=nr.transition,nr.transition=null;var v=mt;mt=1;var F=ut;ut|=4,Vm.current=null,b7(i,c),e2(c,i),YB(Zp),pc=!!Jp,Zp=Jp=null,i.current=c,w7(c),KF(),ut=F,mt=v,nr.transition=T}else i.current=c;if(Zc&&(Zc=!1,Di=i,ed=E),T=i.pendingLanes,T===0&&(Li=null),eB(c.stateNode),Bn(i,Ut()),o!==null)for(h=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(Jc)throw Jc=!1,i=Wm,Wm=null,i;return(ed&1)!==0&&i.tag!==0&&Vo(),T=i.pendingLanes,(T&1)!==0?i===Gm?Su++:(Su=0,Gm=i):Su=0,Oi(),null}function Vo(){if(Di!==null){var i=Jw(ed),o=nr.transition,c=mt;try{if(nr.transition=null,mt=16>i?16:i,Di===null)var h=!1;else{if(i=Di,Di=null,ed=0,(ut&6)!==0)throw Error(n(331));var E=ut;for(ut|=4,Re=i.current;Re!==null;){var T=Re,v=T.child;if((Re.flags&16)!==0){var F=T.deletions;if(F!==null){for(var $=0;$<F.length;$++){var Z=F[$];for(Re=Z;Re!==null;){var ge=Re;switch(ge.tag){case 0:case 11:case 15:wu(8,ge,T)}var Te=ge.child;if(Te!==null)Te.return=ge,Re=Te;else for(;Re!==null;){ge=Re;var he=ge.sibling,Pe=ge.return;if(X_(ge),ge===Z){Re=null;break}if(he!==null){he.return=Pe,Re=he;break}Re=Pe}}}var Le=T.alternate;if(Le!==null){var De=Le.child;if(De!==null){Le.child=null;do{var Ht=De.sibling;De.sibling=null,De=Ht}while(De!==null)}}Re=T}}if((T.subtreeFlags&2064)!==0&&v!==null)v.return=T,Re=v;else e:for(;Re!==null;){if(T=Re,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:wu(9,T,T.return)}var X=T.sibling;if(X!==null){X.return=T.return,Re=X;break e}Re=T.return}}var q=i.current;for(Re=q;Re!==null;){v=Re;var K=v.child;if((v.subtreeFlags&2064)!==0&&K!==null)K.return=v,Re=K;else e:for(v=q;Re!==null;){if(F=Re,(F.flags&2048)!==0)try{switch(F.tag){case 0:case 11:case 15:Xc(9,F)}}catch(Fe){Mt(F,F.return,Fe)}if(F===v){Re=null;break e}var we=F.sibling;if(we!==null){we.return=F.return,Re=we;break e}Re=F.return}}if(ut=E,Oi(),Mr&&typeof Mr.onPostCommitFiberRoot=="function")try{Mr.onPostCommitFiberRoot(uc,i)}catch(Fe){}h=!0}return h}finally{mt=c,nr.transition=o}}return!1}function d2(i,o,c){o=Ho(c,o),o=N_(i,o,1),i=Pi(i,o,1),o=_n(),i!==null&&(Ga(i,1,o),Bn(i,o))}function Mt(i,o,c){if(i.tag===3)d2(i,i,c);else for(;o!==null;){if(o.tag===3){d2(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Li===null||!Li.has(h))){i=Ho(c,i),i=O_(o,i,1),o=Pi(o,i,1),i=_n(),o!==null&&(Ga(o,1,i),Bn(o,i));break}}o=o.return}}function C7(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=_n(),i.pingedLanes|=i.suspendedLanes&c,en===i&&(on&c)===c&&(Gt===4||Gt===3&&(on&130023424)===on&&500>Ut()-Ym?As(i,0):qm|=c),Bn(i,o)}function f2(i,o){o===0&&((i.mode&1)===0?o=1:(o=cc,cc<<=1,(cc&130023424)===0&&(cc=4194304)));var c=_n();i=ni(i,o),i!==null&&(Ga(i,o,c),Bn(i,c))}function k7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),f2(i,c)}function N7(i,o){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),f2(i,c)}var h2;h2=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return Mn=!1,g7(i,o,c);Mn=(i.flags&131072)!==0}else Mn=!1,Nt&&(o.flags&1048576)!==0&&Yx(o,Pc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Wc(i,o),i=o.pendingProps;var E=Po(o,pn.current);Bo(o,c),E=_m(null,o,h,i,E,c);var T=Sm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Dn(h)?(T=!0,Nc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,gm(o),E.updater=qc,o.stateNode=E,E._reactInternals=o,Om(o,h,i,c),o=Lm(null,o,h,!0,T,c)):(o.tag=0,Nt&&T&&om(o),xn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(Wc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=I7(h),i=Er(h,i),E){case 0:o=Rm(null,o,h,i,c);break e;case 1:o=U_(null,o,h,i,c);break e;case 11:o=L_(null,o,h,i,c);break e;case 14:o=D_(null,o,h,Er(h.type,i),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Er(h,E),Rm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Er(h,E),U_(i,o,h,E,c);case 3:e:{if(H_(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,t_(i,o),Bc(o,h,null,c);var v=o.memoizedState;if(h=v.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Ho(Error(n(423)),o),o=j_(i,o,h,c,E);break e}else if(h!==E){E=Ho(Error(n(424)),o),o=j_(i,o,h,c,E);break e}else for(Yn=Ci(o.stateNode.containerInfo.firstChild),qn=o,Nt=!0,gr=null,c=Zx(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Do(),h===E){o=ii(i,o,c);break e}xn(i,o,h,c)}o=o.child}return o;case 5:return i_(o),i===null&&lm(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,v=E.children,em(h,E)?v=null:T!==null&&em(h,T)&&(o.flags|=32),B_(i,o),xn(i,o,v,c),o.child;case 6:return i===null&&lm(o),null;case 13:return z_(i,o,c);case 4:return Em(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Mo(o,null,h,c):xn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Er(h,E),L_(i,o,h,E,c);case 7:return xn(i,o,o.pendingProps,c),o.child;case 8:return xn(i,o,o.pendingProps.children,c),o.child;case 12:return xn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,v=E.value,bt(Dc,h._currentValue),h._currentValue=v,T!==null)if(mr(T.value,v)){if(T.children===E.children&&!Ln.current){o=ii(i,o,c);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var F=T.dependencies;if(F!==null){v=T.child;for(var $=F.firstContext;$!==null;){if($.context===h){if(T.tag===1){$=ri(-1,c&-c),$.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var ge=Z.pending;ge===null?$.next=$:($.next=ge.next,ge.next=$),Z.pending=$}}T.lanes|=c,$=T.alternate,$!==null&&($.lanes|=c),pm(T.return,c,o),F.lanes|=c;break}$=$.next}}else if(T.tag===10)v=T.type===o.type?null:T.child;else if(T.tag===18){if(v=T.return,v===null)throw Error(n(341));v.lanes|=c,F=v.alternate,F!==null&&(F.lanes|=c),pm(v,c,o),v=T.sibling}else v=T.child;if(v!==null)v.return=T;else for(v=T;v!==null;){if(v===o){v=null;break}if(T=v.sibling,T!==null){T.return=v.return,v=T;break}v=v.return}T=v}xn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Bo(o,c),E=er(E),h=h(E),o.flags|=1,xn(i,o,h,c),o.child;case 14:return h=o.type,E=Er(h,o.pendingProps),E=Er(h.type,E),D_(i,o,h,E,c);case 15:return M_(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Er(h,E),Wc(i,o),o.tag=1,Dn(h)?(i=!0,Nc(o)):i=!1,Bo(o,c),C_(o,h,E),Om(o,h,E,c),Lm(null,o,h,!0,i,c);case 19:return V_(i,o,c);case 22:return F_(i,o,c)}throw Error(n(156,o.tag))};function p2(i,o){return Ww(i,o)}function O7(i,o,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(i,o,c,h){return new O7(i,o,c,h)}function e0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function I7(i){if(typeof i=="function")return e0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ne)return 11;if(i===ae)return 14}return 2}function Bi(i,o){var c=i.alternate;return c===null?(c=rr(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function id(i,o,c,h,E,T){var v=2;if(h=i,typeof i=="function")e0(i)&&(v=1);else if(typeof i=="string")v=5;else e:switch(i){case V:return ks(c.children,E,T,o);case ee:v=8,E|=8;break;case ce:return i=rr(12,c,o,E|2),i.elementType=ce,i.lanes=T,i;case ue:return i=rr(13,c,o,E),i.elementType=ue,i.lanes=T,i;case fe:return i=rr(19,c,o,E),i.elementType=fe,i.lanes=T,i;case de:return sd(c,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:v=10;break e;case ie:v=9;break e;case ne:v=11;break e;case ae:v=14;break e;case ve:v=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=rr(v,c,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function ks(i,o,c,h){return i=rr(7,i,h,o),i.lanes=c,i}function sd(i,o,c,h){return i=rr(22,i,h,o),i.elementType=de,i.lanes=c,i.stateNode={isHidden:!1},i}function t0(i,o,c){return i=rr(6,i,null,o),i.lanes=c,i}function n0(i,o,c){return o=rr(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function P7(i,o,c,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Np(0),this.expirationTimes=Np(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Np(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function r0(i,o,c,h,E,T,v,F,$){return i=new P7(i,o,c,F,$),o===1?(o=1,T===!0&&(o|=8)):o=0,T=rr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},gm(T),i}function R7(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function m2(i){if(!i)return Ni;i=i._reactInternals;e:{if(gs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Dn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Dn(c))return $x(i,c,o)}return o}function g2(i,o,c,h,E,T,v,F,$){return i=r0(c,h,!0,i,E,T,v,F,$),i.context=m2(null),c=i.current,h=_n(),E=Mi(c),T=ri(h,E),T.callback=o!=null?o:null,Pi(c,T,E),i.current.lanes=E,Ga(i,E,h),Bn(i,h),i}function od(i,o,c,h){var E=o.current,T=_n(),v=Mi(E);return c=m2(c),o.context===null?o.context=c:o.pendingContext=c,o=ri(T,v),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Pi(E,o,v),i!==null&&(br(i,E,v,T),Fc(i,E,v)),v}function ad(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function E2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function i0(i,o){E2(i,o),(i=i.alternate)&&E2(i,o)}function L7(){return null}var y2=typeof reportError=="function"?reportError:function(i){console.error(i)};function s0(i){this._internalRoot=i}ud.prototype.render=s0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));od(i,o,null,null)},ud.prototype.unmount=s0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;vs(function(){od(null,i,null,null)}),o[Jr]=null}};function ud(i){this._internalRoot=i}ud.prototype.unstable_scheduleHydration=function(i){if(i){var o=tx();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Si.length&&o!==0&&o<Si[c].priority;c++);Si.splice(c,0,i),c===0&&ix(i)}};function o0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ld(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function T2(){}function D7(i,o,c,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Z=ad(v);T.call(Z)}}var v=g2(o,h,i,0,null,!1,!1,"",T2);return i._reactRootContainer=v,i[Jr]=v.current,uu(i.nodeType===8?i.parentNode:i),vs(),v}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var F=h;h=function(){var Z=ad($);F.call(Z)}}var $=r0(i,0,!1,null,null,!1,!1,"",T2);return i._reactRootContainer=$,i[Jr]=$.current,uu(i.nodeType===8?i.parentNode:i),vs(function(){od(o,$,c,h)}),$}function cd(i,o,c,h,E){var T=c._reactRootContainer;if(T){var v=T;if(typeof E=="function"){var F=E;E=function(){var $=ad(v);F.call($)}}od(o,v,i,E)}else v=D7(c,o,i,E,h);return ad(v)}Zw=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Wa(o.pendingLanes);c!==0&&(Op(o,c|1),Bn(o,Ut()),(ut&6)===0&&($o=Ut()+500,Oi()))}break;case 13:vs(function(){var h=ni(i,1);if(h!==null){var E=_n();br(h,i,1,E)}}),i0(i,1)}},Ip=function(i){if(i.tag===13){var o=ni(i,134217728);if(o!==null){var c=_n();br(o,i,134217728,c)}i0(i,134217728)}},ex=function(i){if(i.tag===13){var o=Mi(i),c=ni(i,o);if(c!==null){var h=_n();br(c,i,o,h)}i0(i,o)}},tx=function(){return mt},nx=function(i,o){var c=mt;try{return mt=i,o()}finally{mt=c}},wo=function(i,o,c){switch(o){case"input":if(Ne(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==i&&h.form===i.form){var E=Cc(h);if(!E)throw Error(n(90));Rt(h),Ne(h,E)}}}break;case"textarea":ps(i,c);break;case"select":o=c.value,o!=null&&Dt(i,!!c.multiple,o,!1)}},Hw=Km,jw=vs;var M7={usingClientEntryPoint:!1,Events:[du,Oo,Cc,Bw,Uw,Km]},vu={findFiberByHostInstance:Es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F7={bundleType:vu.bundleType,version:vu.version,rendererPackageName:vu.rendererPackageName,rendererConfig:vu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=qw(i),i===null?null:i.stateNode},findFiberByHostInstance:vu.findFiberByHostInstance||L7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var dd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dd.isDisabled&&dd.supportsFiber)try{uc=dd.inject(F7),Mr=dd}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M7,Cn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o0(o))throw Error(n(200));return R7(i,o,null,c)},Cn.createRoot=function(i,o){if(!o0(i))throw Error(n(299));var c=!1,h="",E=y2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=r0(i,1,!1,null,null,c,!1,h,E),i[Jr]=o.current,uu(i.nodeType===8?i.parentNode:i),new s0(o)},Cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=qw(o),i=i===null?null:i.stateNode,i},Cn.flushSync=function(i){return vs(i)},Cn.hydrate=function(i,o,c){if(!ld(o))throw Error(n(200));return cd(null,i,o,!0,c)},Cn.hydrateRoot=function(i,o,c){if(!o0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,T="",v=y2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(T=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),o=g2(o,null,i,1,c!=null?c:null,E,!1,T,v),i[Jr]=o.current,uu(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new ud(o)},Cn.render=function(i,o,c){if(!ld(o))throw Error(n(200));return cd(null,i,o,!1,c)},Cn.unmountComponentAtNode=function(i){if(!ld(i))throw Error(n(40));return i._reactRootContainer?(vs(function(){cd(null,null,i,!1,function(){i._reactRootContainer=null,i[Jr]=null})}),!0):!1},Cn.unstable_batchedUpdates=Km,Cn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!ld(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return cd(i,o,c,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var s1;function o1(){if(s1)return hf.exports;s1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hf.exports=WC(),hf.exports}var Hs=o1();function a1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=a1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function B(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=a1(e))&&(r&&(r+=" "),r+=t);return r}var u1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},l1=ji.createContext&&ji.createContext(u1),GC=["attr","size","title"];function XC(e,t){if(e==null)return{};var n=QC(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QC(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nl.apply(this,arguments)}function c1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function rl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c1(Object(n),!0).forEach(function(r){KC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KC(e,t,n){return t=JC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JC(e){var t=ZC(e,"string");return typeof t=="symbol"?t:t+""}function ZC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d1(e){return e&&e.map((t,n)=>ji.createElement(t.tag,rl({key:n},t.attr),d1(t.child)))}function ft(e){return t=>ji.createElement(ek,nl({attr:rl({},e.attr)},t),d1(e.child))}function ek(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=XC(e,GC),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),ji.createElement("svg",nl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:rl(rl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&ji.createElement("title",null,a),e.children)};return l1!==void 0?ji.createElement(l1.Consumer,null,n=>t(n)):t(u1)}function tk(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function nk(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function rk(e){return ft({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ur=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:w.jsx("button",{className:B(e,`${N}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:B(`${N}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),ik="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",sk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=dt(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?w.jsx(rk,{className:B(t,`${N}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||ik,alt:"Copilot",className:B(t,`${N}-minimized-icon-img`)});return w.jsx(ur,{className:B(t,`${N}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},ok=()=>{const{globalClassName:e,themeVariables:t}=dt(),n=()=>{Lu(!1),zr(!0)};return Hs.createPortal(w.jsx("div",{className:B(e,`${N}-minimized-container`),style:t,children:w.jsx(sk,{onClick:n})}),document.body)};function ak(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function Tn(){const e=R.useContext(Pg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const uk=e=>({[`${Un}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Un}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Un}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Un}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Un}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Un}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function lk(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function f1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function ck(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function gf(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function dk(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function fk(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function hk(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function h1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function p1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function pk(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function mk(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function gk(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function m1(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const Ef=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:B(`${N}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),Ek=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:B(`${N}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(gf,{size:"16px"})},yk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(ur,{className:B(e,n,`cim-${r}-component`,`${N}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:w.jsx(gf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(Ef,{className:B(e,n,`cim-${r}-component`,`${N}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(Ek,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function hU(){}function pU(){}function g1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function E1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Tk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wk={};function y1(e,t){return(wk.jsx?bk:Tk).test(e)}const xk=/[ \t\n\f\r]/g;function _k(e){return typeof e=="object"?e.type==="text"?T1(e.value):!1:T1(e)}function T1(e){return e.replace(xk,"")===""}class aa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}aa.prototype.normal={},aa.prototype.property={},aa.prototype.space=void 0;function b1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new aa(n,r,t)}function ua(e){return e.toLowerCase()}class kn{constructor(t,n){this.attribute=n,this.property=t}}kn.prototype.attribute="",kn.prototype.booleanish=!1,kn.prototype.boolean=!1,kn.prototype.commaOrSpaceSeparated=!1,kn.prototype.commaSeparated=!1,kn.prototype.defined=!1,kn.prototype.mustUseProperty=!1,kn.prototype.number=!1,kn.prototype.overloadedBoolean=!1,kn.prototype.property="",kn.prototype.spaceSeparated=!1,kn.prototype.space=void 0;let Sk=0;const Ze=Qi(),zt=Qi(),yf=Qi(),be=Qi(),Et=Qi(),Xi=Qi(),jn=Qi();function Qi(){return hd(2,++Sk)}const Tf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:zt,commaOrSpaceSeparated:jn,commaSeparated:Xi,number:be,overloadedBoolean:yf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),bf=Object.keys(Tf);class wf extends kn{constructor(t,n,r,s){let a=-1;if(super(t,n),w1(this,"space",s),typeof r=="number")for(;++a<bf.length;){const u=bf[a];w1(this,bf[a],(r&Tf[u])===Tf[u])}}}wf.prototype.defined=!0;function w1(e,t,n){n&&(e[t]=n)}function js(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new wf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ua(r)]=r,n[ua(a.attribute)]=r}return new aa(t,n,e.space)}const x1=js({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:Et,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:be,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:Et,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:zt,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function _1(e,t){return t in e?e[t]:t}function S1(e,t){return _1(e,t.toLowerCase())}const vk=js({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xi,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alpha:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:Et,autoFocus:Ze,autoPlay:Ze,blocking:Et,capture:null,charSet:null,checked:Ze,cite:null,className:Et,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:zt,controls:Ze,controlsList:Et,coords:be|Xi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:yf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:Et,height:be,hidden:yf,high:be,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ze,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,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:Ze,optimum:be,pattern:null,ping:Et,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:Et,required:Ze,reversed:Ze,rows:be,rowSpan:be,sandbox:Et,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootCustomElementRegistry:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shadowRootSerializable:Ze,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:zt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ze,disablePictureInPicture:Ze,disableRemotePlayback:Ze,exportParts:Xi,part:Et,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:S1}),Ak=js({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",maskType:"mask-type",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:jn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:Et,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:Xi,g2:Xi,glyphName:Xi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:_1}),v1=js({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()}}),A1=js({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:S1}),C1=js({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ck={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"},kk=/[A-Z]/g,k1=/-[a-z]/g,Nk=/^data[-\w.:]+$/i;function il(e,t){const n=ua(t);let r=t,s=kn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Nk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(k1,Ik);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!k1.test(a)){let u=a.replace(kk,Ok);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=wf}return new s(r,t)}function Ok(e){return"-"+e.toLowerCase()}function Ik(e){return e.charAt(1).toUpperCase()}const la=b1([x1,vk,v1,A1,C1],"html"),ci=b1([x1,Ak,v1,A1,C1],"svg");function N1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function O1(e){return e.join(" ").trim()}var zs={},xf,I1;function Pk(){if(I1)return xf;I1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
24
- `,f="/",p="*",m="",b="comment",y="declaration";function x(A,S){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];S=S||{};var k=1,I=1;function z(fe){var ae=fe.match(t);ae&&(k+=ae.length);var ve=fe.lastIndexOf(d);I=~ve?fe.length-ve:I+fe.length}function W(){var fe={line:k,column:I};return function(ae){return ae.position=new D(fe),ce(),ae}}function D(fe){this.start=fe,this.end={line:k,column:I},this.source=S.source}D.prototype.content=A;function V(fe){var ae=new Error(S.source+":"+k+":"+I+": "+fe);if(ae.reason=fe,ae.filename=S.source,ae.line=k,ae.column=I,ae.source=A,!S.silent)throw ae}function ee(fe){var ae=fe.exec(A);if(ae){var ve=ae[0];return z(ve),A=A.slice(ve.length),ae}}function ce(){ee(n)}function H(fe){var ae;for(fe=fe||[];ae=ie();)ae!==!1&&fe.push(ae);return fe}function ie(){var fe=W();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var ae=2;m!=A.charAt(ae)&&(p!=A.charAt(ae)||f!=A.charAt(ae+1));)++ae;if(ae+=2,m===A.charAt(ae-1))return V("End of comment missing");var ve=A.slice(2,ae-2);return I+=2,z(ve),A=A.slice(ae),I+=2,fe({type:b,comment:ve})}}function ne(){var fe=W(),ae=ee(r);if(ae){if(ie(),!ee(s))return V("property missing ':'");var ve=ee(a),de=fe({type:y,property:_(ae[0].replace(e,m)),value:ve?_(ve[0].replace(e,m)):m});return ee(u),de}}function ue(){var fe=[];H(fe);for(var ae;ae=ne();)ae!==!1&&(fe.push(ae),H(fe));return fe}return ce(),ue()}function _(A){return A?A.replace(l,m):m}return xf=x,xf}var P1;function Rk(){if(P1)return zs;P1=1;var e=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=n;const t=e(Pk());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return zs}var ca={},R1;function Lk(){if(R1)return ca;R1=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return ca.camelCase=d,ca}var da,L1;function Dk(){if(L1)return da;L1=1;var e=da&&da.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(Rk()),n=Lk();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,da=r,da}var Mk=Dk();const Fk=rt(Mk),sl=D1("end"),Sr=D1("start");function D1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function M1(e){const t=Sr(e),n=sl(e);if(t&&n)return{start:t,end:n}}function fa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?F1(e.position):"start"in e||"end"in e?F1(e):"line"in e||"column"in e?_f(e):""}function _f(e){return B1(e&&e.line)+":"+B1(e&&e.column)}function F1(e){return _f(e&&e.start)+"-"+_f(e&&e.end)}function B1(e){return e&&typeof e=="number"?e:1}class ln extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=j({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=fa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ln.prototype.file="",ln.prototype.name="",ln.prototype.reason="",ln.prototype.message="",ln.prototype.stack="",ln.prototype.column=void 0,ln.prototype.line=void 0,ln.prototype.ancestors=void 0,ln.prototype.cause=void 0,ln.prototype.fatal=void 0,ln.prototype.place=void 0,ln.prototype.ruleId=void 0,ln.prototype.source=void 0;const Sf={}.hasOwnProperty,Bk=new Map,Uk=/[A-Z]/g,Hk=new Set(["table","tbody","thead","tfoot","tr"]),jk=new Set(["td","th"]),U1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Qk(n,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");r=Xk(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ci:la,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=H1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function H1(e,t,n){if(t.type==="element")return $k(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Vk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Yk(e,t,n);if(t.type==="mdxjsEsm")return qk(e,t);if(t.type==="root")return Wk(e,t,n);if(t.type==="text")return Gk(e,t)}function $k(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ci,e.schema=s),e.ancestors.push(t);const a=z1(e,t.tagName,!1),u=Kk(e,t);let l=Af(e,t);return Hk.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!_k(d):!0})),j1(e,u,a,t),vf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Vk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ha(e,t.position)}function qk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ha(e,t.position)}function Yk(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ci,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:z1(e,t.name,!0),u=Jk(e,t),l=Af(e,t);return j1(e,u,a,t),vf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Wk(e,t,n){const r={};return vf(r,Af(e,t)),e.create(t,e.Fragment,r,n)}function Gk(e,t){return t.value}function j1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Xk(e,t,n){return r;function r(s,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function Qk(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=Sr(r);return t(s,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Kk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Sf.call(t.properties,s)){const a=Zk(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&jk.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Jk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ha(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else ha(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Af(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Bk;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const l=H1(e,a,u);l!==void 0&&n.push(l)}return n}function Zk(e,t,n){const r=il(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?E1(n):O1(n)),r.property==="style"){let s=typeof n=="object"?n:eN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=tN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Ck[r.property]||r.property:r.attribute,n]}}function eN(e,t){try{return Fk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new ln("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=U1+"#cannot-parse-style-attribute",s}}function z1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const l=y1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=y1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Sf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ha(e)}function ha(e,t){const n=new ln("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=U1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function tN(e){const t={};let n;for(n in e)Sf.call(e,n)&&(t[nN(n)]=e[n]);return t}function nN(e){let t=e.replace(Uk,rN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function rN(e){return"-"+e.toLowerCase()}const Cf={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"]},iN={};function kf(e,t){const n=iN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $1(e,r,s)}function $1(e,t,n){if(sN(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return V1(e.children,t,n)}return Array.isArray(e)?V1(e,t,n):""}function V1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=$1(e[s],t,n);return r.join("")}function sN(e){return!!(e&&typeof e=="object")}const q1=document.createElement("i");function Nf(e){const t="&"+e+";";q1.innerHTML=t;const n=q1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Xn(e,t){return e.length>0?(zn(e,e.length,0,t),e):t}const Y1={}.hasOwnProperty;function W1(e){const t={};let n=-1;for(;++n<e.length;)oN(t,e[n]);return t}function oN(e,t){let n;for(n in t){const s=(Y1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){Y1.call(s,u)||(s[u]=[]);const l=a[u];aN(s[u],Array.isArray(l)?l:l?[l]:[])}}}function aN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zn(e,0,0,r)}function G1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function lr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const bn=di(/[A-Za-z]/),cn=di(/[\dA-Za-z]/),uN=di(/[#-'*+\--9=?A-Z^-~]/);function ol(e){return e!==null&&(e<32||e===127)}const Of=di(/\d/),lN=di(/[\dA-Fa-f]/),cN=di(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const al=di(new RegExp("\\p{P}|\\p{S}","u")),Ki=di(/\s/);function di(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $s(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&cn(e.charCodeAt(n+1))&&cn(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function at(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return it(d)?(e.enter(n),l(d)):t(d)}function l(d){return it(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const dN={tokenize:fN};function fN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),at(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Ve(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const hN={tokenize:pN},X1={tokenize:mN};function pN(e){const t=this,n=[];let r=0,s,a,u;return l;function l(I){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const z=t.events.length;let W=z,D;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){D=t.events[W][1].end;break}S(r);let V=z;for(;V<t.events.length;)t.events[V][1].end=j({},D),V++;return zn(t.events,W+1,0,t.events.slice(z)),t.events.length=V,f(I)}return l(I)}function f(I){if(r===n.length){if(!s)return b(I);if(s.currentConstruct&&s.currentConstruct.concrete)return x(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(X1,p,m)(I)}function p(I){return s&&k(),S(r),b(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(I)}function b(I){return t.containerState={},e.attempt(X1,y,x)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),b(I)}function x(I){if(I===null){s&&k(),S(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),_(I)}function _(I){if(I===null){A(e.exit("chunkFlow"),!0),S(0),e.consume(I);return}return Ve(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),_)}function A(I,z){const W=t.sliceStream(I);if(z&&W.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(W),t.parser.lazy[I.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const V=t.events.length;let ee=V,ce,H;for(;ee--;)if(t.events[ee][0]==="exit"&&t.events[ee][1].type==="chunkFlow"){if(ce){H=t.events[ee][1].end;break}ce=!0}for(S(r),D=V;D<t.events.length;)t.events[D][1].end=j({},H),D++;zn(t.events,ee+1,0,t.events.slice(V)),t.events.length=D}}function S(I){let z=n.length;for(;z-- >I;){const W=n[z];t.containerState=W[1],W[0].exit.call(t,e)}n.length=I}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function mN(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vs(e){if(e===null||yt(e)||Ki(e))return 1;if(al(e))return 2}function ul(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const If={name:"attention",resolveAll:gN,tokenize:EN};function gN(e,t){let n=-1,r,s,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=j({},e[r][1].end),b=j({},e[n][1].start);Q1(m,-d),Q1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:j({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:j({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:j({},e[r][1].end),end:j({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:j({},u.start),end:j({},l.end)},e[r][1].end=j({},u.start),e[n][1].start=j({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Xn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Xn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Xn(f,ul(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Xn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Xn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,zn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function EN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Vs(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=Vs(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function Q1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const yN={name:"autolink",tokenize:TN};function TN(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return bn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||cn(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||cn(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||ol(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):uN(y)?(e.consume(y),f):n(y)}function p(y){return cn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||cn(y))&&r++<63){const x=y===45?b:m;return e.consume(y),x}return n(y)}}const pa={partial:!0,tokenize:bN};function bN(e,t,n){return r;function r(a){return it(a)?at(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ve(a)?t(a):n(a)}}const K1={continuation:{tokenize:xN},exit:_N,name:"blockQuote",tokenize:wN};function wN(e,t,n){const r=this;return s;function s(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return it(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function xN(e,t,n){const r=this;return s;function s(u){return it(u)?at(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(K1,t,n)(u)}}function _N(e){e.exit("blockQuote")}const J1={name:"characterEscape",tokenize:SN};function SN(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return cN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Z1={name:"characterReference",tokenize:vN};function vN(e,t,n){const r=this;let s=0,a,u;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=cn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=lN,p):(e.enter("characterReferenceValue"),a=7,u=Of,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===cn&&!Nf(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const eE={partial:!0,tokenize:CN},tE={concrete:!0,name:"codeFenced",tokenize:AN};function AN(e,t,n){const r=this,s={partial:!0,tokenize:W};let a=0,u=0,l;return d;function d(D){return f(D)}function f(D){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,l=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===l?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),it(D)?at(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Ve(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(eE,_,z)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Ve(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,y,"whitespace")(D)):D===96&&D===l?n(D):(e.consume(D),b)}function y(D){return D===null||Ve(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||Ve(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===l?n(D):(e.consume(D),x)}function _(D){return e.attempt(s,z,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),S}function S(D){return a>0&&it(D)?at(e,k,"linePrefix",a+1)(D):k(D)}function k(D){return D===null||Ve(D)?e.check(eE,_,z)(D):(e.enter("codeFlowValue"),I(D))}function I(D){return D===null||Ve(D)?(e.exit("codeFlowValue"),k(D)):(e.consume(D),I)}function z(D){return e.exit("codeFenced"),t(D)}function W(D,V,ee){let ce=0;return H;function H(ae){return D.enter("lineEnding"),D.consume(ae),D.exit("lineEnding"),ie}function ie(ae){return D.enter("codeFencedFence"),it(ae)?at(D,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):ne(ae)}function ne(ae){return ae===l?(D.enter("codeFencedFenceSequence"),ue(ae)):ee(ae)}function ue(ae){return ae===l?(ce++,D.consume(ae),ue):ce>=u?(D.exit("codeFencedFenceSequence"),it(ae)?at(D,fe,"whitespace")(ae):fe(ae)):ee(ae)}function fe(ae){return ae===null||Ve(ae)?(D.exit("codeFencedFence"),V(ae)):ee(ae)}}}function CN(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Pf={name:"codeIndented",tokenize:NN},kN={partial:!0,tokenize:ON};function NN(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),at(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Ve(f)?e.attempt(kN,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Ve(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function ON(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):at(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):Ve(u)?s(u):n(u)}}const IN={name:"codeText",previous:RN,resolve:PN,tokenize:LN};function PN(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function RN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function LN(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Ve(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Ve(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class DN{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,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&ma(this.left,r),a.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),ma(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ma(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);ma(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ma(this.left,n.reverse())}}}function ma(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function nE(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new DN(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,MN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=j({},p.get(s)[1].start),l=p.slice(s,n),l.unshift(r),p.splice(s,n-s+1,l))}}return zn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function MN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,b=-1,y=n,x=0,_=0;const A=[_];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<l.length;)l[b][0]==="exit"&&l[b-1][0]==="enter"&&l[b][1].type===l[b-1][1].type&&l[b][1].start.line!==l[b][1].end.line&&(_=b+1,A.push(_),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),b=A.length;b--;){const S=l.slice(A[b],A[b+1]),k=a.pop();d.push([k,k+S.length-1]),e.splice(k,2,S)}for(d.reverse(),b=-1;++b<d.length;)f[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return f}const FN={resolve:UN,tokenize:HN},BN={partial:!0,tokenize:jN};function UN(e){return nE(e),e}function HN(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):Ve(l)?e.check(BN,u,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function jN(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(u){if(u===null||Ve(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function rE(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(S),e.exit(a),b):S===null||S===32||S===41||ol(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),_(S))}function b(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),b(S)):S===null||S===60||Ve(S)?n(S):(e.consume(S),S===92?x:y)}function x(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function _(S){return!p&&(S===null||S===41||yt(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,_):S===41?(e.consume(S),p--,_):S===null||S===32||S===40||ol(S)?n(S):(e.consume(S),S===92?A:_)}function A(S){return S===40||S===41||S===92?(e.consume(S),_):_(S)}}function iE(e,t,n,r,s,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Ve(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Ve(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!it(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function sE(e,t,n,r,s,a){let u;return l;function l(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Ve(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),at(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Ve(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function ga(e,t){let n;return r;function r(s){return Ve(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):it(s)?at(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const zN={name:"definition",tokenize:VN},$N={partial:!0,tokenize:qN};function VN(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return iE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=lr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return yt(y)?ga(e,f)(y):f(y)}function f(y){return rE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt($N,m,m)(y)}function m(y){return it(y)?at(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Ve(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function qN(e,t,n){return r;function r(l){return yt(l)?ga(e,s)(l):n(l)}function s(l){return sE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return it(l)?at(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Ve(l)?t(l):n(l)}}const YN={name:"hardBreakEscape",tokenize:WN};function WN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Ve(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const GN={name:"headingAtx",resolve:XN,tokenize:QN};function XN(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},zn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function QN(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||yt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ve(p)?(e.exit("atxHeading"),t(p)):it(p)?at(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||yt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const KN=["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"],oE=["pre","script","style","textarea"],JN={concrete:!0,name:"htmlFlow",resolveTo:t3,tokenize:n3},ZN={partial:!0,tokenize:i3},e3={partial:!0,tokenize:r3};function t3(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 n3(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),a=!0,_):P===63?(e.consume(P),s=3,r.interrupt?t:C):bn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function b(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,x):bn(P)?(e.consume(P),s=4,r.interrupt?t:C):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:C):n(P)}function x(P){const Se="CDATA[";return P===Se.charCodeAt(l++)?(e.consume(P),l===Se.length?r.interrupt?t:ne:x):n(P)}function _(P){return bn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||yt(P)){const Se=P===47,Ae=u.toLowerCase();return!Se&&!a&&oE.includes(Ae)?(s=1,r.interrupt?t(P):ne(P)):KN.includes(u.toLowerCase())?(s=6,Se?(e.consume(P),S):r.interrupt?t(P):ne(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?k(P):I(P))}return P===45||cn(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function S(P){return P===62?(e.consume(P),r.interrupt?t:ne):n(P)}function k(P){return it(P)?(e.consume(P),k):H(P)}function I(P){return P===47?(e.consume(P),H):P===58||P===95||bn(P)?(e.consume(P),z):it(P)?(e.consume(P),I):H(P)}function z(P){return P===45||P===46||P===58||P===95||cn(P)?(e.consume(P),z):W(P)}function W(P){return P===61?(e.consume(P),D):it(P)?(e.consume(P),W):I(P)}function D(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,V):it(P)?(e.consume(P),D):ee(P)}function V(P){return P===d?(e.consume(P),d=null,ce):P===null||Ve(P)?n(P):(e.consume(P),V)}function ee(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||yt(P)?W(P):(e.consume(P),ee)}function ce(P){return P===47||P===62||it(P)?I(P):n(P)}function H(P){return P===62?(e.consume(P),ie):n(P)}function ie(P){return P===null||Ve(P)?ne(P):it(P)?(e.consume(P),ie):n(P)}function ne(P){return P===45&&s===2?(e.consume(P),ve):P===60&&s===1?(e.consume(P),de):P===62&&s===4?(e.consume(P),M):P===63&&s===3?(e.consume(P),C):P===93&&s===5?(e.consume(P),se):Ve(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ZN,J,ue)(P)):P===null||Ve(P)?(e.exit("htmlFlowData"),ue(P)):(e.consume(P),ne)}function ue(P){return e.check(e3,fe,J)(P)}function fe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ae}function ae(P){return P===null||Ve(P)?ue(P):(e.enter("htmlFlowData"),ne(P))}function ve(P){return P===45?(e.consume(P),C):ne(P)}function de(P){return P===47?(e.consume(P),u="",G):ne(P)}function G(P){if(P===62){const Se=u.toLowerCase();return oE.includes(Se)?(e.consume(P),M):ne(P)}return bn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),G):ne(P)}function se(P){return P===93?(e.consume(P),C):ne(P)}function C(P){return P===62?(e.consume(P),M):P===45&&s===2?(e.consume(P),C):ne(P)}function M(P){return P===null||Ve(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),M)}function J(P){return e.exit("htmlFlow"),t(P)}}function r3(e,t,n){const r=this;return s;function s(u){return Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function i3(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(pa,t,n)}}const s3={name:"htmlText",tokenize:o3};function o3(e,t,n){const r=this;let s,a,u;return l;function l(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),W):C===63?(e.consume(C),I):bn(C)?(e.consume(C),ee):n(C)}function f(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,x):bn(C)?(e.consume(C),k):n(C)}function p(C){return C===45?(e.consume(C),y):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),b):Ve(C)?(u=m,de(C)):(e.consume(C),m)}function b(C){return C===45?(e.consume(C),y):m(C)}function y(C){return C===62?ve(C):C===45?b(C):m(C)}function x(C){const M="CDATA[";return C===M.charCodeAt(a++)?(e.consume(C),a===M.length?_:x):n(C)}function _(C){return C===null?n(C):C===93?(e.consume(C),A):Ve(C)?(u=_,de(C)):(e.consume(C),_)}function A(C){return C===93?(e.consume(C),S):_(C)}function S(C){return C===62?ve(C):C===93?(e.consume(C),S):_(C)}function k(C){return C===null||C===62?ve(C):Ve(C)?(u=k,de(C)):(e.consume(C),k)}function I(C){return C===null?n(C):C===63?(e.consume(C),z):Ve(C)?(u=I,de(C)):(e.consume(C),I)}function z(C){return C===62?ve(C):I(C)}function W(C){return bn(C)?(e.consume(C),D):n(C)}function D(C){return C===45||cn(C)?(e.consume(C),D):V(C)}function V(C){return Ve(C)?(u=V,de(C)):it(C)?(e.consume(C),V):ve(C)}function ee(C){return C===45||cn(C)?(e.consume(C),ee):C===47||C===62||yt(C)?ce(C):n(C)}function ce(C){return C===47?(e.consume(C),ve):C===58||C===95||bn(C)?(e.consume(C),H):Ve(C)?(u=ce,de(C)):it(C)?(e.consume(C),ce):ve(C)}function H(C){return C===45||C===46||C===58||C===95||cn(C)?(e.consume(C),H):ie(C)}function ie(C){return C===61?(e.consume(C),ne):Ve(C)?(u=ie,de(C)):it(C)?(e.consume(C),ie):ce(C)}function ne(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,ue):Ve(C)?(u=ne,de(C)):it(C)?(e.consume(C),ne):(e.consume(C),fe)}function ue(C){return C===s?(e.consume(C),s=void 0,ae):C===null?n(C):Ve(C)?(u=ue,de(C)):(e.consume(C),ue)}function fe(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||yt(C)?ce(C):(e.consume(C),fe)}function ae(C){return C===47||C===62||yt(C)?ce(C):n(C)}function ve(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function de(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),G}function G(C){return it(C)?at(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):se(C)}function se(C){return e.enter("htmlTextData"),u(C)}}const Rf={name:"labelEnd",resolveAll:c3,resolveTo:d3,tokenize:f3},a3={tokenize:h3},u3={tokenize:p3},l3={tokenize:m3};function c3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&zn(e,0,e.length,n),e}function d3(e,t){let n=e.length,r=0,s,a,u,l;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:j({},e[a][1].start),end:j({},e[e.length-1][1].end)},f={type:"label",start:j({},e[a][1].start),end:j({},e[u][1].end)},p={type:"labelText",start:j({},e[a+r+2][1].end),end:j({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=Xn(l,e.slice(a+1,a+r+3)),l=Xn(l,[["enter",p,t]]),l=Xn(l,ul(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Xn(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=Xn(l,e.slice(u+1)),l=Xn(l,[["exit",d,t]]),zn(e,a,e.length,l),e}function f3(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return l;function l(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(lr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(a3,p,u?p:m)(b):b===91?e.attempt(u3,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(l3,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function h3(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return yt(m)?ga(e,a)(m):a(m)}function a(m){return m===41?p(m):rE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return yt(m)?ga(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?sE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return yt(m)?ga(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function p3(e,t,n){const r=this;return s;function s(l){return iE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(lr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function m3(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const g3={name:"labelStartImage",resolveAll:Rf.resolveAll,tokenize:E3};function E3(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const y3={name:"labelStartLink",resolveAll:Rf.resolveAll,tokenize:T3};function T3(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Lf={name:"lineEnding",tokenize:b3};function b3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),at(e,t,"linePrefix")}}const ll={name:"thematicBreak",tokenize:w3};function w3(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,l(f)}function l(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Ve(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),it(f)?at(e,l,"whitespace")(f):l(f))}}const Nn={continuation:{tokenize:v3},exit:C3,name:"list",tokenize:S3},x3={partial:!0,tokenize:k3},_3={partial:!0,tokenize:A3};function S3(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return l;function l(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Of(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(ll,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Of(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(pa,r.interrupt?n:p,e.attempt(x3,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return it(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function v3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(pa,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,at(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!it(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,at(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function A3(e,t,n){const r=this;return at(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function C3(e){e.exit(this.containerState.type)}function k3(e,t,n){const r=this;return at(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!it(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const aE={name:"setextUnderline",resolveTo:N3,tokenize:O3};function N3(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:j({},e[r][1].start),end:j({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=j({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function O3(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===s?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),it(f)?at(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ve(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const I3={tokenize:P3};function P3(e){const t=this,n=e.attempt(pa,r,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(FN,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const R3={resolveAll:lE()},L3=uE("string"),D3=uE("text");function uE(e){return{resolveAll:lE(e==="text"?M3:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function lE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function M3(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,l=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:j({},r.end)};r.end=j({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const F3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:zN},disable:{null:[]},document:{42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:K1},flow:{35:GN,42:ll,45:[aE,ll],60:JN,61:aE,95:ll,96:tE,126:tE},flowInitial:{[-2]:Pf,[-1]:Pf,32:Pf},insideSpan:{null:[If,R3]},string:{38:Z1,92:J1},text:{[-5]:Lf,[-4]:Lf,[-3]:Lf,33:g3,38:Z1,42:If,60:[yN,s3],91:y3,92:[YN,J1],93:Rf,95:If,96:IN}},Symbol.toStringTag,{value:"Module"}));function B3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],l=[];const d={attempt:V(W),check:V(D),consume:k,enter:I,exit:z,interrupt:V(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:_,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=Xn(u,ie),A(),u[u.length-1]!==null?[]:(ee(t,0),f.events=ul(a,f.events,f),f.events)}function b(ie,ne){return H3(y(ie),ne)}function y(ie){return U3(u,ie)}function x(){const{_bufferIndex:ie,_index:ne,line:ue,column:fe,offset:ae}=r;return{_bufferIndex:ie,_index:ne,line:ue,column:fe,offset:ae}}function _(ie){s[ie.line]=ie.column,H()}function A(){let ie;for(;r._index<u.length;){const ne=u[r._index];if(typeof ne=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<ne.length;)S(ne.charCodeAt(r._bufferIndex));else S(ne)}}function S(ie){p=p(ie)}function k(ie){Ve(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,H()):ie!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ie}function I(ie,ne){const ue=ne||{};return ue.type=ie,ue.start=x(),f.events.push(["enter",ue,f]),l.push(ue),ue}function z(ie){const ne=l.pop();return ne.end=x(),f.events.push(["exit",ne,f]),ne}function W(ie,ne){ee(ie,ne.from)}function D(ie,ne){ne.restore()}function V(ie,ne){return ue;function ue(fe,ae,ve){let de,G,se,C;return Array.isArray(fe)?J(fe):"tokenize"in fe?J([fe]):M(fe);function M(me){return Ie;function Ie(Me){const Xe=Me!==null&&me[Me],st=Me!==null&&me.null,St=[...Array.isArray(Xe)?Xe:Xe?[Xe]:[],...Array.isArray(st)?st:st?[st]:[]];return J(St)(Me)}}function J(me){return de=me,G=0,me.length===0?ve:P(me[G])}function P(me){return Ie;function Ie(Me){return C=ce(),se=me,me.partial||(f.currentConstruct=me),me.name&&f.parser.constructs.disable.null.includes(me.name)?Ae():me.tokenize.call(ne?Object.assign(Object.create(f),ne):f,d,Se,Ae)(Me)}}function Se(me){return ie(se,C),ae}function Ae(me){return C.restore(),++G<de.length?P(de[G]):ve}}}function ee(ie,ne){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&zn(f.events,ne,f.events.length-ne,ie.resolve(f.events.slice(ne),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function ce(){const ie=x(),ne=f.previous,ue=f.currentConstruct,fe=f.events.length,ae=Array.from(l);return{from:fe,restore:ve};function ve(){r=ie,f.previous=ne,f.currentConstruct=ue,f.events.length=fe,l=ae,H()}}function H(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function U3(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function H3(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
23
+ `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Pm(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function Rm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var y7=typeof WeakMap=="function"?WeakMap:Map;function I_(i,o,c){c=si(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Zc||(Zc=!0,Gm=h),Rm(i,o)},c}function P_(i,o,c){c=si(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;c.payload=function(){return h(E)},c.callback=function(){Rm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(c.callback=function(){Rm(i,o),typeof h!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),c}function R_(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new y7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(c)||(E.add(c),i=P7.bind(null,i,o,c),o.then(i,i))}function L_(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function D_(i,o,c,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=si(-1,1),o.tag=2,Li(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var T7=z.ReactCurrentOwner,Fn=!1;function _n(i,o,c,h){o.child=i===null?t_(o,null,c,h):Fo(o,i.child,c,h)}function M_(i,o,c,h,E){c=c.render;var T=o.ref;return Uo(o,E),h=Sm(i,o,c,h,T,E),c=vm(),i!==null&&!Fn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,oi(i,o,E)):(Nt&&c&&am(o),o.flags|=1,_n(i,o,h,E),o.child)}function F_(i,o,c,h,E){if(i===null){var T=c.type;return typeof T=="function"&&!t0(T)&&T.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=T,B_(i,o,T,h,E)):(i=sd(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var v=T.memoizedProps;if(c=c.compare,c=c!==null?c:ou,c(v,h)&&i.ref===o.ref)return oi(i,o,E)}return o.flags|=1,i=Hi(T,h),i.ref=o.ref,i.return=o,o.child=i}function B_(i,o,c,h,E){if(i!==null){var T=i.memoizedProps;if(ou(T,h)&&i.ref===o.ref)if(Fn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Fn=!0);else return o.lanes=i.lanes,oi(i,o,E)}return Lm(i,o,c,h,E)}function U_(i,o,c){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt($o,Gn),Gn|=c;else{if((c&1073741824)===0)return i=T!==null?T.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,bt($o,Gn),Gn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:c,bt($o,Gn),Gn|=h}else T!==null?(h=T.baseLanes|c,o.memoizedState=null):h=c,bt($o,Gn),Gn|=h;return _n(i,o,E,c),o.child}function H_(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Lm(i,o,c,h,E){var T=Mn(c)?ws:mn.current;return T=Ro(o,T),Uo(o,E),c=Sm(i,o,c,h,T,E),h=vm(),i!==null&&!Fn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,oi(i,o,E)):(Nt&&h&&am(o),o.flags|=1,_n(i,o,c,E),o.child)}function j_(i,o,c,h,E){if(Mn(c)){var T=!0;Oc(o)}else T=!1;if(Uo(o,E),o.stateNode===null)Gc(i,o),N_(o,c,h),Im(o,c,h,E),h=!0;else if(i===null){var v=o.stateNode,F=o.memoizedProps;v.props=F;var $=v.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=tr(Z):(Z=Mn(c)?ws:mn.current,Z=Ro(o,Z));var ge=c.getDerivedStateFromProps,Te=typeof ge=="function"||typeof v.getSnapshotBeforeUpdate=="function";Te||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(F!==h||$!==Z)&&O_(o,v,h,Z),Ri=!1;var he=o.memoizedState;v.state=he,Uc(o,h,v,E),$=o.memoizedState,F!==h||he!==$||Dn.current||Ri?(typeof ge=="function"&&(Om(o,c,ge,h),$=o.memoizedState),(F=Ri||C_(o,c,F,h,he,$,Z))?(Te||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),v.props=h,v.state=$,v.context=Z,h=F):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{v=o.stateNode,r_(i,o),F=o.memoizedProps,Z=o.type===o.elementType?F:yr(o.type,F),v.props=Z,Te=o.pendingProps,he=v.context,$=c.contextType,typeof $=="object"&&$!==null?$=tr($):($=Mn(c)?ws:mn.current,$=Ro(o,$));var Pe=c.getDerivedStateFromProps;(ge=typeof Pe=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(F!==Te||he!==$)&&O_(o,v,h,$),Ri=!1,he=o.memoizedState,v.state=he,Uc(o,h,v,E);var De=o.memoizedState;F!==Te||he!==De||Dn.current||Ri?(typeof Pe=="function"&&(Om(o,c,Pe,h),De=o.memoizedState),(Z=Ri||C_(o,c,Z,h,he,De,$)||!1)?(ge||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,De,$),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,De,$)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=De),v.props=h,v.state=De,v.context=$,h=Z):(typeof v.componentDidUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),h=!1)}return Dm(i,o,c,h,T,E)}function Dm(i,o,c,h,E,T){H_(i,o);var v=(o.flags&128)!==0;if(!h&&!v)return E&&Yx(o,c,!1),oi(i,o,T);h=o.stateNode,T7.current=o;var F=v&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&v?(o.child=Fo(o,i.child,null,T),o.child=Fo(o,null,F,T)):_n(i,o,F,T),o.memoizedState=h.state,E&&Yx(o,c,!0),o.child}function z_(i){var o=i.stateNode;o.pendingContext?Vx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&Vx(i,o.context,!1),ym(i,o.containerInfo)}function $_(i,o,c,h,E){return Mo(),dm(E),o.flags|=256,_n(i,o,c,h),o.child}var Mm={dehydrated:null,treeContext:null,retryLane:0};function Fm(i){return{baseLanes:i,cachePool:null,transitions:null}}function V_(i,o,c){var h=o.pendingProps,E=It.current,T=!1,v=(o.flags&128)!==0,F;if((F=v)||(F=i!==null&&i.memoizedState===null?!1:(E&2)!==0),F?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(It,E&1),i===null)return cm(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(v=h.children,i=h.fallback,T?(h=o.mode,T=o.child,v={mode:"hidden",children:v},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=v):T=od(v,h,0,null),i=Is(i,h,c,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Fm(c),o.memoizedState=Mm,i):Bm(o,v));if(E=i.memoizedState,E!==null&&(F=E.dehydrated,F!==null))return b7(i,o,v,h,F,E,c);if(T){T=h.fallback,v=o.mode,E=i.child,F=E.sibling;var $={mode:"hidden",children:h.children};return(v&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=Hi(E,$),h.subtreeFlags=E.subtreeFlags&14680064),F!==null?T=Hi(F,T):(T=Is(T,v,c,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,v=i.child.memoizedState,v=v===null?Fm(c):{baseLanes:v.baseLanes|c,cachePool:null,transitions:v.transitions},T.memoizedState=v,T.childLanes=i.childLanes&~c,o.memoizedState=Mm,h}return T=i.child,i=T.sibling,h=Hi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=h,o.memoizedState=null,h}function Bm(i,o){return o=od({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Wc(i,o,c,h){return h!==null&&dm(h),Fo(o,i.child,null,c),i=Bm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function b7(i,o,c,h,E,T,v){if(c)return o.flags&256?(o.flags&=-257,h=Pm(Error(n(422))),Wc(i,o,v,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=od({mode:"visible",children:h.children},E,0,null),T=Is(T,E,v,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Fo(o,i.child,null,v),o.child.memoizedState=Fm(v),o.memoizedState=Mm,T);if((o.mode&1)===0)return Wc(i,o,v,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var F=h.dgst;return h=F,T=Error(n(419)),h=Pm(T,h,void 0),Wc(i,o,v,h)}if(F=(v&i.childLanes)!==0,Fn||F){if(h=tn,h!==null){switch(v&-v){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|v))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ii(i,E),wr(h,i,E,-1))}return e0(),h=Pm(Error(n(421))),Wc(i,o,v,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=R7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Wn=Ni(E.nextSibling),Yn=o,Nt=!0,Er=null,i!==null&&(Zn[er++]=ni,Zn[er++]=ri,Zn[er++]=xs,ni=i.id,ri=i.overflow,xs=o),o=Bm(o,h.children),o.flags|=4096,o)}function q_(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),mm(i.return,o,c)}function Um(i,o,c,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=c,T.tailMode=E)}function Y_(i,o,c){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(_n(i,o,h.children,c),h=It.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&q_(i,c,o);else if(i.tag===19)q_(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(It,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(c=o.child,E=null;c!==null;)i=c.alternate,i!==null&&Hc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Um(o,!1,E,c,T);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Hc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Um(o,!0,c,null,T);break;case"together":Um(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Gc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function oi(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),ks|=o.lanes,(c&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,c=Hi(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Hi(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function w7(i,o,c){switch(o.tag){case 3:z_(o),Mo();break;case 5:o_(o);break;case 1:Mn(o.type)&&Oc(o);break;case 4:ym(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;bt(Mc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(It,It.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?V_(i,o,c):(bt(It,It.current&1),i=oi(i,o,c),i!==null?i.sibling:null);bt(It,It.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Y_(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(It,It.current),h)break;return null;case 22:case 23:return o.lanes=0,U_(i,o,c)}return oi(i,o,c)}var W_,Hm,G_,X_;W_=function(i,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Hm=function(){},G_=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,vs(Ur.current);var T=null;switch(c){case"input":E=xn(i,E),h=xn(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=Ln(i,E),h=Ln(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=kc)}Le(c,h);var v;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var F=E[Z];for(v in F)F.hasOwnProperty(v)&&(c||(c={}),c[v]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in h){var $=h[Z];if(F=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&$!==F&&($!=null||F!=null))if(Z==="style")if(F){for(v in F)!F.hasOwnProperty(v)||$&&$.hasOwnProperty(v)||(c||(c={}),c[v]="");for(v in $)$.hasOwnProperty(v)&&F[v]!==$[v]&&(c||(c={}),c[v]=$[v])}else c||(T||(T=[]),T.push(Z,c)),c=$;else Z==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,F=F?F.__html:void 0,$!=null&&F!==$&&(T=T||[]).push(Z,$)):Z==="children"?typeof $!="string"&&typeof $!="number"||(T=T||[]).push(Z,""+$):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?($!=null&&Z==="onScroll"&&vt("scroll",i),T||F===$||(T=[])):(T=T||[]).push(Z,$))}c&&(T=T||[]).push("style",c);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},X_=function(i,o,c,h){c!==h&&(o.flags|=4)};function wu(i,o){if(!Nt)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function En(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(o)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,o}function x7(i,o,c){var h=o.pendingProps;switch(um(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return En(o),null;case 1:return Mn(o.type)&&Nc(),En(o),null;case 3:return h=o.stateNode,Ho(),At(Dn),At(mn),wm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Lc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Er!==null&&(Qm(Er),Er=null))),Hm(i,o),En(o),null;case 5:Tm(o);var E=vs(gu.current);if(c=o.type,i!==null&&o.stateNode!=null)G_(i,o,c,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return En(o),null}if(i=vs(Ur.current),Lc(o)){h=o.stateNode,c=o.type;var T=o.memoizedProps;switch(h[Br]=o,h[du]=T,i=(o.mode&1)!==0,c){case"dialog":vt("cancel",h),vt("close",h);break;case"iframe":case"object":case"embed":vt("load",h);break;case"video":case"audio":for(E=0;E<uu.length;E++)vt(uu[E],h);break;case"source":vt("error",h);break;case"img":case"image":case"link":vt("error",h),vt("load",h);break;case"details":vt("toggle",h);break;case"input":Dt(h,T),vt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},vt("invalid",h);break;case"textarea":gs(h,T),vt("invalid",h)}Le(c,T),E=null;for(var v in T)if(T.hasOwnProperty(v)){var F=T[v];v==="children"?typeof F=="string"?h.textContent!==F&&(T.suppressHydrationWarning!==!0&&Ac(h.textContent,F,i),E=["children",F]):typeof F=="number"&&h.textContent!==""+F&&(T.suppressHydrationWarning!==!0&&Ac(h.textContent,F,i),E=["children",""+F]):s.hasOwnProperty(v)&&F!=null&&v==="onScroll"&&vt("scroll",h)}switch(c){case"input":St(h),Xe(h,T,!0);break;case"textarea":St(h),ys(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=kc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{v=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=oe(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=v.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=v.createElement(c,{is:h.is}):(i=v.createElement(c),c==="select"&&(v=i,h.multiple?v.multiple=!0:h.size&&(v.size=h.size))):i=v.createElementNS(i,c),i[Br]=o,i[du]=h,W_(i,o,!1,!1),o.stateNode=i;e:{switch(v=et(c,h),c){case"dialog":vt("cancel",i),vt("close",i),E=h;break;case"iframe":case"object":case"embed":vt("load",i),E=h;break;case"video":case"audio":for(E=0;E<uu.length;E++)vt(uu[E],i);E=h;break;case"source":vt("error",i),E=h;break;case"img":case"image":case"link":vt("error",i),vt("load",i),E=h;break;case"details":vt("toggle",i),E=h;break;case"input":Dt(i,h),E=xn(i,h),vt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),vt("invalid",i);break;case"textarea":gs(i,h),E=Ln(i,h),vt("invalid",i);break;default:E=h}Le(c,E),F=E;for(T in F)if(F.hasOwnProperty(T)){var $=F[T];T==="style"?Ce(i,$):T==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Ze(i,$)):T==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&at(i,$):typeof $=="number"&&at(i,""+$):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?$!=null&&T==="onScroll"&&vt("scroll",i):$!=null&&I(i,T,$,v))}switch(c){case"input":St(i),Xe(i,h,!1);break;case"textarea":St(i),ys(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Fe(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?Mt(i,!!h.multiple,T,!1):h.defaultValue!=null&&Mt(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=kc)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return En(o),null;case 6:if(i&&o.stateNode!=null)X_(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=vs(gu.current),vs(Ur.current),Lc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Br]=o,(T=h.nodeValue!==c)&&(i=Yn,i!==null))switch(i.tag){case 3:Ac(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Ac(h.nodeValue,c,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Br]=o,o.stateNode=h}return En(o),null;case 13:if(At(It),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Nt&&Wn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Jx(),Mo(),o.flags|=98560,T=!1;else if(T=Lc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Br]=o}else Mo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),T=!1}else Er!==null&&(Qm(Er),Er=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(It.current&1)!==0?Xt===0&&(Xt=3):e0())),o.updateQueue!==null&&(o.flags|=4),En(o),null);case 4:return Ho(),Hm(i,o),i===null&&lu(o.stateNode.containerInfo),En(o),null;case 10:return pm(o.type._context),En(o),null;case 17:return Mn(o.type)&&Nc(),En(o),null;case 19:if(At(It),T=o.memoizedState,T===null)return En(o),null;if(h=(o.flags&128)!==0,v=T.rendering,v===null)if(h)wu(T,!1);else{if(Xt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(v=Hc(i),v!==null){for(o.flags|=128,wu(T,!1),h=v.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)T=c,i=h,T.flags&=14680066,v=T.alternate,v===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=v.childLanes,T.lanes=v.lanes,T.child=v.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=v.memoizedProps,T.memoizedState=v.memoizedState,T.updateQueue=v.updateQueue,T.type=v.type,i=v.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return bt(It,It.current&1|2),o.child}i=i.sibling}T.tail!==null&&Ht()>Vo&&(o.flags|=128,h=!0,wu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Hc(v),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),wu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!v.alternate&&!Nt)return En(o),null}else 2*Ht()-T.renderingStartTime>Vo&&c!==1073741824&&(o.flags|=128,h=!0,wu(T,!1),o.lanes=4194304);T.isBackwards?(v.sibling=o.child,o.child=v):(c=T.last,c!==null?c.sibling=v:o.child=v,T.last=v)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Ht(),o.sibling=null,c=It.current,bt(It,h?c&1|2:c&1),o):(En(o),null);case 22:case 23:return Zm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Gn&1073741824)!==0&&(En(o),o.subtreeFlags&6&&(o.flags|=8192)):En(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function _7(i,o){switch(um(o),o.tag){case 1:return Mn(o.type)&&Nc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Ho(),At(Dn),At(mn),wm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Tm(o),null;case 13:if(At(It),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Mo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return At(It),null;case 4:return Ho(),null;case 10:return pm(o.type._context),null;case 22:case 23:return Zm(),null;case 24:return null;default:return null}}var Xc=!1,yn=!1,S7=typeof WeakSet=="function"?WeakSet:Set,Re=null;function zo(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Ft(i,o,h)}else c.current=null}function jm(i,o,c){try{c()}catch(h){Ft(i,o,h)}}var K_=!1;function v7(i,o){if(Zp=mc,i=Cx(),qp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{c.nodeType,T.nodeType}catch(we){c=null;break e}var v=0,F=-1,$=-1,Z=0,ge=0,Te=i,he=null;t:for(;;){for(var Pe;Te!==c||E!==0&&Te.nodeType!==3||(F=v+E),Te!==T||h!==0&&Te.nodeType!==3||($=v+h),Te.nodeType===3&&(v+=Te.nodeValue.length),(Pe=Te.firstChild)!==null;)he=Te,Te=Pe;for(;;){if(Te===i)break t;if(he===c&&++Z===E&&(F=v),he===T&&++ge===h&&($=v),(Pe=Te.nextSibling)!==null)break;Te=he,he=Te.parentNode}Te=Pe}c=F===-1||$===-1?null:{start:F,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(em={focusedElem:i,selectionRange:c},mc=!1,Re=o;Re!==null;)if(o=Re,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Re=i;else for(;Re!==null;){o=Re;try{var De=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(De!==null){var Me=De.memoizedProps,jt=De.memoizedState,X=o.stateNode,q=X.getSnapshotBeforeUpdate(o.elementType===o.type?Me:yr(o.type,Me),jt);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var Q=o.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(we){Ft(o,o.return,we)}if(i=o.sibling,i!==null){i.return=o.return,Re=i;break}Re=o.return}return De=K_,K_=!1,De}function xu(i,o,c){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&jm(o,c,T)}E=E.next}while(E!==h)}}function Kc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function zm(i){var o=i.ref;if(o!==null){var c=i.stateNode;i.tag,i=c,typeof o=="function"?o(i):o.current=i}}function Q_(i){var o=i.alternate;o!==null&&(i.alternate=null,Q_(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Br],delete o[du],delete o[im],delete o[a7],delete o[u7])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function J_(i){return i.tag===5||i.tag===3||i.tag===4}function Z_(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||J_(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function $m(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=kc));else if(h!==4&&(i=i.child,i!==null))for($m(i,o,c),i=i.sibling;i!==null;)$m(i,o,c),i=i.sibling}function Vm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Vm(i,o,c),i=i.sibling;i!==null;)Vm(i,o,c),i=i.sibling}var on=null,Tr=!1;function Di(i,o,c){for(c=c.child;c!==null;)e2(i,o,c),c=c.sibling}function e2(i,o,c){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(lc,c)}catch(F){}switch(c.tag){case 5:yn||zo(c,o);case 6:var h=on,E=Tr;on=null,Di(i,o,c),on=h,Tr=E,on!==null&&(Tr?(i=on,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):on.removeChild(c.stateNode));break;case 18:on!==null&&(Tr?(i=on,c=c.stateNode,i.nodeType===8?rm(i.parentNode,c):i.nodeType===1&&rm(i,c),eu(i)):rm(on,c.stateNode));break;case 4:h=on,E=Tr,on=c.stateNode.containerInfo,Tr=!0,Di(i,o,c),on=h,Tr=E;break;case 0:case 11:case 14:case 15:if(!yn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,v=T.destroy;T=T.tag,v!==void 0&&((T&2)!==0||(T&4)!==0)&&jm(c,o,v),E=E.next}while(E!==h)}Di(i,o,c);break;case 1:if(!yn&&(zo(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(F){Ft(c,o,F)}Di(i,o,c);break;case 21:Di(i,o,c);break;case 22:c.mode&1?(yn=(h=yn)||c.memoizedState!==null,Di(i,o,c),yn=h):Di(i,o,c);break;default:Di(i,o,c)}}function t2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new S7),o.forEach(function(h){var E=L7.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function br(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var T=i,v=o,F=v;e:for(;F!==null;){switch(F.tag){case 5:on=F.stateNode,Tr=!1;break e;case 3:on=F.stateNode.containerInfo,Tr=!0;break e;case 4:on=F.stateNode.containerInfo,Tr=!0;break e}F=F.return}if(on===null)throw Error(n(160));e2(T,v,E),on=null,Tr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(Z){Ft(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)n2(o,i),o=o.sibling}function n2(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(br(o,i),jr(i),h&4){try{xu(3,i,i.return),Kc(3,i)}catch(Me){Ft(i,i.return,Me)}try{xu(5,i,i.return)}catch(Me){Ft(i,i.return,Me)}}break;case 1:br(o,i),jr(i),h&512&&c!==null&&zo(c,c.return);break;case 5:if(br(o,i),jr(i),h&512&&c!==null&&zo(c,c.return),i.flags&32){var E=i.stateNode;try{at(E,"")}catch(Me){Ft(i,i.return,Me)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,v=c!==null?c.memoizedProps:T,F=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{F==="input"&&T.type==="radio"&&T.name!=null&&ze(E,T),et(F,v);var Z=et(F,T);for(v=0;v<$.length;v+=2){var ge=$[v],Te=$[v+1];ge==="style"?Ce(E,Te):ge==="dangerouslySetInnerHTML"?Ze(E,Te):ge==="children"?at(E,Te):I(E,ge,Te,Z)}switch(F){case"input":Oe(E,T);break;case"textarea":Es(E,T);break;case"select":var he=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Pe=T.value;Pe!=null?Mt(E,!!T.multiple,Pe,!1):he!==!!T.multiple&&(T.defaultValue!=null?Mt(E,!!T.multiple,T.defaultValue,!0):Mt(E,!!T.multiple,T.multiple?[]:"",!1))}E[du]=T}catch(Me){Ft(i,i.return,Me)}}break;case 6:if(br(o,i),jr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Me){Ft(i,i.return,Me)}}break;case 3:if(br(o,i),jr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{eu(o.containerInfo)}catch(Me){Ft(i,i.return,Me)}break;case 4:br(o,i),jr(i);break;case 13:br(o,i),jr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Wm=Ht())),h&4&&t2(i);break;case 22:if(ge=c!==null&&c.memoizedState!==null,i.mode&1?(yn=(Z=yn)||ge,br(o,i),yn=Z):br(o,i),jr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ge&&(i.mode&1)!==0)for(Re=i,ge=i.child;ge!==null;){for(Te=Re=ge;Re!==null;){switch(he=Re,Pe=he.child,he.tag){case 0:case 11:case 14:case 15:xu(4,he,he.return);break;case 1:zo(he,he.return);var De=he.stateNode;if(typeof De.componentWillUnmount=="function"){h=he,c=he.return;try{o=h,De.props=o.memoizedProps,De.state=o.memoizedState,De.componentWillUnmount()}catch(Me){Ft(h,c,Me)}}break;case 5:zo(he,he.return);break;case 22:if(he.memoizedState!==null){s2(Te);continue}}Pe!==null?(Pe.return=he,Re=Pe):s2(Te)}ge=ge.sibling}e:for(ge=null,Te=i;;){if(Te.tag===5){if(ge===null){ge=Te;try{E=Te.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(F=Te.stateNode,$=Te.memoizedProps.style,v=$!=null&&$.hasOwnProperty("display")?$.display:null,F.style.display=ke("display",v))}catch(Me){Ft(i,i.return,Me)}}}else if(Te.tag===6){if(ge===null)try{Te.stateNode.nodeValue=Z?"":Te.memoizedProps}catch(Me){Ft(i,i.return,Me)}}else if((Te.tag!==22&&Te.tag!==23||Te.memoizedState===null||Te===i)&&Te.child!==null){Te.child.return=Te,Te=Te.child;continue}if(Te===i)break e;for(;Te.sibling===null;){if(Te.return===null||Te.return===i)break e;ge===Te&&(ge=null),Te=Te.return}ge===Te&&(ge=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:br(o,i),jr(i),h&4&&t2(i);break;case 21:break;default:br(o,i),jr(i)}}function jr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(J_(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(at(E,""),h.flags&=-33);var T=Z_(i);Vm(i,T,E);break;case 3:case 4:var v=h.stateNode.containerInfo,F=Z_(i);$m(i,F,v);break;default:throw Error(n(161))}}catch($){Ft(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function A7(i,o,c){Re=i,r2(i)}function r2(i,o,c){for(var h=(i.mode&1)!==0;Re!==null;){var E=Re,T=E.child;if(E.tag===22&&h){var v=E.memoizedState!==null||Xc;if(!v){var F=E.alternate,$=F!==null&&F.memoizedState!==null||yn;F=Xc;var Z=yn;if(Xc=v,(yn=$)&&!Z)for(Re=E;Re!==null;)v=Re,$=v.child,v.tag===22&&v.memoizedState!==null?o2(E):$!==null?($.return=v,Re=$):o2(E);for(;T!==null;)Re=T,r2(T),T=T.sibling;Re=E,Xc=F,yn=Z}i2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Re=T):i2(i)}}function i2(i){for(;Re!==null;){var o=Re;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:yn||Kc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!yn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:yr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&s_(o,T,h);break;case 3:var v=o.updateQueue;if(v!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}s_(o,v,c)}break;case 5:var F=o.stateNode;if(c===null&&o.flags&4){c=F;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var ge=Z.memoizedState;if(ge!==null){var Te=ge.dehydrated;Te!==null&&eu(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}yn||o.flags&512&&zm(o)}catch(he){Ft(o,o.return,he)}}if(o===i){Re=null;break}if(c=o.sibling,c!==null){c.return=o.return,Re=c;break}Re=o.return}}function s2(i){for(;Re!==null;){var o=Re;if(o===i){Re=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Re=c;break}Re=o.return}}function o2(i){for(;Re!==null;){var o=Re;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Kc(4,o)}catch($){Ft(o,c,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){Ft(o,E,$)}}var T=o.return;try{zm(o)}catch($){Ft(o,T,$)}break;case 5:var v=o.return;try{zm(o)}catch($){Ft(o,v,$)}}}catch($){Ft(o,o.return,$)}if(o===i){Re=null;break}var F=o.sibling;if(F!==null){F.return=o.return,Re=F;break}Re=o.return}}var k7=Math.ceil,Qc=z.ReactCurrentDispatcher,qm=z.ReactCurrentOwner,rr=z.ReactCurrentBatchConfig,lt=0,tn=null,Vt=null,an=0,Gn=0,$o=Oi(0),Xt=0,_u=null,ks=0,Jc=0,Ym=0,Su=null,Bn=null,Wm=0,Vo=1/0,ai=null,Zc=!1,Gm=null,Mi=null,ed=!1,Fi=null,td=0,vu=0,Xm=null,nd=-1,rd=0;function Sn(){return(lt&6)!==0?Ht():nd!==-1?nd:nd=Ht()}function Bi(i){return(i.mode&1)===0?1:(lt&2)!==0&&an!==0?an&-an:c7.transition!==null?(rd===0&&(rd=Zw()),rd):(i=mt,i!==0||(i=window.event,i=i===void 0?16:ux(i.type)),i)}function wr(i,o,c,h){if(50<vu)throw vu=0,Xm=null,Error(n(185));Xa(i,c,h),((lt&2)===0||i!==tn)&&(i===tn&&((lt&2)===0&&(Jc|=c),Xt===4&&Ui(i,an)),Un(i,h),c===1&&lt===0&&(o.mode&1)===0&&(Vo=Ht()+500,Ic&&Pi()))}function Un(i,o){var c=i.callbackNode;cB(i,o);var h=fc(i,i===tn?an:0);if(h===0)c!==null&&Kw(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&Kw(c),o===1)i.tag===0?l7(u2.bind(null,i)):Wx(u2.bind(null,i)),s7(function(){(lt&6)===0&&Pi()}),c=null;else{switch(ex(h)){case 1:c=Cp;break;case 4:c=Qw;break;case 16:c=uc;break;case 536870912:c=Jw;break;default:c=uc}c=g2(c,a2.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function a2(i,o){if(nd=-1,rd=0,(lt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(qo()&&i.callbackNode!==c)return null;var h=fc(i,i===tn?an:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=id(i,h);else{o=h;var E=lt;lt|=2;var T=c2();(tn!==i||an!==o)&&(ai=null,Vo=Ht()+500,Ns(i,o));do try{O7();break}catch(F){l2(i,F)}while(!0);hm(),Qc.current=T,lt=E,Vt!==null?o=0:(tn=null,an=0,o=Xt)}if(o!==0){if(o===2&&(E=Np(i),E!==0&&(h=E,o=Km(i,E))),o===1)throw c=_u,Ns(i,0),Ui(i,h),Un(i,Ht()),c;if(o===6)Ui(i,h);else{if(E=i.current.alternate,(h&30)===0&&!C7(E)&&(o=id(i,h),o===2&&(T=Np(i),T!==0&&(h=T,o=Km(i,T))),o===1))throw c=_u,Ns(i,0),Ui(i,h),Un(i,Ht()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Os(i,Bn,ai);break;case 3:if(Ui(i,h),(h&130023424)===h&&(o=Wm+500-Ht(),10<o)){if(fc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Sn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=nm(Os.bind(null,i,Bn,ai),o);break}Os(i,Bn,ai);break;case 4:if(Ui(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var v=31-mr(h);T=1<<v,v=o[v],v>E&&(E=v),h&=~T}if(h=E,h=Ht()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*k7(h/1960))-h,10<h){i.timeoutHandle=nm(Os.bind(null,i,Bn,ai),h);break}Os(i,Bn,ai);break;case 5:Os(i,Bn,ai);break;default:throw Error(n(329))}}}return Un(i,Ht()),i.callbackNode===c?a2.bind(null,i):null}function Km(i,o){var c=Su;return i.current.memoizedState.isDehydrated&&(Ns(i,o).flags|=256),i=id(i,o),i!==2&&(o=Bn,Bn=c,o!==null&&Qm(o)),i}function Qm(i){Bn===null?Bn=i:Bn.push.apply(Bn,i)}function C7(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],T=E.getSnapshot;E=E.value;try{if(!gr(T(),E))return!1}catch(v){return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ui(i,o){for(o&=~Ym,o&=~Jc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-mr(o),h=1<<c;i[c]=-1,o&=~h}}function u2(i){if((lt&6)!==0)throw Error(n(327));qo();var o=fc(i,0);if((o&1)===0)return Un(i,Ht()),null;var c=id(i,o);if(i.tag!==0&&c===2){var h=Np(i);h!==0&&(o=h,c=Km(i,h))}if(c===1)throw c=_u,Ns(i,0),Ui(i,o),Un(i,Ht()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Os(i,Bn,ai),Un(i,Ht()),null}function Jm(i,o){var c=lt;lt|=1;try{return i(o)}finally{lt=c,lt===0&&(Vo=Ht()+500,Ic&&Pi())}}function Cs(i){Fi!==null&&Fi.tag===0&&(lt&6)===0&&qo();var o=lt;lt|=1;var c=rr.transition,h=mt;try{if(rr.transition=null,mt=1,i)return i()}finally{mt=h,rr.transition=c,lt=o,(lt&6)===0&&Pi()}}function Zm(){Gn=$o.current,At($o)}function Ns(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,i7(c)),Vt!==null)for(c=Vt.return;c!==null;){var h=c;switch(um(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Nc();break;case 3:Ho(),At(Dn),At(mn),wm();break;case 5:Tm(h);break;case 4:Ho();break;case 13:At(It);break;case 19:At(It);break;case 10:pm(h.type._context);break;case 22:case 23:Zm()}c=c.return}if(tn=i,Vt=i=Hi(i.current,null),an=Gn=o,Xt=0,_u=null,Ym=Jc=ks=0,Bn=Su=null,Ss!==null){for(o=0;o<Ss.length;o++)if(c=Ss[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,T=c.pending;if(T!==null){var v=T.next;T.next=E,h.next=v}c.pending=h}Ss=null}return i}function l2(i,o){do{var c=Vt;try{if(hm(),jc.current=qc,zc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}zc=!1}if(As=0,en=Gt=Pt=null,Eu=!1,yu=0,qm.current=null,c===null||c.return===null){Xt=1,_u=o,Vt=null;break}e:{var T=i,v=c.return,F=c,$=o;if(o=an,F.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var Z=$,ge=F,Te=ge.tag;if((ge.mode&1)===0&&(Te===0||Te===11||Te===15)){var he=ge.alternate;he?(ge.updateQueue=he.updateQueue,ge.memoizedState=he.memoizedState,ge.lanes=he.lanes):(ge.updateQueue=null,ge.memoizedState=null)}var Pe=L_(v);if(Pe!==null){Pe.flags&=-257,D_(Pe,v,F,T,o),Pe.mode&1&&R_(T,Z,o),o=Pe,$=Z;var De=o.updateQueue;if(De===null){var Me=new Set;Me.add($),o.updateQueue=Me}else De.add($);break e}else{if((o&1)===0){R_(T,Z,o),e0();break e}$=Error(n(426))}}else if(Nt&&F.mode&1){var jt=L_(v);if(jt!==null){(jt.flags&65536)===0&&(jt.flags|=256),D_(jt,v,F,T,o),dm(jo($,F));break e}}T=$=jo($,F),Xt!==4&&(Xt=2),Su===null?Su=[T]:Su.push(T),T=v;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var X=I_(T,$,o);i_(T,X);break e;case 1:F=$;var q=T.type,Q=T.stateNode;if((T.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Mi===null||!Mi.has(Q)))){T.flags|=65536,o&=-o,T.lanes|=o;var we=P_(T,F,o);i_(T,we);break e}}T=T.return}while(T!==null)}f2(c)}catch(Ue){o=Ue,Vt===c&&c!==null&&(Vt=c=c.return);continue}break}while(!0)}function c2(){var i=Qc.current;return Qc.current=qc,i===null?qc:i}function e0(){(Xt===0||Xt===3||Xt===2)&&(Xt=4),tn===null||(ks&268435455)===0&&(Jc&268435455)===0||Ui(tn,an)}function id(i,o){var c=lt;lt|=2;var h=c2();(tn!==i||an!==o)&&(ai=null,Ns(i,o));do try{N7();break}catch(E){l2(i,E)}while(!0);if(hm(),lt=c,Qc.current=h,Vt!==null)throw Error(n(261));return tn=null,an=0,Xt}function N7(){for(;Vt!==null;)d2(Vt)}function O7(){for(;Vt!==null&&!tB();)d2(Vt)}function d2(i){var o=m2(i.alternate,i,Gn);i.memoizedProps=i.pendingProps,o===null?f2(i):Vt=o,qm.current=null}function f2(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=x7(c,o,Gn),c!==null){Vt=c;return}}else{if(c=_7(c,o),c!==null){c.flags&=32767,Vt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Xt=6,Vt=null;return}}if(o=o.sibling,o!==null){Vt=o;return}Vt=o=i}while(o!==null);Xt===0&&(Xt=5)}function Os(i,o,c){var h=mt,E=rr.transition;try{rr.transition=null,mt=1,I7(i,o,c,h)}finally{rr.transition=E,mt=h}return null}function I7(i,o,c,h){do qo();while(Fi!==null);if((lt&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=c.lanes|c.childLanes;if(dB(i,T),i===tn&&(Vt=tn=null,an=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||ed||(ed=!0,g2(uc,function(){return qo(),null})),T=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||T){T=rr.transition,rr.transition=null;var v=mt;mt=1;var F=lt;lt|=4,qm.current=null,v7(i,c),n2(c,i),QB(em),mc=!!Zp,em=Zp=null,i.current=c,A7(c),nB(),lt=F,mt=v,rr.transition=T}else i.current=c;if(ed&&(ed=!1,Fi=i,td=E),T=i.pendingLanes,T===0&&(Mi=null),sB(c.stateNode),Un(i,Ht()),o!==null)for(h=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(Zc)throw Zc=!1,i=Gm,Gm=null,i;return(td&1)!==0&&i.tag!==0&&qo(),T=i.pendingLanes,(T&1)!==0?i===Xm?vu++:(vu=0,Xm=i):vu=0,Pi(),null}function qo(){if(Fi!==null){var i=ex(td),o=rr.transition,c=mt;try{if(rr.transition=null,mt=16>i?16:i,Fi===null)var h=!1;else{if(i=Fi,Fi=null,td=0,(lt&6)!==0)throw Error(n(331));var E=lt;for(lt|=4,Re=i.current;Re!==null;){var T=Re,v=T.child;if((Re.flags&16)!==0){var F=T.deletions;if(F!==null){for(var $=0;$<F.length;$++){var Z=F[$];for(Re=Z;Re!==null;){var ge=Re;switch(ge.tag){case 0:case 11:case 15:xu(8,ge,T)}var Te=ge.child;if(Te!==null)Te.return=ge,Re=Te;else for(;Re!==null;){ge=Re;var he=ge.sibling,Pe=ge.return;if(Q_(ge),ge===Z){Re=null;break}if(he!==null){he.return=Pe,Re=he;break}Re=Pe}}}var De=T.alternate;if(De!==null){var Me=De.child;if(Me!==null){De.child=null;do{var jt=Me.sibling;Me.sibling=null,Me=jt}while(Me!==null)}}Re=T}}if((T.subtreeFlags&2064)!==0&&v!==null)v.return=T,Re=v;else e:for(;Re!==null;){if(T=Re,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:xu(9,T,T.return)}var X=T.sibling;if(X!==null){X.return=T.return,Re=X;break e}Re=T.return}}var q=i.current;for(Re=q;Re!==null;){v=Re;var Q=v.child;if((v.subtreeFlags&2064)!==0&&Q!==null)Q.return=v,Re=Q;else e:for(v=q;Re!==null;){if(F=Re,(F.flags&2048)!==0)try{switch(F.tag){case 0:case 11:case 15:Kc(9,F)}}catch(Ue){Ft(F,F.return,Ue)}if(F===v){Re=null;break e}var we=F.sibling;if(we!==null){we.return=F.return,Re=we;break e}Re=F.return}}if(lt=E,Pi(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(lc,i)}catch(Ue){}h=!0}return h}finally{mt=c,rr.transition=o}}return!1}function h2(i,o,c){o=jo(c,o),o=I_(i,o,1),i=Li(i,o,1),o=Sn(),i!==null&&(Xa(i,1,o),Un(i,o))}function Ft(i,o,c){if(i.tag===3)h2(i,i,c);else for(;o!==null;){if(o.tag===3){h2(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Mi===null||!Mi.has(h))){i=jo(c,i),i=P_(o,i,1),o=Li(o,i,1),i=Sn(),o!==null&&(Xa(o,1,i),Un(o,i));break}}o=o.return}}function P7(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=Sn(),i.pingedLanes|=i.suspendedLanes&c,tn===i&&(an&c)===c&&(Xt===4||Xt===3&&(an&130023424)===an&&500>Ht()-Wm?Ns(i,0):Ym|=c),Un(i,o)}function p2(i,o){o===0&&((i.mode&1)===0?o=1:(o=dc,dc<<=1,(dc&130023424)===0&&(dc=4194304)));var c=Sn();i=ii(i,o),i!==null&&(Xa(i,o,c),Un(i,c))}function R7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),p2(i,c)}function L7(i,o){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),p2(i,c)}var m2;m2=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Dn.current)Fn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return Fn=!1,w7(i,o,c);Fn=(i.flags&131072)!==0}else Fn=!1,Nt&&(o.flags&1048576)!==0&&Gx(o,Rc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Gc(i,o),i=o.pendingProps;var E=Ro(o,mn.current);Uo(o,c),E=Sm(null,o,h,i,E,c);var T=vm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Mn(h)?(T=!0,Oc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Em(o),E.updater=Yc,o.stateNode=E,E._reactInternals=o,Im(o,h,i,c),o=Dm(null,o,h,!0,T,c)):(o.tag=0,Nt&&T&&am(o),_n(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(Gc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=M7(h),i=yr(h,i),E){case 0:o=Lm(null,o,h,i,c);break e;case 1:o=j_(null,o,h,i,c);break e;case 11:o=M_(null,o,h,i,c);break e;case 14:o=F_(null,o,h,yr(h.type,i),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),Lm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),j_(i,o,h,E,c);case 3:e:{if(z_(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,r_(i,o),Uc(o,h,null,c);var v=o.memoizedState;if(h=v.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=jo(Error(n(423)),o),o=$_(i,o,h,c,E);break e}else if(h!==E){E=jo(Error(n(424)),o),o=$_(i,o,h,c,E);break e}else for(Wn=Ni(o.stateNode.containerInfo.firstChild),Yn=o,Nt=!0,Er=null,c=t_(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Mo(),h===E){o=oi(i,o,c);break e}_n(i,o,h,c)}o=o.child}return o;case 5:return o_(o),i===null&&cm(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,v=E.children,tm(h,E)?v=null:T!==null&&tm(h,T)&&(o.flags|=32),H_(i,o),_n(i,o,v,c),o.child;case 6:return i===null&&cm(o),null;case 13:return V_(i,o,c);case 4:return ym(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Fo(o,null,h,c):_n(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),M_(i,o,h,E,c);case 7:return _n(i,o,o.pendingProps,c),o.child;case 8:return _n(i,o,o.pendingProps.children,c),o.child;case 12:return _n(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,v=E.value,bt(Mc,h._currentValue),h._currentValue=v,T!==null)if(gr(T.value,v)){if(T.children===E.children&&!Dn.current){o=oi(i,o,c);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var F=T.dependencies;if(F!==null){v=T.child;for(var $=F.firstContext;$!==null;){if($.context===h){if(T.tag===1){$=si(-1,c&-c),$.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var ge=Z.pending;ge===null?$.next=$:($.next=ge.next,ge.next=$),Z.pending=$}}T.lanes|=c,$=T.alternate,$!==null&&($.lanes|=c),mm(T.return,c,o),F.lanes|=c;break}$=$.next}}else if(T.tag===10)v=T.type===o.type?null:T.child;else if(T.tag===18){if(v=T.return,v===null)throw Error(n(341));v.lanes|=c,F=v.alternate,F!==null&&(F.lanes|=c),mm(v,c,o),v=T.sibling}else v=T.child;if(v!==null)v.return=T;else for(v=T;v!==null;){if(v===o){v=null;break}if(T=v.sibling,T!==null){T.return=v.return,v=T;break}v=v.return}T=v}_n(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Uo(o,c),E=tr(E),h=h(E),o.flags|=1,_n(i,o,h,c),o.child;case 14:return h=o.type,E=yr(h,o.pendingProps),E=yr(h.type,E),F_(i,o,h,E,c);case 15:return B_(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),Gc(i,o),o.tag=1,Mn(h)?(i=!0,Oc(o)):i=!1,Uo(o,c),N_(o,h,E),Im(o,h,E,c),Dm(null,o,h,!0,i,c);case 19:return Y_(i,o,c);case 22:return U_(i,o,c)}throw Error(n(156,o.tag))};function g2(i,o){return Xw(i,o)}function D7(i,o,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(i,o,c,h){return new D7(i,o,c,h)}function t0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function M7(i){if(typeof i=="function")return t0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===te)return 11;if(i===ae)return 14}return 2}function Hi(i,o){var c=i.alternate;return c===null?(c=ir(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function sd(i,o,c,h,E,T){var v=2;if(h=i,typeof i=="function")t0(i)&&(v=1);else if(typeof i=="string")v=5;else e:switch(i){case V:return Is(c.children,E,T,o);case ee:v=8,E|=8;break;case ce:return i=ir(12,c,o,E|2),i.elementType=ce,i.lanes=T,i;case ue:return i=ir(13,c,o,E),i.elementType=ue,i.lanes=T,i;case fe:return i=ir(19,c,o,E),i.elementType=fe,i.lanes=T,i;case de:return od(c,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:v=10;break e;case ie:v=9;break e;case te:v=11;break e;case ae:v=14;break e;case Se:v=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=ir(v,c,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Is(i,o,c,h){return i=ir(7,i,h,o),i.lanes=c,i}function od(i,o,c,h){return i=ir(22,i,h,o),i.elementType=de,i.lanes=c,i.stateNode={isHidden:!1},i}function n0(i,o,c){return i=ir(6,i,null,o),i.lanes=c,i}function r0(i,o,c){return o=ir(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function F7(i,o,c,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Op(0),this.expirationTimes=Op(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Op(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function i0(i,o,c,h,E,T,v,F,$){return i=new F7(i,o,c,F,$),o===1?(o=1,T===!0&&(o|=8)):o=0,T=ir(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Em(T),i}function B7(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function E2(i){if(!i)return Ii;i=i._reactInternals;e:{if(Ts(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Mn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Mn(c))return qx(i,c,o)}return o}function y2(i,o,c,h,E,T,v,F,$){return i=i0(c,h,!0,i,E,T,v,F,$),i.context=E2(null),c=i.current,h=Sn(),E=Bi(c),T=si(h,E),T.callback=o!=null?o:null,Li(c,T,E),i.current.lanes=E,Xa(i,E,h),Un(i,h),i}function ad(i,o,c,h){var E=o.current,T=Sn(),v=Bi(E);return c=E2(c),o.context===null?o.context=c:o.pendingContext=c,o=si(T,v),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Li(E,o,v),i!==null&&(wr(i,E,v,T),Bc(i,E,v)),v}function ud(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function T2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function s0(i,o){T2(i,o),(i=i.alternate)&&T2(i,o)}function U7(){return null}var b2=typeof reportError=="function"?reportError:function(i){console.error(i)};function o0(i){this._internalRoot=i}ld.prototype.render=o0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));ad(i,o,null,null)},ld.prototype.unmount=o0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Cs(function(){ad(null,i,null,null)}),o[ei]=null}};function ld(i){this._internalRoot=i}ld.prototype.unstable_scheduleHydration=function(i){if(i){var o=rx();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ai.length&&o!==0&&o<Ai[c].priority;c++);Ai.splice(c,0,i),c===0&&ox(i)}};function a0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function cd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function w2(){}function H7(i,o,c,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Z=ud(v);T.call(Z)}}var v=y2(o,h,i,0,null,!1,!1,"",w2);return i._reactRootContainer=v,i[ei]=v.current,lu(i.nodeType===8?i.parentNode:i),Cs(),v}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var F=h;h=function(){var Z=ud($);F.call(Z)}}var $=i0(i,0,!1,null,null,!1,!1,"",w2);return i._reactRootContainer=$,i[ei]=$.current,lu(i.nodeType===8?i.parentNode:i),Cs(function(){ad(o,$,c,h)}),$}function dd(i,o,c,h,E){var T=c._reactRootContainer;if(T){var v=T;if(typeof E=="function"){var F=E;E=function(){var $=ud(v);F.call($)}}ad(o,v,i,E)}else v=H7(c,o,i,E,h);return ud(v)}tx=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Ga(o.pendingLanes);c!==0&&(Ip(o,c|1),Un(o,Ht()),(lt&6)===0&&(Vo=Ht()+500,Pi()))}break;case 13:Cs(function(){var h=ii(i,1);if(h!==null){var E=Sn();wr(h,i,1,E)}}),s0(i,1)}},Pp=function(i){if(i.tag===13){var o=ii(i,134217728);if(o!==null){var c=Sn();wr(o,i,134217728,c)}s0(i,134217728)}},nx=function(i){if(i.tag===13){var o=Bi(i),c=ii(i,o);if(c!==null){var h=Sn();wr(c,i,o,h)}s0(i,o)}},rx=function(){return mt},ix=function(i,o){var c=mt;try{return mt=i,o()}finally{mt=c}},Mr=function(i,o,c){switch(o){case"input":if(Oe(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==i&&h.form===i.form){var E=Cc(h);if(!E)throw Error(n(90));Lt(h),Oe(h,E)}}}break;case"textarea":Es(i,c);break;case"select":o=c.value,o!=null&&Mt(i,!!c.multiple,o,!1)}},zw=Jm,$w=Cs;var j7={usingClientEntryPoint:!1,Events:[fu,Io,Cc,Hw,jw,Jm]},Au={findFiberByHostInstance:bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},z7={bundleType:Au.bundleType,version:Au.version,rendererPackageName:Au.rendererPackageName,rendererConfig:Au.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Ww(i),i===null?null:i.stateNode},findFiberByHostInstance:Au.findFiberByHostInstance||U7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var fd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fd.isDisabled&&fd.supportsFiber)try{lc=fd.inject(z7),Fr=fd}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j7,Cn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a0(o))throw Error(n(200));return B7(i,o,null,c)},Cn.createRoot=function(i,o){if(!a0(i))throw Error(n(299));var c=!1,h="",E=b2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=i0(i,1,!1,null,null,c,!1,h,E),i[ei]=o.current,lu(i.nodeType===8?i.parentNode:i),new o0(o)},Cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Ww(o),i=i===null?null:i.stateNode,i},Cn.flushSync=function(i){return Cs(i)},Cn.hydrate=function(i,o,c){if(!cd(o))throw Error(n(200));return dd(null,i,o,!0,c)},Cn.hydrateRoot=function(i,o,c){if(!a0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,T="",v=b2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(T=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),o=y2(o,null,i,1,c!=null?c:null,E,!1,T,v),i[ei]=o.current,lu(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new ld(o)},Cn.render=function(i,o,c){if(!cd(o))throw Error(n(200));return dd(null,i,o,!1,c)},Cn.unmountComponentAtNode=function(i){if(!cd(i))throw Error(n(40));return i._reactRootContainer?(Cs(function(){dd(null,null,i,!1,function(){i._reactRootContainer=null,i[ei]=null})}),!0):!1},Cn.unstable_batchedUpdates=Jm,Cn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!cd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return dd(i,o,c,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var a1;function u1(){if(a1)return pf.exports;a1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),pf.exports=Qk(),pf.exports}var $s=u1();function l1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=l1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function B(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=l1(e))&&(r&&(r+=" "),r+=t);return r}var c1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},d1=$i.createContext&&$i.createContext(c1),Jk=["attr","size","title"];function Zk(e,t){if(e==null)return{};var n=eC(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eC(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rl(){return rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rl.apply(this,arguments)}function f1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function il(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f1(Object(n),!0).forEach(function(r){tC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tC(e,t,n){return t=nC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nC(e){var t=rC(e,"string");return typeof t=="symbol"?t:t+""}function rC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h1(e){return e&&e.map((t,n)=>$i.createElement(t.tag,il({key:n},t.attr),h1(t.child)))}function ht(e){return t=>$i.createElement(iC,rl({attr:il({},e.attr)},t),h1(e.child))}function iC(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=Zk(e,Jk),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),$i.createElement("svg",rl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:il(il({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&$i.createElement("title",null,a),e.children)};return d1!==void 0?$i.createElement(d1.Consumer,null,n=>t(n)):t(c1)}function sC(e){return ht({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function oC(e){return ht({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function aC(e){return ht({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const lr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:w.jsx("button",{className:B(e,`${N}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:B(`${N}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),uC="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",lC=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ft(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?w.jsx(aC,{className:B(t,`${N}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||uC,alt:"Copilot",className:B(t,`${N}-minimized-icon-img`)});return w.jsx(lr,{className:B(t,`${N}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},cC=()=>{const{globalClassName:e,themeVariables:t}=ft(),n=()=>{Du(!1),$r(!0)};return $s.createPortal(w.jsx("div",{className:B(e,`${N}-minimized-container`),style:t,children:w.jsx(lC,{onClick:n})}),document.body)};function dC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function bn(){const e=R.useContext(Lg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const fC=e=>({[`${Hn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Hn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Hn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Hn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Hn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Hn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function hC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function p1(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function pC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function Ef(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function mC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function gC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function EC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function m1(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function g1(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function yC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function TC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function bC(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function E1(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const yf=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:B(`${N}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),wC=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:B(`${N}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Ef,{size:"16px"})},xC=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(lr,{className:B(e,n,`cim-${r}-component`,`${N}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:w.jsx(Ef,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(yf,{className:B(e,n,`cim-${r}-component`,`${N}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(wC,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function yU(){}function TU(){}function y1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function T1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _C=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vC={};function b1(e,t){return(vC.jsx?SC:_C).test(e)}const AC=/[ \t\n\f\r]/g;function kC(e){return typeof e=="object"?e.type==="text"?w1(e.value):!1:w1(e)}function w1(e){return e.replace(AC,"")===""}class ua{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ua.prototype.normal={},ua.prototype.property={},ua.prototype.space=void 0;function x1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ua(n,r,t)}function la(e){return e.toLowerCase()}class Nn{constructor(t,n){this.attribute=n,this.property=t}}Nn.prototype.attribute="",Nn.prototype.booleanish=!1,Nn.prototype.boolean=!1,Nn.prototype.commaOrSpaceSeparated=!1,Nn.prototype.commaSeparated=!1,Nn.prototype.defined=!1,Nn.prototype.mustUseProperty=!1,Nn.prototype.number=!1,Nn.prototype.overloadedBoolean=!1,Nn.prototype.property="",Nn.prototype.spaceSeparated=!1,Nn.prototype.space=void 0;let CC=0;const Je=Zi(),$t=Zi(),Tf=Zi(),be=Zi(),Et=Zi(),Ji=Zi(),zn=Zi();function Zi(){return pd(2,++CC)}const bf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:$t,commaOrSpaceSeparated:zn,commaSeparated:Ji,number:be,overloadedBoolean:Tf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),wf=Object.keys(bf);class xf extends Nn{constructor(t,n,r,s){let a=-1;if(super(t,n),_1(this,"space",s),typeof r=="number")for(;++a<wf.length;){const u=wf[a];_1(this,wf[a],(r&bf[u])===bf[u])}}}xf.prototype.defined=!0;function _1(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new xf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[la(r)]=r,n[la(a.attribute)]=r}return new ua(t,n,e.space)}const S1=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:Et,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:be,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:Et,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:$t,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function v1(e,t){return t in e?e[t]:t}function A1(e,t){return v1(e,t.toLowerCase())}const NC=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ji,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alpha:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:Et,autoFocus:Je,autoPlay:Je,blocking:Et,capture:null,charSet:null,checked:Je,cite:null,className:Et,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:$t,controls:Je,controlsList:Et,coords:be|Ji,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:Tf,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:Et,height:be,hidden:Tf,high:be,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:Et,itemRef:Et,itemScope:Je,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,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:Je,optimum:be,pattern:null,ping:Et,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:Et,required:Je,reversed:Je,rows:be,rowSpan:be,sandbox:Et,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootCustomElementRegistry:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shadowRootSerializable:Je,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:$t,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Je,disablePictureInPicture:Je,disableRemotePlayback:Je,exportParts:Ji,part:Et,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:A1}),OC=Vs({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",maskType:"mask-type",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:zn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:Et,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:Ji,g2:Ji,glyphName:Ji,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:v1}),k1=Vs({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()}}),C1=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:A1}),N1=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),IC={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"},PC=/[A-Z]/g,O1=/-[a-z]/g,RC=/^data[-\w.:]+$/i;function sl(e,t){const n=la(t);let r=t,s=Nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&RC.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(O1,DC);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!O1.test(a)){let u=a.replace(PC,LC);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=xf}return new s(r,t)}function LC(e){return"-"+e.toLowerCase()}function DC(e){return e.charAt(1).toUpperCase()}const ca=x1([S1,NC,k1,C1,N1],"html"),fi=x1([S1,OC,k1,C1,N1],"svg");function I1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function P1(e){return e.join(" ").trim()}var qs={},_f,R1;function MC(){if(R1)return _f;R1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
24
+ `,f="/",p="*",m="",b="comment",y="declaration";function x(A,S){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];S=S||{};var C=1,I=1;function z(fe){var ae=fe.match(t);ae&&(C+=ae.length);var Se=fe.lastIndexOf(d);I=~Se?fe.length-Se:I+fe.length}function W(){var fe={line:C,column:I};return function(ae){return ae.position=new D(fe),ce(),ae}}function D(fe){this.start=fe,this.end={line:C,column:I},this.source=S.source}D.prototype.content=A;function V(fe){var ae=new Error(S.source+":"+C+":"+I+": "+fe);if(ae.reason=fe,ae.filename=S.source,ae.line=C,ae.column=I,ae.source=A,!S.silent)throw ae}function ee(fe){var ae=fe.exec(A);if(ae){var Se=ae[0];return z(Se),A=A.slice(Se.length),ae}}function ce(){ee(n)}function H(fe){var ae;for(fe=fe||[];ae=ie();)ae!==!1&&fe.push(ae);return fe}function ie(){var fe=W();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var ae=2;m!=A.charAt(ae)&&(p!=A.charAt(ae)||f!=A.charAt(ae+1));)++ae;if(ae+=2,m===A.charAt(ae-1))return V("End of comment missing");var Se=A.slice(2,ae-2);return I+=2,z(Se),A=A.slice(ae),I+=2,fe({type:b,comment:Se})}}function te(){var fe=W(),ae=ee(r);if(ae){if(ie(),!ee(s))return V("property missing ':'");var Se=ee(a),de=fe({type:y,property:_(ae[0].replace(e,m)),value:Se?_(Se[0].replace(e,m)):m});return ee(u),de}}function ue(){var fe=[];H(fe);for(var ae;ae=te();)ae!==!1&&(fe.push(ae),H(fe));return fe}return ce(),ue()}function _(A){return A?A.replace(l,m):m}return _f=x,_f}var L1;function FC(){if(L1)return qs;L1=1;var e=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=n;const t=e(MC());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return qs}var da={},D1;function BC(){if(D1)return da;D1=1,Object.defineProperty(da,"__esModule",{value:!0}),da.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return da.camelCase=d,da}var fa,M1;function UC(){if(M1)return fa;M1=1;var e=fa&&fa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(FC()),n=BC();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,fa=r,fa}var HC=UC();const jC=rt(HC),ol=F1("end"),vr=F1("start");function F1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function B1(e){const t=vr(e),n=ol(e);if(t&&n)return{start:t,end:n}}function ha(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?U1(e.position):"start"in e||"end"in e?U1(e):"line"in e||"column"in e?Sf(e):""}function Sf(e){return H1(e&&e.line)+":"+H1(e&&e.column)}function U1(e){return Sf(e&&e.start)+"-"+Sf(e&&e.end)}function H1(e){return e&&typeof e=="number"?e:1}class cn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=j({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=ha(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}cn.prototype.file="",cn.prototype.name="",cn.prototype.reason="",cn.prototype.message="",cn.prototype.stack="",cn.prototype.column=void 0,cn.prototype.line=void 0,cn.prototype.ancestors=void 0,cn.prototype.cause=void 0,cn.prototype.fatal=void 0,cn.prototype.place=void 0,cn.prototype.ruleId=void 0,cn.prototype.source=void 0;const vf={}.hasOwnProperty,zC=new Map,$C=/[A-Z]/g,VC=new Set(["table","tbody","thead","tfoot","tr"]),qC=new Set(["td","th"]),j1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function YC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=eN(n,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");r=ZC(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?fi:ca,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=z1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function z1(e,t,n){if(t.type==="element")return WC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return GC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return KC(e,t,n);if(t.type==="mdxjsEsm")return XC(e,t);if(t.type==="root")return QC(e,t,n);if(t.type==="text")return JC(e,t)}function WC(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=fi,e.schema=s),e.ancestors.push(t);const a=V1(e,t.tagName,!1),u=tN(e,t);let l=kf(e,t);return VC.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!kC(d):!0})),$1(e,u,a,t),Af(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function GC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}pa(e,t.position)}function XC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);pa(e,t.position)}function KC(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=fi,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:V1(e,t.name,!0),u=nN(e,t),l=kf(e,t);return $1(e,u,a,t),Af(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function QC(e,t,n){const r={};return Af(r,kf(e,t)),e.create(t,e.Fragment,r,n)}function JC(e,t){return t.value}function $1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Af(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ZC(e,t,n){return r;function r(s,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function eN(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=vr(r);return t(s,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function tN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&vf.call(t.properties,s)){const a=rN(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&qC.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function nN(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else pa(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else pa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function kf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:zC;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const l=z1(e,a,u);l!==void 0&&n.push(l)}return n}function rN(e,t,n){const r=sl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?T1(n):P1(n)),r.property==="style"){let s=typeof n=="object"?n:iN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=sN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?IC[r.property]||r.property:r.attribute,n]}}function iN(e,t){try{return jC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new cn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=j1+"#cannot-parse-style-attribute",s}}function V1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const l=b1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=b1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return vf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);pa(e)}function pa(e,t){const n=new cn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=j1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sN(e){const t={};let n;for(n in e)vf.call(e,n)&&(t[oN(n)]=e[n]);return t}function oN(e){let t=e.replace($C,aN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function aN(e){return"-"+e.toLowerCase()}const Cf={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"]},uN={};function Nf(e,t){const n=uN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return q1(e,r,s)}function q1(e,t,n){if(lN(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Y1(e.children,t,n)}return Array.isArray(e)?Y1(e,t,n):""}function Y1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=q1(e[s],t,n);return r.join("")}function lN(e){return!!(e&&typeof e=="object")}const W1=document.createElement("i");function Of(e){const t="&"+e+";";W1.innerHTML=t;const n=W1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function $n(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Kn(e,t){return e.length>0?($n(e,e.length,0,t),e):t}const G1={}.hasOwnProperty;function X1(e){const t={};let n=-1;for(;++n<e.length;)cN(t,e[n]);return t}function cN(e,t){let n;for(n in t){const s=(G1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){G1.call(s,u)||(s[u]=[]);const l=a[u];dN(s[u],Array.isArray(l)?l:l?[l]:[])}}}function dN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);$n(e,0,0,r)}function K1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function cr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=hi(/[A-Za-z]/),dn=hi(/[\dA-Za-z]/),fN=hi(/[#-'*+\--9=?A-Z^-~]/);function al(e){return e!==null&&(e<32||e===127)}const If=hi(/\d/),hN=hi(/[\dA-Fa-f]/),pN=hi(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const ul=hi(new RegExp("\\p{P}|\\p{S}","u")),es=hi(/\s/);function hi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&dn(e.charCodeAt(n+1))&&dn(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function ut(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return it(d)?(e.enter(n),l(d)):t(d)}function l(d){return it(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const mN={tokenize:gN};function gN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ut(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Ve(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const EN={tokenize:yN},Q1={tokenize:TN};function yN(e){const t=this,n=[];let r=0,s,a,u;return l;function l(I){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const z=t.events.length;let W=z,D;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){D=t.events[W][1].end;break}S(r);let V=z;for(;V<t.events.length;)t.events[V][1].end=j({},D),V++;return $n(t.events,W+1,0,t.events.slice(z)),t.events.length=V,f(I)}return l(I)}function f(I){if(r===n.length){if(!s)return b(I);if(s.currentConstruct&&s.currentConstruct.concrete)return x(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Q1,p,m)(I)}function p(I){return s&&C(),S(r),b(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(I)}function b(I){return t.containerState={},e.attempt(Q1,y,x)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),b(I)}function x(I){if(I===null){s&&C(),S(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),_(I)}function _(I){if(I===null){A(e.exit("chunkFlow"),!0),S(0),e.consume(I);return}return Ve(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),_)}function A(I,z){const W=t.sliceStream(I);if(z&&W.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(W),t.parser.lazy[I.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const V=t.events.length;let ee=V,ce,H;for(;ee--;)if(t.events[ee][0]==="exit"&&t.events[ee][1].type==="chunkFlow"){if(ce){H=t.events[ee][1].end;break}ce=!0}for(S(r),D=V;D<t.events.length;)t.events[D][1].end=j({},H),D++;$n(t.events,ee+1,0,t.events.slice(V)),t.events.length=D}}function S(I){let z=n.length;for(;z-- >I;){const W=n[z];t.containerState=W[1],W[0].exit.call(t,e)}n.length=I}function C(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function TN(e,t,n){return ut(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ws(e){if(e===null||yt(e)||es(e))return 1;if(ul(e))return 2}function ll(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Pf={name:"attention",resolveAll:bN,tokenize:wN};function bN(e,t){let n=-1,r,s,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=j({},e[r][1].end),b=j({},e[n][1].start);J1(m,-d),J1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:j({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:j({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:j({},e[r][1].end),end:j({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:j({},u.start),end:j({},l.end)},e[r][1].end=j({},u.start),e[n][1].start=j({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Kn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Kn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Kn(f,ll(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Kn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Kn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,$n(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function wN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Ws(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=Ws(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function J1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const xN={name:"autolink",tokenize:_N};function _N(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return wn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||dn(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||dn(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||al(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):fN(y)?(e.consume(y),f):n(y)}function p(y){return dn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||dn(y))&&r++<63){const x=y===45?b:m;return e.consume(y),x}return n(y)}}const ma={partial:!0,tokenize:SN};function SN(e,t,n){return r;function r(a){return it(a)?ut(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ve(a)?t(a):n(a)}}const Z1={continuation:{tokenize:AN},exit:kN,name:"blockQuote",tokenize:vN};function vN(e,t,n){const r=this;return s;function s(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return it(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function AN(e,t,n){const r=this;return s;function s(u){return it(u)?ut(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Z1,t,n)(u)}}function kN(e){e.exit("blockQuote")}const eE={name:"characterEscape",tokenize:CN};function CN(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return pN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const tE={name:"characterReference",tokenize:NN};function NN(e,t,n){const r=this;let s=0,a,u;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=dn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=hN,p):(e.enter("characterReferenceValue"),a=7,u=If,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===dn&&!Of(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const nE={partial:!0,tokenize:IN},rE={concrete:!0,name:"codeFenced",tokenize:ON};function ON(e,t,n){const r=this,s={partial:!0,tokenize:W};let a=0,u=0,l;return d;function d(D){return f(D)}function f(D){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,l=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===l?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),it(D)?ut(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Ve(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(nE,_,z)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Ve(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ut(e,y,"whitespace")(D)):D===96&&D===l?n(D):(e.consume(D),b)}function y(D){return D===null||Ve(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||Ve(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===l?n(D):(e.consume(D),x)}function _(D){return e.attempt(s,z,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),S}function S(D){return a>0&&it(D)?ut(e,C,"linePrefix",a+1)(D):C(D)}function C(D){return D===null||Ve(D)?e.check(nE,_,z)(D):(e.enter("codeFlowValue"),I(D))}function I(D){return D===null||Ve(D)?(e.exit("codeFlowValue"),C(D)):(e.consume(D),I)}function z(D){return e.exit("codeFenced"),t(D)}function W(D,V,ee){let ce=0;return H;function H(ae){return D.enter("lineEnding"),D.consume(ae),D.exit("lineEnding"),ie}function ie(ae){return D.enter("codeFencedFence"),it(ae)?ut(D,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):te(ae)}function te(ae){return ae===l?(D.enter("codeFencedFenceSequence"),ue(ae)):ee(ae)}function ue(ae){return ae===l?(ce++,D.consume(ae),ue):ce>=u?(D.exit("codeFencedFenceSequence"),it(ae)?ut(D,fe,"whitespace")(ae):fe(ae)):ee(ae)}function fe(ae){return ae===null||Ve(ae)?(D.exit("codeFencedFence"),V(ae)):ee(ae)}}}function IN(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Rf={name:"codeIndented",tokenize:RN},PN={partial:!0,tokenize:LN};function RN(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),ut(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Ve(f)?e.attempt(PN,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Ve(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function LN(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):ut(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):Ve(u)?s(u):n(u)}}const DN={name:"codeText",previous:FN,resolve:MN,tokenize:BN};function MN(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function FN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BN(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Ve(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Ve(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class UN{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,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&ga(this.left,r),a.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),ga(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ga(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);ga(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ga(this.left,n.reverse())}}}function ga(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function iE(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new UN(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,HN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=j({},p.get(s)[1].start),l=p.slice(s,n),l.unshift(r),p.splice(s,n-s+1,l))}}return $n(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function HN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,b=-1,y=n,x=0,_=0;const A=[_];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<l.length;)l[b][0]==="exit"&&l[b-1][0]==="enter"&&l[b][1].type===l[b-1][1].type&&l[b][1].start.line!==l[b][1].end.line&&(_=b+1,A.push(_),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),b=A.length;b--;){const S=l.slice(A[b],A[b+1]),C=a.pop();d.push([C,C+S.length-1]),e.splice(C,2,S)}for(d.reverse(),b=-1;++b<d.length;)f[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return f}const jN={resolve:$N,tokenize:VN},zN={partial:!0,tokenize:qN};function $N(e){return iE(e),e}function VN(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):Ve(l)?e.check(zN,u,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function qN(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ut(e,a,"linePrefix")}function a(u){if(u===null||Ve(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function sE(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(S),e.exit(a),b):S===null||S===32||S===41||al(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),_(S))}function b(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),b(S)):S===null||S===60||Ve(S)?n(S):(e.consume(S),S===92?x:y)}function x(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function _(S){return!p&&(S===null||S===41||yt(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,_):S===41?(e.consume(S),p--,_):S===null||S===32||S===40||al(S)?n(S):(e.consume(S),S===92?A:_)}function A(S){return S===40||S===41||S===92?(e.consume(S),_):_(S)}}function oE(e,t,n,r,s,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Ve(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Ve(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!it(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function aE(e,t,n,r,s,a){let u;return l;function l(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Ve(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),ut(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Ve(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function Ea(e,t){let n;return r;function r(s){return Ve(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):it(s)?ut(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const YN={name:"definition",tokenize:GN},WN={partial:!0,tokenize:XN};function GN(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return oE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return yt(y)?Ea(e,f)(y):f(y)}function f(y){return sE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(WN,m,m)(y)}function m(y){return it(y)?ut(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Ve(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function XN(e,t,n){return r;function r(l){return yt(l)?Ea(e,s)(l):n(l)}function s(l){return aE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return it(l)?ut(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Ve(l)?t(l):n(l)}}const KN={name:"hardBreakEscape",tokenize:QN};function QN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Ve(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const JN={name:"headingAtx",resolve:ZN,tokenize:e3};function ZN(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$n(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function e3(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||yt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ve(p)?(e.exit("atxHeading"),t(p)):it(p)?ut(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||yt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const t3=["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"],uE=["pre","script","style","textarea"],n3={concrete:!0,name:"htmlFlow",resolveTo:s3,tokenize:o3},r3={partial:!0,tokenize:u3},i3={partial:!0,tokenize:a3};function s3(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 o3(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),a=!0,_):P===63?(e.consume(P),s=3,r.interrupt?t:k):wn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function b(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,x):wn(P)?(e.consume(P),s=4,r.interrupt?t:k):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:k):n(P)}function x(P){const _e="CDATA[";return P===_e.charCodeAt(l++)?(e.consume(P),l===_e.length?r.interrupt?t:te:x):n(P)}function _(P){return wn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||yt(P)){const _e=P===47,ve=u.toLowerCase();return!_e&&!a&&uE.includes(ve)?(s=1,r.interrupt?t(P):te(P)):t3.includes(u.toLowerCase())?(s=6,_e?(e.consume(P),S):r.interrupt?t(P):te(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?C(P):I(P))}return P===45||dn(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function S(P){return P===62?(e.consume(P),r.interrupt?t:te):n(P)}function C(P){return it(P)?(e.consume(P),C):H(P)}function I(P){return P===47?(e.consume(P),H):P===58||P===95||wn(P)?(e.consume(P),z):it(P)?(e.consume(P),I):H(P)}function z(P){return P===45||P===46||P===58||P===95||dn(P)?(e.consume(P),z):W(P)}function W(P){return P===61?(e.consume(P),D):it(P)?(e.consume(P),W):I(P)}function D(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,V):it(P)?(e.consume(P),D):ee(P)}function V(P){return P===d?(e.consume(P),d=null,ce):P===null||Ve(P)?n(P):(e.consume(P),V)}function ee(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||yt(P)?W(P):(e.consume(P),ee)}function ce(P){return P===47||P===62||it(P)?I(P):n(P)}function H(P){return P===62?(e.consume(P),ie):n(P)}function ie(P){return P===null||Ve(P)?te(P):it(P)?(e.consume(P),ie):n(P)}function te(P){return P===45&&s===2?(e.consume(P),Se):P===60&&s===1?(e.consume(P),de):P===62&&s===4?(e.consume(P),M):P===63&&s===3?(e.consume(P),k):P===93&&s===5?(e.consume(P),se):Ve(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(r3,J,ue)(P)):P===null||Ve(P)?(e.exit("htmlFlowData"),ue(P)):(e.consume(P),te)}function ue(P){return e.check(i3,fe,J)(P)}function fe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ae}function ae(P){return P===null||Ve(P)?ue(P):(e.enter("htmlFlowData"),te(P))}function Se(P){return P===45?(e.consume(P),k):te(P)}function de(P){return P===47?(e.consume(P),u="",G):te(P)}function G(P){if(P===62){const _e=u.toLowerCase();return uE.includes(_e)?(e.consume(P),M):te(P)}return wn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),G):te(P)}function se(P){return P===93?(e.consume(P),k):te(P)}function k(P){return P===62?(e.consume(P),M):P===45&&s===2?(e.consume(P),k):te(P)}function M(P){return P===null||Ve(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),M)}function J(P){return e.exit("htmlFlow"),t(P)}}function a3(e,t,n){const r=this;return s;function s(u){return Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function u3(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ma,t,n)}}const l3={name:"htmlText",tokenize:c3};function c3(e,t,n){const r=this;let s,a,u;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),W):k===63?(e.consume(k),I):wn(k)?(e.consume(k),ee):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,x):wn(k)?(e.consume(k),C):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),b):Ve(k)?(u=m,de(k)):(e.consume(k),m)}function b(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Se(k):k===45?b(k):m(k)}function x(k){const M="CDATA[";return k===M.charCodeAt(a++)?(e.consume(k),a===M.length?_:x):n(k)}function _(k){return k===null?n(k):k===93?(e.consume(k),A):Ve(k)?(u=_,de(k)):(e.consume(k),_)}function A(k){return k===93?(e.consume(k),S):_(k)}function S(k){return k===62?Se(k):k===93?(e.consume(k),S):_(k)}function C(k){return k===null||k===62?Se(k):Ve(k)?(u=C,de(k)):(e.consume(k),C)}function I(k){return k===null?n(k):k===63?(e.consume(k),z):Ve(k)?(u=I,de(k)):(e.consume(k),I)}function z(k){return k===62?Se(k):I(k)}function W(k){return wn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||dn(k)?(e.consume(k),D):V(k)}function V(k){return Ve(k)?(u=V,de(k)):it(k)?(e.consume(k),V):Se(k)}function ee(k){return k===45||dn(k)?(e.consume(k),ee):k===47||k===62||yt(k)?ce(k):n(k)}function ce(k){return k===47?(e.consume(k),Se):k===58||k===95||wn(k)?(e.consume(k),H):Ve(k)?(u=ce,de(k)):it(k)?(e.consume(k),ce):Se(k)}function H(k){return k===45||k===46||k===58||k===95||dn(k)?(e.consume(k),H):ie(k)}function ie(k){return k===61?(e.consume(k),te):Ve(k)?(u=ie,de(k)):it(k)?(e.consume(k),ie):ce(k)}function te(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,ue):Ve(k)?(u=te,de(k)):it(k)?(e.consume(k),te):(e.consume(k),fe)}function ue(k){return k===s?(e.consume(k),s=void 0,ae):k===null?n(k):Ve(k)?(u=ue,de(k)):(e.consume(k),ue)}function fe(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||yt(k)?ce(k):(e.consume(k),fe)}function ae(k){return k===47||k===62||yt(k)?ce(k):n(k)}function Se(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),G}function G(k){return it(k)?ut(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):se(k)}function se(k){return e.enter("htmlTextData"),u(k)}}const Lf={name:"labelEnd",resolveAll:p3,resolveTo:m3,tokenize:g3},d3={tokenize:E3},f3={tokenize:y3},h3={tokenize:T3};function p3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&$n(e,0,e.length,n),e}function m3(e,t){let n=e.length,r=0,s,a,u,l;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:j({},e[a][1].start),end:j({},e[e.length-1][1].end)},f={type:"label",start:j({},e[a][1].start),end:j({},e[u][1].end)},p={type:"labelText",start:j({},e[a+r+2][1].end),end:j({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=Kn(l,e.slice(a+1,a+r+3)),l=Kn(l,[["enter",p,t]]),l=Kn(l,ll(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Kn(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=Kn(l,e.slice(u+1)),l=Kn(l,[["exit",d,t]]),$n(e,a,e.length,l),e}function g3(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return l;function l(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(cr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(d3,p,u?p:m)(b):b===91?e.attempt(f3,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(h3,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function E3(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return yt(m)?Ea(e,a)(m):a(m)}function a(m){return m===41?p(m):sE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return yt(m)?Ea(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?aE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return yt(m)?Ea(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function y3(e,t,n){const r=this;return s;function s(l){return oE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function T3(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const b3={name:"labelStartImage",resolveAll:Lf.resolveAll,tokenize:w3};function w3(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const x3={name:"labelStartLink",resolveAll:Lf.resolveAll,tokenize:_3};function _3(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Df={name:"lineEnding",tokenize:S3};function S3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ut(e,t,"linePrefix")}}const cl={name:"thematicBreak",tokenize:v3};function v3(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,l(f)}function l(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Ve(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),it(f)?ut(e,l,"whitespace")(f):l(f))}}const On={continuation:{tokenize:N3},exit:I3,name:"list",tokenize:C3},A3={partial:!0,tokenize:P3},k3={partial:!0,tokenize:O3};function C3(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return l;function l(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:If(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(cl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return If(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ma,r.interrupt?n:p,e.attempt(A3,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return it(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function N3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ma,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ut(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!it(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(k3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ut(e,e.attempt(On,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function O3(e,t,n){const r=this;return ut(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function I3(e){e.exit(this.containerState.type)}function P3(e,t,n){const r=this;return ut(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!it(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const lE={name:"setextUnderline",resolveTo:R3,tokenize:L3};function R3(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:j({},e[r][1].start),end:j({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=j({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function L3(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===s?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),it(f)?ut(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ve(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const D3={tokenize:M3};function M3(e){const t=this,n=e.attempt(ma,r,e.attempt(this.parser.constructs.flowInitial,s,ut(e,e.attempt(this.parser.constructs.flow,s,e.attempt(jN,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const F3={resolveAll:dE()},B3=cE("string"),U3=cE("text");function cE(e){return{resolveAll:dE(e==="text"?H3:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function dE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function H3(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,l=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:j({},r.end)};r.end=j({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const j3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:YN},disable:{null:[]},document:{42:On,43:On,45:On,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,62:Z1},flow:{35:JN,42:cl,45:[lE,cl],60:n3,61:lE,95:cl,96:rE,126:rE},flowInitial:{[-2]:Rf,[-1]:Rf,32:Rf},insideSpan:{null:[Pf,F3]},string:{38:tE,92:eE},text:{[-5]:Df,[-4]:Df,[-3]:Df,33:b3,38:tE,42:Pf,60:[xN,l3],91:x3,92:[KN,eE],93:Lf,95:Pf,96:DN}},Symbol.toStringTag,{value:"Module"}));function z3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],l=[];const d={attempt:V(W),check:V(D),consume:C,enter:I,exit:z,interrupt:V(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:_,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=Kn(u,ie),A(),u[u.length-1]!==null?[]:(ee(t,0),f.events=ll(a,f.events,f),f.events)}function b(ie,te){return V3(y(ie),te)}function y(ie){return $3(u,ie)}function x(){const{_bufferIndex:ie,_index:te,line:ue,column:fe,offset:ae}=r;return{_bufferIndex:ie,_index:te,line:ue,column:fe,offset:ae}}function _(ie){s[ie.line]=ie.column,H()}function A(){let ie;for(;r._index<u.length;){const te=u[r._index];if(typeof te=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<te.length;)S(te.charCodeAt(r._bufferIndex));else S(te)}}function S(ie){p=p(ie)}function C(ie){Ve(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,H()):ie!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ie}function I(ie,te){const ue=te||{};return ue.type=ie,ue.start=x(),f.events.push(["enter",ue,f]),l.push(ue),ue}function z(ie){const te=l.pop();return te.end=x(),f.events.push(["exit",te,f]),te}function W(ie,te){ee(ie,te.from)}function D(ie,te){te.restore()}function V(ie,te){return ue;function ue(fe,ae,Se){let de,G,se,k;return Array.isArray(fe)?J(fe):"tokenize"in fe?J([fe]):M(fe);function M(me){return Ie;function Ie(Fe){const Ge=Fe!==null&&me[Fe],st=Fe!==null&&me.null,St=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(st)?st:st?[st]:[]];return J(St)(Fe)}}function J(me){return de=me,G=0,me.length===0?Se:P(me[G])}function P(me){return Ie;function Ie(Fe){return k=ce(),se=me,me.partial||(f.currentConstruct=me),me.name&&f.parser.constructs.disable.null.includes(me.name)?ve():me.tokenize.call(te?Object.assign(Object.create(f),te):f,d,_e,ve)(Fe)}}function _e(me){return ie(se,k),ae}function ve(me){return k.restore(),++G<de.length?P(de[G]):Se}}}function ee(ie,te){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&$n(f.events,te,f.events.length-te,ie.resolve(f.events.slice(te),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function ce(){const ie=x(),te=f.previous,ue=f.currentConstruct,fe=f.events.length,ae=Array.from(l);return{from:fe,restore:Se};function Se(){r=ie,f.previous=te,f.currentConstruct=ue,f.events.length=fe,l=ae,H()}}function H(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function $3(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function V3(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
25
25
  `;break}case-3:{u=`\r
26
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function j3(e){const r={constructs:W1([F3,...(e||{}).extensions||[]]),content:s(dN),defined:[],document:s(hN),flow:s(I3),lazy:{},string:s(L3),text:s(D3)};return r;function s(a){return u;function u(l){return B3(r,a,l)}}}function z3(e){for(;!nE(e););return e}const cE=/[\0\t\n\r]/g;function $3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(cE.lastIndex=m,f=cE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const V3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function q3(e){return e.replace(V3,Y3)}function Y3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return G1(n.slice(a?2:1),a?16:10)}return Nf(n)||e}const dE={}.hasOwnProperty;function W3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),G3(n)(z3(j3(n).document().write($3()(e,t,!0))))}function G3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(tt),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:a(Lt),blockQuote:a(st),characterEscape:ce,characterReference:ce,codeFenced:a(St),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(St,u),codeText:a(Rt,u),codeTextData:ce,data:ce,codeFlowValue:ce,definition:a(hn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(wn),hardBreakEscape:a(ze),hardBreakTrailing:a(ze),htmlFlow:a(Ne,u),htmlFlowData:ce,htmlText:a(Ne,u),htmlTextData:ce,image:a(Qe),label:u,link:a(tt),listItem:a(Dt),listItemValue:b,listOrdered:a(ht,m),listUnordered:a(ht),paragraph:a(Rn),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Lt),strong:a(hs),thematicBreak:a(ms)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:Xe,autolinkProtocol:Me,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Ae,characterReferenceMarkerNumeric:Ae,characterReferenceValue:me,characterReference:Ie,codeFenced:d(A),codeFencedFence:_,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:H,codeIndented:d(S),codeText:d(ae),codeTextData:H,data:H,definition:d(),definitionDestinationString:z,definitionLabelString:k,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(ne),hardBreakTrailing:d(ne),htmlFlow:d(ue),htmlFlowData:H,htmlText:d(fe),htmlTextData:H,image:d(de),label:se,labelText:G,lineEnding:ie,link:d(ve),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:C,resourceTitleString:M,resource:J,setextHeading:d(ee),setextHeadingLineSequence:V,setextHeadingText:D,strong:d(),thematicBreak:d()}};fE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let xe={type:"root",children:[]};const $e={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},et=[];let te=-1;for(;++te<oe.length;)if(oe[te][1].type==="listOrdered"||oe[te][1].type==="listUnordered")if(oe[te][0]==="enter")et.push(te);else{const _e=et.pop();te=s(oe,_e,te)}for(te=-1;++te<oe.length;){const _e=t[oe[te][0]];dE.call(_e,oe[te][1].type)&&_e[oe[te][1].type].call(Object.assign({sliceSerialize:oe[te][2].sliceSerialize},$e),oe[te][1])}if($e.tokenStack.length>0){const _e=$e.tokenStack[$e.tokenStack.length-1];(_e[1]||hE).call($e,void 0,_e[0])}for(xe.position={start:fi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:fi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<t.transforms.length;)xe=t.transforms[te](xe)||xe;return xe}function s(oe,xe,$e){let et=xe-1,te=-1,_e=!1,Oe,Ce,Ee,He;for(;++et<=$e;){const Ge=oe[et];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?te++:te--,He=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Oe&&!He&&!te&&!Ee&&(Ee=et),He=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:He=void 0}if(!te&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||te===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Oe){let $t=et;for(Ce=void 0;$t--;){const pt=oe[$t];if(pt[1].type==="lineEnding"||pt[1].type==="lineEndingBlank"){if(pt[0]==="exit")continue;Ce&&(oe[Ce][1].type="lineEndingBlank",_e=!0),pt[1].type="lineEnding",Ce=$t}else if(!(pt[1].type==="linePrefix"||pt[1].type==="blockQuotePrefix"||pt[1].type==="blockQuotePrefixWhitespace"||pt[1].type==="blockQuoteMarker"||pt[1].type==="listItemIndent"))break}Ee&&(!Ce||Ee<Ce)&&(Oe._spread=!0),Oe.end=Object.assign({},Ce?oe[Ce][1].start:Ge[1].end),oe.splice(Ce||et,0,["exit",Oe,Ge[2]]),et++,$e++}if(Ge[1].type==="listItemPrefix"){const $t={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Oe=$t,oe.splice(et,0,["enter",$t,Ge[2]]),et++,$e++,Ee=void 0,He=!0}}}return oe[xe][1]._spread=_e,$e}function a(oe,xe){return $e;function $e(et){l.call(this,oe(et),et),xe&&xe.call(this,et)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(oe,xe,$e){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([xe,$e||void 0]),oe.position={start:fi(xe.start),end:void 0}}function d(oe){return xe;function xe($e){oe&&oe.call(this,$e),f.call(this,$e)}}function f(oe,xe){const $e=this.stack.pop(),et=this.tokenStack.pop();if(et)et[0].type!==oe.type&&(xe?xe.call(this,oe,et[0]):(et[1]||hE).call(this,oe,et[0]));else throw new Error("Cannot close `"+oe.type+"` ("+fa({start:oe.start,end:oe.end})+"): it’s not open");$e.position.end=fi(oe.end)}function p(){return kf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(oe){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=oe}function x(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=oe}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/(\r?\n|\r)$/g,"")}function k(oe){const xe=this.resume(),$e=this.stack[this.stack.length-1];$e.label=xe,$e.identifier=lr(this.sliceSerialize(oe)).toLowerCase()}function I(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function z(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function W(oe){const xe=this.stack[this.stack.length-1];if(!xe.depth){const $e=this.sliceSerialize(oe).length;xe.depth=$e}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function V(oe){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(oe){const $e=this.stack[this.stack.length-1].children;let et=$e[$e.length-1];(!et||et.type!=="text")&&(et=ps(),et.position={start:fi(oe.start),end:void 0},$e.push(et)),this.stack.push(et)}function H(oe){const xe=this.stack.pop();xe.value+=this.sliceSerialize(oe),xe.position.end=fi(oe.end)}function ie(oe){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $e=xe.children[xe.children.length-1];$e.position.end=fi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(ce.call(this,oe),H.call(this,oe))}function ne(){this.data.atHardBreak=!0}function ue(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function fe(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function ae(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function ve(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function de(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function G(oe){const xe=this.sliceSerialize(oe),$e=this.stack[this.stack.length-2];$e.label=q3(xe),$e.identifier=lr(xe).toLowerCase()}function se(){const oe=this.stack[this.stack.length-1],xe=this.resume(),$e=this.stack[this.stack.length-1];if(this.data.inReference=!0,$e.type==="link"){const et=oe.children;$e.children=et}else $e.alt=xe}function C(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function M(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Se(oe){const xe=this.resume(),$e=this.stack[this.stack.length-1];$e.label=xe,$e.identifier=lr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Ae(oe){this.data.characterReferenceType=oe.type}function me(oe){const xe=this.sliceSerialize(oe),$e=this.data.characterReferenceType;let et;$e?(et=G1(xe,$e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):et=Nf(xe);const te=this.stack[this.stack.length-1];te.value+=et}function Ie(oe){const xe=this.stack.pop();xe.position.end=fi(oe.end)}function Me(oe){H.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(oe)}function Xe(oe){H.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(oe)}function st(){return{type:"blockquote",children:[]}}function St(){return{type:"code",lang:null,meta:null,value:""}}function Rt(){return{type:"inlineCode",value:""}}function hn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wn(){return{type:"emphasis",children:[]}}function Lt(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function Ne(){return{type:"html",value:""}}function Qe(){return{type:"image",title:null,url:"",alt:null}}function tt(){return{type:"link",title:null,url:"",children:[]}}function ht(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Dt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Rn(){return{type:"paragraph",children:[]}}function hs(){return{type:"strong",children:[]}}function ps(){return{type:"text",value:""}}function ms(){return{type:"thematicBreak"}}}function fi(e){return{line:e.line,column:e.column,offset:e.offset}}function fE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fE(e,r):X3(e,r)}}function X3(e,t){let n;for(n in t)if(dE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function hE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fa({start:t.start,end:t.end})+") is still open")}function Q3(e){const t=this;t.parser=n;function n(r){return W3(r,le(j(j({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function K3(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function J3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
- `}]}function Z3(e,t){const n=t.value?t.value+`
28
- `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function eO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=$s(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function rO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function pE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function sO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pE(e,t);const s={src:$s(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function oO(e,t){const n={src:$s(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function aO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function uO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pE(e,t);const s={href:$s(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function lO(e,t){const n={href:$s(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cO(e,t,n){const r=e.all(t),s=n?dO(n):mE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const p=r[l];(s||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
26
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function q3(e){const r={constructs:X1([j3,...(e||{}).extensions||[]]),content:s(mN),defined:[],document:s(EN),flow:s(D3),lazy:{},string:s(B3),text:s(U3)};return r;function s(a){return u;function u(l){return z3(r,a,l)}}}function Y3(e){for(;!iE(e););return e}const fE=/[\0\t\n\r]/g;function W3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(fE.lastIndex=m,f=fE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const G3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function X3(e){return e.replace(G3,K3)}function K3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return K1(n.slice(a?2:1),a?16:10)}return Of(n)||e}const hE={}.hasOwnProperty;function Q3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),J3(n)(Y3(q3(n).document().write(W3()(e,t,!0))))}function J3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(tt),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:a(Dt),blockQuote:a(st),characterEscape:ce,characterReference:ce,codeFenced:a(St),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(St,u),codeText:a(Lt,u),codeTextData:ce,data:ce,codeFlowValue:ce,definition:a(pn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(xn),hardBreakEscape:a(ze),hardBreakTrailing:a(ze),htmlFlow:a(Oe,u),htmlFlowData:ce,htmlText:a(Oe,u),htmlTextData:ce,image:a(Xe),label:u,link:a(tt),listItem:a(Mt),listItemValue:b,listOrdered:a(pt,m),listUnordered:a(pt),paragraph:a(Ln),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Dt),strong:a(gs),thematicBreak:a(ys)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:Ge,autolinkProtocol:Fe,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:me,characterReference:Ie,codeFenced:d(A),codeFencedFence:_,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:H,codeIndented:d(S),codeText:d(ae),codeTextData:H,data:H,definition:d(),definitionDestinationString:z,definitionLabelString:C,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(ue),htmlFlowData:H,htmlText:d(fe),htmlTextData:H,image:d(de),label:se,labelText:G,lineEnding:ie,link:d(Se),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:M,resource:J,setextHeading:d(ee),setextHeadingLineSequence:V,setextHeadingText:D,strong:d(),thematicBreak:d()}};pE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let xe={type:"root",children:[]};const $e={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ze=[];let at=-1;for(;++at<oe.length;)if(oe[at][1].type==="listOrdered"||oe[at][1].type==="listUnordered")if(oe[at][0]==="enter")Ze.push(at);else{const re=Ze.pop();at=s(oe,re,at)}for(at=-1;++at<oe.length;){const re=t[oe[at][0]];hE.call(re,oe[at][1].type)&&re[oe[at][1].type].call(Object.assign({sliceSerialize:oe[at][2].sliceSerialize},$e),oe[at][1])}if($e.tokenStack.length>0){const re=$e.tokenStack[$e.tokenStack.length-1];(re[1]||mE).call($e,void 0,re[0])}for(xe.position={start:pi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:pi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},at=-1;++at<t.transforms.length;)xe=t.transforms[at](xe)||xe;return xe}function s(oe,xe,$e){let Ze=xe-1,at=-1,re=!1,Ae,ke,Ce,ye;for(;++Ze<=$e;){const Le=oe[Ze];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?at++:at--,ye=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(Ae&&!ye&&!at&&!Ce&&(Ce=Ze),ye=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ye=void 0}if(!at&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||at===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(Ae){let et=Ze;for(ke=void 0;et--;){const Ot=oe[et];if(Ot[1].type==="lineEnding"||Ot[1].type==="lineEndingBlank"){if(Ot[0]==="exit")continue;ke&&(oe[ke][1].type="lineEndingBlank",re=!0),Ot[1].type="lineEnding",ke=et}else if(!(Ot[1].type==="linePrefix"||Ot[1].type==="blockQuotePrefix"||Ot[1].type==="blockQuotePrefixWhitespace"||Ot[1].type==="blockQuoteMarker"||Ot[1].type==="listItemIndent"))break}Ce&&(!ke||Ce<ke)&&(Ae._spread=!0),Ae.end=Object.assign({},ke?oe[ke][1].start:Le[1].end),oe.splice(ke||Ze,0,["exit",Ae,Le[2]]),Ze++,$e++}if(Le[1].type==="listItemPrefix"){const et={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};Ae=et,oe.splice(Ze,0,["enter",et,Le[2]]),Ze++,$e++,Ce=void 0,ye=!0}}}return oe[xe][1]._spread=re,$e}function a(oe,xe){return $e;function $e(Ze){l.call(this,oe(Ze),Ze),xe&&xe.call(this,Ze)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(oe,xe,$e){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([xe,$e||void 0]),oe.position={start:pi(xe.start),end:void 0}}function d(oe){return xe;function xe($e){oe&&oe.call(this,$e),f.call(this,$e)}}function f(oe,xe){const $e=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==oe.type&&(xe?xe.call(this,oe,Ze[0]):(Ze[1]||mE).call(this,oe,Ze[0]));else throw new Error("Cannot close `"+oe.type+"` ("+ha({start:oe.start,end:oe.end})+"): it’s not open");$e.position.end=pi(oe.end)}function p(){return Nf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(oe){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=oe}function x(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=oe}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const xe=this.resume(),$e=this.stack[this.stack.length-1];$e.label=xe,$e.identifier=cr(this.sliceSerialize(oe)).toLowerCase()}function I(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function z(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function W(oe){const xe=this.stack[this.stack.length-1];if(!xe.depth){const $e=this.sliceSerialize(oe).length;xe.depth=$e}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function V(oe){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(oe){const $e=this.stack[this.stack.length-1].children;let Ze=$e[$e.length-1];(!Ze||Ze.type!=="text")&&(Ze=Es(),Ze.position={start:pi(oe.start),end:void 0},$e.push(Ze)),this.stack.push(Ze)}function H(oe){const xe=this.stack.pop();xe.value+=this.sliceSerialize(oe),xe.position.end=pi(oe.end)}function ie(oe){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $e=xe.children[xe.children.length-1];$e.position.end=pi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(ce.call(this,oe),H.call(this,oe))}function te(){this.data.atHardBreak=!0}function ue(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function fe(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function ae(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function Se(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function de(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function G(oe){const xe=this.sliceSerialize(oe),$e=this.stack[this.stack.length-2];$e.label=X3(xe),$e.identifier=cr(xe).toLowerCase()}function se(){const oe=this.stack[this.stack.length-1],xe=this.resume(),$e=this.stack[this.stack.length-1];if(this.data.inReference=!0,$e.type==="link"){const Ze=oe.children;$e.children=Ze}else $e.alt=xe}function k(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function M(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function _e(oe){const xe=this.resume(),$e=this.stack[this.stack.length-1];$e.label=xe,$e.identifier=cr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function ve(oe){this.data.characterReferenceType=oe.type}function me(oe){const xe=this.sliceSerialize(oe),$e=this.data.characterReferenceType;let Ze;$e?(Ze=K1(xe,$e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=Of(xe);const at=this.stack[this.stack.length-1];at.value+=Ze}function Ie(oe){const xe=this.stack.pop();xe.position.end=pi(oe.end)}function Fe(oe){H.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(oe)}function Ge(oe){H.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(oe)}function st(){return{type:"blockquote",children:[]}}function St(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function pn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xn(){return{type:"emphasis",children:[]}}function Dt(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function Oe(){return{type:"html",value:""}}function Xe(){return{type:"image",title:null,url:"",alt:null}}function tt(){return{type:"link",title:null,url:"",children:[]}}function pt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Mt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Ln(){return{type:"paragraph",children:[]}}function gs(){return{type:"strong",children:[]}}function Es(){return{type:"text",value:""}}function ys(){return{type:"thematicBreak"}}}function pi(e){return{line:e.line,column:e.column,offset:e.offset}}function pE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?pE(e,r):Z3(e,r)}}function Z3(e,t){let n;for(n in t)if(hE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function mE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ha({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ha({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ha({start:t.start,end:t.end})+") is still open")}function eO(e){const t=this;t.parser=n;function n(r){return Q3(r,le(j(j({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function tO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function nO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
+ `}]}function rO(e,t){const n=t.value?t.value+`
28
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function iO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ys(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function aO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function lO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gE(e,t);const s={src:Ys(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function cO(e,t){const n={src:Ys(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function dO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function fO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gE(e,t);const s={href:Ys(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hO(e,t){const n={href:Ys(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pO(e,t,n){const r=e.all(t),s=n?mO(n):EE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const p=r[l];(s||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
29
29
  `}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
30
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function dO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=mE(n[r])}return t}function mE(e){const t=e.spread;return t==null?e.children.length>1:t}function fO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function hO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function mO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Sr(t.children[1]),d=sl(t.children[t.children.length-1]);l&&d&&(u.position={start:l,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function EO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let x={type:"element",tagName:a,properties:b,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function yO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const gE=9,EE=32;function TO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(yE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(yE(t.slice(s),s>0,!1)),a.join("")}function yE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===gE||a===EE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===gE||a===EE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function bO(e,t){const n={type:"text",value:TO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xO={blockquote:K3,break:J3,code:Z3,delete:eO,emphasis:tO,footnoteReference:nO,heading:rO,html:iO,imageReference:sO,image:oO,inlineCode:aO,linkReference:uO,link:lO,listItem:cO,list:fO,paragraph:hO,root:pO,strong:mO,table:gO,tableCell:yO,tableRow:EO,text:bO,thematicBreak:wO,toml:cl,yaml:cl,definition:cl,footnoteDefinition:cl};function cl(){}const TE=-1,dl=0,Ea=1,fl=2,Df=3,Mf=4,Ff=5,Bf=6,bE=7,wE=8,xE=typeof self=="object"?self:globalThis,_E=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new xE[e](t)},_O=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case dl:case TE:return n(u,s);case Ea:{const l=n([],s);for(const d of u)l.push(r(d));return l}case fl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case Df:return n(new Date(u),s);case Mf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Ff:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Bf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case bE:{const{name:l,message:d}=u;return n(typeof xE[l]=="function"?_E(l,d):new Error(d),s)}case wE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(_E(a,u),s)};return r},SE=e=>_O(new Map,e)(0),Ji="",{toString:SO}={},{keys:vO}=Object,ya=e=>{const t=typeof e;if(t!=="object"||!e)return[dl,t];const n=SO.call(e).slice(8,-1);switch(n){case"Array":return[Ea,Ji];case"Object":return[fl,Ji];case"Date":return[Df,Ji];case"RegExp":return[Mf,Ji];case"Map":return[Ff,Ji];case"Set":return[Bf,Ji];case"DataView":return[Ea,n]}return n.includes("Array")?[Ea,n]:e instanceof Error?[bE,e.name||"Error"]:[fl,n]},hl=([e,t])=>e===dl&&(t==="function"||t==="symbol"),AO=(e,t,n,r)=>{const s=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=ya(u);switch(l){case dl:{let p=u;switch(d){case"bigint":l=wE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([TE],u)}return s([l,p],u)}case Ea:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],m=s([l,p],u);for(const b of u)p.push(a(b));return m}case fl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([l,p],u);for(const b of vO(u))(e||!hl(ya(u[b])))&&p.push([a(b),a(u[b])]);return m}case Df:return s([l,isNaN(u.getTime())?Ji:u.toISOString()],u);case Mf:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case Ff:{const p=[],m=s([l,p],u);for(const[b,y]of u)(e||!(hl(ya(b))||hl(ya(y))))&&p.push([a(b),a(y)]);return m}case Bf:{const p=[],m=s([l,p],u);for(const b of u)(e||!hl(ya(b)))&&p.push(a(b));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},vE=(e,{json:t,lossy:n}={})=>{const r=[];return AO(!(t||n),!!t,new Map,r)(e),r},Zi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?SE(vE(e,t)):structuredClone(e):(e,t)=>SE(vE(e,t));function CO(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function kO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function NO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||CO,r=e.options.footnoteBackLabel||kO,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=$s(m.toLowerCase());let y=0;const x=[],_=e.footnoteCounts.get(m);for(;_!==void 0&&++y<=_;){x.length>0&&x.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const k=A.children[A.children.length-1];k&&k.type==="text"?k.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:le(j({},Zi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
30
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function mO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=EE(n[r])}return t}function EE(e){const t=e.spread;return t==null?e.children.length>1:t}function gO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function EO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function TO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=vr(t.children[1]),d=ol(t.children[t.children.length-1]);l&&d&&(u.position={start:l,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function wO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let x={type:"element",tagName:a,properties:b,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function xO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yE=9,TE=32;function _O(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(bE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(bE(t.slice(s),s>0,!1)),a.join("")}function bE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===yE||a===TE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===yE||a===TE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function SO(e,t){const n={type:"text",value:_O(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const AO={blockquote:tO,break:nO,code:rO,delete:iO,emphasis:sO,footnoteReference:oO,heading:aO,html:uO,imageReference:lO,image:cO,inlineCode:dO,linkReference:fO,link:hO,listItem:pO,list:gO,paragraph:EO,root:yO,strong:TO,table:bO,tableCell:xO,tableRow:wO,text:SO,thematicBreak:vO,toml:dl,yaml:dl,definition:dl,footnoteDefinition:dl};function dl(){}const wE=-1,fl=0,ya=1,hl=2,Mf=3,Ff=4,Bf=5,Uf=6,xE=7,_E=8,SE=typeof self=="object"?self:globalThis,vE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new SE[e](t)},kO=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case fl:case wE:return n(u,s);case ya:{const l=n([],s);for(const d of u)l.push(r(d));return l}case hl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case Mf:return n(new Date(u),s);case Ff:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Bf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Uf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case xE:{const{name:l,message:d}=u;return n(typeof SE[l]=="function"?vE(l,d):new Error(d),s)}case _E:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(vE(a,u),s)};return r},AE=e=>kO(new Map,e)(0),ts="",{toString:CO}={},{keys:NO}=Object,Ta=e=>{const t=typeof e;if(t!=="object"||!e)return[fl,t];const n=CO.call(e).slice(8,-1);switch(n){case"Array":return[ya,ts];case"Object":return[hl,ts];case"Date":return[Mf,ts];case"RegExp":return[Ff,ts];case"Map":return[Bf,ts];case"Set":return[Uf,ts];case"DataView":return[ya,n]}return n.includes("Array")?[ya,n]:e instanceof Error?[xE,e.name||"Error"]:[hl,n]},pl=([e,t])=>e===fl&&(t==="function"||t==="symbol"),OO=(e,t,n,r)=>{const s=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=Ta(u);switch(l){case fl:{let p=u;switch(d){case"bigint":l=_E,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([wE],u)}return s([l,p],u)}case ya:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],m=s([l,p],u);for(const b of u)p.push(a(b));return m}case hl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([l,p],u);for(const b of NO(u))(e||!pl(Ta(u[b])))&&p.push([a(b),a(u[b])]);return m}case Mf:return s([l,isNaN(u.getTime())?ts:u.toISOString()],u);case Ff:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case Bf:{const p=[],m=s([l,p],u);for(const[b,y]of u)(e||!(pl(Ta(b))||pl(Ta(y))))&&p.push([a(b),a(y)]);return m}case Uf:{const p=[],m=s([l,p],u);for(const b of u)(e||!pl(Ta(b)))&&p.push(a(b));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},kE=(e,{json:t,lossy:n}={})=>{const r=[];return OO(!(t||n),!!t,new Map,r)(e),r},ns=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?AE(kE(e,t)):structuredClone(e):(e,t)=>AE(kE(e,t));function IO(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function PO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function RO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||IO,r=e.options.footnoteBackLabel||PO,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=Ys(m.toLowerCase());let y=0;const x=[],_=e.footnoteCounts.get(m);for(;_!==void 0&&++y<=_;){x.length>0&&x.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,y);typeof C=="string"&&(C={type:"text",value:C}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const C=A.children[A.children.length-1];C&&C.type==="text"?C.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:le(j({},ns(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
31
31
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
32
- `}]}}const pl=(function(e){if(e==null)return RO;if(typeof e=="function")return ml(e);if(typeof e=="object")return Array.isArray(e)?OO(e):IO(e);if(typeof e=="string")return PO(e);throw new Error("Expected function, string, or object as test")});function OO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pl(e[n]);return ml(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function IO(e){const t=e;return ml(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function PO(e){return ml(t);function t(n){return n&&n.type===e}}function ml(e){return t;function t(n,r,s){return!!(LO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function RO(){return!0}function LO(e){return e!==null&&typeof e=="object"&&"type"in e}function SU(e){return e}const AE=[],DO=!0,Uf=!1,MO="skip";function CE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=pl(s),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=AE,x,_,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=FO(n(d,p)),y[0]===Uf))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==MO)for(_=(r?S.children.length:-1)+u,A=p.concat(S);_>-1&&_<S.children.length;){const k=S.children[_];if(x=l(k,_,A)(),x[0]===Uf)return x;_=typeof x[1]=="number"?x[1]:_+u}}return y}}}function FO(e){return Array.isArray(e)?e:typeof e=="number"?[DO,e]:e==null?AE:[e]}function gl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),CE(e,a,l,s);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Hf={}.hasOwnProperty,BO={};function UO(e,t){const n=t||BO,r=new Map,s=new Map,a=new Map,u=j(j({},xO),n.handlers),l={all:f,applyData:jO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:HO,wrap:$O};return gl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),l;function d(p,m){const b=p.type,y=l.handlers[b];if(Hf.call(l.handlers,b)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(b)){if("children"in p){const _=p,{children:A}=_,S=Sn(_,["children"]),k=Zi(S);return k.children=l.all(p),k}return Zi(p)}return(l.options.unknownHandler||zO)(l,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const x=l.one(b[y],p);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=kE(x.value)),!Array.isArray(x)&&x.type==="element")){const _=x.children[0];_&&_.type==="text"&&(_.value=kE(_.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function HO(e,t){e.position&&(t.position=M1(e))}function jO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Zi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function zO(e,t){const n=t.data||{},r="value"in t&&!(Hf.call(n,"hProperties")||Hf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $O(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
32
+ `}]}}const ml=(function(e){if(e==null)return FO;if(typeof e=="function")return gl(e);if(typeof e=="object")return Array.isArray(e)?LO(e):DO(e);if(typeof e=="string")return MO(e);throw new Error("Expected function, string, or object as test")});function LO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ml(e[n]);return gl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function DO(e){const t=e;return gl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function MO(e){return gl(t);function t(n){return n&&n.type===e}}function gl(e){return t;function t(n,r,s){return!!(BO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function FO(){return!0}function BO(e){return e!==null&&typeof e=="object"&&"type"in e}function NU(e){return e}const CE=[],UO=!0,Hf=!1,HO="skip";function NE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=ml(s),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=CE,x,_,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=jO(n(d,p)),y[0]===Hf))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==HO)for(_=(r?S.children.length:-1)+u,A=p.concat(S);_>-1&&_<S.children.length;){const C=S.children[_];if(x=l(C,_,A)(),x[0]===Hf)return x;_=typeof x[1]=="number"?x[1]:_+u}}return y}}}function jO(e){return Array.isArray(e)?e:typeof e=="number"?[UO,e]:e==null?CE:[e]}function El(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),NE(e,a,l,s);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const jf={}.hasOwnProperty,zO={};function $O(e,t){const n=t||zO,r=new Map,s=new Map,a=new Map,u=j(j({},AO),n.handlers),l={all:f,applyData:qO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:VO,wrap:WO};return El(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),l;function d(p,m){const b=p.type,y=l.handlers[b];if(jf.call(l.handlers,b)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(b)){if("children"in p){const _=p,{children:A}=_,S=vn(_,["children"]),C=ns(S);return C.children=l.all(p),C}return ns(p)}return(l.options.unknownHandler||YO)(l,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const x=l.one(b[y],p);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=OE(x.value)),!Array.isArray(x)&&x.type==="element")){const _=x.children[0];_&&_.type==="text"&&(_.value=OE(_.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function VO(e,t){e.position&&(t.position=B1(e))}function qO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,ns(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function YO(e,t){const n=t.data||{},r="value"in t&&!(jf.call(n,"hProperties")||jf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function WO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
33
33
  `});++r<e.length;)r&&n.push({type:"text",value:`
34
34
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
35
- `}),n}function kE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function NE(e,t){const n=UO(e,t),r=n.one(e,void 0),s=NO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
- `},s),a}function VO(e,t){return e&&"run"in e?function(n,r){return Ue(this,null,function*(){const s=NE(n,j({file:r},t));yield e.run(s,r)})}:function(n,r){return NE(n,j({file:r},e||t))}}function OE(e){if(e)throw e}var jf,IE;function qO(){if(IE)return jf;IE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return jf=function d(){var f,p,m,b,y,x,_=arguments[0],A=1,S=arguments.length,k=!1;for(typeof _=="boolean"&&(k=_,_=arguments[1]||{},A=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});A<S;++A)if(f=arguments[A],f!=null)for(p in f)m=l(_,p),b=l(f,p),_!==b&&(k&&b&&(a(b)||(y=s(b)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(_,{name:p,newValue:d(k,x,b)})):typeof b!="undefined"&&u(_,{name:p,newValue:b}));return _},jf}var YO=qO();const zf=rt(YO);function $f(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function WO(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...s);function l(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?GO(p,l)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function GO(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return s(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...l){n||(n=!0,t(u,...l))}function a(u){s(null,u)}}const vr={basename:XO,dirname:QO,extname:KO,join:JO,sep:"/"};function XO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ta(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function QO(e){if(Ta(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function KO(e){Ta(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function JO(...e){let t=-1,n;for(;++t<e.length;)Ta(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ZO(n)}function ZO(e){Ta(e);const t=e.codePointAt(0)===47;let n=eI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eI(e,t){let n="",r=0,s=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function Ta(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tI={cwd:nI};function nI(){return"/"}function Vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rI(e){if(typeof e=="string")e=new URL(e);else if(!Vf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return iI(e)}function iI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const qf=["history","path","basename","stem","extname","dirname"];class PE{constructor(t){let n;t?Vf(t)?n={path:t}:typeof t=="string"||sI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qf.length;){const a=qf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)qf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){Wf(t,"basename"),Yf(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){RE(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(Yf(t,"extname"),RE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vf(t)&&(t=rI(t)),Wf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){Wf(t,"stem"),Yf(t,"stem"),this.path=vr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new ln(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Yf(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function Wf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function RE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function sI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oI=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),aI={}.hasOwnProperty;class Gf extends oI{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=WO()}copy(){const t=new Gf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Kf("data",this.frozen),this.namespace[t]=n,this):aI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=El(t),r=this.parser||this.Parser;return Xf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Xf("process",this.parser||this.Parser),Qf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=El(t),d=r.parse(l);r.run(d,l,function(p,m,b){if(p||!m||!b)return f(p);const y=m,x=r.stringify(y,b);cI(x)?b.value=x:b.result=x,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Xf("processSync",this.parser||this.Parser),Qf("processSync",this.compiler||this.Compiler),this.process(t,s),DE("processSync","process",n),r;function s(a,u){n=!0,OE(a),r=u}}run(t,n,r){LE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=El(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?l(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),DE("runSync","run",r),s;function a(u,l){OE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=El(n),s=this.compiler||this.Compiler;return Qf("stringify",s),LE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Kf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(s.settings=zf(!0,s.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const _=r[b][1];$f(_)&&$f(y)&&(y=zf(!0,_,y)),r[b]=[f,y,...x]}}}}const uI=new Gf().freeze();function Xf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function LE(e){if(!$f(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function El(e){return lI(e)?e:new PE(e)}function lI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cI(e){return typeof e=="string"||dI(e)}function dI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ME=[],FE={allowDangerousHtml:!0},hI=/^(https?|ircs?|mailto|xmpp)$/i,pI=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function BE(e){const t=mI(e),n=gI(e);return EI(t.runSync(t.parse(n),n),e)}function mI(e){const t=e.rehypePlugins||ME,n=e.remarkPlugins||ME,r=e.remarkRehypeOptions?j(j({},e.remarkRehypeOptions),FE):FE;return uI().use(Q3).use(n).use(VO,r).use(t)}function gI(e){const t=e.children||"",n=new PE;return typeof t=="string"&&(n.value=t),n}function EI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||yI;for(const p of pI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+fI+p.id,void 0);return gl(e,f),zk(e,{Fragment:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Cf)if(Object.hasOwn(Cf,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],_=Cf[y];(_===null||_.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return l&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function yI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||hI.test(e.slice(0,t))?e:""}const UE=/[#.]/g;function TI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){UE.lastIndex=s;const l=UE.exec(n),d=n.slice(s,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),l&&(a=l[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function HE(e,t,n){const r=n?_I(n):void 0;function s(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=TI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,bI(u))l.unshift(u);else for(const[m,b]of Object.entries(u))wI(e,d.properties,m,b)}for(const f of l)Jf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function bI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function wI(e,t,n,r){const s=il(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=N1(r):s.commaSeparated?a=g1(r):s.commaOrSpaceSeparated?a=N1(g1(r).join(" ")):a=jE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?xI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(jE(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function Jf(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Jf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Jf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function jE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ua(n)===ua(t)))return!0}return n}function xI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _I(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const SI=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],vI=HE(la,"div"),AI=HE(ci,"g",SI);function CI(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=zE(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],d=zE(t,l),f=d===-1?t.length+1:d+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function zE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const es={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},$E={}.hasOwnProperty,kI=Object.prototype;function NI(e,t){const n=t||{};return Zf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ci:la,verbose:n.verbose||!1},e)}function Zf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},yl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:VE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=CI(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},yl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},yl(e,r,n),n}default:return n=OI(e,t),n}}function VE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Zf(e,t[n]);r.push(s)}return r}function OI(e,t){const n=e.schema;e.schema=t.namespaceURI===es.svg?ci:la;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;$E.call(kI,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?AI:vI)(t.tagName,s,VE(e,t.childNodes));if(yl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&qs(d.startTag),p=d&&d.endTag&&qs(d.endTag),m=Zf(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function yl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=II(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function II(e,t,n){const r=qs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)$E.call(n.attrs,u)&&(a[il(e.schema,u).property]=qs(n.attrs[u]));n.startTag;const l=qs(n.startTag),d=n.endTag?qs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function qs(e){const t=qE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=qE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function qE(e){return e.line&&e.column?e:void 0}const YE={}.hasOwnProperty;function WE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&YE.call(s,e)){const d=String(s[e]);u=YE.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const PI={},RI={}.hasOwnProperty,GE=WE("type",{handlers:{root:DI,element:HI,text:BI,comment:UI,doctype:FI}});function LI(e,t){const r=(t||PI).space;return GE(e,r==="svg"?ci:la)}function DI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=eh(e.children,n,t),Ys(e,n),n}function MI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=eh(e.children,n,t),Ys(e,n),n}function FI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ys(e,t),t}function BI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ys(e,t),t}function UI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ys(e,t),t}function HI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ci);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&RI.call(e.properties,a)){const d=jI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:es[u],childNodes:[],parentNode:null};return l.childNodes=eh(e.children,l,r),Ys(e,l),e.tagName==="template"&&e.content&&(l.content=MI(e.content,r)),l}function jI(e,t,n){const r=il(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?E1(n):O1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=es[r.space]}return s}function eh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=GE(e[r],n);a.parentNode=t,s.push(a)}return s}function Ys(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const zI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$I=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ct="�";var O;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(O||(O={}));const On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function XE(e){return e>=55296&&e<=57343}function VI(e){return e>=56320&&e<=57343}function qI(e,t){return(e-55296)*1024+9216+t}function QE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function KE(e){return e>=64976&&e<=65007||$I.has(e)}var re;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(re||(re={}));const YI=65536;class WI{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=YI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(VI(n))return this.pos++,this._addGap(),qI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.EOF;return this._err(re.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,XE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){QE(t)?this._err(re.controlCharacterInInputStream):KE(t)&&this._err(re.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var nt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(nt||(nt={}));function JE(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const GI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),XI=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function QI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=XI.get(e))!==null&&t!==void 0?t:e}var Xt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Xt||(Xt={}));const KI=32;var hi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hi||(hi={}));function th(e){return e>=Xt.ZERO&&e<=Xt.NINE}function JI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_F||e>=Xt.LOWER_A&&e<=Xt.LOWER_F}function ZI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_Z||e>=Xt.LOWER_A&&e<=Xt.LOWER_Z||th(e)}function eP(e){return e===Xt.EQUALS||ZI(e)}var Qt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Qt||(Qt={}));var Vr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Vr||(Vr={}));class tP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Vr.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Xt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|KI)===Xt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(th(s)||JI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(th(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Xt.SEMI)this.consumed+=1;else if(this.decodeMode===Vr.Strict)return 0;return this.emitCodePoint(QI(this.result),this.consumed),this.errors&&(t!==Xt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&hi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=nP(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Vr.Attribute&&(a===0||eP(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&hi.VALUE_LENGTH)>>14,a!==0){if(u===Xt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Vr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&hi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~hi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==Vr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function nP(e,t,n,r){const s=(t&hi.BRANCH_LENGTH)>>7,a=t&hi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,l=u+s-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+s]}return-1}var pe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(pe||(pe={}));var ts;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ts||(ts={}));var Qn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Qn||(Qn={}));var Q;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Q||(Q={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const rP=new Map([[Q.A,g.A],[Q.ADDRESS,g.ADDRESS],[Q.ANNOTATION_XML,g.ANNOTATION_XML],[Q.APPLET,g.APPLET],[Q.AREA,g.AREA],[Q.ARTICLE,g.ARTICLE],[Q.ASIDE,g.ASIDE],[Q.B,g.B],[Q.BASE,g.BASE],[Q.BASEFONT,g.BASEFONT],[Q.BGSOUND,g.BGSOUND],[Q.BIG,g.BIG],[Q.BLOCKQUOTE,g.BLOCKQUOTE],[Q.BODY,g.BODY],[Q.BR,g.BR],[Q.BUTTON,g.BUTTON],[Q.CAPTION,g.CAPTION],[Q.CENTER,g.CENTER],[Q.CODE,g.CODE],[Q.COL,g.COL],[Q.COLGROUP,g.COLGROUP],[Q.DD,g.DD],[Q.DESC,g.DESC],[Q.DETAILS,g.DETAILS],[Q.DIALOG,g.DIALOG],[Q.DIR,g.DIR],[Q.DIV,g.DIV],[Q.DL,g.DL],[Q.DT,g.DT],[Q.EM,g.EM],[Q.EMBED,g.EMBED],[Q.FIELDSET,g.FIELDSET],[Q.FIGCAPTION,g.FIGCAPTION],[Q.FIGURE,g.FIGURE],[Q.FONT,g.FONT],[Q.FOOTER,g.FOOTER],[Q.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[Q.FORM,g.FORM],[Q.FRAME,g.FRAME],[Q.FRAMESET,g.FRAMESET],[Q.H1,g.H1],[Q.H2,g.H2],[Q.H3,g.H3],[Q.H4,g.H4],[Q.H5,g.H5],[Q.H6,g.H6],[Q.HEAD,g.HEAD],[Q.HEADER,g.HEADER],[Q.HGROUP,g.HGROUP],[Q.HR,g.HR],[Q.HTML,g.HTML],[Q.I,g.I],[Q.IMG,g.IMG],[Q.IMAGE,g.IMAGE],[Q.INPUT,g.INPUT],[Q.IFRAME,g.IFRAME],[Q.KEYGEN,g.KEYGEN],[Q.LABEL,g.LABEL],[Q.LI,g.LI],[Q.LINK,g.LINK],[Q.LISTING,g.LISTING],[Q.MAIN,g.MAIN],[Q.MALIGNMARK,g.MALIGNMARK],[Q.MARQUEE,g.MARQUEE],[Q.MATH,g.MATH],[Q.MENU,g.MENU],[Q.META,g.META],[Q.MGLYPH,g.MGLYPH],[Q.MI,g.MI],[Q.MO,g.MO],[Q.MN,g.MN],[Q.MS,g.MS],[Q.MTEXT,g.MTEXT],[Q.NAV,g.NAV],[Q.NOBR,g.NOBR],[Q.NOFRAMES,g.NOFRAMES],[Q.NOEMBED,g.NOEMBED],[Q.NOSCRIPT,g.NOSCRIPT],[Q.OBJECT,g.OBJECT],[Q.OL,g.OL],[Q.OPTGROUP,g.OPTGROUP],[Q.OPTION,g.OPTION],[Q.P,g.P],[Q.PARAM,g.PARAM],[Q.PLAINTEXT,g.PLAINTEXT],[Q.PRE,g.PRE],[Q.RB,g.RB],[Q.RP,g.RP],[Q.RT,g.RT],[Q.RTC,g.RTC],[Q.RUBY,g.RUBY],[Q.S,g.S],[Q.SCRIPT,g.SCRIPT],[Q.SEARCH,g.SEARCH],[Q.SECTION,g.SECTION],[Q.SELECT,g.SELECT],[Q.SOURCE,g.SOURCE],[Q.SMALL,g.SMALL],[Q.SPAN,g.SPAN],[Q.STRIKE,g.STRIKE],[Q.STRONG,g.STRONG],[Q.STYLE,g.STYLE],[Q.SUB,g.SUB],[Q.SUMMARY,g.SUMMARY],[Q.SUP,g.SUP],[Q.TABLE,g.TABLE],[Q.TBODY,g.TBODY],[Q.TEMPLATE,g.TEMPLATE],[Q.TEXTAREA,g.TEXTAREA],[Q.TFOOT,g.TFOOT],[Q.TD,g.TD],[Q.TH,g.TH],[Q.THEAD,g.THEAD],[Q.TITLE,g.TITLE],[Q.TR,g.TR],[Q.TRACK,g.TRACK],[Q.TT,g.TT],[Q.U,g.U],[Q.UL,g.UL],[Q.SVG,g.SVG],[Q.VAR,g.VAR],[Q.WBR,g.WBR],[Q.XMP,g.XMP]]);function Ws(e){var t;return(t=rP.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,iP={[pe.HTML]:new Set([ye.ADDRESS,ye.APPLET,ye.AREA,ye.ARTICLE,ye.ASIDE,ye.BASE,ye.BASEFONT,ye.BGSOUND,ye.BLOCKQUOTE,ye.BODY,ye.BR,ye.BUTTON,ye.CAPTION,ye.CENTER,ye.COL,ye.COLGROUP,ye.DD,ye.DETAILS,ye.DIR,ye.DIV,ye.DL,ye.DT,ye.EMBED,ye.FIELDSET,ye.FIGCAPTION,ye.FIGURE,ye.FOOTER,ye.FORM,ye.FRAME,ye.FRAMESET,ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6,ye.HEAD,ye.HEADER,ye.HGROUP,ye.HR,ye.HTML,ye.IFRAME,ye.IMG,ye.INPUT,ye.LI,ye.LINK,ye.LISTING,ye.MAIN,ye.MARQUEE,ye.MENU,ye.META,ye.NAV,ye.NOEMBED,ye.NOFRAMES,ye.NOSCRIPT,ye.OBJECT,ye.OL,ye.P,ye.PARAM,ye.PLAINTEXT,ye.PRE,ye.SCRIPT,ye.SECTION,ye.SELECT,ye.SOURCE,ye.STYLE,ye.SUMMARY,ye.TABLE,ye.TBODY,ye.TD,ye.TEMPLATE,ye.TEXTAREA,ye.TFOOT,ye.TH,ye.THEAD,ye.TITLE,ye.TR,ye.TRACK,ye.UL,ye.WBR,ye.XMP]),[pe.MATHML]:new Set([ye.MI,ye.MO,ye.MN,ye.MS,ye.MTEXT,ye.ANNOTATION_XML]),[pe.SVG]:new Set([ye.TITLE,ye.FOREIGN_OBJECT,ye.DESC]),[pe.XLINK]:new Set,[pe.XML]:new Set,[pe.XMLNS]:new Set},nh=new Set([ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var L;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(L||(L={}));const Bt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function sP(e){return e>=O.DIGIT_0&&e<=O.DIGIT_9}function ba(e){return e>=O.LATIN_CAPITAL_A&&e<=O.LATIN_CAPITAL_Z}function oP(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function pi(e){return oP(e)||ba(e)}function ZE(e){return pi(e)||sP(e)}function Tl(e){return e+32}function ey(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function ty(e){return ey(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function aP(e){return e===O.NULL?re.nullCharacterReference:e>1114111?re.characterReferenceOutsideUnicodeRange:XE(e)?re.surrogateCharacterReference:KE(e)?re.noncharacterCharacterReference:QE(e)||e===O.CARRIAGE_RETURN?re.controlCharacterReference:null}class uP{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new WI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new tP(GI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(re.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(re.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=aP(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:nt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:nt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:nt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:nt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(JE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(re.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ws(t.tagName),t.type===nt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(re.endTagWithAttributes),t.selfClosing&&this._err(re.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case nt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case nt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case nt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:nt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ey(t)?nt.WHITESPACE_CHARACTER:t===O.NULL?nt.NULL_CHARACTER:nt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(nt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Vr.Attribute:Vr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(re.unexpectedNullCharacter),this._emitCodePoint(t);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case O.AMPERSAND:{this._startCharacterReference();break}case O.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case O.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case O.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(pi(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case O.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case O.QUESTION_MARK:{this._err(re.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case O.EOF:{this._err(re.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(pi(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.GREATER_THAN_SIGN:{this._err(re.missingEndTagName),this.state=L.DATA;break}case O.EOF:{this._err(re.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.tagName+=Ct;break}case O.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ba(t)?Tl(t):t)}}_stateRcdataLessThanSign(t){t===O.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){pi(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case O.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case O.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===O.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){pi(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case O.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case O.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){pi(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case O.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case O.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case O.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===O.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pi(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){pi(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&ty(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case O.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case O.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case O.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===O.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&ty(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._err(re.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:{this._err(re.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.name+=Ct;break}default:this.currentAttr.name+=String.fromCodePoint(ba(t)?Tl(t):t)}}_stateAfterAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(re.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case O.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case O.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case O.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:case O.EQUALS_SIGN:case O.GRAVE_ACCENT:{this._err(re.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case O.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case O.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.data+=Ct;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(re.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(re.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case O.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case O.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.data+=Ct;break}case O.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case O.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case O.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==O.GREATER_THAN_SIGN&&t!==O.EOF&&this._err(re.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case O.HYPHEN_MINUS:{n.data+="-";break}case O.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case O.GREATER_THAN_SIGN:{this._err(re.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case O.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ba(t))this._createDoctypeToken(String.fromCharCode(Tl(t))),this.state=L.DOCTYPE_NAME;else switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.NULL:{this._err(re.unexpectedNullCharacter),this._createDoctypeToken(Ct),this.state=L.DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this._err(re.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.name+=Ct;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ba(t)?Tl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(re.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=Ct;break}case O.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=Ct;break}case O.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.QUOTATION_MARK:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=Ct;break}case O.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=Ct;break}case O.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.NULL:{this._err(re.unexpectedNullCharacter);break}case O.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case O.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case O.EOF:{this._err(re.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===O.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA;break}case O.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(O.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ZE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ZE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(re.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ny=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),ry=new Set([...ny,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),lP=new Set([...bl,g.OL,g.UL]),cP=new Set([...bl,g.BUTTON]),iy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),sy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),dP=new Set([g.TR,g.TEMPLATE,g.HTML]),fP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),hP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),pP=new Set([g.TD,g.TH]);class mP{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===pe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==pe.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(nh,pe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pP,pe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(hP,pe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fP,pe.HTML)}clearBackToTableRowContext(){this.clearBackTo(dP,pe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case pe.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case pe.SVG:{if(sy.has(s))return!1;break}case pe.MATHML:{if(iy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,lP)}hasInButtonScope(t){return this.hasInDynamicScope(t,cP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case pe.HTML:{if(nh.has(n))return!0;if(bl.has(n))return!1;break}case pe.SVG:{if(sy.has(n))return!1;break}case pe.MATHML:{if(iy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===pe.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ny.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ry.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ry.has(this.currentTagId);)this.pop()}}const rh=3;var Ar;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ar||(Ar={}));const oy={type:Ar.Marker};class gP{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===Ar.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<rh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<rh)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=rh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(oy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ar.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ar.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(oy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ar.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ar.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ar.Element&&n.element===t)}}const mi={createDocument(){return{nodeName:"#document",mode:Qn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};mi.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(mi.isTextNode(n)){n.value+=t;return}}mi.appendChild(e,mi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&mi.isTextNode(r)?r.value+=t:mi.insertBefore(e,mi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=j(j({},e.sourceCodeLocation),t)}},ay="html",EP="about:legacy-compat",yP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",uy=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],TP=[...uy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],bP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ly=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],wP=[...ly,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function cy(e,t){return t.some(n=>e.startsWith(n))}function xP(e){return e.name===ay&&e.publicId===null&&(e.systemId===null||e.systemId===EP)}function _P(e){if(e.name!==ay)return Qn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===yP)return Qn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),bP.has(n))return Qn.QUIRKS;let r=t===null?TP:uy;if(cy(n,r))return Qn.QUIRKS;if(r=t===null?ly:wP,cy(n,r))return Qn.LIMITED_QUIRKS}return Qn.NO_QUIRKS}const dy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},SP="definitionurl",vP="definitionURL",AP=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),CP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:pe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:pe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:pe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:pe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:pe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:pe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:pe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:pe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:pe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:pe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:pe.XMLNS}]]),kP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),NP=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function OP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ts.COLOR||r===ts.SIZE||r===ts.FACE)||NP.has(t)}function fy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===SP){e.attrs[t].name=vP;break}}function hy(e){for(let t=0;t<e.attrs.length;t++){const n=AP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ih(e){for(let t=0;t<e.attrs.length;t++){const n=CP.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function IP(e){const t=kP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ws(e.tagName))}function PP(e,t){return t===pe.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function RP(e,t,n){if(t===pe.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ts.ENCODING){const s=n[r].value.toLowerCase();return s===dy.TEXT_HTML||s===dy.APPLICATION_XML}}return t===pe.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function LP(e,t,n,r){return(!r||r===pe.HTML)&&RP(e,t,n)||(!r||r===pe.MATHML)&&PP(e,t)}const DP="hidden",MP=8,FP=3;var U;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(U||(U={}));const BP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},py=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),my={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:mi,onParseError:null};class gy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=j(j({},my),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new uP(this.options,this),this.activeFormattingElements=new gP(this.treeAdapter),this.fragmentContextID=r?Ws(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new mP(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=j(j({},my),n);t!=null||(t=r.treeAdapter.createElement(Q.TEMPLATE,pe.HTML,[]));const s=r.treeAdapter.createElement("documentmock",pe.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:BP,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===pe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,pe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=Bt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==pe.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Bt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Bt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Bt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Bt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&le(j({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,pe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,pe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Q.HTML,pe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===nt.END_TAG&&s===n.tagName?{endTag:j({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===pe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,pe.HTML)}_processToken(t){switch(t.type){case nt.CHARACTER:{this.onCharacter(t);break}case nt.NULL_CHARACTER:{this.onNullCharacter(t);break}case nt.COMMENT:{this.onComment(t);break}case nt.DOCTYPE:{this.onDoctype(t);break}case nt.START_TAG:{this._processStartTag(t);break}case nt.END_TAG:{this.onEndTag(t);break}case nt.EOF:{this.onEof(t);break}case nt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return LP(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Ar.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=U.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=U.IN_TABLE;return}case g.BODY:{this.insertionMode=U.IN_BODY;return}case g.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return py.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===pe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return iP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){p6(this,t);return}switch(this.insertionMode){case U.INITIAL:{wa(this,t);break}case U.BEFORE_HTML:{xa(this,t);break}case U.BEFORE_HEAD:{_a(this,t);break}case U.IN_HEAD:{Sa(this,t);break}case U.IN_HEAD_NO_SCRIPT:{va(this,t);break}case U.AFTER_HEAD:{Aa(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{yy(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{uh(this,t);break}case U.IN_TABLE_TEXT:{Ay(this,t);break}case U.IN_COLUMN_GROUP:{_l(this,t);break}case U.AFTER_BODY:{Al(this,t);break}case U.AFTER_AFTER_BODY:{Cl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){h6(this,t);return}switch(this.insertionMode){case U.INITIAL:{wa(this,t);break}case U.BEFORE_HTML:{xa(this,t);break}case U.BEFORE_HEAD:{_a(this,t);break}case U.IN_HEAD:{Sa(this,t);break}case U.IN_HEAD_NO_SCRIPT:{va(this,t);break}case U.AFTER_HEAD:{Aa(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{uh(this,t);break}case U.IN_COLUMN_GROUP:{_l(this,t);break}case U.AFTER_BODY:{Al(this,t);break}case U.AFTER_AFTER_BODY:{Cl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){oh(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{oh(this,t);break}case U.IN_TABLE_TEXT:{Na(this,t);break}case U.AFTER_BODY:{qP(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{YP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{WP(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,re.misplacedDoctype);break}case U.IN_TABLE_TEXT:{Na(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,re.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?m6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{wa(this,t);break}case U.BEFORE_HTML:{GP(this,t);break}case U.BEFORE_HEAD:{QP(this,t);break}case U.IN_HEAD:{cr(this,t);break}case U.IN_HEAD_NO_SCRIPT:{ZP(this,t);break}case U.AFTER_HEAD:{tR(this,t);break}case U.IN_BODY:{dn(this,t);break}case U.IN_TABLE:{Gs(this,t);break}case U.IN_TABLE_TEXT:{Na(this,t);break}case U.IN_CAPTION:{KR(this,t);break}case U.IN_COLUMN_GROUP:{lh(this,t);break}case U.IN_TABLE_BODY:{Sl(this,t);break}case U.IN_ROW:{vl(this,t);break}case U.IN_CELL:{e6(this,t);break}case U.IN_SELECT:{Ny(this,t);break}case U.IN_SELECT_IN_TABLE:{n6(this,t);break}case U.IN_TEMPLATE:{i6(this,t);break}case U.AFTER_BODY:{o6(this,t);break}case U.IN_FRAMESET:{a6(this,t);break}case U.AFTER_FRAMESET:{l6(this,t);break}case U.AFTER_AFTER_BODY:{d6(this,t);break}case U.AFTER_AFTER_FRAMESET:{f6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?g6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{wa(this,t);break}case U.BEFORE_HTML:{XP(this,t);break}case U.BEFORE_HEAD:{KP(this,t);break}case U.IN_HEAD:{JP(this,t);break}case U.IN_HEAD_NO_SCRIPT:{eR(this,t);break}case U.AFTER_HEAD:{nR(this,t);break}case U.IN_BODY:{xl(this,t);break}case U.TEXT:{jR(this,t);break}case U.IN_TABLE:{Ca(this,t);break}case U.IN_TABLE_TEXT:{Na(this,t);break}case U.IN_CAPTION:{JR(this,t);break}case U.IN_COLUMN_GROUP:{ZR(this,t);break}case U.IN_TABLE_BODY:{ch(this,t);break}case U.IN_ROW:{ky(this,t);break}case U.IN_CELL:{t6(this,t);break}case U.IN_SELECT:{Oy(this,t);break}case U.IN_SELECT_IN_TABLE:{r6(this,t);break}case U.IN_TEMPLATE:{s6(this,t);break}case U.AFTER_BODY:{Py(this,t);break}case U.IN_FRAMESET:{u6(this,t);break}case U.AFTER_FRAMESET:{c6(this,t);break}case U.AFTER_AFTER_BODY:{Cl(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{wa(this,t);break}case U.BEFORE_HTML:{xa(this,t);break}case U.BEFORE_HEAD:{_a(this,t);break}case U.IN_HEAD:{Sa(this,t);break}case U.IN_HEAD_NO_SCRIPT:{va(this,t);break}case U.AFTER_HEAD:{Aa(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{Sy(this,t);break}case U.TEXT:{zR(this,t);break}case U.IN_TABLE_TEXT:{Na(this,t);break}case U.IN_TEMPLATE:{Iy(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{ah(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===O.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{Ey(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{uh(this,t);break}case U.IN_TABLE_TEXT:{vy(this,t);break}}}}function UP(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):_y(e,t),n}function HP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function jP(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=FP;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=zP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function zP(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function $P(e,t,n){const r=e.treeAdapter.getTagName(t),s=Ws(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===pe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function VP(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function sh(e,t){for(let n=0;n<MP;n++){const r=UP(e,t);if(!r)break;const s=HP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=jP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&$P(e,u,a),VP(e,s,r)}}function oh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function YP(e,t){e._appendCommentNode(t,e.document)}function ah(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function WP(e,t){e._setDocumentType(t);const n=t.forceQuirks?Qn.QUIRKS:_P(t);xP(t)||e._err(t,re.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function wa(e,t){e._err(t,re.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Qn.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function GP(e,t){t.tagID===g.HTML?(e._insertElement(t,pe.HTML),e.insertionMode=U.BEFORE_HEAD):xa(e,t)}function XP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&xa(e,t)}function xa(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function QP(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.HEAD:{e._insertElement(t,pe.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:_a(e,t)}}function KP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?_a(e,t):e._err(t,re.endTagWithoutMatchingOpenElement)}function _a(e,t){e._insertFakeElement(Q.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function cr(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Bt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Bt.RAWTEXT):(e._insertElement(t,pe.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Bt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Bt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Sa(e,t)}}function JP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Sa(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function ns(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,re.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,re.endTagWithoutMatchingOpenElement)}function Sa(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function ZP(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{cr(e,t);break}case g.NOSCRIPT:{e._err(t,re.nestedNoscriptInHead);break}default:va(e,t)}}function eR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case g.BR:{va(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function va(e,t){const n=t.type===nt.EOF?re.openElementsLeftAfterEof:re.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function tR(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.BODY:{e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,pe.HTML),e.insertionMode=U.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,re.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),cr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Aa(e,t)}}function nR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Aa(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Aa(e,t){e._insertFakeElement(Q.BODY,g.BODY),e.insertionMode=U.IN_BODY,wl(e,t)}function wl(e,t){switch(t.type){case nt.CHARACTER:{yy(e,t);break}case nt.WHITESPACE_CHARACTER:{Ey(e,t);break}case nt.COMMENT:{oh(e,t);break}case nt.START_TAG:{dn(e,t);break}case nt.END_TAG:{xl(e,t);break}case nt.EOF:{Sy(e,t);break}}}function Ey(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function iR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_FRAMESET)}function oR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function aR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&nh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,pe.HTML)}function uR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),n||(e.formElement=e.openElements.current))}function cR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function dR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.tokenizer.state=Bt.PLAINTEXT}function fR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1}function hR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(sh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(sh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ER(e,t){e.treeAdapter.getDocumentMode(e.document)!==Qn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function Ty(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function by(e){const t=JE(e,ts.TYPE);return t!=null&&t.toLowerCase()===DP}function yR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),by(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function TR(e,t){e._appendElement(t,pe.HTML),t.ackSelfClosing=!0}function bR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function wR(e,t){t.tagName=Q.IMG,t.tagID=g.IMG,Ty(e,t)}function xR(e,t){e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Bt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function _R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function SR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function wy(e,t){e._switchToTextParsing(t,Bt.RAWTEXT)}function vR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function AR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function CR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,pe.HTML)}function kR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,pe.HTML)}function NR(e,t){e._reconstructActiveFormattingElements(),fy(t),ih(t),t.selfClosing?e._appendElement(t,pe.MATHML):e._insertElement(t,pe.MATHML),t.ackSelfClosing=!0}function OR(e,t){e._reconstructActiveFormattingElements(),hy(t),ih(t),t.selfClosing?e._appendElement(t,pe.SVG):e._insertElement(t,pe.SVG),t.ackSelfClosing=!0}function xy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function dn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{pR(e,t);break}case g.A:{hR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{aR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{oR(e,t);break}case g.LI:case g.DD:case g.DT:{cR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ty(e,t);break}case g.HR:{bR(e,t);break}case g.RB:case g.RTC:{CR(e,t);break}case g.RT:case g.RP:{kR(e,t);break}case g.PRE:case g.LISTING:{uR(e,t);break}case g.XMP:{_R(e,t);break}case g.SVG:{OR(e,t);break}case g.HTML:{rR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{cr(e,t);break}case g.BODY:{iR(e,t);break}case g.FORM:{lR(e,t);break}case g.NOBR:{mR(e,t);break}case g.MATH:{NR(e,t);break}case g.TABLE:{ER(e,t);break}case g.INPUT:{yR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{TR(e,t);break}case g.IMAGE:{wR(e,t);break}case g.BUTTON:{fR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{gR(e,t);break}case g.IFRAME:{SR(e,t);break}case g.SELECT:{vR(e,t);break}case g.OPTION:case g.OPTGROUP:{AR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{wy(e,t);break}case g.FRAMESET:{sR(e,t);break}case g.TEXTAREA:{xR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?wy(e,t):xy(e,t);break}case g.PLAINTEXT:{dR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:xy(e,t)}}function IR(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function PR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,Py(e,t))}function RR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function LR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function DR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(Q.P,g.P),e._closePElement()}function MR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function FR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function BR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function UR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function HR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function _y(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function xl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{sh(e,t);break}case g.P:{DR(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{RR(e,t);break}case g.LI:{MR(e);break}case g.DD:case g.DT:{FR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{BR(e);break}case g.BR:{HR(e);break}case g.BODY:{IR(e,t);break}case g.HTML:{PR(e,t);break}case g.FORM:{LR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{UR(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:_y(e,t)}}function Sy(e,t){e.tmplInsertionModeStack.length>0?Iy(e,t):ah(e,t)}function jR(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zR(e,t){e._err(t,re.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function uh(e,t){if(e.openElements.currentTagId!==void 0&&py.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case nt.CHARACTER:{Ay(e,t);break}case nt.WHITESPACE_CHARACTER:{vy(e,t);break}}else ka(e,t)}function $R(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_CAPTION}function VR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function qR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,g.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,lh(e,t)}function YR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_TABLE_BODY}function WR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,g.TBODY),e.insertionMode=U.IN_TABLE_BODY,Sl(e,t)}function GR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function XR(e,t){by(t)?e._appendElement(t,pe.HTML):ka(e,t),t.ackSelfClosing=!0}function QR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,pe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Gs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{WR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{cr(e,t);break}case g.COL:{qR(e,t);break}case g.FORM:{QR(e,t);break}case g.TABLE:{GR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{YR(e,t);break}case g.INPUT:{XR(e,t);break}case g.CAPTION:{$R(e,t);break}case g.COLGROUP:{VR(e,t);break}default:ka(e,t)}}function Ca(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ns(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:ka(e,t)}}function ka(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,wl(e,t),e.fosterParentingEnabled=n}function vy(e,t){e.pendingCharacterTokens.push(t)}function Ay(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Na(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ka(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Cy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function KR(e,t){const n=t.tagID;Cy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,Gs(e,t)):dn(e,t)}function JR(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===g.TABLE&&Ca(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:xl(e,t)}}function lh(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.COL:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{cr(e,t);break}default:_l(e,t)}}function ZR(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TEMPLATE:{ns(e,t);break}case g.COL:break;default:_l(e,t)}}function _l(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function Sl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,g.TR),e.insertionMode=U.IN_ROW,vl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Gs(e,t));break}default:Gs(e,t)}}function ch(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Ca(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Ca(e,t)}}function vl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,Sl(e,t));break}default:Gs(e,t)}}function ky(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,ch(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,ch(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Ca(e,t)}}function e6(e,t){const n=t.tagID;Cy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),vl(e,t)):dn(e,t)}function t6(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ky(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:xl(e,t)}}function Ny(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{cr(e,t);break}}}function Oy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{ns(e,t);break}}}function n6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ny(e,t)}function r6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Oy(e,t)}function i6(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{cr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,Gs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,lh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,Sl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,vl(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,dn(e,t)}}function s6(e,t){t.tagID===g.TEMPLATE&&ns(e,t)}function Iy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ah(e,t)}function o6(e,t){t.tagID===g.HTML?dn(e,t):Al(e,t)}function Py(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Al(e,t)}function Al(e,t){e.insertionMode=U.IN_BODY,wl(e,t)}function a6(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.FRAMESET:{e._insertElement(t,pe.HTML);break}case g.FRAME:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{cr(e,t);break}}}function u6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function l6(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.NOFRAMES:{cr(e,t);break}}}function c6(e,t){t.tagID===g.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function d6(e,t){t.tagID===g.HTML?dn(e,t):Cl(e,t)}function Cl(e,t){e.insertionMode=U.IN_BODY,wl(e,t)}function f6(e,t){switch(t.tagID){case g.HTML:{dn(e,t);break}case g.NOFRAMES:{cr(e,t);break}}}function h6(e,t){t.chars=Ct,e._insertCharacters(t)}function p6(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ry(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==pe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function m6(e,t){if(OP(t))Ry(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===pe.MATHML?fy(t):r===pe.SVG&&(IP(t),hy(t)),ih(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function g6(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ry(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===pe.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const E6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,y6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ly={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Dy(e,t){const n=k6(e),r=WE("type",{handlers:{root:T6,element:b6,text:w6,comment:Fy,doctype:x6,raw:S6},unknown:v6}),s={parser:n?new gy(Ly):gy.getFragmentParser(void 0,Ly),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Xs(s,Sr());const a=n?s.parser.document:s.parser.getFragment(),u=NI(a,{file:s.options.file});return s.stitches&&gl(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function My(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function T6(e,t){My(e.children,t)}function b6(e,t){A6(e,t),My(e.children,t),C6(e,t)}function w6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:nt.CHARACTER,chars:e.value,location:Oa(e)};Xs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function x6(e,t){const n={type:nt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Oa(e)};Xs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _6(e,t){t.stitches=!0;const n=N6(e);if("children"in e&&"children"in n){const r=Dy({type:"root",children:e.children},t.options);n.children=r.children}Fy({type:"comment",value:{stitch:n}},t)}function Fy(e,t){const n=e.value,r={type:nt.COMMENT,data:n,location:Oa(e)};Xs(t,Sr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function S6(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,By(t,Sr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(E6,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function v6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))_6(n,t);else{let r="";throw y6.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Xs(e,t){By(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Bt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function By(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function A6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Bt.PLAINTEXT)return;Xs(t,Sr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:es.html;s===es.html&&n==="svg"&&(s=es.svg);const a=LI(le(j({},e),{children:[]}),{space:s===es.svg?"svg":"html"}),u={type:nt.START_TAG,tagName:n,tagID:Ws(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Oa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function C6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&zI.includes(n)||t.parser.tokenizer.state===Bt.PLAINTEXT)return;Xs(t,sl(e));const r={type:nt.END_TAG,tagName:n,tagID:Ws(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Oa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Bt.RCDATA||t.parser.tokenizer.state===Bt.RAWTEXT||t.parser.tokenizer.state===Bt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Bt.DATA)}function k6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Oa(e){const t=Sr(e)||{line:void 0,column:void 0,offset:void 0},n=sl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function N6(e){return"children"in e?Zi(le(j({},e),{children:[]})):Zi(e)}function Uy(e){return function(t,n){return Dy(t,le(j({},e),{file:n}))}}const rs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Hy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...rs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...rs],h2:[["className","sr-only"]],img:[...rs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...rs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...rs],table:[...rs],ul:[...rs,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},gi={}.hasOwnProperty;function O6(e,t){let n={type:"root",children:[]};const r={schema:t?j(j({},Hy),t):Hy,stack:[]},s=jy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function jy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return I6(e,n);case"doctype":return P6(e,n);case"element":return R6(e,n);case"root":return L6(e,n);case"text":return D6(e,n)}}}function I6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Ia(a,t),a}}function P6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ia(n,t),n}}function R6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=zy(e,t.children),s=M6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&gi.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return Ia(u,t),u}function L6(e,t){const r={type:"root",children:zy(e,t.children)};return Ia(r,t),r}function D6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ia(r,t),r}function zy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=jy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function M6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&gi.call(r,n)?r[n]:void 0,u=r&&gi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(gi.call(l,f)){const p=l[f];let m=$y(e,qy(a,f),f,p);m==null&&(m=$y(e,qy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&gi.call(s,n)){const p=s[n];for(f in p)gi.call(p,f)&&!gi.call(d,f)&&(d[f]=p[f])}return d}function $y(e,t,n,r){return t?Array.isArray(r)?F6(e,t,n,r):Vy(e,t,n,r):void 0}function F6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Vy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Vy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&B6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function B6(e,t,n){const r=e.schema.protocols&&gi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),l=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function Ia(e,t){const n=M1(t);t.data&&(e.data=Zi(t.data)),n&&(e.position=n)}function qy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function U6(e){return function(t){return O6(t,e)}}const Yy=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",le(j(j({className:B(e,`${N}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},H6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=dt();return!e&&!t?null:w.jsx("div",{className:B(n,`${N}-disclaimer`),children:t?w.jsx(BE,{rehypePlugins:[Uy,U6],components:{ul:({children:r})=>w.jsx("ul",{className:B(n,`${N}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:B(n,`${N}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:B(n,`${N}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(Yy,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:B(n,`${N}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:B(n,`${N}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:B(n,`${N}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:B(n,`${N}-disclaimer-text`),children:e})})},dh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=Tn(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:p}=dt(),m=R.useRef(null),b=R.useRef(l);b.current=l;const y=t||!Dg(s,a,u),x=R.useRef(t);R.useEffect(()=>{var k;const S=x.current&&!t;x.current=t,S&&!y&&((k=m.current)==null||k.focus({preventScroll:!0}))},[t,y]);const _=S=>Ue(null,null,function*(){var I,z;S.preventDefault();const k=(((I=m.current)==null?void 0:I.value)||"").trim();if(k){const W=!s&&!a&&u===!0,D=b.current.length;m.current.value="";const V=yield r(k);W&&V.outcome!=="success"&&b.current.length===D&&((z=m.current)==null?void 0:z.value)===""&&(m.current.value=k,m.current.disabled||m.current.focus({preventScroll:!0}))}}),A=()=>{r("Can you connect me to a human?")};return w.jsxs("div",{className:B(d,e,`cim-${n}-component`,`${N}-search-bar-wrapper`),children:[w.jsxs("form",{className:B(d,e,`cim-${n}-component`,`${N}-search-bar`),name:`${N}-search-form`,onSubmit:_,children:[w.jsx("input",{className:B(d,e,`cim-${n}-component`,`${N}-search-input`),type:"text",ref:m,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything",name:`${N}-user-input`,disabled:y}),w.jsx(yk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:y}),p&&w.jsx(ur,{className:B(d,`${N}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:y,onClick:A,icon:w.jsx(ak,{})})]}),w.jsx(H6,{})]})};function j6(e){return ft({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function z6(e){return ft({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const Wy=R.createContext({isOpen:!1}),fh=R.createContext(null),Gy=R.createContext(null),Qs=()=>{var n,r;const e=R.useContext(fh),t=R.useContext(Gy);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Xy=({onClearChat:e,componentType:t})=>{const n=Qs(),r=()=>{e(),n()};return w.jsxs("button",{className:B(`${N}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(z6,{}),"Clear chat"]})},Qy=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=dt(),r=Qs(),[s,a]=R.useState(!1),u=()=>Ue(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return w.jsxs("button",{className:B(`${N}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(j6,{}),"Download transcript"]})};function $6(e){return e==null?[]:Array.isArray(e)?e:[e]}var V6=(e,...t)=>e.concat(t),q6=(e,...t)=>e.filter(n=>!t.includes(n)),Y6=e=>Array.from(new Set(e));function Ky(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?s?l:0:a>=u?s?0:t>u?u:t:a}function W6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Ky(e,t,{step:-r,loop:s})}var G6=e=>Array.isArray(e),Jy=e=>e!=null&&typeof e=="object",X6=e=>Jy(e)&&!G6(e),kl=e=>typeof e=="string",Ks=e=>typeof e=="function",Q6=e=>e==null,K6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),J6=e=>Object.prototype.toString.call(e),Zy=Function.prototype.toString,Z6=Zy.call(Object),e4=e=>{if(!Jy(e)||J6(e)!="[object Object]"||r4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=K6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zy.call(n)==Z6},t4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,n4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,r4=e=>t4(e)||n4(e),i4=e=>e(),s4=()=>{},hh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function o4(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:a4,max:u4}=Math,l4=e=>Number.isNaN(e),c4=e=>l4(e)?0:e,eT=(e,t,n)=>a4(u4(c4(e),t),n);function ph(e){if(!e4(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=ph(s))}return n}function mh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function d4(e,t){if(e==null)throw new Error(t())}function f4(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var h4=Object.defineProperty,p4=(e,t,n)=>t in e?h4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gh=(e,t,n)=>p4(e,typeof t!="symbol"?t+"":t,n),tT=()=>{},Nl=e=>typeof e=="object"&&e!==null,Js=e=>e?"":void 0,nT=e=>e?"true":void 0,m4=1,g4=9,E4=11,Kt=e=>Nl(e)&&e.nodeType===m4&&typeof e.nodeName=="string",Ol=e=>Nl(e)&&e.nodeType===g4,y4=e=>Nl(e)&&e===e.window,rT=e=>Kt(e)?e.localName||"":"#document";function T4(e){return["html","body","#document"].includes(rT(e))}var b4=e=>Nl(e)&&e.nodeType!==void 0,is=e=>b4(e)&&e.nodeType===E4&&"host"in e,w4=e=>Kt(e)&&e.localName==="input",x4=e=>Kt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Pa(e){if(!e)return!1;const t=e.getRootNode();return to(t)===e}var _4=/(textarea|select)/;function S4(e){if(e==null||!Kt(e))return!1;try{return w4(e)&&e.selectionStart!=null||_4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Zs(e,t){var r;if(!e||!t||!Kt(e)||!Kt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&is(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Cr(e){var t;return Ol(e)?e:y4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function v4(e){return Cr(e).documentElement}function eo(e){var t,n,r;return is(e)?eo(e.host):Ol(e)?(t=e.defaultView)!=null?t:window:Kt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function to(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function A4(e){if(rT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||is(e)&&e.host||v4(e);return is(t)?t.host:t}function Eh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Ol(t)||is(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var yh=new WeakMap;function no(e){return yh.has(e)||yh.set(e,eo(e).getComputedStyle(e)),yh.get(e)}var Th=new Set(["menu","listbox","dialog","grid","tree","region"]),C4=e=>Th.has(e),iT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function sT(e,t){const n=new Set,r=Eh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=iT(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&C4(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function oT(e,t){const n=Eh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=iT(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&Th.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function k4(e){const t=new Set;return oT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function N4(e){const t=e.getAttribute("role");return!!(t&&Th.has(t))}function O4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function I4(e){var t;return O4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function P4(e){if(!e.id)return!1;const t=Eh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&N4(e))}var bh=()=>typeof document!="undefined";function R4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var wh=e=>bh()&&e.test(R4()),L4=e=>bh()&&e.test(navigator.vendor),aT=()=>bh()&&!!navigator.maxTouchPoints,D4=()=>wh(/^iPhone/i),M4=()=>wh(/^iPad/i)||xh()&&navigator.maxTouchPoints>1,Il=()=>D4()||M4(),F4=()=>xh()||Il(),xh=()=>wh(/^Mac/i),B4=()=>F4()&&L4(/apple/i);function U4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function dr(e){var n;const t=U4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var uT=e=>e.button===0,H4=e=>e.button===2||xh()&&e.ctrlKey&&e.button===0,j4=e=>"touches"in e&&e.touches.length>0,z4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},lT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function $4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=z4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in lT&&(s=lT[s]),s}function cT(e,t="client"){const n=j4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Jt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},dT=e=>Kt(e)&&e.tagName==="IFRAME",V4=/^(audio|video|details)$/;function fT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var q4=e=>!Number.isNaN(fT(e)),Y4=e=>fT(e)<0;function W4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function hT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<s.length;){const d=s[l++];if(!d||a.has(d))continue;a.add(d);const f=W4(d,t);if(f){const p=Array.from(f.querySelectorAll(Pl)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,b+x)})}s.push(...p)}}return r}var Pl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",pT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Pl));(n==!0||n=="if-empty"&&s.length===0)&&Kt(e)&&kr(e)&&s.unshift(e);const u=[];for(const l of s)if(kr(l)){if(dT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...pT(d,{getShadowRoot:r}));continue}u.push(l)}return r?hT(u,r,kr):u};function kr(e){return!Kt(e)||e.closest("[inert]")?!1:e.matches(Pl)&&x4(e)}function ro(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Pl));n&&ss(e)&&s.unshift(e);const a=[];for(const u of s)if(ss(u)){if(dT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...ro(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=hT(a,r,ss);return!u.length&&n?s:u}return!a.length&&n?s:a}function ss(e){return Kt(e)&&e.tabIndex>0?!0:kr(e)&&!Y4(e)}function G4(e,t={}){const n=ro(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function X4(e,t={}){const{current:n,getShadowRoot:r}=t,s=ro(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:to(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function Ra(e){return e.tabIndex<0&&(V4.test(e.localName)||S4(e))&&!q4(e)?0:e.tabIndex}function mT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=ro(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var Q4=class v2{constructor(){gh(this,"id",null),gh(this,"fn_cleanup"),gh(this,"cleanup",()=>{this.cancel()})}static create(){return new v2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function qt(e){const t=Q4.create();return t.request(e),t.cleanup}function gT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function _h(e){const t=A4(e);return T4(t)?Cr(t).body:Kt(t)&&Z4(t)?t:_h(t)}var K4=/auto|scroll|overlay|hidden|clip/,J4=new Set(["inline","contents"]);function Z4(e){const t=eo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return K4.test(n+s+r)&&!J4.has(a)}var io="default",Sh="",Rl=new WeakMap;function eL(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Il()?(io==="default"&&(Sh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),io="disabled"):t&&(Rl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>tL({target:t,doc:r})}function tL(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Il()){if(io!=="disabled")return;io="restoring",setTimeout(()=>{gT(()=>{io==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Sh||""),Sh="",io="default")})},300)}else if(t&&Rl.has(t)){const a=Rl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Rl.delete(t)}}function nL(e={}){const u=e,{defer:t,target:n}=u,r=Sn(u,["defer","target"]),s=t?qt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(eL(le(j({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function rL(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=cT(l),f=Math.sqrt(hd(d.x,2)+hd(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=cT(l);r({point:d,event:l})},u=[Jt(e,"pointermove",s,!1),Jt(e,"pointerup",a,!1),Jt(e,"pointercancel",a,!1),Jt(e,"contextmenu",a,!1),nL({doc:e})];return()=>{u.forEach(l=>l())}}function iL(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=G4(e,{includeContainer:!0,getShadowRoot:a}),y=X4(l,{current:n,getShadowRoot:a}),x=!m&&!b;f.shiftKey&&Pa(y)?(s==null||s(),p=b):f.shiftKey&&(Pa(m)||x)?p=n:!f.shiftKey&&Pa(n)?(s==null||s(),p=m):!f.shiftKey&&(Pa(b)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Jt(u,"keydown",d,!0)}function sL(e,t){const l=t,{defer:n,triggerElement:r}=l,s=Sn(l,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(iL(d,j({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function oL(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ll(e,t){if(!e)return tT;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function aL(e,t,n){if(!e)return tT;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function uL(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function lL(e,t){const{timeout:n,rootNode:r}=t,s=eo(r),a=Cr(r),u=new s.AbortController;return uL(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var cL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),dL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,ET=e=>{const t={};let n;for(;n=dL.exec(e);)t[n[1]]=n[2];return t},fL=(e,t)=>{if(kl(e)){if(kl(t))return`${e};${t}`;e=ET(e)}else kl(t)&&(t=ET(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=hh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=cL(t[s],n[s]);continue}if(s==="style"){t[s]=fL(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function vU(e){return e}var so=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(so||{}),vh="__init__";function hL(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>to(t()),a=u=>t().getElementById(u);return le(j({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Pa,getById:a})}function pL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var oo=()=>e=>Array.from(new Set(e)),yT=typeof globalThis.document!="undefined"?R.useLayoutEffect:R.useEffect;function Dl(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=R.useState(t),[s,a]=R.useState(r),u=e().value!==void 0,l=R.useRef(s);l.current=u?e().value:s;const d=R.useRef(l.current);yT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,S;const x=d.current,_=Ks(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:_,prev:x}),u||a(_),n(_,x)||(S=(A=e()).onChange)==null||S.call(A,_,x)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?Hs.flushSync:i4)(()=>f(y))},invoke(y,x){var _,A;(A=(_=e()).onChange)==null||A.call(_,y,x)},hash(y){var x,_,A;return(A=(_=(x=e()).hash)==null?void 0:_.call(x,y))!=null?A:String(y)}}}Dl.cleanup=e=>{R.useEffect(()=>e,[])},Dl.ref=e=>{const t=R.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function mL(e){const t=R.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var gL=(e,t)=>{const n=R.useRef(!1),r=R.useRef(!1);R.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),R.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Ml(e,t={}){var ie,ne,ue,fe,ae,ve;const n=R.useMemo(()=>{const{id:de,ids:G,getRootNode:se}=t;return hL({id:de,ids:G,getRootNode:se})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(ne=(ie=e.props)==null?void 0:ie.call(e,{props:ph(t),scope:n}))!=null?ne:t,a=EL(s),u=(ue=e.context)==null?void 0:ue.call(e,{prop:a,bindable:Dl,scope:n,flush:bT,getContext(){return d},getComputed(){return W},getRefs(){return _},getEvent(){return y()}}),l=TT(u),d={get(de){var G;return(G=l.current)==null?void 0:G[de].ref.current},set(de,G){var se;(se=l.current)==null||se[de].set(G)},initial(de){var G;return(G=l.current)==null?void 0:G[de].initial},hash(de){var se,C;const G=(se=l.current)==null?void 0:se[de].get();return(C=l.current)==null?void 0:C[de].hash(G)}},f=R.useRef(new Map),p=R.useRef(null),m=R.useRef(null),b=R.useRef({type:""}),y=()=>le(j({},b.current),{current(){return b.current},previous(){return m.current}}),x=()=>le(j({},D),{matches(...de){return de.includes(D.ref.current)},hasTag(de){var G,se;return!!((se=(G=e.states[D.ref.current])==null?void 0:G.tags)!=null&&se.includes(de))}}),_=mL((ae=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?ae:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:H,action:S,guard:k,track:gL,refs:_,computed:W,flush:bT,scope:n,choose:z}),S=de=>{const G=Ks(de)?de(A()):de;if(!G)return;const se=G.map(C=>{var J,P;const M=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[C];return M||mh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),M});for(const C of se)C==null||C(A())},k=de=>{var G,se;return Ks(de)?de(A()):(se=(G=e.implementations)==null?void 0:G.guards)==null?void 0:se[de](A())},I=de=>{const G=Ks(de)?de(A()):de;if(!G)return;const se=G.map(M=>{var P,Se;const J=(Se=(P=e.implementations)==null?void 0:P.effects)==null?void 0:Se[M];return J||mh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),J}),C=[];for(const M of se){const J=M==null?void 0:M(A());J&&C.push(J)}return()=>C.forEach(M=>M==null?void 0:M())},z=de=>$6(de).find(G=>{let se=!G.guard;return kl(G.guard)?se=!!k(G.guard):Ks(G.guard)&&(se=G.guard(A())),se}),W=de=>{d4(e.computed,()=>"[zag-js] No computed object found on machine");const G=e.computed[de];return G({context:d,event:y(),prop:a,refs:_,scope:n,computed:W})},D=Dl(()=>({defaultValue:e.initialState({prop:a}),onChange(de,G){var C,M,J,P;if(G){const Se=f.current.get(G);Se==null||Se(),f.current.delete(G)}G&&S((C=e.states[G])==null?void 0:C.exit),S((M=p.current)==null?void 0:M.actions);const se=I((J=e.states[de])==null?void 0:J.effects);if(se&&f.current.set(de,se),G===vh){S(e.entry);const Se=I(e.effects);Se&&f.current.set(vh,Se)}S((P=e.states[de])==null?void 0:P.entry)}})),V=R.useRef(void 0),ee=R.useRef(so.NotStarted);yT(()=>{queueMicrotask(()=>{var M;const se=ee.current===so.Started;ee.current=so.Started,r(se?"rehydrating...":"initializing...");const C=(M=V.current)!=null?M:D.initial;D.invoke(C,se?D.get():vh)});const de=f.current,G=D.ref.current;return()=>{r("unmounting..."),V.current=G,ee.current=so.Stopped,de.forEach(se=>se==null?void 0:se()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const ce=()=>"ref"in D?D.ref.current:D.get(),H=de=>{queueMicrotask(()=>{var P,Se,Ae,me,Ie;if(ee.current!==so.Started)return;m.current=b.current,b.current=de;let G=ce();const se=(Ae=(P=e.states[G].on)==null?void 0:P[de.type])!=null?Ae:(Se=e.on)==null?void 0:Se[de.type],C=z(se);if(!C)return;p.current=C;const M=(me=C.target)!=null?me:G;r("transition",de.type,C.target||G,`(${C.actions})`);const J=M!==G;J?Hs.flushSync(()=>D.set(M)):C.reenter&&!J?D.invoke(G,G):S((Ie=C.actions)!=null?Ie:[])})};return(ve=e.watch)==null||ve.call(e,A()),{state:x(),send:H,context:d,prop:a,scope:n,refs:_,computed:W,event:y(),getStatus:()=>ee.current}}function TT(e){const t=R.useRef(e);return t.current=e,t}function EL(e){const t=TT(e);return function(r){return t.current[r]}}function bT(e){queueMicrotask(()=>{Hs.flushSync(()=>e())})}var Ah=pL(e=>e);function Fl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function yL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Ch=e=>{const t=R.memo(R.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=Sn(f,["asChild","children"]);if(!s)return R.createElement(e,le(j({},u),{ref:r}),a);if(!R.isValidElement(a))return null;const l=R.Children.only(a),d=yL(l);return R.cloneElement(l,le(j({},Yt(u,l.props)),{ref:r?Fl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},fn=(()=>{const e=new Map;return new Proxy(Ch,{apply(t,n,r){return Ch(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Ch(r)),e.get(r)}})})();function TL(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function os(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=R.createContext(u);l.displayName=t;function d(){var p;const f=R.useContext(l);if(!f&&n){const m=new Error(a!=null?a:TL(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[bL,kh]=os({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[wT,La]=os({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),xT=R.forwardRef((e,t)=>{const n=kh(),r=La(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(fn.div,le(j({},s),{ref:Fl(r.ref,t)}))});xT.displayName="PopoverContent";const _T=R.forwardRef((e,t)=>{const n=kh(),r=La(),s=Yt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(fn.div,le(j({},s),{ref:t}))});_T.displayName="PopoverPositioner";const Da=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},j({},e)]),ST=e=>Da()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function wL(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var xL={props({props:e}){return le(j({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",no(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});qt(()=>{var l,d;const u=Bl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{qt(()=>{e.set("prevAnimationName",Bl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Bl(t.get("styles")))},u=d=>{const f=Bl(t.get("styles"));dr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const l=Ll(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),gT(()=>l())}}}}};function Bl(e){return(e==null?void 0:e.animationName)||"none"}oo()(["onExitComplete","present","immediate"]);function _L(e,t={}){const{sync:n=!1}=t,r=SL(e);return R.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function SL(e){const t=R.useRef(e);return t.current=e,t}const Nh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=Sn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=R.useRef(!1),l=le(j({},a),{present:r,onExitComplete:_L(e.onExitComplete)}),d=Ml(xL,l),f=wL(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var as=(e,t=[])=>({parts:(...n)=>{if(vL(t))return as(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>as(e,[...t,...n]),omit:(...n)=>as(e,t.filter(r=>!n.includes(r))),rename:n=>as(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ao(e)}"][data-part="${ao(r)}"]`,`& [data-scope="${ao(e)}"][data-part="${ao(r)}"]`].join(", "),attrs:{"data-scope":ao(e),"data-part":ao(r)}}}),{})}),ao=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),vL=e=>e.length===0;const AL=["top","right","bottom","left"],Ei=Math.min,qr=Math.max,Ul=Math.round,Hl=Math.floor,Nr=e=>({x:e,y:e}),CL={left:"right",right:"left",bottom:"top",top:"bottom"};function vT(e,t,n){return qr(e,Ei(t,n))}function Yr(e,t){return typeof e=="function"?e(t):e}function yi(e){return e.split("-")[0]}function uo(e){return e.split("-")[1]}function Oh(e){return e==="x"?"y":"x"}function Ih(e){return e==="y"?"height":"width"}function Or(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ph(e){return Oh(Or(e))}function kL(e,t,n){n===void 0&&(n=!1);const r=uo(e),s=Ph(e),a=Ih(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=jl(u)),[u,jl(u)]}function NL(e){const t=jl(e);return[Rh(e),t,Rh(t)]}function Rh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const AT=["left","right"],CT=["right","left"],OL=["top","bottom"],IL=["bottom","top"];function PL(e,t,n){switch(e){case"top":case"bottom":return n?t?CT:AT:t?AT:CT;case"left":case"right":return t?OL:IL;default:return[]}}function RL(e,t,n,r){const s=uo(e);let a=PL(yi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Rh)))),a}function jl(e){const t=yi(e);return CL[t]+e.slice(t.length)}function LL(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function kT(e){return typeof e!="number"?LL(e):{top:e,right:e,bottom:e,left:e}}function zl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function NT(e,t,n){let{reference:r,floating:s}=e;const a=Or(t),u=Ph(t),l=Ih(u),d=yi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const x=uo(t);return x&&(y[u]+=b*(x==="end"?1:-1)*(n&&f?-1:1)),y}function DL(e,t){return Ue(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=Yr(t,e),x=kT(y),A=l[b?m==="floating"?"reference":"floating":m],S=zl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),z=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},W=zl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:I,strategy:d}):k);return{top:(S.top-W.top+x.top)/z.y,bottom:(W.bottom-S.bottom+x.bottom)/z.y,left:(S.left-W.left+x.left)/z.x,right:(W.right-S.right+x.right)/z.x}})}const ML=50,FL=(e,t,n)=>Ue(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:le(j({},u),{detectOverflow:DL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=NT(f,r,d),b=r,y=0;const x={};for(let _=0;_<a.length;_++){const A=a[_];if(!A)continue;const{name:S,fn:k}=A,{x:I,y:z,data:W,reset:D}=yield k({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=z!=null?z:m,x[S]=j(j({},x[S]),W),D&&y<ML&&(y++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=NT(f,b,d)),_=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:x}}),BL=e=>({name:"arrow",options:e,fn(n){return Ue(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Yr(e,n)||{};if(p==null)return{};const b=kT(m),y={x:r,y:s},x=Ph(a),_=Ih(x),A=yield l.getDimensions(p),S=x==="y",k=S?"top":"left",I=S?"bottom":"right",z=S?"clientHeight":"clientWidth",W=u.reference[_]+u.reference[x]-y[x]-u.floating[_],D=y[x]-u.reference[x],V=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ee=V?V[z]:0;(!ee||!(yield l.isElement==null?void 0:l.isElement(V)))&&(ee=d.floating[z]||u.floating[_]);const ce=W/2-D/2,H=ee/2-A[_]/2-1,ie=Ei(b[k],H),ne=Ei(b[I],H),ue=ee-A[_]-ne,fe=ee/2-A[_]/2+ce,ae=vT(ie,fe,ue),ve=!f.arrow&&uo(a)!=null&&fe!==ae&&u.reference[_]/2-(fe<ie?ie:ne)-A[_]/2<0,de=ve?fe<ie?fe-ie:fe-ue:0;return{[x]:y[x]+de,data:j({[x]:ae,centerOffset:fe-ae-de},ve&&{alignmentOffset:de}),reset:ve}})}}),UL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ue(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,ae=Yr(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:A=!0}=ae,S=Sn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=yi(a),I=Or(d),z=yi(d)===d,W=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(z||!A?[jl(d)]:NL(d)),V=_!=="none";!y&&V&&D.push(...RL(d,A,_,W));const ee=[d,...D],ce=yield f.detectOverflow(n,S),H=[];let ie=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&H.push(ce[k]),b){const ve=kL(a,l,W);H.push(ce[ve[0]],ce[ve[1]])}if(ie=[...ie,{placement:a,overflows:H}],!H.every(ve=>ve<=0)){var ne,ue;const ve=(((ne=u.flip)==null?void 0:ne.index)||0)+1,de=ee[ve];if(de&&(!(b==="alignment"?I!==Or(de):!1)||ie.every(C=>Or(C.placement)===I?C.overflows[0]>0:!0)))return{data:{index:ve,overflows:ie},reset:{placement:de}};let G=(ue=ie.filter(se=>se.overflows[0]<=0).sort((se,C)=>se.overflows[1]-C.overflows[1])[0])==null?void 0:ue.placement;if(!G)switch(x){case"bestFit":{var fe;const se=(fe=ie.filter(C=>{if(V){const M=Or(C.placement);return M===I||M==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(M=>M>0).reduce((M,J)=>M+J,0)]).sort((C,M)=>C[1]-M[1])[0])==null?void 0:fe[0];se&&(G=se);break}case"initialPlacement":G=d;break}if(a!==G)return{reset:{placement:G}}}return{}})}}};function OT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IT(e){return AL.some(t=>e[t]>=0)}const HL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ue(this,null,function*(){const{rects:r,platform:s}=n,l=Yr(e,n),{strategy:a="referenceHidden"}=l,u=Sn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,le(j({},u),{elementContext:"reference"})),f=OT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:IT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,le(j({},u),{altBoundary:!0})),f=OT(d,r.floating);return{data:{escapedOffsets:f,escaped:IT(f)}}}default:return{}}})}}},PT=new Set(["left","top"]);function jL(e,t){return Ue(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=yi(n),l=uo(n),d=Or(n)==="y",f=PT.has(u)?-1:1,p=a&&d?-1:1,m=Yr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const zL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ue(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield jL(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:le(j({},f),{placement:l})}})}}},$L=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ue(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=Yr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:z=>{let{x:W,y:D}=z;return{x:W,y:D}}}}=I,p=Sn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Or(a),x=Oh(y);let _=m[x],A=m[y];const S=(z,W)=>vT(W+b[z==="y"?"top":"left"],W,W-b[z==="y"?"bottom":"right"]);l&&(_=S(x,_)),d&&(A=S(y,A));const k=f.fn(le(j({},n),{[x]:_,[y]:A}));return le(j({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[x]:l,[y]:d}}})})}}},VL=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=Yr(e,t),b={x:s,y:a},y=Or(u),x=Oh(y);let _=b[x],A=b[y];const S=Yr(f,t),k=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const W=x==="y"?"height":"width",D=l.reference[x]-l.floating[W]+k.mainAxis,V=l.reference[x]+l.reference[W]-k.mainAxis;_<D?_=D:_>V&&(_=V)}if(m){var I,z;const W=x==="y"?"width":"height",D=PT.has(yi(u)),V=l.reference[y]-l.floating[W]+(D&&((I=d.offset)==null?void 0:I[y])||0)+(D?0:k.crossAxis),ee=l.reference[y]+l.reference[W]+(D?0:((z=d.offset)==null?void 0:z[y])||0)-(D?k.crossAxis:0);A<V?A=V:A>ee&&(A=ee)}return{[x]:_,[y]:A}}}},qL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ue(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,H=Yr(e,n),{apply:l=()=>{}}=H,d=Sn(H,["apply"]),f=yield a.detectOverflow(n,d),p=yi(r),m=uo(r),b=Or(r)==="y",{width:y,height:x}=s.floating;let _,A;p==="top"||p==="bottom"?(_=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,_=m==="end"?"top":"bottom");const S=x-f.top-f.bottom,k=y-f.left-f.right,I=Ei(x-f[_],S),z=Ei(y-f[A],k),W=n.middlewareData.shift,D=!W;let V=I,ee=z;W!=null&&W.enabled.x&&(ee=k),W!=null&&W.enabled.y&&(V=S),D&&!m&&(b?ee=y-2*qr(f.left,f.right):V=x-2*qr(f.top,f.bottom)),yield l(le(j({},n),{availableWidth:ee,availableHeight:V}));const ce=yield a.getDimensions(u.floating);return y!==ce.width||x!==ce.height?{reset:{rects:!0}}:{}})}}};function $l(){return typeof window!="undefined"}function lo(e){return RT(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ir(e){var t;return(t=(RT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function RT(e){return $l()?e instanceof Node||e instanceof $n(e).Node:!1}function fr(e){return $l()?e instanceof Element||e instanceof $n(e).Element:!1}function Pr(e){return $l()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function LT(e){return!$l()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function Ma(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function YL(e){return/^(table|td|th)$/.test(lo(e))}function Vl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const WL=/transform|translate|scale|rotate|perspective|filter/,GL=/paint|layout|strict|content/,us=e=>!!e&&e!=="none";let Lh;function Dh(e){const t=fr(e)?hr(e):e;return us(t.transform)||us(t.translate)||us(t.scale)||us(t.rotate)||us(t.perspective)||!Mh()&&(us(t.backdropFilter)||us(t.filter))||WL.test(t.willChange||"")||GL.test(t.contain||"")}function XL(e){let t=Ti(e);for(;Pr(t)&&!co(t);){if(Dh(t))return t;if(Vl(t))return null;t=Ti(t)}return null}function Mh(){return Lh==null&&(Lh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lh}function co(e){return/^(html|body|#document)$/.test(lo(e))}function hr(e){return $n(e).getComputedStyle(e)}function ql(e){return fr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ti(e){if(lo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||LT(e)&&e.host||Ir(e);return LT(t)?t.host:t}function DT(e){const t=Ti(e);return co(t)?(e.ownerDocument||e).body:Pr(t)&&Ma(t)?t:DT(t)}function Fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=DT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=$n(s);if(a){const l=Fh(u);return t.concat(u,u.visualViewport||[],Ma(s)?s:[],l&&n?Fa(l):[])}else return t.concat(s,Fa(s,[],n))}function Fh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function MT(e){const t=hr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Pr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=Ul(n)!==a||Ul(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Bh(e){return fr(e)?e:e.contextElement}function fo(e){const t=Bh(e);if(!Pr(t))return Nr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=MT(t);let u=(a?Ul(n.width):n.width)/r,l=(a?Ul(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const QL=Nr(0);function FT(e){const t=$n(e);return!Mh()||!t.visualViewport?QL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Bh(e);let u=Nr(1);t&&(r?fr(r)&&(u=fo(r)):u=fo(e));const l=KL(a,n,r)?FT(a):Nr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=$n(a),y=r&&fr(r)?$n(r):r;let x=b,_=Fh(x);for(;_&&r&&y!==x;){const A=fo(_),S=_.getBoundingClientRect(),k=hr(_),I=S.left+(_.clientLeft+parseFloat(k.paddingLeft))*A.x,z=S.top+(_.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=I,f+=z,x=$n(_),_=Fh(x)}}return zl({width:p,height:m,x:d,y:f})}function Yl(e,t){const n=ql(e).scrollLeft;return t?t.left+n:ls(Ir(e)).left+n}function BT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function JL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ir(r),l=t?Vl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Nr(1);const p=Nr(0),m=Pr(r);if((m||!m&&!a)&&((lo(r)!=="body"||Ma(u))&&(d=ql(r)),Pr(r))){const y=ls(r);f=fo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?BT(u,d):Nr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function ZL(e){return Array.from(e.getClientRects())}function e5(e){const t=Ir(e),n=ql(e),r=e.ownerDocument.body,s=qr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=qr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Yl(e);const l=-n.scrollTop;return hr(r).direction==="rtl"&&(u+=qr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const UT=25;function t5(e,t){const n=$n(e),r=Ir(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const p=Mh();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Yl(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=UT&&(a-=x)}else f<=UT&&(a+=f);return{width:a,height:u,x:l,y:d}}const n5=new Set(["absolute","fixed"]);function r5(e,t){const n=ls(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Pr(e)?fo(e):Nr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function HT(e,t,n){let r;if(t==="viewport")r=t5(e,n);else if(t==="document")r=e5(Ir(e));else if(fr(t))r=r5(t,n);else{const s=FT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return zl(r)}function jT(e,t){const n=Ti(e);return n===t||!fr(n)||co(n)?!1:hr(n).position==="fixed"||jT(n,t)}function i5(e,t){const n=t.get(e);if(n)return n;let r=Fa(e,[],!1).filter(l=>fr(l)&&lo(l)!=="body"),s=null;const a=hr(e).position==="fixed";let u=a?Ti(e):e;for(;fr(u)&&!co(u);){const l=hr(u),d=Dh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&n5.has(s.position)||Ma(u)&&!d&&jT(e,u))?r=r.filter(p=>p!==u):s=l,u=Ti(u)}return t.set(e,r),r}function s5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Vl(t)?[]:i5(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=HT(t,p,s);return f.top=qr(m.top,f.top),f.right=Ei(m.right,f.right),f.bottom=Ei(m.bottom,f.bottom),f.left=qr(m.left,f.left),f},HT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function o5(e){const{width:t,height:n}=MT(e);return{width:t,height:n}}function a5(e,t,n){const r=Pr(t),s=Ir(t),a=n==="fixed",u=ls(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Nr(0);function f(){d.x=Yl(s)}if(r||!r&&!a)if((lo(t)!=="body"||Ma(s))&&(l=ql(t)),r){const y=ls(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?BT(s,l):Nr(0),m=u.left+l.scrollLeft-d.x-p.x,b=u.top+l.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function Uh(e){return hr(e).position==="static"}function zT(e,t){if(!Pr(e)||hr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ir(e)===n&&(n=n.ownerDocument.body),n}function $T(e,t){const n=$n(e);if(Vl(e))return n;if(!Pr(e)){let s=Ti(e);for(;s&&!co(s);){if(fr(s)&&!Uh(s))return s;s=Ti(s)}return n}let r=zT(e,t);for(;r&&YL(r)&&Uh(r);)r=zT(r,t);return r&&co(r)&&Uh(r)&&!Dh(r)?n:r||XL(e)||n}const u5=function(e){return Ue(this,null,function*(){const t=this.getOffsetParent||$T,n=this.getDimensions,r=yield n(e.floating);return{reference:a5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function l5(e){return hr(e).direction==="rtl"}const c5={convertOffsetParentRelativeRectToViewportRelativeRect:JL,getDocumentElement:Ir,getClippingRect:s5,getOffsetParent:$T,getElementRects:u5,getClientRects:ZL,getDimensions:o5,getScale:fo,isElement:fr,isRTL:l5};function VT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function d5(e,t){let n=null,r;const s=Ir(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(l||t(),!b||!y)return;const x=Hl(m),_=Hl(s.clientWidth-(p+b)),A=Hl(s.clientHeight-(m+y)),S=Hl(p),I={rootMargin:-x+"px "+-_+"px "+-A+"px "+-S+"px",threshold:qr(0,Ei(1,d))||1};let z=!0;function W(D){const V=D[0].intersectionRatio;if(V!==d){if(!z)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!VT(f,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(W,le(j({},I),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(W,I)}n.observe(e)}return u(!0),a}function f5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Bh(e),p=s||a?[...f?Fa(f):[],...Fa(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?d5(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(S=>{let[k]=S;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,_=d?ls(e):null;d&&A();function A(){const S=ls(e);_&&!VT(_,S)&&n(),_=S,x=requestAnimationFrame(A)}return n(),()=>{var S;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const h5=zL,p5=$L,m5=UL,g5=qL,E5=HL,y5=BL,T5=VL,b5=(e,t,n)=>{const r=new Map,s=j({platform:c5},n),a=le(j({},s.platform),{_c:r});return FL(e,t,le(j({},s),{platform:a}))};function qT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return le(j({},s),{toJSON:()=>s})}function w5(e){if(!e)return qT();const{x:t,y:n,width:r,height:s}=e;return qT(t,n,r,s)}function x5(e,t){return{contextElement:Kt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?w5(r):n.getBoundingClientRect()}}}var Ba=e=>({variable:e,reference:`var(${e})`}),Wr={arrowSize:Ba("--arrow-size"),arrowSizeHalf:Ba("--arrow-size-half"),arrowBg:Ba("--arrow-background"),transformOrigin:Ba("--transform-origin"),arrowOffset:Ba("--arrow-offset")},_5=e=>e==="top"||e==="bottom"?"y":"x";function S5(e,t){return{name:"transformOrigin",fn(n){var ce,H,ie,ne,ue;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=_5(d),p=((ce=s.arrow)==null?void 0:ce.x)||0,m=((H=s.arrow)==null?void 0:H.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+b/2,_=m+y/2,A=Math.abs(((ie=s.shift)==null?void 0:ie.y)||0),S=u.reference.height/2,k=y/2,I=(ue=(ne=e.offset)==null?void 0:ne.mainAxis)!=null?ue:e.gutter,z=typeof I=="number"?I+k:I!=null?I:k,W=A>z,D={top:`${x}px calc(100% + ${z}px)`,bottom:`${x}px ${-z}px`,left:`calc(100% + ${z}px) ${_}px`,right:`${-z}px ${_}px`}[d],V=`${x}px ${u.reference.y+S-l}px`,ee=!!e.overlap&&f==="y"&&W;return r.floating.style.setProperty(Wr.transformOrigin.variable,ee?V:D),{data:{transformOrigin:ee?V:D}}}}}var v5={name:"rects",fn({rects:e}){return{data:e}}},A5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${Wr.arrowOffset.reference})`}),{}}}};function C5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var k5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function YT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Hh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function N5(e,t,n){const r=e||t.createElement("div");return y5({element:r,padding:n.arrowPadding})}function O5(e,t){var n;if(!Q6((n=t.offset)!=null?n:t.gutter))return h5(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=C5(r),d=l?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return ph({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function I5(e){if(!e.flip)return;const t=Hh(e.boundary);return m5(le(j({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function P5(e){if(!e.slide&&!e.overlap)return;const t=Hh(e.boundary);return p5(le(j({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:T5()}))}function R5(e){return g5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),l=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${l}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function L5(e){var t;if(e.hideWhenDetached)return E5({strategy:"referenceHidden",boundary:(t=Hh(e.boundary))!=null?t:"clippingAncestors"})}function D5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function M5(e,t,n={}){const r=x5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},k5,n),a=t.querySelector("[data-part=arrow]"),u=[O5(a,s),I5(s),P5(s),N5(a,t.ownerDocument,s),A5(a),S5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),R5(s),L5(s),v5],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ue(null,null,function*(){var z;if(!r||!t)return;const _=yield b5(r,t,{placement:l,middleware:u,strategy:d});f==null||f(_),p==null||p({placed:!0});const A=eo(t),S=YT(A,_.x),k=YT(A,_.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((z=_.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const W=no(I);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>Ue(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=D5(s.listeners),x=s.listeners?f5(r,t,b,y):s4;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function WT(e,t,n={}){const l=n,{defer:r}=l,s=Sn(l,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(M5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var F5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function B5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:Wr.arrowSize.reference,height:Wr.arrowSize.reference,[Wr.arrowSizeHalf.variable]:`calc(${Wr.arrowSize.reference} / 2)`,[Wr.arrowOffset.variable]:`calc(${Wr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?F5[t.split("-")[0]]:void 0,background:Wr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var ho=new WeakMap,Wl=new WeakMap,Gl={},jh=0,GT=e=>e&&(e.host||GT(e.parentNode)),U5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=GT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),H5=new Set(["script","output","status","next-route-announcer"]),j5=e=>H5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),z5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=U5(n,Array.isArray(e)?e:[e]);Gl[r]||(Gl[r]=new WeakMap);const l=Gl[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Kt(y)&&oT(y,x=>{m(x)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))b(x);else try{if(j5(x))return;const A=x.getAttribute(s)==="true",S=(ho.get(x)||0)+1,k=(l.get(x)||0)+1;ho.set(x,S),l.set(x,k),d.push(x),S===1&&A&&Wl.set(x,!0),k===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(_){console.error("[zag-js > ariaHidden] cannot operate on ",x,_)}})};return b(n),f.clear(),jh++,()=>{d.forEach(y=>{const x=ho.get(y)-1,_=l.get(y)-1;ho.set(y,x),l.set(y,_),x||(Wl.has(y)||y.removeAttribute(s),Wl.delete(y)),_||y.removeAttribute(r)}),jh--,jh||(ho=new WeakMap,ho=new WeakMap,Wl=new WeakMap,Gl={})}},$5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,V5=(e,t=$5(e),n="data-aria-hidden",r=!0)=>{if(t)return z5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},q5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function XT(e,t={}){const{defer:n=!0}=t,r=n?q5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(V5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function Y5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function W5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var QT="pointerdown.outside",KT="focus.outside";function G5(e){for(const t of e)if(Kt(t)&&kr(t))return!0;return!1}var JT=e=>"clientY"in e;function X5(e,t){if(!JT(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Q5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ZT(e,t){if(!t||!JT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},l={x:e.clientX,y:e.clientY};return Q5(u,l)?r||a:!1}function K5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Cr(e),f=eo(e),p=Y5(f),m=W5(f);function b(I,z){if(!Kt(z)||!z.isConnected||Zs(e,z)||X5(e,I)||l&&sT(e,z))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const V=_h(W);if(ZT(I,V))return!1}const D=_h(e);return ZT(I,D)?!1:!(n!=null&&n(z))}const y=new Set,x=is(e==null?void 0:e.getRootNode());function _(I){function z(W){var ce,H;const D=u&&!aT()?qt:ie=>ie(),V=W!=null?W:I,ee=(H=(ce=V==null?void 0:V.composedPath)==null?void 0:ce.call(V))!=null?H:[V==null?void 0:V.target];D(()=>{const ie=x?ee[0]:dr(I);if(!(!e||!b(I,ie))){if(s||a){const ne=hh(s,a);e.addEventListener(QT,ne,{once:!0})}eb(e,QT,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:H4(V),focusable:G5(ee),target:ie}})}})}I.pointerType==="touch"?(y.forEach(W=>W()),y.add(Jt(d,"click",z,{once:!0})),y.add(m.addEventListener("click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0}))):z()}const A=new Set,S=setTimeout(()=>{A.add(Jt(d,"pointerdown",_,!0)),A.add(m.addEventListener("pointerdown",_,!0)),A.add(p.addEventListener("pointerdown",_,!0))},0);function k(I){(u?qt:W=>W())(()=>{var V,ee;const W=(ee=(V=I==null?void 0:I.composedPath)==null?void 0:V.call(I))!=null?ee:[I==null?void 0:I.target],D=x?W[0]:dr(I);if(!(!e||!b(I,D))){if(r||a){const ce=hh(r,a);e.addEventListener(KT,ce,{once:!0})}eb(e,KT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:kr(D),target:D}})}})}return aT()||(A.add(Jt(d,"focusin",k,!0)),A.add(m.addEventListener("focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(S),y.forEach(I=>I()),A.forEach(I=>I())}}function J5(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(K5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function eb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function Z5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Jt(Cr(e),"keydown",n,{capture:!0})}var tb="layer:request-dismiss",Kn={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Zs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Zs(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>Kn.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];tD(e,tb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),eD(e,tb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function eD(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function tD(e,t,n){e.addEventListener(t,n,{once:!0})}var nb;function rb(){Kn.layers.forEach(({node:e})=>{e.style.pointerEvents=Kn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function nD(e){e.style.pointerEvents=""}function rD(e,t){const n=Cr(e),r=[];return Kn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(nb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=lL(()=>{const l=s();return Kt(l)?l:null},{timeout:1e3});a.then(l=>r.push(Ll(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{Kn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=nb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function iD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){mh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Kn.add(f),rb();function p(_){var S,k;const A=dr(_.detail.originalEvent);Kn.isBelowPointerBlockingLayer(e)||Kn.isInBranch(A)||((S=t.onPointerDownOutside)==null||S.call(t,_),(k=t.onInteractOutside)==null||k.call(t,_),!_.defaultPrevented&&(l&&console.log("onPointerDownOutside:",_.detail.originalEvent),r==null||r()))}function m(_){var S,k;const A=dr(_.detail.originalEvent);Kn.isInBranch(A)||((S=t.onFocusOutside)==null||S.call(t,_),(k=t.onInteractOutside)==null||k.call(t,_),!_.defaultPrevented&&(l&&console.log("onFocusOutside:",_.detail.originalEvent),r==null||r()))}function b(_){var A;Kn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,_),!_.defaultPrevented&&r&&(_.preventDefault(),r()))}function y(_){var I;if(!e)return!1;const A=typeof u=="function"?u():u,S=Array.isArray(A)?A:[A],k=(I=t.persistentElements)==null?void 0:I.map(z=>z()).filter(Kt);return k&&S.push(...k),S.some(z=>Zs(z,_))||Kn.isInNestedLayer(e,_)}const x=[a?rD(e,t.persistentElements):void 0,Z5(e,b),J5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{Kn.remove(e),rb(),nD(e),x.forEach(_=>_==null?void 0:_())}}function ib(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=Ks(e)?e():e;s.push(iD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var sD=Object.defineProperty,oD=(e,t,n)=>t in e?sD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kt=(e,t,n)=>oD(e,typeof t!="symbol"?t+"":t,n),sb={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},aD=[],uD=class{constructor(e,t){kt(this,"trapStack"),kt(this,"config"),kt(this,"doc"),kt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),kt(this,"portalContainers",new Set),kt(this,"listenerCleanups",[]),kt(this,"handleFocus",r=>{const s=dr(r),a=this.findContainerIndex(s,r)>=0;if(a||Ol(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Ra(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ra(f)>0))||(l=!1);else l=!1;l&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),kt(this,"handlePointerDown",r=>{const s=dr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Ha(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ha(this.config.allowOutsideClick,r)||r.preventDefault()}}),kt(this,"handleClick",r=>{const s=dr(r);this.findContainerIndex(s,r)>=0||Ha(this.config.clickOutsideDeactivates,r)||Ha(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),kt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Ua(r)&&r.preventDefault(),this.tryFocus(a)}}),kt(this,"handleEscapeKey",r=>{lD(r)&&Ha(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),kt(this,"_mutationObserver"),kt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return I4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?P4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),kt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),kt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!kr(r)){const s=to(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),kt(this,"tryFocus",r=>{if(r!==!1&&r!==to(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,cD(r)&&r.select()}}),kt(this,"deactivate",r=>{if(!this.state.active)return this;const s=j({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),sb.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),l=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{ob(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),kt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),kt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),kt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),kt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),kt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),kt(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),kt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||dr(s);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||kr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];l=Ra(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Ua(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||kr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];l=Ra(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Ua(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||aD;const n=j({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ua(r)&&!r.shiftKey},isKeyBackward(r){return Ua(r)&&r.shiftKey}},t);this.doc=n.document||Cr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{k4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?sT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ro(e,{getShadowRoot:this.config.getShadowRoot}),n=pT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let l=!1;for(let f=0;f<t.length;f++)if(Ra(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ss(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ss(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return sb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ob(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Jt(this.doc,"focusin",this.handleFocus,!0),Jt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Jt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Jt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Jt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Jt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=to(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Ua=e=>e.key==="Tab",Ha=(e,...t)=>typeof e=="function"?e(...t):e,lD=e=>!e.isComposing&&e.key==="Escape",ob=e=>setTimeout(e,0),cD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function ab(e,t={}){let n;const r=qt(()=>{const s=typeof e=="function"?e():e;if(s){n=new uD(s,le(j({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Cr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var zh="data-scroll-lock";function dD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function ub(e){const t=no(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function lb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(zh))return;const u=ub(r)||ub(s),l=n.innerWidth-r.clientWidth;s.setAttribute(zh,"");const d=()=>aL(r,"--scrollbar-width",`${l}px`),f=dD(r),p=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),Ll(s,x)},m=()=>{var W,D;const{scrollX:x,scrollY:_,visualViewport:A}=n,S=(W=A==null?void 0:A.offsetLeft)!=null?W:0,k=(D=A==null?void 0:A.offsetTop)!=null?D:0,I={position:"fixed",overflow:"hidden",top:`${-(_-Math.floor(k))}px`,left:`${-(x-Math.floor(S))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const z=Ll(s,I);return()=>{z==null||z(),n.scrollTo({left:x,top:_,behavior:"instant"})}},b=[d(),Il()?m():p()];return()=>{b.forEach(x=>x==null?void 0:x()),s.removeAttribute(zh)}}var fD=as("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Rr=fD.build(),cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},db=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},$h=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},fb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},hD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Vh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},pD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},hb=e=>e.getById(cb(e)),po=e=>e.getById(db(e)),mo=e=>e.getById($h(e)),pb=e=>e.getById(fb(e)),mD=e=>e.getById(Vh(e)),gD=e=>e.getById(qh(e));function ED(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=B5(le(j({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(le(j({id:hD(l)},Rr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(le(j({},Rr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(le(j({},Rr.anchor.attrs),{dir:u("dir"),id:cb(l)}))},getTriggerProps(){return t.button(le(j({},Rr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:db(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":$h(l),onPointerDown(y){uT(y)&&B4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(le(j({},Rr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(j({id:fb(l)},Rr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(le(j({},Rr.content.attrs),{dir:u("dir"),id:$h(l),tabIndex:-1,role:"dialog","aria-modal":nT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Js(d),"aria-labelledby":m.title?Vh(l):void 0,"aria-describedby":m.description?qh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(le(j({},Rr.title.attrs),{id:Vh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(le(j({},Rr.description.attrs),{id:qh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(le(j({},Rr.closeTrigger.attrs),{dir:u("dir"),id:pD(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var yD={props({props:e}){return le(j({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:j({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=hb(n))!=null?a:po(n);return WT(r,()=>pb(n),le(j({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>mo(n);let s=!0;return ib(r,{type:"popover",pointerBlocking:t("modal"),exclude:po(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:sL(()=>mo(t),{triggerElement:po(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?XT(()=>[mo(t),po(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return lb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?ab(()=>mo(t),{initialFocus:()=>mT({root:mo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=hb(n))!=null?u:po(n);WT(s,()=>pb(n),le(j(j({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!mD(t),description:!!gD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=mT({root:mo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||qt(()=>{const a=po(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};oo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[CU,Xl]=os({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[kU,Yh]=os({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),TD=e=>{const t=R.useId(),{getRootNode:n}=Xl(),{dir:r}=Yh(),s=j({id:t,dir:r,getRootNode:n},e),a=Ml(yD,s);return ED(a,Ah)},bD=e=>{const[t,u]=ST(e),l=u,{children:n}=l,r=Sn(l,["children"]),s=TD(r),a=Nh(Yt({present:s.open},t));return w.jsx(bL,{value:s,children:w.jsx(wT,{value:a,children:n})})},mb=R.forwardRef((e,t)=>{const n=kh(),r=La(),s=Yt(le(j({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(fn.button,le(j({},s),{ref:t}))});mb.displayName="PopoverTrigger";function wD(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function xD(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function gb(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function Eb(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function _D(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function SD(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function Wh(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function yb(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const vD=({className:e,componentType:t,children:n})=>{const[r,s]=R.useState(!1),{globalClassName:a}=dt(),u=f=>{s(f.open)},l=R.useCallback(()=>{s(!1)},[]),d=R.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(bD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(mb,{"aria-label":`Overflow menu for ${t}`,className:B(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(yb,{})}),w.jsx(_T,{children:w.jsx(xT,{className:B(`${N}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(Gy.Provider,{value:d,children:n})})})]})};function Tb(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function bb(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[AD,cs]=os({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Gh=R.forwardRef((e,t)=>{const n=cs(),r=Yt(n.getControlProps(),e);return w.jsx(fn.div,le(j(j({},r),e),{ref:t}))});Gh.displayName="CarouselControl";const Xh=R.forwardRef((e,t)=>{const[n,r]=Da()(e,["readOnly","index"]),s=cs(),a=Yt(s.getIndicatorProps(n),r);return w.jsx(fn.button,le(j({},a),{ref:t}))});Xh.displayName="CarouselIndicator";const Qh=R.forwardRef((e,t)=>{const n=cs(),r=Yt(n.getIndicatorGroupProps(),e);return w.jsx(fn.div,le(j({},r),{ref:t}))});Qh.displayName="CarouselIndicatorGroup";const Kh=R.forwardRef((e,t)=>{const[n,r]=Da()(e,["index","snapAlign"]),s=cs(),a=Yt(s.getItemProps(n),r);return w.jsx(fn.div,le(j({},a),{ref:t}))});Kh.displayName="CarouselItem";const Jh=R.forwardRef((e,t)=>{const n=cs(),r=Yt(n.getItemGroupProps(),e);return w.jsx(fn.div,le(j({},r),{ref:t}))});Jh.displayName="CarouselItemGroup";const Zh=R.forwardRef((e,t)=>{const n=cs(),r=Yt(n.getNextTriggerProps(),e);return w.jsx(fn.button,le(j({},r),{ref:t}))});Zh.displayName="CarouselNextTrigger";const ep=R.forwardRef((e,t)=>{const n=cs(),r=Yt(n.getPrevTriggerProps(),e);return w.jsx(fn.button,le(j({},r),{ref:t}))});ep.displayName="CarouselPrevTrigger";function CD(e){const t=no(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function l(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function kD(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function wb(e){let t=[];for(const n of e.children)t=t.concat(n,wb(n));return t}function xb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?wb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!kD(n,m,u))continue;const b=no(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const _=a==="x"?x:y,A=m[l]-n[l]+e[f];switch(_){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function _b(e){const t=e.getBoundingClientRect(),n=CD(e),r=xb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Sb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(vb(0,s.x))),y:Sb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(vb(0,s.y)))}}function ND(e,t,n){const r=xb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Sb=e=>[...new Set(e)],vb=(e,t)=>n=>Math.max(e,Math.min(t,n)),OD=as("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Gr=OD.build(),ID=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},PD=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},Ql=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},RD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},LD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},DD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Ab=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},In=e=>e.getById(Ql(e)),Cb=e=>oL(In(e),"[data-part=item]"),MD=(e,t)=>e.getById(Ab(e,t)),kb=e=>{const t=In(e);if(!t)return;const n=ro(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function FD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),_=l("slidesPerPage"),A=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(k,I){a({type:"INDEX.SET",index:k,instant:I})},scrollTo(k,I){a({type:"PAGE.SET",index:k,instant:I})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(le(j({},Gr.root.attrs),{id:ID(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":_,"--slide-spacing":l("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(le(j({},Gr.itemGroup.attrs),{id:Ql(u),"data-orientation":l("orientation"),"data-dragging":Js(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(k){Zs(k.currentTarget,dr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Zs(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!l("allowMouseDrag")||!uT(k))return;const I=dr(k);kr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:o4(k=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";k[I]<0&&!s("canScrollPrev")||k[I]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",l("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const I=r.get("slidesInView").includes(k.index);return t.element(le(j({},Gr.item.attrs),{id:PD(u,k.index),dir:l("dir"),role:"group","data-index":k.index,"data-inview":Js(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(k.index,l("slideCount")),"aria-hidden":nT(!I),style:{scrollSnapAlign:(()=>{var ee;const z=(ee=k.snapAlign)!=null?ee:"start",W=l("slidesPerMove"),D=W==="auto"?Math.floor(l("slidesPerPage")):W;return(k.index+D)%D===0?z:void 0})()}}))},getControlProps(){return t.element(le(j({},Gr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(le(j({},Gr.prevTrigger.attrs),{id:LD(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Ql(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(le(j({},Gr.nextTrigger.attrs),{dir:l("dir"),id:RD(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Ql(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(le(j({},Gr.indicatorGroup.attrs),{dir:l("dir"),id:DD(u),"data-orientation":l("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",z={ArrowDown(V){b||(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowUp(V){b||(a({type:"PAGE.PREV",src:I}),V.preventDefault())},ArrowRight(V){b&&(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowLeft(V){b&&(a({type:"PAGE.PREV",src:I}),V.preventDefault())},Home(V){a({type:"PAGE.SET",index:0,src:I}),V.preventDefault()},End(V){a({type:"PAGE.SET",index:y.length-1,src:I}),V.preventDefault()}},W=$4(k,{dir:l("dir"),orientation:l("orientation")}),D=z[W];D==null||D(k)}}))},getIndicatorProps(k){return t.button(le(j({},Gr.indicator.attrs),{dir:l("dir"),id:Ab(u,k.index),type:"button","data-orientation":l("orientation"),"data-index":k.index,"data-readonly":Js(k.readOnly),"data-current":Js(k.index===x),"aria-label":S.indicator(k.index),onClick(I){I.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(le(j({},Gr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":Js(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var BD={props({props:e}){return f4(e,["slideCount"],"carousel"),le(j({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:j({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:UD(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return X6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(In(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=In(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),kb(e)});return kb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{s(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Cb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?V6(d,m):q6(d,m)},n.get("slidesInView"));n.set("slidesInView",Y6(l))},{root:r,threshold:t("inViewThreshold")});return Cb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?Jt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Jt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return rL(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Jt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=eT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=In(n);if(!l)return;const d=r("isHorizontal")?"left":"top";s(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Ky(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=W6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=In(r);if(!s)return;const a=ND(s,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=eT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const s=_b(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=In(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=_b(r),l=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);qt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=MD(n,e.get("page"));r&&qt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function UD(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}oo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),oo()(["index","readOnly"]),oo()(["index","snapAlign"]);const HD=e=>{const t=R.useId(),{getRootNode:n}=Xl(),{dir:r}=Yh(),s=j({id:t,dir:r,getRootNode:n},e),a=Ml(BD,s);return FD(a,Ah)},tp=R.forwardRef((e,t)=>{const[n,r]=Da()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=HD(n),a=Yt(s.getRootProps(),r);return w.jsx(AD,{value:s,children:w.jsx(fn.div,le(j({},a),{ref:t}))})});tp.displayName="CarouselRoot";const jD=180,zD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},$D=({globalClassName:e,className:t,itemMinWidth:n=jD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ee,ce)=>({node:ee,key:R.isValidElement(ee)&&ee.key!=null?ee.key:`carousel-item-${ce}`})),b=m.length,y=R.useRef(null),[x,_]=R.useState(0),{width:A}=VS();R.useLayoutEffect(()=>{y.current&&_(y.current.getBoundingClientRect().width)},[A,b]);const S=zD(r),k=n+S,I=x>0?(x+S)/k:1,z=Math.max(1,Math.floor(I));if(b===0)return null;const W=b>z,D=Math.ceil(b/z),V=W?Math.max(1,I):z;return w.jsxs(tp,{ref:y,className:B(e,t,`${N}-carousel`),slidesPerPage:V,slidesPerMove:z,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[w.jsx(Jh,{className:B(e,`${N}-carousel__item-group`,{"carousel-row-container":!W}),children:m.map(({node:ee,key:ce},H)=>w.jsx(Kh,{index:H,className:B(e,`${N}-carousel__item`),children:ee},ce))}),l&&W&&w.jsxs(Gh,{className:B(e,`${N}-carousel__control`),children:[w.jsx(ep,{className:B(e,`${N}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(gb,{size:"16px"})}),w.jsx(Zh,{className:B(e,`${N}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Eb,{size:"16px"})})]}),u&&W&&w.jsx(Qh,{className:B(e,`${N}-carousel__indicator-group`),children:Array.from({length:D},(ee,ce)=>w.jsx(Xh,{index:ce,className:B(e,`${N}-carousel__indicator`),"aria-label":`Go to slide group ${ce+1}`},ce))})]})},VD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:B(e,`${N}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[qD,YD]=os({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),WD=e=>Da()(e,["lazyMount","unmountOnExit"]),[GD,ja]=os({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Nb=R.forwardRef((e,t)=>{const n=ja(),r=YD(),s=Nh(le(j({},r),{present:n.open})),a=Yt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(fn.div,le(j({},a),{ref:Fl(s.ref,t)}))});Nb.displayName="DialogBackdrop";const np=R.forwardRef((e,t)=>{const n=ja(),r=La(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(fn.div,le(j({},s),{ref:Fl(r.ref,t)}))});np.displayName="DialogContent";const rp=R.forwardRef((e,t)=>{const n=ja(),r=Yt(n.getDescriptionProps(),e);return w.jsx(fn.div,le(j({},r),{ref:t}))});rp.displayName="DialogDescription";const ip=R.forwardRef((e,t)=>{const n=ja(),r=Yt(n.getPositionerProps(),e);return La().unmounted?null:w.jsx(fn.div,le(j({},r),{ref:t}))});ip.displayName="DialogPositioner";var XD=as("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ds=XD.build(),Ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Ib=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Rb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Kl=e=>e.getById(sp(e)),QD=e=>e.getById(Ob(e)),KD=e=>e.getById(Ib(e)),JD=e=>e.getById(Pb(e)),ZD=e=>e.getById(op(e)),e8=e=>e.getById(ap(e)),t8=e=>e.getById(Rb(e));function n8(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,l=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(le(j({},ds.trigger.attrs),{dir:a("dir"),id:Pb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":sp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(le(j({},ds.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Ib(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(j({},ds.positioner.attrs),{dir:a("dir"),id:Ob(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(le(j({},ds.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:sp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:op(u),"aria-describedby":f.description?ap(u):void 0}))},getTitleProps(){return t.element(le(j({},ds.title.attrs),{dir:a("dir"),id:op(u)}))},getDescriptionProps(){return t.element(le(j({},ds.description.attrs),{dir:a("dir"),id:ap(u)}))},getCloseTriggerProps(){return t.button(le(j({},ds.closeTrigger.attrs),{dir:a("dir"),id:Rb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var r8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>t8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return j({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return ib(()=>Kl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[JD(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return lb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?ab(()=>Kl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?XT(()=>[Kl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!ZD(t),description:!!e8(t)})})},syncZIndex({scope:e}){qt(()=>{const t=Kl(e);if(!t)return;const n=no(t);[QD(e),KD(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};oo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const i8=e=>{const t=R.useId(),{getRootNode:n}=Xl(),{dir:r}=Yh(),s=j({id:t,getRootNode:n,dir:r},e),a=Ml(r8,s);return n8(a,Ah)},Lb=e=>{const[t,l]=ST(e),d=l,{children:n}=d,r=Sn(d,["children"]),[s]=WD(t),a=i8(r),u=Nh(Yt({present:a.open},t));return w.jsx(GD,{value:a,children:w.jsx(qD,{value:s,children:w.jsx(wT,{value:u,children:n})})})},Db=R.forwardRef((e,t)=>{const n=ja(),r=Yt(n.getTitleProps(),e);return w.jsx(fn.h2,le(j({},r),{ref:t}))});Db.displayName="DialogTitle";const s8=({children:e})=>{const[t,n]=R.useState(!1),r=R.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=R.useMemo(()=>({isOpen:t}),[t]);return w.jsx(fh.Provider,{value:r,children:w.jsx(Wy.Provider,{value:s,children:e})})},Mb=()=>R.useContext(Wy),Fb=()=>{const e=R.useContext(fh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},o8=`${N}-overflow-menu-button-trigger`,a8=({componentType:e,children:t})=>{const{isOpen:n}=Mb(),{closeMenu:r}=Fb(),{globalClassName:s}=dt(),a=R.useRef(null);return R.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${o8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",l)}},[n,r]),n?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:B(`${N}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},u8=({componentType:e,className:t})=>{const{toggleMenu:n}=Fb(),{isOpen:r}=Mb(),{globalClassName:s}=dt();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:B(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(yb,{})})};class l8{constructor(){Je(this,"initialState",Qg);Je(this,"promptsStateProxy");Je(this,"promptsParamsProxy");Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return f8(n,r),Reflect.set(t,n,r)});Je(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Je(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Je(this,"updatePromptsParamsProxy",t=>new Proxy(j({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const bi=new l8,c8=e=>{window.addEventListener(Id,e)},d8=e=>{window.removeEventListener(Id,e)},f8=(e,t)=>{const n=new CustomEvent(Id,{detail:{property:e,value:t}});window.dispatchEvent(n)},Bb=e=>{const t=bi.isOpen,n=typeof e=="boolean"?e:!t;bi.promptsStateProxy.isOpen=n},h8=e=>{const t=bi.isInline,n=typeof e=="boolean"?e:!t;bi.promptsStateProxy.isInline=n},p8=({elementId:e,entryType:t,params:n,isInline:r})=>{bi.promptsStateProxy.elementId=e,t&&(bi.promptsStateProxy.entryType=t),typeof r=="boolean"&&h8(r),n&&bi.updatePromptsParamsProxy(n),bi.isOpen||Bb(!0)},m8=()=>{const e=R.useContext(Zg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},g8=()=>{const e=R.useContext(Jg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Jl=()=>{const e=R.useContext(Kg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},E8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=dt(),{previousComponentType:r}=$r(),s=Qs(),a=()=>{Du(r||"dialog"),s()};return t?w.jsx(ur,{className:B(n,`${N}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(Tb,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(Tb,{}),"Show ",r||"dialog"]})},y8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=dt(),{isModalFullscreen:r}=$r(),s=Qs(),a=()=>{Rd(!r),s()},u=r?pk:mk,l="Toggle Fullscreen";return t?w.jsx(ur,{ariaLabel:l,title:l,className:B(n,`${N}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},T8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=dt(),{dialogPosition:r}=$r(),s=Qs(),a=r==="bottom-left",u=()=>{Ld(a?"bottom-right":"bottom-left"),s()},l=a?xD:wD,d=a?"Move right":"Move left";return t?w.jsx(ur,{className:B(n,`${N}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},Ub=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=dt(),{mode:d}=$r(),f=u==="messaging"&&l&&!!r,p=d==="standalone",m=e==="modal",b=m?E8:zb,y=m?y8:T8,x=R.useMemo(()=>s?uk(s):{},[s]);return w.jsx(s8,{children:w.jsxs("div",{className:B(a,`${N}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:B(a,`${N}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:B(a,`${N}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),w.jsx(Db,{className:B(a,`${N}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),w.jsxs("div",{className:B(a,`${N}-${e}-controls`),children:[w.jsx(b,{componentType:e,isIcon:!0}),w.jsx(u8,{componentType:e}),w.jsx(VD,{className:B(a,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(a8,{componentType:e,children:[w.jsx(y,{componentType:e}),w.jsx(S8,{componentType:e}),w.jsx(Xy,{componentType:e,onClearChat:t}),f&&w.jsx(Qy,{componentType:e,onDownloadTranscript:r})]})]})})},Zl="USD",Xr=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},b8=({retailPrice:e,discountPrice:t,currencyCode:n=Zl})=>{const r=n||Zl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Xr(a,r),comparePrice:Xr(u,r),hasDiscount:s}},Hb=e=>typeof e=="number"&&Number.isFinite(e),w8=({priceBreakdown:e,currencyCode:t=Zl})=>{if(!e)return null;const n=t||Zl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Hb),a=r.map(p=>p==null?void 0:p.max).filter(Hb);if(s.length===0||a.length===0)return null;const u=Math.min(...s),l=Math.max(...a);if(u===l)return null;const d=Xr(u,n),f=Xr(l,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},up=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=b8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:B(s,a,`${N}-price`),style:f,children:[w.jsx("span",{className:B(s,`${N}-price__amount`),children:u}),d&&l&&w.jsx("span",{className:B(s,`${N}-price__compare`),children:l})]})},x8={sparkle:Wh,plus:_D,"paper-plane":SD},jb=({icon:e,className:t})=>{const n=x8[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},_8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=dt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},b=x=>w.jsxs(w.Fragment,{children:[l&&w.jsx(jb,{icon:l,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:x})]});return w.jsx("div",{className:B(t,`${N}-suggestion-container ${f}`,e),children:n.map(x=>s?w.jsx(Ef,{disabled:r,className:B(t,`${N}-suggestion-button standalone`,m),onClick:p(x),children:b(x)},x):w.jsx("button",{disabled:r,className:B(t,`${N}-suggestion-button embedded`,m),onClick:p(x),children:b(x)},x))})},S8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=dt();if(!r)return null;const s=()=>{zr(!1),Lu(!0)};return t?w.jsx(ur,{className:B(n,`${N}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(f1,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(f1,{}),"Minimize"]})},zb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=dt(),r=Qs(),s=()=>{Du("modal"),r()};return t?w.jsx(ur,{className:B(n,`${N}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(bb,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(bb,{}),"Show modal"]})},v8=["Hey there! 👋 What can I find for you today?","Shopping for a gift? Tell me your budget and preferences","Need help? Connect to an agent"],A8=3e3,C8=400,k8=({globalClassName:e,isWidgetStandalone:t,messages:n=v8})=>{const[r,s]=R.useState(0),[a,u]=R.useState(!0);return R.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},C8)},A8);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:B(e,`${N}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${N}-connecting-pulse-wrapper`,children:[w.jsx("div",{className:`${N}-connecting-pulse`}),w.jsx("div",{className:`${N}-connecting-ring`})]}),w.jsx("span",{className:B(`${N}-connecting-text`,a&&`${N}-connecting-text--visible`),children:n[r]})]})},N8=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${N}-processing-text`,children:t}):null,O8=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`})]}):null,lp=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:B(e,`${N}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(N8,{shouldShow:!!n,loadingText:n}),w.jsx(O8,{shouldShow:!n})]});function $b(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function I8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function P8(e,t,n){const s=pl((n||{}).ignore||[]),a=R8(t);let u=-1;for(;++u<a.length;)CE(e,"text",l);function l(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],x=b?b.children:void 0;if(s(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let x=0;const A=m.children.indexOf(f);let S=!1,k=[];b.lastIndex=0;let I=b.exec(f.value);for(;I;){const z=I.index,W={index:I.index,input:I.input,stack:[...p,f]};let D=y(...I,W);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=z+1:(x!==z&&k.push({type:"text",value:f.value.slice(x,z)}),Array.isArray(D)?k.push(...D):D&&k.push(D),x=z+I[0].length,S=!0),!b.global)break;I=b.exec(f.value)}return S?(x<f.value.length&&k.push({type:"text",value:f.value.slice(x)}),m.children.splice(A,1,...k)):k=[f],A+k.length}}function R8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([L8(s[0]),D8(s[1])])}return t}function L8(e){return typeof e=="string"?new RegExp(I8(e),"g"):e}function D8(e){return typeof e=="function"?e:function(){return e}}const cp="phrasing",dp=["autolink","link","image","label"];function M8(){return{transforms:[$8],enter:{literalAutolink:B8,literalAutolinkEmail:fp,literalAutolinkHttp:fp,literalAutolinkWww:fp},exit:{literalAutolink:z8,literalAutolinkEmail:j8,literalAutolinkHttp:U8,literalAutolinkWww:H8}}}function F8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:":",before:"[ps]",after:"\\/",inConstruct:cp,notInConstruct:dp}]}}function B8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fp(e){this.config.enter.autolinkProtocol.call(this,e)}function U8(e){this.config.exit.autolinkProtocol.call(this,e)}function H8(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function j8(e){this.config.exit.autolinkEmail.call(this,e)}function z8(e){this.exit(e)}function $8(e){P8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,V8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),q8]],{ignore:["link","linkReference"]})}function V8(e,t,n,r,s){let a="";if(!Vb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Y8(n)))return!1;const u=W8(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function q8(e,t,n,r){return!Vb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Y8(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function W8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=$b(e,"(");let a=$b(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Vb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ki(n)||al(n))&&(!t||n!==47)}qb.peek=nM;function G8(){this.buffer()}function X8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Q8(){this.buffer()}function K8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function J8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Z8(e){this.exit(e)}function eM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tM(e){this.exit(e)}function nM(){return"["}function qb(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=s.move("]"),a}function rM(){return{enter:{gfmFootnoteCallString:G8,gfmFootnoteCall:X8,gfmFootnoteDefinitionLabelString:Q8,gfmFootnoteDefinition:K8},exit:{gfmFootnoteCallString:J8,gfmFootnoteCall:Z8,gfmFootnoteDefinitionLabelString:eM,gfmFootnoteDefinition:tM}}}function iM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:qb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
38
- `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Yb:sM))),f(),d}}function sM(e,t,n){return t===0?e:Yb(e,t,n)}function Yb(e,t,n){return(n?"":" ")+e}const oM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Wb.peek=dM;function aM(){return{canContainEols:["delete"],enter:{strikethrough:lM},exit:{strikethrough:cM}}}function uM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:oM}],handlers:{delete:Wb}}}function lM(e){this.enter({type:"delete",children:[]},e)}function cM(e){this.exit(e)}function Wb(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,le(j({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function dM(){return"~"}function fM(e){return e.length}function hM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||fM,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const _=[],A=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const k=pM(e[p][S]);if(n.alignDelimiters!==!1){const I=s(k);A[S]=I,(d[S]===void 0||I>d[S])&&(d[S]=I)}_.push(k)}u[p]=_,l[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Gb(r[m]);else{const _=Gb(r);for(;++m<f;)a[m]=_}m=-1;const b=[],y=[];for(;++m<f;){const _=a[m];let A="",S="";_===99?(A=":",S=":"):_===108?A=":":_===114&&(S=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-S.length);const I=A+"-".repeat(k)+S;n.alignDelimiters!==!1&&(k=A.length+k+S.length,k>d[m]&&(d[m]=k),y[m]=k),b[m]=I}u.splice(1,0,b),l.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const _=u[p],A=l[p];m=-1;const S=[];for(;++m<f;){const k=_[m]||"";let I="",z="";if(n.alignDelimiters!==!1){const W=d[m]-(A[m]||0),D=a[m];D===114?I=" ".repeat(W):D===99?W%2?(I=" ".repeat(W/2+.5),z=" ".repeat(W/2-.5)):(I=" ".repeat(W/2),z=I):z=" ".repeat(W)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(I),S.push(k),n.alignDelimiters!==!1&&S.push(z),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}x.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return x.join(`
39
- `)}function pM(e){return e==null?"":String(e)}function Gb(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function mM(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),gM);return s(),u}function gM(e,t,n){return">"+(n?"":" ")+e}function EM(e,t){return Xb(e,t.inConstruct,!0)&&!Xb(e,t.notInConstruct,!1)}function Xb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Qb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
- `&&EM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function yM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function TM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function bM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function wM(e,t,n,r){const s=bM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(TM(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,xM);return m(),b}const l=n.createTracker(r),d=s.repeat(Math.max(yM(a,s)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,j({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,j({before:p,after:`
35
+ `}),n}function OE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function IE(e,t){const n=$O(e,t),r=n.one(e,void 0),s=RO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
+ `},s),a}function GO(e,t){return e&&"run"in e?function(n,r){return Be(this,null,function*(){const s=IE(n,j({file:r},t));yield e.run(s,r)})}:function(n,r){return IE(n,j({file:r},e||t))}}function PE(e){if(e)throw e}var zf,RE;function XO(){if(RE)return zf;RE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return zf=function d(){var f,p,m,b,y,x,_=arguments[0],A=1,S=arguments.length,C=!1;for(typeof _=="boolean"&&(C=_,_=arguments[1]||{},A=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});A<S;++A)if(f=arguments[A],f!=null)for(p in f)m=l(_,p),b=l(f,p),_!==b&&(C&&b&&(a(b)||(y=s(b)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(_,{name:p,newValue:d(C,x,b)})):typeof b!="undefined"&&u(_,{name:p,newValue:b}));return _},zf}var KO=XO();const $f=rt(KO);function Vf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function QO(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...s);function l(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?JO(p,l)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function JO(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return s(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...l){n||(n=!0,t(u,...l))}function a(u){s(null,u)}}const Ar={basename:ZO,dirname:eI,extname:tI,join:nI,sep:"/"};function ZO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ba(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function eI(e){if(ba(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tI(e){ba(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function nI(...e){let t=-1,n;for(;++t<e.length;)ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rI(n)}function rI(e){ba(e);const t=e.codePointAt(0)===47;let n=iI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function iI(e,t){let n="",r=0,s=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sI={cwd:oI};function oI(){return"/"}function qf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function aI(e){if(typeof e=="string")e=new URL(e);else if(!qf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return uI(e)}function uI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Yf=["history","path","basename","stem","extname","dirname"];class LE{constructor(t){let n;t?qf(t)?n={path:t}:typeof t=="string"||lI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Yf.length;){const a=Yf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Yf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ar.basename(this.path):void 0}set basename(t){Gf(t,"basename"),Wf(t,"basename"),this.path=Ar.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ar.dirname(this.path):void 0}set dirname(t){DE(this.basename,"dirname"),this.path=Ar.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ar.extname(this.path):void 0}set extname(t){if(Wf(t,"extname"),DE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ar.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){qf(t)&&(t=aI(t)),Gf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ar.basename(this.path,this.extname):void 0}set stem(t){Gf(t,"stem"),Wf(t,"stem"),this.path=Ar.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new cn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Wf(e,t){if(e&&e.includes(Ar.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ar.sep+"`")}function Gf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function DE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cI=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),dI={}.hasOwnProperty;class Xf extends cI{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=QO()}copy(){const t=new Xf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($f(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Jf("data",this.frozen),this.namespace[t]=n,this):dI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Jf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=yl(t),r=this.parser||this.Parser;return Kf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Kf("process",this.parser||this.Parser),Qf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=yl(t),d=r.parse(l);r.run(d,l,function(p,m,b){if(p||!m||!b)return f(p);const y=m,x=r.stringify(y,b);pI(x)?b.value=x:b.result=x,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Kf("processSync",this.parser||this.Parser),Qf("processSync",this.compiler||this.Compiler),this.process(t,s),FE("processSync","process",n),r;function s(a,u){n=!0,PE(a),r=u}}run(t,n,r){ME(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=yl(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?l(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),FE("runSync","run",r),s;function a(u,l){PE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=yl(n),s=this.compiler||this.Compiler;return Qf("stringify",s),ME(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Jf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(s.settings=$f(!0,s.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const _=r[b][1];Vf(_)&&Vf(y)&&(y=$f(!0,_,y)),r[b]=[f,y,...x]}}}}const fI=new Xf().freeze();function Kf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Jf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ME(e){if(!Vf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function FE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yl(e){return hI(e)?e:new LE(e)}function hI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pI(e){return typeof e=="string"||mI(e)}function mI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",BE=[],UE={allowDangerousHtml:!0},EI=/^(https?|ircs?|mailto|xmpp)$/i,yI=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function HE(e){const t=TI(e),n=bI(e);return wI(t.runSync(t.parse(n),n),e)}function TI(e){const t=e.rehypePlugins||BE,n=e.remarkPlugins||BE,r=e.remarkRehypeOptions?j(j({},e.remarkRehypeOptions),UE):UE;return fI().use(eO).use(n).use(GO,r).use(t)}function bI(e){const t=e.children||"",n=new LE;return typeof t=="string"&&(n.value=t),n}function wI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||xI;for(const p of yI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+gI+p.id,void 0);return El(e,f),YC(e,{Fragment:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Cf)if(Object.hasOwn(Cf,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],_=Cf[y];(_===null||_.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return l&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function xI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||EI.test(e.slice(0,t))?e:""}const jE=/[#.]/g;function _I(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){jE.lastIndex=s;const l=jE.exec(n),d=n.slice(s,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),l&&(a=l[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function zE(e,t,n){const r=n?kI(n):void 0;function s(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=_I(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,SI(u))l.unshift(u);else for(const[m,b]of Object.entries(u))vI(e,d.properties,m,b)}for(const f of l)Zf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function SI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function vI(e,t,n,r){const s=sl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=I1(r):s.commaSeparated?a=y1(r):s.commaOrSpaceSeparated?a=I1(y1(r).join(" ")):a=$E(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?AI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push($E(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function Zf(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Zf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Zf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function $E(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||la(n)===la(t)))return!0}return n}function AI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function kI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const CI=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],NI=zE(ca,"div"),OI=zE(fi,"g",CI);function II(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=VE(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],d=VE(t,l),f=d===-1?t.length+1:d+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function VE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const rs={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qE={}.hasOwnProperty,PI=Object.prototype;function RI(e,t){const n=t||{};return eh({file:n.file||void 0,location:!1,schema:n.space==="svg"?fi:ca,verbose:n.verbose||!1},e)}function eh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Tl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:YE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=II(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Tl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Tl(e,r,n),n}default:return n=LI(e,t),n}}function YE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=eh(e,t[n]);r.push(s)}return r}function LI(e,t){const n=e.schema;e.schema=t.namespaceURI===rs.svg?fi:ca;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;qE.call(PI,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?OI:NI)(t.tagName,s,YE(e,t.childNodes));if(Tl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Gs(d.startTag),p=d&&d.endTag&&Gs(d.endTag),m=eh(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Tl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=DI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function DI(e,t,n){const r=Gs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)qE.call(n.attrs,u)&&(a[sl(e.schema,u).property]=Gs(n.attrs[u]));n.startTag;const l=Gs(n.startTag),d=n.endTag?Gs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Gs(e){const t=WE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=WE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function WE(e){return e.line&&e.column?e:void 0}const GE={}.hasOwnProperty;function XE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&GE.call(s,e)){const d=String(s[e]);u=GE.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const MI={},FI={}.hasOwnProperty,KE=XE("type",{handlers:{root:UI,element:VI,text:zI,comment:$I,doctype:jI}});function BI(e,t){const r=(t||MI).space;return KE(e,r==="svg"?fi:ca)}function UI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=th(e.children,n,t),Xs(e,n),n}function HI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=th(e.children,n,t),Xs(e,n),n}function jI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Xs(e,t),t}function zI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Xs(e,t),t}function $I(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Xs(e,t),t}function VI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=fi);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&FI.call(e.properties,a)){const d=qI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:rs[u],childNodes:[],parentNode:null};return l.childNodes=th(e.children,l,r),Xs(e,l),e.tagName==="template"&&e.content&&(l.content=HI(e.content,r)),l}function qI(e,t,n){const r=sl(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?T1(n):P1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=rs[r.space]}return s}function th(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=KE(e[r],n);a.parentNode=t,s.push(a)}return s}function Xs(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const YI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],WI=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),kt="�";var O;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(O||(O={}));const In={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function QE(e){return e>=55296&&e<=57343}function GI(e){return e>=56320&&e<=57343}function XI(e,t){return(e-55296)*1024+9216+t}function JE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ZE(e){return e>=64976&&e<=65007||WI.has(e)}var ne;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ne||(ne={}));const KI=65536;class QI{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=KI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(GI(n))return this.pos++,this._addGap(),XI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,QE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){JE(t)?this._err(ne.controlCharacterInInputStream):ZE(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var nt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(nt||(nt={}));function ey(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const JI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),ZI=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function eP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=ZI.get(e))!==null&&t!==void 0?t:e}var Kt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Kt||(Kt={}));const tP=32;var mi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(mi||(mi={}));function nh(e){return e>=Kt.ZERO&&e<=Kt.NINE}function nP(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function rP(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||nh(e)}function iP(e){return e===Kt.EQUALS||rP(e)}var Qt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Qt||(Qt={}));var qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(qr||(qr={}));class sP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=qr.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|tP)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(nh(s)||nP(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(nh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===qr.Strict)return 0;return this.emitCodePoint(eP(this.result),this.consumed),this.errors&&(t!==Kt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&mi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=oP(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===qr.Attribute&&(a===0||iP(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&mi.VALUE_LENGTH)>>14,a!==0){if(u===Kt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==qr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&mi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~mi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function oP(e,t,n,r){const s=(t&mi.BRANCH_LENGTH)>>7,a=t&mi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,l=u+s-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+s]}return-1}var pe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(pe||(pe={}));var is;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(is||(is={}));var Qn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Qn||(Qn={}));var K;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(K||(K={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const aP=new Map([[K.A,g.A],[K.ADDRESS,g.ADDRESS],[K.ANNOTATION_XML,g.ANNOTATION_XML],[K.APPLET,g.APPLET],[K.AREA,g.AREA],[K.ARTICLE,g.ARTICLE],[K.ASIDE,g.ASIDE],[K.B,g.B],[K.BASE,g.BASE],[K.BASEFONT,g.BASEFONT],[K.BGSOUND,g.BGSOUND],[K.BIG,g.BIG],[K.BLOCKQUOTE,g.BLOCKQUOTE],[K.BODY,g.BODY],[K.BR,g.BR],[K.BUTTON,g.BUTTON],[K.CAPTION,g.CAPTION],[K.CENTER,g.CENTER],[K.CODE,g.CODE],[K.COL,g.COL],[K.COLGROUP,g.COLGROUP],[K.DD,g.DD],[K.DESC,g.DESC],[K.DETAILS,g.DETAILS],[K.DIALOG,g.DIALOG],[K.DIR,g.DIR],[K.DIV,g.DIV],[K.DL,g.DL],[K.DT,g.DT],[K.EM,g.EM],[K.EMBED,g.EMBED],[K.FIELDSET,g.FIELDSET],[K.FIGCAPTION,g.FIGCAPTION],[K.FIGURE,g.FIGURE],[K.FONT,g.FONT],[K.FOOTER,g.FOOTER],[K.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[K.FORM,g.FORM],[K.FRAME,g.FRAME],[K.FRAMESET,g.FRAMESET],[K.H1,g.H1],[K.H2,g.H2],[K.H3,g.H3],[K.H4,g.H4],[K.H5,g.H5],[K.H6,g.H6],[K.HEAD,g.HEAD],[K.HEADER,g.HEADER],[K.HGROUP,g.HGROUP],[K.HR,g.HR],[K.HTML,g.HTML],[K.I,g.I],[K.IMG,g.IMG],[K.IMAGE,g.IMAGE],[K.INPUT,g.INPUT],[K.IFRAME,g.IFRAME],[K.KEYGEN,g.KEYGEN],[K.LABEL,g.LABEL],[K.LI,g.LI],[K.LINK,g.LINK],[K.LISTING,g.LISTING],[K.MAIN,g.MAIN],[K.MALIGNMARK,g.MALIGNMARK],[K.MARQUEE,g.MARQUEE],[K.MATH,g.MATH],[K.MENU,g.MENU],[K.META,g.META],[K.MGLYPH,g.MGLYPH],[K.MI,g.MI],[K.MO,g.MO],[K.MN,g.MN],[K.MS,g.MS],[K.MTEXT,g.MTEXT],[K.NAV,g.NAV],[K.NOBR,g.NOBR],[K.NOFRAMES,g.NOFRAMES],[K.NOEMBED,g.NOEMBED],[K.NOSCRIPT,g.NOSCRIPT],[K.OBJECT,g.OBJECT],[K.OL,g.OL],[K.OPTGROUP,g.OPTGROUP],[K.OPTION,g.OPTION],[K.P,g.P],[K.PARAM,g.PARAM],[K.PLAINTEXT,g.PLAINTEXT],[K.PRE,g.PRE],[K.RB,g.RB],[K.RP,g.RP],[K.RT,g.RT],[K.RTC,g.RTC],[K.RUBY,g.RUBY],[K.S,g.S],[K.SCRIPT,g.SCRIPT],[K.SEARCH,g.SEARCH],[K.SECTION,g.SECTION],[K.SELECT,g.SELECT],[K.SOURCE,g.SOURCE],[K.SMALL,g.SMALL],[K.SPAN,g.SPAN],[K.STRIKE,g.STRIKE],[K.STRONG,g.STRONG],[K.STYLE,g.STYLE],[K.SUB,g.SUB],[K.SUMMARY,g.SUMMARY],[K.SUP,g.SUP],[K.TABLE,g.TABLE],[K.TBODY,g.TBODY],[K.TEMPLATE,g.TEMPLATE],[K.TEXTAREA,g.TEXTAREA],[K.TFOOT,g.TFOOT],[K.TD,g.TD],[K.TH,g.TH],[K.THEAD,g.THEAD],[K.TITLE,g.TITLE],[K.TR,g.TR],[K.TRACK,g.TRACK],[K.TT,g.TT],[K.U,g.U],[K.UL,g.UL],[K.SVG,g.SVG],[K.VAR,g.VAR],[K.WBR,g.WBR],[K.XMP,g.XMP]]);function Ks(e){var t;return(t=aP.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Ee=g,uP={[pe.HTML]:new Set([Ee.ADDRESS,Ee.APPLET,Ee.AREA,Ee.ARTICLE,Ee.ASIDE,Ee.BASE,Ee.BASEFONT,Ee.BGSOUND,Ee.BLOCKQUOTE,Ee.BODY,Ee.BR,Ee.BUTTON,Ee.CAPTION,Ee.CENTER,Ee.COL,Ee.COLGROUP,Ee.DD,Ee.DETAILS,Ee.DIR,Ee.DIV,Ee.DL,Ee.DT,Ee.EMBED,Ee.FIELDSET,Ee.FIGCAPTION,Ee.FIGURE,Ee.FOOTER,Ee.FORM,Ee.FRAME,Ee.FRAMESET,Ee.H1,Ee.H2,Ee.H3,Ee.H4,Ee.H5,Ee.H6,Ee.HEAD,Ee.HEADER,Ee.HGROUP,Ee.HR,Ee.HTML,Ee.IFRAME,Ee.IMG,Ee.INPUT,Ee.LI,Ee.LINK,Ee.LISTING,Ee.MAIN,Ee.MARQUEE,Ee.MENU,Ee.META,Ee.NAV,Ee.NOEMBED,Ee.NOFRAMES,Ee.NOSCRIPT,Ee.OBJECT,Ee.OL,Ee.P,Ee.PARAM,Ee.PLAINTEXT,Ee.PRE,Ee.SCRIPT,Ee.SECTION,Ee.SELECT,Ee.SOURCE,Ee.STYLE,Ee.SUMMARY,Ee.TABLE,Ee.TBODY,Ee.TD,Ee.TEMPLATE,Ee.TEXTAREA,Ee.TFOOT,Ee.TH,Ee.THEAD,Ee.TITLE,Ee.TR,Ee.TRACK,Ee.UL,Ee.WBR,Ee.XMP]),[pe.MATHML]:new Set([Ee.MI,Ee.MO,Ee.MN,Ee.MS,Ee.MTEXT,Ee.ANNOTATION_XML]),[pe.SVG]:new Set([Ee.TITLE,Ee.FOREIGN_OBJECT,Ee.DESC]),[pe.XLINK]:new Set,[pe.XML]:new Set,[pe.XMLNS]:new Set},rh=new Set([Ee.H1,Ee.H2,Ee.H3,Ee.H4,Ee.H5,Ee.H6]);K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT;var L;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(L||(L={}));const Ut={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function lP(e){return e>=O.DIGIT_0&&e<=O.DIGIT_9}function wa(e){return e>=O.LATIN_CAPITAL_A&&e<=O.LATIN_CAPITAL_Z}function cP(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function gi(e){return cP(e)||wa(e)}function ty(e){return gi(e)||lP(e)}function bl(e){return e+32}function ny(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function ry(e){return ny(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function dP(e){return e===O.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:QE(e)?ne.surrogateCharacterReference:ZE(e)?ne.noncharacterCharacterReference:JE(e)||e===O.CARRIAGE_RETURN?ne.controlCharacterReference:null}class fP{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new QI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new sP(JI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=dP(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:nt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:nt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:nt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:nt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(ey(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ks(t.tagName),t.type===nt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case nt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case nt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case nt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:nt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ny(t)?nt.WHITESPACE_CHARACTER:t===O.NULL?nt.NULL_CHARACTER:nt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(nt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?qr.Attribute:qr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case O.AMPERSAND:{this._startCharacterReference();break}case O.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(kt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(kt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(kt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(kt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(gi(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case O.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case O.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case O.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(gi(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=L.DATA;break}case O.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=kt;break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(wa(t)?bl(t):t)}}_stateRcdataLessThanSign(t){t===O.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){gi(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case O.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case O.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===O.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){gi(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case O.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case O.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){gi(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(kt);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===O.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:gi(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){gi(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(In.SCRIPT,!1)&&ry(this.preprocessor.peek(In.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<In.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(kt);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===O.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(In.SCRIPT,!1)&&ry(this.preprocessor.peek(In.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<In.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=kt;break}default:this.currentAttr.name+=String.fromCodePoint(wa(t)?bl(t):t)}}_stateAfterAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case O.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:case O.EQUALS_SIGN:case O.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case O.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=kt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(In.DASH_DASH,!0)?(this._createCommentToken(In.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(In.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(In.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(In.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(In.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case O.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=kt;break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case O.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case O.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==O.GREATER_THAN_SIGN&&t!==O.EOF&&this._err(ne.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case O.HYPHEN_MINUS:{n.data+="-";break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case O.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case O.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(wa(t))this._createDoctypeToken(String.fromCharCode(bl(t))),this.state=L.DOCTYPE_NAME;else switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(kt),this.state=L.DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=kt;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(wa(t)?bl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(In.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(In.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=kt;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=kt;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=kt;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=kt;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.NULL:{this._err(ne.unexpectedNullCharacter);break}case O.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case O.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case O.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===O.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA;break}case O.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(O.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ty(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ty(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const iy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),sy=new Set([...iy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),wl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),hP=new Set([...wl,g.OL,g.UL]),pP=new Set([...wl,g.BUTTON]),oy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),ay=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),mP=new Set([g.TR,g.TEMPLATE,g.HTML]),gP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),EP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),yP=new Set([g.TD,g.TH]);class TP{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===pe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==pe.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(rh,pe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(yP,pe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(EP,pe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(gP,pe.HTML)}clearBackToTableRowContext(){this.clearBackTo(mP,pe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case pe.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case pe.SVG:{if(ay.has(s))return!1;break}case pe.MATHML:{if(oy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,wl)}hasInListItemScope(t){return this.hasInDynamicScope(t,hP)}hasInButtonScope(t){return this.hasInDynamicScope(t,pP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case pe.HTML:{if(rh.has(n))return!0;if(wl.has(n))return!1;break}case pe.SVG:{if(ay.has(n))return!1;break}case pe.MATHML:{if(oy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===pe.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&iy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&sy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&sy.has(this.currentTagId);)this.pop()}}const ih=3;var kr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(kr||(kr={}));const uy={type:kr.Marker};class bP{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===kr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ih)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ih)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=ih&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(uy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:kr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:kr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(uy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===kr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===kr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===kr.Element&&n.element===t)}}const Ei={createDocument(){return{nodeName:"#document",mode:Qn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ei.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ei.isTextNode(n)){n.value+=t;return}}Ei.appendChild(e,Ei.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ei.isTextNode(r)?r.value+=t:Ei.insertBefore(e,Ei.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=j(j({},e.sourceCodeLocation),t)}},ly="html",wP="about:legacy-compat",xP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",cy=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],_P=[...cy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],SP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),dy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],vP=[...dy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function fy(e,t){return t.some(n=>e.startsWith(n))}function AP(e){return e.name===ly&&e.publicId===null&&(e.systemId===null||e.systemId===wP)}function kP(e){if(e.name!==ly)return Qn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===xP)return Qn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),SP.has(n))return Qn.QUIRKS;let r=t===null?_P:cy;if(fy(n,r))return Qn.QUIRKS;if(r=t===null?dy:vP,fy(n,r))return Qn.LIMITED_QUIRKS}return Qn.NO_QUIRKS}const hy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},CP="definitionurl",NP="definitionURL",OP=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),IP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:pe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:pe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:pe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:pe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:pe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:pe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:pe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:pe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:pe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:pe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:pe.XMLNS}]]),PP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),RP=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function LP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===is.COLOR||r===is.SIZE||r===is.FACE)||RP.has(t)}function py(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===CP){e.attrs[t].name=NP;break}}function my(e){for(let t=0;t<e.attrs.length;t++){const n=OP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function sh(e){for(let t=0;t<e.attrs.length;t++){const n=IP.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function DP(e){const t=PP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ks(e.tagName))}function MP(e,t){return t===pe.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function FP(e,t,n){if(t===pe.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===is.ENCODING){const s=n[r].value.toLowerCase();return s===hy.TEXT_HTML||s===hy.APPLICATION_XML}}return t===pe.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function BP(e,t,n,r){return(!r||r===pe.HTML)&&FP(e,t,n)||(!r||r===pe.MATHML)&&MP(e,t)}const UP="hidden",HP=8,jP=3;var U;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(U||(U={}));const zP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},gy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ey={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ei,onParseError:null};class yy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=j(j({},Ey),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new fP(this.options,this),this.activeFormattingElements=new bP(this.treeAdapter),this.fragmentContextID=r?Ks(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new TP(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=j(j({},Ey),n);t!=null||(t=r.treeAdapter.createElement(K.TEMPLATE,pe.HTML,[]));const s=r.treeAdapter.createElement("documentmock",pe.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:zP,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===pe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,pe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=Ut.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===K.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==pe.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ut.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ut.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ut.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ut.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&le(j({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,pe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,pe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(K.HTML,pe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===nt.END_TAG&&s===n.tagName?{endTag:j({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===pe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,pe.HTML)}_processToken(t){switch(t.type){case nt.CHARACTER:{this.onCharacter(t);break}case nt.NULL_CHARACTER:{this.onNullCharacter(t);break}case nt.COMMENT:{this.onComment(t);break}case nt.DOCTYPE:{this.onDoctype(t);break}case nt.START_TAG:{this._processStartTag(t);break}case nt.END_TAG:{this.onEndTag(t);break}case nt.EOF:{this.onEof(t);break}case nt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return BP(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===kr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=U.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=U.IN_TABLE;return}case g.BODY:{this.insertionMode=U.IN_BODY;return}case g.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return gy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===pe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return uP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){y6(this,t);return}switch(this.insertionMode){case U.INITIAL:{xa(this,t);break}case U.BEFORE_HTML:{_a(this,t);break}case U.BEFORE_HEAD:{Sa(this,t);break}case U.IN_HEAD:{va(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Aa(this,t);break}case U.AFTER_HEAD:{ka(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{by(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{lh(this,t);break}case U.IN_TABLE_TEXT:{Cy(this,t);break}case U.IN_COLUMN_GROUP:{Sl(this,t);break}case U.AFTER_BODY:{kl(this,t);break}case U.AFTER_AFTER_BODY:{Cl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){E6(this,t);return}switch(this.insertionMode){case U.INITIAL:{xa(this,t);break}case U.BEFORE_HTML:{_a(this,t);break}case U.BEFORE_HEAD:{Sa(this,t);break}case U.IN_HEAD:{va(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Aa(this,t);break}case U.AFTER_HEAD:{ka(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{lh(this,t);break}case U.IN_COLUMN_GROUP:{Sl(this,t);break}case U.AFTER_BODY:{kl(this,t);break}case U.AFTER_AFTER_BODY:{Cl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ah(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{ah(this,t);break}case U.IN_TABLE_TEXT:{Oa(this,t);break}case U.AFTER_BODY:{XP(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{KP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{QP(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case U.IN_TABLE_TEXT:{Oa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?T6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{xa(this,t);break}case U.BEFORE_HTML:{JP(this,t);break}case U.BEFORE_HEAD:{eR(this,t);break}case U.IN_HEAD:{dr(this,t);break}case U.IN_HEAD_NO_SCRIPT:{rR(this,t);break}case U.AFTER_HEAD:{sR(this,t);break}case U.IN_BODY:{fn(this,t);break}case U.IN_TABLE:{Qs(this,t);break}case U.IN_TABLE_TEXT:{Oa(this,t);break}case U.IN_CAPTION:{t6(this,t);break}case U.IN_COLUMN_GROUP:{ch(this,t);break}case U.IN_TABLE_BODY:{vl(this,t);break}case U.IN_ROW:{Al(this,t);break}case U.IN_CELL:{i6(this,t);break}case U.IN_SELECT:{Iy(this,t);break}case U.IN_SELECT_IN_TABLE:{o6(this,t);break}case U.IN_TEMPLATE:{u6(this,t);break}case U.AFTER_BODY:{c6(this,t);break}case U.IN_FRAMESET:{d6(this,t);break}case U.AFTER_FRAMESET:{h6(this,t);break}case U.AFTER_AFTER_BODY:{m6(this,t);break}case U.AFTER_AFTER_FRAMESET:{g6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?b6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{xa(this,t);break}case U.BEFORE_HTML:{ZP(this,t);break}case U.BEFORE_HEAD:{tR(this,t);break}case U.IN_HEAD:{nR(this,t);break}case U.IN_HEAD_NO_SCRIPT:{iR(this,t);break}case U.AFTER_HEAD:{oR(this,t);break}case U.IN_BODY:{_l(this,t);break}case U.TEXT:{qR(this,t);break}case U.IN_TABLE:{Ca(this,t);break}case U.IN_TABLE_TEXT:{Oa(this,t);break}case U.IN_CAPTION:{n6(this,t);break}case U.IN_COLUMN_GROUP:{r6(this,t);break}case U.IN_TABLE_BODY:{dh(this,t);break}case U.IN_ROW:{Oy(this,t);break}case U.IN_CELL:{s6(this,t);break}case U.IN_SELECT:{Py(this,t);break}case U.IN_SELECT_IN_TABLE:{a6(this,t);break}case U.IN_TEMPLATE:{l6(this,t);break}case U.AFTER_BODY:{Ly(this,t);break}case U.IN_FRAMESET:{f6(this,t);break}case U.AFTER_FRAMESET:{p6(this,t);break}case U.AFTER_AFTER_BODY:{Cl(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{xa(this,t);break}case U.BEFORE_HTML:{_a(this,t);break}case U.BEFORE_HEAD:{Sa(this,t);break}case U.IN_HEAD:{va(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Aa(this,t);break}case U.AFTER_HEAD:{ka(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{Ay(this,t);break}case U.TEXT:{YR(this,t);break}case U.IN_TABLE_TEXT:{Oa(this,t);break}case U.IN_TEMPLATE:{Ry(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{uh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===O.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{Ty(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{lh(this,t);break}case U.IN_TABLE_TEXT:{ky(this,t);break}}}}function $P(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):vy(e,t),n}function VP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function qP(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=jP;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=YP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function YP(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function WP(e,t,n){const r=e.treeAdapter.getTagName(t),s=Ks(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===pe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function GP(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function oh(e,t){for(let n=0;n<HP;n++){const r=$P(e,t);if(!r)break;const s=VP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=qP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&WP(e,u,a),GP(e,s,r)}}function ah(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function XP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function KP(e,t){e._appendCommentNode(t,e.document)}function uh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function QP(e,t){e._setDocumentType(t);const n=t.forceQuirks?Qn.QUIRKS:kP(t);AP(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function xa(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Qn.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function JP(e,t){t.tagID===g.HTML?(e._insertElement(t,pe.HTML),e.insertionMode=U.BEFORE_HEAD):_a(e,t)}function ZP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&_a(e,t)}function _a(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function eR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.HEAD:{e._insertElement(t,pe.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:Sa(e,t)}}function tR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Sa(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Sa(e,t){e._insertFakeElement(K.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function dr(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ut.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ut.RAWTEXT):(e._insertElement(t,pe.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ut.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ut.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:va(e,t)}}function nR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{va(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function ss(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function va(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function rR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{dr(e,t);break}case g.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:Aa(e,t)}}function iR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case g.BR:{Aa(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Aa(e,t){const n=t.type===nt.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function sR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.BODY:{e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,pe.HTML),e.insertionMode=U.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),dr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:ka(e,t)}}function oR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{ka(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function ka(e,t){e._insertFakeElement(K.BODY,g.BODY),e.insertionMode=U.IN_BODY,xl(e,t)}function xl(e,t){switch(t.type){case nt.CHARACTER:{by(e,t);break}case nt.WHITESPACE_CHARACTER:{Ty(e,t);break}case nt.COMMENT:{ah(e,t);break}case nt.START_TAG:{fn(e,t);break}case nt.END_TAG:{_l(e,t);break}case nt.EOF:{Ay(e,t);break}}}function Ty(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function by(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function aR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function uR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function lR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_FRAMESET)}function cR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function dR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&rh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,pe.HTML)}function fR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function hR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),n||(e.formElement=e.openElements.current))}function pR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function mR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.tokenizer.state=Ut.PLAINTEXT}function gR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1}function ER(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(oh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(oh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function wR(e,t){e.treeAdapter.getDocumentMode(e.document)!==Qn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function wy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xy(e){const t=ey(e,is.TYPE);return t!=null&&t.toLowerCase()===UP}function xR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),xy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function _R(e,t){e._appendElement(t,pe.HTML),t.ackSelfClosing=!0}function SR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vR(e,t){t.tagName=K.IMG,t.tagID=g.IMG,wy(e,t)}function AR(e,t){e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ut.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function kR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function CR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function _y(e,t){e._switchToTextParsing(t,Ut.RAWTEXT)}function NR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function OR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function IR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,pe.HTML)}function PR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,pe.HTML)}function RR(e,t){e._reconstructActiveFormattingElements(),py(t),sh(t),t.selfClosing?e._appendElement(t,pe.MATHML):e._insertElement(t,pe.MATHML),t.ackSelfClosing=!0}function LR(e,t){e._reconstructActiveFormattingElements(),my(t),sh(t),t.selfClosing?e._appendElement(t,pe.SVG):e._insertElement(t,pe.SVG),t.ackSelfClosing=!0}function Sy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function fn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{yR(e,t);break}case g.A:{ER(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{dR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{cR(e,t);break}case g.LI:case g.DD:case g.DT:{pR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{wy(e,t);break}case g.HR:{SR(e,t);break}case g.RB:case g.RTC:{IR(e,t);break}case g.RT:case g.RP:{PR(e,t);break}case g.PRE:case g.LISTING:{fR(e,t);break}case g.XMP:{kR(e,t);break}case g.SVG:{LR(e,t);break}case g.HTML:{aR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{dr(e,t);break}case g.BODY:{uR(e,t);break}case g.FORM:{hR(e,t);break}case g.NOBR:{TR(e,t);break}case g.MATH:{RR(e,t);break}case g.TABLE:{wR(e,t);break}case g.INPUT:{xR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{_R(e,t);break}case g.IMAGE:{vR(e,t);break}case g.BUTTON:{gR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{bR(e,t);break}case g.IFRAME:{CR(e,t);break}case g.SELECT:{NR(e,t);break}case g.OPTION:case g.OPTGROUP:{OR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{_y(e,t);break}case g.FRAMESET:{lR(e,t);break}case g.TEXTAREA:{AR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?_y(e,t):Sy(e,t);break}case g.PLAINTEXT:{mR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Sy(e,t)}}function DR(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function MR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,Ly(e,t))}function FR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function BR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function UR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(K.P,g.P),e._closePElement()}function HR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function jR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function zR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function $R(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function VR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function vy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function _l(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{oh(e,t);break}case g.P:{UR(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{FR(e,t);break}case g.LI:{HR(e);break}case g.DD:case g.DT:{jR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{zR(e);break}case g.BR:{VR(e);break}case g.BODY:{DR(e,t);break}case g.HTML:{MR(e,t);break}case g.FORM:{BR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{$R(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:vy(e,t)}}function Ay(e,t){e.tmplInsertionModeStack.length>0?Ry(e,t):uh(e,t)}function qR(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function YR(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function lh(e,t){if(e.openElements.currentTagId!==void 0&&gy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case nt.CHARACTER:{Cy(e,t);break}case nt.WHITESPACE_CHARACTER:{ky(e,t);break}}else Na(e,t)}function WR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_CAPTION}function GR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function XR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,g.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,ch(e,t)}function KR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_TABLE_BODY}function QR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,g.TBODY),e.insertionMode=U.IN_TABLE_BODY,vl(e,t)}function JR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ZR(e,t){xy(t)?e._appendElement(t,pe.HTML):Na(e,t),t.ackSelfClosing=!0}function e6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,pe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Qs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{QR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{dr(e,t);break}case g.COL:{XR(e,t);break}case g.FORM:{e6(e,t);break}case g.TABLE:{JR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{KR(e,t);break}case g.INPUT:{ZR(e,t);break}case g.CAPTION:{WR(e,t);break}case g.COLGROUP:{GR(e,t);break}default:Na(e,t)}}function Ca(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ss(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Na(e,t)}}function Na(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,xl(e,t),e.fosterParentingEnabled=n}function ky(e,t){e.pendingCharacterTokens.push(t)}function Cy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Oa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Na(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ny=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function t6(e,t){const n=t.tagID;Ny.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,Qs(e,t)):fn(e,t)}function n6(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===g.TABLE&&Ca(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:_l(e,t)}}function ch(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.COL:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{dr(e,t);break}default:Sl(e,t)}}function r6(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TEMPLATE:{ss(e,t);break}case g.COL:break;default:Sl(e,t)}}function Sl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function vl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,g.TR),e.insertionMode=U.IN_ROW,Al(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Qs(e,t));break}default:Qs(e,t)}}function dh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Ca(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Ca(e,t)}}function Al(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,pe.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,vl(e,t));break}default:Qs(e,t)}}function Oy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,dh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,dh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Ca(e,t)}}function i6(e,t){const n=t.tagID;Ny.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Al(e,t)):fn(e,t)}function s6(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Oy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:_l(e,t)}}function Iy(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{dr(e,t);break}}}function Py(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{ss(e,t);break}}}function o6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Iy(e,t)}function a6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Py(e,t)}function u6(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{dr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,Qs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,ch(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,vl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,Al(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,fn(e,t)}}function l6(e,t){t.tagID===g.TEMPLATE&&ss(e,t)}function Ry(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):uh(e,t)}function c6(e,t){t.tagID===g.HTML?fn(e,t):kl(e,t)}function Ly(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else kl(e,t)}function kl(e,t){e.insertionMode=U.IN_BODY,xl(e,t)}function d6(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.FRAMESET:{e._insertElement(t,pe.HTML);break}case g.FRAME:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{dr(e,t);break}}}function f6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function h6(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.NOFRAMES:{dr(e,t);break}}}function p6(e,t){t.tagID===g.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function m6(e,t){t.tagID===g.HTML?fn(e,t):Cl(e,t)}function Cl(e,t){e.insertionMode=U.IN_BODY,xl(e,t)}function g6(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.NOFRAMES:{dr(e,t);break}}}function E6(e,t){t.chars=kt,e._insertCharacters(t)}function y6(e,t){e._insertCharacters(t),e.framesetOk=!1}function Dy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==pe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function T6(e,t){if(LP(t))Dy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===pe.MATHML?py(t):r===pe.SVG&&(DP(t),my(t)),sh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function b6(e,t){if(t.tagID===g.P||t.tagID===g.BR){Dy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===pe.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR;const w6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,x6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),My={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Fy(e,t){const n=P6(e),r=XE("type",{handlers:{root:_6,element:S6,text:v6,comment:Uy,doctype:A6,raw:C6},unknown:N6}),s={parser:n?new yy(My):yy.getFragmentParser(void 0,My),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Js(s,vr());const a=n?s.parser.document:s.parser.getFragment(),u=RI(a,{file:s.options.file});return s.stitches&&El(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function By(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function _6(e,t){By(e.children,t)}function S6(e,t){O6(e,t),By(e.children,t),I6(e,t)}function v6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:nt.CHARACTER,chars:e.value,location:Ia(e)};Js(t,vr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function A6(e,t){const n={type:nt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ia(e)};Js(t,vr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function k6(e,t){t.stitches=!0;const n=R6(e);if("children"in e&&"children"in n){const r=Fy({type:"root",children:e.children},t.options);n.children=r.children}Uy({type:"comment",value:{stitch:n}},t)}function Uy(e,t){const n=e.value,r={type:nt.COMMENT,data:n,location:Ia(e)};Js(t,vr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function C6(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Hy(t,vr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(w6,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function N6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))k6(n,t);else{let r="";throw x6.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Js(e,t){Hy(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ut.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Hy(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function O6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ut.PLAINTEXT)return;Js(t,vr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:rs.html;s===rs.html&&n==="svg"&&(s=rs.svg);const a=BI(le(j({},e),{children:[]}),{space:s===rs.svg?"svg":"html"}),u={type:nt.START_TAG,tagName:n,tagID:Ks(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ia(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function I6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&YI.includes(n)||t.parser.tokenizer.state===Ut.PLAINTEXT)return;Js(t,ol(e));const r={type:nt.END_TAG,tagName:n,tagID:Ks(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ia(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ut.RCDATA||t.parser.tokenizer.state===Ut.RAWTEXT||t.parser.tokenizer.state===Ut.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ut.DATA)}function P6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ia(e){const t=vr(e)||{line:void 0,column:void 0,offset:void 0},n=ol(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function R6(e){return"children"in e?ns(le(j({},e),{children:[]})):ns(e)}function jy(e){return function(t,n){return Fy(t,le(j({},e),{file:n}))}}const os=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],zy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...os,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...os],h2:[["className","sr-only"]],img:[...os,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...os,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...os],table:[...os],ul:[...os,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},yi={}.hasOwnProperty;function L6(e,t){let n={type:"root",children:[]};const r={schema:t?j(j({},zy),t):zy,stack:[]},s=$y(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function $y(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return D6(e,n);case"doctype":return M6(e,n);case"element":return F6(e,n);case"root":return B6(e,n);case"text":return U6(e,n)}}}function D6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Pa(a,t),a}}function M6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Pa(n,t),n}}function F6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Vy(e,t.children),s=H6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&yi.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return Pa(u,t),u}function B6(e,t){const r={type:"root",children:Vy(e,t.children)};return Pa(r,t),r}function U6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Pa(r,t),r}function Vy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=$y(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function H6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&yi.call(r,n)?r[n]:void 0,u=r&&yi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(yi.call(l,f)){const p=l[f];let m=qy(e,Wy(a,f),f,p);m==null&&(m=qy(e,Wy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&yi.call(s,n)){const p=s[n];for(f in p)yi.call(p,f)&&!yi.call(d,f)&&(d[f]=p[f])}return d}function qy(e,t,n,r){return t?Array.isArray(r)?j6(e,t,n,r):Yy(e,t,n,r):void 0}function j6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Yy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Yy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&z6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function z6(e,t,n){const r=e.schema.protocols&&yi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),l=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function Pa(e,t){const n=B1(t);t.data&&(e.data=ns(t.data)),n&&(e.position=n)}function Wy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function $6(e){return function(t){return L6(t,e)}}const Gy=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",le(j(j({className:B(e,`${N}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},V6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ft();return!e&&!t?null:w.jsx("div",{className:B(n,`${N}-disclaimer`),children:t?w.jsx(HE,{rehypePlugins:[jy,$6],components:{ul:({children:r})=>w.jsx("ul",{className:B(n,`${N}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:B(n,`${N}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:B(n,`${N}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(Gy,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:B(n,`${N}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:B(n,`${N}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:B(n,`${N}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:B(n,`${N}-disclaimer-text`),children:e})})},fh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=bn(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:p}=ft(),m=R.useRef(null),b=R.useRef(l);b.current=l;const y=t||!Fg(s,a,u),x=R.useRef(t);R.useEffect(()=>{var C;const S=x.current&&!t;x.current=t,S&&!y&&((C=m.current)==null||C.focus({preventScroll:!0}))},[t,y]);const _=S=>Be(null,null,function*(){var I,z;S.preventDefault();const C=(((I=m.current)==null?void 0:I.value)||"").trim();if(C){const W=!s&&!a&&u===!0,D=b.current.length;m.current.value="";const V=yield r(C);W&&V.outcome!=="success"&&b.current.length===D&&((z=m.current)==null?void 0:z.value)===""&&(m.current.value=C,m.current.disabled||m.current.focus({preventScroll:!0}))}}),A=()=>{r("Can you connect me to a human?")};return w.jsxs("div",{className:B(d,e,`cim-${n}-component`,`${N}-search-bar-wrapper`),children:[w.jsxs("form",{className:B(d,e,`cim-${n}-component`,`${N}-search-bar`),name:`${N}-search-form`,onSubmit:_,children:[w.jsx("input",{className:B(d,e,`cim-${n}-component`,`${N}-search-input`),type:"text",ref:m,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything",name:`${N}-user-input`,disabled:y}),w.jsx(xC,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:y}),p&&w.jsx(lr,{className:B(d,`${N}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:y,onClick:A,icon:w.jsx(dC,{})})]}),w.jsx(V6,{})]})};function q6(e){return ht({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function Y6(e){return ht({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const Xy=R.createContext({isOpen:!1}),hh=R.createContext(null),Ky=R.createContext(null),Zs=()=>{var n,r;const e=R.useContext(hh),t=R.useContext(Ky);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Qy=({onClearChat:e,componentType:t})=>{const n=Zs(),r=()=>{e(),n()};return w.jsxs("button",{className:B(`${N}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(Y6,{}),"Clear chat"]})},Jy=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ft(),r=Zs(),[s,a]=R.useState(!1),u=()=>Be(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return w.jsxs("button",{className:B(`${N}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(q6,{}),"Download transcript"]})};function W6(e){return e==null?[]:Array.isArray(e)?e:[e]}var G6=(e,...t)=>e.concat(t),X6=(e,...t)=>e.filter(n=>!t.includes(n)),K6=e=>Array.from(new Set(e));function Zy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?s?l:0:a>=u?s?0:t>u?u:t:a}function Q6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Zy(e,t,{step:-r,loop:s})}var J6=e=>Array.isArray(e),eT=e=>e!=null&&typeof e=="object",Z6=e=>eT(e)&&!J6(e),Nl=e=>typeof e=="string",eo=e=>typeof e=="function",e4=e=>e==null,t4=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n4=e=>Object.prototype.toString.call(e),tT=Function.prototype.toString,r4=tT.call(Object),i4=e=>{if(!eT(e)||n4(e)!="[object Object]"||a4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=t4(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&tT.call(n)==r4},s4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,o4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,a4=e=>s4(e)||o4(e),u4=e=>e(),l4=()=>{},ph=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function c4(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:d4,max:f4}=Math,h4=e=>Number.isNaN(e),p4=e=>h4(e)?0:e,nT=(e,t,n)=>d4(f4(p4(e),t),n);function mh(e){if(!i4(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=mh(s))}return n}function gh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function m4(e,t){if(e==null)throw new Error(t())}function g4(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var E4=Object.defineProperty,y4=(e,t,n)=>t in e?E4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eh=(e,t,n)=>y4(e,typeof t!="symbol"?t+"":t,n),rT=()=>{},Ol=e=>typeof e=="object"&&e!==null,to=e=>e?"":void 0,iT=e=>e?"true":void 0,T4=1,b4=9,w4=11,Jt=e=>Ol(e)&&e.nodeType===T4&&typeof e.nodeName=="string",Il=e=>Ol(e)&&e.nodeType===b4,x4=e=>Ol(e)&&e===e.window,sT=e=>Jt(e)?e.localName||"":"#document";function _4(e){return["html","body","#document"].includes(sT(e))}var S4=e=>Ol(e)&&e.nodeType!==void 0,as=e=>S4(e)&&e.nodeType===w4&&"host"in e,v4=e=>Jt(e)&&e.localName==="input",A4=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ra(e){if(!e)return!1;const t=e.getRootNode();return io(t)===e}var k4=/(textarea|select)/;function C4(e){if(e==null||!Jt(e))return!1;try{return v4(e)&&e.selectionStart!=null||k4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function no(e,t){var r;if(!e||!t||!Jt(e)||!Jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&as(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Cr(e){var t;return Il(e)?e:x4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function N4(e){return Cr(e).documentElement}function ro(e){var t,n,r;return as(e)?ro(e.host):Il(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function io(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function O4(e){if(sT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||as(e)&&e.host||N4(e);return as(t)?t.host:t}function yh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Il(t)||as(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Th=new WeakMap;function so(e){return Th.has(e)||Th.set(e,ro(e).getComputedStyle(e)),Th.get(e)}var bh=new Set(["menu","listbox","dialog","grid","tree","region"]),I4=e=>bh.has(e),oT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function aT(e,t){const n=new Set,r=yh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=oT(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&I4(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function uT(e,t){const n=yh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=oT(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&bh.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function P4(e){const t=new Set;return uT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function R4(e){const t=e.getAttribute("role");return!!(t&&bh.has(t))}function L4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function D4(e){var t;return L4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function M4(e){if(!e.id)return!1;const t=yh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&R4(e))}var wh=()=>typeof document!="undefined";function F4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var xh=e=>wh()&&e.test(F4()),B4=e=>wh()&&e.test(navigator.vendor),lT=()=>wh()&&!!navigator.maxTouchPoints,U4=()=>xh(/^iPhone/i),H4=()=>xh(/^iPad/i)||_h()&&navigator.maxTouchPoints>1,Pl=()=>U4()||H4(),j4=()=>_h()||Pl(),_h=()=>xh(/^Mac/i),z4=()=>j4()&&B4(/apple/i);function $4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function fr(e){var n;const t=$4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var cT=e=>e.button===0,V4=e=>e.button===2||_h()&&e.ctrlKey&&e.button===0,q4=e=>"touches"in e&&e.touches.length>0,Y4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},dT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function W4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=Y4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in dT&&(s=dT[s]),s}function fT(e,t="client"){const n=q4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Zt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},hT=e=>Jt(e)&&e.tagName==="IFRAME",G4=/^(audio|video|details)$/;function pT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var X4=e=>!Number.isNaN(pT(e)),K4=e=>pT(e)<0;function Q4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function mT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<s.length;){const d=s[l++];if(!d||a.has(d))continue;a.add(d);const f=Q4(d,t);if(f){const p=Array.from(f.querySelectorAll(Rl)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,b+x)})}s.push(...p)}}return r}var Rl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",gT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Rl));(n==!0||n=="if-empty"&&s.length===0)&&Jt(e)&&Nr(e)&&s.unshift(e);const u=[];for(const l of s)if(Nr(l)){if(hT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...gT(d,{getShadowRoot:r}));continue}u.push(l)}return r?mT(u,r,Nr):u};function Nr(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Rl)&&A4(e)}function oo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Rl));n&&us(e)&&s.unshift(e);const a=[];for(const u of s)if(us(u)){if(hT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...oo(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=mT(a,r,us);return!u.length&&n?s:u}return!a.length&&n?s:a}function us(e){return Jt(e)&&e.tabIndex>0?!0:Nr(e)&&!K4(e)}function J4(e,t={}){const n=oo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function Z4(e,t={}){const{current:n,getShadowRoot:r}=t,s=oo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:io(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function La(e){return e.tabIndex<0&&(G4.test(e.localName)||C4(e))&&!X4(e)?0:e.tabIndex}function ET(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=oo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var eL=class k2{constructor(){Eh(this,"id",null),Eh(this,"fn_cleanup"),Eh(this,"cleanup",()=>{this.cancel()})}static create(){return new k2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function qt(e){const t=eL.create();return t.request(e),t.cleanup}function yT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Sh(e){const t=O4(e);return _4(t)?Cr(t).body:Jt(t)&&rL(t)?t:Sh(t)}var tL=/auto|scroll|overlay|hidden|clip/,nL=new Set(["inline","contents"]);function rL(e){const t=ro(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return tL.test(n+s+r)&&!nL.has(a)}var ao="default",vh="",Ll=new WeakMap;function iL(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Pl()?(ao==="default"&&(vh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),ao="disabled"):t&&(Ll.set(t,t.style.userSelect),t.style.userSelect="none"),()=>sL({target:t,doc:r})}function sL(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Pl()){if(ao!=="disabled")return;ao="restoring",setTimeout(()=>{yT(()=>{ao==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=vh||""),vh="",ao="default")})},300)}else if(t&&Ll.has(t)){const a=Ll.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ll.delete(t)}}function oL(e={}){const u=e,{defer:t,target:n}=u,r=vn(u,["defer","target"]),s=t?qt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(iL(le(j({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function aL(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=fT(l),f=Math.sqrt(pd(d.x,2)+pd(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=fT(l);r({point:d,event:l})},u=[Zt(e,"pointermove",s,!1),Zt(e,"pointerup",a,!1),Zt(e,"pointercancel",a,!1),Zt(e,"contextmenu",a,!1),oL({doc:e})];return()=>{u.forEach(l=>l())}}function uL(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=J4(e,{includeContainer:!0,getShadowRoot:a}),y=Z4(l,{current:n,getShadowRoot:a}),x=!m&&!b;f.shiftKey&&Ra(y)?(s==null||s(),p=b):f.shiftKey&&(Ra(m)||x)?p=n:!f.shiftKey&&Ra(n)?(s==null||s(),p=m):!f.shiftKey&&(Ra(b)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Zt(u,"keydown",d,!0)}function lL(e,t){const l=t,{defer:n,triggerElement:r}=l,s=vn(l,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(uL(d,j({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function cL(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Dl(e,t){if(!e)return rT;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function dL(e,t,n){if(!e)return rT;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function fL(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function hL(e,t){const{timeout:n,rootNode:r}=t,s=ro(r),a=Cr(r),u=new s.AbortController;return fL(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var pL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),mL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,TT=e=>{const t={};let n;for(;n=mL.exec(e);)t[n[1]]=n[2];return t},gL=(e,t)=>{if(Nl(e)){if(Nl(t))return`${e};${t}`;e=TT(e)}else Nl(t)&&(t=TT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=ph(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=pL(t[s],n[s]);continue}if(s==="style"){t[s]=gL(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function OU(e){return e}var uo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(uo||{}),Ah="__init__";function EL(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>io(t()),a=u=>t().getElementById(u);return le(j({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Ra,getById:a})}function yL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var lo=()=>e=>Array.from(new Set(e)),bT=typeof globalThis.document!="undefined"?R.useLayoutEffect:R.useEffect;function Ml(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=R.useState(t),[s,a]=R.useState(r),u=e().value!==void 0,l=R.useRef(s);l.current=u?e().value:s;const d=R.useRef(l.current);bT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,S;const x=d.current,_=eo(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:_,prev:x}),u||a(_),n(_,x)||(S=(A=e()).onChange)==null||S.call(A,_,x)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?$s.flushSync:u4)(()=>f(y))},invoke(y,x){var _,A;(A=(_=e()).onChange)==null||A.call(_,y,x)},hash(y){var x,_,A;return(A=(_=(x=e()).hash)==null?void 0:_.call(x,y))!=null?A:String(y)}}}Ml.cleanup=e=>{R.useEffect(()=>e,[])},Ml.ref=e=>{const t=R.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function TL(e){const t=R.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var bL=(e,t)=>{const n=R.useRef(!1),r=R.useRef(!1);R.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),R.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Fl(e,t={}){var ie,te,ue,fe,ae,Se;const n=R.useMemo(()=>{const{id:de,ids:G,getRootNode:se}=t;return EL({id:de,ids:G,getRootNode:se})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(te=(ie=e.props)==null?void 0:ie.call(e,{props:mh(t),scope:n}))!=null?te:t,a=wL(s),u=(ue=e.context)==null?void 0:ue.call(e,{prop:a,bindable:Ml,scope:n,flush:xT,getContext(){return d},getComputed(){return W},getRefs(){return _},getEvent(){return y()}}),l=wT(u),d={get(de){var G;return(G=l.current)==null?void 0:G[de].ref.current},set(de,G){var se;(se=l.current)==null||se[de].set(G)},initial(de){var G;return(G=l.current)==null?void 0:G[de].initial},hash(de){var se,k;const G=(se=l.current)==null?void 0:se[de].get();return(k=l.current)==null?void 0:k[de].hash(G)}},f=R.useRef(new Map),p=R.useRef(null),m=R.useRef(null),b=R.useRef({type:""}),y=()=>le(j({},b.current),{current(){return b.current},previous(){return m.current}}),x=()=>le(j({},D),{matches(...de){return de.includes(D.ref.current)},hasTag(de){var G,se;return!!((se=(G=e.states[D.ref.current])==null?void 0:G.tags)!=null&&se.includes(de))}}),_=TL((ae=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?ae:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:H,action:S,guard:C,track:bL,refs:_,computed:W,flush:xT,scope:n,choose:z}),S=de=>{const G=eo(de)?de(A()):de;if(!G)return;const se=G.map(k=>{var J,P;const M=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[k];return M||gh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of se)k==null||k(A())},C=de=>{var G,se;return eo(de)?de(A()):(se=(G=e.implementations)==null?void 0:G.guards)==null?void 0:se[de](A())},I=de=>{const G=eo(de)?de(A()):de;if(!G)return;const se=G.map(M=>{var P,_e;const J=(_e=(P=e.implementations)==null?void 0:P.effects)==null?void 0:_e[M];return J||gh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),J}),k=[];for(const M of se){const J=M==null?void 0:M(A());J&&k.push(J)}return()=>k.forEach(M=>M==null?void 0:M())},z=de=>W6(de).find(G=>{let se=!G.guard;return Nl(G.guard)?se=!!C(G.guard):eo(G.guard)&&(se=G.guard(A())),se}),W=de=>{m4(e.computed,()=>"[zag-js] No computed object found on machine");const G=e.computed[de];return G({context:d,event:y(),prop:a,refs:_,scope:n,computed:W})},D=Ml(()=>({defaultValue:e.initialState({prop:a}),onChange(de,G){var k,M,J,P;if(G){const _e=f.current.get(G);_e==null||_e(),f.current.delete(G)}G&&S((k=e.states[G])==null?void 0:k.exit),S((M=p.current)==null?void 0:M.actions);const se=I((J=e.states[de])==null?void 0:J.effects);if(se&&f.current.set(de,se),G===Ah){S(e.entry);const _e=I(e.effects);_e&&f.current.set(Ah,_e)}S((P=e.states[de])==null?void 0:P.entry)}})),V=R.useRef(void 0),ee=R.useRef(uo.NotStarted);bT(()=>{queueMicrotask(()=>{var M;const se=ee.current===uo.Started;ee.current=uo.Started,r(se?"rehydrating...":"initializing...");const k=(M=V.current)!=null?M:D.initial;D.invoke(k,se?D.get():Ah)});const de=f.current,G=D.ref.current;return()=>{r("unmounting..."),V.current=G,ee.current=uo.Stopped,de.forEach(se=>se==null?void 0:se()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const ce=()=>"ref"in D?D.ref.current:D.get(),H=de=>{queueMicrotask(()=>{var P,_e,ve,me,Ie;if(ee.current!==uo.Started)return;m.current=b.current,b.current=de;let G=ce();const se=(ve=(P=e.states[G].on)==null?void 0:P[de.type])!=null?ve:(_e=e.on)==null?void 0:_e[de.type],k=z(se);if(!k)return;p.current=k;const M=(me=k.target)!=null?me:G;r("transition",de.type,k.target||G,`(${k.actions})`);const J=M!==G;J?$s.flushSync(()=>D.set(M)):k.reenter&&!J?D.invoke(G,G):S((Ie=k.actions)!=null?Ie:[])})};return(Se=e.watch)==null||Se.call(e,A()),{state:x(),send:H,context:d,prop:a,scope:n,refs:_,computed:W,event:y(),getStatus:()=>ee.current}}function wT(e){const t=R.useRef(e);return t.current=e,t}function wL(e){const t=wT(e);return function(r){return t.current[r]}}function xT(e){queueMicrotask(()=>{$s.flushSync(()=>e())})}var kh=yL(e=>e);function Bl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function xL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Ch=e=>{const t=R.memo(R.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=vn(f,["asChild","children"]);if(!s)return R.createElement(e,le(j({},u),{ref:r}),a);if(!R.isValidElement(a))return null;const l=R.Children.only(a),d=xL(l);return R.cloneElement(l,le(j({},Yt(u,l.props)),{ref:r?Bl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},hn=(()=>{const e=new Map;return new Proxy(Ch,{apply(t,n,r){return Ch(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Ch(r)),e.get(r)}})})();function _L(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ls(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=R.createContext(u);l.displayName=t;function d(){var p;const f=R.useContext(l);if(!f&&n){const m=new Error(a!=null?a:_L(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[SL,Nh]=ls({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[_T,Da]=ls({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),ST=R.forwardRef((e,t)=>{const n=Nh(),r=Da(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(hn.div,le(j({},s),{ref:Bl(r.ref,t)}))});ST.displayName="PopoverContent";const vT=R.forwardRef((e,t)=>{const n=Nh(),r=Da(),s=Yt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(hn.div,le(j({},s),{ref:t}))});vT.displayName="PopoverPositioner";const Ma=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},j({},e)]),AT=e=>Ma()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function vL(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var AL={props({props:e}){return le(j({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",so(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});qt(()=>{var l,d;const u=Ul(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{qt(()=>{e.set("prevAnimationName",Ul(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Ul(t.get("styles")))},u=d=>{const f=Ul(t.get("styles"));fr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const l=Dl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),yT(()=>l())}}}}};function Ul(e){return(e==null?void 0:e.animationName)||"none"}lo()(["onExitComplete","present","immediate"]);function kL(e,t={}){const{sync:n=!1}=t,r=CL(e);return R.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function CL(e){const t=R.useRef(e);return t.current=e,t}const Oh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=vn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=R.useRef(!1),l=le(j({},a),{present:r,onExitComplete:kL(e.onExitComplete)}),d=Fl(AL,l),f=vL(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var cs=(e,t=[])=>({parts:(...n)=>{if(NL(t))return cs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>cs(e,[...t,...n]),omit:(...n)=>cs(e,t.filter(r=>!n.includes(r))),rename:n=>cs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${co(e)}"][data-part="${co(r)}"]`,`& [data-scope="${co(e)}"][data-part="${co(r)}"]`].join(", "),attrs:{"data-scope":co(e),"data-part":co(r)}}}),{})}),co=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),NL=e=>e.length===0;const OL=["top","right","bottom","left"],Ti=Math.min,Yr=Math.max,Hl=Math.round,jl=Math.floor,Or=e=>({x:e,y:e}),IL={left:"right",right:"left",bottom:"top",top:"bottom"};function kT(e,t,n){return Yr(e,Ti(t,n))}function Wr(e,t){return typeof e=="function"?e(t):e}function bi(e){return e.split("-")[0]}function fo(e){return e.split("-")[1]}function Ih(e){return e==="x"?"y":"x"}function Ph(e){return e==="y"?"height":"width"}function Ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Rh(e){return Ih(Ir(e))}function PL(e,t,n){n===void 0&&(n=!1);const r=fo(e),s=Rh(e),a=Ph(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=zl(u)),[u,zl(u)]}function RL(e){const t=zl(e);return[Lh(e),t,Lh(t)]}function Lh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const CT=["left","right"],NT=["right","left"],LL=["top","bottom"],DL=["bottom","top"];function ML(e,t,n){switch(e){case"top":case"bottom":return n?t?NT:CT:t?CT:NT;case"left":case"right":return t?LL:DL;default:return[]}}function FL(e,t,n,r){const s=fo(e);let a=ML(bi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Lh)))),a}function zl(e){const t=bi(e);return IL[t]+e.slice(t.length)}function BL(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function OT(e){return typeof e!="number"?BL(e):{top:e,right:e,bottom:e,left:e}}function $l(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function IT(e,t,n){let{reference:r,floating:s}=e;const a=Ir(t),u=Rh(t),l=Ph(u),d=bi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const x=fo(t);return x&&(y[u]+=b*(x==="end"?1:-1)*(n&&f?-1:1)),y}function UL(e,t){return Be(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=Wr(t,e),x=OT(y),A=l[b?m==="floating"?"reference":"floating":m],S=$l(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),z=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},W=$l(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:I,strategy:d}):C);return{top:(S.top-W.top+x.top)/z.y,bottom:(W.bottom-S.bottom+x.bottom)/z.y,left:(S.left-W.left+x.left)/z.x,right:(W.right-S.right+x.right)/z.x}})}const HL=50,jL=(e,t,n)=>Be(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:le(j({},u),{detectOverflow:UL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=IT(f,r,d),b=r,y=0;const x={};for(let _=0;_<a.length;_++){const A=a[_];if(!A)continue;const{name:S,fn:C}=A,{x:I,y:z,data:W,reset:D}=yield C({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=z!=null?z:m,x[S]=j(j({},x[S]),W),D&&y<HL&&(y++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=IT(f,b,d)),_=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:x}}),zL=e=>({name:"arrow",options:e,fn(n){return Be(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Wr(e,n)||{};if(p==null)return{};const b=OT(m),y={x:r,y:s},x=Rh(a),_=Ph(x),A=yield l.getDimensions(p),S=x==="y",C=S?"top":"left",I=S?"bottom":"right",z=S?"clientHeight":"clientWidth",W=u.reference[_]+u.reference[x]-y[x]-u.floating[_],D=y[x]-u.reference[x],V=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ee=V?V[z]:0;(!ee||!(yield l.isElement==null?void 0:l.isElement(V)))&&(ee=d.floating[z]||u.floating[_]);const ce=W/2-D/2,H=ee/2-A[_]/2-1,ie=Ti(b[C],H),te=Ti(b[I],H),ue=ee-A[_]-te,fe=ee/2-A[_]/2+ce,ae=kT(ie,fe,ue),Se=!f.arrow&&fo(a)!=null&&fe!==ae&&u.reference[_]/2-(fe<ie?ie:te)-A[_]/2<0,de=Se?fe<ie?fe-ie:fe-ue:0;return{[x]:y[x]+de,data:j({[x]:ae,centerOffset:fe-ae-de},Se&&{alignmentOffset:de}),reset:Se}})}}),$L=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Be(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,ae=Wr(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:A=!0}=ae,S=vn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=bi(a),I=Ir(d),z=bi(d)===d,W=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(z||!A?[zl(d)]:RL(d)),V=_!=="none";!y&&V&&D.push(...FL(d,A,_,W));const ee=[d,...D],ce=yield f.detectOverflow(n,S),H=[];let ie=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&H.push(ce[C]),b){const Se=PL(a,l,W);H.push(ce[Se[0]],ce[Se[1]])}if(ie=[...ie,{placement:a,overflows:H}],!H.every(Se=>Se<=0)){var te,ue;const Se=(((te=u.flip)==null?void 0:te.index)||0)+1,de=ee[Se];if(de&&(!(b==="alignment"?I!==Ir(de):!1)||ie.every(k=>Ir(k.placement)===I?k.overflows[0]>0:!0)))return{data:{index:Se,overflows:ie},reset:{placement:de}};let G=(ue=ie.filter(se=>se.overflows[0]<=0).sort((se,k)=>se.overflows[1]-k.overflows[1])[0])==null?void 0:ue.placement;if(!G)switch(x){case"bestFit":{var fe;const se=(fe=ie.filter(k=>{if(V){const M=Ir(k.placement);return M===I||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,J)=>M+J,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:fe[0];se&&(G=se);break}case"initialPlacement":G=d;break}if(a!==G)return{reset:{placement:G}}}return{}})}}};function PT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function RT(e){return OL.some(t=>e[t]>=0)}const VL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Be(this,null,function*(){const{rects:r,platform:s}=n,l=Wr(e,n),{strategy:a="referenceHidden"}=l,u=vn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,le(j({},u),{elementContext:"reference"})),f=PT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:RT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,le(j({},u),{altBoundary:!0})),f=PT(d,r.floating);return{data:{escapedOffsets:f,escaped:RT(f)}}}default:return{}}})}}},LT=new Set(["left","top"]);function qL(e,t){return Be(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=bi(n),l=fo(n),d=Ir(n)==="y",f=LT.has(u)?-1:1,p=a&&d?-1:1,m=Wr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const YL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Be(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield qL(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:le(j({},f),{placement:l})}})}}},WL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Be(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=Wr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:z=>{let{x:W,y:D}=z;return{x:W,y:D}}}}=I,p=vn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Ir(a),x=Ih(y);let _=m[x],A=m[y];const S=(z,W)=>kT(W+b[z==="y"?"top":"left"],W,W-b[z==="y"?"bottom":"right"]);l&&(_=S(x,_)),d&&(A=S(y,A));const C=f.fn(le(j({},n),{[x]:_,[y]:A}));return le(j({},C),{data:{x:C.x-r,y:C.y-s,enabled:{[x]:l,[y]:d}}})})}}},GL=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=Wr(e,t),b={x:s,y:a},y=Ir(u),x=Ih(y);let _=b[x],A=b[y];const S=Wr(f,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const W=x==="y"?"height":"width",D=l.reference[x]-l.floating[W]+C.mainAxis,V=l.reference[x]+l.reference[W]-C.mainAxis;_<D?_=D:_>V&&(_=V)}if(m){var I,z;const W=x==="y"?"width":"height",D=LT.has(bi(u)),V=l.reference[y]-l.floating[W]+(D&&((I=d.offset)==null?void 0:I[y])||0)+(D?0:C.crossAxis),ee=l.reference[y]+l.reference[W]+(D?0:((z=d.offset)==null?void 0:z[y])||0)-(D?C.crossAxis:0);A<V?A=V:A>ee&&(A=ee)}return{[x]:_,[y]:A}}}},XL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Be(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,H=Wr(e,n),{apply:l=()=>{}}=H,d=vn(H,["apply"]),f=yield a.detectOverflow(n,d),p=bi(r),m=fo(r),b=Ir(r)==="y",{width:y,height:x}=s.floating;let _,A;p==="top"||p==="bottom"?(_=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,_=m==="end"?"top":"bottom");const S=x-f.top-f.bottom,C=y-f.left-f.right,I=Ti(x-f[_],S),z=Ti(y-f[A],C),W=n.middlewareData.shift,D=!W;let V=I,ee=z;W!=null&&W.enabled.x&&(ee=C),W!=null&&W.enabled.y&&(V=S),D&&!m&&(b?ee=y-2*Yr(f.left,f.right):V=x-2*Yr(f.top,f.bottom)),yield l(le(j({},n),{availableWidth:ee,availableHeight:V}));const ce=yield a.getDimensions(u.floating);return y!==ce.width||x!==ce.height?{reset:{rects:!0}}:{}})}}};function Vl(){return typeof window!="undefined"}function ho(e){return DT(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(DT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function DT(e){return Vl()?e instanceof Node||e instanceof Vn(e).Node:!1}function hr(e){return Vl()?e instanceof Element||e instanceof Vn(e).Element:!1}function Rr(e){return Vl()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function MT(e){return!Vl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function Fa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function KL(e){return/^(table|td|th)$/.test(ho(e))}function ql(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const QL=/transform|translate|scale|rotate|perspective|filter/,JL=/paint|layout|strict|content/,ds=e=>!!e&&e!=="none";let Dh;function Mh(e){const t=hr(e)?pr(e):e;return ds(t.transform)||ds(t.translate)||ds(t.scale)||ds(t.rotate)||ds(t.perspective)||!Fh()&&(ds(t.backdropFilter)||ds(t.filter))||QL.test(t.willChange||"")||JL.test(t.contain||"")}function ZL(e){let t=wi(e);for(;Rr(t)&&!po(t);){if(Mh(t))return t;if(ql(t))return null;t=wi(t)}return null}function Fh(){return Dh==null&&(Dh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dh}function po(e){return/^(html|body|#document)$/.test(ho(e))}function pr(e){return Vn(e).getComputedStyle(e)}function Yl(e){return hr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wi(e){if(ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||MT(e)&&e.host||Pr(e);return MT(t)?t.host:t}function FT(e){const t=wi(e);return po(t)?(e.ownerDocument||e).body:Rr(t)&&Fa(t)?t:FT(t)}function Ba(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=FT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(s);if(a){const l=Bh(u);return t.concat(u,u.visualViewport||[],Fa(s)?s:[],l&&n?Ba(l):[])}else return t.concat(s,Ba(s,[],n))}function Bh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function BT(e){const t=pr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Rr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=Hl(n)!==a||Hl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Uh(e){return hr(e)?e:e.contextElement}function mo(e){const t=Uh(e);if(!Rr(t))return Or(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=BT(t);let u=(a?Hl(n.width):n.width)/r,l=(a?Hl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const e5=Or(0);function UT(e){const t=Vn(e);return!Fh()||!t.visualViewport?e5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Uh(e);let u=Or(1);t&&(r?hr(r)&&(u=mo(r)):u=mo(e));const l=t5(a,n,r)?UT(a):Or(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=Vn(a),y=r&&hr(r)?Vn(r):r;let x=b,_=Bh(x);for(;_&&r&&y!==x;){const A=mo(_),S=_.getBoundingClientRect(),C=pr(_),I=S.left+(_.clientLeft+parseFloat(C.paddingLeft))*A.x,z=S.top+(_.clientTop+parseFloat(C.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=I,f+=z,x=Vn(_),_=Bh(x)}}return $l({width:p,height:m,x:d,y:f})}function Wl(e,t){const n=Yl(e).scrollLeft;return t?t.left+n:fs(Pr(e)).left+n}function HT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function n5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Pr(r),l=t?ql(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Or(1);const p=Or(0),m=Rr(r);if((m||!m&&!a)&&((ho(r)!=="body"||Fa(u))&&(d=Yl(r)),Rr(r))){const y=fs(r);f=mo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?HT(u,d):Or(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function r5(e){return Array.from(e.getClientRects())}function i5(e){const t=Pr(e),n=Yl(e),r=e.ownerDocument.body,s=Yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Wl(e);const l=-n.scrollTop;return pr(r).direction==="rtl"&&(u+=Yr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const jT=25;function s5(e,t){const n=Vn(e),r=Pr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const p=Fh();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Wl(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=jT&&(a-=x)}else f<=jT&&(a+=f);return{width:a,height:u,x:l,y:d}}const o5=new Set(["absolute","fixed"]);function a5(e,t){const n=fs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Rr(e)?mo(e):Or(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function zT(e,t,n){let r;if(t==="viewport")r=s5(e,n);else if(t==="document")r=i5(Pr(e));else if(hr(t))r=a5(t,n);else{const s=UT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return $l(r)}function $T(e,t){const n=wi(e);return n===t||!hr(n)||po(n)?!1:pr(n).position==="fixed"||$T(n,t)}function u5(e,t){const n=t.get(e);if(n)return n;let r=Ba(e,[],!1).filter(l=>hr(l)&&ho(l)!=="body"),s=null;const a=pr(e).position==="fixed";let u=a?wi(e):e;for(;hr(u)&&!po(u);){const l=pr(u),d=Mh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&o5.has(s.position)||Fa(u)&&!d&&$T(e,u))?r=r.filter(p=>p!==u):s=l,u=wi(u)}return t.set(e,r),r}function l5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?ql(t)?[]:u5(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=zT(t,p,s);return f.top=Yr(m.top,f.top),f.right=Ti(m.right,f.right),f.bottom=Ti(m.bottom,f.bottom),f.left=Yr(m.left,f.left),f},zT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c5(e){const{width:t,height:n}=BT(e);return{width:t,height:n}}function d5(e,t,n){const r=Rr(t),s=Pr(t),a=n==="fixed",u=fs(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Or(0);function f(){d.x=Wl(s)}if(r||!r&&!a)if((ho(t)!=="body"||Fa(s))&&(l=Yl(t)),r){const y=fs(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?HT(s,l):Or(0),m=u.left+l.scrollLeft-d.x-p.x,b=u.top+l.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function Hh(e){return pr(e).position==="static"}function VT(e,t){if(!Rr(e)||pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function qT(e,t){const n=Vn(e);if(ql(e))return n;if(!Rr(e)){let s=wi(e);for(;s&&!po(s);){if(hr(s)&&!Hh(s))return s;s=wi(s)}return n}let r=VT(e,t);for(;r&&KL(r)&&Hh(r);)r=VT(r,t);return r&&po(r)&&Hh(r)&&!Mh(r)?n:r||ZL(e)||n}const f5=function(e){return Be(this,null,function*(){const t=this.getOffsetParent||qT,n=this.getDimensions,r=yield n(e.floating);return{reference:d5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function h5(e){return pr(e).direction==="rtl"}const p5={convertOffsetParentRelativeRectToViewportRelativeRect:n5,getDocumentElement:Pr,getClippingRect:l5,getOffsetParent:qT,getElementRects:f5,getClientRects:r5,getDimensions:c5,getScale:mo,isElement:hr,isRTL:h5};function YT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m5(e,t){let n=null,r;const s=Pr(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(l||t(),!b||!y)return;const x=jl(m),_=jl(s.clientWidth-(p+b)),A=jl(s.clientHeight-(m+y)),S=jl(p),I={rootMargin:-x+"px "+-_+"px "+-A+"px "+-S+"px",threshold:Yr(0,Ti(1,d))||1};let z=!0;function W(D){const V=D[0].intersectionRatio;if(V!==d){if(!z)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!YT(f,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(W,le(j({},I),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(W,I)}n.observe(e)}return u(!0),a}function g5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Uh(e),p=s||a?[...f?Ba(f):[],...Ba(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?m5(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(S=>{let[C]=S;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,_=d?fs(e):null;d&&A();function A(){const S=fs(e);_&&!YT(_,S)&&n(),_=S,x=requestAnimationFrame(A)}return n(),()=>{var S;p.forEach(C=>{s&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const E5=YL,y5=WL,T5=$L,b5=XL,w5=VL,x5=zL,_5=GL,S5=(e,t,n)=>{const r=new Map,s=j({platform:p5},n),a=le(j({},s.platform),{_c:r});return jL(e,t,le(j({},s),{platform:a}))};function WT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return le(j({},s),{toJSON:()=>s})}function v5(e){if(!e)return WT();const{x:t,y:n,width:r,height:s}=e;return WT(t,n,r,s)}function A5(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?v5(r):n.getBoundingClientRect()}}}var Ua=e=>({variable:e,reference:`var(${e})`}),Gr={arrowSize:Ua("--arrow-size"),arrowSizeHalf:Ua("--arrow-size-half"),arrowBg:Ua("--arrow-background"),transformOrigin:Ua("--transform-origin"),arrowOffset:Ua("--arrow-offset")},k5=e=>e==="top"||e==="bottom"?"y":"x";function C5(e,t){return{name:"transformOrigin",fn(n){var ce,H,ie,te,ue;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=k5(d),p=((ce=s.arrow)==null?void 0:ce.x)||0,m=((H=s.arrow)==null?void 0:H.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+b/2,_=m+y/2,A=Math.abs(((ie=s.shift)==null?void 0:ie.y)||0),S=u.reference.height/2,C=y/2,I=(ue=(te=e.offset)==null?void 0:te.mainAxis)!=null?ue:e.gutter,z=typeof I=="number"?I+C:I!=null?I:C,W=A>z,D={top:`${x}px calc(100% + ${z}px)`,bottom:`${x}px ${-z}px`,left:`calc(100% + ${z}px) ${_}px`,right:`${-z}px ${_}px`}[d],V=`${x}px ${u.reference.y+S-l}px`,ee=!!e.overlap&&f==="y"&&W;return r.floating.style.setProperty(Gr.transformOrigin.variable,ee?V:D),{data:{transformOrigin:ee?V:D}}}}}var N5={name:"rects",fn({rects:e}){return{data:e}}},O5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${Gr.arrowOffset.reference})`}),{}}}};function I5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var P5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function GT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function jh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function R5(e,t,n){const r=e||t.createElement("div");return x5({element:r,padding:n.arrowPadding})}function L5(e,t){var n;if(!e4((n=t.offset)!=null?n:t.gutter))return E5(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=I5(r),d=l?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return mh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function D5(e){if(!e.flip)return;const t=jh(e.boundary);return T5(le(j({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function M5(e){if(!e.slide&&!e.overlap)return;const t=jh(e.boundary);return y5(le(j({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_5()}))}function F5(e){return b5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),l=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${l}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function B5(e){var t;if(e.hideWhenDetached)return w5({strategy:"referenceHidden",boundary:(t=jh(e.boundary))!=null?t:"clippingAncestors"})}function U5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function H5(e,t,n={}){const r=A5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},P5,n),a=t.querySelector("[data-part=arrow]"),u=[L5(a,s),D5(s),M5(s),R5(a,t.ownerDocument,s),O5(a),C5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),F5(s),B5(s),N5],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Be(null,null,function*(){var z;if(!r||!t)return;const _=yield S5(r,t,{placement:l,middleware:u,strategy:d});f==null||f(_),p==null||p({placed:!0});const A=ro(t),S=GT(A,_.x),C=GT(A,_.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${C}px`),s.hideWhenDetached&&(((z=_.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const W=so(I);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>Be(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=U5(s.listeners),x=s.listeners?g5(r,t,b,y):l4;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function XT(e,t,n={}){const l=n,{defer:r}=l,s=vn(l,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(H5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var j5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function z5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:Gr.arrowSize.reference,height:Gr.arrowSize.reference,[Gr.arrowSizeHalf.variable]:`calc(${Gr.arrowSize.reference} / 2)`,[Gr.arrowOffset.variable]:`calc(${Gr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?j5[t.split("-")[0]]:void 0,background:Gr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var go=new WeakMap,Gl=new WeakMap,Xl={},zh=0,KT=e=>e&&(e.host||KT(e.parentNode)),$5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=KT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),V5=new Set(["script","output","status","next-route-announcer"]),q5=e=>V5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Y5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=$5(n,Array.isArray(e)?e:[e]);Xl[r]||(Xl[r]=new WeakMap);const l=Xl[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Jt(y)&&uT(y,x=>{m(x)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))b(x);else try{if(q5(x))return;const A=x.getAttribute(s)==="true",S=(go.get(x)||0)+1,C=(l.get(x)||0)+1;go.set(x,S),l.set(x,C),d.push(x),S===1&&A&&Gl.set(x,!0),C===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(_){console.error("[zag-js > ariaHidden] cannot operate on ",x,_)}})};return b(n),f.clear(),zh++,()=>{d.forEach(y=>{const x=go.get(y)-1,_=l.get(y)-1;go.set(y,x),l.set(y,_),x||(Gl.has(y)||y.removeAttribute(s),Gl.delete(y)),_||y.removeAttribute(r)}),zh--,zh||(go=new WeakMap,go=new WeakMap,Gl=new WeakMap,Xl={})}},W5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,G5=(e,t=W5(e),n="data-aria-hidden",r=!0)=>{if(t)return Y5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},X5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function QT(e,t={}){const{defer:n=!0}=t,r=n?X5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(G5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function K5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function Q5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var JT="pointerdown.outside",ZT="focus.outside";function J5(e){for(const t of e)if(Jt(t)&&Nr(t))return!0;return!1}var eb=e=>"clientY"in e;function Z5(e,t){if(!eb(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function eD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function tb(e,t){if(!t||!eb(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},l={x:e.clientX,y:e.clientY};return eD(u,l)?r||a:!1}function tD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Cr(e),f=ro(e),p=K5(f),m=Q5(f);function b(I,z){if(!Jt(z)||!z.isConnected||no(e,z)||Z5(e,I)||l&&aT(e,z))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const V=Sh(W);if(tb(I,V))return!1}const D=Sh(e);return tb(I,D)?!1:!(n!=null&&n(z))}const y=new Set,x=as(e==null?void 0:e.getRootNode());function _(I){function z(W){var ce,H;const D=u&&!lT()?qt:ie=>ie(),V=W!=null?W:I,ee=(H=(ce=V==null?void 0:V.composedPath)==null?void 0:ce.call(V))!=null?H:[V==null?void 0:V.target];D(()=>{const ie=x?ee[0]:fr(I);if(!(!e||!b(I,ie))){if(s||a){const te=ph(s,a);e.addEventListener(JT,te,{once:!0})}nb(e,JT,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:V4(V),focusable:J5(ee),target:ie}})}})}I.pointerType==="touch"?(y.forEach(W=>W()),y.add(Zt(d,"click",z,{once:!0})),y.add(m.addEventListener("click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0}))):z()}const A=new Set,S=setTimeout(()=>{A.add(Zt(d,"pointerdown",_,!0)),A.add(m.addEventListener("pointerdown",_,!0)),A.add(p.addEventListener("pointerdown",_,!0))},0);function C(I){(u?qt:W=>W())(()=>{var V,ee;const W=(ee=(V=I==null?void 0:I.composedPath)==null?void 0:V.call(I))!=null?ee:[I==null?void 0:I.target],D=x?W[0]:fr(I);if(!(!e||!b(I,D))){if(r||a){const ce=ph(r,a);e.addEventListener(ZT,ce,{once:!0})}nb(e,ZT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Nr(D),target:D}})}})}return lT()||(A.add(Zt(d,"focusin",C,!0)),A.add(m.addEventListener("focusin",C,!0)),A.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(S),y.forEach(I=>I()),A.forEach(I=>I())}}function nD(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(tD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function nb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function rD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(Cr(e),"keydown",n,{capture:!0})}var rb="layer:request-dismiss",Jn={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>no(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>no(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>Jn.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];sD(e,rb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),iD(e,rb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iD(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function sD(e,t,n){e.addEventListener(t,n,{once:!0})}var ib;function sb(){Jn.layers.forEach(({node:e})=>{e.style.pointerEvents=Jn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function oD(e){e.style.pointerEvents=""}function aD(e,t){const n=Cr(e),r=[];return Jn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(ib=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=hL(()=>{const l=s();return Jt(l)?l:null},{timeout:1e3});a.then(l=>r.push(Dl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{Jn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=ib,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function uD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){gh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Jn.add(f),sb();function p(_){var S,C;const A=fr(_.detail.originalEvent);Jn.isBelowPointerBlockingLayer(e)||Jn.isInBranch(A)||((S=t.onPointerDownOutside)==null||S.call(t,_),(C=t.onInteractOutside)==null||C.call(t,_),!_.defaultPrevented&&(l&&console.log("onPointerDownOutside:",_.detail.originalEvent),r==null||r()))}function m(_){var S,C;const A=fr(_.detail.originalEvent);Jn.isInBranch(A)||((S=t.onFocusOutside)==null||S.call(t,_),(C=t.onInteractOutside)==null||C.call(t,_),!_.defaultPrevented&&(l&&console.log("onFocusOutside:",_.detail.originalEvent),r==null||r()))}function b(_){var A;Jn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,_),!_.defaultPrevented&&r&&(_.preventDefault(),r()))}function y(_){var I;if(!e)return!1;const A=typeof u=="function"?u():u,S=Array.isArray(A)?A:[A],C=(I=t.persistentElements)==null?void 0:I.map(z=>z()).filter(Jt);return C&&S.push(...C),S.some(z=>no(z,_))||Jn.isInNestedLayer(e,_)}const x=[a?aD(e,t.persistentElements):void 0,rD(e,b),nD(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{Jn.remove(e),sb(),oD(e),x.forEach(_=>_==null?void 0:_())}}function ob(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=eo(e)?e():e;s.push(uD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var lD=Object.defineProperty,cD=(e,t,n)=>t in e?lD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>cD(e,typeof t!="symbol"?t+"":t,n),ab={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},dD=[],fD=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const s=fr(r),a=this.findContainerIndex(s,r)>=0;if(a||Il(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(La(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>La(f)>0))||(l=!1);else l=!1;l&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const s=fr(r);if(!(this.findContainerIndex(s,r)>=0)){if(ja(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ja(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const s=fr(r);this.findContainerIndex(s,r)>=0||ja(this.config.clickOutsideDeactivates,r)||ja(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Ha(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{hD(r)&&ja(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return D4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?M4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Nr(r)){const s=io(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,pD(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const s=j({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),ab.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),l=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{ub(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),Ct(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),Ct(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),Ct(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||fr(s);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Nr(u)&&!us(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];l=La(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Ha(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Nr(u)&&!us(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];l=La(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Ha(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||dD;const n=j({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ha(r)&&!r.shiftKey},isKeyBackward(r){return Ha(r)&&r.shiftKey}},t);this.doc=n.document||Cr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{P4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?aT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=oo(e,{getShadowRoot:this.config.getShadowRoot}),n=gT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let l=!1;for(let f=0;f<t.length;f++)if(La(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(us(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(us(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return ab.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ub(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Zt(this.doc,"focusin",this.handleFocus,!0),Zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=io(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Ha=e=>e.key==="Tab",ja=(e,...t)=>typeof e=="function"?e(...t):e,hD=e=>!e.isComposing&&e.key==="Escape",ub=e=>setTimeout(e,0),pD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function lb(e,t={}){let n;const r=qt(()=>{const s=typeof e=="function"?e():e;if(s){n=new fD(s,le(j({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Cr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var $h="data-scroll-lock";function mD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function cb(e){const t=so(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function db(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute($h))return;const u=cb(r)||cb(s),l=n.innerWidth-r.clientWidth;s.setAttribute($h,"");const d=()=>dL(r,"--scrollbar-width",`${l}px`),f=mD(r),p=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),Dl(s,x)},m=()=>{var W,D;const{scrollX:x,scrollY:_,visualViewport:A}=n,S=(W=A==null?void 0:A.offsetLeft)!=null?W:0,C=(D=A==null?void 0:A.offsetTop)!=null?D:0,I={position:"fixed",overflow:"hidden",top:`${-(_-Math.floor(C))}px`,left:`${-(x-Math.floor(S))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const z=Dl(s,I);return()=>{z==null||z(),n.scrollTo({left:x,top:_,behavior:"instant"})}},b=[d(),Pl()?m():p()];return()=>{b.forEach(x=>x==null?void 0:x()),s.removeAttribute($h)}}var gD=cs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Lr=gD.build(),fb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},hb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Vh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},ED=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Yh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},yD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},mb=e=>e.getById(fb(e)),Eo=e=>e.getById(hb(e)),yo=e=>e.getById(Vh(e)),gb=e=>e.getById(pb(e)),TD=e=>e.getById(qh(e)),bD=e=>e.getById(Yh(e));function wD(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=z5(le(j({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(le(j({id:ED(l)},Lr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(le(j({},Lr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(le(j({},Lr.anchor.attrs),{dir:u("dir"),id:fb(l)}))},getTriggerProps(){return t.button(le(j({},Lr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:hb(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Vh(l),onPointerDown(y){cT(y)&&z4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(le(j({},Lr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(j({id:pb(l)},Lr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(le(j({},Lr.content.attrs),{dir:u("dir"),id:Vh(l),tabIndex:-1,role:"dialog","aria-modal":iT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":to(d),"aria-labelledby":m.title?qh(l):void 0,"aria-describedby":m.description?Yh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(le(j({},Lr.title.attrs),{id:qh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(le(j({},Lr.description.attrs),{id:Yh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(le(j({},Lr.closeTrigger.attrs),{dir:u("dir"),id:yD(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var xD={props({props:e}){return le(j({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:j({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=mb(n))!=null?a:Eo(n);return XT(r,()=>gb(n),le(j({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>yo(n);let s=!0;return ob(r,{type:"popover",pointerBlocking:t("modal"),exclude:Eo(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:lL(()=>yo(t),{triggerElement:Eo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?QT(()=>[yo(t),Eo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return db(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?lb(()=>yo(t),{initialFocus:()=>ET({root:yo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=mb(n))!=null?u:Eo(n);XT(s,()=>gb(n),le(j(j({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!TD(t),description:!!bD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=ET({root:yo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||qt(()=>{const a=Eo(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};lo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[PU,Kl]=ls({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[RU,Wh]=ls({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),_D=e=>{const t=R.useId(),{getRootNode:n}=Kl(),{dir:r}=Wh(),s=j({id:t,dir:r,getRootNode:n},e),a=Fl(xD,s);return wD(a,kh)},SD=e=>{const[t,u]=AT(e),l=u,{children:n}=l,r=vn(l,["children"]),s=_D(r),a=Oh(Yt({present:s.open},t));return w.jsx(SL,{value:s,children:w.jsx(_T,{value:a,children:n})})},Eb=R.forwardRef((e,t)=>{const n=Nh(),r=Da(),s=Yt(le(j({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(hn.button,le(j({},s),{ref:t}))});Eb.displayName="PopoverTrigger";function vD(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function AD(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function yb(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function Tb(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function kD(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function CD(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function Gh(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function bb(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const ND=({className:e,componentType:t,children:n})=>{const[r,s]=R.useState(!1),{globalClassName:a}=ft(),u=f=>{s(f.open)},l=R.useCallback(()=>{s(!1)},[]),d=R.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(SD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(Eb,{"aria-label":`Overflow menu for ${t}`,className:B(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(bb,{})}),w.jsx(vT,{children:w.jsx(ST,{className:B(`${N}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(Ky.Provider,{value:d,children:n})})})]})};function wb(e){return ht({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function xb(e){return ht({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[OD,hs]=ls({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Xh=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getControlProps(),e);return w.jsx(hn.div,le(j(j({},r),e),{ref:t}))});Xh.displayName="CarouselControl";const Kh=R.forwardRef((e,t)=>{const[n,r]=Ma()(e,["readOnly","index"]),s=hs(),a=Yt(s.getIndicatorProps(n),r);return w.jsx(hn.button,le(j({},a),{ref:t}))});Kh.displayName="CarouselIndicator";const Qh=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getIndicatorGroupProps(),e);return w.jsx(hn.div,le(j({},r),{ref:t}))});Qh.displayName="CarouselIndicatorGroup";const Jh=R.forwardRef((e,t)=>{const[n,r]=Ma()(e,["index","snapAlign"]),s=hs(),a=Yt(s.getItemProps(n),r);return w.jsx(hn.div,le(j({},a),{ref:t}))});Jh.displayName="CarouselItem";const Zh=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getItemGroupProps(),e);return w.jsx(hn.div,le(j({},r),{ref:t}))});Zh.displayName="CarouselItemGroup";const ep=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getNextTriggerProps(),e);return w.jsx(hn.button,le(j({},r),{ref:t}))});ep.displayName="CarouselNextTrigger";const tp=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getPrevTriggerProps(),e);return w.jsx(hn.button,le(j({},r),{ref:t}))});tp.displayName="CarouselPrevTrigger";function ID(e){const t=so(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function l(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function PD(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function _b(e){let t=[];for(const n of e.children)t=t.concat(n,_b(n));return t}function Sb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?_b(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!PD(n,m,u))continue;const b=so(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const _=a==="x"?x:y,A=m[l]-n[l]+e[f];switch(_){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function vb(e){const t=e.getBoundingClientRect(),n=ID(e),r=Sb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Ab([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(kb(0,s.x))),y:Ab([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(kb(0,s.y)))}}function RD(e,t,n){const r=Sb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Ab=e=>[...new Set(e)],kb=(e,t)=>n=>Math.max(e,Math.min(t,n)),LD=cs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Xr=LD.build(),DD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},MD=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},Ql=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},FD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},BD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},UD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Cb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Pn=e=>e.getById(Ql(e)),Nb=e=>cL(Pn(e),"[data-part=item]"),HD=(e,t)=>e.getById(Cb(e,t)),Ob=e=>{const t=Pn(e);if(!t)return;const n=oo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function jD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),_=l("slidesPerPage"),A=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(C,I){a({type:"INDEX.SET",index:C,instant:I})},scrollTo(C,I){a({type:"PAGE.SET",index:C,instant:I})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(le(j({},Xr.root.attrs),{id:DD(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":_,"--slide-spacing":l("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(le(j({},Xr.itemGroup.attrs),{id:Ql(u),"data-orientation":l("orientation"),"data-dragging":to(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){no(C.currentTarget,fr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){no(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!cT(C))return;const I=fr(C);Nr(I)&&I!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:c4(C=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";C[I]<0&&!s("canScrollPrev")||C[I]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",l("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const I=r.get("slidesInView").includes(C.index);return t.element(le(j({},Xr.item.attrs),{id:MD(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":to(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(C.index,l("slideCount")),"aria-hidden":iT(!I),style:{scrollSnapAlign:(()=>{var ee;const z=(ee=C.snapAlign)!=null?ee:"start",W=l("slidesPerMove"),D=W==="auto"?Math.floor(l("slidesPerPage")):W;return(C.index+D)%D===0?z:void 0})()}}))},getControlProps(){return t.element(le(j({},Xr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(le(j({},Xr.prevTrigger.attrs),{id:BD(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Ql(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(le(j({},Xr.nextTrigger.attrs),{dir:l("dir"),id:FD(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Ql(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(le(j({},Xr.indicatorGroup.attrs),{dir:l("dir"),id:UD(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const I="indicator",z={ArrowDown(V){b||(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowUp(V){b||(a({type:"PAGE.PREV",src:I}),V.preventDefault())},ArrowRight(V){b&&(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowLeft(V){b&&(a({type:"PAGE.PREV",src:I}),V.preventDefault())},Home(V){a({type:"PAGE.SET",index:0,src:I}),V.preventDefault()},End(V){a({type:"PAGE.SET",index:y.length-1,src:I}),V.preventDefault()}},W=W4(C,{dir:l("dir"),orientation:l("orientation")}),D=z[W];D==null||D(C)}}))},getIndicatorProps(C){return t.button(le(j({},Xr.indicator.attrs),{dir:l("dir"),id:Cb(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":to(C.readOnly),"data-current":to(C.index===x),"aria-label":S.indicator(C.index),onClick(I){I.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(le(j({},Xr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":to(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var zD={props({props:e}){return g4(e,["slideCount"],"carousel"),le(j({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:j({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:$D(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return Z6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Pn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Pn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Ob(e)});return Ob(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Pn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{s(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Nb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Pn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?G6(d,m):X6(d,m)},n.get("slidesInView"));n.set("slidesInView",K6(l))},{root:r,threshold:t("inViewThreshold")});return Nb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Pn(n);return r?Zt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return aL(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Zt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=nT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Pn(n);if(!l)return;const d=r("isHorizontal")?"left":"top";s(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Pn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Zy(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Q6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Pn(r);if(!s)return;const a=RD(s,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=nT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Pn(n);if(!r)return;const s=vb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Pn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Pn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Pn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=vb(r),l=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);qt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=HD(n,e.get("page"));r&&qt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function $D(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}lo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),lo()(["index","readOnly"]),lo()(["index","snapAlign"]);const VD=e=>{const t=R.useId(),{getRootNode:n}=Kl(),{dir:r}=Wh(),s=j({id:t,dir:r,getRootNode:n},e),a=Fl(zD,s);return jD(a,kh)},np=R.forwardRef((e,t)=>{const[n,r]=Ma()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=VD(n),a=Yt(s.getRootProps(),r);return w.jsx(OD,{value:s,children:w.jsx(hn.div,le(j({},a),{ref:t}))})});np.displayName="CarouselRoot";const qD=180,YD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},WD=({globalClassName:e,className:t,itemMinWidth:n=qD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ee,ce)=>({node:ee,key:R.isValidElement(ee)&&ee.key!=null?ee.key:`carousel-item-${ce}`})),b=m.length,y=R.useRef(null),[x,_]=R.useState(0),{width:A}=qS();R.useLayoutEffect(()=>{y.current&&_(y.current.getBoundingClientRect().width)},[A,b]);const S=YD(r),C=n+S,I=x>0?(x+S)/C:1,z=Math.max(1,Math.floor(I));if(b===0)return null;const W=b>z,D=Math.ceil(b/z),V=W?Math.max(1,I):z;return w.jsxs(np,{ref:y,className:B(e,t,`${N}-carousel`),slidesPerPage:V,slidesPerMove:z,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[w.jsx(Zh,{className:B(e,`${N}-carousel__item-group`,{"carousel-row-container":!W}),children:m.map(({node:ee,key:ce},H)=>w.jsx(Jh,{index:H,className:B(e,`${N}-carousel__item`),children:ee},ce))}),l&&W&&w.jsxs(Xh,{className:B(e,`${N}-carousel__control`),children:[w.jsx(tp,{className:B(e,`${N}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(yb,{size:"16px"})}),w.jsx(ep,{className:B(e,`${N}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Tb,{size:"16px"})})]}),u&&W&&w.jsx(Qh,{className:B(e,`${N}-carousel__indicator-group`),children:Array.from({length:D},(ee,ce)=>w.jsx(Kh,{index:ce,className:B(e,`${N}-carousel__indicator`),"aria-label":`Go to slide group ${ce+1}`},ce))})]})},GD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:B(e,`${N}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[XD,KD]=ls({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),QD=e=>Ma()(e,["lazyMount","unmountOnExit"]),[JD,za]=ls({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Ib=R.forwardRef((e,t)=>{const n=za(),r=KD(),s=Oh(le(j({},r),{present:n.open})),a=Yt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(hn.div,le(j({},a),{ref:Bl(s.ref,t)}))});Ib.displayName="DialogBackdrop";const rp=R.forwardRef((e,t)=>{const n=za(),r=Da(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(hn.div,le(j({},s),{ref:Bl(r.ref,t)}))});rp.displayName="DialogContent";const ip=R.forwardRef((e,t)=>{const n=za(),r=Yt(n.getDescriptionProps(),e);return w.jsx(hn.div,le(j({},r),{ref:t}))});ip.displayName="DialogDescription";const sp=R.forwardRef((e,t)=>{const n=za(),r=Yt(n.getPositionerProps(),e);return Da().unmounted?null:w.jsx(hn.div,le(j({},r),{ref:t}))});sp.displayName="DialogPositioner";var ZD=cs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ps=ZD.build(),Pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Rb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Db=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Jl=e=>e.getById(op(e)),e8=e=>e.getById(Pb(e)),t8=e=>e.getById(Rb(e)),n8=e=>e.getById(Lb(e)),r8=e=>e.getById(ap(e)),i8=e=>e.getById(up(e)),s8=e=>e.getById(Db(e));function o8(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,l=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(le(j({},ps.trigger.attrs),{dir:a("dir"),id:Lb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":op(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(le(j({},ps.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Rb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(j({},ps.positioner.attrs),{dir:a("dir"),id:Pb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(le(j({},ps.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:op(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:ap(u),"aria-describedby":f.description?up(u):void 0}))},getTitleProps(){return t.element(le(j({},ps.title.attrs),{dir:a("dir"),id:ap(u)}))},getDescriptionProps(){return t.element(le(j({},ps.description.attrs),{dir:a("dir"),id:up(u)}))},getCloseTriggerProps(){return t.button(le(j({},ps.closeTrigger.attrs),{dir:a("dir"),id:Db(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var a8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>s8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return j({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return ob(()=>Jl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[n8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return db(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?lb(()=>Jl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?QT(()=>[Jl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!r8(t),description:!!i8(t)})})},syncZIndex({scope:e}){qt(()=>{const t=Jl(e);if(!t)return;const n=so(t);[e8(e),t8(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};lo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const u8=e=>{const t=R.useId(),{getRootNode:n}=Kl(),{dir:r}=Wh(),s=j({id:t,getRootNode:n,dir:r},e),a=Fl(a8,s);return o8(a,kh)},Mb=e=>{const[t,l]=AT(e),d=l,{children:n}=d,r=vn(d,["children"]),[s]=QD(t),a=u8(r),u=Oh(Yt({present:a.open},t));return w.jsx(JD,{value:a,children:w.jsx(XD,{value:s,children:w.jsx(_T,{value:u,children:n})})})},Fb=R.forwardRef((e,t)=>{const n=za(),r=Yt(n.getTitleProps(),e);return w.jsx(hn.h2,le(j({},r),{ref:t}))});Fb.displayName="DialogTitle";const l8=({children:e})=>{const[t,n]=R.useState(!1),r=R.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=R.useMemo(()=>({isOpen:t}),[t]);return w.jsx(hh.Provider,{value:r,children:w.jsx(Xy.Provider,{value:s,children:e})})},Bb=()=>R.useContext(Xy),Ub=()=>{const e=R.useContext(hh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},c8=`${N}-overflow-menu-button-trigger`,d8=({componentType:e,children:t})=>{const{isOpen:n}=Bb(),{closeMenu:r}=Ub(),{globalClassName:s}=ft(),a=R.useRef(null);return R.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${c8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",l)}},[n,r]),n?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:B(`${N}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},f8=({componentType:e,className:t})=>{const{toggleMenu:n}=Ub(),{isOpen:r}=Bb(),{globalClassName:s}=ft();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:B(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(bb,{})})};class h8{constructor(){Qe(this,"initialState",Jg);Qe(this,"promptsStateProxy");Qe(this,"promptsParamsProxy");Qe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Qe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return g8(n,r),Reflect.set(t,n,r)});Qe(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Qe(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Qe(this,"updatePromptsParamsProxy",t=>new Proxy(j({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const xi=new h8,p8=e=>{window.addEventListener(Pd,e)},m8=e=>{window.removeEventListener(Pd,e)},g8=(e,t)=>{const n=new CustomEvent(Pd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Hb=e=>{const t=xi.isOpen,n=typeof e=="boolean"?e:!t;xi.promptsStateProxy.isOpen=n},E8=e=>{const t=xi.isInline,n=typeof e=="boolean"?e:!t;xi.promptsStateProxy.isInline=n},y8=({elementId:e,entryType:t,params:n,isInline:r})=>{xi.promptsStateProxy.elementId=e,t&&(xi.promptsStateProxy.entryType=t),typeof r=="boolean"&&E8(r),n&&xi.updatePromptsParamsProxy(n),xi.isOpen||Hb(!0)},T8=()=>{const e=R.useContext(t1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},b8=()=>{const e=R.useContext(e1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Zl=()=>{const e=R.useContext(Zg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},w8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{previousComponentType:r}=Vr(),s=Zs(),a=()=>{Mu(r||"dialog"),s()};return t?w.jsx(lr,{className:B(n,`${N}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(wb,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(wb,{}),"Show ",r||"dialog"]})},x8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{isModalFullscreen:r}=Vr(),s=Zs(),a=()=>{Ld(!r),s()},u=r?yC:TC,l="Toggle Fullscreen";return t?w.jsx(lr,{ariaLabel:l,title:l,className:B(n,`${N}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},_8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),{dialogPosition:r}=Vr(),s=Zs(),a=r==="bottom-left",u=()=>{Dd(a?"bottom-right":"bottom-left"),s()},l=a?AD:vD,d=a?"Move right":"Move left";return t?w.jsx(lr,{className:B(n,`${N}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},jb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=ft(),{mode:d}=Vr(),f=u==="messaging"&&l&&!!r,p=d==="standalone",m=e==="modal",b=m?w8:Vb,y=m?x8:_8,x=R.useMemo(()=>s?fC(s):{},[s]);return w.jsx(l8,{children:w.jsxs("div",{className:B(a,`${N}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:B(a,`${N}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:B(a,`${N}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),w.jsx(Fb,{className:B(a,`${N}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),w.jsxs("div",{className:B(a,`${N}-${e}-controls`),children:[w.jsx(b,{componentType:e,isIcon:!0}),w.jsx(f8,{componentType:e}),w.jsx(GD,{className:B(a,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(d8,{componentType:e,children:[w.jsx(y,{componentType:e}),w.jsx(C8,{componentType:e}),w.jsx(Qy,{componentType:e,onClearChat:t}),f&&w.jsx(Jy,{componentType:e,onDownloadTranscript:r})]})]})})},ec="USD",Kr=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},S8=({retailPrice:e,discountPrice:t,currencyCode:n=ec})=>{const r=n||ec,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Kr(a,r),comparePrice:Kr(u,r),hasDiscount:s}},zb=e=>typeof e=="number"&&Number.isFinite(e),v8=({priceBreakdown:e,currencyCode:t=ec})=>{if(!e)return null;const n=t||ec,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(zb),a=r.map(p=>p==null?void 0:p.max).filter(zb);if(s.length===0||a.length===0)return null;const u=Math.min(...s),l=Math.max(...a);if(u===l)return null;const d=Kr(u,n),f=Kr(l,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},lp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=S8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:B(s,a,`${N}-price`),style:f,children:[w.jsx("span",{className:B(s,`${N}-price__amount`),children:u}),d&&l&&w.jsx("span",{className:B(s,`${N}-price__compare`),children:l})]})},A8={sparkle:Gh,plus:kD,"paper-plane":CD},$b=({icon:e,className:t})=>{const n=A8[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},k8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ft(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},b=x=>w.jsxs(w.Fragment,{children:[l&&w.jsx($b,{icon:l,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:x})]});return w.jsx("div",{className:B(t,`${N}-suggestion-container ${f}`,e),children:n.map(x=>s?w.jsx(yf,{disabled:r,className:B(t,`${N}-suggestion-button standalone`,m),onClick:p(x),children:b(x)},x):w.jsx("button",{disabled:r,className:B(t,`${N}-suggestion-button embedded`,m),onClick:p(x),children:b(x)},x))})},C8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ft();if(!r)return null;const s=()=>{$r(!1),Du(!0)};return t?w.jsx(lr,{className:B(n,`${N}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(p1,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(p1,{}),"Minimize"]})},Vb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ft(),r=Zs(),s=()=>{Mu("modal"),r()};return t?w.jsx(lr,{className:B(n,`${N}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(xb,{})}):w.jsxs("button",{className:B(n,`${N}-overflow-menu-button`,`${N}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(xb,{}),"Show modal"]})},N8=["Hey there! 👋 What can I find for you today?","Shopping for a gift? Tell me your budget and preferences","Need help? Connect to an agent"],O8=3e3,I8=400,P8=({globalClassName:e,isWidgetStandalone:t,messages:n=N8})=>{const[r,s]=R.useState(0),[a,u]=R.useState(!0);return R.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},I8)},O8);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:B(e,`${N}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${N}-connecting-pulse-wrapper`,children:[w.jsx("div",{className:`${N}-connecting-pulse`}),w.jsx("div",{className:`${N}-connecting-ring`})]}),w.jsx("span",{className:B(`${N}-connecting-text`,a&&`${N}-connecting-text--visible`),children:n[r]})]})},R8=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${N}-processing-text`,children:t}):null,L8=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`})]}):null,cp=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:B(e,`${N}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(R8,{shouldShow:!!n,loadingText:n}),w.jsx(L8,{shouldShow:!n})]});function qb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function D8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function M8(e,t,n){const s=ml((n||{}).ignore||[]),a=F8(t);let u=-1;for(;++u<a.length;)NE(e,"text",l);function l(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],x=b?b.children:void 0;if(s(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let x=0;const A=m.children.indexOf(f);let S=!1,C=[];b.lastIndex=0;let I=b.exec(f.value);for(;I;){const z=I.index,W={index:I.index,input:I.input,stack:[...p,f]};let D=y(...I,W);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=z+1:(x!==z&&C.push({type:"text",value:f.value.slice(x,z)}),Array.isArray(D)?C.push(...D):D&&C.push(D),x=z+I[0].length,S=!0),!b.global)break;I=b.exec(f.value)}return S?(x<f.value.length&&C.push({type:"text",value:f.value.slice(x)}),m.children.splice(A,1,...C)):C=[f],A+C.length}}function F8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([B8(s[0]),U8(s[1])])}return t}function B8(e){return typeof e=="string"?new RegExp(D8(e),"g"):e}function U8(e){return typeof e=="function"?e:function(){return e}}const dp="phrasing",fp=["autolink","link","image","label"];function H8(){return{transforms:[W8],enter:{literalAutolink:z8,literalAutolinkEmail:hp,literalAutolinkHttp:hp,literalAutolinkWww:hp},exit:{literalAutolink:Y8,literalAutolinkEmail:q8,literalAutolinkHttp:$8,literalAutolinkWww:V8}}}function j8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dp,notInConstruct:fp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dp,notInConstruct:fp},{character:":",before:"[ps]",after:"\\/",inConstruct:dp,notInConstruct:fp}]}}function z8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hp(e){this.config.enter.autolinkProtocol.call(this,e)}function $8(e){this.config.exit.autolinkProtocol.call(this,e)}function V8(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function q8(e){this.config.exit.autolinkEmail.call(this,e)}function Y8(e){this.exit(e)}function W8(e){M8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,G8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),X8]],{ignore:["link","linkReference"]})}function G8(e,t,n,r,s){let a="";if(!Yb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!K8(n)))return!1;const u=Q8(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function X8(e,t,n,r){return!Yb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function K8(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Q8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=qb(e,"(");let a=qb(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Yb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||es(n)||ul(n))&&(!t||n!==47)}Wb.peek=oM;function J8(){this.buffer()}function Z8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function eM(){this.buffer()}function tM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function nM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rM(e){this.exit(e)}function iM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sM(e){this.exit(e)}function oM(){return"["}function Wb(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=s.move("]"),a}function aM(){return{enter:{gfmFootnoteCallString:J8,gfmFootnoteCall:Z8,gfmFootnoteDefinitionLabelString:eM,gfmFootnoteDefinition:tM},exit:{gfmFootnoteCallString:nM,gfmFootnoteCall:rM,gfmFootnoteDefinitionLabelString:iM,gfmFootnoteDefinition:sM}}}function uM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Wb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
38
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Gb:lM))),f(),d}}function lM(e,t,n){return t===0?e:Gb(e,t,n)}function Gb(e,t,n){return(n?"":" ")+e}const cM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xb.peek=mM;function dM(){return{canContainEols:["delete"],enter:{strikethrough:hM},exit:{strikethrough:pM}}}function fM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:cM}],handlers:{delete:Xb}}}function hM(e){this.enter({type:"delete",children:[]},e)}function pM(e){this.exit(e)}function Xb(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,le(j({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function mM(){return"~"}function gM(e){return e.length}function EM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||gM,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const _=[],A=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const C=yM(e[p][S]);if(n.alignDelimiters!==!1){const I=s(C);A[S]=I,(d[S]===void 0||I>d[S])&&(d[S]=I)}_.push(C)}u[p]=_,l[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Kb(r[m]);else{const _=Kb(r);for(;++m<f;)a[m]=_}m=-1;const b=[],y=[];for(;++m<f;){const _=a[m];let A="",S="";_===99?(A=":",S=":"):_===108?A=":":_===114&&(S=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-S.length);const I=A+"-".repeat(C)+S;n.alignDelimiters!==!1&&(C=A.length+C+S.length,C>d[m]&&(d[m]=C),y[m]=C),b[m]=I}u.splice(1,0,b),l.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const _=u[p],A=l[p];m=-1;const S=[];for(;++m<f;){const C=_[m]||"";let I="",z="";if(n.alignDelimiters!==!1){const W=d[m]-(A[m]||0),D=a[m];D===114?I=" ".repeat(W):D===99?W%2?(I=" ".repeat(W/2+.5),z=" ".repeat(W/2-.5)):(I=" ".repeat(W/2),z=I):z=" ".repeat(W)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(I),S.push(C),n.alignDelimiters!==!1&&S.push(z),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}x.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return x.join(`
39
+ `)}function yM(e){return e==null?"":String(e)}function Kb(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function TM(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),bM);return s(),u}function bM(e,t,n){return">"+(n?"":" ")+e}function wM(e,t){return Qb(e,t.inConstruct,!0)&&!Qb(e,t.notInConstruct,!1)}function Qb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Jb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
+ `&&wM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
+ `}function xM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function _M(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function SM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function vM(e,t,n,r){const s=SM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(_M(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,AM);return m(),b}const l=n.createTracker(r),d=s.repeat(Math.max(xM(a,s)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,j({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,j({before:p,after:`
42
42
  `,encode:["`"]},l.current()))),m()}return p+=l.move(`
43
43
  `),a&&(p+=l.move(a+`
44
- `)),p+=l.move(d),f(),p}function xM(e,t,n){return(n?"":" ")+e}function hp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _M(e,t,n,r){const s=hp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),j({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,j({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,j({before:f,after:e.title?" ":`
45
- `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,j({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function SM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function za(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ec(e,t,n){const r=Vs(e),s=Vs(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Kb.peek=vM;function Kb(e,t,n,r){const s=SM(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(s);let d=u.move(n.containerPhrasing(e,j({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=ec(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=za(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=ec(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+za(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},l+d+y}function vM(e,t,n){return n.options.emphasis||"*"}function AM(e,t){let n=!1;return gl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Uf}),!!((!e.depth||e.depth<3)&&kf(e)&&(t.options.setext||n))}function CM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(AM(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,le(j({},a.current()),{before:`
44
+ `)),p+=l.move(d),f(),p}function AM(e,t,n){return(n?"":" ")+e}function pp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function kM(e,t,n,r){const s=pp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),j({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,j({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,j({before:f,after:e.title?" ":`
45
+ `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,j({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function CM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $a(e){return"&#x"+e.toString(16).toUpperCase()+";"}function tc(e,t,n){const r=Ws(e),s=Ws(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Zb.peek=NM;function Zb(e,t,n,r){const s=CM(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(s);let d=u.move(n.containerPhrasing(e,j({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=tc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=$a(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=tc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+$a(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},l+d+y}function NM(e,t,n){return n.options.emphasis||"*"}function OM(e,t){let n=!1;return El(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Hf}),!!((!e.depth||e.depth<3)&&Nf(e)&&(t.options.setext||n))}function IM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(OM(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,le(j({},a.current()),{before:`
46
46
  `,after:`
47
47
  `}));return m(),p(),b+`
48
48
  `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
49
49
  `))+1))}const u="#".repeat(s),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,j({before:"# ",after:`
50
- `},a.current()));return/^[\t ]/.test(f)&&(f=za(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Jb.peek=kM;function Jb(e){return e.value||""}function kM(){return"<"}Zb.peek=NM;function Zb(e,t,n,r){const s=hp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,j({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,j({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,j({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,j({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function NM(){return"!"}ew.peek=OM;function ew(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");const f=n.safe(e.alt,j({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),j({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function OM(){return"!"}tw.peek=IM;function tw(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],l=n.compilePattern(u);let d;if(u.atBreak)for(;d=l.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function IM(){return"`"}function nw(e,t){const n=kf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}rw.peek=PM;function rw(e,t,n,r){const s=hp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(nw(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,j({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,j({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,j({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,j({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,j({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function PM(e,t,n){return nw(e,n)?"<":"["}iw.peek=RM;function iw(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");const f=n.containerPhrasing(e,j({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),j({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function RM(){return"["}function pp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function LM(e){const t=pp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function DM(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function sw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function MM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?DM(n):pp(n);const l=e.ordered?u==="."?")":".":LM(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),sw(n)===u&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function FM(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function BM(e,t,n,r){const s=FM(n);let a=n.bulletCurrent||pp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function UM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const HM=pl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jM(e,t,n,r){return(e.children.some(function(u){return HM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ow.peek=$M;function ow(e,t,n,r){const s=zM(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,j({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=ec(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=za(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=ec(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+za(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},l+d+y}function $M(e,t,n){return n.options.strong||"*"}function VM(e,t,n,r){return n.safe(e.value,r)}function qM(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function YM(e,t,n){const r=(sw(n)+(n.options.ruleSpaces?" ":"")).repeat(qM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const aw={blockquote:mM,break:Qb,code:wM,definition:_M,emphasis:Kb,hardBreak:Qb,heading:CM,html:Jb,image:Zb,imageReference:ew,inlineCode:tw,link:rw,linkReference:iw,list:MM,listItem:BM,paragraph:UM,root:jM,strong:ow,text:VM,thematicBreak:YM};function WM(){return{enter:{table:GM,tableData:uw,tableHeader:uw,tableRow:QM},exit:{codeText:KM,table:XM,tableData:mp,tableHeader:mp,tableRow:mp}}}function GM(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function XM(e){this.exit(e),this.data.inTable=void 0}function QM(e){this.enter({type:"tableRow",children:[]},e)}function mp(e){this.exit(e)}function uw(e){this.enter({type:"tableCell",children:[]},e)}function KM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,JM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function JM(e,t){return t==="|"?t:e}function ZM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:l}};function u(y,x,_,A){return f(p(y,_,A),y.align)}function l(y,x,_,A){const S=m(y,_,A),k=f([S]);return k.slice(0,k.indexOf(`
52
- `))}function d(y,x,_,A){const S=_.enter("tableCell"),k=_.enter("phrasing"),I=_.containerPhrasing(y,le(j({},A),{before:a,after:a}));return k(),S(),I}function f(y,x){return hM(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,_){const A=y.children;let S=-1;const k=[],I=x.enter("table");for(;++S<A.length;)k[S]=m(A[S],x,_);return I(),k}function m(y,x,_){const A=y.children;let S=-1;const k=[],I=x.enter("tableRow");for(;++S<A.length;)k[S]=d(A[S],y,x,_);return I(),k}function b(y,x,_){let A=aw.inlineCode(y,x,_);return _.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function e9(){return{exit:{taskListCheckValueChecked:lw,taskListCheckValueUnchecked:lw,paragraph:n9}}}function t9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:r9}}}function lw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function n9(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const l=s[a];if(l.type==="paragraph"){u=l;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function r9(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=aw.listItem(e,t,n,j(j({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function i9(){return[M8(),rM(),aM(),WM(),e9()]}function s9(e){return{extensions:[F8(),iM(e),uM(),ZM(e),t9()]}}const o9={tokenize:f9,partial:!0},cw={tokenize:h9,partial:!0},dw={tokenize:p9,partial:!0},fw={tokenize:m9,partial:!0},a9={tokenize:g9,partial:!0},hw={name:"wwwAutolink",tokenize:c9,previous:mw},pw={name:"protocolAutolink",tokenize:d9,previous:gw},Qr={name:"emailAutolink",tokenize:l9,previous:Ew},Lr={};function u9(){return{text:Lr}}let fs=48;for(;fs<123;)Lr[fs]=Qr,fs++,fs===58?fs=65:fs===91&&(fs=97);Lr[43]=Qr,Lr[45]=Qr,Lr[46]=Qr,Lr[95]=Qr,Lr[72]=[Qr,pw],Lr[104]=[Qr,pw],Lr[87]=[Qr,hw],Lr[119]=[Qr,hw];function l9(e,t,n){const r=this;let s,a;return u;function u(m){return!gp(m)||!Ew.call(r,r.previous)||Ep(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return gp(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(a9,p,f)(m):m===45||m===95||cn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&bn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function c9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!mw.call(r,r.previous)||Ep(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(o9,e.attempt(cw,e.attempt(dw,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function d9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&gw.call(r,r.previous)&&!Ep(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(bn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||ol(m)||yt(m)||Ki(m)||al(m)?n(m):e.attempt(cw,e.attempt(dw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function f9(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function h9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(fw,d,l)(f):f===null||yt(f)||Ki(f)||f!==45&&al(f)?d(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function p9(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(fw,t,a)(u):u===null||yt(u)||Ki(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function m9(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||yt(l)||Ki(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||yt(l)||Ki(l)?t(l):r(l)}function a(l){return bn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):bn(l)?(e.consume(l),u):n(l)}}function g9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return cn(a)?n(a):t(a)}}function mw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function gw(e){return!bn(e)}function Ew(e){return!(e===47||gp(e))}function gp(e){return e===43||e===45||e===46||e===95||cn(e)}function Ep(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const E9={tokenize:v9,partial:!0};function y9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:x9,continuation:{tokenize:_9},exit:S9}},text:{91:{name:"gfmFootnoteCall",tokenize:w9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:T9,resolveTo:b9}}}}function T9(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return l;function l(d){if(!u||!u._balanced)return n(d);const f=lr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function b9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function w9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||yt(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(lr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return yt(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function x9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!l||x===null||x===91||yt(x))return n(x);if(x===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return a=lr(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return yt(x)||(l=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),at(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function _9(e,t,n){return e.check(pa,t,e.attempt(E9,t,n))}function S9(e){e.exit("gfmFootnoteDefinition")}function v9(e,t,n){const r=this;return at(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function A9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&zn(b,b.length,0,ul(y,u.slice(f+1,d),l)),zn(b,b.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),zn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return b;function b(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const _=Vs(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),S=Vs(x);return A._open=!S||S===2&&!!_,A._close=!_||_===2&&!!S,l(x)}}}class C9{constructor(){this.map=[]}add(t,n,r){k9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function k9(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function N9(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function O9(){return{flow:{null:{name:"table",tokenize:I9,resolveAll:P9}}}}function I9(e,t,n){const r=this;let s=0,a=0,u;return l;function l(H){let ie=r.events.length-1;for(;ie>-1;){const fe=r.events[ie][1].type;if(fe==="lineEnding"||fe==="linePrefix")ie--;else break}const ne=ie>-1?r.events[ie][1].type:null,ue=ne==="tableHead"||ne==="tableRow"?D:d;return ue===D&&r.parser.lazy[r.now().line]?n(H):ue(H)}function d(H){return e.enter("tableHead"),e.enter("tableRow"),f(H)}function f(H){return H===124||(u=!0,a+=1),p(H)}function p(H){return H===null?n(H):Ve(H)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),y):n(H):it(H)?at(e,p,"whitespace")(H):(a+=1,u&&(u=!1,s+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(H)))}function m(H){return H===null||H===124||yt(H)?(e.exit("data"),p(H)):(e.consume(H),H===92?b:m)}function b(H){return H===92||H===124?(e.consume(H),m):m(H)}function y(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),u=!1,it(H)?at(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):x(H))}function x(H){return H===45||H===58?A(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),_):W(H)}function _(H){return it(H)?at(e,A,"whitespace")(H):A(H)}function A(H){return H===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),S):H===45?(a+=1,S(H)):H===null||Ve(H)?z(H):W(H)}function S(H){return H===45?(e.enter("tableDelimiterFiller"),k(H)):W(H)}function k(H){return H===45?(e.consume(H),k):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(H))}function I(H){return it(H)?at(e,z,"whitespace")(H):z(H)}function z(H){return H===124?x(H):H===null||Ve(H)?!u||s!==a?W(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):W(H)}function W(H){return n(H)}function D(H){return e.enter("tableRow"),V(H)}function V(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),V):H===null||Ve(H)?(e.exit("tableRow"),t(H)):it(H)?at(e,V,"whitespace")(H):(e.enter("data"),ee(H))}function ee(H){return H===null||H===124||yt(H)?(e.exit("data"),V(H)):(e.consume(H),H===92?ce:ee)}function ce(H){return H===92||H===124?(e.consume(H),ee):ee(H)}}function P9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const b=new C9;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(yw(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=tc(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=tc(b,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(l=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=tc(b,t,a,s,n,m)):u[1]!==0&&(m=tc(b,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&yw(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=N9(t.events,n))}return e}function tc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},go(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=go(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=go(t.events,n[2]),p=go(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,_=n[3]-n[2]-1;e.add(x,_,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},go(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function yw(e,t,n,r,s){const a=[],u=go(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function go(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const R9={name:"tasklistCheck",tokenize:D9};function L9(){return{text:{91:R9}}}function D9(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return yt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(d)}function l(d){return Ve(d)?t(d):it(d)?e.check({tokenize:M9},t,n)(d):n(d)}}function M9(e,t,n){return at(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function F9(e){return W1([u9(),y9(),A9(e),O9(),L9()])}const B9={};function U9(e){const t=this,n=e||B9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(F9(n)),a.push(i9()),u.push(s9(n))}const H9=()=>w.jsx("span",{className:`${N}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Eo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(BE,{remarkPlugins:[U9],rehypePlugins:[Uy],components:{h1:({children:s})=>w.jsx("h1",{className:B(e,`${N}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:B(e,`${N}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:B(e,`${N}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:B(e,`${N}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:B(e,`${N}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:B(e,`${N}-li`),children:s}),a:({href:s,children:a})=>w.jsx(Yy,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:B(e,`${N}-table-container`),children:w.jsx("table",{className:B(e,`${N}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:B(e,`${N}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:B(e,`${N}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:B(e,`${N}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:B(e,`${N}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:B(e,`${N}-td`),children:s}),span:({className:s,children:a})=>s===`${N}-blinking-cursor`?w.jsx(H9,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${N}-blinking-cursor'></span>`:"")}),yo=()=>R.useContext(e1),To=()=>{const{sendMessage:e,loading:t,isConnected:n}=Tn(),{mode:r,status:s}=$r();return R.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function j9(e){return e.includes("-")&&e===e.toLowerCase()}function bo({tagName:e,props:t,label:n}){const r=R.useRef(null),s=R.useRef(null),a=R.useRef(e),u=R.useRef(null);return R.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!j9(e)){u.current!==e&&(u.current=e,_t(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,l.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,l.replaceChildren();return}try{const f=document.createElement(e);f.props=t,l.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),R.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class z9 extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function $9(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const V9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=Tn();return w.jsx("div",{className:B(t,`${N}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:B(t,`${N}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:B(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:w.jsx("img",{className:B(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:B(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:B(t,`${N}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx($9,{"aria-hidden":"true"})})})},q9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=Tn();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:B(t,`${N}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:B(t,`${N}-msg-product-card__title-link`),"aria-label":a,children:e}):w.jsx("p",{className:B(t,`${N}-msg-product-card__title`),children:e})},Y9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=dt(),{overrides:u,isInitialized:l}=yo(),{sendMessage:d,loading:f}=Tn(),p=To(),m=l?u.ProductTile:void 0;if(m){const H={name:"ProductTile",payload:s!=null?s:{},api:p};return w.jsx(bo,{tagName:m,props:H,label:"ProductTile"})}const{id:b,name:y,imageUrl:x,description:_,productPageUrl:A,price:S,priceBreakdown:k,discountPrice:I,listPrice:z,currencyCode:W}=e,D=I!=null?I:S,V=w8({priceBreakdown:k,currencyCode:W}),ee=()=>{if(f)return;const H=y||"this product",ie=b?` [SKU: ${b}]`:"";d(`Show me details for ${H}${ie}`)},ce=r?`View details for ${y}`:`Go to product page for ${y}`;return w.jsxs("div",{className:B(t,`${N}-msg-product-card`),children:[w.jsx(V9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ce,name:y,showInWidgetDetails:ee}),w.jsxs("div",{className:B(t,`${N}-msg-product-card__content`),children:[w.jsxs("div",{className:B(t,`${N}-msg-product-card__content-header`),children:[w.jsx(q9,{name:y||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ce,showInWidgetDetails:ee}),a&&_&&w.jsx("div",{className:B(t,`${N}-msg-product-card__description`),title:_,children:w.jsx(Eo,{globalClassName:t,text:_})})]}),w.jsx("div",{className:B(t,`${N}-msg-product-card__price-row`),children:V?w.jsx("span",{className:B(t,`${N}-msg-product-card__price`),"aria-label":`Price from ${V.low} to ${V.high}`,children:V.range}):w.jsx(up,{globalClassName:t,retailPrice:z,discountPrice:D,currencyCode:W})})]})]})},W9=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},G9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=dt(),{overrides:l,isInitialized:d}=yo(),f=To(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(bo,{tagName:p,props:m,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:B(n,`${N}-product-carousel-title`),children:e}),w.jsx($D,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>w.jsxs("div",{className:B(n,`${N}-product-carousel-item`),children:[w.jsx(Y9,{product:W9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:B(n,`${N}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},yp=44,X9=400,Q9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?yp:Math.min(Math.max(Math.round(t),yp),X9)},K9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},J9="parentOrigin",Z9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(J9,t),n.toString()}catch(n){return e}},eF=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},Tw=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=R.useRef(null),[s,a]=R.useState(!1),[u,l]=R.useState(yp),d=typeof window!="undefined"?window.location.origin:"",f=Z9(e,d),p=K9(e);return R.useEffect(()=>{const m=b=>{var x,_,A;if(p&&b.origin!==p||r.current&&b.source!==r.current.contentWindow)return;const y=b.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(Q9((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(_=y.payload)==null?void 0:_.orderId)!=null?A:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),w.jsx("div",{className:B(t,`${N}-cart-express`,{[`${N}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:B(t,`${N}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},nc=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:B(t,`${N}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(m1,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Pn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=Xr(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:B(s,`${N}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:B(s,`${N}-cart-total-label`),children:[e,t&&w.jsx("span",{className:B(s,`${N}-cart-total-badge`),children:t})]}),w.jsx("span",{className:B(s,`${N}-cart-total-value`),children:d?w.jsx("span",{className:B(s,`${N}-cart-total-shimmer`)}):f})]})};function Tp(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function bp(e){return(e!=null?e:[]).map(Tp).filter(t=>t!==null)}function bw(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function tF(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=Tp(a),l=bw(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=Tp(a);if(u===null)continue;const l=(s=bw(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function ww(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>bp(s.coupons)).map(s=>s.toLowerCase()));return tF(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const nF=({quantity:e,loading:t,disabled:n,globalClassName:r,onChange:s})=>{const[a,u]=R.useState(e.toString());R.useEffect(()=>{u(e.toString())},[e]);const l=p=>{if(n)return;const m=p.target.value;/^\d*$/.test(m)&&u(m)},d=()=>{const p=parseInt(a,10);!n&&!isNaN(p)&&p>0&&p!==e?s(p):u(e.toString())},f=p=>{p.key==="Enter"&&(p.preventDefault(),d())};return w.jsx("div",{className:B(r,`${N}-cart-qty-input-wrapper`),children:t?w.jsx(lk,{className:B(r,`${N}-cart-qty-spinner`),"aria-hidden":"true"}):w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:B(r,`${N}-cart-qty-input`),value:a,disabled:n,onChange:l,onBlur:d,onKeyDown:f,"aria-label":"Quantity"})})},rF=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var f,p;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,d=bp(e.coupons);return w.jsxs("li",{className:B(s,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:B(s,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:B(s,`${N}-cart-item-details`),children:[w.jsx("p",{className:B(s,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:B(s,`${N}-cart-item-attrs`),children:[((f=e.variants)!=null?f:[]).map(m=>w.jsxs("p",{className:B(s,`${N}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((p=e.promotions)!=null?p:[]).map(m=>w.jsxs("p",{className:B(s,`${N}-cart-item-attr`),children:["Promotion: ",m]},m))]}),d.length>0&&w.jsx("div",{className:B(s,`${N}-cart-chips`),children:d.map(m=>w.jsx(nc,{code:m,globalClassName:s},m))}),w.jsx("span",{className:B(s,`${N}-cart-item-price`),children:n?w.jsx("span",{className:B(s,`${N}-cart-total-shimmer`)}):w.jsxs(w.Fragment,{children:[l&&w.jsx("span",{className:B(s,`${N}-cart-item-original-price`),children:Xr(e.originalSubtotal,t)}),w.jsx("span",{className:B(s,`${N}-cart-item-final-price`),children:Xr(e.itemSubtotal,t)})]})}),w.jsxs("div",{className:B(s,`${N}-cart-item-footer`),children:[w.jsx("span",{className:B(s,`${N}-cart-qty-heading`),children:"Quantity"}),w.jsx(nF,{quantity:e.quantity,loading:n,disabled:r,globalClassName:s,onChange:m=>u(e,m)}),w.jsx("button",{type:"button",className:B(s,`${N}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},iF=({cart:e,messageId:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a,cartUpdating:u}=Tn(),[l,d]=R.useState(!1),[f,p]=R.useState(""),[m,b]=R.useState(null),y=a||u,{items:x=[],currencyCode:_="USD",subtotal:A,total:S,taxes:k,shippingCost:I,shippingDiscount:z,shippingPromotions:W=[],promotionsDiscount:D,promotions:V=[],couponsDiscount:ee,bodyMessage:ce,footerMessage:H,checkoutButtonUrl:ie,expressPaymentUrl:ne}=e,ue=ww(x,e.couponsApplied,e.coupons),fe=G=>{y||s(`Remove ${G.name} from my cart`)},ae=G=>{s(G?`I completed express payment. Show my order confirmation for order ${G}.`:"I completed express payment. Show my order confirmation.")},ve=(G,se)=>{y||m||se<1||(b(G.itemId),s(`Update ${G.name} quantity to ${se}`,{silent:!0,reconcileMessageId:t}).then(C=>{C.outcome==="success"?setTimeout(()=>b(null),300):b(null)}))},de=()=>{const G=f.trim();!G||y||(s(`Apply coupon code ${G}`),p(""))};return w.jsxs("div",{className:B(n,`${N}-cart`),children:[w.jsxs("div",{className:B(n,`${N}-cart-box`),children:[ce&&w.jsxs("button",{type:"button",className:B(n,`${N}-cart-summary`),"aria-expanded":l,onClick:()=>d(G=>!G),children:[w.jsx("span",{className:B(n,`${N}-cart-summary-text`),children:w.jsx(Eo,{text:ce,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),w.jsx("span",{className:B(n,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:l?w.jsx(h1,{}):w.jsx(p1,{})})]}),l&&w.jsxs("div",{className:B(n,`${N}-cart-expanded`),children:[w.jsxs("div",{className:B(n,`${N}-cart-items-section`),children:[w.jsx("ul",{className:B(n,`${N}-cart-items`),children:x.map(G=>w.jsx(rF,{item:G,currencyCode:_,loading:m===G.itemId,disabled:y||m===G.itemId,globalClassName:n,onRemove:fe,onQuantityChange:ve},G.itemId))}),ue.length>0&&w.jsx("div",{className:B(n,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:ue.map(G=>w.jsx(nc,{code:G.code,inactive:!G.applied,globalClassName:n},G.code))})]}),w.jsxs("div",{className:B(n,`${N}-cart-totals`),children:[w.jsx(Pn,{label:"Subtotal",value:A,currencyCode:_,globalClassName:n,loading:!!m}),w.jsx(Pn,{label:"Coupon",value:ee,currencyCode:_,globalClassName:n,isDiscount:!0,loading:!!m}),w.jsx(Pn,{label:"Promotions",badge:V[0],value:D,currencyCode:_,globalClassName:n,isDiscount:!0,loading:!!m}),w.jsx(Pn,{label:"Shipping",value:I,currencyCode:_,globalClassName:n,fallback:"TBD",loading:!!m}),w.jsx(Pn,{label:"Shipping Discount",badge:W[0],value:z,currencyCode:_,globalClassName:n,isDiscount:!0,loading:!!m}),w.jsx(Pn,{label:"Tax",value:k,currencyCode:_,globalClassName:n,fallback:"TBD",loading:!!m}),w.jsx(Pn,{label:"Total",value:S,currencyCode:_,globalClassName:n,emphasized:!0,loading:!!m})]})]})]}),w.jsxs("div",{className:B(n,`${N}-cart-coupon`),children:[w.jsxs("div",{className:B(n,`${N}-cart-coupon-field`),children:[w.jsx("span",{className:B(n,`${N}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(m1,{})}),w.jsx("input",{type:"text",className:B(n,`${N}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:f,disabled:y,onChange:G=>p(G.target.value),onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),de())}})]}),w.jsx("button",{type:"button",className:B(n,`${N}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!f.trim(),onClick:de,children:w.jsx(fk,{"aria-hidden":"true"})})]}),ne&&w.jsx(Tw,{expressPaymentUrl:ne,globalClassName:n,onOrderComplete:ae}),ie&&w.jsxs("a",{className:B(n,`${N}-cart-checkout-button`),href:ie,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(ck,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]}),w.jsx("p",{className:B(n,`${N}-cart-footer`),children:H||"Shipping and taxes calculated at checkout."})]})},sF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=bp(e.coupons);return w.jsxs("li",{className:B(n,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:B(n,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:B(n,`${N}-cart-item-details`),children:[w.jsx("p",{className:B(n,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:B(n,`${N}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:B(n,`${N}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:B(n,`${N}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:B(n,`${N}-cart-chips`),children:s.map(l=>w.jsx(nc,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:B(n,`${N}-cart-item-price`),children:[r&&w.jsx("span",{className:B(n,`${N}-cart-item-original-price`),children:Xr(e.originalSubtotal,t)}),w.jsx("span",{className:B(n,`${N}-cart-item-final-price`),children:Xr(e.itemSubtotal,t)})]}),w.jsx("div",{className:B(n,`${N}-cart-item-footer`),children:w.jsxs("span",{className:B(n,`${N}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},oF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},aF=({order:e,globalClassName:t})=>{const[n,r]=R.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:b,shippingPromotions:y=[],promotionsDiscount:x,promotions:_=[],couponsDiscount:A,bodyMessage:S,footerMessage:k}=e,I=ww(u,e.couponsApplied);return w.jsxs("div",{className:B(t,`${N}-cart`),children:[w.jsxs("div",{className:B(t,`${N}-cart-banner`),children:[w.jsx("span",{className:B(t,`${N}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(hk,{})}),w.jsx("p",{className:B(t,`${N}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:B(t,`${N}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",oF(a)]})]}),w.jsxs("div",{className:B(t,`${N}-cart-box`),children:[S&&w.jsxs("button",{type:"button",className:B(t,`${N}-cart-summary`),"aria-expanded":n,onClick:()=>r(z=>!z),children:[w.jsx("span",{className:B(t,`${N}-cart-summary-text`),children:w.jsx(Eo,{text:S,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:B(t,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(h1,{}):w.jsx(p1,{})})]}),n&&w.jsxs("div",{className:B(t,`${N}-cart-expanded`),children:[w.jsx("ul",{className:B(t,`${N}-cart-items`),children:u.map(z=>w.jsx(sF,{item:z,currencyCode:l,globalClassName:t},z.itemId))}),I.length>0&&w.jsx("div",{className:B(t,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:I.map(z=>w.jsx(nc,{code:z.code,globalClassName:t},z.code))}),w.jsxs("div",{className:B(t,`${N}-cart-totals`),children:[w.jsx(Pn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Pn,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Pn,{label:"Promotions",badge:_[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Pn,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Pn,{label:"Shipping Discount",badge:y[0],value:b,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Pn,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Pn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:B(t,`${N}-cart-footer`),children:k||"Shipping and taxes calculated at checkout."})]})},uF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=R.useState(e.src),[a,u]=R.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:B(n,`${N}-pdp-gallery__image`,{[`${N}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},lF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(tp,{className:B(n,`${N}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(Jh,{className:B(n,`${N}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(Kh,{index:a,className:B(n,`${N}-pdp-gallery__item`),children:w.jsx(uF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(Gh,{className:B(n,`${N}-pdp-gallery__control`),children:[w.jsx(ep,{className:B(n,`${N}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(gb,{size:"16px"})}),w.jsx(Zh,{className:B(n,`${N}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(Eb,{size:"16px"})})]}),r&&w.jsx(Qh,{className:B(n,`${N}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(Xh,{index:a,className:B(n,`${N}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},$a="color",wp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,cF=e=>e.replace(/(^|\/)large\//,"$1medium/"),xw=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===$a&&n.vals.includes(t)),_w=(e,t)=>{const n=cF(t),r=wp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:wp(e,t)}},dF=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>xw(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>_w(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[_w(e.baseUrl,e.imageUrl)]:[]},fF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&xw(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?wp(e.baseUrl,r):""},rc=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),hF=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},pF=(e,t,n,r,s)=>{if(!e||e.length===0)return le(j({},s),{[n]:r});const a=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length&&Object.entries(s).every(([f,p])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===p})});if(a)return j({},a.vars);const u=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length});return u?j({},u.vars):le(j({},s),{[n]:r})},Sw=(e,t)=>{var s,a,u,l;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},mF=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},gF=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>rc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},EF=300,yF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var st,St,Rt,hn,wn,Lt,ze;const{addToCart:s,sendMessage:a,loading:u}=Tn(),{overrides:l,isInitialized:d}=yo(),f=To(),p=e.data,m=(st=p.vattr)!=null?st:[],[b,y]=R.useState(()=>gF(p)),x=hF(p.vmat,b),_=(Rt=(St=p.quantity)==null?void 0:St.minQuantity)!=null?Rt:1,A=(wn=(hn=p.quantity)==null?void 0:hn.maxQuantity)!=null?wn:Number.POSITIVE_INFINITY,S=(ze=(Lt=p.quantity)==null?void 0:Lt.increment)!=null?ze:1,[k,I]=R.useState(_),[z,W]=R.useState(!1),D=R.useRef(!1);R.useEffect(()=>{z&&(u?D.current=!0:D.current&&(D.current=!1,W(!1)))},[z,u]);const V=b[$a],ee=R.useMemo(()=>dF(p,V),[p,V]),ce=R.useMemo(()=>mF(p,b),[p,b]),H=m.find(Ne=>Ne.id===$a),ie=m.filter(Ne=>Ne.id!==$a),ne=Sw(p,b),[ue,fe]=R.useState(k),ae=R.useRef(ne),ve=ae.current===ne?ue:k;R.useEffect(()=>{if(ae.current!==ne){ae.current=ne,fe(k);return}const Ne=window.setTimeout(()=>fe(k),EF);return()=>window.clearTimeout(Ne)},[k,ne]);const de=k===ue,G=R.useMemo(()=>x&&(ae.current!==ne||de)?eF(p.expressPaymentUrl,ne,ve):null,[p.expressPaymentUrl,ne,ve,x,de]),se=R.useCallback(Ne=>{a(Ne?`I completed express payment. Show my order confirmation for order ${Ne}.`:"I completed express payment. Show my order confirmation.")},[a]),C=d?l.ProductDetailCard:void 0;if(C){const Ne={name:"ProductDetailCard",payload:e,api:f};return w.jsx(bo,{tagName:C,props:Ne,label:"ProductDetailCard"})}const M=(Ne,Qe)=>()=>{y(tt=>{const ht=!rc(p.vmat,Ne,Qe,tt);return Ne===$a||ht?pF(p.vmat,m,Ne,Qe,tt):le(j({},tt),{[Ne]:Qe})})},J=()=>{if(u)return;const Ne=Sw(p,b);if(!Ne)return;const Qe=m.map(tt=>{const ht=tt.opts.find(Dt=>Dt.val===b[tt.id]);return ht?{label:tt.lbl||tt.id,value:ht.name||ht.val}:null}).filter(tt=>tt!==null);W(!0),s({productName:p.name,sku:Ne,quantity:k,variants:Qe})},P=!x||k-S<_,Se=!x||k+S>A,Ae=Ne=>{var tt;const Qe=b[Ne.id];return(tt=Ne.opts.find(ht=>ht.val===Qe))==null?void 0:tt.name},me=()=>I(Ne=>Math.max(_,Ne-S)),Ie=()=>I(Ne=>Math.min(A,Ne+S)),Me=Ne=>w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ne.id}`,className:B(t,`${N}-msg-pdp__variant-name`),children:Ne.lbl||Ne.id}),Ae(Ne)&&w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-value`),children:Ae(Ne)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ne.id}`,className:B(t,`${N}-msg-pdp__chips`),children:Ne.opts.map(Qe=>{const tt=rc(p.vmat,Ne.id,Qe.val,b),ht=b[Ne.id]===Qe.val;return w.jsxs("label",{className:B(`${N}-msg-pdp__chip`,{selected:ht,unavailable:!tt}),children:[w.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:Qe.val,checked:ht,"aria-description":tt?void 0:"unavailable",onChange:M(Ne.id,Qe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Qe.name||Qe.val})]},Qe.val)})})]},Ne.id),Xe=Ne=>w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ne.id}`,className:B(t,`${N}-msg-pdp__variant-name`),children:Ne.lbl||"Color"}),Ae(Ne)&&w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-value`),children:Ae(Ne)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ne.id}`,className:B(t,`${N}-msg-pdp__swatches`),children:Ne.opts.map(Qe=>{const tt=rc(p.vmat,Ne.id,Qe.val,b),ht=b[Ne.id]===Qe.val,Dt=fF(p,Qe.val);return Dt?w.jsxs("label",{className:B(`${N}-msg-pdp__swatch`,{selected:ht,unavailable:!tt}),children:[w.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:Qe.val,checked:ht,"aria-label":Qe.name||Qe.val,"aria-description":tt?void 0:"unavailable",onChange:M(Ne.id,Qe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("img",{className:B(t,`${N}-msg-pdp__swatch-image`),src:Dt,alt:Qe.name||Qe.val,loading:"lazy"})]},Qe.val):w.jsxs("label",{className:B(`${N}-msg-pdp__chip`,{selected:ht,unavailable:!tt}),children:[w.jsx("input",{type:"radio",name:`variant-${Ne.id}`,value:Qe.val,checked:ht,"aria-description":tt?void 0:"unavailable",onChange:M(Ne.id,Qe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Qe.name||Qe.val})]},Qe.val)})})]});return w.jsx("div",{className:B(t,`${N}-msg-pdp`),children:w.jsxs("div",{className:B(t,`${N}-msg-pdp__card`),children:[w.jsx("div",{className:B(t,`${N}-msg-pdp__gallery`),children:w.jsx(lF,{images:ee,altText:p.name,globalClassName:t})}),w.jsxs("div",{className:B(t,`${N}-msg-pdp__content`),children:[p.slugUrl?w.jsx("a",{href:p.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:B(t,`${N}-msg-pdp__title-link`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):w.jsx("p",{className:B(t,`${N}-msg-pdp__title`),children:p.name}),w.jsx(up,{globalClassName:t,className:`${N}-msg-pdp__price`,retailPrice:ce==null?void 0:ce.orig,discountPrice:(ce==null?void 0:ce.cur)||(ce==null?void 0:ce.prom),currencyCode:p.ccy,fontSize:"14px"}),p.dscr&&w.jsx("div",{className:B(t,`${N}-msg-pdp__description`),children:w.jsx(Eo,{globalClassName:t,text:p.dscr})}),H&&Xe(H),ie.map(Me),r&&w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-value`),children:k})]}),w.jsxs("div",{className:B(t,`${N}-msg-pdp__stepper`),children:[w.jsx(ur,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(tk,{}),disabled:P,onClick:me}),w.jsx("span",{className:B(t,`${N}-msg-pdp__quantity`),children:k}),w.jsx(ur,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(nk,{}),disabled:Se,onClick:Ie})]})]}),r&&w.jsxs("div",{className:B(t,`${N}-msg-pdp__actions`),children:[G&&w.jsx(Tw,{expressPaymentUrl:G,globalClassName:t,onOrderComplete:se},G),w.jsx(Ef,{className:`${N}-msg-pdp__add-to-cart`,disabled:!x||u||z,onClick:J,children:z?"Adding...":"Add to cart"})]})]})]})})},TF=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},bF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{overrides:s,isInitialized:a}=yo(),u=To(),l=a?s.ProductComparison:void 0;if(l){const p={name:"ProductComparison",payload:{products:e,table:t},api:u};return w.jsx(bo,{tagName:l,props:p,label:"ProductComparison"})}if(!e.length)return null;const d=`auto repeat(${e.length}, 1fr)`,f=`${90+e.length*140}px`;return w.jsx("div",{className:B(n,`${N}-product-comparison`),children:w.jsxs("div",{className:`${N}-product-comparison__grid`,style:{gridTemplateColumns:d,minWidth:f},children:[w.jsxs("div",{className:`${N}-product-comparison__header`,children:[w.jsx("div",{className:`${N}-product-comparison__header-spacer`}),e.map(p=>{var b,y,x,_;const m=TF(p);return w.jsxs("div",{className:B(n,`${N}-product-comparison__product-col`),children:[m&&w.jsx("img",{className:B(n,`${N}-product-comparison__image`),src:m,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?w.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:B(n,`${N}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):w.jsx("span",{className:B(n,`${N}-product-comparison__name`),children:p.name}),w.jsx(up,{globalClassName:n,retailPrice:(b=p.pr)==null?void 0:b.orig,discountPrice:(_=(y=p.pr)==null?void 0:y.prom)!=null?_:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),w.jsx("div",{className:`${N}-product-comparison__table`,children:t.map(p=>w.jsxs("div",{className:`${N}-product-comparison__row`,children:[w.jsx("div",{className:B(n,`${N}-product-comparison__row-label`),children:p.row_name}),e.map((m,b)=>w.jsx("div",{className:B(n,`${N}-product-comparison__row-value`),children:p.values[b]},`${p.row_name}-${m.id}`))]},p.row_name))})]})})},vw=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u,cartUpdating:l}=Tn(),{isCartMgmtSupported:d,logger:f}=dt(),{overrides:p,isInitialized:m}=yo(),b=To(),y=R.useMemo(()=>e.response.flatMap(zA),[e.response]);return w.jsx(w.Fragment,{children:y.map((x,_)=>{var A,S,k,I,z,W,D,V,ee,ce,H,ie,ne,ue,fe,ae,ve,de,G,se,C,M,J,P,Se;switch(x.type){case"markdown":{const Ae=(S=(A=x.data)==null?void 0:A.content)!=null?S:"";return x.index===ui&&Ng(Ae)?null:w.jsx(Eo,{text:Ae,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${x.type}-${(k=x.index)!=null?k:_}`)}case"product_carousel":return w.jsx(G9,{title:(z=(I=x.data)==null?void 0:I.title)!=null?z:"",products:(D=(W=x.data)==null?void 0:W.products)!=null?D:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(V=x.index)!=null?V:_}`);case"product_tile":return w.jsx(yF,{product:x.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(ee=x.index)!=null?ee:_}`);case"product_comparison":return w.jsx(bF,{products:(H=(ce=x.data)==null?void 0:ce.products)!=null?H:[],table:(ne=(ie=x.data)==null?void 0:ie.table)!=null?ne:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(ue=x.index)!=null?ue:_}`);case"cart":{const Ae=(ve=(ae=(fe=x.data)==null?void 0:fe.cart)==null?void 0:ae.cartSummary)==null?void 0:ve.cartDetails;return Ae?w.jsx(iF,{cart:Ae,messageId:t,productsToHighlight:x.data.products_to_highlight,globalClassName:n,openLinksInNewTab:r},`${x.type}-${(de=x.index)!=null?de:_}`):null}case"order_confirmation":{const Ae=(se=(G=x.data)==null?void 0:G.order)==null?void 0:se.orderDetails;return Ae?w.jsx(aF,{order:Ae,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(C=x.index)!=null?C:_}`):null}case"tool_results":{const Ae=x.data,me=x.output_name,Ie=m&&me&&Object.prototype.hasOwnProperty.call(p,me)?p[me]:void 0,Me=typeof Ie=="string"?Ie:void 0;if(!Me||!me)return f!=null&&f.isDevelopment&&(me?f.warn(`🦜 tool_results "${me}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${me}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(p),payload:Ae}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:Ae})),null;const Xe={name:me,payload:Ae,api:b};return w.jsx(z9,{overrideName:me,children:w.jsx(bo,{tagName:Me,props:Xe,label:`toolResult:${me}`})},`${x.type}-${me}-${(M=x.index)!=null?M:_}`)}case"suggestions":return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(_8,{disabled:u||l,suggestions:(P=(J=x.data)==null?void 0:J.display_text)!=null?P:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:a})},`${x.type}-${(Se=x.index)!=null?Se:_}`);default:return null}})})};class Aw extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:B(this.props.globalClassName,`${N}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const wF=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=dt(),a=R.useMemo(()=>{if(typeof e.content!="string")return null;const l=ta(e.content);if(l)return l;const d=kg(e.content);return d?{response:[d]}:null},[e.content]),u=R.useMemo(()=>{var f;const l="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),l;const d=e.content.trim();try{const p=JSON.parse(d);if(typeof p=="object"&&p!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),(f=Ag(p))!=null?f:l}catch(p){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),l}return e.content||l},[s,e.content]);switch(e.role){case"user":return w.jsx("div",{className:B(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("div",{className:B(t,`${N}-user-message`,r?"standalone":"embedded"),children:w.jsxs("div",{className:B(t,`${N}-user-message-row`,r?"standalone":"embedded"),children:[w.jsx("span",{className:B(t,`${N}-message-icon user-message-icon`,r?"standalone":"embedded"),children:w.jsx(dk,{})}),w.jsx("p",{className:B(t,`${N}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return w.jsx("div",{className:B(t,`${N}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${N}-message-group-child`,children:a?w.jsx(Aw,{globalClassName:t,children:w.jsx(vw,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(Eo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:B(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:B(t,`${N}-reset-message`),children:e.content})})}},xF=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:B(n,`${N}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:B(n,`${N}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:B(n,`${N}-retry-button`),onClick:t,children:[w.jsx(gk,{"aria-hidden":"true"})," Retry"]})]}),_F="You are offline or we couldn't reach the assistant. Check connection and try again.",xp=({isWidgetStandalone:e})=>{var H,ie;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=dt(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:b,retryLastMessage:y,retryConnection:x}=Tn(),_=R.useRef(null),A=a.length>0,S=u.some(VA),k=a[a.length-1],I=k?$A(k.content,"suggestions"):!1,z=A&&(d||l)&&!S&&!I,W=p==="reconnecting"&&!z,D=p==="error";let V=null;D?V={message:m!=null?m:_F,kind:"connection",onRetry:x}:b&&(V={message:b.message,kind:"send",onRetry:y}),R.useEffect(()=>{var ne;(ne=_.current)==null||ne.scrollIntoView({behavior:"smooth"})},[]),R.useEffect(()=>{var ne;s&&((ne=_.current)==null||ne.scrollIntoView({behavior:"smooth"}))},[a,u,b,m,s]);const ee=(H=V==null?void 0:V.message)!=null?H:null,ce=(ie=V==null?void 0:V.kind)!=null?ie:null;return R.useEffect(()=>{ee&&(r==null||r.error("Error message shown to user",{message:ee,kind:ce}))},[ee,ce,r]),w.jsxs(w.Fragment,{children:[d&&!A&&w.jsx(k8,{globalClassName:t,isWidgetStandalone:e}),a.map(ne=>w.jsx(wF,{message:ne,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},ne.id)),V&&w.jsx(xF,{message:V.message,onRetry:V.onRetry,globalClassName:t,isWidgetStandalone:e}),S&&w.jsxs("div",{className:B(t,`${N}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Aw,{globalClassName:t,children:w.jsx(vw,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||l)&&w.jsx(lp,{globalClassName:t,isWidgetStandalone:e})]}),z&&w.jsx(lp,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),W&&w.jsx(lp,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),w.jsx("div",{ref:_})]})},SF=()=>w.jsxs("svg",{className:`${N}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),vF=()=>w.jsx("svg",{className:`${N}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),AF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),_p=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=dt(),s=e!=null?e:r,{overrides:a,isInitialized:u}=yo(),l=To();if(t.length===0||s===0)return null;const d=AF(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(bo,{tagName:f,props:p,label:"ProgressSteps"})}return w.jsx("div",{className:B(n,`${N}-progress-steps-panel`),children:w.jsx("div",{className:`${N}-progress-steps`,children:w.jsx("ul",{className:`${N}-progress-steps-list`,children:d.map((p,m)=>{const b=m<d.length-1,y=m===d.length-1;return w.jsxs("li",{className:B(`${N}-progress-step`,y&&"active"),children:[y&&w.jsx("span",{className:`${N}-progress-step-arc`}),w.jsx("span",{className:`${N}-progress-step-text`,children:p}),w.jsx("span",{className:B(`${N}-progress-step-icon`,b?"done":"active"),children:b?w.jsx(SF,{}):w.jsx(vF,{})})]},`${m}-${p}`)})})})})},Cw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=dt(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=Tn(),f=s;return w.jsxs("div",{className:B(e,`${N}-container`,`${N}-embedded-chat`),style:t,children:[w.jsx("div",{className:B(e,`${N}-message-container`,`container-${n}`,"embedded"),children:w.jsx(xp,{isWidgetStandalone:!1})}),w.jsx(_p,{steps:l,globalClassName:e}),w.jsx(dh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),w.jsx("div",{className:B(`${N}-embedded-chat-menu`),children:w.jsxs(vD,{componentType:"chat",children:[w.jsx(zb,{componentType:"chat"}),w.jsx(Xy,{componentType:"chat",onClearChat:u}),r&&w.jsx(Qy,{componentType:"chat",onDownloadTranscript:d})]})})]})},kw=e=>{var d;const{children:t,disabled:n}=e,[r,s]=R.useState((d=e.container)==null?void 0:d.current),a=R.useSyncExternalStore(kF,()=>!1,()=>!0),{getRootNode:u}=Xl();if(R.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const l=r!=null?r:CF(u);return w.jsx(w.Fragment,{children:R.Children.map(t,f=>Hs.createPortal(f,l))})},CF=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return is(n)?n:Cr(t).body},kF=()=>()=>{},Nw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=dt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=$r(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:b,downloadTranscript:y}=Tn(),{isOpen:x}=s||{},_=!!s.isOpen,A=r==="standalone",S=f||d,k=()=>{zr(!1)};return _?w.jsx(Lb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:w.jsx(kw,{children:w.jsx(ip,{className:B(e,`${N}-container`,`${N}-dialog`,a,u&&"full-height"),style:j(j({},t),l&&{width:l}),children:w.jsxs(np,{className:B(e,`${N}-dialog-content`,{standalone:A,embedded:!A}),children:[w.jsx(Ub,{componentType:"dialog",onClearChat:m,onClose:k,onDownloadTranscript:y}),w.jsx(rp,{className:B(e,`${N}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:w.jsx(xp,{isWidgetStandalone:A,isOpen:x})}),w.jsx(_p,{steps:b,globalClassName:e}),w.jsx(dh,{componentType:"dialog",isLoading:S,onSubmit:I=>p(I)})]})})})}):null},Ow=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=dt(),{mode:r,status:s,isModalFullscreen:a}=$r(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=Tn(),{isOpen:b}=s||{},y=!!s.isOpen,x=r==="standalone",_=l||u,A=({open:k})=>{zr(k)},S=()=>{zr(!1)};return y?w.jsx(Lb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:w.jsx(kw,{children:w.jsxs("div",{className:B(e,`${N}-modal-container`),style:t,children:[w.jsx(Nb,{className:B(e,`${N}-modal-backdrop`)}),w.jsx(ip,{className:B(e,`${N}-container`,`${N}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:w.jsxs(np,{className:B(e,`${N}-modal-content`,{standalone:x,embedded:!x}),children:[w.jsx(Ub,{componentType:"modal",onClearChat:f,onClose:S,onDownloadTranscript:m}),w.jsx(rp,{className:B(e,`${N}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:w.jsx(xp,{isWidgetStandalone:x,isOpen:b})}),w.jsx(_p,{steps:p,globalClassName:e}),w.jsx(dh,{componentType:"modal",isLoading:_,onSubmit:k=>d(k)})]})})]})})}):null},NF=()=>{const e=$r(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(ok,{}):t==="dialog"?w.jsx(Nw,{}):t==="modal"?w.jsx(Ow,{}):w.jsx(Cw,{})},OF=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=g8();R.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&s(d))};return c8(a),()=>{d8(a)}},[e,t,n,r,s])},Iw=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function IF({isReady:e,hasError:t,transmit:n}){const r=R.useRef([]),s=R.useRef(e);s.current=e;const a=R.useRef(n);a.current=n;const u=R.useCallback((l,d)=>{s.current?Iw(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return R.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>Iw(a.current,d,f))}},[e]),R.useEffect(()=>{t&&(r.current=[])},[t]),u}const Pw={copilot:"Ask Copilot",messaging:"Ask a question"},PF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=dt(),{placeholder:s,isResponseLoading:a}=Jl(),u=s||Pw[r],[l,d]=R.useState(""),f=t||a,p=m=>{const b=l.trim();b&&(m.preventDefault(),e(b),d(""))};return w.jsxs("form",{className:B(n,`${N}-prompts-input-container`),name:`${N}-prompts-form`,onSubmit:p,children:[w.jsx("label",{htmlFor:`${N}-prompts-input`,"aria-label":u,children:w.jsx(Wh,{className:B(n,`${N}-prompts-input-icon`)})}),w.jsx("input",{id:`${N}-prompts-input`,className:B(n,`${N}-prompts-input`),name:`${N}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),w.jsx(ur,{className:B(n,`${N}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(gf,{}),disabled:f})]})},RF=()=>{const{globalClassName:e,mode:t}=dt(),{placeholder:n}=Jl(),r=n||Pw[t];return w.jsxs("div",{className:B(e,`${N}-prompts-header`),children:[w.jsx(Wh,{className:B(e,`${N}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:B(e,`${N}-prompts-header-text`),children:r})]})},Rw=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=dt(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:B(r,`${N}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(jb,{icon:a,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},LF="Ask me something else",DF=({label:e,disabled:t=!1})=>w.jsx(Rw,{label:e||LF,disabled:t,onClick:()=>zr(!0)}),MF=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=dt(),{messages:r}=Tn(),{staticQuestions:s,askElseButtonLabel:a,disableAskElseButton:u}=Jl(),l=R.useMemo(()=>{var y;const f=r.filter(x=>x.role==="agent");if(!f.length)return s;const m=f.map(x=>ta(x.content)).filter(Boolean).flatMap(x=>x==null?void 0:x.response.filter(_=>_.type==="suggestions"));if(!m.length)return s;const b=m[m.length-1];return(y=b==null?void 0:b.data.display_text)!=null?y:s},[r,s]);if(l.length===0)return null;const d=f=>()=>{const p=f.trim();p&&e(p)};return w.jsxs("div",{className:B(n,`${N}-prompts-button-group`),children:[l.map(f=>w.jsx(Rw,{label:f,disabled:t,onClick:d(f)},f)),!u&&w.jsx(DF,{label:a,disabled:t})]})},FF=()=>{const{globalClassName:e,themeVariables:t}=dt(),{isOpen:n,elementId:r,promptsDisplay:s,staticQuestions:a}=Jl(),{isConnected:u,sessionExpired:l,canInitialize:d,sendMessage:f,connectionStatus:p}=Tn(),{productId:m}=m8(),b=s!=="buttons",y=s!=="input",[x,_]=R.useState(null),A=p==="error",S=p==="connecting",k=Dg(u,l,d),I=IF({isReady:k,hasError:A,transmit:f});R.useEffect(()=>{if(!r||x)return;const W=document.getElementById(r);W&&_(W)},[r,x]);const z=R.useCallback(W=>{zr(!0);const D=(a||[]).includes(W.trim());if(m&&D){I(`${W} (Viewing product details for: ${m})`,{displayContent:W});return}I(W)},[I,a,m]);return!n||!x?null:Hs.createPortal(w.jsxs("div",{className:B(e,`${N}-prompts-extension-container`),style:t,children:[b&&w.jsx(PF,{onSubmit:z,disabled:A}),!b&&w.jsx(RF,{}),y&&w.jsx(MF,{onPromptClick:z,disabled:A}),!A&&S&&w.jsx("p",{className:B(e,`${N}-prompts-connecting-message`),children:"Connecting to agent..."}),A&&w.jsx("p",{className:B(e,`${N}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),x)},BF=()=>(OF(),w.jsx(FF,{})),Lw=e=>w.jsxs(t1,le(j({},e),{children:[w.jsx(NF,{}),w.jsx(BF,{})]}));var ic={},Dw;function UF(){if(Dw)return ic;Dw=1;var e=o1();return ic.createRoot=e.createRoot,ic.hydrateRoot=e.hydrateRoot,ic}var HF=UF();const Mw=(e,t,n,r)=>{HF.createRoot(e).render(w.jsx(Lw,le(j({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},jF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=Sn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const b of p)if(b.type==="childList"&&b.addedNodes.length)for(const y of b.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(_t(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),Mw(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),_t(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},zF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=Sn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){_t(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){_t(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){_t(!0,"warn","Container element not found for id:",t),_t(!0,"warn","Beginning observation for element"),jF(j({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Mw(l,s,n,r)};class $F extends HTMLElement{constructor(){super(...arguments);Je(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const VF={components:{setEntryType:M0,toggleWidgetOpen:zr,toggleWidgetMinimized:Lu,toggleModalFullscreen:Rd,setWidgetType:Du,setWidgetDialogPosition:Ld,loadPromptsComponent:p8,togglePromptsExtensionOpen:Bb}};Be.AgentForceWidget=Lw,Be.AgentforceWidgetProvider=t1,Be.CIMULATE_WIDGET_READY_EVENT=L0,Be.MessagingDialog=Nw,Be.MessagingEmbed=Cw,Be.MessagingModal=Ow,Be.MessagingProvider=Bg,Be.OverrideElement=$F,Be.eventHandlers=VF,Be.injectMessagingWidget=zF,Be.useMessaging=Tn,Object.defineProperty(Be,Symbol.toStringTag,{value:"Module"})}));
50
+ `},a.current()));return/^[\t ]/.test(f)&&(f=$a(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}ew.peek=PM;function ew(e){return e.value||""}function PM(){return"<"}tw.peek=RM;function tw(e,t,n,r){const s=pp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,j({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,j({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,j({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,j({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function RM(){return"!"}nw.peek=LM;function nw(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");const f=n.safe(e.alt,j({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),j({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function LM(){return"!"}rw.peek=DM;function rw(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],l=n.compilePattern(u);let d;if(u.atBreak)for(;d=l.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function DM(){return"`"}function iw(e,t){const n=Nf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}sw.peek=MM;function sw(e,t,n,r){const s=pp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(iw(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,j({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,j({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,j({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,j({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,j({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function MM(e,t,n){return iw(e,n)?"<":"["}ow.peek=FM;function ow(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");const f=n.containerPhrasing(e,j({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),j({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function FM(){return"["}function mp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function BM(e){const t=mp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function UM(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function aw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function HM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?UM(n):mp(n);const l=e.ordered?u==="."?")":".":BM(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),aw(n)===u&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function jM(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zM(e,t,n,r){const s=jM(n);let a=n.bulletCurrent||mp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function $M(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const VM=ml(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qM(e,t,n,r){return(e.children.some(function(u){return VM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function YM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}uw.peek=WM;function uw(e,t,n,r){const s=YM(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,j({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=tc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=$a(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=tc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+$a(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},l+d+y}function WM(e,t,n){return n.options.strong||"*"}function GM(e,t,n,r){return n.safe(e.value,r)}function XM(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function KM(e,t,n){const r=(aw(n)+(n.options.ruleSpaces?" ":"")).repeat(XM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const lw={blockquote:TM,break:Jb,code:vM,definition:kM,emphasis:Zb,hardBreak:Jb,heading:IM,html:ew,image:tw,imageReference:nw,inlineCode:rw,link:sw,linkReference:ow,list:HM,listItem:zM,paragraph:$M,root:qM,strong:uw,text:GM,thematicBreak:KM};function QM(){return{enter:{table:JM,tableData:cw,tableHeader:cw,tableRow:e9},exit:{codeText:t9,table:ZM,tableData:gp,tableHeader:gp,tableRow:gp}}}function JM(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ZM(e){this.exit(e),this.data.inTable=void 0}function e9(e){this.enter({type:"tableRow",children:[]},e)}function gp(e){this.exit(e)}function cw(e){this.enter({type:"tableCell",children:[]},e)}function t9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,n9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function n9(e,t){return t==="|"?t:e}function r9(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:l}};function u(y,x,_,A){return f(p(y,_,A),y.align)}function l(y,x,_,A){const S=m(y,_,A),C=f([S]);return C.slice(0,C.indexOf(`
52
+ `))}function d(y,x,_,A){const S=_.enter("tableCell"),C=_.enter("phrasing"),I=_.containerPhrasing(y,le(j({},A),{before:a,after:a}));return C(),S(),I}function f(y,x){return EM(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,_){const A=y.children;let S=-1;const C=[],I=x.enter("table");for(;++S<A.length;)C[S]=m(A[S],x,_);return I(),C}function m(y,x,_){const A=y.children;let S=-1;const C=[],I=x.enter("tableRow");for(;++S<A.length;)C[S]=d(A[S],y,x,_);return I(),C}function b(y,x,_){let A=lw.inlineCode(y,x,_);return _.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function i9(){return{exit:{taskListCheckValueChecked:dw,taskListCheckValueUnchecked:dw,paragraph:o9}}}function s9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:a9}}}function dw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function o9(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const l=s[a];if(l.type==="paragraph"){u=l;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function a9(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=lw.listItem(e,t,n,j(j({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function u9(){return[H8(),aM(),dM(),QM(),i9()]}function l9(e){return{extensions:[j8(),uM(e),fM(),r9(e),s9()]}}const c9={tokenize:g9,partial:!0},fw={tokenize:E9,partial:!0},hw={tokenize:y9,partial:!0},pw={tokenize:T9,partial:!0},d9={tokenize:b9,partial:!0},mw={name:"wwwAutolink",tokenize:p9,previous:Ew},gw={name:"protocolAutolink",tokenize:m9,previous:yw},Qr={name:"emailAutolink",tokenize:h9,previous:Tw},Dr={};function f9(){return{text:Dr}}let ms=48;for(;ms<123;)Dr[ms]=Qr,ms++,ms===58?ms=65:ms===91&&(ms=97);Dr[43]=Qr,Dr[45]=Qr,Dr[46]=Qr,Dr[95]=Qr,Dr[72]=[Qr,gw],Dr[104]=[Qr,gw],Dr[87]=[Qr,mw],Dr[119]=[Qr,mw];function h9(e,t,n){const r=this;let s,a;return u;function u(m){return!Ep(m)||!Tw.call(r,r.previous)||yp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Ep(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(d9,p,f)(m):m===45||m===95||dn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&wn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function p9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Ew.call(r,r.previous)||yp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(c9,e.attempt(fw,e.attempt(hw,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function m9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&yw.call(r,r.previous)&&!yp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(wn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||al(m)||yt(m)||es(m)||ul(m)?n(m):e.attempt(fw,e.attempt(hw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function g9(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function E9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(pw,d,l)(f):f===null||yt(f)||es(f)||f!==45&&ul(f)?d(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function y9(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(pw,t,a)(u):u===null||yt(u)||es(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function T9(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||yt(l)||es(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||yt(l)||es(l)?t(l):r(l)}function a(l){return wn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):wn(l)?(e.consume(l),u):n(l)}}function b9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return dn(a)?n(a):t(a)}}function Ew(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function yw(e){return!wn(e)}function Tw(e){return!(e===47||Ep(e))}function Ep(e){return e===43||e===45||e===46||e===95||dn(e)}function yp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const w9={tokenize:N9,partial:!0};function x9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:A9,continuation:{tokenize:k9},exit:C9}},text:{91:{name:"gfmFootnoteCall",tokenize:v9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_9,resolveTo:S9}}}}function _9(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return l;function l(d){if(!u||!u._balanced)return n(d);const f=cr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function S9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function v9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||yt(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(cr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return yt(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function A9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!l||x===null||x===91||yt(x))return n(x);if(x===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return a=cr(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return yt(x)||(l=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),ut(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function k9(e,t,n){return e.check(ma,t,e.attempt(w9,t,n))}function C9(e){e.exit("gfmFootnoteDefinition")}function N9(e,t,n){const r=this;return ut(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function O9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&$n(b,b.length,0,ll(y,u.slice(f+1,d),l)),$n(b,b.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),$n(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return b;function b(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const _=Ws(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),S=Ws(x);return A._open=!S||S===2&&!!_,A._close=!_||_===2&&!!S,l(x)}}}class I9{constructor(){this.map=[]}add(t,n,r){P9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function P9(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function R9(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function L9(){return{flow:{null:{name:"table",tokenize:D9,resolveAll:M9}}}}function D9(e,t,n){const r=this;let s=0,a=0,u;return l;function l(H){let ie=r.events.length-1;for(;ie>-1;){const fe=r.events[ie][1].type;if(fe==="lineEnding"||fe==="linePrefix")ie--;else break}const te=ie>-1?r.events[ie][1].type:null,ue=te==="tableHead"||te==="tableRow"?D:d;return ue===D&&r.parser.lazy[r.now().line]?n(H):ue(H)}function d(H){return e.enter("tableHead"),e.enter("tableRow"),f(H)}function f(H){return H===124||(u=!0,a+=1),p(H)}function p(H){return H===null?n(H):Ve(H)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),y):n(H):it(H)?ut(e,p,"whitespace")(H):(a+=1,u&&(u=!1,s+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(H)))}function m(H){return H===null||H===124||yt(H)?(e.exit("data"),p(H)):(e.consume(H),H===92?b:m)}function b(H){return H===92||H===124?(e.consume(H),m):m(H)}function y(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),u=!1,it(H)?ut(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):x(H))}function x(H){return H===45||H===58?A(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),_):W(H)}function _(H){return it(H)?ut(e,A,"whitespace")(H):A(H)}function A(H){return H===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),S):H===45?(a+=1,S(H)):H===null||Ve(H)?z(H):W(H)}function S(H){return H===45?(e.enter("tableDelimiterFiller"),C(H)):W(H)}function C(H){return H===45?(e.consume(H),C):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(H))}function I(H){return it(H)?ut(e,z,"whitespace")(H):z(H)}function z(H){return H===124?x(H):H===null||Ve(H)?!u||s!==a?W(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):W(H)}function W(H){return n(H)}function D(H){return e.enter("tableRow"),V(H)}function V(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),V):H===null||Ve(H)?(e.exit("tableRow"),t(H)):it(H)?ut(e,V,"whitespace")(H):(e.enter("data"),ee(H))}function ee(H){return H===null||H===124||yt(H)?(e.exit("data"),V(H)):(e.consume(H),H===92?ce:ee)}function ce(H){return H===92||H===124?(e.consume(H),ee):ee(H)}}function M9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const b=new I9;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(bw(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=nc(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=nc(b,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(l=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=nc(b,t,a,s,n,m)):u[1]!==0&&(m=nc(b,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&bw(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=R9(t.events,n))}return e}function nc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},To(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=To(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=To(t.events,n[2]),p=To(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,_=n[3]-n[2]-1;e.add(x,_,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},To(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function bw(e,t,n,r,s){const a=[],u=To(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function To(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const F9={name:"tasklistCheck",tokenize:U9};function B9(){return{text:{91:F9}}}function U9(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return yt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(d)}function l(d){return Ve(d)?t(d):it(d)?e.check({tokenize:H9},t,n)(d):n(d)}}function H9(e,t,n){return ut(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function j9(e){return X1([f9(),x9(),O9(e),L9(),B9()])}const z9={};function $9(e){const t=this,n=e||z9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(j9(n)),a.push(u9()),u.push(l9(n))}const V9=()=>w.jsx("span",{className:`${N}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),bo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(HE,{remarkPlugins:[$9],rehypePlugins:[jy],components:{h1:({children:s})=>w.jsx("h1",{className:B(e,`${N}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:B(e,`${N}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:B(e,`${N}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:B(e,`${N}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:B(e,`${N}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:B(e,`${N}-li`),children:s}),a:({href:s,children:a})=>w.jsx(Gy,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:B(e,`${N}-table-container`),children:w.jsx("table",{className:B(e,`${N}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:B(e,`${N}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:B(e,`${N}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:B(e,`${N}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:B(e,`${N}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:B(e,`${N}-td`),children:s}),span:({className:s,children:a})=>s===`${N}-blinking-cursor`?w.jsx(V9,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${N}-blinking-cursor'></span>`:"")}),wo=()=>R.useContext(n1),xo=()=>{const{sendMessage:e,loading:t,isConnected:n}=bn(),{mode:r,status:s}=Vr();return R.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function q9(e){return e.includes("-")&&e===e.toLowerCase()}function _o({tagName:e,props:t,label:n}){const r=R.useRef(null),s=R.useRef(null),a=R.useRef(e),u=R.useRef(null);return R.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!q9(e)){u.current!==e&&(u.current=e,_t(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,l.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,l.replaceChildren();return}try{const f=document.createElement(e);f.props=t,l.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),R.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class Y9 extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function W9(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const G9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=bn();return w.jsx("div",{className:B(t,`${N}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:B(t,`${N}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:B(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:w.jsx("img",{className:B(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:B(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:B(t,`${N}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(W9,{"aria-hidden":"true"})})})},X9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=bn();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:B(t,`${N}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:B(t,`${N}-msg-product-card__title-link`),"aria-label":a,children:e}):w.jsx("p",{className:B(t,`${N}-msg-product-card__title`),children:e})},K9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ft(),{overrides:u,isInitialized:l}=wo(),{sendMessage:d,loading:f}=bn(),p=xo(),m=l?u.ProductTile:void 0;if(m){const H={name:"ProductTile",payload:s!=null?s:{},api:p};return w.jsx(_o,{tagName:m,props:H,label:"ProductTile"})}const{id:b,name:y,imageUrl:x,description:_,productPageUrl:A,price:S,priceBreakdown:C,discountPrice:I,listPrice:z,currencyCode:W}=e,D=I!=null?I:S,V=v8({priceBreakdown:C,currencyCode:W}),ee=()=>{if(f)return;const H=y||"this product",ie=b?` [SKU: ${b}]`:"";d(`Show me details for ${H}${ie}`)},ce=r?`View details for ${y}`:`Go to product page for ${y}`;return w.jsxs("div",{className:B(t,`${N}-msg-product-card`),children:[w.jsx(G9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ce,name:y,showInWidgetDetails:ee}),w.jsxs("div",{className:B(t,`${N}-msg-product-card__content`),children:[w.jsxs("div",{className:B(t,`${N}-msg-product-card__content-header`),children:[w.jsx(X9,{name:y||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ce,showInWidgetDetails:ee}),a&&_&&w.jsx("div",{className:B(t,`${N}-msg-product-card__description`),title:_,children:w.jsx(bo,{globalClassName:t,text:_})})]}),w.jsx("div",{className:B(t,`${N}-msg-product-card__price-row`),children:V?w.jsx("span",{className:B(t,`${N}-msg-product-card__price`),"aria-label":`Price from ${V.low} to ${V.high}`,children:V.range}):w.jsx(lp,{globalClassName:t,retailPrice:z,discountPrice:D,currencyCode:W})})]})]})},Q9=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},J9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ft(),{overrides:l,isInitialized:d}=wo(),f=xo(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(_o,{tagName:p,props:m,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:B(n,`${N}-product-carousel-title`),children:e}),w.jsx(WD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>w.jsxs("div",{className:B(n,`${N}-product-carousel-item`),children:[w.jsx(K9,{product:Q9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:B(n,`${N}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},Tp=44,Z9=400,eF=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?Tp:Math.min(Math.max(Math.round(t),Tp),Z9)},tF=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},nF="parentOrigin",rF=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(nF,t),n.toString()}catch(n){return e}},iF=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},ww=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=R.useRef(null),[s,a]=R.useState(!1),[u,l]=R.useState(Tp),d=typeof window!="undefined"?window.location.origin:"",f=rF(e,d),p=tF(e);return R.useEffect(()=>{const m=b=>{var x,_,A;if(p&&b.origin!==p||r.current&&b.source!==r.current.contentWindow)return;const y=b.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(eF((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(_=y.payload)==null?void 0:_.orderId)!=null?A:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),w.jsx("div",{className:B(t,`${N}-cart-express`,{[`${N}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:B(t,`${N}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},rc=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:B(t,`${N}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(E1,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Rn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=Kr(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:B(s,`${N}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:B(s,`${N}-cart-total-label`),children:[e,t&&w.jsx("span",{className:B(s,`${N}-cart-total-badge`),children:t})]}),w.jsx("span",{className:B(s,`${N}-cart-total-value`),children:d?w.jsx("span",{className:B(s,`${N}-cart-total-shimmer`)}):f})]})};function bp(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function wp(e){return(e!=null?e:[]).map(bp).filter(t=>t!==null)}function xw(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function sF(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=bp(a),l=xw(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=bp(a);if(u===null)continue;const l=(s=xw(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function _w(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>wp(s.coupons)).map(s=>s.toLowerCase()));return sF(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const oF=({quantity:e,loading:t,disabled:n,globalClassName:r,onChange:s})=>{const[a,u]=R.useState(e.toString());R.useEffect(()=>{u(e.toString())},[e]);const l=p=>{if(n)return;const m=p.target.value;/^\d*$/.test(m)&&u(m)},d=()=>{const p=parseInt(a,10);!n&&!isNaN(p)&&p>0&&p!==e?s(p):u(e.toString())},f=p=>{p.key==="Enter"&&(p.preventDefault(),d())};return w.jsx("div",{className:B(r,`${N}-cart-qty-input-wrapper`),children:t?w.jsx(hC,{className:B(r,`${N}-cart-qty-spinner`),"aria-hidden":"true"}):w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:B(r,`${N}-cart-qty-input`),value:a,disabled:n,onChange:l,onBlur:d,onKeyDown:f,"aria-label":"Quantity"})})},aF=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var f,p;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,d=wp(e.coupons);return w.jsxs("li",{className:B(s,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:B(s,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:B(s,`${N}-cart-item-details`),children:[w.jsx("p",{className:B(s,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:B(s,`${N}-cart-item-attrs`),children:[((f=e.variants)!=null?f:[]).map(m=>w.jsxs("p",{className:B(s,`${N}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((p=e.promotions)!=null?p:[]).map(m=>w.jsxs("p",{className:B(s,`${N}-cart-item-attr`),children:["Promotion: ",m]},m))]}),d.length>0&&w.jsx("div",{className:B(s,`${N}-cart-chips`),children:d.map(m=>w.jsx(rc,{code:m,globalClassName:s},m))}),w.jsx("span",{className:B(s,`${N}-cart-item-price`),children:n?w.jsx("span",{className:B(s,`${N}-cart-total-shimmer`)}):w.jsxs(w.Fragment,{children:[l&&w.jsx("span",{className:B(s,`${N}-cart-item-original-price`),children:Kr(e.originalSubtotal,t)}),w.jsx("span",{className:B(s,`${N}-cart-item-final-price`),children:Kr(e.itemSubtotal,t)})]})}),w.jsxs("div",{className:B(s,`${N}-cart-item-footer`),children:[w.jsx("span",{className:B(s,`${N}-cart-qty-heading`),children:"Quantity"}),w.jsx(oF,{quantity:e.quantity,loading:n,disabled:r,globalClassName:s,onChange:m=>u(e,m)}),w.jsx("button",{type:"button",className:B(s,`${N}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},uF=({cart:e,messageId:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a,cartUpdating:u}=bn(),[l,d]=R.useState(!1),[f,p]=R.useState(""),[m,b]=R.useState(null),y=a||u,{items:x=[],currencyCode:_="USD",subtotal:A,total:S,taxes:C,shippingCost:I,shippingDiscount:z,shippingPromotions:W=[],promotionsDiscount:D,promotions:V=[],couponsDiscount:ee,bodyMessage:ce,footerMessage:H,checkoutButtonUrl:ie,expressPaymentUrl:te}=e,ue=_w(x,e.couponsApplied,e.coupons),fe=G=>{y||s(`Remove ${G.name} from my cart`)},ae=G=>{s(G?`I completed express payment. Show my order confirmation for order ${G}.`:"I completed express payment. Show my order confirmation.")},Se=(G,se)=>{y||m||se<1||(b(G.itemId),s(`Update ${G.name} quantity to ${se}`,{silent:!0,reconcileMessageId:t}).then(k=>{k.outcome==="success"?setTimeout(()=>b(null),300):b(null)}))},de=()=>{const G=f.trim();!G||y||(s(`Apply coupon code ${G}`),p(""))};return w.jsxs("div",{className:B(n,`${N}-cart`),children:[w.jsxs("div",{className:B(n,`${N}-cart-box`),children:[ce&&w.jsxs("button",{type:"button",className:B(n,`${N}-cart-summary`),"aria-expanded":l,onClick:()=>d(G=>!G),children:[w.jsx("span",{className:B(n,`${N}-cart-summary-text`),children:w.jsx(bo,{text:ce,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),w.jsx("span",{className:B(n,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:l?w.jsx(m1,{}):w.jsx(g1,{})})]}),l&&w.jsxs("div",{className:B(n,`${N}-cart-expanded`),children:[w.jsxs("div",{className:B(n,`${N}-cart-items-section`),children:[w.jsx("ul",{className:B(n,`${N}-cart-items`),children:x.map(G=>w.jsx(aF,{item:G,currencyCode:_,loading:m===G.itemId,disabled:y||m===G.itemId,globalClassName:n,onRemove:fe,onQuantityChange:Se},G.itemId))}),ue.length>0&&w.jsx("div",{className:B(n,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:ue.map(G=>w.jsx(rc,{code:G.code,inactive:!G.applied,globalClassName:n},G.code))})]}),w.jsxs("div",{className:B(n,`${N}-cart-totals`),children:[w.jsx(Rn,{label:"Subtotal",value:A,currencyCode:_,globalClassName:n,loading:!!m}),w.jsx(Rn,{label:"Coupon",value:ee,currencyCode:_,globalClassName:n,isDiscount:!0,loading:!!m}),w.jsx(Rn,{label:"Promotions",badge:V[0],value:D,currencyCode:_,globalClassName:n,isDiscount:!0,loading:!!m}),w.jsx(Rn,{label:"Shipping",value:I,currencyCode:_,globalClassName:n,fallback:"TBD",loading:!!m}),w.jsx(Rn,{label:"Shipping Discount",badge:W[0],value:z,currencyCode:_,globalClassName:n,isDiscount:!0,loading:!!m}),w.jsx(Rn,{label:"Tax",value:C,currencyCode:_,globalClassName:n,fallback:"TBD",loading:!!m}),w.jsx(Rn,{label:"Total",value:S,currencyCode:_,globalClassName:n,emphasized:!0,loading:!!m})]})]})]}),w.jsxs("div",{className:B(n,`${N}-cart-coupon`),children:[w.jsxs("div",{className:B(n,`${N}-cart-coupon-field`),children:[w.jsx("span",{className:B(n,`${N}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(E1,{})}),w.jsx("input",{type:"text",className:B(n,`${N}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:f,disabled:y,onChange:G=>p(G.target.value),onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),de())}})]}),w.jsx("button",{type:"button",className:B(n,`${N}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!f.trim(),onClick:de,children:w.jsx(gC,{"aria-hidden":"true"})})]}),te&&w.jsx(ww,{expressPaymentUrl:te,globalClassName:n,onOrderComplete:ae}),ie&&w.jsxs("a",{className:B(n,`${N}-cart-checkout-button`),href:ie,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(pC,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]}),w.jsx("p",{className:B(n,`${N}-cart-footer`),children:H||"Shipping and taxes calculated at checkout."})]})},lF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=wp(e.coupons);return w.jsxs("li",{className:B(n,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:B(n,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:B(n,`${N}-cart-item-details`),children:[w.jsx("p",{className:B(n,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:B(n,`${N}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:B(n,`${N}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:B(n,`${N}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:B(n,`${N}-cart-chips`),children:s.map(l=>w.jsx(rc,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:B(n,`${N}-cart-item-price`),children:[r&&w.jsx("span",{className:B(n,`${N}-cart-item-original-price`),children:Kr(e.originalSubtotal,t)}),w.jsx("span",{className:B(n,`${N}-cart-item-final-price`),children:Kr(e.itemSubtotal,t)})]}),w.jsx("div",{className:B(n,`${N}-cart-item-footer`),children:w.jsxs("span",{className:B(n,`${N}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},cF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},dF=({order:e,globalClassName:t})=>{const[n,r]=R.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:b,shippingPromotions:y=[],promotionsDiscount:x,promotions:_=[],couponsDiscount:A,bodyMessage:S,footerMessage:C}=e,I=_w(u,e.couponsApplied);return w.jsxs("div",{className:B(t,`${N}-cart`),children:[w.jsxs("div",{className:B(t,`${N}-cart-banner`),children:[w.jsx("span",{className:B(t,`${N}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(EC,{})}),w.jsx("p",{className:B(t,`${N}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:B(t,`${N}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",cF(a)]})]}),w.jsxs("div",{className:B(t,`${N}-cart-box`),children:[S&&w.jsxs("button",{type:"button",className:B(t,`${N}-cart-summary`),"aria-expanded":n,onClick:()=>r(z=>!z),children:[w.jsx("span",{className:B(t,`${N}-cart-summary-text`),children:w.jsx(bo,{text:S,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:B(t,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(m1,{}):w.jsx(g1,{})})]}),n&&w.jsxs("div",{className:B(t,`${N}-cart-expanded`),children:[w.jsx("ul",{className:B(t,`${N}-cart-items`),children:u.map(z=>w.jsx(lF,{item:z,currencyCode:l,globalClassName:t},z.itemId))}),I.length>0&&w.jsx("div",{className:B(t,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:I.map(z=>w.jsx(rc,{code:z.code,globalClassName:t},z.code))}),w.jsxs("div",{className:B(t,`${N}-cart-totals`),children:[w.jsx(Rn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Rn,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Promotions",badge:_[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Rn,{label:"Shipping Discount",badge:y[0],value:b,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Rn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:B(t,`${N}-cart-footer`),children:C||"Shipping and taxes calculated at checkout."})]})},fF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=R.useState(e.src),[a,u]=R.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:B(n,`${N}-pdp-gallery__image`,{[`${N}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},hF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(np,{className:B(n,`${N}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(Zh,{className:B(n,`${N}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(Jh,{index:a,className:B(n,`${N}-pdp-gallery__item`),children:w.jsx(fF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(Xh,{className:B(n,`${N}-pdp-gallery__control`),children:[w.jsx(tp,{className:B(n,`${N}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(yb,{size:"16px"})}),w.jsx(ep,{className:B(n,`${N}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(Tb,{size:"16px"})})]}),r&&w.jsx(Qh,{className:B(n,`${N}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(Kh,{index:a,className:B(n,`${N}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Va="color",xp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,pF=e=>e.replace(/(^|\/)large\//,"$1medium/"),Sw=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Va&&n.vals.includes(t)),vw=(e,t)=>{const n=pF(t),r=xp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:xp(e,t)}},mF=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>Sw(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>vw(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[vw(e.baseUrl,e.imageUrl)]:[]},gF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&Sw(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?xp(e.baseUrl,r):""},ic=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),EF=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},yF=(e,t,n,r,s)=>{if(!e||e.length===0)return le(j({},s),{[n]:r});const a=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length&&Object.entries(s).every(([f,p])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===p})});if(a)return j({},a.vars);const u=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length});return u?j({},u.vars):le(j({},s),{[n]:r})},Aw=(e,t)=>{var s,a,u,l;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},TF=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},bF=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>ic(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},wF=300,xF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var st,St,Lt,pn,xn,Dt,ze;const{addToCart:s,sendMessage:a,loading:u}=bn(),{overrides:l,isInitialized:d}=wo(),f=xo(),p=e.data,m=(st=p.vattr)!=null?st:[],[b,y]=R.useState(()=>bF(p)),x=EF(p.vmat,b),_=(Lt=(St=p.quantity)==null?void 0:St.minQuantity)!=null?Lt:1,A=(xn=(pn=p.quantity)==null?void 0:pn.maxQuantity)!=null?xn:Number.POSITIVE_INFINITY,S=(ze=(Dt=p.quantity)==null?void 0:Dt.increment)!=null?ze:1,[C,I]=R.useState(_),[z,W]=R.useState(!1),D=R.useRef(!1);R.useEffect(()=>{z&&(u?D.current=!0:D.current&&(D.current=!1,W(!1)))},[z,u]);const V=b[Va],ee=R.useMemo(()=>mF(p,V),[p,V]),ce=R.useMemo(()=>TF(p,b),[p,b]),H=m.find(Oe=>Oe.id===Va),ie=m.filter(Oe=>Oe.id!==Va),te=Aw(p,b),[ue,fe]=R.useState(C),ae=R.useRef(te),Se=ae.current===te?ue:C;R.useEffect(()=>{if(ae.current!==te){ae.current=te,fe(C);return}const Oe=window.setTimeout(()=>fe(C),wF);return()=>window.clearTimeout(Oe)},[C,te]);const de=C===ue,G=R.useMemo(()=>x&&(ae.current!==te||de)?iF(p.expressPaymentUrl,te,Se):null,[p.expressPaymentUrl,te,Se,x,de]),se=R.useCallback(Oe=>{a(Oe?`I completed express payment. Show my order confirmation for order ${Oe}.`:"I completed express payment. Show my order confirmation.")},[a]),k=d?l.ProductDetailCard:void 0;if(k){const Oe={name:"ProductDetailCard",payload:e,api:f};return w.jsx(_o,{tagName:k,props:Oe,label:"ProductDetailCard"})}const M=(Oe,Xe)=>()=>{y(tt=>{const pt=!ic(p.vmat,Oe,Xe,tt);return Oe===Va||pt?yF(p.vmat,m,Oe,Xe,tt):le(j({},tt),{[Oe]:Xe})})},J=()=>{if(u)return;const Oe=Aw(p,b);if(!Oe)return;const Xe=m.map(tt=>{const pt=tt.opts.find(Mt=>Mt.val===b[tt.id]);return pt?{label:tt.lbl||tt.id,value:pt.name||pt.val}:null}).filter(tt=>tt!==null);W(!0),s({productName:p.name,sku:Oe,quantity:C,variants:Xe})},P=!x||C-S<_,_e=!x||C+S>A,ve=Oe=>{var tt;const Xe=b[Oe.id];return(tt=Oe.opts.find(pt=>pt.val===Xe))==null?void 0:tt.name},me=()=>I(Oe=>Math.max(_,Oe-S)),Ie=()=>I(Oe=>Math.min(A,Oe+S)),Fe=Oe=>w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Oe.id}`,className:B(t,`${N}-msg-pdp__variant-name`),children:Oe.lbl||Oe.id}),ve(Oe)&&w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-value`),children:ve(Oe)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Oe.id}`,className:B(t,`${N}-msg-pdp__chips`),children:Oe.opts.map(Xe=>{const tt=ic(p.vmat,Oe.id,Xe.val,b),pt=b[Oe.id]===Xe.val;return w.jsxs("label",{className:B(`${N}-msg-pdp__chip`,{selected:pt,unavailable:!tt}),children:[w.jsx("input",{type:"radio",name:`variant-${Oe.id}`,value:Xe.val,checked:pt,"aria-description":tt?void 0:"unavailable",onChange:M(Oe.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Xe.name||Xe.val})]},Xe.val)})})]},Oe.id),Ge=Oe=>w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Oe.id}`,className:B(t,`${N}-msg-pdp__variant-name`),children:Oe.lbl||"Color"}),ve(Oe)&&w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-value`),children:ve(Oe)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Oe.id}`,className:B(t,`${N}-msg-pdp__swatches`),children:Oe.opts.map(Xe=>{const tt=ic(p.vmat,Oe.id,Xe.val,b),pt=b[Oe.id]===Xe.val,Mt=gF(p,Xe.val);return Mt?w.jsxs("label",{className:B(`${N}-msg-pdp__swatch`,{selected:pt,unavailable:!tt}),children:[w.jsx("input",{type:"radio",name:`variant-${Oe.id}`,value:Xe.val,checked:pt,"aria-label":Xe.name||Xe.val,"aria-description":tt?void 0:"unavailable",onChange:M(Oe.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("img",{className:B(t,`${N}-msg-pdp__swatch-image`),src:Mt,alt:Xe.name||Xe.val,loading:"lazy"})]},Xe.val):w.jsxs("label",{className:B(`${N}-msg-pdp__chip`,{selected:pt,unavailable:!tt}),children:[w.jsx("input",{type:"radio",name:`variant-${Oe.id}`,value:Xe.val,checked:pt,"aria-description":tt?void 0:"unavailable",onChange:M(Oe.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Xe.name||Xe.val})]},Xe.val)})})]});return w.jsx("div",{className:B(t,`${N}-msg-pdp`),children:w.jsxs("div",{className:B(t,`${N}-msg-pdp__card`),children:[w.jsx("div",{className:B(t,`${N}-msg-pdp__gallery`),children:w.jsx(hF,{images:ee,altText:p.name,globalClassName:t})}),w.jsxs("div",{className:B(t,`${N}-msg-pdp__content`),children:[p.slugUrl?w.jsx("a",{href:p.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:B(t,`${N}-msg-pdp__title-link`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):w.jsx("p",{className:B(t,`${N}-msg-pdp__title`),children:p.name}),w.jsx(lp,{globalClassName:t,className:`${N}-msg-pdp__price`,retailPrice:ce==null?void 0:ce.orig,discountPrice:(ce==null?void 0:ce.cur)||(ce==null?void 0:ce.prom),currencyCode:p.ccy,fontSize:"14px"}),p.dscr&&w.jsx("div",{className:B(t,`${N}-msg-pdp__description`),children:w.jsx(bo,{globalClassName:t,text:p.dscr})}),H&&Ge(H),ie.map(Fe),r&&w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:B(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:B(t,`${N}-msg-pdp__variant-value`),children:C})]}),w.jsxs("div",{className:B(t,`${N}-msg-pdp__stepper`),children:[w.jsx(lr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(sC,{}),disabled:P,onClick:me}),w.jsx("span",{className:B(t,`${N}-msg-pdp__quantity`),children:C}),w.jsx(lr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(oC,{}),disabled:_e,onClick:Ie})]})]}),r&&w.jsxs("div",{className:B(t,`${N}-msg-pdp__actions`),children:[G&&w.jsx(ww,{expressPaymentUrl:G,globalClassName:t,onOrderComplete:se},G),w.jsx(yf,{className:`${N}-msg-pdp__add-to-cart`,disabled:!x||u||z,onClick:J,children:z?"Adding...":"Add to cart"})]})]})]})})},_F=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},SF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{overrides:s,isInitialized:a}=wo(),u=xo(),l=a?s.ProductComparison:void 0;if(l){const p={name:"ProductComparison",payload:{products:e,table:t},api:u};return w.jsx(_o,{tagName:l,props:p,label:"ProductComparison"})}if(!e.length)return null;const d=`auto repeat(${e.length}, 1fr)`,f=`${90+e.length*140}px`;return w.jsx("div",{className:B(n,`${N}-product-comparison`),children:w.jsxs("div",{className:`${N}-product-comparison__grid`,style:{gridTemplateColumns:d,minWidth:f},children:[w.jsxs("div",{className:`${N}-product-comparison__header`,children:[w.jsx("div",{className:`${N}-product-comparison__header-spacer`}),e.map(p=>{var b,y,x,_;const m=_F(p);return w.jsxs("div",{className:B(n,`${N}-product-comparison__product-col`),children:[m&&w.jsx("img",{className:B(n,`${N}-product-comparison__image`),src:m,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?w.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:B(n,`${N}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):w.jsx("span",{className:B(n,`${N}-product-comparison__name`),children:p.name}),w.jsx(lp,{globalClassName:n,retailPrice:(b=p.pr)==null?void 0:b.orig,discountPrice:(_=(y=p.pr)==null?void 0:y.prom)!=null?_:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),w.jsx("div",{className:`${N}-product-comparison__table`,children:t.map(p=>w.jsxs("div",{className:`${N}-product-comparison__row`,children:[w.jsx("div",{className:B(n,`${N}-product-comparison__row-label`),children:p.row_name}),e.map((m,b)=>w.jsx("div",{className:B(n,`${N}-product-comparison__row-value`),children:p.values[b]},`${p.row_name}-${m.id}`))]},p.row_name))})]})})},kw=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u,cartUpdating:l}=bn(),{isCartMgmtSupported:d,logger:f}=ft(),{overrides:p,isInitialized:m}=wo(),b=xo(),y=R.useMemo(()=>e.response.flatMap($A),[e.response]);return w.jsx(w.Fragment,{children:y.map((x,_)=>{var A,S,C,I,z,W,D,V,ee,ce,H,ie,te,ue,fe,ae,Se,de,G,se,k,M,J,P,_e;switch(x.type){case"markdown":{const ve=(S=(A=x.data)==null?void 0:A.content)!=null?S:"";return x.index===ci&&Ig(ve)?null:w.jsx(bo,{text:ve,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${x.type}-${(C=x.index)!=null?C:_}`)}case"product_carousel":return w.jsx(J9,{title:(z=(I=x.data)==null?void 0:I.title)!=null?z:"",products:(D=(W=x.data)==null?void 0:W.products)!=null?D:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(V=x.index)!=null?V:_}`);case"product_tile":return w.jsx(xF,{product:x.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(ee=x.index)!=null?ee:_}`);case"product_comparison":return w.jsx(SF,{products:(H=(ce=x.data)==null?void 0:ce.products)!=null?H:[],table:(te=(ie=x.data)==null?void 0:ie.table)!=null?te:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(ue=x.index)!=null?ue:_}`);case"cart":{const ve=(Se=(ae=(fe=x.data)==null?void 0:fe.cart)==null?void 0:ae.cartSummary)==null?void 0:Se.cartDetails;return ve?w.jsx(uF,{cart:ve,messageId:t,productsToHighlight:x.data.products_to_highlight,globalClassName:n,openLinksInNewTab:r},`${x.type}-${(de=x.index)!=null?de:_}`):null}case"order_confirmation":{const ve=(se=(G=x.data)==null?void 0:G.order)==null?void 0:se.orderDetails;return ve?w.jsx(dF,{order:ve,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(k=x.index)!=null?k:_}`):null}case"tool_results":{const ve=x.data,me=x.output_name,Ie=m&&me&&Object.prototype.hasOwnProperty.call(p,me)?p[me]:void 0,Fe=typeof Ie=="string"?Ie:void 0;if(!Fe||!me)return f!=null&&f.isDevelopment&&(me?f.warn(`🦜 tool_results "${me}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${me}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(p),payload:ve}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:ve})),null;const Ge={name:me,payload:ve,api:b};return w.jsx(Y9,{overrideName:me,children:w.jsx(_o,{tagName:Fe,props:Ge,label:`toolResult:${me}`})},`${x.type}-${me}-${(M=x.index)!=null?M:_}`)}case"suggestions":return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(k8,{disabled:u||l,suggestions:(P=(J=x.data)==null?void 0:J.display_text)!=null?P:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:a})},`${x.type}-${(_e=x.index)!=null?_e:_}`);default:return null}})})};class Cw extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:B(this.props.globalClassName,`${N}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const vF=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ft(),a=R.useMemo(()=>{if(typeof e.content!="string")return null;const l=na(e.content);if(l)return l;const d=Og(e.content);return d?{response:[d]}:null},[e.content]),u=R.useMemo(()=>{var f;const l="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),l;const d=e.content.trim();try{const p=JSON.parse(d);if(typeof p=="object"&&p!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),(f=Cg(p))!=null?f:l}catch(p){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),l}return e.content||l},[s,e.content]);switch(e.role){case"user":return w.jsx("div",{className:B(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("div",{className:B(t,`${N}-user-message`,r?"standalone":"embedded"),children:w.jsxs("div",{className:B(t,`${N}-user-message-row`,r?"standalone":"embedded"),children:[w.jsx("span",{className:B(t,`${N}-message-icon user-message-icon`,r?"standalone":"embedded"),children:w.jsx(mC,{})}),w.jsx("p",{className:B(t,`${N}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return w.jsx("div",{className:B(t,`${N}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${N}-message-group-child`,children:a?w.jsx(Cw,{globalClassName:t,children:w.jsx(kw,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(bo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:B(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:B(t,`${N}-reset-message`),children:e.content})})}},AF=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:B(n,`${N}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:B(n,`${N}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:B(n,`${N}-retry-button`),onClick:t,children:[w.jsx(bC,{"aria-hidden":"true"})," Retry"]})]}),kF="You are offline or we couldn't reach the assistant. Check connection and try again.",_p=({isWidgetStandalone:e})=>{var H,ie;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ft(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:b,retryLastMessage:y,retryConnection:x}=bn(),_=R.useRef(null),A=a.length>0,S=u.some(qA),C=a[a.length-1],I=C?VA(C.content,"suggestions"):!1,z=A&&(d||l)&&!S&&!I,W=p==="reconnecting"&&!z,D=p==="error";let V=null;D?V={message:m!=null?m:kF,kind:"connection",onRetry:x}:b&&(V={message:b.message,kind:"send",onRetry:y}),R.useEffect(()=>{var te;(te=_.current)==null||te.scrollIntoView({behavior:"smooth"})},[]),R.useEffect(()=>{var te;s&&((te=_.current)==null||te.scrollIntoView({behavior:"smooth"}))},[a,u,b,m,s]);const ee=(H=V==null?void 0:V.message)!=null?H:null,ce=(ie=V==null?void 0:V.kind)!=null?ie:null;return R.useEffect(()=>{ee&&(r==null||r.error("Error message shown to user",{message:ee,kind:ce}))},[ee,ce,r]),w.jsxs(w.Fragment,{children:[d&&!A&&w.jsx(P8,{globalClassName:t,isWidgetStandalone:e}),a.map(te=>w.jsx(vF,{message:te,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},te.id)),V&&w.jsx(AF,{message:V.message,onRetry:V.onRetry,globalClassName:t,isWidgetStandalone:e}),S&&w.jsxs("div",{className:B(t,`${N}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Cw,{globalClassName:t,children:w.jsx(kw,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||l)&&w.jsx(cp,{globalClassName:t,isWidgetStandalone:e})]}),z&&w.jsx(cp,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),W&&w.jsx(cp,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),w.jsx("div",{ref:_})]})},CF=()=>w.jsxs("svg",{className:`${N}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),NF=()=>w.jsx("svg",{className:`${N}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),OF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Sp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ft(),s=e!=null?e:r,{overrides:a,isInitialized:u}=wo(),l=xo();if(t.length===0||s===0)return null;const d=OF(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(_o,{tagName:f,props:p,label:"ProgressSteps"})}return w.jsx("div",{className:B(n,`${N}-progress-steps-panel`),children:w.jsx("div",{className:`${N}-progress-steps`,children:w.jsx("ul",{className:`${N}-progress-steps-list`,children:d.map((p,m)=>{const b=m<d.length-1,y=m===d.length-1;return w.jsxs("li",{className:B(`${N}-progress-step`,y&&"active"),children:[y&&w.jsx("span",{className:`${N}-progress-step-arc`}),w.jsx("span",{className:`${N}-progress-step-text`,children:p}),w.jsx("span",{className:B(`${N}-progress-step-icon`,b?"done":"active"),children:b?w.jsx(CF,{}):w.jsx(NF,{})})]},`${m}-${p}`)})})})})},Nw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ft(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=bn(),f=s;return w.jsxs("div",{className:B(e,`${N}-container`,`${N}-embedded-chat`),style:t,children:[w.jsx("div",{className:B(e,`${N}-message-container`,`container-${n}`,"embedded"),children:w.jsx(_p,{isWidgetStandalone:!1})}),w.jsx(Sp,{steps:l,globalClassName:e}),w.jsx(fh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),w.jsx("div",{className:B(`${N}-embedded-chat-menu`),children:w.jsxs(ND,{componentType:"chat",children:[w.jsx(Vb,{componentType:"chat"}),w.jsx(Qy,{componentType:"chat",onClearChat:u}),r&&w.jsx(Jy,{componentType:"chat",onDownloadTranscript:d})]})})]})},Ow=e=>{var d;const{children:t,disabled:n}=e,[r,s]=R.useState((d=e.container)==null?void 0:d.current),a=R.useSyncExternalStore(PF,()=>!1,()=>!0),{getRootNode:u}=Kl();if(R.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const l=r!=null?r:IF(u);return w.jsx(w.Fragment,{children:R.Children.map(t,f=>$s.createPortal(f,l))})},IF=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return as(n)?n:Cr(t).body},PF=()=>()=>{},Iw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ft(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=Vr(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:b,downloadTranscript:y}=bn(),{isOpen:x}=s||{},_=!!s.isOpen,A=r==="standalone",S=f||d,C=()=>{$r(!1)};return _?w.jsx(Mb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:w.jsx(Ow,{children:w.jsx(sp,{className:B(e,`${N}-container`,`${N}-dialog`,a,u&&"full-height"),style:j(j({},t),l&&{width:l}),children:w.jsxs(rp,{className:B(e,`${N}-dialog-content`,{standalone:A,embedded:!A}),children:[w.jsx(jb,{componentType:"dialog",onClearChat:m,onClose:C,onDownloadTranscript:y}),w.jsx(ip,{className:B(e,`${N}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:w.jsx(_p,{isWidgetStandalone:A,isOpen:x})}),w.jsx(Sp,{steps:b,globalClassName:e}),w.jsx(fh,{componentType:"dialog",isLoading:S,onSubmit:I=>p(I)})]})})})}):null},Pw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ft(),{mode:r,status:s,isModalFullscreen:a}=Vr(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=bn(),{isOpen:b}=s||{},y=!!s.isOpen,x=r==="standalone",_=l||u,A=({open:C})=>{$r(C)},S=()=>{$r(!1)};return y?w.jsx(Mb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:w.jsx(Ow,{children:w.jsxs("div",{className:B(e,`${N}-modal-container`),style:t,children:[w.jsx(Ib,{className:B(e,`${N}-modal-backdrop`)}),w.jsx(sp,{className:B(e,`${N}-container`,`${N}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:w.jsxs(rp,{className:B(e,`${N}-modal-content`,{standalone:x,embedded:!x}),children:[w.jsx(jb,{componentType:"modal",onClearChat:f,onClose:S,onDownloadTranscript:m}),w.jsx(ip,{className:B(e,`${N}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:w.jsx(_p,{isWidgetStandalone:x,isOpen:b})}),w.jsx(Sp,{steps:p,globalClassName:e}),w.jsx(fh,{componentType:"modal",isLoading:_,onSubmit:C=>d(C)})]})})]})})}):null},RF=()=>{const e=Vr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(cC,{}):t==="dialog"?w.jsx(Iw,{}):t==="modal"?w.jsx(Pw,{}):w.jsx(Nw,{})},LF=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=b8();R.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&s(d))};return p8(a),()=>{m8(a)}},[e,t,n,r,s])},Rw=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function DF({isReady:e,hasError:t,transmit:n}){const r=R.useRef([]),s=R.useRef(e);s.current=e;const a=R.useRef(n);a.current=n;const u=R.useCallback((l,d)=>{s.current?Rw(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return R.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>Rw(a.current,d,f))}},[e]),R.useEffect(()=>{t&&(r.current=[])},[t]),u}const Lw={copilot:"Ask Copilot",messaging:"Ask a question"},MF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ft(),{placeholder:s,isResponseLoading:a}=Zl(),u=s||Lw[r],[l,d]=R.useState(""),f=t||a,p=m=>{const b=l.trim();b&&(m.preventDefault(),e(b),d(""))};return w.jsxs("form",{className:B(n,`${N}-prompts-input-container`),name:`${N}-prompts-form`,onSubmit:p,children:[w.jsx("label",{htmlFor:`${N}-prompts-input`,"aria-label":u,children:w.jsx(Gh,{className:B(n,`${N}-prompts-input-icon`)})}),w.jsx("input",{id:`${N}-prompts-input`,className:B(n,`${N}-prompts-input`),name:`${N}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),w.jsx(lr,{className:B(n,`${N}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Ef,{}),disabled:f})]})},FF=()=>{const{globalClassName:e,mode:t}=ft(),{placeholder:n}=Zl(),r=n||Lw[t];return w.jsxs("div",{className:B(e,`${N}-prompts-header`),children:[w.jsx(Gh,{className:B(e,`${N}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:B(e,`${N}-prompts-header-text`),children:r})]})},Dw=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=ft(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:B(r,`${N}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx($b,{icon:a,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},BF="Ask me something else",UF=({label:e,disabled:t=!1})=>w.jsx(Dw,{label:e||BF,disabled:t,onClick:()=>$r(!0)}),HF=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ft(),{messages:r}=bn(),{staticQuestions:s,askElseButtonLabel:a,disableAskElseButton:u}=Zl(),l=R.useMemo(()=>{var y;const f=r.filter(x=>x.role==="agent");if(!f.length)return s;const m=f.map(x=>na(x.content)).filter(Boolean).flatMap(x=>x==null?void 0:x.response.filter(_=>_.type==="suggestions"));if(!m.length)return s;const b=m[m.length-1];return(y=b==null?void 0:b.data.display_text)!=null?y:s},[r,s]);if(l.length===0)return null;const d=f=>()=>{const p=f.trim();p&&e(p)};return w.jsxs("div",{className:B(n,`${N}-prompts-button-group`),children:[l.map(f=>w.jsx(Dw,{label:f,disabled:t,onClick:d(f)},f)),!u&&w.jsx(UF,{label:a,disabled:t})]})},jF=()=>{const{globalClassName:e,themeVariables:t}=ft(),{isOpen:n,elementId:r,promptsDisplay:s,staticQuestions:a}=Zl(),{isConnected:u,sessionExpired:l,canInitialize:d,sendMessage:f,connectionStatus:p}=bn(),{productId:m}=T8(),b=s!=="buttons",y=s!=="input",[x,_]=R.useState(null),A=p==="error",S=p==="connecting",C=Fg(u,l,d),I=DF({isReady:C,hasError:A,transmit:f});R.useEffect(()=>{if(!r||x)return;const W=document.getElementById(r);W&&_(W)},[r,x]);const z=R.useCallback(W=>{$r(!0);const D=(a||[]).includes(W.trim());if(m&&D){I(`${W} (Viewing product details for: ${m})`,{displayContent:W});return}I(W)},[I,a,m]);return!n||!x?null:$s.createPortal(w.jsxs("div",{className:B(e,`${N}-prompts-extension-container`),style:t,children:[b&&w.jsx(MF,{onSubmit:z,disabled:A}),!b&&w.jsx(FF,{}),y&&w.jsx(HF,{onPromptClick:z,disabled:A}),!A&&S&&w.jsx("p",{className:B(e,`${N}-prompts-connecting-message`),children:"Connecting to agent..."}),A&&w.jsx("p",{className:B(e,`${N}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),x)},zF=()=>(LF(),w.jsx(jF,{})),Mw=e=>w.jsxs(r1,le(j({},e),{children:[w.jsx(RF,{}),w.jsx(zF,{})]}));var sc={},Fw;function $F(){if(Fw)return sc;Fw=1;var e=u1();return sc.createRoot=e.createRoot,sc.hydrateRoot=e.hydrateRoot,sc}var VF=$F();const Bw=(e,t,n,r)=>{VF.createRoot(e).render(w.jsx(Mw,le(j({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},qF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=vn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const b of p)if(b.type==="childList"&&b.addedNodes.length)for(const y of b.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(_t(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),Bw(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),_t(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},YF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=vn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){_t(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){_t(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){_t(!0,"warn","Container element not found for id:",t),_t(!0,"warn","Beginning observation for element"),qF(j({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Bw(l,s,n,r)};class WF extends HTMLElement{constructor(){super(...arguments);Qe(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const GF={components:{setEntryType:B0,toggleWidgetOpen:$r,toggleWidgetMinimized:Du,toggleModalFullscreen:Ld,setWidgetType:Mu,setWidgetDialogPosition:Dd,loadPromptsComponent:y8,togglePromptsExtensionOpen:Hb}};function XF(){return Be(this,null,function*(){return Ck().getAuthLinkKey()})}He.AgentForceWidget=Mw,He.AgentforceWidgetProvider=r1,He.CIMULATE_WIDGET_READY_EVENT=M0,He.MessagingDialog=Iw,He.MessagingEmbed=Nw,He.MessagingModal=Pw,He.MessagingProvider=Hg,He.OverrideElement=WF,He.eventHandlers=GF,He.getAuthLinkKey=XF,He.injectMessagingWidget=YF,He.useMessaging=bn,Object.defineProperty(He,Symbol.toStringTag,{value:"Module"})}));