@cimulate/copilot-widget 1.44.1 → 1.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/messaging.es.js +118 -105
- package/dist/messaging.umd.js +9 -9
- package/package.json +1 -1
package/dist/messaging.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(Fe,Ge){typeof exports=="object"&&typeof module!="undefined"?Ge(exports):typeof define=="function"&&define.amd?define(["exports"],Ge):(Fe=typeof globalThis!="undefined"?globalThis:Fe||self,Ge(Fe.CimulateMessaging={}))})(this,(function(Fe){"use strict";var hj=Object.defineProperty,pj=Object.defineProperties;var mj=Object.getOwnPropertyDescriptors;var Ld=Object.getOwnPropertySymbols;var Sv=Object.prototype.hasOwnProperty,vv=Object.prototype.propertyIsEnumerable;var ia=(Fe,Ge)=>(Ge=Symbol[Fe])?Ge:Symbol.for("Symbol."+Fe),gj=Fe=>{throw TypeError(Fe)},Dd=Math.pow,$0=(Fe,Ge,nt)=>Ge in Fe?hj(Fe,Ge,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Fe[Ge]=nt,F=(Fe,Ge)=>{for(var nt in Ge||(Ge={}))Sv.call(Ge,nt)&&$0(Fe,nt,Ge[nt]);if(Ld)for(var nt of Ld(Ge))vv.call(Ge,nt)&&$0(Fe,nt,Ge[nt]);return Fe},fe=(Fe,Ge)=>pj(Fe,mj(Ge));var vn=(Fe,Ge)=>{var nt={};for(var Tt in Fe)Sv.call(Fe,Tt)&&Ge.indexOf(Tt)<0&&(nt[Tt]=Fe[Tt]);if(Fe!=null&&Ld)for(var Tt of Ld(Fe))Ge.indexOf(Tt)<0&&vv.call(Fe,Tt)&&(nt[Tt]=Fe[Tt]);return nt};var Xe=(Fe,Ge,nt)=>$0(Fe,typeof Ge!="symbol"?Ge+"":Ge,nt);var ke=(Fe,Ge,nt)=>new Promise((Tt,Bt)=>{var Ct=Nt=>{try{cn(nt.next(Nt))}catch(An){Bt(An)}},ze=Nt=>{try{cn(nt.throw(Nt))}catch(An){Bt(An)}},cn=Nt=>Nt.done?Tt(Nt.value):Promise.resolve(Nt.value).then(Ct,ze);cn((nt=nt.apply(Fe,Ge)).next())}),qs=function(Fe,Ge){this[0]=Fe,this[1]=Ge},z0=(Fe,Ge,nt)=>{var Tt=(cn,Nt,An,pr)=>{try{var Zi=nt[cn](Nt),Ws=(Nt=Zi.value)instanceof qs,Ys=Zi.done;Promise.resolve(Ws?Nt[0]:Nt).then(In=>Ws?Tt(cn==="return"?cn:"next",Nt[1]?{done:In.done,value:In.value}:In,An,pr):An({value:In,done:Ys})).catch(In=>Tt("throw",In,An,pr))}catch(In){pr(In)}},Bt=(cn,Nt,An,pr)=>ze[cn]=Zi=>(Nt=new Promise((Ws,Ys,In)=>(In=()=>Tt(cn,Zi,Ws,Ys),Ct?Ct.then(In):In())),pr=()=>Ct===An&&(Ct=0),Ct=An=Nt.then(pr,pr),Nt),Ct,ze={};return nt=nt.apply(Fe,Ge),ze[ia("asyncIterator")]=()=>ze,Bt("next"),Bt("throw"),Bt("return"),ze},V0=Fe=>{var Ge=Fe[ia("asyncIterator")],nt=!1,Tt,Bt={};return Ge==null?(Ge=Fe[ia("iterator")](),Tt=Ct=>Bt[Ct]=ze=>Ge[Ct](ze)):(Ge=Ge.call(Fe),Tt=Ct=>Bt[Ct]=ze=>{if(nt){if(nt=!1,Ct==="throw")throw ze;return ze}return nt=!0,{done:!1,value:new qs(new Promise(cn=>{var Nt=Ge[Ct](ze);Nt instanceof Object||gj("Object expected"),cn(Nt)}),1)}}),Bt[ia("iterator")]=()=>Bt,Tt("next"),"throw"in Ge?Tt("throw"):Bt.throw=Ct=>{throw Ct},"return"in Ge&&Tt("return"),Bt},Av=(Fe,Ge,nt)=>(Ge=Fe[ia("asyncIterator")])?Ge.call(Fe):(Fe=Fe[ia("iterator")](),Ge={},nt=(Tt,Bt)=>(Bt=Fe[Tt])&&(Ge[Tt]=Ct=>new Promise((ze,cn,Nt)=>(Ct=Bt.call(Fe,Ct),Nt=Ct.done,Promise.resolve(Ct.value).then(An=>ze({value:An,done:Nt}),cn)))),nt("next"),nt("return"),Ge);var Ge=document.createElement("style");Ge.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-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-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);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.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-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;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-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}& input.cim-widget-search-input{flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.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-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;min-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:var(--cim-widget-border-radius);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.cim-widget-cart-busy{opacity:.7}.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:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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: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 #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-link: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-jump-to-latest{position:sticky;bottom:.75rem;z-index:9999;height:0;pointer-events:none}.cim-widget-jump-to-latest-button{position:absolute;right:0;bottom:0;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:50%;background-color:var(--cim-widget-background-color, #fff);color:var(--cim-widget-primary-color, #3182ce);box-shadow:0 2px 8px #0000001f;font-family:var(--cim-widget-font-family);font-size:.8125rem;font-weight:600;line-height:1;cursor:pointer}.cim-widget-jump-to-latest-button:hover{background-color:var(--cim-widget-background-color, #fff)}.cim-widget-jump-to-latest-button:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.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-user-message-body{display:flex;flex-direction:column;gap:.375rem;min-width:0}.cim-widget-user-message-body:has(.cim-widget-user-message-image){align-items:flex-end}.cim-widget-user-message-image{max-width:12rem;max-height:12rem;width:auto;height:auto;object-fit:contain;border-radius:8px}.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-font-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-font-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-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.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:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.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:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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(Ge);function nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tt={exports:{}},Bt={},Ct={exports:{}},ze={};var cn;function Nt(){if(cn)return ze;cn=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 T(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function v(B,Z,L){this.props=B,this.context=Z,this.refs=A,this.updater=L||y}v.prototype.isReactComponent={},v.prototype.setState=function(B,Z){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,Z,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function x(){}x.prototype=v.prototype;function k(B,Z,L){this.props=B,this.context=Z,this.refs=A,this.updater=L||y}var I=k.prototype=new x;I.constructor=k,_(I,v.prototype),I.isPureReactComponent=!0;var j=Array.isArray,q=Object.prototype.hasOwnProperty,R={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function ne(B,Z,L){var xe,De={},he=null,Ne=null;if(Z!=null)for(xe in Z.ref!==void 0&&(Ne=Z.ref),Z.key!==void 0&&(he=""+Z.key),Z)q.call(Z,xe)&&!X.hasOwnProperty(xe)&&(De[xe]=Z[xe]);var Ie=arguments.length-2;if(Ie===1)De.children=L;else if(1<Ie){for(var Ze=Array(Ie),gt=0;gt<Ie;gt++)Ze[gt]=arguments[gt+2];De.children=Ze}if(B&&B.defaultProps)for(xe in Ie=B.defaultProps,Ie)De[xe]===void 0&&(De[xe]=Ie[xe]);return{$$typeof:e,type:B,key:he,ref:Ne,props:De,_owner:R.current}}function se(B,Z){return{$$typeof:e,type:B.type,key:Z,ref:B.ref,props:B.props,_owner:B._owner}}function H(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function re(B){var Z={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(L){return Z[L]})}var V=/\/+/g;function ee(B,Z){return typeof B=="object"&&B!==null&&B.key!=null?re(""+B.key):Z.toString(36)}function ae(B,Z,L,xe,De){var he=typeof B;(he==="undefined"||he==="boolean")&&(B=null);var Ne=!1;if(B===null)Ne=!0;else switch(he){case"string":case"number":Ne=!0;break;case"object":switch(B.$$typeof){case e:case t:Ne=!0}}if(Ne)return Ne=B,De=De(Ne),B=xe===""?"."+ee(Ne,0):xe,j(De)?(L="",B!=null&&(L=B.replace(V,"$&/")+"/"),ae(De,Z,L,"",function(gt){return gt})):De!=null&&(H(De)&&(De=se(De,L+(!De.key||Ne&&Ne.key===De.key?"":(""+De.key).replace(V,"$&/")+"/")+B)),Z.push(De)),1;if(Ne=0,xe=xe===""?".":xe+":",j(B))for(var Ie=0;Ie<B.length;Ie++){he=B[Ie];var Ze=xe+ee(he,Ie);Ne+=ae(he,Z,L,Ze,De)}else if(Ze=T(B),typeof Ze=="function")for(B=Ze.call(B),Ie=0;!(he=B.next()).done;)he=he.value,Ze=xe+ee(he,Ie++),Ne+=ae(he,Z,L,Ze,De);else if(he==="object")throw Z=String(B),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Ne}function oe(B,Z,L){if(B==null)return B;var xe=[],De=0;return ae(B,xe,"","",function(he){return Z.call(L,he,De++)}),xe}function me(B){if(B._status===-1){var Z=B._result;Z=Z(),Z.then(function(L){(B._status===0||B._status===-1)&&(B._status=1,B._result=L)},function(L){(B._status===0||B._status===-1)&&(B._status=2,B._result=L)}),B._status===-1&&(B._status=0,B._result=Z)}if(B._status===1)return B._result.default;throw B._result}var de={current:null},W={transition:null},le={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:W,ReactCurrentOwner:R};function C(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:oe,forEach:function(B,Z,L){oe(B,function(){Z.apply(this,arguments)},L)},count:function(B){var Z=0;return oe(B,function(){Z++}),Z},toArray:function(B){return oe(B,function(Z){return Z})||[]},only:function(B){if(!H(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},ze.Component=v,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=k,ze.StrictMode=r,ze.Suspense=d,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ze.act=C,ze.cloneElement=function(B,Z,L){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var xe=_({},B.props),De=B.key,he=B.ref,Ne=B._owner;if(Z!=null){if(Z.ref!==void 0&&(he=Z.ref,Ne=R.current),Z.key!==void 0&&(De=""+Z.key),B.type&&B.type.defaultProps)var Ie=B.type.defaultProps;for(Ze in Z)q.call(Z,Ze)&&!X.hasOwnProperty(Ze)&&(xe[Ze]=Z[Ze]===void 0&&Ie!==void 0?Ie[Ze]:Z[Ze])}var Ze=arguments.length-2;if(Ze===1)xe.children=L;else if(1<Ze){Ie=Array(Ze);for(var gt=0;gt<Ze;gt++)Ie[gt]=arguments[gt+2];xe.children=Ie}return{$$typeof:e,type:B.type,key:De,ref:he,props:xe,_owner:Ne}},ze.createContext=function(B){return B={$$typeof:u,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:a,_context:B},B.Consumer=B},ze.createElement=ne,ze.createFactory=function(B){var Z=ne.bind(null,B);return Z.type=B,Z},ze.createRef=function(){return{current:null}},ze.forwardRef=function(B){return{$$typeof:l,render:B}},ze.isValidElement=H,ze.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:me}},ze.memo=function(B,Z){return{$$typeof:f,type:B,compare:Z===void 0?null:Z}},ze.startTransition=function(B){var Z=W.transition;W.transition={};try{B()}finally{W.transition=Z}},ze.unstable_act=C,ze.useCallback=function(B,Z){return de.current.useCallback(B,Z)},ze.useContext=function(B){return de.current.useContext(B)},ze.useDebugValue=function(){},ze.useDeferredValue=function(B){return de.current.useDeferredValue(B)},ze.useEffect=function(B,Z){return de.current.useEffect(B,Z)},ze.useId=function(){return de.current.useId()},ze.useImperativeHandle=function(B,Z,L){return de.current.useImperativeHandle(B,Z,L)},ze.useInsertionEffect=function(B,Z){return de.current.useInsertionEffect(B,Z)},ze.useLayoutEffect=function(B,Z){return de.current.useLayoutEffect(B,Z)},ze.useMemo=function(B,Z){return de.current.useMemo(B,Z)},ze.useReducer=function(B,Z,L){return de.current.useReducer(B,Z,L)},ze.useRef=function(B){return de.current.useRef(B)},ze.useState=function(B){return de.current.useState(B)},ze.useSyncExternalStore=function(B,Z,L){return de.current.useSyncExternalStore(B,Z,L)},ze.useTransition=function(){return de.current.useTransition()},ze.version="18.3.1",ze}var An;function pr(){return An||(An=1,Ct.exports=Nt()),Ct.exports}var Zi;function Ws(){if(Zi)return Bt;Zi=1;var e=pr(),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={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+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:T,ref:y,props:m,_owner:s.current}}return Bt.Fragment=n,Bt.jsx=u,Bt.jsxs=u,Bt}var Ys;function In(){return Ys||(Ys=1,Tt.exports=Ws()),Tt.exports}var w=In(),N=pr();const es=nt(N),Pr=Object.create(null);Pr.open="0",Pr.close="1",Pr.ping="2",Pr.pong="3",Pr.message="4",Pr.upgrade="5",Pr.noop="6";const Fu=Object.create(null);Object.keys(Pr).forEach(e=>{Fu[Pr[e]]=e});const Md={type:"error",data:"parser error"},q0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",W0=typeof ArrayBuffer=="function",Y0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Fd=({type:e,data:t},n,r)=>q0&&t instanceof Blob?n?r(t):G0(t,r):W0&&(t instanceof ArrayBuffer||Y0(t))?n?r(t):G0(new Blob([t]),r):r(Pr[e]+(t||"")),G0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function X0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Bd;function Ov(e,t){if(q0&&e.data instanceof Blob)return e.data.arrayBuffer().then(X0).then(t);if(W0&&(e.data instanceof ArrayBuffer||Y0(e.data)))return t(X0(e.data));Fd(e,!1,n=>{Bd||(Bd=new TextEncoder),t(Bd.encode(n))})}const K0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<K0.length;e++)sa[K0.charCodeAt(e)]=e;const Iv=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=sa[e.charCodeAt(r)],u=sa[e.charCodeAt(r+1)],l=sa[e.charCodeAt(r+2)],d=sa[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},Pv=typeof ArrayBuffer=="function",Ud=(e,t)=>{if(typeof e!="string")return{type:"message",data:Q0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Rv(e.substring(1),t)}:Fu[n]?e.length>1?{type:Fu[n],data:e.substring(1)}:{type:Fu[n]}:Md},Rv=(e,t)=>{if(Pv){const n=Iv(e);return Q0(n,t)}else return{base64:!0,data:e}},Q0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,J0="",Lv=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Fd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(J0))})})},Dv=(e,t)=>{const n=e.split(J0),r=[];for(let s=0;s<n.length;s++){const a=Ud(n[s],t);if(r.push(a),a.type==="error")break}return r};function Mv(){return new TransformStream({transform(e,t){Ov(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 Hd;function Bu(e){return e.reduce((t,n)=>t+n.length,0)}function Uu(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 Fv(e,t){Hd||(Hd=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(Bu(n)<1)break;const d=Uu(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(Bu(n)<2)break;const d=Uu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Bu(n)<8)break;const d=Uu(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(Bu(n)<s)break;const d=Uu(n,s);l.enqueue(Ud(a?d:Hd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(Md);break}}}})}const Z0=4;function Wt(e){if(e)return Bv(e)}function Bv(e){for(var t in Wt.prototype)e[t]=Wt.prototype[t];return e}Wt.prototype.on=Wt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Wt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Wt.prototype.off=Wt.prototype.removeListener=Wt.prototype.removeAllListeners=Wt.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},Wt.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},Wt.prototype.emitReserved=Wt.prototype.emit,Wt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Wt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Hu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),er=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),Uv="arraybuffer";function Ej(){}function eg(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Hv=er.setTimeout,jv=er.clearTimeout;function ju(e,t){t.useNativeTimers?(e.setTimeoutFn=Hv.bind(er),e.clearTimeoutFn=jv.bind(er)):(e.setTimeoutFn=er.setTimeout.bind(er),e.clearTimeoutFn=er.clearTimeout.bind(er))}const $v=1.33;function zv(e){return typeof e=="string"?Vv(e):Math.ceil((e.byteLength||e.size)*$v)}function Vv(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 tg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function qv(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Wv(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 Yv extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class jd extends Wt{constructor(t){super(),this.writable=!1,ju(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 Yv(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=Ud(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=qv(t);return n.length?"?"+n:""}}class Gv extends jd{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)};Dv(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,Lv(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]=tg()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let ng=!1;try{ng=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const Xv=ng;function Kv(){}class Qv extends Gv{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 Rr extends Wt{constructor(t,n,r){super(),this.createRequest=t,ju(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=eg(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=Rr.requestsCount++,Rr.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=Kv,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Rr.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(Rr.requestsCount=0,Rr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",rg);else if(typeof addEventListener=="function"){const e="onpagehide"in er?"pagehide":"unload";addEventListener(e,rg,!1)}}function rg(){for(let e in Rr.requests)Rr.requests.hasOwnProperty(e)&&Rr.requests[e].abort()}const Jv=(function(){const e=ig({xdomain:!1});return e&&e.responseType!==null})();class Zv extends Qv{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Jv&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Rr(ig,this.uri(),t)}}function ig(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||Xv))return new XMLHttpRequest}catch(n){}if(!t)try{return new er[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const sg=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class e2 extends jd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=sg?{}:eg(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;Fd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Hu(()=>{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]=tg()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const $d=er.WebSocket||er.MozWebSocket;class t2 extends e2{createSocket(t,n,r){return sg?new $d(t,n,r):n?new $d(t,n):new $d(t)}doWrite(t,n){this.ws.send(n)}}class n2 extends jd{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=Fv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=Mv();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&&Hu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const r2={websocket:t2,webtransport:n2,polling:Zv},i2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zd(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=i2.exec(e||""),a={},u=14;for(;u--;)a[s2[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=o2(a,a.path),a.queryKey=a2(a,a.query),a}function o2(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 a2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Vd=typeof addEventListener=="function"&&typeof removeEventListener=="function",$u=[];Vd&&addEventListener("offline",()=>{$u.forEach(e=>e())},!1);class yi extends Wt{constructor(t,n){if(super(),this.binaryType=Uv,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=zd(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=zd(n.host).host);ju(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=Wv(this.opts.query)),Vd&&(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"})},$u.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Z0,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&&yi.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",yi.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+=zv(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,Hu(()=>{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(yi.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(),Vd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=$u.indexOf(this._offlineEventListener);r!==-1&&$u.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Z0;class u2 extends yi{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;yi.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;yi.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 T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};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 l2=class extends u2{constructor(t,n={}){const r=typeof t=="object",s=r?F({},t):F({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>r2[a]).filter(a=>!!a)),super(r?s:t,s)}};function c2(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=zd(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 d2=typeof ArrayBuffer=="function",f2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,og=Object.prototype.toString,h2=typeof Blob=="function"||typeof Blob!="undefined"&&og.call(Blob)==="[object BlobConstructor]",p2=typeof File=="function"||typeof File!="undefined"&&og.call(File)==="[object FileConstructor]";function qd(e){return d2&&(e instanceof ArrayBuffer||f2(e))||h2&&e instanceof Blob||p2&&e instanceof File}function zu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(zu(e[n]))return!0;return!1}if(qd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return zu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&zu(e[n]))return!0;return!1}function m2(e){const t=[],n=e.data,r=e;return r.data=Vu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vu(e,t,n){if(!e)return e;if(qd(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]=Vu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Vu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Vu(e[s],t));return r}return e}function g2(e,t){return e.data=Wd(e.data,t),delete e.attachments,e}function Wd(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]=Wd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Wd(e[n],t));return e}const E2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var st;(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"})(st||(st={}));class y2{constructor(t){this.replacer=t}encode(t){return(t.type===st.EVENT||t.type===st.ACK)&&zu(t)?this.encodeAsBinary({type:t.type===st.EVENT?st.BINARY_EVENT:st.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===st.BINARY_EVENT||t.type===st.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=m2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Yd extends Wt{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===st.BINARY_EVENT;r||n.type===st.BINARY_ACK?(n.type=r?st.EVENT:st.ACK,this.reconstructor=new T2(n)):super.emitReserved("decoded",n)}else if(qd(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(st[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===st.BINARY_EVENT||r.type===st.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(!b2(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(Yd.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 st.CONNECT:return ag(n);case st.DISCONNECT:return n===void 0;case st.CONNECT_ERROR:return typeof n=="string"||ag(n);case st.EVENT:case st.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&E2.indexOf(n[0])===-1);case st.ACK:case st.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class T2{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=g2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const b2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}const w2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Yd,Encoder:y2,get PacketType(){return st}},Symbol.toStringTag,{value:"Module"}));function mr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const x2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ug extends Wt{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=[mr(t,"open",this.onopen.bind(this)),mr(t,"packet",this.onpacket.bind(this)),mr(t,"error",this.onerror.bind(this)),mr(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(x2.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:st.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:st.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 st.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 st.EVENT:case st.BINARY_EVENT:this.onevent(t);break;case st.ACK:case st.BINARY_ACK:this.onack(t);break;case st.DISCONNECT:this.ondisconnect();break;case st.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:st.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:st.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 Gs(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}Gs.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},Gs.prototype.reset=function(){this.attempts=0},Gs.prototype.setMin=function(e){this.ms=e},Gs.prototype.setMax=function(e){this.max=e},Gs.prototype.setJitter=function(e){this.jitter=e};class Gd extends Wt{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,ju(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 Gs({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||w2;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 l2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=mr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=mr(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(mr(t,"ping",this.onping.bind(this)),mr(t,"data",this.ondata.bind(this)),mr(t,"error",this.onerror.bind(this)),mr(t,"close",this.onclose.bind(this)),mr(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){Hu(()=>{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 ug(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 oa={};function Xd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=c2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=oa[s]&&a in oa[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Gd(r,t):(oa[s]||(oa[s]=new Gd(r,t)),d=oa[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xd,{Manager:Gd,Socket:ug,io:Xd,connect:Xd});const lg=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&lg.call(Blob),typeof File=="function"||typeof File!="undefined"&&lg.call(File);var cg;(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"})(cg||(cg={}));const qu="cimulate",Kd=`${qu}:pdp-update`,Qd=`${qu}:ui-state-update`,Jd=`${qu}:prompts-state-update`,Zd=`${qu}:session-state`,_2=e=>{window.addEventListener(Kd,e)},S2=e=>{window.removeEventListener(Kd,e)},dg=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},fg=e=>{window.addEventListener(Zd,e)},hg=e=>{window.removeEventListener(Zd,e)},pg=(e,t,n)=>{const r=new CustomEvent(Zd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class v2{constructor(){Xe(this,"initialParams",{productId:"",productName:"",pdpLink:""});Xe(this,"proxy");Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>(dg(n,r),Reflect.set(t,n,r)));Xe(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});Xe(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});Xe(this,"dispatchContextUpdate",()=>{dg("pdp-context",this.state)});Xe(this,"createProxy",t=>new Proxy({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}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 Lr=new v2,mg=["ask_cim","search","browse","pdp"],gg=e=>mg.includes(e),Eg={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(Eg)),new Map(Object.entries(Eg).map(([e,t])=>[t,e]));const kt=(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 A2{constructor(t=!1){Xe(this,"isDevelopment");Xe(this,"_log",(t,n,...r)=>{kt(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 C2=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!gg(e.type)){kt(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&kt(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)){kt(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Lr.updateProxy(e.params);return}kt(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}},Wu=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},N2="ccDevMode",k2=(e=typeof window!="undefined"?window.location.search:"")=>{var t;return((t=new URLSearchParams(e).get(N2))==null?void 0:t.toLowerCase())==="true"};let O2=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 I2{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 ke(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:fe(F({},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 ke(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(Fe,Ge){typeof exports=="object"&&typeof module!="undefined"?Ge(exports):typeof define=="function"&&define.amd?define(["exports"],Ge):(Fe=typeof globalThis!="undefined"?globalThis:Fe||self,Ge(Fe.CimulateMessaging={}))})(this,(function(Fe){"use strict";var pj=Object.defineProperty,mj=Object.defineProperties;var gj=Object.getOwnPropertyDescriptors;var Ld=Object.getOwnPropertySymbols;var Sv=Object.prototype.hasOwnProperty,vv=Object.prototype.propertyIsEnumerable;var ia=(Fe,Ge)=>(Ge=Symbol[Fe])?Ge:Symbol.for("Symbol."+Fe),Ej=Fe=>{throw TypeError(Fe)},Dd=Math.pow,$0=(Fe,Ge,nt)=>Ge in Fe?pj(Fe,Ge,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Fe[Ge]=nt,F=(Fe,Ge)=>{for(var nt in Ge||(Ge={}))Sv.call(Ge,nt)&&$0(Fe,nt,Ge[nt]);if(Ld)for(var nt of Ld(Ge))vv.call(Ge,nt)&&$0(Fe,nt,Ge[nt]);return Fe},fe=(Fe,Ge)=>mj(Fe,gj(Ge));var vn=(Fe,Ge)=>{var nt={};for(var Tt in Fe)Sv.call(Fe,Tt)&&Ge.indexOf(Tt)<0&&(nt[Tt]=Fe[Tt]);if(Fe!=null&&Ld)for(var Tt of Ld(Fe))Ge.indexOf(Tt)<0&&vv.call(Fe,Tt)&&(nt[Tt]=Fe[Tt]);return nt};var Xe=(Fe,Ge,nt)=>$0(Fe,typeof Ge!="symbol"?Ge+"":Ge,nt);var ke=(Fe,Ge,nt)=>new Promise((Tt,Bt)=>{var Ct=Nt=>{try{cn(nt.next(Nt))}catch(An){Bt(An)}},ze=Nt=>{try{cn(nt.throw(Nt))}catch(An){Bt(An)}},cn=Nt=>Nt.done?Tt(Nt.value):Promise.resolve(Nt.value).then(Ct,ze);cn((nt=nt.apply(Fe,Ge)).next())}),qs=function(Fe,Ge){this[0]=Fe,this[1]=Ge},z0=(Fe,Ge,nt)=>{var Tt=(cn,Nt,An,pr)=>{try{var Zi=nt[cn](Nt),Ws=(Nt=Zi.value)instanceof qs,Ys=Zi.done;Promise.resolve(Ws?Nt[0]:Nt).then(In=>Ws?Tt(cn==="return"?cn:"next",Nt[1]?{done:In.done,value:In.value}:In,An,pr):An({value:In,done:Ys})).catch(In=>Tt("throw",In,An,pr))}catch(In){pr(In)}},Bt=(cn,Nt,An,pr)=>ze[cn]=Zi=>(Nt=new Promise((Ws,Ys,In)=>(In=()=>Tt(cn,Zi,Ws,Ys),Ct?Ct.then(In):In())),pr=()=>Ct===An&&(Ct=0),Ct=An=Nt.then(pr,pr),Nt),Ct,ze={};return nt=nt.apply(Fe,Ge),ze[ia("asyncIterator")]=()=>ze,Bt("next"),Bt("throw"),Bt("return"),ze},V0=Fe=>{var Ge=Fe[ia("asyncIterator")],nt=!1,Tt,Bt={};return Ge==null?(Ge=Fe[ia("iterator")](),Tt=Ct=>Bt[Ct]=ze=>Ge[Ct](ze)):(Ge=Ge.call(Fe),Tt=Ct=>Bt[Ct]=ze=>{if(nt){if(nt=!1,Ct==="throw")throw ze;return ze}return nt=!0,{done:!1,value:new qs(new Promise(cn=>{var Nt=Ge[Ct](ze);Nt instanceof Object||Ej("Object expected"),cn(Nt)}),1)}}),Bt[ia("iterator")]=()=>Bt,Tt("next"),"throw"in Ge?Tt("throw"):Bt.throw=Ct=>{throw Ct},"return"in Ge&&Tt("return"),Bt},Av=(Fe,Ge,nt)=>(Ge=Fe[ia("asyncIterator")])?Ge.call(Fe):(Fe=Fe[ia("iterator")](),Ge={},nt=(Tt,Bt)=>(Bt=Fe[Tt])&&(Ge[Tt]=Ct=>new Promise((ze,cn,Nt)=>(Ct=Bt.call(Fe,Ct),Nt=Ct.done,Promise.resolve(Ct.value).then(An=>ze({value:An,done:Nt}),cn)))),nt("next"),nt("return"),Ge);var Ge=document.createElement("style");Ge.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-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-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);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.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-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;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-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}& input.cim-widget-search-input{flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.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-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;min-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:var(--cim-widget-border-radius);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.cim-widget-cart-busy{opacity:.7}.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:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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: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 #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-link: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-jump-to-latest{position:sticky;bottom:.75rem;z-index:9999;height:0;pointer-events:none}.cim-widget-jump-to-latest-button{position:absolute;right:0;bottom:0;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:50%;background-color:var(--cim-widget-background-color, #fff);color:var(--cim-widget-primary-color, #3182ce);box-shadow:0 2px 8px #0000001f;font-family:var(--cim-widget-font-family);font-size:.8125rem;font-weight:600;line-height:1;cursor:pointer}.cim-widget-jump-to-latest-button:hover{background-color:var(--cim-widget-background-color, #fff)}.cim-widget-jump-to-latest-button:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.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-user-message-body{display:flex;flex-direction:column;gap:.375rem;min-width:0}.cim-widget-user-message-body:has(.cim-widget-user-message-image){align-items:flex-end}.cim-widget-user-message-image{max-width:12rem;max-height:12rem;width:auto;height:auto;object-fit:contain;border-radius:8px}.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-font-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-font-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-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.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:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.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:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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(Ge);function nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tt={exports:{}},Bt={},Ct={exports:{}},ze={};var cn;function Nt(){if(cn)return ze;cn=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 T(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function v(B,Z,L){this.props=B,this.context=Z,this.refs=A,this.updater=L||y}v.prototype.isReactComponent={},v.prototype.setState=function(B,Z){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,Z,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function x(){}x.prototype=v.prototype;function k(B,Z,L){this.props=B,this.context=Z,this.refs=A,this.updater=L||y}var I=k.prototype=new x;I.constructor=k,_(I,v.prototype),I.isPureReactComponent=!0;var j=Array.isArray,q=Object.prototype.hasOwnProperty,R={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function ne(B,Z,L){var xe,De={},he=null,Ne=null;if(Z!=null)for(xe in Z.ref!==void 0&&(Ne=Z.ref),Z.key!==void 0&&(he=""+Z.key),Z)q.call(Z,xe)&&!X.hasOwnProperty(xe)&&(De[xe]=Z[xe]);var Ie=arguments.length-2;if(Ie===1)De.children=L;else if(1<Ie){for(var Ze=Array(Ie),gt=0;gt<Ie;gt++)Ze[gt]=arguments[gt+2];De.children=Ze}if(B&&B.defaultProps)for(xe in Ie=B.defaultProps,Ie)De[xe]===void 0&&(De[xe]=Ie[xe]);return{$$typeof:e,type:B,key:he,ref:Ne,props:De,_owner:R.current}}function se(B,Z){return{$$typeof:e,type:B.type,key:Z,ref:B.ref,props:B.props,_owner:B._owner}}function H(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function re(B){var Z={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(L){return Z[L]})}var V=/\/+/g;function ee(B,Z){return typeof B=="object"&&B!==null&&B.key!=null?re(""+B.key):Z.toString(36)}function ae(B,Z,L,xe,De){var he=typeof B;(he==="undefined"||he==="boolean")&&(B=null);var Ne=!1;if(B===null)Ne=!0;else switch(he){case"string":case"number":Ne=!0;break;case"object":switch(B.$$typeof){case e:case t:Ne=!0}}if(Ne)return Ne=B,De=De(Ne),B=xe===""?"."+ee(Ne,0):xe,j(De)?(L="",B!=null&&(L=B.replace(V,"$&/")+"/"),ae(De,Z,L,"",function(gt){return gt})):De!=null&&(H(De)&&(De=se(De,L+(!De.key||Ne&&Ne.key===De.key?"":(""+De.key).replace(V,"$&/")+"/")+B)),Z.push(De)),1;if(Ne=0,xe=xe===""?".":xe+":",j(B))for(var Ie=0;Ie<B.length;Ie++){he=B[Ie];var Ze=xe+ee(he,Ie);Ne+=ae(he,Z,L,Ze,De)}else if(Ze=T(B),typeof Ze=="function")for(B=Ze.call(B),Ie=0;!(he=B.next()).done;)he=he.value,Ze=xe+ee(he,Ie++),Ne+=ae(he,Z,L,Ze,De);else if(he==="object")throw Z=String(B),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Ne}function oe(B,Z,L){if(B==null)return B;var xe=[],De=0;return ae(B,xe,"","",function(he){return Z.call(L,he,De++)}),xe}function me(B){if(B._status===-1){var Z=B._result;Z=Z(),Z.then(function(L){(B._status===0||B._status===-1)&&(B._status=1,B._result=L)},function(L){(B._status===0||B._status===-1)&&(B._status=2,B._result=L)}),B._status===-1&&(B._status=0,B._result=Z)}if(B._status===1)return B._result.default;throw B._result}var de={current:null},W={transition:null},le={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:W,ReactCurrentOwner:R};function C(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:oe,forEach:function(B,Z,L){oe(B,function(){Z.apply(this,arguments)},L)},count:function(B){var Z=0;return oe(B,function(){Z++}),Z},toArray:function(B){return oe(B,function(Z){return Z})||[]},only:function(B){if(!H(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},ze.Component=v,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=k,ze.StrictMode=r,ze.Suspense=d,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ze.act=C,ze.cloneElement=function(B,Z,L){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var xe=_({},B.props),De=B.key,he=B.ref,Ne=B._owner;if(Z!=null){if(Z.ref!==void 0&&(he=Z.ref,Ne=R.current),Z.key!==void 0&&(De=""+Z.key),B.type&&B.type.defaultProps)var Ie=B.type.defaultProps;for(Ze in Z)q.call(Z,Ze)&&!X.hasOwnProperty(Ze)&&(xe[Ze]=Z[Ze]===void 0&&Ie!==void 0?Ie[Ze]:Z[Ze])}var Ze=arguments.length-2;if(Ze===1)xe.children=L;else if(1<Ze){Ie=Array(Ze);for(var gt=0;gt<Ze;gt++)Ie[gt]=arguments[gt+2];xe.children=Ie}return{$$typeof:e,type:B.type,key:De,ref:he,props:xe,_owner:Ne}},ze.createContext=function(B){return B={$$typeof:u,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:a,_context:B},B.Consumer=B},ze.createElement=ne,ze.createFactory=function(B){var Z=ne.bind(null,B);return Z.type=B,Z},ze.createRef=function(){return{current:null}},ze.forwardRef=function(B){return{$$typeof:l,render:B}},ze.isValidElement=H,ze.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:me}},ze.memo=function(B,Z){return{$$typeof:f,type:B,compare:Z===void 0?null:Z}},ze.startTransition=function(B){var Z=W.transition;W.transition={};try{B()}finally{W.transition=Z}},ze.unstable_act=C,ze.useCallback=function(B,Z){return de.current.useCallback(B,Z)},ze.useContext=function(B){return de.current.useContext(B)},ze.useDebugValue=function(){},ze.useDeferredValue=function(B){return de.current.useDeferredValue(B)},ze.useEffect=function(B,Z){return de.current.useEffect(B,Z)},ze.useId=function(){return de.current.useId()},ze.useImperativeHandle=function(B,Z,L){return de.current.useImperativeHandle(B,Z,L)},ze.useInsertionEffect=function(B,Z){return de.current.useInsertionEffect(B,Z)},ze.useLayoutEffect=function(B,Z){return de.current.useLayoutEffect(B,Z)},ze.useMemo=function(B,Z){return de.current.useMemo(B,Z)},ze.useReducer=function(B,Z,L){return de.current.useReducer(B,Z,L)},ze.useRef=function(B){return de.current.useRef(B)},ze.useState=function(B){return de.current.useState(B)},ze.useSyncExternalStore=function(B,Z,L){return de.current.useSyncExternalStore(B,Z,L)},ze.useTransition=function(){return de.current.useTransition()},ze.version="18.3.1",ze}var An;function pr(){return An||(An=1,Ct.exports=Nt()),Ct.exports}var Zi;function Ws(){if(Zi)return Bt;Zi=1;var e=pr(),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={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+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:T,ref:y,props:m,_owner:s.current}}return Bt.Fragment=n,Bt.jsx=u,Bt.jsxs=u,Bt}var Ys;function In(){return Ys||(Ys=1,Tt.exports=Ws()),Tt.exports}var w=In(),N=pr();const es=nt(N),Pr=Object.create(null);Pr.open="0",Pr.close="1",Pr.ping="2",Pr.pong="3",Pr.message="4",Pr.upgrade="5",Pr.noop="6";const Fu=Object.create(null);Object.keys(Pr).forEach(e=>{Fu[Pr[e]]=e});const Md={type:"error",data:"parser error"},q0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",W0=typeof ArrayBuffer=="function",Y0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Fd=({type:e,data:t},n,r)=>q0&&t instanceof Blob?n?r(t):G0(t,r):W0&&(t instanceof ArrayBuffer||Y0(t))?n?r(t):G0(new Blob([t]),r):r(Pr[e]+(t||"")),G0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function X0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Bd;function Ov(e,t){if(q0&&e.data instanceof Blob)return e.data.arrayBuffer().then(X0).then(t);if(W0&&(e.data instanceof ArrayBuffer||Y0(e.data)))return t(X0(e.data));Fd(e,!1,n=>{Bd||(Bd=new TextEncoder),t(Bd.encode(n))})}const K0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<K0.length;e++)sa[K0.charCodeAt(e)]=e;const Iv=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=sa[e.charCodeAt(r)],u=sa[e.charCodeAt(r+1)],l=sa[e.charCodeAt(r+2)],d=sa[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},Pv=typeof ArrayBuffer=="function",Ud=(e,t)=>{if(typeof e!="string")return{type:"message",data:Q0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Rv(e.substring(1),t)}:Fu[n]?e.length>1?{type:Fu[n],data:e.substring(1)}:{type:Fu[n]}:Md},Rv=(e,t)=>{if(Pv){const n=Iv(e);return Q0(n,t)}else return{base64:!0,data:e}},Q0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,J0="",Lv=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Fd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(J0))})})},Dv=(e,t)=>{const n=e.split(J0),r=[];for(let s=0;s<n.length;s++){const a=Ud(n[s],t);if(r.push(a),a.type==="error")break}return r};function Mv(){return new TransformStream({transform(e,t){Ov(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 Hd;function Bu(e){return e.reduce((t,n)=>t+n.length,0)}function Uu(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 Fv(e,t){Hd||(Hd=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(Bu(n)<1)break;const d=Uu(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(Bu(n)<2)break;const d=Uu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Bu(n)<8)break;const d=Uu(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(Bu(n)<s)break;const d=Uu(n,s);l.enqueue(Ud(a?d:Hd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(Md);break}}}})}const Z0=4;function Wt(e){if(e)return Bv(e)}function Bv(e){for(var t in Wt.prototype)e[t]=Wt.prototype[t];return e}Wt.prototype.on=Wt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Wt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Wt.prototype.off=Wt.prototype.removeListener=Wt.prototype.removeAllListeners=Wt.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},Wt.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},Wt.prototype.emitReserved=Wt.prototype.emit,Wt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Wt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Hu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),er=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),Uv="arraybuffer";function yj(){}function eg(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Hv=er.setTimeout,jv=er.clearTimeout;function ju(e,t){t.useNativeTimers?(e.setTimeoutFn=Hv.bind(er),e.clearTimeoutFn=jv.bind(er)):(e.setTimeoutFn=er.setTimeout.bind(er),e.clearTimeoutFn=er.clearTimeout.bind(er))}const $v=1.33;function zv(e){return typeof e=="string"?Vv(e):Math.ceil((e.byteLength||e.size)*$v)}function Vv(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 tg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function qv(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Wv(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 Yv extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class jd extends Wt{constructor(t){super(),this.writable=!1,ju(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 Yv(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=Ud(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=qv(t);return n.length?"?"+n:""}}class Gv extends jd{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)};Dv(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,Lv(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]=tg()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let ng=!1;try{ng=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const Xv=ng;function Kv(){}class Qv extends Gv{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 Rr extends Wt{constructor(t,n,r){super(),this.createRequest=t,ju(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=eg(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=Rr.requestsCount++,Rr.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=Kv,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Rr.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(Rr.requestsCount=0,Rr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",rg);else if(typeof addEventListener=="function"){const e="onpagehide"in er?"pagehide":"unload";addEventListener(e,rg,!1)}}function rg(){for(let e in Rr.requests)Rr.requests.hasOwnProperty(e)&&Rr.requests[e].abort()}const Jv=(function(){const e=ig({xdomain:!1});return e&&e.responseType!==null})();class Zv extends Qv{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Jv&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Rr(ig,this.uri(),t)}}function ig(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||Xv))return new XMLHttpRequest}catch(n){}if(!t)try{return new er[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const sg=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class e2 extends jd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=sg?{}:eg(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;Fd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Hu(()=>{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]=tg()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const $d=er.WebSocket||er.MozWebSocket;class t2 extends e2{createSocket(t,n,r){return sg?new $d(t,n,r):n?new $d(t,n):new $d(t)}doWrite(t,n){this.ws.send(n)}}class n2 extends jd{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=Fv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=Mv();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&&Hu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const r2={websocket:t2,webtransport:n2,polling:Zv},i2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zd(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=i2.exec(e||""),a={},u=14;for(;u--;)a[s2[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=o2(a,a.path),a.queryKey=a2(a,a.query),a}function o2(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 a2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Vd=typeof addEventListener=="function"&&typeof removeEventListener=="function",$u=[];Vd&&addEventListener("offline",()=>{$u.forEach(e=>e())},!1);class yi extends Wt{constructor(t,n){if(super(),this.binaryType=Uv,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=zd(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=zd(n.host).host);ju(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=Wv(this.opts.query)),Vd&&(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"})},$u.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Z0,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&&yi.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",yi.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+=zv(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,Hu(()=>{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(yi.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(),Vd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=$u.indexOf(this._offlineEventListener);r!==-1&&$u.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Z0;class u2 extends yi{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;yi.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;yi.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 T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};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 l2=class extends u2{constructor(t,n={}){const r=typeof t=="object",s=r?F({},t):F({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>r2[a]).filter(a=>!!a)),super(r?s:t,s)}};function c2(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=zd(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 d2=typeof ArrayBuffer=="function",f2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,og=Object.prototype.toString,h2=typeof Blob=="function"||typeof Blob!="undefined"&&og.call(Blob)==="[object BlobConstructor]",p2=typeof File=="function"||typeof File!="undefined"&&og.call(File)==="[object FileConstructor]";function qd(e){return d2&&(e instanceof ArrayBuffer||f2(e))||h2&&e instanceof Blob||p2&&e instanceof File}function zu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(zu(e[n]))return!0;return!1}if(qd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return zu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&zu(e[n]))return!0;return!1}function m2(e){const t=[],n=e.data,r=e;return r.data=Vu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vu(e,t,n){if(!e)return e;if(qd(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]=Vu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Vu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Vu(e[s],t));return r}return e}function g2(e,t){return e.data=Wd(e.data,t),delete e.attachments,e}function Wd(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]=Wd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Wd(e[n],t));return e}const E2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var st;(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"})(st||(st={}));class y2{constructor(t){this.replacer=t}encode(t){return(t.type===st.EVENT||t.type===st.ACK)&&zu(t)?this.encodeAsBinary({type:t.type===st.EVENT?st.BINARY_EVENT:st.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===st.BINARY_EVENT||t.type===st.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=m2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Yd extends Wt{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===st.BINARY_EVENT;r||n.type===st.BINARY_ACK?(n.type=r?st.EVENT:st.ACK,this.reconstructor=new T2(n)):super.emitReserved("decoded",n)}else if(qd(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(st[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===st.BINARY_EVENT||r.type===st.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(!b2(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(Yd.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 st.CONNECT:return ag(n);case st.DISCONNECT:return n===void 0;case st.CONNECT_ERROR:return typeof n=="string"||ag(n);case st.EVENT:case st.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&E2.indexOf(n[0])===-1);case st.ACK:case st.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class T2{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=g2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const b2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}const w2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Yd,Encoder:y2,get PacketType(){return st}},Symbol.toStringTag,{value:"Module"}));function mr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const x2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ug extends Wt{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=[mr(t,"open",this.onopen.bind(this)),mr(t,"packet",this.onpacket.bind(this)),mr(t,"error",this.onerror.bind(this)),mr(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(x2.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:st.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:st.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 st.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 st.EVENT:case st.BINARY_EVENT:this.onevent(t);break;case st.ACK:case st.BINARY_ACK:this.onack(t);break;case st.DISCONNECT:this.ondisconnect();break;case st.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:st.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:st.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 Gs(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}Gs.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},Gs.prototype.reset=function(){this.attempts=0},Gs.prototype.setMin=function(e){this.ms=e},Gs.prototype.setMax=function(e){this.max=e},Gs.prototype.setJitter=function(e){this.jitter=e};class Gd extends Wt{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,ju(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 Gs({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||w2;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 l2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=mr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=mr(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(mr(t,"ping",this.onping.bind(this)),mr(t,"data",this.ondata.bind(this)),mr(t,"error",this.onerror.bind(this)),mr(t,"close",this.onclose.bind(this)),mr(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){Hu(()=>{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 ug(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 oa={};function Xd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=c2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=oa[s]&&a in oa[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Gd(r,t):(oa[s]||(oa[s]=new Gd(r,t)),d=oa[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xd,{Manager:Gd,Socket:ug,io:Xd,connect:Xd});const lg=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&lg.call(Blob),typeof File=="function"||typeof File!="undefined"&&lg.call(File);var cg;(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"})(cg||(cg={}));const qu="cimulate",Kd=`${qu}:pdp-update`,Qd=`${qu}:ui-state-update`,Jd=`${qu}:prompts-state-update`,Zd=`${qu}:session-state`,_2=e=>{window.addEventListener(Kd,e)},S2=e=>{window.removeEventListener(Kd,e)},dg=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},fg=e=>{window.addEventListener(Zd,e)},hg=e=>{window.removeEventListener(Zd,e)},pg=(e,t,n)=>{const r=new CustomEvent(Zd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class v2{constructor(){Xe(this,"initialParams",{productId:"",productName:"",pdpLink:""});Xe(this,"proxy");Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>(dg(n,r),Reflect.set(t,n,r)));Xe(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});Xe(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});Xe(this,"dispatchContextUpdate",()=>{dg("pdp-context",this.state)});Xe(this,"createProxy",t=>new Proxy({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}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 Lr=new v2,mg=["ask_cim","search","browse","pdp"],gg=e=>mg.includes(e),Eg={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(Eg)),new Map(Object.entries(Eg).map(([e,t])=>[t,e]));const kt=(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 A2{constructor(t=!1){Xe(this,"isDevelopment");Xe(this,"_log",(t,n,...r)=>{kt(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 C2=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!gg(e.type)){kt(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&kt(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)){kt(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Lr.updateProxy(e.params);return}kt(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}},Wu=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},N2="ccDevMode",k2=(e=typeof window!="undefined"?window.location.search:"")=>{var t;return((t=new URLSearchParams(e).get(N2))==null?void 0:t.toLowerCase())==="true"};let O2=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 I2{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 ke(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:fe(F({},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 ke(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
|
|
|
@@ -13,14 +13,14 @@
|
|
|
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=rs(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ol.assertOptions(r,{silentJSONParsing:gn.transitional(gn.boolean),forcedJSONParsing:gn.transitional(gn.boolean),clarifyTimeoutError:gn.transitional(gn.boolean),legacyInterceptorReqResOrdering:gn.transitional(gn.boolean),advertiseZstdAcceptEncoding:gn.transitional(gn.boolean),validateStatusUndefinedResolves:gn.transitional(gn.boolean)},!1),s!=null&&(G.isFunction(s)?n.paramsSerializer={serialize:s}:ol.assertOptions(s,{encode:gn.function,serialize:gn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ol.assertOptions(n,{baseUrl:gn.spelling("baseURL"),withXsrfToken:gn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&G.merge(a.common,a[n.method]);a&&G.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=mn.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||mf;v&&v.legacyInterceptorReqResOrdering?l.unshift(A.fulfilled,A.rejected):l.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,T;if(!d){const _=[c1.bind(this),void 0];for(_.unshift(...l),_.push(...f),T=_.length,p=Promise.resolve(n);m<T;)p=p.then(_[m++],_[m++]);return p}T=l.length;let y=n;for(;m<T;){const _=l[m++],A=l[m++];try{y=_(y)}catch(v){A.call(this,v);break}}try{p=c1.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=rs(this.defaults,t);const n=e1(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Vg(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){is.prototype[t]=function(n,r){return this.request(rs(r||{},{method:t,url:n,data:r&&G.hasOwnProp(r,"data")?r.data:void 0}))}}),G.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(rs(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}is.prototype[t]=n(),t!=="query"&&(is.prototype[t+"Form"]=n(!0))});let ZC=class Nv{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 fa(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 Nv(function(s){t=s}),cancel:t}}};function eN(e){return function(n){return e.apply(null,n)}}function tN(e){return G.isObject(e)&&e.isAxiosError===!0}const xf={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(xf).forEach(([e,t])=>{xf[t]=e});function f1(e){const t=new is(e),n=Cg(is.prototype.request,t);return G.extend(n,is.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return f1(rs(e,s))},n}const jt=f1(da);jt.Axios=is,jt.CanceledError=fa,jt.CancelToken=ZC,jt.isCancel=Xg,jt.VERSION=Tf,jt.toFormData=tl,jt.AxiosError=Oe,jt.Cancel=jt.CanceledError,jt.all=function(t){return Promise.all(t)},jt.spread=eN,jt.isAxiosError=tN,jt.mergeConfig=rs,jt.AxiosHeaders=mn,jt.formToJSON=e=>Gg(G.isHTMLForm(e)?new FormData(e):e),jt.getAdapter=l1.getAdapter,jt.HttpStatusCode=xf,jt.default=jt;const{Axios:Sj,AxiosError:vj,CanceledError:Aj,isCancel:Cj,CancelToken:Nj,VERSION:kj,all:Oj,Cancel:Ij,isAxiosError:Pj,spread:Rj,toFormData:Lj,AxiosHeaders:Dj,HttpStatusCode:Mj,formToJSON:Fj,getAdapter:Bj,mergeConfig:Uj,create:Hj}=jt;class nN{constructor(t,n,r,s=!1,a,u){Xe(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Xe(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Xe(this,"CIMULATE_SEARCH_API_PATH","api/v1");Xe(this,"baseApiUrl");Xe(this,"headers",{});Xe(this,"fetchConfig",()=>ke(this,null,function*(){try{const t=yield jt.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}}));Xe(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 rN{constructor(t,n,r,s=!1,a,u){Xe(this,"apiService");Xe(this,"config",null);Xe(this,"getConfig",()=>ke(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}}));Xe(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Xe(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Xe(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Xe(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Xe(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Xe(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Xe(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Xe(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Xe(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Xe(this,"getProductField",t=>this.config?this.config[t]:"");Xe(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new nN(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 iN={copilot:"Your Search Assistant",messaging:"Commerce Client"},h1=N.createContext(null),sN=({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:T,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:x=!0,showProductDescription:k=!1,componentConfig:I,conversationHistory:j,resetConversationMessage:q="",apiKey:R,apiToken:X,baseUrl:ne,customerId:se,tenantId:H,theme:re,isDevelopment:V,__features:ee,routingAttributes:ae,enableDownloadTranscript:oe=!0,enablePageContext:me=!1,enableEscalationToAgent:de=!1,enableImageUpload:W=!1,showProductCaptions:le=!1,staticQuestions:C,staticQuestionsStrategy:B="append",children:Z})=>{const L=e==="messaging",xe=N.useMemo(()=>{const Dt=ae==null?void 0:ae.isCartMgmtSupported;return Dt===!0||Dt==="true"},[ae]),De=N.useMemo(()=>L?{config:null}:new rN(ne,R,X,V,se,H),[L,ne,R,X,V,se,H]),he=N.useMemo(()=>new A2(V),[V]);N.useEffect(()=>{L||!De||De.config||De.getConfig()},[De,L]);const Ne=N.useMemo(()=>D2(re),[re]),Ie=N.useMemo(()=>{const Dt=(y==null?void 0:y.placeholder)||m,ft=(y==null?void 0:y.buttonLabel)||T;let ht="icon";return y!=null&&y.buttonType?ht=y.buttonType:T&&(ht="text"),fe(F({},y||{}),{placeholder:Dt,buttonLabel:ft,buttonType:ht})},[y,m,T]),Ze=N.useMemo(()=>fe(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||iN[e!=null?e:"copilot"]}),[r,t,n,e]),gt=N.useMemo(()=>({configModule:De,mode:e!=null?e:"copilot",headerConfig:Ze,entryMessage:a,staticQuestions:C||[],staticQuestionsStrategy:B,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Ne,logger:he,searchConfig:Ie,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:v,autoScroll:x,showProductDescription:!!k,enableMinimize:!!(I!=null&&I.enableMinimize),launcherAriaLabel:I==null?void 0:I.launcherAriaLabel,enableDownloadTranscript:oe,enablePageContext:me,enableEscalationToAgent:de,enableImageUpload:W,showProductCaptions:!!le,resetConversationMessage:q,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:L?24:1,limit:j==null?void 0:j.limit},features:ee,isCartMgmtSupported:xe}),[De,e,Ze,a,C,B,s,f,p,l,d,u,Ie,_,v,x,k,I,oe,me,de,W,A,le,q,he,Ne,j,ee,xe,L]);return w.jsx(h1.Provider,{value:gt,children:Z})},lt=()=>{const e=N.useContext(h1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},p1=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],bi=-1;function _f(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 m1(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"&&p1.includes(t.type))return t;const n=_f(t);return n?{type:"markdown",index:bi,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:bi,data:{content:e}}}function al(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"||!p1.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return fe(F({},n),{type:n.type,index:r})}function ha(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function Sf(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=ha(t);if(n)return n.response;const r=al(t);return[r&&r.type!=="markdown"?r:e]}function oN(e){const t=ha(e);if(t)return t.response.flatMap(Sf);const n=al(e);return n?Sf(n):[]}function g1(e,t){return oN(e).some(n=>n.type===t)}function aN(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&g1(r.content,t))return r.id}}function E1(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function uN(e){return e.type==="markdown"&&e.index===bi?!E1(e.data.content):!0}function lN(e){var s;const t=(s=ha(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 cN(e,t){if(t.index===bi){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===bi&&t.type==="markdown"){const a={type:"markdown",index:bi,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 y1(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const T1={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function dN(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return F(fe(F({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return fe(F({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return fe(F({},e),{conversationId:t.id});case"ADD_MESSAGE":return y1(e.messages,t.message)?e:fe(F({},e),{messages:[...e.messages,fe(F({},t.message),{type:"ADD_MESSAGE"})]});case"UPDATE_MESSAGE":return fe(F({},e),{messages:e.messages.map(n=>n.id===t.id?F(F({},n),t.patch):n)});case"APPEND_STREAMING_TOKEN":{const n=m1(t.token);return n?fe(F({},e),{streamingBlocks:cN(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(y1(e.messages,t.message))return F(F({},e),n);const r=fe(F({},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]=fe(F({},r),{id:e.messages[s].id}),F(fe(F({},e),{messages:a}),n)}return F(fe(F({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return fe(F({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return F(fe(F({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:fe(F({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return fe(F({},e),{routingResult:t.result});case"SET_ERROR":return fe(F({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return fe(F({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return fe(F({},e),{sendError:null});case"LOAD_HISTORY":return fe(F({},e),{messages:t.messages.map(n=>fe(F({},n),{restored:!0})),loading:!1});case"SET_SESSION_EXPIRED":return fe(F({},e),{sessionExpired:t.expired});case"RESET":return fe(F({},T1),{connectionStatus:e.connectionStatus});default:return e}}const b1=N.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>ke(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),sendFile:()=>ke(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>ke(null,null,function*(){}),endConversation:()=>ke(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>ke(null,null,function*(){}),getAuthLinkKey:()=>ke(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),fN=4320*60*1e3;function vf(e,t){return`cim_af_conv_${e}_${t}`}function Af(e,t){return Date.now()-e>t}function hN(e,t,n){try{const r=vf(e,t),s=localStorage.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"||Af(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function ul(e,t,n){try{const r=vf(e,t),s={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Cf(e,t){try{const n=vf(e,t);localStorage.removeItem(n)}catch(n){}}function Nf(e,t){return`cim_af_ct_${e}_${t}`}function pN(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(gN(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function mN(e){const t=pN(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function gN(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function w1(e,t){try{const n=Nf(e,t),r=localStorage.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:mN(a.accessToken)==="expired"?(localStorage.removeItem(n),null):a}catch(n){return null}}function EN(e,t,n,r){try{const s=Nf(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(s,JSON.stringify(a))}catch(s){}}function yN(e,t){try{const n=Nf(e,t);localStorage.removeItem(n)}catch(n){}}function TN(e,t){return`cim_af_conv_${e}_${t}`}function bN(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=TN(e,t);return new BroadcastChannel(n)}catch(n){return null}}function wN(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 xN(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 _N(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function SN(e){if(e)try{e.close()}catch(t){}}function vN(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function AN(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function x1(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 CN(e){const t=e.staticContent;if(!t||typeof t!="object")return!1;const n=t.attachments;return Array.isArray(n)&&n.length>0}function NN(e){if(e.entryType!=="Message")return null;const n=AN(e.entryPayload).abstractMessage;if(!n)return null;const r=x1(n,"staticContent","text")||x1(n,"content","text")||"";if(!r&&!CN(n))return null;const s=vN(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 kN(e){const t=[];for(const n of e){const r=NN(n);r&&t.push(r)}return t}const ON="cim_widget_thumbnails",ll="thumbnails",IN=1,kf="byConversation",_1="byStoredAt",PN=2e3;function RN(e,t){return`${e}::${t}`}function LN(){return new Promise(e=>{try{if(typeof indexedDB=="undefined"||!indexedDB){e(null);return}let t=!1;const n=a=>{t||(t=!0,e(a))},r=setTimeout(()=>n(null),PN),s=indexedDB.open(ON,IN);s.onupgradeneeded=()=>{const a=s.result;if(!a.objectStoreNames.contains(ll)){const u=a.createObjectStore(ll,{keyPath:"key"});u.createIndex(kf,"conversationId",{unique:!1}),u.createIndex(_1,"storedAt",{unique:!1})}},s.onsuccess=()=>{clearTimeout(r),n(s.result)},s.onerror=()=>{clearTimeout(r),n(null)},s.onblocked=()=>{clearTimeout(r),n(null)}}catch(t){e(null)}})}function cl(e,t,n){return ke(this,null,function*(){const r=yield LN();return r?new Promise(s=>{let a=t,u=!1;const l=d=>{u||(u=!0,s(d))};try{const d=r.transaction(ll,e),f=d.objectStore(ll);d.oncomplete=()=>{r.close(),l(a)},d.onerror=()=>{r.close(),l(t)},d.onabort=()=>{r.close(),l(t)},n(f,p=>{a=p})}catch(d){try{r.close()}catch(f){}l(t)}}):t})}function DN(e,t,n){return ke(this,null,function*(){if(!e||!t||!n)return;const r={key:RN(e,t),conversationId:e,messageId:t,dataUrl:n,storedAt:Date.now()};yield cl("readwrite",void 0,s=>{s.put(r)})})}function MN(e){return ke(this,null,function*(){return e?cl("readonly",{},(t,n)=>{const r={},a=t.index(kf).openCursor(IDBKeyRange.only(e));a.onsuccess=()=>{const u=a.result;if(u){const l=u.value;l!=null&&l.messageId&&(l!=null&&l.dataUrl)&&(r[l.messageId]=l.dataUrl),u.continue()}else n(r)}}):{}})}function S1(e){return ke(this,null,function*(){e&&(yield cl("readwrite",void 0,t=>{const r=t.index(kf).openCursor(IDBKeyRange.only(e));r.onsuccess=()=>{const s=r.result;s&&(s.delete(),s.continue())}}))})}function FN(e){return ke(this,null,function*(){const t=Date.now()-e;yield cl("readwrite",void 0,n=>{const s=n.index(_1).openCursor(IDBKeyRange.upperBound(t,!0));s.onsuccess=()=>{const a=s.result;a&&(a.delete(),a.continue())}})})}const BN=5e3,pa=Symbol("cimulate-abort-conversation");function dl(e={}){const{routingAttributes:t,timeoutMs:n=BN}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=F({},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 m=Object.keys(r).length>0;s(m?r:t)},d={routingAttributes:t,setHiddenPrechatFields:m=>{a.settled||!m||Object.assign(r,m)},done:u,abort:()=>{a.settled||(a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer),s(pa))}},f=new CustomEvent(bg,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}a.timer=setTimeout(u,n)})}const UN=200,HN=1e3,v1="cim_widget_thumbnails_last_sweep",jN=3600*1e3;function A1(e){try{const t=Date.now(),n=Number(localStorage.getItem(v1))||0;if(n>0&&t-n<jN)return;localStorage.setItem(v1,String(t))}catch(t){}FN(e)}function $N(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=N.useRef(null),u=N.useRef(null),l=N.useRef(null),d=s.sinceHours*60*60*1e3,f=fN,p=N.useCallback(()=>(l.current||(l.current=wN(a.current)),l.current),[]);N.useEffect(()=>{const x=bN(t,n);a.current=x,l.current=null;const k=xN(x,()=>{const I=u.current;if(!I)return null;const j=w1(t,n);return{conversationId:I,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{Cf(t,n),u.current=null});return()=>{k(),SN(x),a.current=null}},[t,n]),N.useEffect(()=>{A1(f)},[f]);const m=N.useCallback((x,k)=>ke(null,null,function*(){var R,X,ne;const I=(R=k==null?void 0:k.createIfMissing)!=null?R:!0,j=(X=k==null?void 0:k.isCurrent)!=null?X:(()=>!0);A1(f);let q=hN(t,n,f);if(!q){const se=yield p();se&&!Af(se.storedAt,f)&&(q=se)}if(!q){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const se=yield dl({routingAttributes:r});if(se===pa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=yield x.createConversation(se);return j()?(ul(t,n,H),u.current=H,{conversationId:H,restoredMessages:[],resumed:!1,outcome:"created"}):(yield x.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const se=yield x.listConversations({conversationId:q.conversationId,startTimestamp:Date.now()-f});if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=se.conversations.find(V=>V.conversationId===q.conversationId&&!V.isConversationClosed);if(!H){if(Cf(t,n),S1(q.conversationId),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const V=yield dl({routingAttributes:r});if(V===pa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ee=yield x.createConversation(V);return j()?(ul(t,n,ee),u.current=ee,{conversationId:ee,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield x.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}x.resumeConversation(H.conversationId),u.current=H.conversationId,ul(t,n,H.conversationId);let re=[];try{const V=yield x.listConversationEntries(H.conversationId,{limit:Math.min((ne=s.limit)!=null?ne:UN,HN),startTimestamp:Date.now()-d,direction:"FromEnd"});re=kN(V.conversationEntries).reverse();const ee=yield MN(H.conversationId);Object.keys(ee).length>0&&(re=re.map(ae=>ee[ae.id]?fe(F({},ae),{attachmentImageUrl:ee[ae.id]}):ae))}catch(V){}return{conversationId:H.conversationId,restoredMessages:re,resumed:!0,outcome:"resumed"}}catch(se){return{conversationId:q.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:se}}}),[t,n,r,s,d,f,p]),T=N.useCallback(x=>{ul(t,n,x),u.current=x},[t,n]),y=N.useCallback(()=>{u.current&&S1(u.current),Cf(t,n),yN(t,n),_N(a.current),u.current=null},[t,n]),_=N.useCallback(()=>{const x=w1(t,n);return x?{continuationToken:x.accessToken,lastEventId:x.lastEventId}:null},[t,n]),A=N.useCallback(()=>ke(null,null,function*(){const x=yield p();return!(x!=null&&x.continuationToken)||Af(x.storedAt,f)?null:{continuationToken:x.continuationToken,lastEventId:x.lastEventId}}),[f,p]),v=N.useCallback((x,k=()=>!0)=>ke(null,null,function*(){try{const{accessToken:I,lastEventId:j}=yield x.generateContinuationToken();if(!k())return;EN(t,n,I,j)}catch(I){}}),[t,n]);return{initializeConversation:m,persistConversationId:T,clearPersistedConversation:y,getStoredConnectOptions:_,getPeerConnectOptions:A,persistContinuationToken:v}}const zN=128,VN=.7;function C1(e,t,n){return ke(this,null,function*(){var r,s;try{if(!e||!n.type.startsWith("image/"))return;const a=(s=(r=t==null?void 0:t.conversationEntries)==null?void 0:r[0])==null?void 0:s.id;if(!a)return;const u=yield af(n,{maxDimension:zN,quality:VN,mimeType:"image/jpeg"}),l=yield vg(u);yield DN(e,a,l)}catch(a){}})}const qN="Your session ended due to inactivity. Starting a new session…",N1="This conversation has ended.",WN=300*1e3,YN=2e3,GN=1e4,XN=15e3,KN=2;function k1(e,t,n){return e||t||n===!0}function Of(e){return e.some(t=>t.role==="agent")}function ma(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function QN(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function O1(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 If(e){if(O1(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function JN(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).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 Pf(e,t){return t?{prompt:`${e} (Viewing product details for: ${t})`,display:e}:{prompt:e}}function ZN({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=XN,logger:f,isRecoveryInFlight:p}){const m=N.useRef(u);m.current=u;const T=N.useRef(l);T.current=l;const y=N.useRef(f);y.current=f;const _=N.useRef(p);_.current=p;const A=N.useRef(0),v=N.useRef(!1),x=N.useRef(0),[k,I]=N.useState(0);N.useEffect(()=>{if(!t||n){A.current=0,v.current=!1,x.current=0;return}const j=a||A.current>0;if(!(s&&j&&e==="connected"&&!r&&!v.current))return;const R=setTimeout(()=>{ke(null,null,function*(){var H,re;if((H=_.current)!=null&&H.call(_)){if(x.current+=1,x.current>KN){v.current=!0,T.current();return}I(V=>V+1);return}const X=A.current,ne=m.current;if(X>=ne.length){v.current=!0,T.current();return}x.current=0,(re=y.current)==null||re.warn("🦜 connect bootstrap stalled",{attempt:X});let se;try{yield Promise.race([Promise.resolve(ne[X]()),new Promise((V,ee)=>{se=setTimeout(()=>{ee(new Error("connect bootstrap step timed out"))},d)})])}catch(V){}finally{se!==void 0&&clearTimeout(se),A.current=X+1,I(V=>V+1)}})},d);return()=>{clearTimeout(R)}},[e,t,n,r,s,a,d,k])}const ek=100,tk=3e3;function I1(e,t){const n=e.current;e.current=[],n.forEach(({text:r,options:s,file:a,resolve:u})=>{const l=t.current;if(!l){u==null||u({outcome:"failure",message:"Messaging is unavailable"});return}l(r,s==null?void 0:s.displayContent,s,void 0,a).then(d=>u==null?void 0:u(d),d=>u==null?void 0:u({outcome:"failure",message:d instanceof Error?d.message:String(d)}))})}function nk(e,t){const n=e.current;n.length!==0&&(e.current=[],n.forEach(({resolve:r})=>{r==null||r({outcome:"failure",message:t})}))}function rk({isOpen:e,connectionStatus:t,conversationId:n,messages:r,deliverUserMessageRef:s}){const[a,u]=N.useState(0),l=N.useRef([]),d=N.useRef(t);d.current=t;const f=N.useRef(null);return N.useEffect(()=>{if(t==="error"){f.current=null,nk(l,"Connection error");return}const p=t==="connected"&&n!==null,m=l.current.length>0;if(!e||!p||!m){f.current=null;return}if(Of(r)){f.current=null;const A=setTimeout(()=>{I1(l,s)},ek);return()=>clearTimeout(A)}const T=Date.now();f.current===null&&(f.current=T+tk);const y=Math.max(0,f.current-T),_=setTimeout(()=>{f.current=null,l.current.length>0&&I1(l,s)},y);return()=>clearTimeout(_)},[e,t,n,r,s,a]),N.useCallback((p,m,T)=>d.current==="error"?Promise.resolve({outcome:"failure",message:"Connection error"}):new Promise(y=>{l.current.push({text:p,options:m,file:T,resolve:y}),u(_=>_+1)}),[])}function ik(e){const t=N.useRef(e);t.current=e,N.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Yu.RESET_CONVERSATION&&t.current()};return fg(n),()=>{hg(n)}},[])}function sk(e){const t=N.useRef(e);t.current=e,N.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Yu.END_CONVERSATION&&t.current()};return fg(n),()=>{hg(n)}},[])}const Fr={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 ok(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 Br(e){const{type:t,statusCode:n}=ok(e);if(t==="api"&&typeof n=="number")return n===429?Fr.rateLimit:n>=500?Fr.server:Fr.default;switch(t){case"network":return Fr.network;case"sse":return Fr.interrupted;case"auth":return Fr.connect;default:return Fr.default}}function P1(e){switch(e.code){case"MAX_RECONNECT":return Fr.lost;case"ROUTING_FAILED":return Fr.routing;default:return Fr.connect}}let ss=null;function ak(e){ss&&ss!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),ss=e}function uk(e){ss===e&&(ss=null)}function R1(){if(!ss)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return ss}function Rf(){if(ut.entryType==="pdp"){const{productId:e}=Lr.state;return e?{type:"pdp",id:e}:null}else return null}function L1(e){const t=e.type;switch(t){case"pdp":{const n=e.id.trim();if(!n)throw new Error("PDP page context must include an id");tf("pdp"),Lr.updateProxy({productId:n}),Lr.dispatchContextUpdate();return}default:throw new Error(`Unsupported page context type: ${String(t)}`)}}function D1(){Lr.clear(),Lr.dispatchContextUpdate()}const lk={pdp:"This is the product details page the user is currently looking at"};function ck(e){if(!e)return;const r=e,{type:t}=r,n=vn(r,["type"]);return[{entryType:"SessionContext",id:crypto.randomUUID(),sessionContext:{contextType:"SessionContextSet",contextVariables:[{name:"page_context_type",value:{valueType:"TextValue",textValue:t}},{name:"page_context_message",value:{valueType:"TextValue",textValue:lk[t]}},{name:"page_context_data",value:{valueType:"TextValue",textValue:JSON.stringify(n)}}]}}]}const to=Symbol("initialization-cancelled"),dk=3e4,fk="Image is too large to send. Please choose a smaller image.",hk="Sorry, we couldn't process that image. Please try a PNG, JPG, or GIF.",pk=512,mk=.7,gk=e=>ke(null,null,function*(){let t;try{t=yield af(e)}catch(n){if(!eA.includes(e.type))return console.warn("🦜 image downsize failed; original type not SCRT2-native, rejecting",n),{error:hk};console.warn("🦜 image downsize failed; uploading original",n),t=e}return t.size>of?{error:fk}:{file:t}}),M1=e=>ke(null,null,function*(){if(e.preparedFile)return{file:e.preparedFile};const t=yield gk(e.file);return"error"in t?t:(e.preparedFile=t.file,{file:t.file})}),F1=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enablePageContext:a=!1,enableLogging:u=!1,onConnect:l,onMessage:d,onError:f,onProductResult:p,onEndConversation:m,children:T})=>{const{logger:y,conversationHistory:_}=lt(),{status:{isOpen:A}}=Mr(),[v,x]=N.useReducer(dN,T1),[k,I]=N.useState(!1),[j,q]=N.useState(!1),[R,X]=N.useState(!1),ne=N.useRef(v);ne.current=v;const se=$N({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:_}),H=N.useRef(null),re=N.useRef(d),V=N.useRef(f),ee=N.useRef(l),ae=N.useRef(p),oe=N.useRef(m),me=N.useRef(!1),de=N.useRef(!1),W=N.useRef(!1),le=N.useRef(0),C=N.useRef(0),B=N.useRef(0),Z=N.useRef(null),L=N.useRef(null),xe=N.useRef(null),De=N.useRef(0),he=N.useRef(!1),Ne=N.useRef(0),Ie=N.useRef(0),Ze=N.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),gt=N.useRef(),Dt=N.useRef(()=>ke(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}})),ft=N.useRef([]),ht=N.useRef(null),vt=N.useCallback((J,Ae)=>{Ae.outcome==="timeout"?(J.timedOut=!0,ft.current=ft.current.filter(Ce=>Ce===J||!Ce.timedOut)):ft.current=ft.current.filter(Ce=>Ce!==J),clearTimeout(J.timeoutId),J.resolve(Ae)},[]);re.current=d,V.current=f,ee.current=l,ae.current=p,oe.current=m,N.useEffect(()=>{const J=new L2({baseURL:e,orgId:t,esDeveloperName:n,options:F({enableLogging:u},s?{capabilitiesVersion:s}:{})});H.current=J,he.current=!1,X(!1),I(!1),q(!1),x({type:"RESET"}),J.on("connected",()=>{var pe;x({type:"SET_CONNECTION_STATUS",status:"connected"}),(pe=ee.current)==null||pe.call(ee)}),J.on("disconnected",()=>{x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),J.on("reconnecting",()=>{x({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),J.on("message",pe=>{var ar,Kr;const Ue=fe(F({id:pe.messageId||crypto.randomUUID()},pe.messageId?{serverId:pe.messageId}:{}),{role:"agent",content:pe.content,timestamp:pe.timestamp,sender:pe.sender,raw:pe});y==null||y.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:Ue.id,tokensBeforeFlush:le.current,streamedFinalOnly:le.current===0}),le.current=0;const je=ma(ft.current),Kt=je==null?void 0:je.options.reconcileMessageId;x({type:"FLUSH_STREAMING",message:Ue,replaceMessageId:Kt}),(ar=re.current)==null||ar.call(re,Ue),je&&vt(je,{outcome:"success"});const{messagingSessionId:wt}=pe,fn=wt?lN(pe.content):null;wt&&fn&&((Kr=ae.current)==null||Kr.call(ae,{agentSessionId:wt,kind:fn.kind,productIds:fn.productIds}))}),J.on("streaming_token",pe=>{var Ue;if(!((Ue=ma(ft.current))!=null&&Ue.options.silent)){if(le.current+=1,y!=null&&y.isDevelopment){const je=m1(pe.token);je?je.index===bi?y.debug("🦜 streaming_token → markdown fallback",{token:pe.token}):y.debug("🦜 streaming_token parsed",{type:je.type,index:je.index,outputName:je.type==="tool_results"?je.output_name:void 0}):y.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:pe.token})}x({type:"APPEND_STREAMING_TOKEN",token:pe.token})}}),J.on("typing_started",()=>{var pe;(pe=ma(ft.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!0})}),J.on("typing_stopped",()=>{var pe;(pe=ma(ft.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!1})}),J.on("progress_indicator",pe=>{var Ue;(Ue=ma(ft.current))!=null&&Ue.options.silent||x({type:"ADD_PROGRESS_STEP",message:pe.message})}),J.on("routing_result",pe=>{var Ue;if(x({type:"SET_ROUTING_RESULT",result:pe}),!pe.isSuccessful){const je=`Routing failed: ${pe.failureType||"unknown"}`;x({type:"SET_ERROR",error:P1({code:"ROUTING_FAILED"})}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ue=V.current)==null||Ue.call(V,je)}}),J.on("participant_changed",pe=>{if(pe.participant.name==="Automated Process")return;const Ue=fe(F({id:crypto.randomUUID()},pe.entryId?{serverId:pe.entryId}:{}),{role:"system",content:pe.action==="add"?`${pe.participant.name||"Agent"} joined the conversation`:`${pe.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});y==null||y.log("🦜 MessagingProvider participant_changed event received",{event:pe}),x({type:"ADD_MESSAGE",message:Ue})}),J.on("conversation_closed",()=>{const pe={id:crypto.randomUUID(),role:"system",content:N1,timestamp:new Date().toISOString()};x({type:"ADD_MESSAGE",message:pe}),x({type:"SET_CONVERSATION_ID",id:null}),se.clearPersistedConversation()}),J.on("error",pe=>{var Ue;if(y==null||y.log("🦜 MessagingProvider ERROR event received",{event:pe}),pe.code==="SESSION_EXPIRED"){W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}x({type:"SET_ERROR",error:P1(pe)}),pe.recoverable||x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ue=V.current)==null||Ue.call(V,pe.message)});const Ae=pe=>{if(pe!==Ne.current)throw to},Ce=pe=>pe===Ne.current,ve=pe=>ke(null,null,function*(){I(!1);let Ue=se.getStoredConnectOptions(),je=!1;Ue||(Ue=yield se.getPeerConnectOptions(),Ae(pe),je=!!Ue);let Kt=!1;try{if(yield J.connect(Ue!=null?Ue:void 0),!Ce(pe))throw J.disconnect(),to;Kt=!!(Ue!=null&&Ue.lastEventId)}catch(fn){if(Ae(pe),Ue&&If(fn)){if(y==null||y.log("Stored token expired on connect — falling back to fresh connect"),je||se.clearPersistedConversation(),yield J.connect(),!Ce(pe))throw J.disconnect(),to;Kt=!1}else throw fn}q(Kt),yield se.persistContinuationToken(J,()=>Ce(pe)),Ae(pe);const wt=yield se.initializeConversation(J,{isCurrent:()=>Ce(pe)});if(Ae(pe),y==null||y.log("🦜 initial connect complete",{conversationId:wt.conversationId,resumed:wt.resumed,outcome:wt.outcome,restoredMessages:wt.restoredMessages.length}),wt.outcome==="aborted")throw x({type:"SET_LOADING",isLoading:!1}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),to;if(wt.outcome==="unverified-error"){wt.conversationId&&(J.resumeConversation(wt.conversationId),x({type:"SET_CONVERSATION_ID",id:wt.conversationId})),I(!0);return}x({type:"SET_CONVERSATION_ID",id:wt.conversationId}),wt.resumed&&x({type:"LOAD_HISTORY",messages:wt.restoredMessages}),I(!0),x({type:"SET_LOADING",isLoading:!1})});return L.current=ve,()=>{Ne.current+=1,Ie.current+=1,J.disconnect(),J.off(),H.current=null,L.current=null,xe.current=null,he.current=!1}},[e,t,n,s,vt]);const pt=N.useCallback(()=>{if(he.current)return Promise.resolve();if(xe.current)return De.current===Ne.current?xe.current:xe.current.catch(ve=>{if(ve!==to)throw ve}).then(()=>Ze.current());const J=L.current;if(!J)return Promise.reject(new Error("Messaging is unavailable"));x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"});const Ae=++Ne.current;De.current=Ae;const Ce=J(Ae).then(()=>{he.current=!0,X(!0)}).catch(ve=>{var Ue;if(ve===to)throw ve;const pe=ve instanceof Error?ve.message:String(ve);throw x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:Br(ve)}),(Ue=V.current)==null||Ue.call(V,pe),ve}).finally(()=>{xe.current===Ce&&(xe.current=null)});return xe.current=Ce,Ce},[]);Ze.current=pt,N.useEffect(()=>{A&&pt().catch(()=>{})},[A,e,t,n,s,pt]);const $e=rk({isOpen:A,connectionStatus:v.connectionStatus,conversationId:v.conversationId,messages:v.messages,deliverUserMessageRef:gt}),bt=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J)return!1;const Ae=se.getStoredConnectOptions();if(!Ae)return y==null||y.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;y==null||y.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{J.disconnect(),yield J.connect(Ae)}catch(ve){if(If(ve))return y==null||y.log("🦜 attemptResume: token expired (401) — will start fresh",{error:ve instanceof Error?ve.message:String(ve)}),!1;throw y==null||y.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:ve instanceof Error?ve.message:String(ve)}),ve}yield se.persistContinuationToken(J);const Ce=yield se.initializeConversation(J,{createIfMissing:!1});return Ce.outcome==="not-found-or-closed"||!Ce.conversationId?(y==null||y.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(Ce.outcome==="unverified-error"&&(y==null||y.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:Ce.conversationId}),J.resumeConversation(Ce.conversationId)),y==null||y.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:Ce.conversationId}),x({type:"SET_CONVERSATION_ID",id:Ce.conversationId}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),se.persistConversationId(Ce.conversationId),W.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[se,y]),Gt=N.useCallback(J=>ke(null,null,function*(){var Ce,ve,pe;const Ae=H.current;if(Ae){J.options.silent||(x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""}));try{if(J.file){const Ue=yield M1(J);if("error"in Ue){x({type:"SET_SEND_ERROR",error:{text:J.text,displayContent:J.displayContent,options:J.options,sessionContext:J.sessionContext,file:J.file,message:Ue.error}}),(Ce=V.current)==null||Ce.call(V,Ue.error),vt(J,{outcome:"failure",message:Ue.error});return}const je=yield Ae.sendFile(Ue.file,J.text.trim()?{text:J.text}:void 0);C1((ve=Ae.conversationId)!=null?ve:ne.current.conversationId,je,J.file)}else J.sessionContext?yield Ae.sendMessage(J.text,J.sessionContext):yield Ae.sendMessage(J.text)}catch(Ue){const je=Br(Ue);x({type:"SET_SEND_ERROR",error:{text:J.text,displayContent:J.displayContent,options:J.options,sessionContext:J.sessionContext,file:J.file,message:je}}),(pe=V.current)==null||pe.call(V,Ue instanceof Error?Ue.message:String(Ue)),vt(J,{outcome:"failure",message:je})}}}),[vt]),Re=N.useCallback(J=>ke(null,null,function*(){var Ce;const Ae=H.current;if(!(!Ae||me.current)){me.current=!0,de.current=!0;try{if(yield bt()){J&&(yield Gt(J));return}y==null||y.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),W.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:qN,timestamp:new Date().toISOString()}}),se.clearPersistedConversation(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ae.disconnect(),yield Ae.connect(),yield se.persistContinuationToken(Ae);const ve=yield dl({routingAttributes:r});if(ve===pa){x({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const pe=yield Ae.createConversation(ve);y==null||y.log("🦜 recoverExpiredSession: new conversation created",{conversationId:pe}),x({type:"SET_CONVERSATION_ID",id:pe}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),se.persistConversationId(pe),J&&(yield Gt(J))}catch(ve){const pe=ve instanceof Error?ve.message:String(ve);x({type:"SET_ERROR",error:Br(ve)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ce=V.current)==null||Ce.call(V,pe),J&&vt(J,{outcome:"failure",message:Br(ve)})}finally{me.current=!1,de.current=!1}}}),[r,se,bt,Gt,y,vt]),Ke=N.useRef(Re);Ke.current=Re;const ot=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J||!he.current||me.current)return;if(!ne.current.conversationId&&!W.current){J.reconnect();return}me.current=!0;const Ae=ke(null,null,function*(){try{(yield bt())||(W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(Ce){W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{me.current=!1,Z.current=null}});Z.current=Ae,yield Ae}),[bt]),Et=N.useRef(ot);Et.current=ot;const Sr=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J||me.current)return;const Ae=se.getStoredConnectOptions(),Ce=Ae==null?void 0:Ae.continuationToken;if(Ce){me.current=!0;try{J.disconnect(),yield J.connect({continuationToken:Ce}),yield se.persistContinuationToken(J);const ve=ne.current.conversationId;ve&&J.resumeConversation(ve)}catch(ve){if(If(ve)){W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}y==null||y.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:ve instanceof Error?ve.message:String(ve)})}finally{me.current=!1}}}),[se,y]);N.useEffect(()=>{const J=()=>{const je=Date.now();je-B.current<YN||(B.current=je,Et.current())},Ae=()=>{if(document.visibilityState==="hidden"){C.current=Date.now();return}const je=H.current;if(!je)return;const Kt=C.current?Date.now()-C.current:0;C.current=0,(W.current||!je.isConnected||Kt>WN)&&J()},Ce=je=>{je.persisted&&J()},ve=()=>{C.current=Date.now()},pe=()=>J(),Ue=()=>J();return document.addEventListener("visibilitychange",Ae),window.addEventListener("pageshow",Ce),window.addEventListener("pagehide",ve),document.addEventListener("resume",pe),window.addEventListener("online",Ue),()=>{document.removeEventListener("visibilitychange",Ae),window.removeEventListener("pageshow",Ce),window.removeEventListener("pagehide",ve),document.removeEventListener("resume",pe),window.removeEventListener("online",Ue)}},[]);const ks=N.useCallback((J,Ae)=>ke(null,null,function*(){var ve,pe,Ue;const Ce=H.current;if(!Ce){vt(J,{outcome:"failure",message:"Messaging is unavailable"});return}if(W.current){yield Ke.current(J);return}try{if(J.file){const je=yield M1(J);if("error"in je){x({type:"SET_SEND_ERROR",error:Ae(je.error)}),(ve=V.current)==null||ve.call(V,je.error),vt(J,{outcome:"failure",message:je.error});return}const Kt=yield Ce.sendFile(je.file,J.text.trim()?{text:J.text}:void 0);C1((pe=Ce.conversationId)!=null?pe:ne.current.conversationId,Kt,J.file)}else J.sessionContext?yield Ce.sendMessage(J.text,J.sessionContext):yield Ce.sendMessage(J.text)}catch(je){if(O1(je)){yield Ke.current(J);return}const Kt=Br(je);x({type:"SET_SEND_ERROR",error:Ae(Kt)}),(Ue=V.current)==null||Ue.call(V,je instanceof Error?je.message:String(je)),vt(J,{outcome:"failure",message:Kt})}}),[vt]),Os=N.useCallback(J=>ke(null,null,function*(){const Ae=Z.current;Ae&&(yield Ae),yield J()}),[]),ce=N.useCallback((J,Ae,Ce={},ve,pe,Ue=!1)=>new Promise(je=>{if(!H.current){je({outcome:"failure",message:"Messaging is unavailable"});return}if(!J.trim()&&!pe){je({outcome:"failure",message:"Message is empty"});return}const wt={};if(Object.assign(wt,{text:J,displayContent:Ae,options:Ce,sessionContext:ve!==void 0?ve:a&&ck(Rf())||null,file:pe,resolve:je,timeoutId:setTimeout(()=>{x({type:"SET_LOADING",isLoading:!1}),vt(wt,{outcome:"timeout"})},GN)}),ft.current.push(wt),x({type:"CLEAR_SEND_ERROR"}),!Ce.silent){if(!Ue){const fn=crypto.randomUUID();x({type:"ADD_MESSAGE",message:{id:fn,role:"user",content:Ae!=null?Ae:J,timestamp:new Date().toISOString()}}),pe&&pe.type.startsWith("image/")&&af(pe,{maxDimension:pk,quality:mk}).then(vg).then(ar=>x({type:"UPDATE_MESSAGE",id:fn,patch:{attachmentImageUrl:ar}})).catch(()=>{})}x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""})}Os(()=>ks(wt,fn=>({text:J,displayContent:Ae,options:Ce,sessionContext:wt.sessionContext,file:pe,message:fn})))}),[ks,Os,a,vt]);gt.current=ce;const _e=N.useCallback((J,Ae)=>{if(!J.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});if(!A||!Of(ne.current.messages)){const je=$e(J,Ae);return he.current||pt().catch(()=>{}),A?je:Promise.resolve({outcome:"success"})}const Ce=Ie.current,ve=()=>{const je=()=>Ce!==Ie.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):ce(J,Ae==null?void 0:Ae.displayContent,Ae);return he.current?je():pt().then(je,Kt=>({outcome:"failure",message:Br(Kt)}))},pe=ht.current?ht.current.then(ve):ve(),Ue=pe.then(()=>{});return ht.current=Ue,Ue.finally(()=>{ht.current===Ue&&(ht.current=null)}),pe},[ce,pt,A,$e]);Dt.current=_e;const Ye=N.useCallback(J=>{if(!H.current)return Promise.resolve({outcome:"failure",message:"Messaging is unavailable"});const{text:Ce,file:ve,displayContent:pe}=J;if(!ve)return Ce.trim()?_e(Ce):Promise.resolve({outcome:"failure",message:"Message is empty"});const Ue=Ce.trim(),je=(pe!=null?pe:Ce).trim()||ve.name;if(!A||!Of(ne.current.messages)){const Kr=$e(Ue,{displayContent:je},ve);return he.current||pt().catch(()=>{}),A?Kr:Promise.resolve({outcome:"success"})}const Kt=Ie.current,wt=()=>{const Kr=()=>Kt!==Ie.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):ce(Ue,je,{},null,ve);return he.current?Kr():pt().then(Kr,Is=>({outcome:"failure",message:Br(Is)}))},fn=ht.current?ht.current.then(wt):wt(),ar=fn.then(()=>{});return ht.current=ar,ar.finally(()=>{ht.current===ar&&(ht.current=null)}),fn},[ce,_e,pt,A,$e]),et=N.useCallback(J=>{if(!H.current)return;const Ae=Ie.current,{prompt:Ce,display:ve}=JN(J);pt().then(()=>{if(Ae===Ie.current)return ce(Ce,ve)}).catch(()=>{})},[ce,pt]),it=N.useCallback(()=>{const J=H.current,Ae=ne.current.sendError;if(!J||!Ae)return;const Ce=()=>de.current?Promise.resolve({outcome:"failure",message:Ae.message}):ce(Ae.text,Ae.displayContent,Ae.options,Ae.sessionContext,Ae.file,!0),ve=ht.current?ht.current.then(Ce):Ce(),pe=ve.then(()=>{});return ht.current=pe,pe.finally(()=>{ht.current===pe&&(ht.current=null)}),ve},[ce]),Xt=N.useCallback(()=>{const J=H.current;J&&(xe.current||(W.current=!1,he.current=!1,X(!1),J.disconnect(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),pt().catch(()=>{})))},[pt]),Un=N.useCallback(()=>{const J=H.current;if(!J)return Promise.resolve();if(ft.current=[],!he.current)return Ne.current+=1,Ie.current+=1,J.disconnect(),se.clearPersistedConversation(),x({type:"RESET"}),Promise.resolve();const Ae=++Ie.current;return W.current=!1,q(!1),se.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),J.endConversation().then(()=>Ae!==Ie.current||H.current!==J?null:(J.disconnect(),J.connect().then(()=>J))).then(Ce=>ke(null,null,function*(){if(!Ce||Ae!==Ie.current||(yield se.persistContinuationToken(Ce,()=>Ae===Ie.current&&H.current===Ce),Ae!==Ie.current||H.current!==Ce))return null;const ve=yield dl({routingAttributes:r});return ve===pa?null:J.createConversation(ve)})).then(Ce=>{!Ce||Ae!==Ie.current||H.current!==J||(x({type:"SET_CONVERSATION_ID",id:Ce}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),se.persistConversationId(Ce))}).catch(Ce=>{var ve;Ae!==Ie.current||H.current!==J||(x({type:"SET_ERROR",error:Br(Ce)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=V.current)==null||ve.call(V,Ce.message))})},[r,se]);ik(Un),ZN({connectionStatus:v.connectionStatus,loading:v.loading,hasMessages:v.messages.length>0,sessionExpired:v.sessionExpired,bootstrapSettled:k,resumeUsedLastEventId:j,recoverySteps:[Sr,Un],onExhausted:()=>{var Ae;const J=Br({type:"network"});x({type:"SET_ERROR",error:J}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ae=V.current)==null||Ae.call(V,J)},logger:y,isRecoveryInFlight:()=>me.current||Z.current!==null});const Nn=N.useCallback(()=>ke(null,null,function*(){var ve;const J=H.current;if(!J||!ne.current.conversationId)return;const Ae=yield J.retrieveConversationTranscript(),Ce=URL.createObjectURL(Ae);try{const pe=document.createElement("a");pe.href=Ce,pe.download=`transcript-${(ve=J.conversationId)!=null?ve:"conversation"}.pdf`,document.body.appendChild(pe),pe.click(),pe.remove()}finally{URL.revokeObjectURL(Ce)}}),[]),ir=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J)return Promise.resolve();if(ft.current=[],!he.current)return Ne.current+=1,Ie.current+=1,J.disconnect(),se.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Promise.resolve();const Ae=++Ie.current;if(W.current=!1,q(!1),oe.current)try{yield Promise.race([oe.current(ne.current.conversationId),new Promise(ve=>setTimeout(ve,dk))])}catch(ve){y==null||y.error("onEndConversation callback failed",ve)}se.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"});const Ce={id:crypto.randomUUID(),role:"system",content:N1,timestamp:new Date().toISOString()};return x({type:"ADD_MESSAGE",message:Ce}),he.current=!1,X(!1),J.endConversation().then(()=>{Ae!==Ie.current||H.current!==J||J.disconnect()}).catch(ve=>{var pe;Ae!==Ie.current||H.current!==J||(x({type:"SET_ERROR",error:Br(ve)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(pe=V.current)==null||pe.call(V,ve.message))})}),[y,se,q]);sk(ir);const sr=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J)throw new Error("getAuthLinkKey called before the messaging client connected");return y==null||y.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),J.getAuthLinkKey()}),[y]);N.useEffect(()=>{const J={getAuthLinkKey:sr,sendMessage:(Ae,Ce)=>Dt.current(Ae,Ce)};return ak(J),()=>uk(J)},[sr]);const Ut=v.connectionStatus==="connected"&&v.conversationId!==null;N.useEffect(()=>{wg(Ut)},[Ut]),N.useEffect(()=>()=>wg(!1),[]);const or=N.useMemo(()=>({connectionStatus:v.connectionStatus,isConnected:Ut,isAgentTyping:v.isAgentTyping,conversationId:v.conversationId,messages:v.messages,streamingBlocks:v.streamingBlocks,progressMessage:v.progressMessage,progressSteps:v.progressSteps,error:v.error,sendError:v.sendError,canInitialize:!R&&v.error===null,loading:v.loading,sessionExpired:v.sessionExpired,sendMessage:_e,sendFile:Ye,addToCart:et,resetConversation:Un,endConversation:ir,retryLastMessage:it,retryConnection:Xt,downloadTranscript:Nn,getAuthLinkKey:sr}),[v,Ut,R,_e,Ye,et,Un,ir,it,Xt,Nn,sr]);return w.jsx(b1.Provider,{value:or,children:T})};var B1=Symbol.for("immer-nothing"),U1=Symbol.for("immer-draftable"),Wn=Symbol.for("immer-state");function Er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var no=Object.getPrototypeOf;function ro(e){return!!e&&!!e[Wn]}function os(e){var t;return e?H1(e)||Array.isArray(e)||!!e[U1]||!!((t=e.constructor)!=null&&t[U1])||ga(e)||pl(e):!1}var Ek=Object.prototype.constructor.toString();function H1(e){if(!e||typeof e!="object")return!1;const t=no(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)===Ek}function fl(e,t){hl(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function hl(e){const t=e[Wn];return t?t.type_:Array.isArray(e)?1:ga(e)?2:pl(e)?3:0}function Lf(e,t){return hl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function j1(e,t,n){const r=hl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function yk(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ga(e){return e instanceof Map}function pl(e){return e instanceof Set}function as(e){return e.copy_||e.base_}function Df(e,t){if(ga(e))return new Map(e);if(pl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=H1(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Wn];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(no(e),r)}else{const r=no(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function Mf(e,t=!1){return gl(e)||ro(e)||!os(e)||(hl(e)>1&&Object.defineProperties(e,{set:{value:ml},add:{value:ml},clear:{value:ml},delete:{value:ml}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Mf(n,!0))),e}function ml(){Er(2)}function gl(e){return Object.isFrozen(e)}var Tk={};function us(e){const t=Tk[e];return t||Er(0,e),t}var Ea;function $1(){return Ea}function bk(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function z1(e,t){t&&(us("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ff(e){Bf(e),e.drafts_.forEach(wk),e.drafts_=null}function Bf(e){e===Ea&&(Ea=e.parent_)}function V1(e){return Ea=bk(Ea,e)}function wk(e){const t=e[Wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function q1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Wn].modified_&&(Ff(t),Er(4)),os(e)&&(e=El(t,e),t.parent_||yl(t,e)),t.patches_&&us("Patches").generateReplacementPatches_(n[Wn].base_,e,t.patches_,t.inversePatches_)):e=El(t,n,[]),Ff(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==B1?e:void 0}function El(e,t,n){if(gl(t))return t;const r=t[Wn];if(!r)return fl(t,(s,a)=>W1(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return yl(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),fl(a,(l,d)=>W1(e,r,s,l,d,n,u)),yl(e,s,!1),n&&e.patches_&&us("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function W1(e,t,n,r,s,a,u){if(ro(s)){const l=a&&t&&t.type_!==3&&!Lf(t.assigned_,r)?a.concat(r):void 0,d=El(e,s,l);if(j1(n,r,d),ro(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(os(s)&&!gl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;El(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ga(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&yl(e,s)}}function yl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Mf(t,n)}function xk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:$1(),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=ya);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var Uf={get(e,t){if(t===Wn)return e;const n=as(e);if(!Lf(n,t))return _k(e,n,t);const r=n[t];return e.finalized_||!os(r)?r:r===Hf(e.base_,t)?($f(e),e.copy_[t]=zf(r,e)):r},has(e,t){return t in as(e)},ownKeys(e){return Reflect.ownKeys(as(e))},set(e,t,n){const r=Y1(as(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Hf(as(e),t),a=s==null?void 0:s[Wn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(yk(n,s)&&(n!==void 0||Lf(e.base_,t)))return!0;$f(e),jf(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 Hf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$f(e),jf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=as(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Er(11)},getPrototypeOf(e){return no(e.base_)},setPrototypeOf(){Er(12)}},ya={};fl(Uf,(e,t)=>{ya[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ya.deleteProperty=function(e,t){return ya.set.call(this,e,t,void 0)},ya.set=function(e,t,n){return Uf.set.call(this,e[0],t,n,e[0])};function Hf(e,t){const n=e[Wn];return(n?as(n):e)[t]}function _k(e,t,n){var s;const r=Y1(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Y1(e,t){if(!(t in e))return;let n=no(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=no(n)}}function jf(e){e.modified_||(e.modified_=!0,e.parent_&&jf(e.parent_))}function $f(e){e.copy_||(e.copy_=Df(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Sk=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"&&Er(6),r!==void 0&&typeof r!="function"&&Er(7);let s;if(os(t)){const a=V1(this),u=zf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?Ff(a):Bf(a)}return z1(a,r),q1(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===B1&&(s=void 0),this.autoFreeze_&&Mf(s,!0),r){const a=[],u=[];us("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Er(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){os(e)||Er(8),ro(e)&&(e=vk(e));const t=V1(this),n=zf(e,void 0);return n[Wn].isManual_=!0,Bf(t),n}finishDraft(e,t){const n=e&&e[Wn];(!n||!n.isManual_)&&Er(9);const{scope_:r}=n;return z1(r,t),q1(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=us("Patches").applyPatches_;return ro(e)?r(e,t):this.produce(e,s=>r(s,t))}};function zf(e,t){const n=ga(e)?us("MapSet").proxyMap_(e,t):pl(e)?us("MapSet").proxySet_(e,t):xk(e,t);return(t?t.scope_:$1()).drafts_.push(n),n}function vk(e){return ro(e)||Er(10,e),G1(e)}function G1(e){if(!os(e)||gl(e))return e;const t=e[Wn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Df(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Df(e,!0);return fl(n,(r,s)=>{j1(n,r,G1(s))}),t&&(t.finalized_=!1),n}var Ak=new Sk,Ck=Ak.produce;function Nk(e,t,n){var r=N.useMemo(function(){return Ck(e)},[e]);return N.useReducer(r,t,n)}const kk=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),X1=N.createContext(null),K1=N.createContext(null),Ok=({children:e,dispatch:t})=>{const n=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),l=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=N.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,l,d,f,p,m,T]);return w.jsx(K1.Provider,{value:y,children:e})},Ik=(e,t)=>{const{type:n,payload:r}=t;switch(n){case St.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case St.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case St.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case St.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case St.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case St.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case St.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case St.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case St.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case St.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case St.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case St.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case St.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case St.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case St.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Pk=({promptsConfig:e,children:t})=>{const[n,r]=Nk(Ik,fe(F(F({},Ag),e||{}),{staticQuestions:kk((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(X1.Provider,{value:n,children:w.jsx(Ok,{dispatch:r,children:t})})},Rk={productId:Lr.productId,pdpLink:Lr.pdpLink},Q1=N.createContext(Rk),Lk=({children:e})=>{const[t,n]=N.useState(Lr.productId),[r,s]=N.useState(Lr.pdpLink);N.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 _2(u),()=>{S2(u)}},[]);const a=N.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(Q1.Provider,{value:a,children:e})},Dk=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){kt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){kt(!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"?(kt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(kt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),kt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,kt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),J1=N.createContext({overrides:{},isInitialized:!1}),Mk=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=N.useState({}),[a,u]=N.useState(!1);N.useEffect(()=>{ke(null,null,function*(){let f={};e?(kt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield Dk(e)):t&&typeof t=="object"?(kt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(kt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=N.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(J1.Provider,{value:l,children:n})},Z1=({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:T,entryType:y,initialEntry:_,entryMessage:A,disclaimerText:v,disclaimerMarkdown:x,clientContext:k,searchPlaceholder:I,searchButtonLabel:j,searchConfig:q,suggestionButtonConfig:R,messageAlignment:X,autoScroll:ne,promptsConfig:se,showProductDescription:H,resetConversationMessage:re,conversationHistory:V,messagingConfig:ee,overrides:ae,overridesUrl:oe,inlineOverrides:me,__features:de,children:W})=>{const le=p||k2(),C=N.useRef(!1);return C.current||(C.current=!0,C2({initialEntry:_,entryType:y,isDevelopment:le})),w.jsx(sN,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:A,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:I,searchButtonLabel:j,searchConfig:q,suggestionButtonConfig:R,messageAlignment:X,autoScroll:ne,showProductDescription:H,componentConfig:T,clientContext:k,disclaimerMarkdown:x,disclaimerText:v,resetConversationMessage:re,conversationHistory:V,isDevelopment:le,__features:de,progressStepsLimit:ee==null?void 0:ee.progressStepsLimit,routingAttributes:ee==null?void 0:ee.routingAttributes,enableDownloadTranscript:ee==null?void 0:ee.enableDownloadTranscript,enablePageContext:ee==null?void 0:ee.enablePageContext,enableEscalationToAgent:ee==null?void 0:ee.enableEscalationToAgent,enableImageUpload:ee==null?void 0:ee.enableImageUpload,showProductCaptions:ee==null?void 0:ee.showProductCaptions,children:w.jsx(J2,{entryType:y!=null?y:_==null?void 0:_.type,componentConfig:T,componentType:m,children:w.jsx(Lk,{children:w.jsx(Pk,{promptsConfig:se,children:w.jsx(Mk,{overridesUrl:oe,inlineOverrides:me||ae,children:w.jsx(F1,{scrt2Url:(ee==null?void 0:ee.scrt2Url)||"",orgId:(ee==null?void 0:ee.orgId)||"",esDeveloperName:(ee==null?void 0:ee.esDeveloperName)||"",routingAttributes:(ee==null?void 0:ee.routingAttributes)||{},capabilitiesVersion:ee==null?void 0:ee.capabilitiesVersion,enablePageContext:ee==null?void 0:ee.enablePageContext,enableLogging:le,onProductResult:ee==null?void 0:ee.onProductResult,onEndConversation:ee==null?void 0:ee.onEndConversation,children:W})})})})})})};var Vf={exports:{}},Rn={},qf={exports:{}},Wf={};var eE;function Fk(){return eE||(eE=1,(function(e){function t(W,le){var C=W.length;W.push(le);e:for(;0<C;){var B=C-1>>>1,Z=W[B];if(0<s(Z,le))W[B]=le,W[C]=Z,C=B;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var le=W[0],C=W.pop();if(C!==le){W[0]=C;e:for(var B=0,Z=W.length,L=Z>>>1;B<L;){var xe=2*(B+1)-1,De=W[xe],he=xe+1,Ne=W[he];if(0>s(De,C))he<Z&&0>s(Ne,De)?(W[B]=Ne,W[he]=C,B=he):(W[B]=De,W[xe]=C,B=xe);else if(he<Z&&0>s(Ne,C))W[B]=Ne,W[he]=C,B=he;else break e}}return le}function s(W,le){var C=W.sortIndex-le.sortIndex;return C!==0?C:W.id-le.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,T=3,y=!1,_=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,x=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(W){for(var le=n(f);le!==null;){if(le.callback===null)r(f);else if(le.startTime<=W)r(f),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(f)}}function j(W){if(A=!1,I(W),!_)if(n(d)!==null)_=!0,me(q);else{var le=n(f);le!==null&&de(j,le.startTime-W)}}function q(W,le){_=!1,A&&(A=!1,x(ne),ne=-1),y=!0;var C=T;try{for(I(le),m=n(d);m!==null&&(!(m.expirationTime>le)||W&&!re());){var B=m.callback;if(typeof B=="function"){m.callback=null,T=m.priorityLevel;var Z=B(m.expirationTime<=le);le=e.unstable_now(),typeof Z=="function"?m.callback=Z:m===n(d)&&r(d),I(le)}else r(d);m=n(d)}if(m!==null)var L=!0;else{var xe=n(f);xe!==null&&de(j,xe.startTime-le),L=!1}return L}finally{m=null,T=C,y=!1}}var R=!1,X=null,ne=-1,se=5,H=-1;function re(){return!(e.unstable_now()-H<se)}function V(){if(X!==null){var W=e.unstable_now();H=W;var le=!0;try{le=X(!0,W)}finally{le?ee():(R=!1,X=null)}}else R=!1}var ee;if(typeof k=="function")ee=function(){k(V)};else if(typeof MessageChannel!="undefined"){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=V,ee=function(){oe.postMessage(null)}}else ee=function(){v(V,0)};function me(W){X=W,R||(R=!0,ee())}function de(W,le){ne=v(function(){W(e.unstable_now())},le)}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(W){W.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,me(q))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(W){switch(T){case 1:case 2:case 3:var le=3;break;default:le=T}var C=T;T=le;try{return W()}finally{T=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,le){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var C=T;T=W;try{return le()}finally{T=C}},e.unstable_scheduleCallback=function(W,le,C){var B=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?B+C:B):C=B,W){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=C+Z,W={id:p++,callback:le,priorityLevel:W,startTime:C,expirationTime:Z,sortIndex:-1},C>B?(W.sortIndex=C,t(f,W),n(d)===null&&W===n(f)&&(A?(x(ne),ne=-1):A=!0,de(j,C-B))):(W.sortIndex=Z,t(d,W),_||y||(_=!0,me(q))),W},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(W){var le=T;return function(){var C=T;T=le;try{return W.apply(this,arguments)}finally{T=C}}}})(Wf)),Wf}var tE;function Bk(){return tE||(tE=1,qf.exports=Fk()),qf.exports}var nE;function Uk(){if(nE)return Rn;nE=1;var e=pr(),t=Bk();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 T(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 _(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 A(i,o,c,h,E,b,S){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=b,this.removeEmptyString=S}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(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){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var x=/[\-:]([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(x,k);v[o]=new A(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(x,k);v[o]=new A(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(x,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,c,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,c,E,h)&&(c=null),h||E===null?T(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 j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),R=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),se=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),re=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),W=Symbol.iterator;function le(i){return i===null||typeof i!="object"?null:(i=W&&i[W]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,B;function Z(i){if(B===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);B=o&&o[1]||""}return`
|
|
16
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=rs(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ol.assertOptions(r,{silentJSONParsing:gn.transitional(gn.boolean),forcedJSONParsing:gn.transitional(gn.boolean),clarifyTimeoutError:gn.transitional(gn.boolean),legacyInterceptorReqResOrdering:gn.transitional(gn.boolean),advertiseZstdAcceptEncoding:gn.transitional(gn.boolean),validateStatusUndefinedResolves:gn.transitional(gn.boolean)},!1),s!=null&&(G.isFunction(s)?n.paramsSerializer={serialize:s}:ol.assertOptions(s,{encode:gn.function,serialize:gn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ol.assertOptions(n,{baseUrl:gn.spelling("baseURL"),withXsrfToken:gn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&G.merge(a.common,a[n.method]);a&&G.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=mn.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||mf;v&&v.legacyInterceptorReqResOrdering?l.unshift(A.fulfilled,A.rejected):l.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,T;if(!d){const _=[c1.bind(this),void 0];for(_.unshift(...l),_.push(...f),T=_.length,p=Promise.resolve(n);m<T;)p=p.then(_[m++],_[m++]);return p}T=l.length;let y=n;for(;m<T;){const _=l[m++],A=l[m++];try{y=_(y)}catch(v){A.call(this,v);break}}try{p=c1.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=rs(this.defaults,t);const n=e1(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Vg(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){is.prototype[t]=function(n,r){return this.request(rs(r||{},{method:t,url:n,data:r&&G.hasOwnProp(r,"data")?r.data:void 0}))}}),G.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(rs(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}is.prototype[t]=n(),t!=="query"&&(is.prototype[t+"Form"]=n(!0))});let ZC=class Nv{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 fa(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 Nv(function(s){t=s}),cancel:t}}};function eN(e){return function(n){return e.apply(null,n)}}function tN(e){return G.isObject(e)&&e.isAxiosError===!0}const xf={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(xf).forEach(([e,t])=>{xf[t]=e});function f1(e){const t=new is(e),n=Cg(is.prototype.request,t);return G.extend(n,is.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return f1(rs(e,s))},n}const jt=f1(da);jt.Axios=is,jt.CanceledError=fa,jt.CancelToken=ZC,jt.isCancel=Xg,jt.VERSION=Tf,jt.toFormData=tl,jt.AxiosError=Oe,jt.Cancel=jt.CanceledError,jt.all=function(t){return Promise.all(t)},jt.spread=eN,jt.isAxiosError=tN,jt.mergeConfig=rs,jt.AxiosHeaders=mn,jt.formToJSON=e=>Gg(G.isHTMLForm(e)?new FormData(e):e),jt.getAdapter=l1.getAdapter,jt.HttpStatusCode=xf,jt.default=jt;const{Axios:vj,AxiosError:Aj,CanceledError:Cj,isCancel:Nj,CancelToken:kj,VERSION:Oj,all:Ij,Cancel:Pj,isAxiosError:Rj,spread:Lj,toFormData:Dj,AxiosHeaders:Mj,HttpStatusCode:Fj,formToJSON:Bj,getAdapter:Uj,mergeConfig:Hj,create:jj}=jt;class nN{constructor(t,n,r,s=!1,a,u){Xe(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Xe(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Xe(this,"CIMULATE_SEARCH_API_PATH","api/v1");Xe(this,"baseApiUrl");Xe(this,"headers",{});Xe(this,"fetchConfig",()=>ke(this,null,function*(){try{const t=yield jt.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}}));Xe(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 rN{constructor(t,n,r,s=!1,a,u){Xe(this,"apiService");Xe(this,"config",null);Xe(this,"getConfig",()=>ke(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}}));Xe(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Xe(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Xe(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Xe(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Xe(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Xe(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Xe(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Xe(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Xe(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Xe(this,"getProductField",t=>this.config?this.config[t]:"");Xe(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new nN(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 iN={copilot:"Your Search Assistant",messaging:"Commerce Client"},h1=N.createContext(null),sN=({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:T,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:x=!0,showProductDescription:k=!1,componentConfig:I,conversationHistory:j,resetConversationMessage:q="",apiKey:R,apiToken:X,baseUrl:ne,customerId:se,tenantId:H,theme:re,isDevelopment:V,__features:ee,routingAttributes:ae,enableDownloadTranscript:oe=!0,enablePageContext:me=!1,enableEscalationToAgent:de=!1,enableImageUpload:W=!1,showProductCaptions:le=!1,staticQuestions:C,staticQuestionsStrategy:B="append",children:Z})=>{const L=e==="messaging",xe=N.useMemo(()=>{const Dt=ae==null?void 0:ae.isCartMgmtSupported;return Dt===!0||Dt==="true"},[ae]),De=N.useMemo(()=>L?{config:null}:new rN(ne,R,X,V,se,H),[L,ne,R,X,V,se,H]),he=N.useMemo(()=>new A2(V),[V]);N.useEffect(()=>{L||!De||De.config||De.getConfig()},[De,L]);const Ne=N.useMemo(()=>D2(re),[re]),Ie=N.useMemo(()=>{const Dt=(y==null?void 0:y.placeholder)||m,ft=(y==null?void 0:y.buttonLabel)||T;let ht="icon";return y!=null&&y.buttonType?ht=y.buttonType:T&&(ht="text"),fe(F({},y||{}),{placeholder:Dt,buttonLabel:ft,buttonType:ht})},[y,m,T]),Ze=N.useMemo(()=>fe(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||iN[e!=null?e:"copilot"]}),[r,t,n,e]),gt=N.useMemo(()=>({configModule:De,mode:e!=null?e:"copilot",headerConfig:Ze,entryMessage:a,staticQuestions:C||[],staticQuestionsStrategy:B,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Ne,logger:he,searchConfig:Ie,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:v,autoScroll:x,showProductDescription:!!k,enableMinimize:!!(I!=null&&I.enableMinimize),launcherAriaLabel:I==null?void 0:I.launcherAriaLabel,enableDownloadTranscript:oe,enablePageContext:me,enableEscalationToAgent:de,enableImageUpload:W,showProductCaptions:!!le,resetConversationMessage:q,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:L?24:1,limit:j==null?void 0:j.limit},features:ee,isCartMgmtSupported:xe}),[De,e,Ze,a,C,B,s,f,p,l,d,u,Ie,_,v,x,k,I,oe,me,de,W,A,le,q,he,Ne,j,ee,xe,L]);return w.jsx(h1.Provider,{value:gt,children:Z})},lt=()=>{const e=N.useContext(h1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},p1=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],bi=-1;function _f(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 m1(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"&&p1.includes(t.type))return t;const n=_f(t);return n?{type:"markdown",index:bi,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:bi,data:{content:e}}}function al(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"||!p1.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return fe(F({},n),{type:n.type,index:r})}function ha(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function Sf(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=ha(t);if(n)return n.response;const r=al(t);return[r&&r.type!=="markdown"?r:e]}function oN(e){const t=ha(e);if(t)return t.response.flatMap(Sf);const n=al(e);return n?Sf(n):[]}function g1(e,t){return oN(e).some(n=>n.type===t)}function aN(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&g1(r.content,t))return r.id}}function E1(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function uN(e){return e.type==="markdown"&&e.index===bi?!E1(e.data.content):!0}function lN(e){var s;const t=(s=ha(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 cN(e,t){if(t.index===bi){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===bi&&t.type==="markdown"){const a={type:"markdown",index:bi,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 y1(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const T1={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function dN(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return F(fe(F({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return fe(F({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return fe(F({},e),{conversationId:t.id});case"ADD_MESSAGE":return y1(e.messages,t.message)?e:fe(F({},e),{messages:[...e.messages,fe(F({},t.message),{type:"ADD_MESSAGE"})]});case"UPDATE_MESSAGE":return fe(F({},e),{messages:e.messages.map(n=>n.id===t.id?F(F({},n),t.patch):n)});case"APPEND_STREAMING_TOKEN":{const n=m1(t.token);return n?fe(F({},e),{streamingBlocks:cN(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(y1(e.messages,t.message))return F(F({},e),n);const r=fe(F({},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]=fe(F({},r),{id:e.messages[s].id}),F(fe(F({},e),{messages:a}),n)}return F(fe(F({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return fe(F({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return F(fe(F({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:fe(F({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return fe(F({},e),{routingResult:t.result});case"SET_ERROR":return fe(F({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return fe(F({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return fe(F({},e),{sendError:null});case"LOAD_HISTORY":return fe(F({},e),{messages:t.messages.map(n=>fe(F({},n),{restored:!0})),loading:!1});case"SET_SESSION_EXPIRED":return fe(F({},e),{sessionExpired:t.expired});case"RESET":return fe(F({},T1),{connectionStatus:e.connectionStatus});default:return e}}const b1=N.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>ke(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),sendFile:()=>ke(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>ke(null,null,function*(){}),endConversation:()=>ke(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>ke(null,null,function*(){}),getAuthLinkKey:()=>ke(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),fN=4320*60*1e3;function vf(e,t){return`cim_af_conv_${e}_${t}`}function Af(e,t){return Date.now()-e>t}function hN(e,t,n){try{const r=vf(e,t),s=localStorage.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"||Af(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function ul(e,t,n){try{const r=vf(e,t),s={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Cf(e,t){try{const n=vf(e,t);localStorage.removeItem(n)}catch(n){}}function Nf(e,t){return`cim_af_ct_${e}_${t}`}function pN(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(gN(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function mN(e){const t=pN(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function gN(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function w1(e,t){try{const n=Nf(e,t),r=localStorage.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:mN(a.accessToken)==="expired"?(localStorage.removeItem(n),null):a}catch(n){return null}}function EN(e,t,n,r){try{const s=Nf(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(s,JSON.stringify(a))}catch(s){}}function yN(e,t){try{const n=Nf(e,t);localStorage.removeItem(n)}catch(n){}}function TN(e,t){return`cim_af_conv_${e}_${t}`}function bN(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=TN(e,t);return new BroadcastChannel(n)}catch(n){return null}}function wN(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 xN(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 _N(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function SN(e){if(e)try{e.close()}catch(t){}}function vN(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function AN(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function x1(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 CN(e){const t=e.staticContent;if(!t||typeof t!="object")return!1;const n=t.attachments;return Array.isArray(n)&&n.length>0}function NN(e){if(e.entryType!=="Message")return null;const n=AN(e.entryPayload).abstractMessage;if(!n)return null;const r=x1(n,"staticContent","text")||x1(n,"content","text")||"";if(!r&&!CN(n))return null;const s=vN(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 kN(e){const t=[];for(const n of e){const r=NN(n);r&&t.push(r)}return t}const ON="cim_widget_thumbnails",ll="thumbnails",IN=1,kf="byConversation",_1="byStoredAt",PN=2e3;function RN(e,t){return`${e}::${t}`}function LN(){return new Promise(e=>{try{if(typeof indexedDB=="undefined"||!indexedDB){e(null);return}let t=!1;const n=a=>{t||(t=!0,e(a))},r=setTimeout(()=>n(null),PN),s=indexedDB.open(ON,IN);s.onupgradeneeded=()=>{const a=s.result;if(!a.objectStoreNames.contains(ll)){const u=a.createObjectStore(ll,{keyPath:"key"});u.createIndex(kf,"conversationId",{unique:!1}),u.createIndex(_1,"storedAt",{unique:!1})}},s.onsuccess=()=>{clearTimeout(r),n(s.result)},s.onerror=()=>{clearTimeout(r),n(null)},s.onblocked=()=>{clearTimeout(r),n(null)}}catch(t){e(null)}})}function cl(e,t,n){return ke(this,null,function*(){const r=yield LN();return r?new Promise(s=>{let a=t,u=!1;const l=d=>{u||(u=!0,s(d))};try{const d=r.transaction(ll,e),f=d.objectStore(ll);d.oncomplete=()=>{r.close(),l(a)},d.onerror=()=>{r.close(),l(t)},d.onabort=()=>{r.close(),l(t)},n(f,p=>{a=p})}catch(d){try{r.close()}catch(f){}l(t)}}):t})}function DN(e,t,n){return ke(this,null,function*(){if(!e||!t||!n)return;const r={key:RN(e,t),conversationId:e,messageId:t,dataUrl:n,storedAt:Date.now()};yield cl("readwrite",void 0,s=>{s.put(r)})})}function MN(e){return ke(this,null,function*(){return e?cl("readonly",{},(t,n)=>{const r={},a=t.index(kf).openCursor(IDBKeyRange.only(e));a.onsuccess=()=>{const u=a.result;if(u){const l=u.value;l!=null&&l.messageId&&(l!=null&&l.dataUrl)&&(r[l.messageId]=l.dataUrl),u.continue()}else n(r)}}):{}})}function S1(e){return ke(this,null,function*(){e&&(yield cl("readwrite",void 0,t=>{const r=t.index(kf).openCursor(IDBKeyRange.only(e));r.onsuccess=()=>{const s=r.result;s&&(s.delete(),s.continue())}}))})}function FN(e){return ke(this,null,function*(){const t=Date.now()-e;yield cl("readwrite",void 0,n=>{const s=n.index(_1).openCursor(IDBKeyRange.upperBound(t,!0));s.onsuccess=()=>{const a=s.result;a&&(a.delete(),a.continue())}})})}const BN=5e3,pa=Symbol("cimulate-abort-conversation");function dl(e={}){const{routingAttributes:t,timeoutMs:n=BN}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=F({},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 m=Object.keys(r).length>0;s(m?r:t)},d={routingAttributes:t,setHiddenPrechatFields:m=>{a.settled||!m||Object.assign(r,m)},done:u,abort:()=>{a.settled||(a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer),s(pa))}},f=new CustomEvent(bg,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}a.timer=setTimeout(u,n)})}const UN=200,HN=1e3,v1="cim_widget_thumbnails_last_sweep",jN=3600*1e3;function A1(e){try{const t=Date.now(),n=Number(localStorage.getItem(v1))||0;if(n>0&&t-n<jN)return;localStorage.setItem(v1,String(t))}catch(t){}FN(e)}function $N(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=N.useRef(null),u=N.useRef(null),l=N.useRef(null),d=s.sinceHours*60*60*1e3,f=fN,p=N.useCallback(()=>(l.current||(l.current=wN(a.current)),l.current),[]);N.useEffect(()=>{const x=bN(t,n);a.current=x,l.current=null;const k=xN(x,()=>{const I=u.current;if(!I)return null;const j=w1(t,n);return{conversationId:I,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{Cf(t,n),u.current=null});return()=>{k(),SN(x),a.current=null}},[t,n]),N.useEffect(()=>{A1(f)},[f]);const m=N.useCallback((x,k)=>ke(null,null,function*(){var R,X,ne;const I=(R=k==null?void 0:k.createIfMissing)!=null?R:!0,j=(X=k==null?void 0:k.isCurrent)!=null?X:(()=>!0);A1(f);let q=hN(t,n,f);if(!q){const se=yield p();se&&!Af(se.storedAt,f)&&(q=se)}if(!q){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const se=yield dl({routingAttributes:r});if(se===pa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=yield x.createConversation(se);return j()?(ul(t,n,H),u.current=H,{conversationId:H,restoredMessages:[],resumed:!1,outcome:"created"}):(yield x.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const se=yield x.listConversations({conversationId:q.conversationId,startTimestamp:Date.now()-f});if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const H=se.conversations.find(V=>V.conversationId===q.conversationId&&!V.isConversationClosed);if(!H){if(Cf(t,n),S1(q.conversationId),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const V=yield dl({routingAttributes:r});if(V===pa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!j())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ee=yield x.createConversation(V);return j()?(ul(t,n,ee),u.current=ee,{conversationId:ee,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield x.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}x.resumeConversation(H.conversationId),u.current=H.conversationId,ul(t,n,H.conversationId);let re=[];try{const V=yield x.listConversationEntries(H.conversationId,{limit:Math.min((ne=s.limit)!=null?ne:UN,HN),startTimestamp:Date.now()-d,direction:"FromEnd"});re=kN(V.conversationEntries).reverse();const ee=yield MN(H.conversationId);Object.keys(ee).length>0&&(re=re.map(ae=>ee[ae.id]?fe(F({},ae),{attachmentImageUrl:ee[ae.id]}):ae))}catch(V){}return{conversationId:H.conversationId,restoredMessages:re,resumed:!0,outcome:"resumed"}}catch(se){return{conversationId:q.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:se}}}),[t,n,r,s,d,f,p]),T=N.useCallback(x=>{ul(t,n,x),u.current=x},[t,n]),y=N.useCallback(()=>{u.current&&S1(u.current),Cf(t,n),yN(t,n),_N(a.current),u.current=null},[t,n]),_=N.useCallback(()=>{const x=w1(t,n);return x?{continuationToken:x.accessToken,lastEventId:x.lastEventId}:null},[t,n]),A=N.useCallback(()=>ke(null,null,function*(){const x=yield p();return!(x!=null&&x.continuationToken)||Af(x.storedAt,f)?null:{continuationToken:x.continuationToken,lastEventId:x.lastEventId}}),[f,p]),v=N.useCallback((x,k=()=>!0)=>ke(null,null,function*(){try{const{accessToken:I,lastEventId:j}=yield x.generateContinuationToken();if(!k())return;EN(t,n,I,j)}catch(I){}}),[t,n]);return{initializeConversation:m,persistConversationId:T,clearPersistedConversation:y,getStoredConnectOptions:_,getPeerConnectOptions:A,persistContinuationToken:v}}const zN=128,VN=.7;function C1(e,t,n){return ke(this,null,function*(){var r,s;try{if(!e||!n.type.startsWith("image/"))return;const a=(s=(r=t==null?void 0:t.conversationEntries)==null?void 0:r[0])==null?void 0:s.id;if(!a)return;const u=yield af(n,{maxDimension:zN,quality:VN,mimeType:"image/jpeg"}),l=yield vg(u);yield DN(e,a,l)}catch(a){}})}const qN="Your session ended due to inactivity. Starting a new session…",N1="This conversation has ended.",WN=300*1e3,YN=2e3,GN=1e4,XN=15e3,KN=2;function k1(e,t,n){return e||t||n===!0}function Of(e){return e.some(t=>t.role==="agent")}function ma(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function QN(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function O1(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 If(e){if(O1(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function JN(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).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 Pf(e,t){return t?{prompt:`${e} (Viewing product details for: ${t})`,display:e}:{prompt:e}}function ZN({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=XN,logger:f,isRecoveryInFlight:p}){const m=N.useRef(u);m.current=u;const T=N.useRef(l);T.current=l;const y=N.useRef(f);y.current=f;const _=N.useRef(p);_.current=p;const A=N.useRef(0),v=N.useRef(!1),x=N.useRef(0),[k,I]=N.useState(0);N.useEffect(()=>{if(!t||n){A.current=0,v.current=!1,x.current=0;return}const j=a||A.current>0;if(!(s&&j&&e==="connected"&&!r&&!v.current))return;const R=setTimeout(()=>{ke(null,null,function*(){var H,re;if((H=_.current)!=null&&H.call(_)){if(x.current+=1,x.current>KN){v.current=!0,T.current();return}I(V=>V+1);return}const X=A.current,ne=m.current;if(X>=ne.length){v.current=!0,T.current();return}x.current=0,(re=y.current)==null||re.warn("🦜 connect bootstrap stalled",{attempt:X});let se;try{yield Promise.race([Promise.resolve(ne[X]()),new Promise((V,ee)=>{se=setTimeout(()=>{ee(new Error("connect bootstrap step timed out"))},d)})])}catch(V){}finally{se!==void 0&&clearTimeout(se),A.current=X+1,I(V=>V+1)}})},d);return()=>{clearTimeout(R)}},[e,t,n,r,s,a,d,k])}const ek=100,tk=3e3;function I1(e,t){const n=e.current;e.current=[],n.forEach(({text:r,options:s,file:a,resolve:u})=>{const l=t.current;if(!l){u==null||u({outcome:"failure",message:"Messaging is unavailable"});return}l(r,s==null?void 0:s.displayContent,s,void 0,a).then(d=>u==null?void 0:u(d),d=>u==null?void 0:u({outcome:"failure",message:d instanceof Error?d.message:String(d)}))})}function nk(e,t){const n=e.current;n.length!==0&&(e.current=[],n.forEach(({resolve:r})=>{r==null||r({outcome:"failure",message:t})}))}function rk({isOpen:e,connectionStatus:t,conversationId:n,messages:r,deliverUserMessageRef:s}){const[a,u]=N.useState(0),l=N.useRef([]),d=N.useRef(t);d.current=t;const f=N.useRef(null);return N.useEffect(()=>{if(t==="error"){f.current=null,nk(l,"Connection error");return}const p=t==="connected"&&n!==null,m=l.current.length>0;if(!e||!p||!m){f.current=null;return}if(Of(r)){f.current=null;const A=setTimeout(()=>{I1(l,s)},ek);return()=>clearTimeout(A)}const T=Date.now();f.current===null&&(f.current=T+tk);const y=Math.max(0,f.current-T),_=setTimeout(()=>{f.current=null,l.current.length>0&&I1(l,s)},y);return()=>clearTimeout(_)},[e,t,n,r,s,a]),N.useCallback((p,m,T)=>d.current==="error"?Promise.resolve({outcome:"failure",message:"Connection error"}):new Promise(y=>{l.current.push({text:p,options:m,file:T,resolve:y}),u(_=>_+1)}),[])}function ik(e){const t=N.useRef(e);t.current=e,N.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Yu.RESET_CONVERSATION&&t.current()};return fg(n),()=>{hg(n)}},[])}function sk(e){const t=N.useRef(e);t.current=e,N.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Yu.END_CONVERSATION&&t.current()};return fg(n),()=>{hg(n)}},[])}const Fr={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 ok(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 Br(e){const{type:t,statusCode:n}=ok(e);if(t==="api"&&typeof n=="number")return n===429?Fr.rateLimit:n>=500?Fr.server:Fr.default;switch(t){case"network":return Fr.network;case"sse":return Fr.interrupted;case"auth":return Fr.connect;default:return Fr.default}}function P1(e){switch(e.code){case"MAX_RECONNECT":return Fr.lost;case"ROUTING_FAILED":return Fr.routing;default:return Fr.connect}}let ss=null;function ak(e){ss&&ss!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),ss=e}function uk(e){ss===e&&(ss=null)}function R1(){if(!ss)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return ss}function Rf(){if(ut.entryType==="pdp"){const{productId:e}=Lr.state;return e?{type:"pdp",id:e}:null}else return null}function L1(e){const t=e.type;switch(t){case"pdp":{const n=e.id.trim();if(!n)throw new Error("PDP page context must include an id");tf("pdp"),Lr.updateProxy({productId:n}),Lr.dispatchContextUpdate();return}default:throw new Error(`Unsupported page context type: ${String(t)}`)}}function D1(){Lr.clear(),Lr.dispatchContextUpdate()}const lk={pdp:"This is the product details page the user is currently looking at"};function ck(e){if(!e)return;const r=e,{type:t}=r,n=vn(r,["type"]);return[{entryType:"SessionContext",id:crypto.randomUUID(),sessionContext:{contextType:"SessionContextSet",contextVariables:[{name:"page_context_type",value:{valueType:"TextValue",textValue:t}},{name:"page_context_message",value:{valueType:"TextValue",textValue:lk[t]}},{name:"page_context_data",value:{valueType:"TextValue",textValue:JSON.stringify(n)}}]}}]}const to=Symbol("initialization-cancelled"),dk=3e4,fk="Image is too large to send. Please choose a smaller image.",hk="Sorry, we couldn't process that image. Please try a PNG, JPG, or GIF.",pk=512,mk=.7,gk=e=>ke(null,null,function*(){let t;try{t=yield af(e)}catch(n){if(!eA.includes(e.type))return console.warn("🦜 image downsize failed; original type not SCRT2-native, rejecting",n),{error:hk};console.warn("🦜 image downsize failed; uploading original",n),t=e}return t.size>of?{error:fk}:{file:t}}),M1=e=>ke(null,null,function*(){if(e.preparedFile)return{file:e.preparedFile};const t=yield gk(e.file);return"error"in t?t:(e.preparedFile=t.file,{file:t.file})}),F1=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enablePageContext:a=!1,enableLogging:u=!1,onConnect:l,onMessage:d,onError:f,onProductResult:p,onEndConversation:m,children:T})=>{const{logger:y,conversationHistory:_}=lt(),{status:{isOpen:A}}=Mr(),[v,x]=N.useReducer(dN,T1),[k,I]=N.useState(!1),[j,q]=N.useState(!1),[R,X]=N.useState(!1),ne=N.useRef(v);ne.current=v;const se=$N({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:_}),H=N.useRef(null),re=N.useRef(d),V=N.useRef(f),ee=N.useRef(l),ae=N.useRef(p),oe=N.useRef(m),me=N.useRef(!1),de=N.useRef(!1),W=N.useRef(!1),le=N.useRef(0),C=N.useRef(0),B=N.useRef(0),Z=N.useRef(null),L=N.useRef(null),xe=N.useRef(null),De=N.useRef(0),he=N.useRef(!1),Ne=N.useRef(0),Ie=N.useRef(0),Ze=N.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),gt=N.useRef(),Dt=N.useRef(()=>ke(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}})),ft=N.useRef([]),ht=N.useRef(null),vt=N.useCallback((J,Ae)=>{Ae.outcome==="timeout"?(J.timedOut=!0,ft.current=ft.current.filter(Ce=>Ce===J||!Ce.timedOut)):ft.current=ft.current.filter(Ce=>Ce!==J),clearTimeout(J.timeoutId),J.resolve(Ae)},[]);re.current=d,V.current=f,ee.current=l,ae.current=p,oe.current=m,N.useEffect(()=>{const J=new L2({baseURL:e,orgId:t,esDeveloperName:n,options:F({enableLogging:u},s?{capabilitiesVersion:s}:{})});H.current=J,he.current=!1,X(!1),I(!1),q(!1),x({type:"RESET"}),J.on("connected",()=>{var pe;x({type:"SET_CONNECTION_STATUS",status:"connected"}),(pe=ee.current)==null||pe.call(ee)}),J.on("disconnected",()=>{x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),J.on("reconnecting",()=>{x({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),J.on("message",pe=>{var ar,Kr;const Ue=fe(F({id:pe.messageId||crypto.randomUUID()},pe.messageId?{serverId:pe.messageId}:{}),{role:"agent",content:pe.content,timestamp:pe.timestamp,sender:pe.sender,raw:pe});y==null||y.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:Ue.id,tokensBeforeFlush:le.current,streamedFinalOnly:le.current===0}),le.current=0;const je=ma(ft.current),Kt=je==null?void 0:je.options.reconcileMessageId;x({type:"FLUSH_STREAMING",message:Ue,replaceMessageId:Kt}),(ar=re.current)==null||ar.call(re,Ue),je&&vt(je,{outcome:"success"});const{messagingSessionId:wt}=pe,fn=wt?lN(pe.content):null;wt&&fn&&((Kr=ae.current)==null||Kr.call(ae,{agentSessionId:wt,kind:fn.kind,productIds:fn.productIds}))}),J.on("streaming_token",pe=>{var Ue;if(!((Ue=ma(ft.current))!=null&&Ue.options.silent)){if(le.current+=1,y!=null&&y.isDevelopment){const je=m1(pe.token);je?je.index===bi?y.debug("🦜 streaming_token → markdown fallback",{token:pe.token}):y.debug("🦜 streaming_token parsed",{type:je.type,index:je.index,outputName:je.type==="tool_results"?je.output_name:void 0}):y.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:pe.token})}x({type:"APPEND_STREAMING_TOKEN",token:pe.token})}}),J.on("typing_started",()=>{var pe;(pe=ma(ft.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!0})}),J.on("typing_stopped",()=>{var pe;(pe=ma(ft.current))!=null&&pe.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!1})}),J.on("progress_indicator",pe=>{var Ue;(Ue=ma(ft.current))!=null&&Ue.options.silent||x({type:"ADD_PROGRESS_STEP",message:pe.message})}),J.on("routing_result",pe=>{var Ue;if(x({type:"SET_ROUTING_RESULT",result:pe}),!pe.isSuccessful){const je=`Routing failed: ${pe.failureType||"unknown"}`;x({type:"SET_ERROR",error:P1({code:"ROUTING_FAILED"})}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ue=V.current)==null||Ue.call(V,je)}}),J.on("participant_changed",pe=>{if(pe.participant.name==="Automated Process")return;const Ue=fe(F({id:crypto.randomUUID()},pe.entryId?{serverId:pe.entryId}:{}),{role:"system",content:pe.action==="add"?`${pe.participant.name||"Agent"} joined the conversation`:`${pe.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});y==null||y.log("🦜 MessagingProvider participant_changed event received",{event:pe}),x({type:"ADD_MESSAGE",message:Ue})}),J.on("conversation_closed",()=>{const pe={id:crypto.randomUUID(),role:"system",content:N1,timestamp:new Date().toISOString()};x({type:"ADD_MESSAGE",message:pe}),x({type:"SET_CONVERSATION_ID",id:null}),se.clearPersistedConversation()}),J.on("error",pe=>{var Ue;if(y==null||y.log("🦜 MessagingProvider ERROR event received",{event:pe}),pe.code==="SESSION_EXPIRED"){W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}x({type:"SET_ERROR",error:P1(pe)}),pe.recoverable||x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ue=V.current)==null||Ue.call(V,pe.message)});const Ae=pe=>{if(pe!==Ne.current)throw to},Ce=pe=>pe===Ne.current,ve=pe=>ke(null,null,function*(){I(!1);let Ue=se.getStoredConnectOptions(),je=!1;Ue||(Ue=yield se.getPeerConnectOptions(),Ae(pe),je=!!Ue);let Kt=!1;try{if(yield J.connect(Ue!=null?Ue:void 0),!Ce(pe))throw J.disconnect(),to;Kt=!!(Ue!=null&&Ue.lastEventId)}catch(fn){if(Ae(pe),Ue&&If(fn)){if(y==null||y.log("Stored token expired on connect — falling back to fresh connect"),je||se.clearPersistedConversation(),yield J.connect(),!Ce(pe))throw J.disconnect(),to;Kt=!1}else throw fn}q(Kt),yield se.persistContinuationToken(J,()=>Ce(pe)),Ae(pe);const wt=yield se.initializeConversation(J,{isCurrent:()=>Ce(pe)});if(Ae(pe),y==null||y.log("🦜 initial connect complete",{conversationId:wt.conversationId,resumed:wt.resumed,outcome:wt.outcome,restoredMessages:wt.restoredMessages.length}),wt.outcome==="aborted")throw x({type:"SET_LOADING",isLoading:!1}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),to;if(wt.outcome==="unverified-error"){wt.conversationId&&(J.resumeConversation(wt.conversationId),x({type:"SET_CONVERSATION_ID",id:wt.conversationId})),I(!0);return}x({type:"SET_CONVERSATION_ID",id:wt.conversationId}),wt.resumed&&x({type:"LOAD_HISTORY",messages:wt.restoredMessages}),I(!0),x({type:"SET_LOADING",isLoading:!1})});return L.current=ve,()=>{Ne.current+=1,Ie.current+=1,J.disconnect(),J.off(),H.current=null,L.current=null,xe.current=null,he.current=!1}},[e,t,n,s,vt]);const pt=N.useCallback(()=>{if(he.current)return Promise.resolve();if(xe.current)return De.current===Ne.current?xe.current:xe.current.catch(ve=>{if(ve!==to)throw ve}).then(()=>Ze.current());const J=L.current;if(!J)return Promise.reject(new Error("Messaging is unavailable"));x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"});const Ae=++Ne.current;De.current=Ae;const Ce=J(Ae).then(()=>{he.current=!0,X(!0)}).catch(ve=>{var Ue;if(ve===to)throw ve;const pe=ve instanceof Error?ve.message:String(ve);throw x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:Br(ve)}),(Ue=V.current)==null||Ue.call(V,pe),ve}).finally(()=>{xe.current===Ce&&(xe.current=null)});return xe.current=Ce,Ce},[]);Ze.current=pt,N.useEffect(()=>{A&&pt().catch(()=>{})},[A,e,t,n,s,pt]);const $e=rk({isOpen:A,connectionStatus:v.connectionStatus,conversationId:v.conversationId,messages:v.messages,deliverUserMessageRef:gt}),bt=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J)return!1;const Ae=se.getStoredConnectOptions();if(!Ae)return y==null||y.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;y==null||y.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{J.disconnect(),yield J.connect(Ae)}catch(ve){if(If(ve))return y==null||y.log("🦜 attemptResume: token expired (401) — will start fresh",{error:ve instanceof Error?ve.message:String(ve)}),!1;throw y==null||y.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:ve instanceof Error?ve.message:String(ve)}),ve}yield se.persistContinuationToken(J);const Ce=yield se.initializeConversation(J,{createIfMissing:!1});return Ce.outcome==="not-found-or-closed"||!Ce.conversationId?(y==null||y.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(Ce.outcome==="unverified-error"&&(y==null||y.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:Ce.conversationId}),J.resumeConversation(Ce.conversationId)),y==null||y.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:Ce.conversationId}),x({type:"SET_CONVERSATION_ID",id:Ce.conversationId}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),se.persistConversationId(Ce.conversationId),W.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[se,y]),Gt=N.useCallback(J=>ke(null,null,function*(){var Ce,ve,pe;const Ae=H.current;if(Ae){J.options.silent||(x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""}));try{if(J.file){const Ue=yield M1(J);if("error"in Ue){x({type:"SET_SEND_ERROR",error:{text:J.text,displayContent:J.displayContent,options:J.options,sessionContext:J.sessionContext,file:J.file,message:Ue.error}}),(Ce=V.current)==null||Ce.call(V,Ue.error),vt(J,{outcome:"failure",message:Ue.error});return}const je=yield Ae.sendFile(Ue.file,J.text.trim()?{text:J.text}:void 0);C1((ve=Ae.conversationId)!=null?ve:ne.current.conversationId,je,J.file)}else J.sessionContext?yield Ae.sendMessage(J.text,J.sessionContext):yield Ae.sendMessage(J.text)}catch(Ue){const je=Br(Ue);x({type:"SET_SEND_ERROR",error:{text:J.text,displayContent:J.displayContent,options:J.options,sessionContext:J.sessionContext,file:J.file,message:je}}),(pe=V.current)==null||pe.call(V,Ue instanceof Error?Ue.message:String(Ue)),vt(J,{outcome:"failure",message:je})}}}),[vt]),Re=N.useCallback(J=>ke(null,null,function*(){var Ce;const Ae=H.current;if(!(!Ae||me.current)){me.current=!0,de.current=!0;try{if(yield bt()){J&&(yield Gt(J));return}y==null||y.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),W.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:qN,timestamp:new Date().toISOString()}}),se.clearPersistedConversation(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ae.disconnect(),yield Ae.connect(),yield se.persistContinuationToken(Ae);const ve=yield dl({routingAttributes:r});if(ve===pa){x({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const pe=yield Ae.createConversation(ve);y==null||y.log("🦜 recoverExpiredSession: new conversation created",{conversationId:pe}),x({type:"SET_CONVERSATION_ID",id:pe}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),se.persistConversationId(pe),J&&(yield Gt(J))}catch(ve){const pe=ve instanceof Error?ve.message:String(ve);x({type:"SET_ERROR",error:Br(ve)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ce=V.current)==null||Ce.call(V,pe),J&&vt(J,{outcome:"failure",message:Br(ve)})}finally{me.current=!1,de.current=!1}}}),[r,se,bt,Gt,y,vt]),Ke=N.useRef(Re);Ke.current=Re;const ot=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J||!he.current||me.current)return;if(!ne.current.conversationId&&!W.current){J.reconnect();return}me.current=!0;const Ae=ke(null,null,function*(){try{(yield bt())||(W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(Ce){W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{me.current=!1,Z.current=null}});Z.current=Ae,yield Ae}),[bt]),Et=N.useRef(ot);Et.current=ot;const Sr=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J||me.current)return;const Ae=se.getStoredConnectOptions(),Ce=Ae==null?void 0:Ae.continuationToken;if(Ce){me.current=!0;try{J.disconnect(),yield J.connect({continuationToken:Ce}),yield se.persistContinuationToken(J);const ve=ne.current.conversationId;ve&&J.resumeConversation(ve)}catch(ve){if(If(ve)){W.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}y==null||y.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:ve instanceof Error?ve.message:String(ve)})}finally{me.current=!1}}}),[se,y]);N.useEffect(()=>{const J=()=>{const je=Date.now();je-B.current<YN||(B.current=je,Et.current())},Ae=()=>{if(document.visibilityState==="hidden"){C.current=Date.now();return}const je=H.current;if(!je)return;const Kt=C.current?Date.now()-C.current:0;C.current=0,(W.current||!je.isConnected||Kt>WN)&&J()},Ce=je=>{je.persisted&&J()},ve=()=>{C.current=Date.now()},pe=()=>J(),Ue=()=>J();return document.addEventListener("visibilitychange",Ae),window.addEventListener("pageshow",Ce),window.addEventListener("pagehide",ve),document.addEventListener("resume",pe),window.addEventListener("online",Ue),()=>{document.removeEventListener("visibilitychange",Ae),window.removeEventListener("pageshow",Ce),window.removeEventListener("pagehide",ve),document.removeEventListener("resume",pe),window.removeEventListener("online",Ue)}},[]);const ks=N.useCallback((J,Ae)=>ke(null,null,function*(){var ve,pe,Ue;const Ce=H.current;if(!Ce){vt(J,{outcome:"failure",message:"Messaging is unavailable"});return}if(W.current){yield Ke.current(J);return}try{if(J.file){const je=yield M1(J);if("error"in je){x({type:"SET_SEND_ERROR",error:Ae(je.error)}),(ve=V.current)==null||ve.call(V,je.error),vt(J,{outcome:"failure",message:je.error});return}const Kt=yield Ce.sendFile(je.file,J.text.trim()?{text:J.text}:void 0);C1((pe=Ce.conversationId)!=null?pe:ne.current.conversationId,Kt,J.file)}else J.sessionContext?yield Ce.sendMessage(J.text,J.sessionContext):yield Ce.sendMessage(J.text)}catch(je){if(O1(je)){yield Ke.current(J);return}const Kt=Br(je);x({type:"SET_SEND_ERROR",error:Ae(Kt)}),(Ue=V.current)==null||Ue.call(V,je instanceof Error?je.message:String(je)),vt(J,{outcome:"failure",message:Kt})}}),[vt]),Os=N.useCallback(J=>ke(null,null,function*(){const Ae=Z.current;Ae&&(yield Ae),yield J()}),[]),ce=N.useCallback((J,Ae,Ce={},ve,pe,Ue=!1)=>new Promise(je=>{if(!H.current){je({outcome:"failure",message:"Messaging is unavailable"});return}if(!J.trim()&&!pe){je({outcome:"failure",message:"Message is empty"});return}const wt={};if(Object.assign(wt,{text:J,displayContent:Ae,options:Ce,sessionContext:ve!==void 0?ve:a&&ck(Rf())||null,file:pe,resolve:je,timeoutId:setTimeout(()=>{x({type:"SET_LOADING",isLoading:!1}),vt(wt,{outcome:"timeout"})},GN)}),ft.current.push(wt),x({type:"CLEAR_SEND_ERROR"}),!Ce.silent){if(!Ue){const fn=crypto.randomUUID();x({type:"ADD_MESSAGE",message:{id:fn,role:"user",content:Ae!=null?Ae:J,timestamp:new Date().toISOString()}}),pe&&pe.type.startsWith("image/")&&af(pe,{maxDimension:pk,quality:mk}).then(vg).then(ar=>x({type:"UPDATE_MESSAGE",id:fn,patch:{attachmentImageUrl:ar}})).catch(()=>{})}x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""})}Os(()=>ks(wt,fn=>({text:J,displayContent:Ae,options:Ce,sessionContext:wt.sessionContext,file:pe,message:fn})))}),[ks,Os,a,vt]);gt.current=ce;const _e=N.useCallback((J,Ae)=>{if(!J.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});if(!A||!Of(ne.current.messages)){const je=$e(J,Ae);return he.current||pt().catch(()=>{}),A?je:Promise.resolve({outcome:"success"})}const Ce=Ie.current,ve=()=>{const je=()=>Ce!==Ie.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):ce(J,Ae==null?void 0:Ae.displayContent,Ae);return he.current?je():pt().then(je,Kt=>({outcome:"failure",message:Br(Kt)}))},pe=ht.current?ht.current.then(ve):ve(),Ue=pe.then(()=>{});return ht.current=Ue,Ue.finally(()=>{ht.current===Ue&&(ht.current=null)}),pe},[ce,pt,A,$e]);Dt.current=_e;const Ye=N.useCallback(J=>{if(!H.current)return Promise.resolve({outcome:"failure",message:"Messaging is unavailable"});const{text:Ce,file:ve,displayContent:pe}=J;if(!ve)return Ce.trim()?_e(Ce):Promise.resolve({outcome:"failure",message:"Message is empty"});const Ue=Ce.trim(),je=(pe!=null?pe:Ce).trim()||ve.name;if(!A||!Of(ne.current.messages)){const Kr=$e(Ue,{displayContent:je},ve);return he.current||pt().catch(()=>{}),A?Kr:Promise.resolve({outcome:"success"})}const Kt=Ie.current,wt=()=>{const Kr=()=>Kt!==Ie.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):ce(Ue,je,{},null,ve);return he.current?Kr():pt().then(Kr,Is=>({outcome:"failure",message:Br(Is)}))},fn=ht.current?ht.current.then(wt):wt(),ar=fn.then(()=>{});return ht.current=ar,ar.finally(()=>{ht.current===ar&&(ht.current=null)}),fn},[ce,_e,pt,A,$e]),et=N.useCallback(J=>{if(!H.current)return;const Ae=Ie.current,{prompt:Ce,display:ve}=JN(J);pt().then(()=>{if(Ae===Ie.current)return ce(Ce,ve)}).catch(()=>{})},[ce,pt]),it=N.useCallback(()=>{const J=H.current,Ae=ne.current.sendError;if(!J||!Ae)return;const Ce=()=>de.current?Promise.resolve({outcome:"failure",message:Ae.message}):ce(Ae.text,Ae.displayContent,Ae.options,Ae.sessionContext,Ae.file,!0),ve=ht.current?ht.current.then(Ce):Ce(),pe=ve.then(()=>{});return ht.current=pe,pe.finally(()=>{ht.current===pe&&(ht.current=null)}),ve},[ce]),Xt=N.useCallback(()=>{const J=H.current;J&&(xe.current||(W.current=!1,he.current=!1,X(!1),J.disconnect(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),pt().catch(()=>{})))},[pt]),Un=N.useCallback(()=>{const J=H.current;if(!J)return Promise.resolve();if(ft.current=[],!he.current)return Ne.current+=1,Ie.current+=1,J.disconnect(),se.clearPersistedConversation(),x({type:"RESET"}),Promise.resolve();const Ae=++Ie.current;return W.current=!1,q(!1),se.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),J.endConversation().then(()=>Ae!==Ie.current||H.current!==J?null:(J.disconnect(),J.connect().then(()=>J))).then(Ce=>ke(null,null,function*(){if(!Ce||Ae!==Ie.current||(yield se.persistContinuationToken(Ce,()=>Ae===Ie.current&&H.current===Ce),Ae!==Ie.current||H.current!==Ce))return null;const ve=yield dl({routingAttributes:r});return ve===pa?null:J.createConversation(ve)})).then(Ce=>{!Ce||Ae!==Ie.current||H.current!==J||(x({type:"SET_CONVERSATION_ID",id:Ce}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),se.persistConversationId(Ce))}).catch(Ce=>{var ve;Ae!==Ie.current||H.current!==J||(x({type:"SET_ERROR",error:Br(Ce)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=V.current)==null||ve.call(V,Ce.message))})},[r,se]);ik(Un),ZN({connectionStatus:v.connectionStatus,loading:v.loading,hasMessages:v.messages.length>0,sessionExpired:v.sessionExpired,bootstrapSettled:k,resumeUsedLastEventId:j,recoverySteps:[Sr,Un],onExhausted:()=>{var Ae;const J=Br({type:"network"});x({type:"SET_ERROR",error:J}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(Ae=V.current)==null||Ae.call(V,J)},logger:y,isRecoveryInFlight:()=>me.current||Z.current!==null});const Nn=N.useCallback(()=>ke(null,null,function*(){var ve;const J=H.current;if(!J||!ne.current.conversationId)return;const Ae=yield J.retrieveConversationTranscript(),Ce=URL.createObjectURL(Ae);try{const pe=document.createElement("a");pe.href=Ce,pe.download=`transcript-${(ve=J.conversationId)!=null?ve:"conversation"}.pdf`,document.body.appendChild(pe),pe.click(),pe.remove()}finally{URL.revokeObjectURL(Ce)}}),[]),ir=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J)return Promise.resolve();if(ft.current=[],!he.current)return Ne.current+=1,Ie.current+=1,J.disconnect(),se.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Promise.resolve();const Ae=++Ie.current;if(W.current=!1,q(!1),oe.current)try{yield Promise.race([oe.current(ne.current.conversationId),new Promise(ve=>setTimeout(ve,dk))])}catch(ve){y==null||y.error("onEndConversation callback failed",ve)}se.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"});const Ce={id:crypto.randomUUID(),role:"system",content:N1,timestamp:new Date().toISOString()};return x({type:"ADD_MESSAGE",message:Ce}),he.current=!1,X(!1),J.endConversation().then(()=>{Ae!==Ie.current||H.current!==J||J.disconnect()}).catch(ve=>{var pe;Ae!==Ie.current||H.current!==J||(x({type:"SET_ERROR",error:Br(ve)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(pe=V.current)==null||pe.call(V,ve.message))})}),[y,se,q]);sk(ir);const sr=N.useCallback(()=>ke(null,null,function*(){const J=H.current;if(!J)throw new Error("getAuthLinkKey called before the messaging client connected");return y==null||y.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),J.getAuthLinkKey()}),[y]);N.useEffect(()=>{const J={getAuthLinkKey:sr,sendMessage:(Ae,Ce)=>Dt.current(Ae,Ce)};return ak(J),()=>uk(J)},[sr]);const Ut=v.connectionStatus==="connected"&&v.conversationId!==null;N.useEffect(()=>{wg(Ut)},[Ut]),N.useEffect(()=>()=>wg(!1),[]);const or=N.useMemo(()=>({connectionStatus:v.connectionStatus,isConnected:Ut,isAgentTyping:v.isAgentTyping,conversationId:v.conversationId,messages:v.messages,streamingBlocks:v.streamingBlocks,progressMessage:v.progressMessage,progressSteps:v.progressSteps,error:v.error,sendError:v.sendError,canInitialize:!R&&v.error===null,loading:v.loading,sessionExpired:v.sessionExpired,sendMessage:_e,sendFile:Ye,addToCart:et,resetConversation:Un,endConversation:ir,retryLastMessage:it,retryConnection:Xt,downloadTranscript:Nn,getAuthLinkKey:sr}),[v,Ut,R,_e,Ye,et,Un,ir,it,Xt,Nn,sr]);return w.jsx(b1.Provider,{value:or,children:T})};var B1=Symbol.for("immer-nothing"),U1=Symbol.for("immer-draftable"),Wn=Symbol.for("immer-state");function Er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var no=Object.getPrototypeOf;function ro(e){return!!e&&!!e[Wn]}function os(e){var t;return e?H1(e)||Array.isArray(e)||!!e[U1]||!!((t=e.constructor)!=null&&t[U1])||ga(e)||pl(e):!1}var Ek=Object.prototype.constructor.toString();function H1(e){if(!e||typeof e!="object")return!1;const t=no(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)===Ek}function fl(e,t){hl(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function hl(e){const t=e[Wn];return t?t.type_:Array.isArray(e)?1:ga(e)?2:pl(e)?3:0}function Lf(e,t){return hl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function j1(e,t,n){const r=hl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function yk(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ga(e){return e instanceof Map}function pl(e){return e instanceof Set}function as(e){return e.copy_||e.base_}function Df(e,t){if(ga(e))return new Map(e);if(pl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=H1(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Wn];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(no(e),r)}else{const r=no(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function Mf(e,t=!1){return gl(e)||ro(e)||!os(e)||(hl(e)>1&&Object.defineProperties(e,{set:{value:ml},add:{value:ml},clear:{value:ml},delete:{value:ml}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Mf(n,!0))),e}function ml(){Er(2)}function gl(e){return Object.isFrozen(e)}var Tk={};function us(e){const t=Tk[e];return t||Er(0,e),t}var Ea;function $1(){return Ea}function bk(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function z1(e,t){t&&(us("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ff(e){Bf(e),e.drafts_.forEach(wk),e.drafts_=null}function Bf(e){e===Ea&&(Ea=e.parent_)}function V1(e){return Ea=bk(Ea,e)}function wk(e){const t=e[Wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function q1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Wn].modified_&&(Ff(t),Er(4)),os(e)&&(e=El(t,e),t.parent_||yl(t,e)),t.patches_&&us("Patches").generateReplacementPatches_(n[Wn].base_,e,t.patches_,t.inversePatches_)):e=El(t,n,[]),Ff(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==B1?e:void 0}function El(e,t,n){if(gl(t))return t;const r=t[Wn];if(!r)return fl(t,(s,a)=>W1(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return yl(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),fl(a,(l,d)=>W1(e,r,s,l,d,n,u)),yl(e,s,!1),n&&e.patches_&&us("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function W1(e,t,n,r,s,a,u){if(ro(s)){const l=a&&t&&t.type_!==3&&!Lf(t.assigned_,r)?a.concat(r):void 0,d=El(e,s,l);if(j1(n,r,d),ro(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(os(s)&&!gl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;El(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ga(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&yl(e,s)}}function yl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Mf(t,n)}function xk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:$1(),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=ya);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var Uf={get(e,t){if(t===Wn)return e;const n=as(e);if(!Lf(n,t))return _k(e,n,t);const r=n[t];return e.finalized_||!os(r)?r:r===Hf(e.base_,t)?($f(e),e.copy_[t]=zf(r,e)):r},has(e,t){return t in as(e)},ownKeys(e){return Reflect.ownKeys(as(e))},set(e,t,n){const r=Y1(as(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Hf(as(e),t),a=s==null?void 0:s[Wn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(yk(n,s)&&(n!==void 0||Lf(e.base_,t)))return!0;$f(e),jf(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 Hf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$f(e),jf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=as(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Er(11)},getPrototypeOf(e){return no(e.base_)},setPrototypeOf(){Er(12)}},ya={};fl(Uf,(e,t)=>{ya[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ya.deleteProperty=function(e,t){return ya.set.call(this,e,t,void 0)},ya.set=function(e,t,n){return Uf.set.call(this,e[0],t,n,e[0])};function Hf(e,t){const n=e[Wn];return(n?as(n):e)[t]}function _k(e,t,n){var s;const r=Y1(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Y1(e,t){if(!(t in e))return;let n=no(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=no(n)}}function jf(e){e.modified_||(e.modified_=!0,e.parent_&&jf(e.parent_))}function $f(e){e.copy_||(e.copy_=Df(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Sk=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"&&Er(6),r!==void 0&&typeof r!="function"&&Er(7);let s;if(os(t)){const a=V1(this),u=zf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?Ff(a):Bf(a)}return z1(a,r),q1(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===B1&&(s=void 0),this.autoFreeze_&&Mf(s,!0),r){const a=[],u=[];us("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Er(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){os(e)||Er(8),ro(e)&&(e=vk(e));const t=V1(this),n=zf(e,void 0);return n[Wn].isManual_=!0,Bf(t),n}finishDraft(e,t){const n=e&&e[Wn];(!n||!n.isManual_)&&Er(9);const{scope_:r}=n;return z1(r,t),q1(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=us("Patches").applyPatches_;return ro(e)?r(e,t):this.produce(e,s=>r(s,t))}};function zf(e,t){const n=ga(e)?us("MapSet").proxyMap_(e,t):pl(e)?us("MapSet").proxySet_(e,t):xk(e,t);return(t?t.scope_:$1()).drafts_.push(n),n}function vk(e){return ro(e)||Er(10,e),G1(e)}function G1(e){if(!os(e)||gl(e))return e;const t=e[Wn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Df(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Df(e,!0);return fl(n,(r,s)=>{j1(n,r,G1(s))}),t&&(t.finalized_=!1),n}var Ak=new Sk,Ck=Ak.produce;function Nk(e,t,n){var r=N.useMemo(function(){return Ck(e)},[e]);return N.useReducer(r,t,n)}const kk=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),X1=N.createContext(null),K1=N.createContext(null),Ok=({children:e,dispatch:t})=>{const n=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),l=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=N.useCallback(_=>{t({type:St.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=N.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,l,d,f,p,m,T]);return w.jsx(K1.Provider,{value:y,children:e})},Ik=(e,t)=>{const{type:n,payload:r}=t;switch(n){case St.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case St.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case St.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case St.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case St.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case St.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case St.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case St.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case St.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case St.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case St.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case St.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case St.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case St.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case St.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Pk=({promptsConfig:e,children:t})=>{const[n,r]=Nk(Ik,fe(F(F({},Ag),e||{}),{staticQuestions:kk((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(X1.Provider,{value:n,children:w.jsx(Ok,{dispatch:r,children:t})})},Rk={productId:Lr.productId,pdpLink:Lr.pdpLink},Q1=N.createContext(Rk),Lk=({children:e})=>{const[t,n]=N.useState(Lr.productId),[r,s]=N.useState(Lr.pdpLink);N.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 _2(u),()=>{S2(u)}},[]);const a=N.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(Q1.Provider,{value:a,children:e})},Dk=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){kt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){kt(!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"?(kt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(kt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),kt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,kt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),J1=N.createContext({overrides:{},isInitialized:!1}),Mk=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=N.useState({}),[a,u]=N.useState(!1);N.useEffect(()=>{ke(null,null,function*(){let f={};e?(kt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield Dk(e)):t&&typeof t=="object"?(kt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(kt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=N.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(J1.Provider,{value:l,children:n})},Z1=({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:T,entryType:y,initialEntry:_,entryMessage:A,disclaimerText:v,disclaimerMarkdown:x,clientContext:k,searchPlaceholder:I,searchButtonLabel:j,searchConfig:q,suggestionButtonConfig:R,messageAlignment:X,autoScroll:ne,promptsConfig:se,showProductDescription:H,resetConversationMessage:re,conversationHistory:V,messagingConfig:ee,overrides:ae,overridesUrl:oe,inlineOverrides:me,__features:de,children:W})=>{const le=p||k2(),C=N.useRef(!1);return C.current||(C.current=!0,C2({initialEntry:_,entryType:y,isDevelopment:le})),w.jsx(sN,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:A,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:I,searchButtonLabel:j,searchConfig:q,suggestionButtonConfig:R,messageAlignment:X,autoScroll:ne,showProductDescription:H,componentConfig:T,clientContext:k,disclaimerMarkdown:x,disclaimerText:v,resetConversationMessage:re,conversationHistory:V,isDevelopment:le,__features:de,progressStepsLimit:ee==null?void 0:ee.progressStepsLimit,routingAttributes:ee==null?void 0:ee.routingAttributes,enableDownloadTranscript:ee==null?void 0:ee.enableDownloadTranscript,enablePageContext:ee==null?void 0:ee.enablePageContext,enableEscalationToAgent:ee==null?void 0:ee.enableEscalationToAgent,enableImageUpload:ee==null?void 0:ee.enableImageUpload,showProductCaptions:ee==null?void 0:ee.showProductCaptions,children:w.jsx(J2,{entryType:y!=null?y:_==null?void 0:_.type,componentConfig:T,componentType:m,children:w.jsx(Lk,{children:w.jsx(Pk,{promptsConfig:se,children:w.jsx(Mk,{overridesUrl:oe,inlineOverrides:me||ae,children:w.jsx(F1,{scrt2Url:(ee==null?void 0:ee.scrt2Url)||"",orgId:(ee==null?void 0:ee.orgId)||"",esDeveloperName:(ee==null?void 0:ee.esDeveloperName)||"",routingAttributes:(ee==null?void 0:ee.routingAttributes)||{},capabilitiesVersion:ee==null?void 0:ee.capabilitiesVersion,enablePageContext:ee==null?void 0:ee.enablePageContext,enableLogging:le,onProductResult:ee==null?void 0:ee.onProductResult,onEndConversation:ee==null?void 0:ee.onEndConversation,children:W})})})})})})};var Vf={exports:{}},Rn={},qf={exports:{}},Wf={};var eE;function Fk(){return eE||(eE=1,(function(e){function t(W,le){var C=W.length;W.push(le);e:for(;0<C;){var B=C-1>>>1,Z=W[B];if(0<s(Z,le))W[B]=le,W[C]=Z,C=B;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var le=W[0],C=W.pop();if(C!==le){W[0]=C;e:for(var B=0,Z=W.length,L=Z>>>1;B<L;){var xe=2*(B+1)-1,De=W[xe],he=xe+1,Ne=W[he];if(0>s(De,C))he<Z&&0>s(Ne,De)?(W[B]=Ne,W[he]=C,B=he):(W[B]=De,W[xe]=C,B=xe);else if(he<Z&&0>s(Ne,C))W[B]=Ne,W[he]=C,B=he;else break e}}return le}function s(W,le){var C=W.sortIndex-le.sortIndex;return C!==0?C:W.id-le.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,T=3,y=!1,_=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,x=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(W){for(var le=n(f);le!==null;){if(le.callback===null)r(f);else if(le.startTime<=W)r(f),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(f)}}function j(W){if(A=!1,I(W),!_)if(n(d)!==null)_=!0,me(q);else{var le=n(f);le!==null&&de(j,le.startTime-W)}}function q(W,le){_=!1,A&&(A=!1,x(ne),ne=-1),y=!0;var C=T;try{for(I(le),m=n(d);m!==null&&(!(m.expirationTime>le)||W&&!re());){var B=m.callback;if(typeof B=="function"){m.callback=null,T=m.priorityLevel;var Z=B(m.expirationTime<=le);le=e.unstable_now(),typeof Z=="function"?m.callback=Z:m===n(d)&&r(d),I(le)}else r(d);m=n(d)}if(m!==null)var L=!0;else{var xe=n(f);xe!==null&&de(j,xe.startTime-le),L=!1}return L}finally{m=null,T=C,y=!1}}var R=!1,X=null,ne=-1,se=5,H=-1;function re(){return!(e.unstable_now()-H<se)}function V(){if(X!==null){var W=e.unstable_now();H=W;var le=!0;try{le=X(!0,W)}finally{le?ee():(R=!1,X=null)}}else R=!1}var ee;if(typeof k=="function")ee=function(){k(V)};else if(typeof MessageChannel!="undefined"){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=V,ee=function(){oe.postMessage(null)}}else ee=function(){v(V,0)};function me(W){X=W,R||(R=!0,ee())}function de(W,le){ne=v(function(){W(e.unstable_now())},le)}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(W){W.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,me(q))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(W){switch(T){case 1:case 2:case 3:var le=3;break;default:le=T}var C=T;T=le;try{return W()}finally{T=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,le){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var C=T;T=W;try{return le()}finally{T=C}},e.unstable_scheduleCallback=function(W,le,C){var B=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?B+C:B):C=B,W){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=C+Z,W={id:p++,callback:le,priorityLevel:W,startTime:C,expirationTime:Z,sortIndex:-1},C>B?(W.sortIndex=C,t(f,W),n(d)===null&&W===n(f)&&(A?(x(ne),ne=-1):A=!0,de(j,C-B))):(W.sortIndex=Z,t(d,W),_||y||(_=!0,me(q))),W},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(W){var le=T;return function(){var C=T;T=le;try{return W.apply(this,arguments)}finally{T=C}}}})(Wf)),Wf}var tE;function Bk(){return tE||(tE=1,qf.exports=Fk()),qf.exports}var nE;function Uk(){if(nE)return Rn;nE=1;var e=pr(),t=Bk();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 T(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 _(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 A(i,o,c,h,E,b,S){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=b,this.removeEmptyString=S}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(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){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var x=/[\-:]([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(x,k);v[o]=new A(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(x,k);v[o]=new A(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(x,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,c,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,c,E,h)&&(c=null),h||E===null?T(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 j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),R=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),se=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),re=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),W=Symbol.iterator;function le(i){return i===null||typeof i!="object"?null:(i=W&&i[W]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,B;function Z(i){if(B===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);B=o&&o[1]||""}return`
|
|
17
17
|
`+B+i}var L=!1;function xe(i,o){if(!i||L)return"";L=!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(ie){var h=ie}Reflect.construct(i,[],o)}else{try{o.call()}catch(ie){h=ie}i.call(o.prototype)}else{try{throw Error()}catch(ie){h=ie}i()}}catch(ie){if(ie&&h&&typeof ie.stack=="string"){for(var E=ie.stack.split(`
|
|
18
18
|
`),b=h.stack.split(`
|
|
19
19
|
`),S=E.length-1,U=b.length-1;1<=S&&0<=U&&E[S]!==b[U];)U--;for(;1<=S&&0<=U;S--,U--)if(E[S]!==b[U]){if(S!==1||U!==1)do if(S--,U--,0>U||E[S]!==b[U]){var z=`
|
|
20
|
-
`+E[S].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=S&&0<=U);break}}}finally{L=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Z(i):""}function De(i){switch(i.tag){case 5:return Z(i.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return i=xe(i.type,!1),i;case 11:return i=xe(i.type.render,!1),i;case 1:return i=xe(i.type,!0),i;default:return""}}function he(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 X:return"Fragment";case R:return"Portal";case se:return"Profiler";case ne:return"StrictMode";case ee:return"Suspense";case ae:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case re:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case V:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return o=i.displayName||null,o!==null?o:he(i.type)||"Memo";case me:o=i._payload,i=i._init;try{return he(i(o))}catch(c){}}return null}function Ne(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 he(o);case 8:return o===ne?"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 Ie(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ze(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function gt(i){var o=Ze(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,b=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Dt(i){i._valueTracker||(i._valueTracker=gt(i))}function ft(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=Ze(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function ht(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 vt(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 pt(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Ie(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 $e(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function bt(i,o){$e(i,o);var c=Ie(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")?Re(i,o.type,c):o.hasOwnProperty("defaultValue")&&Re(i,o.type,Ie(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Gt(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 Re(i,o,c){(o!=="number"||ht(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Ke=Array.isArray;function ot(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=""+Ie(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 Et(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Sr(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(Ke(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Ie(c)}}function ks(i,o){var c=Ie(o.value),h=Ie(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 Os(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ce(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 _e(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ce(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ye,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(Ye=Ye||document.createElement("div"),Ye.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ye.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function it(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var Xt={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},Un=["Webkit","ms","Moz","O"];Object.keys(Xt).forEach(function(i){Un.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Xt[o]=Xt[i]})});function Nn(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Xt.hasOwnProperty(i)&&Xt[i]?(""+o).trim():o+"px"}function ir(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Nn(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var sr=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 Ut(i,o){if(o){if(sr[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 or(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 J=null;function Ae(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ce=null,ve=null,pe=null;function Ue(i){if(i=xu(i)){if(typeof Ce!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Xc(o),Ce(i.stateNode,i.type,o))}}function je(i){ve?pe?pe.push(i):pe=[i]:ve=i}function Kt(){if(ve){var i=ve,o=pe;if(pe=ve=null,Ue(i),o)for(i=0;i<o.length;i++)Ue(o[i])}}function wt(i,o){return i(o)}function fn(){}var ar=!1;function Kr(i,o,c){if(ar)return i(o,c);ar=!0;try{return wt(i,o,c)}finally{ar=!1,(ve!==null||pe!==null)&&(fn(),Kt())}}function Is(i,o){var c=i.stateNode;if(c===null)return null;var h=Xc(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 om=!1;if(l)try{var nu={};Object.defineProperty(nu,"passive",{get:function(){om=!0}}),window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch(i){om=!1}function TU(i,o,c,h,E,b,S,U,z){var ie=Array.prototype.slice.call(arguments,3);try{o.apply(c,ie)}catch(ye){this.onError(ye)}}var ru=!1,Cc=null,Nc=!1,am=null,bU={onError:function(i){ru=!0,Cc=i}};function wU(i,o,c,h,E,b,S,U,z){ru=!1,Cc=null,TU.apply(bU,arguments)}function xU(i,o,c,h,E,b,S,U,z){if(wU.apply(this,arguments),ru){if(ru){var ie=Cc;ru=!1,Cc=null}else throw Error(n(198));Nc||(Nc=!0,am=ie)}}function Ps(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 Yx(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 Gx(i){if(Ps(i)!==i)throw Error(n(188))}function _U(i){var o=i.alternate;if(!o){if(o=Ps(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 b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return Gx(E),i;if(b===h)return Gx(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var S=!1,U=E.child;U;){if(U===c){S=!0,c=E,h=b;break}if(U===h){S=!0,h=E,c=b;break}U=U.sibling}if(!S){for(U=b.child;U;){if(U===c){S=!0,c=b,h=E;break}if(U===h){S=!0,h=b,c=E;break}U=U.sibling}if(!S)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 Xx(i){return i=_U(i),i!==null?Kx(i):null}function Kx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Kx(i);if(o!==null)return o;i=i.sibling}return null}var Qx=t.unstable_scheduleCallback,Jx=t.unstable_cancelCallback,SU=t.unstable_shouldYield,vU=t.unstable_requestPaint,Vt=t.unstable_now,AU=t.unstable_getCurrentPriorityLevel,um=t.unstable_ImmediatePriority,Zx=t.unstable_UserBlockingPriority,kc=t.unstable_NormalPriority,CU=t.unstable_LowPriority,e_=t.unstable_IdlePriority,Oc=null,Qr=null;function NU(i){if(Qr&&typeof Qr.onCommitFiberRoot=="function")try{Qr.onCommitFiberRoot(Oc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var vr=Math.clz32?Math.clz32:IU,kU=Math.log,OU=Math.LN2;function IU(i){return i>>>=0,i===0?32:31-(kU(i)/OU|0)|0}var Ic=64,Pc=4194304;function iu(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 Rc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=c&268435455;if(S!==0){var U=S&~E;U!==0?h=iu(U):(b&=S,b!==0&&(h=iu(b)))}else S=c&~E,S!==0?h=iu(S):b!==0&&(h=iu(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&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-vr(o),E=1<<c,h|=i[c],o&=~E;return h}function PU(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 RU(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-vr(b),U=1<<S,z=E[S];z===-1?((U&c)===0||(U&h)!==0)&&(E[S]=PU(U,o)):z<=o&&(i.expiredLanes|=U),b&=~U}}function lm(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function t_(){var i=Ic;return Ic<<=1,(Ic&4194240)===0&&(Ic=64),i}function cm(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function su(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-vr(o),i[o]=c}function LU(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-vr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function dm(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-vr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var yt=0;function n_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var r_,fm,i_,s_,o_,hm=!1,Lc=[],Li=null,Di=null,Mi=null,ou=new Map,au=new Map,Fi=[],DU="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 a_(i,o){switch(i){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":ou.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":au.delete(o.pointerId)}}function uu(i,o,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=xu(o),o!==null&&fm(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function MU(i,o,c,h,E){switch(o){case"focusin":return Li=uu(Li,i,o,c,h,E),!0;case"dragenter":return Di=uu(Di,i,o,c,h,E),!0;case"mouseover":return Mi=uu(Mi,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return ou.set(b,uu(ou.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,au.set(b,uu(au.get(b)||null,i,o,c,h,E)),!0}return!1}function u_(i){var o=Rs(i.target);if(o!==null){var c=Ps(o);if(c!==null){if(o=c.tag,o===13){if(o=Yx(c),o!==null){i.blockedOn=o,o_(i.priority,function(){i_(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 Dc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=mm(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);J=h,c.target.dispatchEvent(h),J=null}else return o=xu(c),o!==null&&fm(o),i.blockedOn=c,!1;o.shift()}return!0}function l_(i,o,c){Dc(i)&&c.delete(o)}function FU(){hm=!1,Li!==null&&Dc(Li)&&(Li=null),Di!==null&&Dc(Di)&&(Di=null),Mi!==null&&Dc(Mi)&&(Mi=null),ou.forEach(l_),au.forEach(l_)}function lu(i,o){i.blockedOn===o&&(i.blockedOn=null,hm||(hm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,FU)))}function cu(i){function o(E){return lu(E,i)}if(0<Lc.length){lu(Lc[0],i);for(var c=1;c<Lc.length;c++){var h=Lc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Li!==null&&lu(Li,i),Di!==null&&lu(Di,i),Mi!==null&&lu(Mi,i),ou.forEach(o),au.forEach(o),c=0;c<Fi.length;c++)h=Fi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Fi.length&&(c=Fi[0],c.blockedOn===null);)u_(c),c.blockedOn===null&&Fi.shift()}var Mo=j.ReactCurrentBatchConfig,Mc=!0;function BU(i,o,c,h){var E=yt,b=Mo.transition;Mo.transition=null;try{yt=1,pm(i,o,c,h)}finally{yt=E,Mo.transition=b}}function UU(i,o,c,h){var E=yt,b=Mo.transition;Mo.transition=null;try{yt=4,pm(i,o,c,h)}finally{yt=E,Mo.transition=b}}function pm(i,o,c,h){if(Mc){var E=mm(i,o,c,h);if(E===null)Pm(i,o,h,Fc,c),a_(i,h);else if(MU(E,i,o,c,h))h.stopPropagation();else if(a_(i,h),o&4&&-1<DU.indexOf(i)){for(;E!==null;){var b=xu(E);if(b!==null&&r_(b),b=mm(i,o,c,h),b===null&&Pm(i,o,h,Fc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else Pm(i,o,h,null,c)}}var Fc=null;function mm(i,o,c,h){if(Fc=null,i=Ae(h),i=Rs(i),i!==null)if(o=Ps(i),o===null)i=null;else if(c=o.tag,c===13){if(i=Yx(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 Fc=i,null}function c_(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(AU()){case um:return 1;case Zx:return 4;case kc:case CU:return 16;case e_:return 536870912;default:return 16}default:return 16}}var Bi=null,gm=null,Bc=null;function d_(){if(Bc)return Bc;var i,o=gm,c=o.length,h,E="value"in Bi?Bi.value:Bi.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var S=c-i;for(h=1;h<=S&&o[c-h]===E[b-h];h++);return Bc=E.slice(i,1<h?1-h:void 0)}function Uc(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 Hc(){return!0}function f_(){return!1}function Kn(i){function o(c,h,E,b,S){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,this.currentTarget=null;for(var U in i)i.hasOwnProperty(U)&&(c=i[U],this[U]=c?c(b):b[U]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Hc:f_,this.isPropagationStopped=f_,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=Hc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Hc)},persist:function(){},isPersistent:Hc}),o}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Em=Kn(Fo),du=C({},Fo,{view:0,detail:0}),HU=Kn(du),ym,Tm,fu,jc=C({},du,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wm,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!==fu&&(fu&&i.type==="mousemove"?(ym=i.screenX-fu.screenX,Tm=i.screenY-fu.screenY):Tm=ym=0,fu=i),ym)},movementY:function(i){return"movementY"in i?i.movementY:Tm}}),h_=Kn(jc),jU=C({},jc,{dataTransfer:0}),$U=Kn(jU),zU=C({},du,{relatedTarget:0}),bm=Kn(zU),VU=C({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),qU=Kn(VU),WU=C({},Fo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),YU=Kn(WU),GU=C({},Fo,{data:0}),p_=Kn(GU),XU={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KU={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"},QU={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JU(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=QU[i])?!!o[i]:!1}function wm(){return JU}var ZU=C({},du,{key:function(i){if(i.key){var o=XU[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Uc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?KU[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wm,charCode:function(i){return i.type==="keypress"?Uc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Uc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),eH=Kn(ZU),tH=C({},jc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),m_=Kn(tH),nH=C({},du,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wm}),rH=Kn(nH),iH=C({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),sH=Kn(iH),oH=C({},jc,{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}),aH=Kn(oH),uH=[9,13,27,32],xm=l&&"CompositionEvent"in window,hu=null;l&&"documentMode"in document&&(hu=document.documentMode);var lH=l&&"TextEvent"in window&&!hu,g_=l&&(!xm||hu&&8<hu&&11>=hu),E_=" ",y_=!1;function T_(i,o){switch(i){case"keyup":return uH.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function b_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Bo=!1;function cH(i,o){switch(i){case"compositionend":return b_(o);case"keypress":return o.which!==32?null:(y_=!0,E_);case"textInput":return i=o.data,i===E_&&y_?null:i;default:return null}}function dH(i,o){if(Bo)return i==="compositionend"||!xm&&T_(i,o)?(i=d_(),Bc=gm=Bi=null,Bo=!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 g_&&o.locale!=="ko"?null:o.data;default:return null}}var fH={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 w_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!fH[i.type]:o==="textarea"}function x_(i,o,c,h){je(h),o=Wc(o,"onChange"),0<o.length&&(c=new Em("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var pu=null,mu=null;function hH(i){H_(i,0)}function $c(i){var o=zo(i);if(ft(o))return i}function pH(i,o){if(i==="change")return o}var __=!1;if(l){var _m;if(l){var Sm="oninput"in document;if(!Sm){var S_=document.createElement("div");S_.setAttribute("oninput","return;"),Sm=typeof S_.oninput=="function"}_m=Sm}else _m=!1;__=_m&&(!document.documentMode||9<document.documentMode)}function v_(){pu&&(pu.detachEvent("onpropertychange",A_),mu=pu=null)}function A_(i){if(i.propertyName==="value"&&$c(mu)){var o=[];x_(o,mu,i,Ae(i)),Kr(hH,o)}}function mH(i,o,c){i==="focusin"?(v_(),pu=o,mu=c,pu.attachEvent("onpropertychange",A_)):i==="focusout"&&v_()}function gH(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return $c(mu)}function EH(i,o){if(i==="click")return $c(o)}function yH(i,o){if(i==="input"||i==="change")return $c(o)}function TH(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Ar=typeof Object.is=="function"?Object.is:TH;function gu(i,o){if(Ar(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)||!Ar(i[E],o[E]))return!1}return!0}function C_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function N_(i,o){var c=C_(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=C_(c)}}function k_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?k_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function O_(){for(var i=window,o=ht();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=ht(i.document)}return o}function vm(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 bH(i){var o=O_(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&k_(c.ownerDocument.documentElement,c)){if(h!==null&&vm(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,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=N_(c,b);var S=N_(c,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.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 wH=l&&"documentMode"in document&&11>=document.documentMode,Uo=null,Am=null,Eu=null,Cm=!1;function I_(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Cm||Uo==null||Uo!==ht(h)||(h=Uo,"selectionStart"in h&&vm(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}),Eu&&gu(Eu,h)||(Eu=h,h=Wc(Am,"onSelect"),0<h.length&&(o=new Em("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Uo)))}function zc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Ho={animationend:zc("Animation","AnimationEnd"),animationiteration:zc("Animation","AnimationIteration"),animationstart:zc("Animation","AnimationStart"),transitionend:zc("Transition","TransitionEnd")},Nm={},P_={};l&&(P_=document.createElement("div").style,"AnimationEvent"in window||(delete Ho.animationend.animation,delete Ho.animationiteration.animation,delete Ho.animationstart.animation),"TransitionEvent"in window||delete Ho.transitionend.transition);function Vc(i){if(Nm[i])return Nm[i];if(!Ho[i])return i;var o=Ho[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in P_)return Nm[i]=o[c];return i}var R_=Vc("animationend"),L_=Vc("animationiteration"),D_=Vc("animationstart"),M_=Vc("transitionend"),F_=new Map,B_="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 Ui(i,o){F_.set(i,o),a(o,[i])}for(var km=0;km<B_.length;km++){var Om=B_[km],xH=Om.toLowerCase(),_H=Om[0].toUpperCase()+Om.slice(1);Ui(xH,"on"+_H)}Ui(R_,"onAnimationEnd"),Ui(L_,"onAnimationIteration"),Ui(D_,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(M_,"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 yu="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(" "),SH=new Set("cancel close invalid load scroll toggle".split(" ").concat(yu));function U_(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,xU(h,o,void 0,i),i.currentTarget=null}function H_(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 b=void 0;if(o)for(var S=h.length-1;0<=S;S--){var U=h[S],z=U.instance,ie=U.currentTarget;if(U=U.listener,z!==b&&E.isPropagationStopped())break e;U_(E,U,ie),b=z}else for(S=0;S<h.length;S++){if(U=h[S],z=U.instance,ie=U.currentTarget,U=U.listener,z!==b&&E.isPropagationStopped())break e;U_(E,U,ie),b=z}}}if(Nc)throw i=am,Nc=!1,am=null,i}function Ot(i,o){var c=o[Bm];c===void 0&&(c=o[Bm]=new Set);var h=i+"__bubble";c.has(h)||(j_(o,i,2,!1),c.add(h))}function Im(i,o,c){var h=0;o&&(h|=4),j_(c,i,h,o)}var qc="_reactListening"+Math.random().toString(36).slice(2);function Tu(i){if(!i[qc]){i[qc]=!0,r.forEach(function(c){c!=="selectionchange"&&(SH.has(c)||Im(c,!1,i),Im(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[qc]||(o[qc]=!0,Im("selectionchange",!1,o))}}function j_(i,o,c,h){switch(c_(o)){case 1:var E=BU;break;case 4:E=UU;break;default:E=pm}c=E.bind(null,o,c,i),E=void 0,!om||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 Pm(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var U=h.stateNode.containerInfo;if(U===E||U.nodeType===8&&U.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var z=S.tag;if((z===3||z===4)&&(z=S.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;S=S.return}for(;U!==null;){if(S=Rs(U),S===null)return;if(z=S.tag,z===5||z===6){h=b=S;continue e}U=U.parentNode}}h=h.return}Kr(function(){var ie=b,ye=Ae(c),be=[];e:{var ge=F_.get(i);if(ge!==void 0){var Pe=Em,Me=i;switch(i){case"keypress":if(Uc(c)===0)break e;case"keydown":case"keyup":Pe=eH;break;case"focusin":Me="focus",Pe=bm;break;case"focusout":Me="blur",Pe=bm;break;case"beforeblur":case"afterblur":Pe=bm;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=h_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pe=$U;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pe=rH;break;case R_:case L_:case D_:Pe=qU;break;case M_:Pe=sH;break;case"scroll":Pe=HU;break;case"wheel":Pe=aH;break;case"copy":case"cut":case"paste":Pe=YU;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pe=m_}var Be=(o&4)!==0,qt=!Be&&i==="scroll",K=Be?ge!==null?ge+"Capture":null:ge;Be=[];for(var Y=ie,te;Y!==null;){te=Y;var Se=te.stateNode;if(te.tag===5&&Se!==null&&(te=Se,K!==null&&(Se=Is(Y,K),Se!=null&&Be.push(bu(Y,Se,te)))),qt)break;Y=Y.return}0<Be.length&&(ge=new Pe(ge,Me,null,c,ye),be.push({event:ge,listeners:Be}))}}if((o&7)===0){e:{if(ge=i==="mouseover"||i==="pointerover",Pe=i==="mouseout"||i==="pointerout",ge&&c!==J&&(Me=c.relatedTarget||c.fromElement)&&(Rs(Me)||Me[ci]))break e;if((Pe||ge)&&(ge=ye.window===ye?ye:(ge=ye.ownerDocument)?ge.defaultView||ge.parentWindow:window,Pe?(Me=c.relatedTarget||c.toElement,Pe=ie,Me=Me?Rs(Me):null,Me!==null&&(qt=Ps(Me),Me!==qt||Me.tag!==5&&Me.tag!==6)&&(Me=null)):(Pe=null,Me=ie),Pe!==Me)){if(Be=h_,Se="onMouseLeave",K="onMouseEnter",Y="mouse",(i==="pointerout"||i==="pointerover")&&(Be=m_,Se="onPointerLeave",K="onPointerEnter",Y="pointer"),qt=Pe==null?ge:zo(Pe),te=Me==null?ge:zo(Me),ge=new Be(Se,Y+"leave",Pe,c,ye),ge.target=qt,ge.relatedTarget=te,Se=null,Rs(ye)===ie&&(Be=new Be(K,Y+"enter",Me,c,ye),Be.target=te,Be.relatedTarget=qt,Se=Be),qt=Se,Pe&&Me)t:{for(Be=Pe,K=Me,Y=0,te=Be;te;te=jo(te))Y++;for(te=0,Se=K;Se;Se=jo(Se))te++;for(;0<Y-te;)Be=jo(Be),Y--;for(;0<te-Y;)K=jo(K),te--;for(;Y--;){if(Be===K||K!==null&&Be===K.alternate)break t;Be=jo(Be),K=jo(K)}Be=null}else Be=null;Pe!==null&&$_(be,ge,Pe,Be,!1),Me!==null&&qt!==null&&$_(be,qt,Me,Be,!0)}}e:{if(ge=ie?zo(ie):window,Pe=ge.nodeName&&ge.nodeName.toLowerCase(),Pe==="select"||Pe==="input"&&ge.type==="file")var He=pH;else if(w_(ge))if(__)He=yH;else{He=gH;var qe=mH}else(Pe=ge.nodeName)&&Pe.toLowerCase()==="input"&&(ge.type==="checkbox"||ge.type==="radio")&&(He=EH);if(He&&(He=He(i,ie))){x_(be,He,c,ye);break e}qe&&qe(i,ge,ie),i==="focusout"&&(qe=ge._wrapperState)&&qe.controlled&&ge.type==="number"&&Re(ge,"number",ge.value)}switch(qe=ie?zo(ie):window,i){case"focusin":(w_(qe)||qe.contentEditable==="true")&&(Uo=qe,Am=ie,Eu=null);break;case"focusout":Eu=Am=Uo=null;break;case"mousedown":Cm=!0;break;case"contextmenu":case"mouseup":case"dragend":Cm=!1,I_(be,c,ye);break;case"selectionchange":if(wH)break;case"keydown":case"keyup":I_(be,c,ye)}var We;if(xm)e:{switch(i){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else Bo?T_(i,c)&&(Qe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Qe="onCompositionStart");Qe&&(g_&&c.locale!=="ko"&&(Bo||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&Bo&&(We=d_()):(Bi=ye,gm="value"in Bi?Bi.value:Bi.textContent,Bo=!0)),qe=Wc(ie,Qe),0<qe.length&&(Qe=new p_(Qe,i,null,c,ye),be.push({event:Qe,listeners:qe}),We?Qe.data=We:(We=b_(c),We!==null&&(Qe.data=We)))),(We=lH?cH(i,c):dH(i,c))&&(ie=Wc(ie,"onBeforeInput"),0<ie.length&&(ye=new p_("onBeforeInput","beforeinput",null,c,ye),be.push({event:ye,listeners:ie}),ye.data=We))}H_(be,o)})}function bu(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Wc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Is(i,c),b!=null&&h.unshift(bu(i,b,E)),b=Is(i,o),b!=null&&h.push(bu(i,b,E))),i=i.return}return h}function jo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function $_(i,o,c,h,E){for(var b=o._reactName,S=[];c!==null&&c!==h;){var U=c,z=U.alternate,ie=U.stateNode;if(z!==null&&z===h)break;U.tag===5&&ie!==null&&(U=ie,E?(z=Is(c,b),z!=null&&S.unshift(bu(c,z,U))):E||(z=Is(c,b),z!=null&&S.push(bu(c,z,U)))),c=c.return}S.length!==0&&i.push({event:o,listeners:S})}var vH=/\r\n?/g,AH=/\u0000|\uFFFD/g;function z_(i){return(typeof i=="string"?i:""+i).replace(vH,`
|
|
21
|
-
`).replace(AH,"")}function Yc(i,o,c){if(o=z_(o),z_(i)!==o&&c)throw Error(n(425))}function Gc(){}var Rm=null,Lm=null;function Dm(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 Mm=typeof setTimeout=="function"?setTimeout:void 0,CH=typeof clearTimeout=="function"?clearTimeout:void 0,V_=typeof Promise=="function"?Promise:void 0,NH=typeof queueMicrotask=="function"?queueMicrotask:typeof V_!="undefined"?function(i){return V_.resolve(null).then(i).catch(kH)}:Mm;function kH(i){setTimeout(function(){throw i})}function Fm(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),cu(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);cu(o)}function Hi(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 q_(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 $o=Math.random().toString(36).slice(2),Jr="__reactFiber$"+$o,wu="__reactProps$"+$o,ci="__reactContainer$"+$o,Bm="__reactEvents$"+$o,OH="__reactListeners$"+$o,IH="__reactHandles$"+$o;function Rs(i){var o=i[Jr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[ci]||c[Jr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=q_(i);i!==null;){if(c=i[Jr])return c;i=q_(i)}return o}i=c,c=i.parentNode}return null}function xu(i){return i=i[Jr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function zo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Xc(i){return i[wu]||null}var Um=[],Vo=-1;function ji(i){return{current:i}}function It(i){0>Vo||(i.current=Um[Vo],Um[Vo]=null,Vo--)}function At(i,o){Vo++,Um[Vo]=i.current,i.current=o}var $i={},wn=ji($i),Hn=ji(!1),Ls=$i;function qo(i,o){var c=i.type.contextTypes;if(!c)return $i;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function jn(i){return i=i.childContextTypes,i!=null}function Kc(){It(Hn),It(wn)}function W_(i,o,c){if(wn.current!==$i)throw Error(n(168));At(wn,o),At(Hn,c)}function Y_(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,Ne(i)||"Unknown",E));return C({},c,h)}function Qc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||$i,Ls=wn.current,At(wn,i),At(Hn,Hn.current),!0}function G_(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=Y_(i,o,Ls),h.__reactInternalMemoizedMergedChildContext=i,It(Hn),It(wn),At(wn,i)):It(Hn),At(Hn,c)}var di=null,Jc=!1,Hm=!1;function X_(i){di===null?di=[i]:di.push(i)}function PH(i){Jc=!0,X_(i)}function zi(){if(!Hm&&di!==null){Hm=!0;var i=0,o=yt;try{var c=di;for(yt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}di=null,Jc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),Qx(um,zi),E}finally{yt=o,Hm=!1}}return null}var Wo=[],Yo=0,Zc=null,ed=0,ur=[],lr=0,Ds=null,fi=1,hi="";function Ms(i,o){Wo[Yo++]=ed,Wo[Yo++]=Zc,Zc=i,ed=o}function K_(i,o,c){ur[lr++]=fi,ur[lr++]=hi,ur[lr++]=Ds,Ds=i;var h=fi;i=hi;var E=32-vr(h)-1;h&=~(1<<E),c+=1;var b=32-vr(o)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,fi=1<<32-vr(o)+E|c<<E|h,hi=b+i}else fi=1<<b|c<<E|h,hi=i}function jm(i){i.return!==null&&(Ms(i,1),K_(i,1,0))}function $m(i){for(;i===Zc;)Zc=Wo[--Yo],Wo[Yo]=null,ed=Wo[--Yo],Wo[Yo]=null;for(;i===Ds;)Ds=ur[--lr],ur[lr]=null,hi=ur[--lr],ur[lr]=null,fi=ur[--lr],ur[lr]=null}var Qn=null,Jn=null,Lt=!1,Cr=null;function Q_(i,o){var c=hr(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 J_(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,Jn=Hi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Qn=i,Jn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=Ds!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=hr(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Qn=i,Jn=null,!0):!1;default:return!1}}function zm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Vm(i){if(Lt){var o=Jn;if(o){var c=o;if(!J_(i,o)){if(zm(i))throw Error(n(418));o=Hi(c.nextSibling);var h=Qn;o&&J_(i,o)?Q_(h,c):(i.flags=i.flags&-4097|2,Lt=!1,Qn=i)}}else{if(zm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Lt=!1,Qn=i}}}function Z_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Qn=i}function td(i){if(i!==Qn)return!1;if(!Lt)return Z_(i),Lt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Dm(i.type,i.memoizedProps)),o&&(o=Jn)){if(zm(i))throw eS(),Error(n(418));for(;o;)Q_(i,o),o=Hi(o.nextSibling)}if(Z_(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){Jn=Hi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Jn=null}}else Jn=Qn?Hi(i.stateNode.nextSibling):null;return!0}function eS(){for(var i=Jn;i;)i=Hi(i.nextSibling)}function Go(){Jn=Qn=null,Lt=!1}function qm(i){Cr===null?Cr=[i]:Cr.push(i)}var RH=j.ReactCurrentBatchConfig;function _u(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,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(S){var U=E.refs;S===null?delete U[b]:U[b]=S},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function nd(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function tS(i){var o=i._init;return o(i._payload)}function nS(i){function o(K,Y){if(i){var te=K.deletions;te===null?(K.deletions=[Y],K.flags|=16):te.push(Y)}}function c(K,Y){if(!i)return null;for(;Y!==null;)o(K,Y),Y=Y.sibling;return null}function h(K,Y){for(K=new Map;Y!==null;)Y.key!==null?K.set(Y.key,Y):K.set(Y.index,Y),Y=Y.sibling;return K}function E(K,Y){return K=Qi(K,Y),K.index=0,K.sibling=null,K}function b(K,Y,te){return K.index=te,i?(te=K.alternate,te!==null?(te=te.index,te<Y?(K.flags|=2,Y):te):(K.flags|=2,Y)):(K.flags|=1048576,Y)}function S(K){return i&&K.alternate===null&&(K.flags|=2),K}function U(K,Y,te,Se){return Y===null||Y.tag!==6?(Y=M0(te,K.mode,Se),Y.return=K,Y):(Y=E(Y,te),Y.return=K,Y)}function z(K,Y,te,Se){var He=te.type;return He===X?ye(K,Y,te.props.children,Se,te.key):Y!==null&&(Y.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===me&&tS(He)===Y.type)?(Se=E(Y,te.props),Se.ref=_u(K,Y,te),Se.return=K,Se):(Se=Ad(te.type,te.key,te.props,null,K.mode,Se),Se.ref=_u(K,Y,te),Se.return=K,Se)}function ie(K,Y,te,Se){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==te.containerInfo||Y.stateNode.implementation!==te.implementation?(Y=F0(te,K.mode,Se),Y.return=K,Y):(Y=E(Y,te.children||[]),Y.return=K,Y)}function ye(K,Y,te,Se,He){return Y===null||Y.tag!==7?(Y=Vs(te,K.mode,Se,He),Y.return=K,Y):(Y=E(Y,te),Y.return=K,Y)}function be(K,Y,te){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Y=M0(""+Y,K.mode,te),Y.return=K,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case q:return te=Ad(Y.type,Y.key,Y.props,null,K.mode,te),te.ref=_u(K,null,Y),te.return=K,te;case R:return Y=F0(Y,K.mode,te),Y.return=K,Y;case me:var Se=Y._init;return be(K,Se(Y._payload),te)}if(Ke(Y)||le(Y))return Y=Vs(Y,K.mode,te,null),Y.return=K,Y;nd(K,Y)}return null}function ge(K,Y,te,Se){var He=Y!==null?Y.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return He!==null?null:U(K,Y,""+te,Se);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case q:return te.key===He?z(K,Y,te,Se):null;case R:return te.key===He?ie(K,Y,te,Se):null;case me:return He=te._init,ge(K,Y,He(te._payload),Se)}if(Ke(te)||le(te))return He!==null?null:ye(K,Y,te,Se,null);nd(K,te)}return null}function Pe(K,Y,te,Se,He){if(typeof Se=="string"&&Se!==""||typeof Se=="number")return K=K.get(te)||null,U(Y,K,""+Se,He);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case q:return K=K.get(Se.key===null?te:Se.key)||null,z(Y,K,Se,He);case R:return K=K.get(Se.key===null?te:Se.key)||null,ie(Y,K,Se,He);case me:var qe=Se._init;return Pe(K,Y,te,qe(Se._payload),He)}if(Ke(Se)||le(Se))return K=K.get(te)||null,ye(Y,K,Se,He,null);nd(Y,Se)}return null}function Me(K,Y,te,Se){for(var He=null,qe=null,We=Y,Qe=Y=0,ln=null;We!==null&&Qe<te.length;Qe++){We.index>Qe?(ln=We,We=null):ln=We.sibling;var mt=ge(K,We,te[Qe],Se);if(mt===null){We===null&&(We=ln);break}i&&We&&mt.alternate===null&&o(K,We),Y=b(mt,Y,Qe),qe===null?He=mt:qe.sibling=mt,qe=mt,We=ln}if(Qe===te.length)return c(K,We),Lt&&Ms(K,Qe),He;if(We===null){for(;Qe<te.length;Qe++)We=be(K,te[Qe],Se),We!==null&&(Y=b(We,Y,Qe),qe===null?He=We:qe.sibling=We,qe=We);return Lt&&Ms(K,Qe),He}for(We=h(K,We);Qe<te.length;Qe++)ln=Pe(We,K,Qe,te[Qe],Se),ln!==null&&(i&&ln.alternate!==null&&We.delete(ln.key===null?Qe:ln.key),Y=b(ln,Y,Qe),qe===null?He=ln:qe.sibling=ln,qe=ln);return i&&We.forEach(function(Ji){return o(K,Ji)}),Lt&&Ms(K,Qe),He}function Be(K,Y,te,Se){var He=le(te);if(typeof He!="function")throw Error(n(150));if(te=He.call(te),te==null)throw Error(n(151));for(var qe=He=null,We=Y,Qe=Y=0,ln=null,mt=te.next();We!==null&&!mt.done;Qe++,mt=te.next()){We.index>Qe?(ln=We,We=null):ln=We.sibling;var Ji=ge(K,We,mt.value,Se);if(Ji===null){We===null&&(We=ln);break}i&&We&&Ji.alternate===null&&o(K,We),Y=b(Ji,Y,Qe),qe===null?He=Ji:qe.sibling=Ji,qe=Ji,We=ln}if(mt.done)return c(K,We),Lt&&Ms(K,Qe),He;if(We===null){for(;!mt.done;Qe++,mt=te.next())mt=be(K,mt.value,Se),mt!==null&&(Y=b(mt,Y,Qe),qe===null?He=mt:qe.sibling=mt,qe=mt);return Lt&&Ms(K,Qe),He}for(We=h(K,We);!mt.done;Qe++,mt=te.next())mt=Pe(We,K,Qe,mt.value,Se),mt!==null&&(i&&mt.alternate!==null&&We.delete(mt.key===null?Qe:mt.key),Y=b(mt,Y,Qe),qe===null?He=mt:qe.sibling=mt,qe=mt);return i&&We.forEach(function(fj){return o(K,fj)}),Lt&&Ms(K,Qe),He}function qt(K,Y,te,Se){if(typeof te=="object"&&te!==null&&te.type===X&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case q:e:{for(var He=te.key,qe=Y;qe!==null;){if(qe.key===He){if(He=te.type,He===X){if(qe.tag===7){c(K,qe.sibling),Y=E(qe,te.props.children),Y.return=K,K=Y;break e}}else if(qe.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===me&&tS(He)===qe.type){c(K,qe.sibling),Y=E(qe,te.props),Y.ref=_u(K,qe,te),Y.return=K,K=Y;break e}c(K,qe);break}else o(K,qe);qe=qe.sibling}te.type===X?(Y=Vs(te.props.children,K.mode,Se,te.key),Y.return=K,K=Y):(Se=Ad(te.type,te.key,te.props,null,K.mode,Se),Se.ref=_u(K,Y,te),Se.return=K,K=Se)}return S(K);case R:e:{for(qe=te.key;Y!==null;){if(Y.key===qe)if(Y.tag===4&&Y.stateNode.containerInfo===te.containerInfo&&Y.stateNode.implementation===te.implementation){c(K,Y.sibling),Y=E(Y,te.children||[]),Y.return=K,K=Y;break e}else{c(K,Y);break}else o(K,Y);Y=Y.sibling}Y=F0(te,K.mode,Se),Y.return=K,K=Y}return S(K);case me:return qe=te._init,qt(K,Y,qe(te._payload),Se)}if(Ke(te))return Me(K,Y,te,Se);if(le(te))return Be(K,Y,te,Se);nd(K,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,Y!==null&&Y.tag===6?(c(K,Y.sibling),Y=E(Y,te),Y.return=K,K=Y):(c(K,Y),Y=M0(te,K.mode,Se),Y.return=K,K=Y),S(K)):c(K,Y)}return qt}var Xo=nS(!0),rS=nS(!1),rd=ji(null),id=null,Ko=null,Wm=null;function Ym(){Wm=Ko=id=null}function Gm(i){var o=rd.current;It(rd),i._currentValue=o}function Xm(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 Qo(i,o){id=i,Wm=Ko=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&($n=!0),i.firstContext=null)}function cr(i){var o=i._currentValue;if(Wm!==i)if(i={context:i,memoizedValue:o,next:null},Ko===null){if(id===null)throw Error(n(308));Ko=i,id.dependencies={lanes:0,firstContext:i}}else Ko=Ko.next=i;return o}var Fs=null;function Km(i){Fs===null?Fs=[i]:Fs.push(i)}function iS(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,Km(o)):(c.next=E.next,E.next=c),o.interleaved=c,pi(i,h)}function pi(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 Vi=!1;function Qm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sS(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 mi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function qi(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ct&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,pi(i,c)}return E=h.interleaved,E===null?(o.next=o,Km(h)):(o.next=E.next,E.next=o),h.interleaved=o,pi(i,c)}function sd(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,dm(i,c)}}function oS(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var S={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=S:b=b.next=S,c=c.next}while(c!==null);b===null?E=b=o:b=b.next=o}else E=b=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,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 od(i,o,c,h){var E=i.updateQueue;Vi=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,U=E.shared.pending;if(U!==null){E.shared.pending=null;var z=U,ie=z.next;z.next=null,S===null?b=ie:S.next=ie,S=z;var ye=i.alternate;ye!==null&&(ye=ye.updateQueue,U=ye.lastBaseUpdate,U!==S&&(U===null?ye.firstBaseUpdate=ie:U.next=ie,ye.lastBaseUpdate=z))}if(b!==null){var be=E.baseState;S=0,ye=ie=z=null,U=b;do{var ge=U.lane,Pe=U.eventTime;if((h&ge)===ge){ye!==null&&(ye=ye.next={eventTime:Pe,lane:0,tag:U.tag,payload:U.payload,callback:U.callback,next:null});e:{var Me=i,Be=U;switch(ge=o,Pe=c,Be.tag){case 1:if(Me=Be.payload,typeof Me=="function"){be=Me.call(Pe,be,ge);break e}be=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Be.payload,ge=typeof Me=="function"?Me.call(Pe,be,ge):Me,ge==null)break e;be=C({},be,ge);break e;case 2:Vi=!0}}U.callback!==null&&U.lane!==0&&(i.flags|=64,ge=E.effects,ge===null?E.effects=[U]:ge.push(U))}else Pe={eventTime:Pe,lane:ge,tag:U.tag,payload:U.payload,callback:U.callback,next:null},ye===null?(ie=ye=Pe,z=be):ye=ye.next=Pe,S|=ge;if(U=U.next,U===null){if(U=E.shared.pending,U===null)break;ge=U,U=ge.next,ge.next=null,E.lastBaseUpdate=ge,E.shared.pending=null}}while(!0);if(ye===null&&(z=be),E.baseState=z,E.firstBaseUpdate=ie,E.lastBaseUpdate=ye,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);Hs|=S,i.lanes=S,i.memoizedState=be}}function aS(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 Su={},Zr=ji(Su),vu=ji(Su),Au=ji(Su);function Bs(i){if(i===Su)throw Error(n(174));return i}function Jm(i,o){switch(At(Au,o),At(vu,i),At(Zr,Su),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:_e(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=_e(o,i)}It(Zr),At(Zr,o)}function Jo(){It(Zr),It(vu),It(Au)}function uS(i){Bs(Au.current);var o=Bs(Zr.current),c=_e(o,i.type);o!==c&&(At(vu,i),At(Zr,c))}function Zm(i){vu.current===i&&(It(Zr),It(vu))}var Mt=ji(0);function ad(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 e0=[];function t0(){for(var i=0;i<e0.length;i++)e0[i]._workInProgressVersionPrimary=null;e0.length=0}var ud=j.ReactCurrentDispatcher,n0=j.ReactCurrentBatchConfig,Us=0,Ft=null,en=null,an=null,ld=!1,Cu=!1,Nu=0,LH=0;function xn(){throw Error(n(321))}function r0(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!Ar(i[c],o[c]))return!1;return!0}function i0(i,o,c,h,E,b){if(Us=b,Ft=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ud.current=i===null||i.memoizedState===null?BH:UH,i=c(h,E),Cu){b=0;do{if(Cu=!1,Nu=0,25<=b)throw Error(n(301));b+=1,an=en=null,o.updateQueue=null,ud.current=HH,i=c(h,E)}while(Cu)}if(ud.current=fd,o=en!==null&&en.next!==null,Us=0,an=en=Ft=null,ld=!1,o)throw Error(n(300));return i}function s0(){var i=Nu!==0;return Nu=0,i}function ei(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return an===null?Ft.memoizedState=an=i:an=an.next=i,an}function dr(){if(en===null){var i=Ft.alternate;i=i!==null?i.memoizedState:null}else i=en.next;var o=an===null?Ft.memoizedState:an.next;if(o!==null)an=o,en=i;else{if(i===null)throw Error(n(310));en=i,i={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},an===null?Ft.memoizedState=an=i:an=an.next=i}return an}function ku(i,o){return typeof o=="function"?o(i):o}function o0(i){var o=dr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=en,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var U=S=null,z=null,ie=b;do{var ye=ie.lane;if((Us&ye)===ye)z!==null&&(z=z.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),h=ie.hasEagerState?ie.eagerState:i(h,ie.action);else{var be={lane:ye,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};z===null?(U=z=be,S=h):z=z.next=be,Ft.lanes|=ye,Hs|=ye}ie=ie.next}while(ie!==null&&ie!==b);z===null?S=h:z.next=U,Ar(h,o.memoizedState)||($n=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Ft.lanes|=b,Hs|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function a0(i){var o=dr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=o.memoizedState;if(E!==null){c.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);Ar(b,o.memoizedState)||($n=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function lS(){}function cS(i,o){var c=Ft,h=dr(),E=o(),b=!Ar(h.memoizedState,E);if(b&&(h.memoizedState=E,$n=!0),h=h.queue,u0(hS.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||an!==null&&an.memoizedState.tag&1){if(c.flags|=2048,Ou(9,fS.bind(null,c,h,E,o),void 0,null),un===null)throw Error(n(349));(Us&30)!==0||dS(c,o,E)}return E}function dS(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Ft.updateQueue,o===null?(o={lastEffect:null,stores:null},Ft.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function fS(i,o,c,h){o.value=c,o.getSnapshot=h,pS(o)&&mS(i)}function hS(i,o,c){return c(function(){pS(o)&&mS(i)})}function pS(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!Ar(i,c)}catch(h){return!0}}function mS(i){var o=pi(i,1);o!==null&&Ir(o,i,1,-1)}function gS(i){var o=ei();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ku,lastRenderedState:i},o.queue=i,i=i.dispatch=FH.bind(null,Ft,i),[o.memoizedState,i]}function Ou(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Ft.updateQueue,o===null?(o={lastEffect:null,stores:null},Ft.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 ES(){return dr().memoizedState}function cd(i,o,c,h){var E=ei();Ft.flags|=i,E.memoizedState=Ou(1|o,c,void 0,h===void 0?null:h)}function dd(i,o,c,h){var E=dr();h=h===void 0?null:h;var b=void 0;if(en!==null){var S=en.memoizedState;if(b=S.destroy,h!==null&&r0(h,S.deps)){E.memoizedState=Ou(o,c,b,h);return}}Ft.flags|=i,E.memoizedState=Ou(1|o,c,b,h)}function yS(i,o){return cd(8390656,8,i,o)}function u0(i,o){return dd(2048,8,i,o)}function TS(i,o){return dd(4,2,i,o)}function bS(i,o){return dd(4,4,i,o)}function wS(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 xS(i,o,c){return c=c!=null?c.concat([i]):null,dd(4,4,wS.bind(null,o,i),c)}function l0(){}function _S(i,o){var c=dr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&r0(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function SS(i,o){var c=dr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&r0(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function vS(i,o,c){return(Us&21)===0?(i.baseState&&(i.baseState=!1,$n=!0),i.memoizedState=c):(Ar(c,o)||(c=t_(),Ft.lanes|=c,Hs|=c,i.baseState=!0),o)}function DH(i,o){var c=yt;yt=c!==0&&4>c?c:4,i(!0);var h=n0.transition;n0.transition={};try{i(!1),o()}finally{yt=c,n0.transition=h}}function AS(){return dr().memoizedState}function MH(i,o,c){var h=Xi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},CS(i))NS(o,c);else if(c=iS(i,o,c,h),c!==null){var E=On();Ir(c,i,h,E),kS(c,o,h)}}function FH(i,o,c){var h=Xi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(CS(i))NS(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var S=o.lastRenderedState,U=b(S,c);if(E.hasEagerState=!0,E.eagerState=U,Ar(U,S)){var z=o.interleaved;z===null?(E.next=E,Km(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(ie){}c=iS(i,o,E,h),c!==null&&(E=On(),Ir(c,i,h,E),kS(c,o,h))}}function CS(i){var o=i.alternate;return i===Ft||o!==null&&o===Ft}function NS(i,o){Cu=ld=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function kS(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,dm(i,c)}}var fd={readContext:cr,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useInsertionEffect:xn,useLayoutEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useDeferredValue:xn,useTransition:xn,useMutableSource:xn,useSyncExternalStore:xn,useId:xn,unstable_isNewReconciler:!1},BH={readContext:cr,useCallback:function(i,o){return ei().memoizedState=[i,o===void 0?null:o],i},useContext:cr,useEffect:yS,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,cd(4194308,4,wS.bind(null,o,i),c)},useLayoutEffect:function(i,o){return cd(4194308,4,i,o)},useInsertionEffect:function(i,o){return cd(4,2,i,o)},useMemo:function(i,o){var c=ei();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=ei();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=MH.bind(null,Ft,i),[h.memoizedState,i]},useRef:function(i){var o=ei();return i={current:i},o.memoizedState=i},useState:gS,useDebugValue:l0,useDeferredValue:function(i){return ei().memoizedState=i},useTransition:function(){var i=gS(!1),o=i[0];return i=DH.bind(null,i[1]),ei().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Ft,E=ei();if(Lt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),un===null)throw Error(n(349));(Us&30)!==0||dS(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,yS(hS.bind(null,h,b,i),[i]),h.flags|=2048,Ou(9,fS.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=ei(),o=un.identifierPrefix;if(Lt){var c=hi,h=fi;c=(h&~(1<<32-vr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=Nu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=LH++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},UH={readContext:cr,useCallback:_S,useContext:cr,useEffect:u0,useImperativeHandle:xS,useInsertionEffect:TS,useLayoutEffect:bS,useMemo:SS,useReducer:o0,useRef:ES,useState:function(){return o0(ku)},useDebugValue:l0,useDeferredValue:function(i){var o=dr();return vS(o,en.memoizedState,i)},useTransition:function(){var i=o0(ku)[0],o=dr().memoizedState;return[i,o]},useMutableSource:lS,useSyncExternalStore:cS,useId:AS,unstable_isNewReconciler:!1},HH={readContext:cr,useCallback:_S,useContext:cr,useEffect:u0,useImperativeHandle:xS,useInsertionEffect:TS,useLayoutEffect:bS,useMemo:SS,useReducer:a0,useRef:ES,useState:function(){return a0(ku)},useDebugValue:l0,useDeferredValue:function(i){var o=dr();return en===null?o.memoizedState=i:vS(o,en.memoizedState,i)},useTransition:function(){var i=a0(ku)[0],o=dr().memoizedState;return[i,o]},useMutableSource:lS,useSyncExternalStore:cS,useId:AS,unstable_isNewReconciler:!1};function Nr(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 c0(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 hd={isMounted:function(i){return(i=i._reactInternals)?Ps(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=On(),E=Xi(i),b=mi(h,E);b.payload=o,c!=null&&(b.callback=c),o=qi(i,b,E),o!==null&&(Ir(o,i,E,h),sd(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=On(),E=Xi(i),b=mi(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=qi(i,b,E),o!==null&&(Ir(o,i,E,h),sd(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=On(),h=Xi(i),E=mi(c,h);E.tag=2,o!=null&&(E.callback=o),o=qi(i,E,h),o!==null&&(Ir(o,i,h,c),sd(o,i,h))}};function OS(i,o,c,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):o.prototype&&o.prototype.isPureReactComponent?!gu(c,h)||!gu(E,b):!0}function IS(i,o,c){var h=!1,E=$i,b=o.contextType;return typeof b=="object"&&b!==null?b=cr(b):(E=jn(o)?Ls:wn.current,h=o.contextTypes,b=(h=h!=null)?qo(i,E):$i),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=hd,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function PS(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&&hd.enqueueReplaceState(o,o.state,null)}function d0(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Qm(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=cr(b):(b=jn(o)?Ls:wn.current,E.context=qo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(c0(i,o,b,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&&hd.enqueueReplaceState(E,E.state,null),od(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Zo(i,o){try{var c="",h=o;do c+=De(h),h=h.return;while(h);var E=c}catch(b){E=`
|
|
20
|
+
`+E[S].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=S&&0<=U);break}}}finally{L=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Z(i):""}function De(i){switch(i.tag){case 5:return Z(i.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return i=xe(i.type,!1),i;case 11:return i=xe(i.type.render,!1),i;case 1:return i=xe(i.type,!0),i;default:return""}}function he(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 X:return"Fragment";case R:return"Portal";case se:return"Profiler";case ne:return"StrictMode";case ee:return"Suspense";case ae:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case re:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case V:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return o=i.displayName||null,o!==null?o:he(i.type)||"Memo";case me:o=i._payload,i=i._init;try{return he(i(o))}catch(c){}}return null}function Ne(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 he(o);case 8:return o===ne?"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 Ie(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ze(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function gt(i){var o=Ze(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,b=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Dt(i){i._valueTracker||(i._valueTracker=gt(i))}function ft(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=Ze(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function ht(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 vt(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 pt(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Ie(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 $e(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function bt(i,o){$e(i,o);var c=Ie(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")?Re(i,o.type,c):o.hasOwnProperty("defaultValue")&&Re(i,o.type,Ie(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Gt(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 Re(i,o,c){(o!=="number"||ht(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Ke=Array.isArray;function ot(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=""+Ie(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 Et(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Sr(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(Ke(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Ie(c)}}function ks(i,o){var c=Ie(o.value),h=Ie(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 Os(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ce(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 _e(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ce(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ye,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(Ye=Ye||document.createElement("div"),Ye.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ye.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function it(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var Xt={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},Un=["Webkit","ms","Moz","O"];Object.keys(Xt).forEach(function(i){Un.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Xt[o]=Xt[i]})});function Nn(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Xt.hasOwnProperty(i)&&Xt[i]?(""+o).trim():o+"px"}function ir(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Nn(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var sr=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 Ut(i,o){if(o){if(sr[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 or(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 J=null;function Ae(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ce=null,ve=null,pe=null;function Ue(i){if(i=xu(i)){if(typeof Ce!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Xc(o),Ce(i.stateNode,i.type,o))}}function je(i){ve?pe?pe.push(i):pe=[i]:ve=i}function Kt(){if(ve){var i=ve,o=pe;if(pe=ve=null,Ue(i),o)for(i=0;i<o.length;i++)Ue(o[i])}}function wt(i,o){return i(o)}function fn(){}var ar=!1;function Kr(i,o,c){if(ar)return i(o,c);ar=!0;try{return wt(i,o,c)}finally{ar=!1,(ve!==null||pe!==null)&&(fn(),Kt())}}function Is(i,o){var c=i.stateNode;if(c===null)return null;var h=Xc(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 om=!1;if(l)try{var nu={};Object.defineProperty(nu,"passive",{get:function(){om=!0}}),window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch(i){om=!1}function bU(i,o,c,h,E,b,S,U,z){var ie=Array.prototype.slice.call(arguments,3);try{o.apply(c,ie)}catch(ye){this.onError(ye)}}var ru=!1,Cc=null,Nc=!1,am=null,wU={onError:function(i){ru=!0,Cc=i}};function xU(i,o,c,h,E,b,S,U,z){ru=!1,Cc=null,bU.apply(wU,arguments)}function _U(i,o,c,h,E,b,S,U,z){if(xU.apply(this,arguments),ru){if(ru){var ie=Cc;ru=!1,Cc=null}else throw Error(n(198));Nc||(Nc=!0,am=ie)}}function Ps(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 Yx(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 Gx(i){if(Ps(i)!==i)throw Error(n(188))}function SU(i){var o=i.alternate;if(!o){if(o=Ps(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 b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return Gx(E),i;if(b===h)return Gx(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var S=!1,U=E.child;U;){if(U===c){S=!0,c=E,h=b;break}if(U===h){S=!0,h=E,c=b;break}U=U.sibling}if(!S){for(U=b.child;U;){if(U===c){S=!0,c=b,h=E;break}if(U===h){S=!0,h=b,c=E;break}U=U.sibling}if(!S)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 Xx(i){return i=SU(i),i!==null?Kx(i):null}function Kx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Kx(i);if(o!==null)return o;i=i.sibling}return null}var Qx=t.unstable_scheduleCallback,Jx=t.unstable_cancelCallback,vU=t.unstable_shouldYield,AU=t.unstable_requestPaint,Vt=t.unstable_now,CU=t.unstable_getCurrentPriorityLevel,um=t.unstable_ImmediatePriority,Zx=t.unstable_UserBlockingPriority,kc=t.unstable_NormalPriority,NU=t.unstable_LowPriority,e_=t.unstable_IdlePriority,Oc=null,Qr=null;function kU(i){if(Qr&&typeof Qr.onCommitFiberRoot=="function")try{Qr.onCommitFiberRoot(Oc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var vr=Math.clz32?Math.clz32:PU,OU=Math.log,IU=Math.LN2;function PU(i){return i>>>=0,i===0?32:31-(OU(i)/IU|0)|0}var Ic=64,Pc=4194304;function iu(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 Rc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=c&268435455;if(S!==0){var U=S&~E;U!==0?h=iu(U):(b&=S,b!==0&&(h=iu(b)))}else S=c&~E,S!==0?h=iu(S):b!==0&&(h=iu(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&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-vr(o),E=1<<c,h|=i[c],o&=~E;return h}function RU(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 LU(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-vr(b),U=1<<S,z=E[S];z===-1?((U&c)===0||(U&h)!==0)&&(E[S]=RU(U,o)):z<=o&&(i.expiredLanes|=U),b&=~U}}function lm(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function t_(){var i=Ic;return Ic<<=1,(Ic&4194240)===0&&(Ic=64),i}function cm(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function su(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-vr(o),i[o]=c}function DU(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-vr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function dm(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-vr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var yt=0;function n_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var r_,fm,i_,s_,o_,hm=!1,Lc=[],Li=null,Di=null,Mi=null,ou=new Map,au=new Map,Fi=[],MU="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 a_(i,o){switch(i){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":ou.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":au.delete(o.pointerId)}}function uu(i,o,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=xu(o),o!==null&&fm(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function FU(i,o,c,h,E){switch(o){case"focusin":return Li=uu(Li,i,o,c,h,E),!0;case"dragenter":return Di=uu(Di,i,o,c,h,E),!0;case"mouseover":return Mi=uu(Mi,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return ou.set(b,uu(ou.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,au.set(b,uu(au.get(b)||null,i,o,c,h,E)),!0}return!1}function u_(i){var o=Rs(i.target);if(o!==null){var c=Ps(o);if(c!==null){if(o=c.tag,o===13){if(o=Yx(c),o!==null){i.blockedOn=o,o_(i.priority,function(){i_(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 Dc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=mm(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);J=h,c.target.dispatchEvent(h),J=null}else return o=xu(c),o!==null&&fm(o),i.blockedOn=c,!1;o.shift()}return!0}function l_(i,o,c){Dc(i)&&c.delete(o)}function BU(){hm=!1,Li!==null&&Dc(Li)&&(Li=null),Di!==null&&Dc(Di)&&(Di=null),Mi!==null&&Dc(Mi)&&(Mi=null),ou.forEach(l_),au.forEach(l_)}function lu(i,o){i.blockedOn===o&&(i.blockedOn=null,hm||(hm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,BU)))}function cu(i){function o(E){return lu(E,i)}if(0<Lc.length){lu(Lc[0],i);for(var c=1;c<Lc.length;c++){var h=Lc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Li!==null&&lu(Li,i),Di!==null&&lu(Di,i),Mi!==null&&lu(Mi,i),ou.forEach(o),au.forEach(o),c=0;c<Fi.length;c++)h=Fi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Fi.length&&(c=Fi[0],c.blockedOn===null);)u_(c),c.blockedOn===null&&Fi.shift()}var Mo=j.ReactCurrentBatchConfig,Mc=!0;function UU(i,o,c,h){var E=yt,b=Mo.transition;Mo.transition=null;try{yt=1,pm(i,o,c,h)}finally{yt=E,Mo.transition=b}}function HU(i,o,c,h){var E=yt,b=Mo.transition;Mo.transition=null;try{yt=4,pm(i,o,c,h)}finally{yt=E,Mo.transition=b}}function pm(i,o,c,h){if(Mc){var E=mm(i,o,c,h);if(E===null)Pm(i,o,h,Fc,c),a_(i,h);else if(FU(E,i,o,c,h))h.stopPropagation();else if(a_(i,h),o&4&&-1<MU.indexOf(i)){for(;E!==null;){var b=xu(E);if(b!==null&&r_(b),b=mm(i,o,c,h),b===null&&Pm(i,o,h,Fc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else Pm(i,o,h,null,c)}}var Fc=null;function mm(i,o,c,h){if(Fc=null,i=Ae(h),i=Rs(i),i!==null)if(o=Ps(i),o===null)i=null;else if(c=o.tag,c===13){if(i=Yx(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 Fc=i,null}function c_(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(CU()){case um:return 1;case Zx:return 4;case kc:case NU:return 16;case e_:return 536870912;default:return 16}default:return 16}}var Bi=null,gm=null,Bc=null;function d_(){if(Bc)return Bc;var i,o=gm,c=o.length,h,E="value"in Bi?Bi.value:Bi.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var S=c-i;for(h=1;h<=S&&o[c-h]===E[b-h];h++);return Bc=E.slice(i,1<h?1-h:void 0)}function Uc(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 Hc(){return!0}function f_(){return!1}function Kn(i){function o(c,h,E,b,S){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,this.currentTarget=null;for(var U in i)i.hasOwnProperty(U)&&(c=i[U],this[U]=c?c(b):b[U]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Hc:f_,this.isPropagationStopped=f_,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=Hc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Hc)},persist:function(){},isPersistent:Hc}),o}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Em=Kn(Fo),du=C({},Fo,{view:0,detail:0}),jU=Kn(du),ym,Tm,fu,jc=C({},du,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wm,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!==fu&&(fu&&i.type==="mousemove"?(ym=i.screenX-fu.screenX,Tm=i.screenY-fu.screenY):Tm=ym=0,fu=i),ym)},movementY:function(i){return"movementY"in i?i.movementY:Tm}}),h_=Kn(jc),$U=C({},jc,{dataTransfer:0}),zU=Kn($U),VU=C({},du,{relatedTarget:0}),bm=Kn(VU),qU=C({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),WU=Kn(qU),YU=C({},Fo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),GU=Kn(YU),XU=C({},Fo,{data:0}),p_=Kn(XU),KU={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QU={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"},JU={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZU(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=JU[i])?!!o[i]:!1}function wm(){return ZU}var eH=C({},du,{key:function(i){if(i.key){var o=KU[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Uc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?QU[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wm,charCode:function(i){return i.type==="keypress"?Uc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Uc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),tH=Kn(eH),nH=C({},jc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),m_=Kn(nH),rH=C({},du,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wm}),iH=Kn(rH),sH=C({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),oH=Kn(sH),aH=C({},jc,{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}),uH=Kn(aH),lH=[9,13,27,32],xm=l&&"CompositionEvent"in window,hu=null;l&&"documentMode"in document&&(hu=document.documentMode);var cH=l&&"TextEvent"in window&&!hu,g_=l&&(!xm||hu&&8<hu&&11>=hu),E_=" ",y_=!1;function T_(i,o){switch(i){case"keyup":return lH.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function b_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Bo=!1;function dH(i,o){switch(i){case"compositionend":return b_(o);case"keypress":return o.which!==32?null:(y_=!0,E_);case"textInput":return i=o.data,i===E_&&y_?null:i;default:return null}}function fH(i,o){if(Bo)return i==="compositionend"||!xm&&T_(i,o)?(i=d_(),Bc=gm=Bi=null,Bo=!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 g_&&o.locale!=="ko"?null:o.data;default:return null}}var hH={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 w_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!hH[i.type]:o==="textarea"}function x_(i,o,c,h){je(h),o=Wc(o,"onChange"),0<o.length&&(c=new Em("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var pu=null,mu=null;function pH(i){H_(i,0)}function $c(i){var o=zo(i);if(ft(o))return i}function mH(i,o){if(i==="change")return o}var __=!1;if(l){var _m;if(l){var Sm="oninput"in document;if(!Sm){var S_=document.createElement("div");S_.setAttribute("oninput","return;"),Sm=typeof S_.oninput=="function"}_m=Sm}else _m=!1;__=_m&&(!document.documentMode||9<document.documentMode)}function v_(){pu&&(pu.detachEvent("onpropertychange",A_),mu=pu=null)}function A_(i){if(i.propertyName==="value"&&$c(mu)){var o=[];x_(o,mu,i,Ae(i)),Kr(pH,o)}}function gH(i,o,c){i==="focusin"?(v_(),pu=o,mu=c,pu.attachEvent("onpropertychange",A_)):i==="focusout"&&v_()}function EH(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return $c(mu)}function yH(i,o){if(i==="click")return $c(o)}function TH(i,o){if(i==="input"||i==="change")return $c(o)}function bH(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Ar=typeof Object.is=="function"?Object.is:bH;function gu(i,o){if(Ar(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)||!Ar(i[E],o[E]))return!1}return!0}function C_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function N_(i,o){var c=C_(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=C_(c)}}function k_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?k_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function O_(){for(var i=window,o=ht();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=ht(i.document)}return o}function vm(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 wH(i){var o=O_(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&k_(c.ownerDocument.documentElement,c)){if(h!==null&&vm(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,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=N_(c,b);var S=N_(c,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.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 xH=l&&"documentMode"in document&&11>=document.documentMode,Uo=null,Am=null,Eu=null,Cm=!1;function I_(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Cm||Uo==null||Uo!==ht(h)||(h=Uo,"selectionStart"in h&&vm(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}),Eu&&gu(Eu,h)||(Eu=h,h=Wc(Am,"onSelect"),0<h.length&&(o=new Em("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Uo)))}function zc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Ho={animationend:zc("Animation","AnimationEnd"),animationiteration:zc("Animation","AnimationIteration"),animationstart:zc("Animation","AnimationStart"),transitionend:zc("Transition","TransitionEnd")},Nm={},P_={};l&&(P_=document.createElement("div").style,"AnimationEvent"in window||(delete Ho.animationend.animation,delete Ho.animationiteration.animation,delete Ho.animationstart.animation),"TransitionEvent"in window||delete Ho.transitionend.transition);function Vc(i){if(Nm[i])return Nm[i];if(!Ho[i])return i;var o=Ho[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in P_)return Nm[i]=o[c];return i}var R_=Vc("animationend"),L_=Vc("animationiteration"),D_=Vc("animationstart"),M_=Vc("transitionend"),F_=new Map,B_="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 Ui(i,o){F_.set(i,o),a(o,[i])}for(var km=0;km<B_.length;km++){var Om=B_[km],_H=Om.toLowerCase(),SH=Om[0].toUpperCase()+Om.slice(1);Ui(_H,"on"+SH)}Ui(R_,"onAnimationEnd"),Ui(L_,"onAnimationIteration"),Ui(D_,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(M_,"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 yu="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(" "),vH=new Set("cancel close invalid load scroll toggle".split(" ").concat(yu));function U_(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,_U(h,o,void 0,i),i.currentTarget=null}function H_(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 b=void 0;if(o)for(var S=h.length-1;0<=S;S--){var U=h[S],z=U.instance,ie=U.currentTarget;if(U=U.listener,z!==b&&E.isPropagationStopped())break e;U_(E,U,ie),b=z}else for(S=0;S<h.length;S++){if(U=h[S],z=U.instance,ie=U.currentTarget,U=U.listener,z!==b&&E.isPropagationStopped())break e;U_(E,U,ie),b=z}}}if(Nc)throw i=am,Nc=!1,am=null,i}function Ot(i,o){var c=o[Bm];c===void 0&&(c=o[Bm]=new Set);var h=i+"__bubble";c.has(h)||(j_(o,i,2,!1),c.add(h))}function Im(i,o,c){var h=0;o&&(h|=4),j_(c,i,h,o)}var qc="_reactListening"+Math.random().toString(36).slice(2);function Tu(i){if(!i[qc]){i[qc]=!0,r.forEach(function(c){c!=="selectionchange"&&(vH.has(c)||Im(c,!1,i),Im(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[qc]||(o[qc]=!0,Im("selectionchange",!1,o))}}function j_(i,o,c,h){switch(c_(o)){case 1:var E=UU;break;case 4:E=HU;break;default:E=pm}c=E.bind(null,o,c,i),E=void 0,!om||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 Pm(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var U=h.stateNode.containerInfo;if(U===E||U.nodeType===8&&U.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var z=S.tag;if((z===3||z===4)&&(z=S.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;S=S.return}for(;U!==null;){if(S=Rs(U),S===null)return;if(z=S.tag,z===5||z===6){h=b=S;continue e}U=U.parentNode}}h=h.return}Kr(function(){var ie=b,ye=Ae(c),be=[];e:{var ge=F_.get(i);if(ge!==void 0){var Pe=Em,Me=i;switch(i){case"keypress":if(Uc(c)===0)break e;case"keydown":case"keyup":Pe=tH;break;case"focusin":Me="focus",Pe=bm;break;case"focusout":Me="blur",Pe=bm;break;case"beforeblur":case"afterblur":Pe=bm;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=h_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pe=zU;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pe=iH;break;case R_:case L_:case D_:Pe=WU;break;case M_:Pe=oH;break;case"scroll":Pe=jU;break;case"wheel":Pe=uH;break;case"copy":case"cut":case"paste":Pe=GU;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pe=m_}var Be=(o&4)!==0,qt=!Be&&i==="scroll",K=Be?ge!==null?ge+"Capture":null:ge;Be=[];for(var Y=ie,te;Y!==null;){te=Y;var Se=te.stateNode;if(te.tag===5&&Se!==null&&(te=Se,K!==null&&(Se=Is(Y,K),Se!=null&&Be.push(bu(Y,Se,te)))),qt)break;Y=Y.return}0<Be.length&&(ge=new Pe(ge,Me,null,c,ye),be.push({event:ge,listeners:Be}))}}if((o&7)===0){e:{if(ge=i==="mouseover"||i==="pointerover",Pe=i==="mouseout"||i==="pointerout",ge&&c!==J&&(Me=c.relatedTarget||c.fromElement)&&(Rs(Me)||Me[ci]))break e;if((Pe||ge)&&(ge=ye.window===ye?ye:(ge=ye.ownerDocument)?ge.defaultView||ge.parentWindow:window,Pe?(Me=c.relatedTarget||c.toElement,Pe=ie,Me=Me?Rs(Me):null,Me!==null&&(qt=Ps(Me),Me!==qt||Me.tag!==5&&Me.tag!==6)&&(Me=null)):(Pe=null,Me=ie),Pe!==Me)){if(Be=h_,Se="onMouseLeave",K="onMouseEnter",Y="mouse",(i==="pointerout"||i==="pointerover")&&(Be=m_,Se="onPointerLeave",K="onPointerEnter",Y="pointer"),qt=Pe==null?ge:zo(Pe),te=Me==null?ge:zo(Me),ge=new Be(Se,Y+"leave",Pe,c,ye),ge.target=qt,ge.relatedTarget=te,Se=null,Rs(ye)===ie&&(Be=new Be(K,Y+"enter",Me,c,ye),Be.target=te,Be.relatedTarget=qt,Se=Be),qt=Se,Pe&&Me)t:{for(Be=Pe,K=Me,Y=0,te=Be;te;te=jo(te))Y++;for(te=0,Se=K;Se;Se=jo(Se))te++;for(;0<Y-te;)Be=jo(Be),Y--;for(;0<te-Y;)K=jo(K),te--;for(;Y--;){if(Be===K||K!==null&&Be===K.alternate)break t;Be=jo(Be),K=jo(K)}Be=null}else Be=null;Pe!==null&&$_(be,ge,Pe,Be,!1),Me!==null&&qt!==null&&$_(be,qt,Me,Be,!0)}}e:{if(ge=ie?zo(ie):window,Pe=ge.nodeName&&ge.nodeName.toLowerCase(),Pe==="select"||Pe==="input"&&ge.type==="file")var He=mH;else if(w_(ge))if(__)He=TH;else{He=EH;var qe=gH}else(Pe=ge.nodeName)&&Pe.toLowerCase()==="input"&&(ge.type==="checkbox"||ge.type==="radio")&&(He=yH);if(He&&(He=He(i,ie))){x_(be,He,c,ye);break e}qe&&qe(i,ge,ie),i==="focusout"&&(qe=ge._wrapperState)&&qe.controlled&&ge.type==="number"&&Re(ge,"number",ge.value)}switch(qe=ie?zo(ie):window,i){case"focusin":(w_(qe)||qe.contentEditable==="true")&&(Uo=qe,Am=ie,Eu=null);break;case"focusout":Eu=Am=Uo=null;break;case"mousedown":Cm=!0;break;case"contextmenu":case"mouseup":case"dragend":Cm=!1,I_(be,c,ye);break;case"selectionchange":if(xH)break;case"keydown":case"keyup":I_(be,c,ye)}var We;if(xm)e:{switch(i){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else Bo?T_(i,c)&&(Qe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Qe="onCompositionStart");Qe&&(g_&&c.locale!=="ko"&&(Bo||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&Bo&&(We=d_()):(Bi=ye,gm="value"in Bi?Bi.value:Bi.textContent,Bo=!0)),qe=Wc(ie,Qe),0<qe.length&&(Qe=new p_(Qe,i,null,c,ye),be.push({event:Qe,listeners:qe}),We?Qe.data=We:(We=b_(c),We!==null&&(Qe.data=We)))),(We=cH?dH(i,c):fH(i,c))&&(ie=Wc(ie,"onBeforeInput"),0<ie.length&&(ye=new p_("onBeforeInput","beforeinput",null,c,ye),be.push({event:ye,listeners:ie}),ye.data=We))}H_(be,o)})}function bu(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Wc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Is(i,c),b!=null&&h.unshift(bu(i,b,E)),b=Is(i,o),b!=null&&h.push(bu(i,b,E))),i=i.return}return h}function jo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function $_(i,o,c,h,E){for(var b=o._reactName,S=[];c!==null&&c!==h;){var U=c,z=U.alternate,ie=U.stateNode;if(z!==null&&z===h)break;U.tag===5&&ie!==null&&(U=ie,E?(z=Is(c,b),z!=null&&S.unshift(bu(c,z,U))):E||(z=Is(c,b),z!=null&&S.push(bu(c,z,U)))),c=c.return}S.length!==0&&i.push({event:o,listeners:S})}var AH=/\r\n?/g,CH=/\u0000|\uFFFD/g;function z_(i){return(typeof i=="string"?i:""+i).replace(AH,`
|
|
21
|
+
`).replace(CH,"")}function Yc(i,o,c){if(o=z_(o),z_(i)!==o&&c)throw Error(n(425))}function Gc(){}var Rm=null,Lm=null;function Dm(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 Mm=typeof setTimeout=="function"?setTimeout:void 0,NH=typeof clearTimeout=="function"?clearTimeout:void 0,V_=typeof Promise=="function"?Promise:void 0,kH=typeof queueMicrotask=="function"?queueMicrotask:typeof V_!="undefined"?function(i){return V_.resolve(null).then(i).catch(OH)}:Mm;function OH(i){setTimeout(function(){throw i})}function Fm(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),cu(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);cu(o)}function Hi(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 q_(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 $o=Math.random().toString(36).slice(2),Jr="__reactFiber$"+$o,wu="__reactProps$"+$o,ci="__reactContainer$"+$o,Bm="__reactEvents$"+$o,IH="__reactListeners$"+$o,PH="__reactHandles$"+$o;function Rs(i){var o=i[Jr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[ci]||c[Jr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=q_(i);i!==null;){if(c=i[Jr])return c;i=q_(i)}return o}i=c,c=i.parentNode}return null}function xu(i){return i=i[Jr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function zo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Xc(i){return i[wu]||null}var Um=[],Vo=-1;function ji(i){return{current:i}}function It(i){0>Vo||(i.current=Um[Vo],Um[Vo]=null,Vo--)}function At(i,o){Vo++,Um[Vo]=i.current,i.current=o}var $i={},wn=ji($i),Hn=ji(!1),Ls=$i;function qo(i,o){var c=i.type.contextTypes;if(!c)return $i;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function jn(i){return i=i.childContextTypes,i!=null}function Kc(){It(Hn),It(wn)}function W_(i,o,c){if(wn.current!==$i)throw Error(n(168));At(wn,o),At(Hn,c)}function Y_(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,Ne(i)||"Unknown",E));return C({},c,h)}function Qc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||$i,Ls=wn.current,At(wn,i),At(Hn,Hn.current),!0}function G_(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=Y_(i,o,Ls),h.__reactInternalMemoizedMergedChildContext=i,It(Hn),It(wn),At(wn,i)):It(Hn),At(Hn,c)}var di=null,Jc=!1,Hm=!1;function X_(i){di===null?di=[i]:di.push(i)}function RH(i){Jc=!0,X_(i)}function zi(){if(!Hm&&di!==null){Hm=!0;var i=0,o=yt;try{var c=di;for(yt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}di=null,Jc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),Qx(um,zi),E}finally{yt=o,Hm=!1}}return null}var Wo=[],Yo=0,Zc=null,ed=0,ur=[],lr=0,Ds=null,fi=1,hi="";function Ms(i,o){Wo[Yo++]=ed,Wo[Yo++]=Zc,Zc=i,ed=o}function K_(i,o,c){ur[lr++]=fi,ur[lr++]=hi,ur[lr++]=Ds,Ds=i;var h=fi;i=hi;var E=32-vr(h)-1;h&=~(1<<E),c+=1;var b=32-vr(o)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,fi=1<<32-vr(o)+E|c<<E|h,hi=b+i}else fi=1<<b|c<<E|h,hi=i}function jm(i){i.return!==null&&(Ms(i,1),K_(i,1,0))}function $m(i){for(;i===Zc;)Zc=Wo[--Yo],Wo[Yo]=null,ed=Wo[--Yo],Wo[Yo]=null;for(;i===Ds;)Ds=ur[--lr],ur[lr]=null,hi=ur[--lr],ur[lr]=null,fi=ur[--lr],ur[lr]=null}var Qn=null,Jn=null,Lt=!1,Cr=null;function Q_(i,o){var c=hr(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 J_(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,Jn=Hi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Qn=i,Jn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=Ds!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=hr(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Qn=i,Jn=null,!0):!1;default:return!1}}function zm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Vm(i){if(Lt){var o=Jn;if(o){var c=o;if(!J_(i,o)){if(zm(i))throw Error(n(418));o=Hi(c.nextSibling);var h=Qn;o&&J_(i,o)?Q_(h,c):(i.flags=i.flags&-4097|2,Lt=!1,Qn=i)}}else{if(zm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Lt=!1,Qn=i}}}function Z_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Qn=i}function td(i){if(i!==Qn)return!1;if(!Lt)return Z_(i),Lt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Dm(i.type,i.memoizedProps)),o&&(o=Jn)){if(zm(i))throw eS(),Error(n(418));for(;o;)Q_(i,o),o=Hi(o.nextSibling)}if(Z_(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){Jn=Hi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Jn=null}}else Jn=Qn?Hi(i.stateNode.nextSibling):null;return!0}function eS(){for(var i=Jn;i;)i=Hi(i.nextSibling)}function Go(){Jn=Qn=null,Lt=!1}function qm(i){Cr===null?Cr=[i]:Cr.push(i)}var LH=j.ReactCurrentBatchConfig;function _u(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,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(S){var U=E.refs;S===null?delete U[b]:U[b]=S},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function nd(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function tS(i){var o=i._init;return o(i._payload)}function nS(i){function o(K,Y){if(i){var te=K.deletions;te===null?(K.deletions=[Y],K.flags|=16):te.push(Y)}}function c(K,Y){if(!i)return null;for(;Y!==null;)o(K,Y),Y=Y.sibling;return null}function h(K,Y){for(K=new Map;Y!==null;)Y.key!==null?K.set(Y.key,Y):K.set(Y.index,Y),Y=Y.sibling;return K}function E(K,Y){return K=Qi(K,Y),K.index=0,K.sibling=null,K}function b(K,Y,te){return K.index=te,i?(te=K.alternate,te!==null?(te=te.index,te<Y?(K.flags|=2,Y):te):(K.flags|=2,Y)):(K.flags|=1048576,Y)}function S(K){return i&&K.alternate===null&&(K.flags|=2),K}function U(K,Y,te,Se){return Y===null||Y.tag!==6?(Y=M0(te,K.mode,Se),Y.return=K,Y):(Y=E(Y,te),Y.return=K,Y)}function z(K,Y,te,Se){var He=te.type;return He===X?ye(K,Y,te.props.children,Se,te.key):Y!==null&&(Y.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===me&&tS(He)===Y.type)?(Se=E(Y,te.props),Se.ref=_u(K,Y,te),Se.return=K,Se):(Se=Ad(te.type,te.key,te.props,null,K.mode,Se),Se.ref=_u(K,Y,te),Se.return=K,Se)}function ie(K,Y,te,Se){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==te.containerInfo||Y.stateNode.implementation!==te.implementation?(Y=F0(te,K.mode,Se),Y.return=K,Y):(Y=E(Y,te.children||[]),Y.return=K,Y)}function ye(K,Y,te,Se,He){return Y===null||Y.tag!==7?(Y=Vs(te,K.mode,Se,He),Y.return=K,Y):(Y=E(Y,te),Y.return=K,Y)}function be(K,Y,te){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Y=M0(""+Y,K.mode,te),Y.return=K,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case q:return te=Ad(Y.type,Y.key,Y.props,null,K.mode,te),te.ref=_u(K,null,Y),te.return=K,te;case R:return Y=F0(Y,K.mode,te),Y.return=K,Y;case me:var Se=Y._init;return be(K,Se(Y._payload),te)}if(Ke(Y)||le(Y))return Y=Vs(Y,K.mode,te,null),Y.return=K,Y;nd(K,Y)}return null}function ge(K,Y,te,Se){var He=Y!==null?Y.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return He!==null?null:U(K,Y,""+te,Se);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case q:return te.key===He?z(K,Y,te,Se):null;case R:return te.key===He?ie(K,Y,te,Se):null;case me:return He=te._init,ge(K,Y,He(te._payload),Se)}if(Ke(te)||le(te))return He!==null?null:ye(K,Y,te,Se,null);nd(K,te)}return null}function Pe(K,Y,te,Se,He){if(typeof Se=="string"&&Se!==""||typeof Se=="number")return K=K.get(te)||null,U(Y,K,""+Se,He);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case q:return K=K.get(Se.key===null?te:Se.key)||null,z(Y,K,Se,He);case R:return K=K.get(Se.key===null?te:Se.key)||null,ie(Y,K,Se,He);case me:var qe=Se._init;return Pe(K,Y,te,qe(Se._payload),He)}if(Ke(Se)||le(Se))return K=K.get(te)||null,ye(Y,K,Se,He,null);nd(Y,Se)}return null}function Me(K,Y,te,Se){for(var He=null,qe=null,We=Y,Qe=Y=0,ln=null;We!==null&&Qe<te.length;Qe++){We.index>Qe?(ln=We,We=null):ln=We.sibling;var mt=ge(K,We,te[Qe],Se);if(mt===null){We===null&&(We=ln);break}i&&We&&mt.alternate===null&&o(K,We),Y=b(mt,Y,Qe),qe===null?He=mt:qe.sibling=mt,qe=mt,We=ln}if(Qe===te.length)return c(K,We),Lt&&Ms(K,Qe),He;if(We===null){for(;Qe<te.length;Qe++)We=be(K,te[Qe],Se),We!==null&&(Y=b(We,Y,Qe),qe===null?He=We:qe.sibling=We,qe=We);return Lt&&Ms(K,Qe),He}for(We=h(K,We);Qe<te.length;Qe++)ln=Pe(We,K,Qe,te[Qe],Se),ln!==null&&(i&&ln.alternate!==null&&We.delete(ln.key===null?Qe:ln.key),Y=b(ln,Y,Qe),qe===null?He=ln:qe.sibling=ln,qe=ln);return i&&We.forEach(function(Ji){return o(K,Ji)}),Lt&&Ms(K,Qe),He}function Be(K,Y,te,Se){var He=le(te);if(typeof He!="function")throw Error(n(150));if(te=He.call(te),te==null)throw Error(n(151));for(var qe=He=null,We=Y,Qe=Y=0,ln=null,mt=te.next();We!==null&&!mt.done;Qe++,mt=te.next()){We.index>Qe?(ln=We,We=null):ln=We.sibling;var Ji=ge(K,We,mt.value,Se);if(Ji===null){We===null&&(We=ln);break}i&&We&&Ji.alternate===null&&o(K,We),Y=b(Ji,Y,Qe),qe===null?He=Ji:qe.sibling=Ji,qe=Ji,We=ln}if(mt.done)return c(K,We),Lt&&Ms(K,Qe),He;if(We===null){for(;!mt.done;Qe++,mt=te.next())mt=be(K,mt.value,Se),mt!==null&&(Y=b(mt,Y,Qe),qe===null?He=mt:qe.sibling=mt,qe=mt);return Lt&&Ms(K,Qe),He}for(We=h(K,We);!mt.done;Qe++,mt=te.next())mt=Pe(We,K,Qe,mt.value,Se),mt!==null&&(i&&mt.alternate!==null&&We.delete(mt.key===null?Qe:mt.key),Y=b(mt,Y,Qe),qe===null?He=mt:qe.sibling=mt,qe=mt);return i&&We.forEach(function(hj){return o(K,hj)}),Lt&&Ms(K,Qe),He}function qt(K,Y,te,Se){if(typeof te=="object"&&te!==null&&te.type===X&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case q:e:{for(var He=te.key,qe=Y;qe!==null;){if(qe.key===He){if(He=te.type,He===X){if(qe.tag===7){c(K,qe.sibling),Y=E(qe,te.props.children),Y.return=K,K=Y;break e}}else if(qe.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===me&&tS(He)===qe.type){c(K,qe.sibling),Y=E(qe,te.props),Y.ref=_u(K,qe,te),Y.return=K,K=Y;break e}c(K,qe);break}else o(K,qe);qe=qe.sibling}te.type===X?(Y=Vs(te.props.children,K.mode,Se,te.key),Y.return=K,K=Y):(Se=Ad(te.type,te.key,te.props,null,K.mode,Se),Se.ref=_u(K,Y,te),Se.return=K,K=Se)}return S(K);case R:e:{for(qe=te.key;Y!==null;){if(Y.key===qe)if(Y.tag===4&&Y.stateNode.containerInfo===te.containerInfo&&Y.stateNode.implementation===te.implementation){c(K,Y.sibling),Y=E(Y,te.children||[]),Y.return=K,K=Y;break e}else{c(K,Y);break}else o(K,Y);Y=Y.sibling}Y=F0(te,K.mode,Se),Y.return=K,K=Y}return S(K);case me:return qe=te._init,qt(K,Y,qe(te._payload),Se)}if(Ke(te))return Me(K,Y,te,Se);if(le(te))return Be(K,Y,te,Se);nd(K,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,Y!==null&&Y.tag===6?(c(K,Y.sibling),Y=E(Y,te),Y.return=K,K=Y):(c(K,Y),Y=M0(te,K.mode,Se),Y.return=K,K=Y),S(K)):c(K,Y)}return qt}var Xo=nS(!0),rS=nS(!1),rd=ji(null),id=null,Ko=null,Wm=null;function Ym(){Wm=Ko=id=null}function Gm(i){var o=rd.current;It(rd),i._currentValue=o}function Xm(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 Qo(i,o){id=i,Wm=Ko=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&($n=!0),i.firstContext=null)}function cr(i){var o=i._currentValue;if(Wm!==i)if(i={context:i,memoizedValue:o,next:null},Ko===null){if(id===null)throw Error(n(308));Ko=i,id.dependencies={lanes:0,firstContext:i}}else Ko=Ko.next=i;return o}var Fs=null;function Km(i){Fs===null?Fs=[i]:Fs.push(i)}function iS(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,Km(o)):(c.next=E.next,E.next=c),o.interleaved=c,pi(i,h)}function pi(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 Vi=!1;function Qm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sS(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 mi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function qi(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ct&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,pi(i,c)}return E=h.interleaved,E===null?(o.next=o,Km(h)):(o.next=E.next,E.next=o),h.interleaved=o,pi(i,c)}function sd(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,dm(i,c)}}function oS(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var S={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=S:b=b.next=S,c=c.next}while(c!==null);b===null?E=b=o:b=b.next=o}else E=b=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,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 od(i,o,c,h){var E=i.updateQueue;Vi=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,U=E.shared.pending;if(U!==null){E.shared.pending=null;var z=U,ie=z.next;z.next=null,S===null?b=ie:S.next=ie,S=z;var ye=i.alternate;ye!==null&&(ye=ye.updateQueue,U=ye.lastBaseUpdate,U!==S&&(U===null?ye.firstBaseUpdate=ie:U.next=ie,ye.lastBaseUpdate=z))}if(b!==null){var be=E.baseState;S=0,ye=ie=z=null,U=b;do{var ge=U.lane,Pe=U.eventTime;if((h&ge)===ge){ye!==null&&(ye=ye.next={eventTime:Pe,lane:0,tag:U.tag,payload:U.payload,callback:U.callback,next:null});e:{var Me=i,Be=U;switch(ge=o,Pe=c,Be.tag){case 1:if(Me=Be.payload,typeof Me=="function"){be=Me.call(Pe,be,ge);break e}be=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Be.payload,ge=typeof Me=="function"?Me.call(Pe,be,ge):Me,ge==null)break e;be=C({},be,ge);break e;case 2:Vi=!0}}U.callback!==null&&U.lane!==0&&(i.flags|=64,ge=E.effects,ge===null?E.effects=[U]:ge.push(U))}else Pe={eventTime:Pe,lane:ge,tag:U.tag,payload:U.payload,callback:U.callback,next:null},ye===null?(ie=ye=Pe,z=be):ye=ye.next=Pe,S|=ge;if(U=U.next,U===null){if(U=E.shared.pending,U===null)break;ge=U,U=ge.next,ge.next=null,E.lastBaseUpdate=ge,E.shared.pending=null}}while(!0);if(ye===null&&(z=be),E.baseState=z,E.firstBaseUpdate=ie,E.lastBaseUpdate=ye,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);Hs|=S,i.lanes=S,i.memoizedState=be}}function aS(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 Su={},Zr=ji(Su),vu=ji(Su),Au=ji(Su);function Bs(i){if(i===Su)throw Error(n(174));return i}function Jm(i,o){switch(At(Au,o),At(vu,i),At(Zr,Su),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:_e(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=_e(o,i)}It(Zr),At(Zr,o)}function Jo(){It(Zr),It(vu),It(Au)}function uS(i){Bs(Au.current);var o=Bs(Zr.current),c=_e(o,i.type);o!==c&&(At(vu,i),At(Zr,c))}function Zm(i){vu.current===i&&(It(Zr),It(vu))}var Mt=ji(0);function ad(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 e0=[];function t0(){for(var i=0;i<e0.length;i++)e0[i]._workInProgressVersionPrimary=null;e0.length=0}var ud=j.ReactCurrentDispatcher,n0=j.ReactCurrentBatchConfig,Us=0,Ft=null,en=null,an=null,ld=!1,Cu=!1,Nu=0,DH=0;function xn(){throw Error(n(321))}function r0(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!Ar(i[c],o[c]))return!1;return!0}function i0(i,o,c,h,E,b){if(Us=b,Ft=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ud.current=i===null||i.memoizedState===null?UH:HH,i=c(h,E),Cu){b=0;do{if(Cu=!1,Nu=0,25<=b)throw Error(n(301));b+=1,an=en=null,o.updateQueue=null,ud.current=jH,i=c(h,E)}while(Cu)}if(ud.current=fd,o=en!==null&&en.next!==null,Us=0,an=en=Ft=null,ld=!1,o)throw Error(n(300));return i}function s0(){var i=Nu!==0;return Nu=0,i}function ei(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return an===null?Ft.memoizedState=an=i:an=an.next=i,an}function dr(){if(en===null){var i=Ft.alternate;i=i!==null?i.memoizedState:null}else i=en.next;var o=an===null?Ft.memoizedState:an.next;if(o!==null)an=o,en=i;else{if(i===null)throw Error(n(310));en=i,i={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},an===null?Ft.memoizedState=an=i:an=an.next=i}return an}function ku(i,o){return typeof o=="function"?o(i):o}function o0(i){var o=dr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=en,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var U=S=null,z=null,ie=b;do{var ye=ie.lane;if((Us&ye)===ye)z!==null&&(z=z.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),h=ie.hasEagerState?ie.eagerState:i(h,ie.action);else{var be={lane:ye,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};z===null?(U=z=be,S=h):z=z.next=be,Ft.lanes|=ye,Hs|=ye}ie=ie.next}while(ie!==null&&ie!==b);z===null?S=h:z.next=U,Ar(h,o.memoizedState)||($n=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Ft.lanes|=b,Hs|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function a0(i){var o=dr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=o.memoizedState;if(E!==null){c.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);Ar(b,o.memoizedState)||($n=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function lS(){}function cS(i,o){var c=Ft,h=dr(),E=o(),b=!Ar(h.memoizedState,E);if(b&&(h.memoizedState=E,$n=!0),h=h.queue,u0(hS.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||an!==null&&an.memoizedState.tag&1){if(c.flags|=2048,Ou(9,fS.bind(null,c,h,E,o),void 0,null),un===null)throw Error(n(349));(Us&30)!==0||dS(c,o,E)}return E}function dS(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Ft.updateQueue,o===null?(o={lastEffect:null,stores:null},Ft.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function fS(i,o,c,h){o.value=c,o.getSnapshot=h,pS(o)&&mS(i)}function hS(i,o,c){return c(function(){pS(o)&&mS(i)})}function pS(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!Ar(i,c)}catch(h){return!0}}function mS(i){var o=pi(i,1);o!==null&&Ir(o,i,1,-1)}function gS(i){var o=ei();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ku,lastRenderedState:i},o.queue=i,i=i.dispatch=BH.bind(null,Ft,i),[o.memoizedState,i]}function Ou(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Ft.updateQueue,o===null?(o={lastEffect:null,stores:null},Ft.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 ES(){return dr().memoizedState}function cd(i,o,c,h){var E=ei();Ft.flags|=i,E.memoizedState=Ou(1|o,c,void 0,h===void 0?null:h)}function dd(i,o,c,h){var E=dr();h=h===void 0?null:h;var b=void 0;if(en!==null){var S=en.memoizedState;if(b=S.destroy,h!==null&&r0(h,S.deps)){E.memoizedState=Ou(o,c,b,h);return}}Ft.flags|=i,E.memoizedState=Ou(1|o,c,b,h)}function yS(i,o){return cd(8390656,8,i,o)}function u0(i,o){return dd(2048,8,i,o)}function TS(i,o){return dd(4,2,i,o)}function bS(i,o){return dd(4,4,i,o)}function wS(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 xS(i,o,c){return c=c!=null?c.concat([i]):null,dd(4,4,wS.bind(null,o,i),c)}function l0(){}function _S(i,o){var c=dr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&r0(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function SS(i,o){var c=dr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&r0(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function vS(i,o,c){return(Us&21)===0?(i.baseState&&(i.baseState=!1,$n=!0),i.memoizedState=c):(Ar(c,o)||(c=t_(),Ft.lanes|=c,Hs|=c,i.baseState=!0),o)}function MH(i,o){var c=yt;yt=c!==0&&4>c?c:4,i(!0);var h=n0.transition;n0.transition={};try{i(!1),o()}finally{yt=c,n0.transition=h}}function AS(){return dr().memoizedState}function FH(i,o,c){var h=Xi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},CS(i))NS(o,c);else if(c=iS(i,o,c,h),c!==null){var E=On();Ir(c,i,h,E),kS(c,o,h)}}function BH(i,o,c){var h=Xi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(CS(i))NS(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var S=o.lastRenderedState,U=b(S,c);if(E.hasEagerState=!0,E.eagerState=U,Ar(U,S)){var z=o.interleaved;z===null?(E.next=E,Km(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(ie){}c=iS(i,o,E,h),c!==null&&(E=On(),Ir(c,i,h,E),kS(c,o,h))}}function CS(i){var o=i.alternate;return i===Ft||o!==null&&o===Ft}function NS(i,o){Cu=ld=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function kS(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,dm(i,c)}}var fd={readContext:cr,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useInsertionEffect:xn,useLayoutEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useDeferredValue:xn,useTransition:xn,useMutableSource:xn,useSyncExternalStore:xn,useId:xn,unstable_isNewReconciler:!1},UH={readContext:cr,useCallback:function(i,o){return ei().memoizedState=[i,o===void 0?null:o],i},useContext:cr,useEffect:yS,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,cd(4194308,4,wS.bind(null,o,i),c)},useLayoutEffect:function(i,o){return cd(4194308,4,i,o)},useInsertionEffect:function(i,o){return cd(4,2,i,o)},useMemo:function(i,o){var c=ei();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=ei();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=FH.bind(null,Ft,i),[h.memoizedState,i]},useRef:function(i){var o=ei();return i={current:i},o.memoizedState=i},useState:gS,useDebugValue:l0,useDeferredValue:function(i){return ei().memoizedState=i},useTransition:function(){var i=gS(!1),o=i[0];return i=MH.bind(null,i[1]),ei().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Ft,E=ei();if(Lt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),un===null)throw Error(n(349));(Us&30)!==0||dS(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,yS(hS.bind(null,h,b,i),[i]),h.flags|=2048,Ou(9,fS.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=ei(),o=un.identifierPrefix;if(Lt){var c=hi,h=fi;c=(h&~(1<<32-vr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=Nu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=DH++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},HH={readContext:cr,useCallback:_S,useContext:cr,useEffect:u0,useImperativeHandle:xS,useInsertionEffect:TS,useLayoutEffect:bS,useMemo:SS,useReducer:o0,useRef:ES,useState:function(){return o0(ku)},useDebugValue:l0,useDeferredValue:function(i){var o=dr();return vS(o,en.memoizedState,i)},useTransition:function(){var i=o0(ku)[0],o=dr().memoizedState;return[i,o]},useMutableSource:lS,useSyncExternalStore:cS,useId:AS,unstable_isNewReconciler:!1},jH={readContext:cr,useCallback:_S,useContext:cr,useEffect:u0,useImperativeHandle:xS,useInsertionEffect:TS,useLayoutEffect:bS,useMemo:SS,useReducer:a0,useRef:ES,useState:function(){return a0(ku)},useDebugValue:l0,useDeferredValue:function(i){var o=dr();return en===null?o.memoizedState=i:vS(o,en.memoizedState,i)},useTransition:function(){var i=a0(ku)[0],o=dr().memoizedState;return[i,o]},useMutableSource:lS,useSyncExternalStore:cS,useId:AS,unstable_isNewReconciler:!1};function Nr(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 c0(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 hd={isMounted:function(i){return(i=i._reactInternals)?Ps(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=On(),E=Xi(i),b=mi(h,E);b.payload=o,c!=null&&(b.callback=c),o=qi(i,b,E),o!==null&&(Ir(o,i,E,h),sd(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=On(),E=Xi(i),b=mi(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=qi(i,b,E),o!==null&&(Ir(o,i,E,h),sd(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=On(),h=Xi(i),E=mi(c,h);E.tag=2,o!=null&&(E.callback=o),o=qi(i,E,h),o!==null&&(Ir(o,i,h,c),sd(o,i,h))}};function OS(i,o,c,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):o.prototype&&o.prototype.isPureReactComponent?!gu(c,h)||!gu(E,b):!0}function IS(i,o,c){var h=!1,E=$i,b=o.contextType;return typeof b=="object"&&b!==null?b=cr(b):(E=jn(o)?Ls:wn.current,h=o.contextTypes,b=(h=h!=null)?qo(i,E):$i),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=hd,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function PS(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&&hd.enqueueReplaceState(o,o.state,null)}function d0(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Qm(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=cr(b):(b=jn(o)?Ls:wn.current,E.context=qo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(c0(i,o,b,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&&hd.enqueueReplaceState(E,E.state,null),od(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Zo(i,o){try{var c="",h=o;do c+=De(h),h=h.return;while(h);var E=c}catch(b){E=`
|
|
22
22
|
Error generating stack: `+b.message+`
|
|
23
|
-
`+b.stack}return{value:i,source:o,stack:E,digest:null}}function f0(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function h0(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var jH=typeof WeakMap=="function"?WeakMap:Map;function RS(i,o,c){c=mi(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){bd||(bd=!0,N0=h),h0(i,o)},c}function LS(i,o,c){c=mi(-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(){h0(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){h0(i,o),typeof h!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),c}function DS(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new jH;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=tj.bind(null,i,o,c),o.then(i,i))}function MS(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 FS(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=mi(-1,1),o.tag=2,qi(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var $H=j.ReactCurrentOwner,$n=!1;function kn(i,o,c,h){o.child=i===null?rS(o,null,c,h):Xo(o,i.child,c,h)}function BS(i,o,c,h,E){c=c.render;var b=o.ref;return Qo(o,E),h=i0(i,o,c,h,b,E),c=s0(),i!==null&&!$n?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Lt&&c&&jm(o),o.flags|=1,kn(i,o,h,E),o.child)}function US(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!D0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,HS(i,o,b,h,E)):(i=Ad(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var S=b.memoizedProps;if(c=c.compare,c=c!==null?c:gu,c(S,h)&&i.ref===o.ref)return gi(i,o,E)}return o.flags|=1,i=Qi(b,h),i.ref=o.ref,i.return=o,o.child=i}function HS(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(gu(b,h)&&i.ref===o.ref)if($n=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&($n=!0);else return o.lanes=i.lanes,gi(i,o,E)}return p0(i,o,c,h,E)}function jS(i,o,c){var h=o.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},At(ta,Zn),Zn|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,At(ta,Zn),Zn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,At(ta,Zn),Zn|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,At(ta,Zn),Zn|=h;return kn(i,o,E,c),o.child}function $S(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function p0(i,o,c,h,E){var b=jn(c)?Ls:wn.current;return b=qo(o,b),Qo(o,E),c=i0(i,o,c,h,b,E),h=s0(),i!==null&&!$n?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Lt&&h&&jm(o),o.flags|=1,kn(i,o,c,E),o.child)}function zS(i,o,c,h,E){if(jn(c)){var b=!0;Qc(o)}else b=!1;if(Qo(o,E),o.stateNode===null)md(i,o),IS(o,c,h),d0(o,c,h,E),h=!0;else if(i===null){var S=o.stateNode,U=o.memoizedProps;S.props=U;var z=S.context,ie=c.contextType;typeof ie=="object"&&ie!==null?ie=cr(ie):(ie=jn(c)?Ls:wn.current,ie=qo(o,ie));var ye=c.getDerivedStateFromProps,be=typeof ye=="function"||typeof S.getSnapshotBeforeUpdate=="function";be||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(U!==h||z!==ie)&&PS(o,S,h,ie),Vi=!1;var ge=o.memoizedState;S.state=ge,od(o,h,S,E),z=o.memoizedState,U!==h||ge!==z||Hn.current||Vi?(typeof ye=="function"&&(c0(o,c,ye,h),z=o.memoizedState),(U=Vi||OS(o,c,U,h,ge,z,ie))?(be||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=z),S.props=h,S.state=z,S.context=ie,h=U):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,sS(i,o),U=o.memoizedProps,ie=o.type===o.elementType?U:Nr(o.type,U),S.props=ie,be=o.pendingProps,ge=S.context,z=c.contextType,typeof z=="object"&&z!==null?z=cr(z):(z=jn(c)?Ls:wn.current,z=qo(o,z));var Pe=c.getDerivedStateFromProps;(ye=typeof Pe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(U!==be||ge!==z)&&PS(o,S,h,z),Vi=!1,ge=o.memoizedState,S.state=ge,od(o,h,S,E);var Me=o.memoizedState;U!==be||ge!==Me||Hn.current||Vi?(typeof Pe=="function"&&(c0(o,c,Pe,h),Me=o.memoizedState),(ie=Vi||OS(o,c,ie,h,ge,Me,z)||!1)?(ye||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Me,z),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Me,z)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Me),S.props=h,S.state=Me,S.context=z,h=ie):(typeof S.componentDidUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=1024),h=!1)}return m0(i,o,c,h,b,E)}function m0(i,o,c,h,E,b){$S(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&G_(o,c,!1),gi(i,o,b);h=o.stateNode,$H.current=o;var U=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=Xo(o,i.child,null,b),o.child=Xo(o,null,U,b)):kn(i,o,U,b),o.memoizedState=h.state,E&&G_(o,c,!0),o.child}function VS(i){var o=i.stateNode;o.pendingContext?W_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&W_(i,o.context,!1),Jm(i,o.containerInfo)}function qS(i,o,c,h,E){return Go(),qm(E),o.flags|=256,kn(i,o,c,h),o.child}var g0={dehydrated:null,treeContext:null,retryLane:0};function E0(i){return{baseLanes:i,cachePool:null,transitions:null}}function WS(i,o,c){var h=o.pendingProps,E=Mt.current,b=!1,S=(o.flags&128)!==0,U;if((U=S)||(U=i!==null&&i.memoizedState===null?!1:(E&2)!==0),U?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),At(Mt,E&1),i===null)return Vm(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):(S=h.children,i=h.fallback,b?(h=o.mode,b=o.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=Cd(S,h,0,null),i=Vs(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=E0(c),o.memoizedState=g0,i):y0(o,S));if(E=i.memoizedState,E!==null&&(U=E.dehydrated,U!==null))return zH(i,o,S,h,U,E,c);if(b){b=h.fallback,S=o.mode,E=i.child,U=E.sibling;var z={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=z,o.deletions=null):(h=Qi(E,z),h.subtreeFlags=E.subtreeFlags&14680064),U!==null?b=Qi(U,b):(b=Vs(b,S,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,S=i.child.memoizedState,S=S===null?E0(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~c,o.memoizedState=g0,h}return b=i.child,i=b.sibling,h=Qi(b,{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 y0(i,o){return o=Cd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function pd(i,o,c,h){return h!==null&&qm(h),Xo(o,i.child,null,c),i=y0(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function zH(i,o,c,h,E,b,S){if(c)return o.flags&256?(o.flags&=-257,h=f0(Error(n(422))),pd(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=Cd({mode:"visible",children:h.children},E,0,null),b=Vs(b,E,S,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&Xo(o,i.child,null,S),o.child.memoizedState=E0(S),o.memoizedState=g0,b);if((o.mode&1)===0)return pd(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var U=h.dgst;return h=U,b=Error(n(419)),h=f0(b,h,void 0),pd(i,o,S,h)}if(U=(S&i.childLanes)!==0,$n||U){if(h=un,h!==null){switch(S&-S){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|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,pi(i,E),Ir(h,i,E,-1))}return L0(),h=f0(Error(n(421))),pd(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=nj.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Jn=Hi(E.nextSibling),Qn=o,Lt=!0,Cr=null,i!==null&&(ur[lr++]=fi,ur[lr++]=hi,ur[lr++]=Ds,fi=i.id,hi=i.overflow,Ds=o),o=y0(o,h.children),o.flags|=4096,o)}function YS(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),Xm(i.return,o,c)}function T0(i,o,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function GS(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(kn(i,o,h.children,c),h=Mt.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&&YS(i,c,o);else if(i.tag===19)YS(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(At(Mt,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&&ad(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),T0(o,!1,E,c,b);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&ad(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}T0(o,!0,c,null,b);break;case"together":T0(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function md(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function gi(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Hs|=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=Qi(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Qi(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function VH(i,o,c){switch(o.tag){case 3:VS(o),Go();break;case 5:uS(o);break;case 1:jn(o.type)&&Qc(o);break;case 4:Jm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;At(rd,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(At(Mt,Mt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?WS(i,o,c):(At(Mt,Mt.current&1),i=gi(i,o,c),i!==null?i.sibling:null);At(Mt,Mt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return GS(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),At(Mt,Mt.current),h)break;return null;case 22:case 23:return o.lanes=0,jS(i,o,c)}return gi(i,o,c)}var XS,b0,KS,QS;XS=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}},b0=function(){},KS=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Bs(Zr.current);var b=null;switch(c){case"input":E=vt(i,E),h=vt(i,h),b=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),b=[];break;case"textarea":E=Et(i,E),h=Et(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Gc)}Ut(c,h);var S;c=null;for(ie in E)if(!h.hasOwnProperty(ie)&&E.hasOwnProperty(ie)&&E[ie]!=null)if(ie==="style"){var U=E[ie];for(S in U)U.hasOwnProperty(S)&&(c||(c={}),c[S]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(s.hasOwnProperty(ie)?b||(b=[]):(b=b||[]).push(ie,null));for(ie in h){var z=h[ie];if(U=E!=null?E[ie]:void 0,h.hasOwnProperty(ie)&&z!==U&&(z!=null||U!=null))if(ie==="style")if(U){for(S in U)!U.hasOwnProperty(S)||z&&z.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in z)z.hasOwnProperty(S)&&U[S]!==z[S]&&(c||(c={}),c[S]=z[S])}else c||(b||(b=[]),b.push(ie,c)),c=z;else ie==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,U=U?U.__html:void 0,z!=null&&U!==z&&(b=b||[]).push(ie,z)):ie==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(ie,""+z):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(s.hasOwnProperty(ie)?(z!=null&&ie==="onScroll"&&Ot("scroll",i),b||U===z||(b=[])):(b=b||[]).push(ie,z))}c&&(b=b||[]).push("style",c);var ie=b;(o.updateQueue=ie)&&(o.flags|=4)}},QS=function(i,o,c,h){c!==h&&(o.flags|=4)};function Iu(i,o){if(!Lt)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 _n(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 qH(i,o,c){var h=o.pendingProps;switch($m(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _n(o),null;case 1:return jn(o.type)&&Kc(),_n(o),null;case 3:return h=o.stateNode,Jo(),It(Hn),It(wn),t0(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(td(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Cr!==null&&(I0(Cr),Cr=null))),b0(i,o),_n(o),null;case 5:Zm(o);var E=Bs(Au.current);if(c=o.type,i!==null&&o.stateNode!=null)KS(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 _n(o),null}if(i=Bs(Zr.current),td(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Jr]=o,h[wu]=b,i=(o.mode&1)!==0,c){case"dialog":Ot("cancel",h),Ot("close",h);break;case"iframe":case"object":case"embed":Ot("load",h);break;case"video":case"audio":for(E=0;E<yu.length;E++)Ot(yu[E],h);break;case"source":Ot("error",h);break;case"img":case"image":case"link":Ot("error",h),Ot("load",h);break;case"details":Ot("toggle",h);break;case"input":pt(h,b),Ot("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},Ot("invalid",h);break;case"textarea":Sr(h,b),Ot("invalid",h)}Ut(c,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var U=b[S];S==="children"?typeof U=="string"?h.textContent!==U&&(b.suppressHydrationWarning!==!0&&Yc(h.textContent,U,i),E=["children",U]):typeof U=="number"&&h.textContent!==""+U&&(b.suppressHydrationWarning!==!0&&Yc(h.textContent,U,i),E=["children",""+U]):s.hasOwnProperty(S)&&U!=null&&S==="onScroll"&&Ot("scroll",h)}switch(c){case"input":Dt(h),Gt(h,b,!0);break;case"textarea":Dt(h),Os(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Gc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ce(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(c,{is:h.is}):(i=S.createElement(c),c==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,c),i[Jr]=o,i[wu]=h,XS(i,o,!1,!1),o.stateNode=i;e:{switch(S=or(c,h),c){case"dialog":Ot("cancel",i),Ot("close",i),E=h;break;case"iframe":case"object":case"embed":Ot("load",i),E=h;break;case"video":case"audio":for(E=0;E<yu.length;E++)Ot(yu[E],i);E=h;break;case"source":Ot("error",i),E=h;break;case"img":case"image":case"link":Ot("error",i),Ot("load",i),E=h;break;case"details":Ot("toggle",i),E=h;break;case"input":pt(i,h),E=vt(i,h),Ot("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),Ot("invalid",i);break;case"textarea":Sr(i,h),E=Et(i,h),Ot("invalid",i);break;default:E=h}Ut(c,E),U=E;for(b in U)if(U.hasOwnProperty(b)){var z=U[b];b==="style"?ir(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&et(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&it(i,z):typeof z=="number"&&it(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?z!=null&&b==="onScroll"&&Ot("scroll",i):z!=null&&I(i,b,z,S))}switch(c){case"input":Dt(i),Gt(i,h,!1);break;case"textarea":Dt(i),Os(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ie(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?ot(i,!!h.multiple,b,!1):h.defaultValue!=null&&ot(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Gc)}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 _n(o),null;case 6:if(i&&o.stateNode!=null)QS(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=Bs(Au.current),Bs(Zr.current),td(o)){if(h=o.stateNode,c=o.memoizedProps,h[Jr]=o,(b=h.nodeValue!==c)&&(i=Qn,i!==null))switch(i.tag){case 3:Yc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Yc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Jr]=o,o.stateNode=h}return _n(o),null;case 13:if(It(Mt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Lt&&Jn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)eS(),Go(),o.flags|=98560,b=!1;else if(b=td(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Jr]=o}else Go(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;_n(o),b=!1}else Cr!==null&&(I0(Cr),Cr=null),b=!0;if(!b)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||(Mt.current&1)!==0?tn===0&&(tn=3):L0())),o.updateQueue!==null&&(o.flags|=4),_n(o),null);case 4:return Jo(),b0(i,o),i===null&&Tu(o.stateNode.containerInfo),_n(o),null;case 10:return Gm(o.type._context),_n(o),null;case 17:return jn(o.type)&&Kc(),_n(o),null;case 19:if(It(Mt),b=o.memoizedState,b===null)return _n(o),null;if(h=(o.flags&128)!==0,S=b.rendering,S===null)if(h)Iu(b,!1);else{if(tn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=ad(i),S!==null){for(o.flags|=128,Iu(b,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)b=c,i=h,b.flags&=14680066,S=b.alternate,S===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return At(Mt,Mt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Vt()>na&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304)}else{if(!h)if(i=ad(S),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),Iu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!Lt)return _n(o),null}else 2*Vt()-b.renderingStartTime>na&&c!==1073741824&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304);b.isBackwards?(S.sibling=o.child,o.child=S):(c=b.last,c!==null?c.sibling=S:o.child=S,b.last=S)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=Vt(),o.sibling=null,c=Mt.current,At(Mt,h?c&1|2:c&1),o):(_n(o),null);case 22:case 23:return R0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Zn&1073741824)!==0&&(_n(o),o.subtreeFlags&6&&(o.flags|=8192)):_n(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function WH(i,o){switch($m(o),o.tag){case 1:return jn(o.type)&&Kc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Jo(),It(Hn),It(wn),t0(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Zm(o),null;case 13:if(It(Mt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Go()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return It(Mt),null;case 4:return Jo(),null;case 10:return Gm(o.type._context),null;case 22:case 23:return R0(),null;case 24:return null;default:return null}}var gd=!1,Sn=!1,YH=typeof WeakSet=="function"?WeakSet:Set,Le=null;function ea(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Ht(i,o,h)}else c.current=null}function w0(i,o,c){try{c()}catch(h){Ht(i,o,h)}}var JS=!1;function GH(i,o){if(Rm=Mc,i=O_(),vm(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,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(Se){c=null;break e}var S=0,U=-1,z=-1,ie=0,ye=0,be=i,ge=null;t:for(;;){for(var Pe;be!==c||E!==0&&be.nodeType!==3||(U=S+E),be!==b||h!==0&&be.nodeType!==3||(z=S+h),be.nodeType===3&&(S+=be.nodeValue.length),(Pe=be.firstChild)!==null;)ge=be,be=Pe;for(;;){if(be===i)break t;if(ge===c&&++ie===E&&(U=S),ge===b&&++ye===h&&(z=S),(Pe=be.nextSibling)!==null)break;be=ge,ge=be.parentNode}be=Pe}c=U===-1||z===-1?null:{start:U,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Lm={focusedElem:i,selectionRange:c},Mc=!1,Le=o;Le!==null;)if(o=Le,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Le=i;else for(;Le!==null;){o=Le;try{var Me=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Me!==null){var Be=Me.memoizedProps,qt=Me.memoizedState,K=o.stateNode,Y=K.getSnapshotBeforeUpdate(o.elementType===o.type?Be:Nr(o.type,Be),qt);K.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:var te=o.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Se){Ht(o,o.return,Se)}if(i=o.sibling,i!==null){i.return=o.return,Le=i;break}Le=o.return}return Me=JS,JS=!1,Me}function Pu(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 b=E.destroy;E.destroy=void 0,b!==void 0&&w0(o,c,b)}E=E.next}while(E!==h)}}function Ed(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 x0(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 ZS(i){var o=i.alternate;o!==null&&(i.alternate=null,ZS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Jr],delete o[wu],delete o[Bm],delete o[OH],delete o[IH])),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 ev(i){return i.tag===5||i.tag===3||i.tag===4}function tv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||ev(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 _0(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=Gc));else if(h!==4&&(i=i.child,i!==null))for(_0(i,o,c),i=i.sibling;i!==null;)_0(i,o,c),i=i.sibling}function S0(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(S0(i,o,c),i=i.sibling;i!==null;)S0(i,o,c),i=i.sibling}var hn=null,kr=!1;function Wi(i,o,c){for(c=c.child;c!==null;)nv(i,o,c),c=c.sibling}function nv(i,o,c){if(Qr&&typeof Qr.onCommitFiberUnmount=="function")try{Qr.onCommitFiberUnmount(Oc,c)}catch(U){}switch(c.tag){case 5:Sn||ea(c,o);case 6:var h=hn,E=kr;hn=null,Wi(i,o,c),hn=h,kr=E,hn!==null&&(kr?(i=hn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):hn.removeChild(c.stateNode));break;case 18:hn!==null&&(kr?(i=hn,c=c.stateNode,i.nodeType===8?Fm(i.parentNode,c):i.nodeType===1&&Fm(i,c),cu(i)):Fm(hn,c.stateNode));break;case 4:h=hn,E=kr,hn=c.stateNode.containerInfo,kr=!0,Wi(i,o,c),hn=h,kr=E;break;case 0:case 11:case 14:case 15:if(!Sn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&w0(c,o,S),E=E.next}while(E!==h)}Wi(i,o,c);break;case 1:if(!Sn&&(ea(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(U){Ht(c,o,U)}Wi(i,o,c);break;case 21:Wi(i,o,c);break;case 22:c.mode&1?(Sn=(h=Sn)||c.memoizedState!==null,Wi(i,o,c),Sn=h):Wi(i,o,c);break;default:Wi(i,o,c)}}function rv(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new YH),o.forEach(function(h){var E=rj.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function Or(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,S=o,U=S;e:for(;U!==null;){switch(U.tag){case 5:hn=U.stateNode,kr=!1;break e;case 3:hn=U.stateNode.containerInfo,kr=!0;break e;case 4:hn=U.stateNode.containerInfo,kr=!0;break e}U=U.return}if(hn===null)throw Error(n(160));nv(b,S,E),hn=null,kr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(ie){Ht(E,o,ie)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)iv(o,i),o=o.sibling}function iv(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Or(o,i),ti(i),h&4){try{Pu(3,i,i.return),Ed(3,i)}catch(Be){Ht(i,i.return,Be)}try{Pu(5,i,i.return)}catch(Be){Ht(i,i.return,Be)}}break;case 1:Or(o,i),ti(i),h&512&&c!==null&&ea(c,c.return);break;case 5:if(Or(o,i),ti(i),h&512&&c!==null&&ea(c,c.return),i.flags&32){var E=i.stateNode;try{it(E,"")}catch(Be){Ht(i,i.return,Be)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=c!==null?c.memoizedProps:b,U=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{U==="input"&&b.type==="radio"&&b.name!=null&&$e(E,b),or(U,S);var ie=or(U,b);for(S=0;S<z.length;S+=2){var ye=z[S],be=z[S+1];ye==="style"?ir(E,be):ye==="dangerouslySetInnerHTML"?et(E,be):ye==="children"?it(E,be):I(E,ye,be,ie)}switch(U){case"input":bt(E,b);break;case"textarea":ks(E,b);break;case"select":var ge=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Pe=b.value;Pe!=null?ot(E,!!b.multiple,Pe,!1):ge!==!!b.multiple&&(b.defaultValue!=null?ot(E,!!b.multiple,b.defaultValue,!0):ot(E,!!b.multiple,b.multiple?[]:"",!1))}E[wu]=b}catch(Be){Ht(i,i.return,Be)}}break;case 6:if(Or(o,i),ti(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Be){Ht(i,i.return,Be)}}break;case 3:if(Or(o,i),ti(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{cu(o.containerInfo)}catch(Be){Ht(i,i.return,Be)}break;case 4:Or(o,i),ti(i);break;case 13:Or(o,i),ti(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(C0=Vt())),h&4&&rv(i);break;case 22:if(ye=c!==null&&c.memoizedState!==null,i.mode&1?(Sn=(ie=Sn)||ye,Or(o,i),Sn=ie):Or(o,i),ti(i),h&8192){if(ie=i.memoizedState!==null,(i.stateNode.isHidden=ie)&&!ye&&(i.mode&1)!==0)for(Le=i,ye=i.child;ye!==null;){for(be=Le=ye;Le!==null;){switch(ge=Le,Pe=ge.child,ge.tag){case 0:case 11:case 14:case 15:Pu(4,ge,ge.return);break;case 1:ea(ge,ge.return);var Me=ge.stateNode;if(typeof Me.componentWillUnmount=="function"){h=ge,c=ge.return;try{o=h,Me.props=o.memoizedProps,Me.state=o.memoizedState,Me.componentWillUnmount()}catch(Be){Ht(h,c,Be)}}break;case 5:ea(ge,ge.return);break;case 22:if(ge.memoizedState!==null){av(be);continue}}Pe!==null?(Pe.return=ge,Le=Pe):av(be)}ye=ye.sibling}e:for(ye=null,be=i;;){if(be.tag===5){if(ye===null){ye=be;try{E=be.stateNode,ie?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(U=be.stateNode,z=be.memoizedProps.style,S=z!=null&&z.hasOwnProperty("display")?z.display:null,U.style.display=Nn("display",S))}catch(Be){Ht(i,i.return,Be)}}}else if(be.tag===6){if(ye===null)try{be.stateNode.nodeValue=ie?"":be.memoizedProps}catch(Be){Ht(i,i.return,Be)}}else if((be.tag!==22&&be.tag!==23||be.memoizedState===null||be===i)&&be.child!==null){be.child.return=be,be=be.child;continue}if(be===i)break e;for(;be.sibling===null;){if(be.return===null||be.return===i)break e;ye===be&&(ye=null),be=be.return}ye===be&&(ye=null),be.sibling.return=be.return,be=be.sibling}}break;case 19:Or(o,i),ti(i),h&4&&rv(i);break;case 21:break;default:Or(o,i),ti(i)}}function ti(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(ev(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&&(it(E,""),h.flags&=-33);var b=tv(i);S0(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,U=tv(i);_0(i,U,S);break;default:throw Error(n(161))}}catch(z){Ht(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function XH(i,o,c){Le=i,sv(i)}function sv(i,o,c){for(var h=(i.mode&1)!==0;Le!==null;){var E=Le,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||gd;if(!S){var U=E.alternate,z=U!==null&&U.memoizedState!==null||Sn;U=gd;var ie=Sn;if(gd=S,(Sn=z)&&!ie)for(Le=E;Le!==null;)S=Le,z=S.child,S.tag===22&&S.memoizedState!==null?uv(E):z!==null?(z.return=S,Le=z):uv(E);for(;b!==null;)Le=b,sv(b),b=b.sibling;Le=E,gd=U,Sn=ie}ov(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Le=b):ov(i)}}function ov(i){for(;Le!==null;){var o=Le;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Sn||Ed(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!Sn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:Nr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&aS(o,b,h);break;case 3:var S=o.updateQueue;if(S!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}aS(o,S,c)}break;case 5:var U=o.stateNode;if(c===null&&o.flags&4){c=U;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ie=o.alternate;if(ie!==null){var ye=ie.memoizedState;if(ye!==null){var be=ye.dehydrated;be!==null&&cu(be)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Sn||o.flags&512&&x0(o)}catch(ge){Ht(o,o.return,ge)}}if(o===i){Le=null;break}if(c=o.sibling,c!==null){c.return=o.return,Le=c;break}Le=o.return}}function av(i){for(;Le!==null;){var o=Le;if(o===i){Le=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Le=c;break}Le=o.return}}function uv(i){for(;Le!==null;){var o=Le;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Ed(4,o)}catch(z){Ht(o,c,z)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(z){Ht(o,E,z)}}var b=o.return;try{x0(o)}catch(z){Ht(o,b,z)}break;case 5:var S=o.return;try{x0(o)}catch(z){Ht(o,S,z)}}}catch(z){Ht(o,o.return,z)}if(o===i){Le=null;break}var U=o.sibling;if(U!==null){U.return=o.return,Le=U;break}Le=o.return}}var KH=Math.ceil,yd=j.ReactCurrentDispatcher,v0=j.ReactCurrentOwner,fr=j.ReactCurrentBatchConfig,ct=0,un=null,Qt=null,pn=0,Zn=0,ta=ji(0),tn=0,Ru=null,Hs=0,Td=0,A0=0,Lu=null,zn=null,C0=0,na=1/0,Ei=null,bd=!1,N0=null,Yi=null,wd=!1,Gi=null,xd=0,Du=0,k0=null,_d=-1,Sd=0;function On(){return(ct&6)!==0?Vt():_d!==-1?_d:_d=Vt()}function Xi(i){return(i.mode&1)===0?1:(ct&2)!==0&&pn!==0?pn&-pn:RH.transition!==null?(Sd===0&&(Sd=t_()),Sd):(i=yt,i!==0||(i=window.event,i=i===void 0?16:c_(i.type)),i)}function Ir(i,o,c,h){if(50<Du)throw Du=0,k0=null,Error(n(185));su(i,c,h),((ct&2)===0||i!==un)&&(i===un&&((ct&2)===0&&(Td|=c),tn===4&&Ki(i,pn)),Vn(i,h),c===1&&ct===0&&(o.mode&1)===0&&(na=Vt()+500,Jc&&zi()))}function Vn(i,o){var c=i.callbackNode;RU(i,o);var h=Rc(i,i===un?pn:0);if(h===0)c!==null&&Jx(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&Jx(c),o===1)i.tag===0?PH(cv.bind(null,i)):X_(cv.bind(null,i)),NH(function(){(ct&6)===0&&zi()}),c=null;else{switch(n_(h)){case 1:c=um;break;case 4:c=Zx;break;case 16:c=kc;break;case 536870912:c=e_;break;default:c=kc}c=yv(c,lv.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function lv(i,o){if(_d=-1,Sd=0,(ct&6)!==0)throw Error(n(327));var c=i.callbackNode;if(ra()&&i.callbackNode!==c)return null;var h=Rc(i,i===un?pn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=vd(i,h);else{o=h;var E=ct;ct|=2;var b=fv();(un!==i||pn!==o)&&(Ei=null,na=Vt()+500,$s(i,o));do try{ZH();break}catch(U){dv(i,U)}while(!0);Ym(),yd.current=b,ct=E,Qt!==null?o=0:(un=null,pn=0,o=tn)}if(o!==0){if(o===2&&(E=lm(i),E!==0&&(h=E,o=O0(i,E))),o===1)throw c=Ru,$s(i,0),Ki(i,h),Vn(i,Vt()),c;if(o===6)Ki(i,h);else{if(E=i.current.alternate,(h&30)===0&&!QH(E)&&(o=vd(i,h),o===2&&(b=lm(i),b!==0&&(h=b,o=O0(i,b))),o===1))throw c=Ru,$s(i,0),Ki(i,h),Vn(i,Vt()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:zs(i,zn,Ei);break;case 3:if(Ki(i,h),(h&130023424)===h&&(o=C0+500-Vt(),10<o)){if(Rc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){On(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Mm(zs.bind(null,i,zn,Ei),o);break}zs(i,zn,Ei);break;case 4:if(Ki(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-vr(h);b=1<<S,S=o[S],S>E&&(E=S),h&=~b}if(h=E,h=Vt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*KH(h/1960))-h,10<h){i.timeoutHandle=Mm(zs.bind(null,i,zn,Ei),h);break}zs(i,zn,Ei);break;case 5:zs(i,zn,Ei);break;default:throw Error(n(329))}}}return Vn(i,Vt()),i.callbackNode===c?lv.bind(null,i):null}function O0(i,o){var c=Lu;return i.current.memoizedState.isDehydrated&&($s(i,o).flags|=256),i=vd(i,o),i!==2&&(o=zn,zn=c,o!==null&&I0(o)),i}function I0(i){zn===null?zn=i:zn.push.apply(zn,i)}function QH(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],b=E.getSnapshot;E=E.value;try{if(!Ar(b(),E))return!1}catch(S){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 Ki(i,o){for(o&=~A0,o&=~Td,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-vr(o),h=1<<c;i[c]=-1,o&=~h}}function cv(i){if((ct&6)!==0)throw Error(n(327));ra();var o=Rc(i,0);if((o&1)===0)return Vn(i,Vt()),null;var c=vd(i,o);if(i.tag!==0&&c===2){var h=lm(i);h!==0&&(o=h,c=O0(i,h))}if(c===1)throw c=Ru,$s(i,0),Ki(i,o),Vn(i,Vt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,zs(i,zn,Ei),Vn(i,Vt()),null}function P0(i,o){var c=ct;ct|=1;try{return i(o)}finally{ct=c,ct===0&&(na=Vt()+500,Jc&&zi())}}function js(i){Gi!==null&&Gi.tag===0&&(ct&6)===0&&ra();var o=ct;ct|=1;var c=fr.transition,h=yt;try{if(fr.transition=null,yt=1,i)return i()}finally{yt=h,fr.transition=c,ct=o,(ct&6)===0&&zi()}}function R0(){Zn=ta.current,It(ta)}function $s(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,CH(c)),Qt!==null)for(c=Qt.return;c!==null;){var h=c;switch($m(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Kc();break;case 3:Jo(),It(Hn),It(wn),t0();break;case 5:Zm(h);break;case 4:Jo();break;case 13:It(Mt);break;case 19:It(Mt);break;case 10:Gm(h.type._context);break;case 22:case 23:R0()}c=c.return}if(un=i,Qt=i=Qi(i.current,null),pn=Zn=o,tn=0,Ru=null,A0=Td=Hs=0,zn=Lu=null,Fs!==null){for(o=0;o<Fs.length;o++)if(c=Fs[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}c.pending=h}Fs=null}return i}function dv(i,o){do{var c=Qt;try{if(Ym(),ud.current=fd,ld){for(var h=Ft.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}ld=!1}if(Us=0,an=en=Ft=null,Cu=!1,Nu=0,v0.current=null,c===null||c.return===null){tn=1,Ru=o,Qt=null;break}e:{var b=i,S=c.return,U=c,z=o;if(o=pn,U.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var ie=z,ye=U,be=ye.tag;if((ye.mode&1)===0&&(be===0||be===11||be===15)){var ge=ye.alternate;ge?(ye.updateQueue=ge.updateQueue,ye.memoizedState=ge.memoizedState,ye.lanes=ge.lanes):(ye.updateQueue=null,ye.memoizedState=null)}var Pe=MS(S);if(Pe!==null){Pe.flags&=-257,FS(Pe,S,U,b,o),Pe.mode&1&&DS(b,ie,o),o=Pe,z=ie;var Me=o.updateQueue;if(Me===null){var Be=new Set;Be.add(z),o.updateQueue=Be}else Me.add(z);break e}else{if((o&1)===0){DS(b,ie,o),L0();break e}z=Error(n(426))}}else if(Lt&&U.mode&1){var qt=MS(S);if(qt!==null){(qt.flags&65536)===0&&(qt.flags|=256),FS(qt,S,U,b,o),qm(Zo(z,U));break e}}b=z=Zo(z,U),tn!==4&&(tn=2),Lu===null?Lu=[b]:Lu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var K=RS(b,z,o);oS(b,K);break e;case 1:U=z;var Y=b.type,te=b.stateNode;if((b.flags&128)===0&&(typeof Y.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Yi===null||!Yi.has(te)))){b.flags|=65536,o&=-o,b.lanes|=o;var Se=LS(b,U,o);oS(b,Se);break e}}b=b.return}while(b!==null)}pv(c)}catch(He){o=He,Qt===c&&c!==null&&(Qt=c=c.return);continue}break}while(!0)}function fv(){var i=yd.current;return yd.current=fd,i===null?fd:i}function L0(){(tn===0||tn===3||tn===2)&&(tn=4),un===null||(Hs&268435455)===0&&(Td&268435455)===0||Ki(un,pn)}function vd(i,o){var c=ct;ct|=2;var h=fv();(un!==i||pn!==o)&&(Ei=null,$s(i,o));do try{JH();break}catch(E){dv(i,E)}while(!0);if(Ym(),ct=c,yd.current=h,Qt!==null)throw Error(n(261));return un=null,pn=0,tn}function JH(){for(;Qt!==null;)hv(Qt)}function ZH(){for(;Qt!==null&&!SU();)hv(Qt)}function hv(i){var o=Ev(i.alternate,i,Zn);i.memoizedProps=i.pendingProps,o===null?pv(i):Qt=o,v0.current=null}function pv(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=qH(c,o,Zn),c!==null){Qt=c;return}}else{if(c=WH(c,o),c!==null){c.flags&=32767,Qt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{tn=6,Qt=null;return}}if(o=o.sibling,o!==null){Qt=o;return}Qt=o=i}while(o!==null);tn===0&&(tn=5)}function zs(i,o,c){var h=yt,E=fr.transition;try{fr.transition=null,yt=1,ej(i,o,c,h)}finally{fr.transition=E,yt=h}return null}function ej(i,o,c,h){do ra();while(Gi!==null);if((ct&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 b=c.lanes|c.childLanes;if(LU(i,b),i===un&&(Qt=un=null,pn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||wd||(wd=!0,yv(kc,function(){return ra(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=fr.transition,fr.transition=null;var S=yt;yt=1;var U=ct;ct|=4,v0.current=null,GH(i,c),iv(c,i),bH(Lm),Mc=!!Rm,Lm=Rm=null,i.current=c,XH(c),vU(),ct=U,yt=S,fr.transition=b}else i.current=c;if(wd&&(wd=!1,Gi=i,xd=E),b=i.pendingLanes,b===0&&(Yi=null),NU(c.stateNode),Vn(i,Vt()),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(bd)throw bd=!1,i=N0,N0=null,i;return(xd&1)!==0&&i.tag!==0&&ra(),b=i.pendingLanes,(b&1)!==0?i===k0?Du++:(Du=0,k0=i):Du=0,zi(),null}function ra(){if(Gi!==null){var i=n_(xd),o=fr.transition,c=yt;try{if(fr.transition=null,yt=16>i?16:i,Gi===null)var h=!1;else{if(i=Gi,Gi=null,xd=0,(ct&6)!==0)throw Error(n(331));var E=ct;for(ct|=4,Le=i.current;Le!==null;){var b=Le,S=b.child;if((Le.flags&16)!==0){var U=b.deletions;if(U!==null){for(var z=0;z<U.length;z++){var ie=U[z];for(Le=ie;Le!==null;){var ye=Le;switch(ye.tag){case 0:case 11:case 15:Pu(8,ye,b)}var be=ye.child;if(be!==null)be.return=ye,Le=be;else for(;Le!==null;){ye=Le;var ge=ye.sibling,Pe=ye.return;if(ZS(ye),ye===ie){Le=null;break}if(ge!==null){ge.return=Pe,Le=ge;break}Le=Pe}}}var Me=b.alternate;if(Me!==null){var Be=Me.child;if(Be!==null){Me.child=null;do{var qt=Be.sibling;Be.sibling=null,Be=qt}while(Be!==null)}}Le=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,Le=S;else e:for(;Le!==null;){if(b=Le,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Pu(9,b,b.return)}var K=b.sibling;if(K!==null){K.return=b.return,Le=K;break e}Le=b.return}}var Y=i.current;for(Le=Y;Le!==null;){S=Le;var te=S.child;if((S.subtreeFlags&2064)!==0&&te!==null)te.return=S,Le=te;else e:for(S=Y;Le!==null;){if(U=Le,(U.flags&2048)!==0)try{switch(U.tag){case 0:case 11:case 15:Ed(9,U)}}catch(He){Ht(U,U.return,He)}if(U===S){Le=null;break e}var Se=U.sibling;if(Se!==null){Se.return=U.return,Le=Se;break e}Le=U.return}}if(ct=E,zi(),Qr&&typeof Qr.onPostCommitFiberRoot=="function")try{Qr.onPostCommitFiberRoot(Oc,i)}catch(He){}h=!0}return h}finally{yt=c,fr.transition=o}}return!1}function mv(i,o,c){o=Zo(c,o),o=RS(i,o,1),i=qi(i,o,1),o=On(),i!==null&&(su(i,1,o),Vn(i,o))}function Ht(i,o,c){if(i.tag===3)mv(i,i,c);else for(;o!==null;){if(o.tag===3){mv(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Yi===null||!Yi.has(h))){i=Zo(c,i),i=LS(o,i,1),o=qi(o,i,1),i=On(),o!==null&&(su(o,1,i),Vn(o,i));break}}o=o.return}}function tj(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=On(),i.pingedLanes|=i.suspendedLanes&c,un===i&&(pn&c)===c&&(tn===4||tn===3&&(pn&130023424)===pn&&500>Vt()-C0?$s(i,0):A0|=c),Vn(i,o)}function gv(i,o){o===0&&((i.mode&1)===0?o=1:(o=Pc,Pc<<=1,(Pc&130023424)===0&&(Pc=4194304)));var c=On();i=pi(i,o),i!==null&&(su(i,o,c),Vn(i,c))}function nj(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),gv(i,c)}function rj(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),gv(i,c)}var Ev;Ev=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Hn.current)$n=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return $n=!1,VH(i,o,c);$n=(i.flags&131072)!==0}else $n=!1,Lt&&(o.flags&1048576)!==0&&K_(o,ed,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;md(i,o),i=o.pendingProps;var E=qo(o,wn.current);Qo(o,c),E=i0(null,o,h,i,E,c);var b=s0();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,jn(h)?(b=!0,Qc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Qm(o),E.updater=hd,o.stateNode=E,E._reactInternals=o,d0(o,h,i,c),o=m0(null,o,h,!0,b,c)):(o.tag=0,Lt&&b&&jm(o),kn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(md(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=sj(h),i=Nr(h,i),E){case 0:o=p0(null,o,h,i,c);break e;case 1:o=zS(null,o,h,i,c);break e;case 11:o=BS(null,o,h,i,c);break e;case 14:o=US(null,o,h,Nr(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:Nr(h,E),p0(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Nr(h,E),zS(i,o,h,E,c);case 3:e:{if(VS(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,sS(i,o),od(o,h,null,c);var S=o.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Zo(Error(n(423)),o),o=qS(i,o,h,c,E);break e}else if(h!==E){E=Zo(Error(n(424)),o),o=qS(i,o,h,c,E);break e}else for(Jn=Hi(o.stateNode.containerInfo.firstChild),Qn=o,Lt=!0,Cr=null,c=rS(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Go(),h===E){o=gi(i,o,c);break e}kn(i,o,h,c)}o=o.child}return o;case 5:return uS(o),i===null&&Vm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,Dm(h,E)?S=null:b!==null&&Dm(h,b)&&(o.flags|=32),$S(i,o),kn(i,o,S,c),o.child;case 6:return i===null&&Vm(o),null;case 13:return WS(i,o,c);case 4:return Jm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Xo(o,null,h,c):kn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Nr(h,E),BS(i,o,h,E,c);case 7:return kn(i,o,o.pendingProps,c),o.child;case 8:return kn(i,o,o.pendingProps.children,c),o.child;case 12:return kn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,S=E.value,At(rd,h._currentValue),h._currentValue=S,b!==null)if(Ar(b.value,S)){if(b.children===E.children&&!Hn.current){o=gi(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var U=b.dependencies;if(U!==null){S=b.child;for(var z=U.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=mi(-1,c&-c),z.tag=2;var ie=b.updateQueue;if(ie!==null){ie=ie.shared;var ye=ie.pending;ye===null?z.next=z:(z.next=ye.next,ye.next=z),ie.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),Xm(b.return,c,o),U.lanes|=c;break}z=z.next}}else if(b.tag===10)S=b.type===o.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=c,U=S.alternate,U!==null&&(U.lanes|=c),Xm(S,c,o),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===o){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}kn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Qo(o,c),E=cr(E),h=h(E),o.flags|=1,kn(i,o,h,c),o.child;case 14:return h=o.type,E=Nr(h,o.pendingProps),E=Nr(h.type,E),US(i,o,h,E,c);case 15:return HS(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Nr(h,E),md(i,o),o.tag=1,jn(h)?(i=!0,Qc(o)):i=!1,Qo(o,c),IS(o,h,E),d0(o,h,E,c),m0(null,o,h,!0,i,c);case 19:return GS(i,o,c);case 22:return jS(i,o,c)}throw Error(n(156,o.tag))};function yv(i,o){return Qx(i,o)}function ij(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 hr(i,o,c,h){return new ij(i,o,c,h)}function D0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function sj(i){if(typeof i=="function")return D0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===V)return 11;if(i===oe)return 14}return 2}function Qi(i,o){var c=i.alternate;return c===null?(c=hr(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 Ad(i,o,c,h,E,b){var S=2;if(h=i,typeof i=="function")D0(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case X:return Vs(c.children,E,b,o);case ne:S=8,E|=8;break;case se:return i=hr(12,c,o,E|2),i.elementType=se,i.lanes=b,i;case ee:return i=hr(13,c,o,E),i.elementType=ee,i.lanes=b,i;case ae:return i=hr(19,c,o,E),i.elementType=ae,i.lanes=b,i;case de:return Cd(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:S=10;break e;case re:S=9;break e;case V:S=11;break e;case oe:S=14;break e;case me:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=hr(S,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function Vs(i,o,c,h){return i=hr(7,i,h,o),i.lanes=c,i}function Cd(i,o,c,h){return i=hr(22,i,h,o),i.elementType=de,i.lanes=c,i.stateNode={isHidden:!1},i}function M0(i,o,c){return i=hr(6,i,null,o),i.lanes=c,i}function F0(i,o,c){return o=hr(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function oj(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=cm(0),this.expirationTimes=cm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cm(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function B0(i,o,c,h,E,b,S,U,z){return i=new oj(i,o,c,U,z),o===1?(o=1,b===!0&&(o|=8)):o=0,b=hr(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qm(b),i}function aj(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function Tv(i){if(!i)return $i;i=i._reactInternals;e:{if(Ps(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(jn(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(jn(c))return Y_(i,c,o)}return o}function bv(i,o,c,h,E,b,S,U,z){return i=B0(c,h,!0,i,E,b,S,U,z),i.context=Tv(null),c=i.current,h=On(),E=Xi(c),b=mi(h,E),b.callback=o!=null?o:null,qi(c,b,E),i.current.lanes=E,su(i,E,h),Vn(i,h),i}function Nd(i,o,c,h){var E=o.current,b=On(),S=Xi(E);return c=Tv(c),o.context===null?o.context=c:o.pendingContext=c,o=mi(b,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=qi(E,o,S),i!==null&&(Ir(i,E,S,b),sd(i,E,S)),S}function kd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function wv(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function U0(i,o){wv(i,o),(i=i.alternate)&&wv(i,o)}function uj(){return null}var xv=typeof reportError=="function"?reportError:function(i){console.error(i)};function H0(i){this._internalRoot=i}Od.prototype.render=H0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));Nd(i,o,null,null)},Od.prototype.unmount=H0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;js(function(){Nd(null,i,null,null)}),o[ci]=null}};function Od(i){this._internalRoot=i}Od.prototype.unstable_scheduleHydration=function(i){if(i){var o=s_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Fi.length&&o!==0&&o<Fi[c].priority;c++);Fi.splice(c,0,i),c===0&&u_(i)}};function j0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Id(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function _v(){}function lj(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ie=kd(S);b.call(ie)}}var S=bv(o,h,i,0,null,!1,!1,"",_v);return i._reactRootContainer=S,i[ci]=S.current,Tu(i.nodeType===8?i.parentNode:i),js(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var U=h;h=function(){var ie=kd(z);U.call(ie)}}var z=B0(i,0,!1,null,null,!1,!1,"",_v);return i._reactRootContainer=z,i[ci]=z.current,Tu(i.nodeType===8?i.parentNode:i),js(function(){Nd(o,z,c,h)}),z}function Pd(i,o,c,h,E){var b=c._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var U=E;E=function(){var z=kd(S);U.call(z)}}Nd(o,S,i,E)}else S=lj(c,o,i,E,h);return kd(S)}r_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=iu(o.pendingLanes);c!==0&&(dm(o,c|1),Vn(o,Vt()),(ct&6)===0&&(na=Vt()+500,zi()))}break;case 13:js(function(){var h=pi(i,1);if(h!==null){var E=On();Ir(h,i,1,E)}}),U0(i,1)}},fm=function(i){if(i.tag===13){var o=pi(i,134217728);if(o!==null){var c=On();Ir(o,i,134217728,c)}U0(i,134217728)}},i_=function(i){if(i.tag===13){var o=Xi(i),c=pi(i,o);if(c!==null){var h=On();Ir(c,i,o,h)}U0(i,o)}},s_=function(){return yt},o_=function(i,o){var c=yt;try{return yt=i,o()}finally{yt=c}},Ce=function(i,o,c){switch(o){case"input":if(bt(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=Xc(h);if(!E)throw Error(n(90));ft(h),bt(h,E)}}}break;case"textarea":ks(i,c);break;case"select":o=c.value,o!=null&&ot(i,!!c.multiple,o,!1)}},wt=P0,fn=js;var cj={usingClientEntryPoint:!1,Events:[xu,zo,Xc,je,Kt,P0]},Mu={findFiberByHostInstance:Rs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dj={bundleType:Mu.bundleType,version:Mu.version,rendererPackageName:Mu.rendererPackageName,rendererConfig:Mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Xx(i),i===null?null:i.stateNode},findFiberByHostInstance:Mu.findFiberByHostInstance||uj,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 Rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rd.isDisabled&&Rd.supportsFiber)try{Oc=Rd.inject(dj),Qr=Rd}catch(i){}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cj,Rn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!j0(o))throw Error(n(200));return aj(i,o,null,c)},Rn.createRoot=function(i,o){if(!j0(i))throw Error(n(299));var c=!1,h="",E=xv;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=B0(i,1,!1,null,null,c,!1,h,E),i[ci]=o.current,Tu(i.nodeType===8?i.parentNode:i),new H0(o)},Rn.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=Xx(o),i=i===null?null:i.stateNode,i},Rn.flushSync=function(i){return js(i)},Rn.hydrate=function(i,o,c){if(!Id(o))throw Error(n(200));return Pd(null,i,o,!0,c)},Rn.hydrateRoot=function(i,o,c){if(!j0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",S=xv;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),o=bv(o,null,i,1,c!=null?c:null,E,!1,b,S),i[ci]=o.current,Tu(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 Od(o)},Rn.render=function(i,o,c){if(!Id(o))throw Error(n(200));return Pd(null,i,o,!1,c)},Rn.unmountComponentAtNode=function(i){if(!Id(i))throw Error(n(40));return i._reactRootContainer?(js(function(){Pd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},Rn.unstable_batchedUpdates=P0,Rn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!Id(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Pd(i,o,c,!1,h)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var rE;function iE(){if(rE)return Vf.exports;rE=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(),Vf.exports=Uk(),Vf.exports}var io=iE();function sE(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=sE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function M(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=sE(e))&&(r&&(r+=" "),r+=t);return r}const Hk=()=>document.querySelector(`input[name="${O}-user-input"]:not(:disabled)`),Yf=()=>{var e;return(e=Hk())!=null?e:document.querySelector(`.${O}-dialog-content, .${O}-modal-content`)},jk=()=>{var e;return(e=Yf())==null?void 0:e.focus({preventScroll:!0})},Gf=()=>{const e=()=>{const n=document.querySelector(`.${O}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var oE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},aE=es.createContext&&es.createContext(oE),$k=["attr","size","title"];function zk(e,t){if(e==null)return{};var n=Vk(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 Vk(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 Tl(){return Tl=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},Tl.apply(this,arguments)}function uE(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 bl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uE(Object(n),!0).forEach(function(r){qk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qk(e,t,n){return t=Wk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wk(e){var t=Yk(e,"string");return typeof t=="symbol"?t:t+""}function Yk(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 lE(e){return e&&e.map((t,n)=>es.createElement(t.tag,bl({key:n},t.attr),lE(t.child)))}function dt(e){return t=>es.createElement(Gk,Tl({attr:bl({},e.attr)},t),lE(e.child))}function Gk(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=zk(e,$k),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),es.createElement("svg",Tl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:bl(bl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&es.createElement("title",null,a),e.children)};return aE!==void 0?es.createElement(aE.Consumer,null,n=>t(n)):t(oE)}function Xk(e){return dt({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 Kk(e){return dt({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 Qk(e){return dt({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 yr=({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:M(e,`${O}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:M(`${O}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),Jk="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",Zk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:s}=lt(),a=s==="messaging",l=r||(a?"Open Commerce Client":"Open Copilot"),d=a?w.jsx(Qk,{className:M(t,`${O}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||Jk,alt:"Copilot",className:M(t,`${O}-minimized-icon-img`)});return w.jsx(yr,{className:M(t,`${O}-minimized-button`),ariaLabel:l,title:l,icon:d,onClick:e})},e3=()=>{const{globalClassName:e,themeVariables:t}=lt(),n=()=>{Xs(!1),ni(!0),setTimeout(jk)};return io.createPortal(w.jsx("div",{className:M(e,`${O}-minimized-container`),style:t,children:w.jsx(Zk,{onClick:n})}),document.body)};function t3(e){return dt({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 cE(e){return dt({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 n3(e){return dt({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 Xf(e){return dt({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 r3(e){return dt({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 i3(e){return dt({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 s3(e){return dt({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 dE(e){return dt({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 fE(e){return dt({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 o3(e){return dt({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 a3(e){return dt({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 u3(e){return dt({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 l3(e){return dt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function c3(e){return dt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18 20H4V6h9V4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2v9zm-7.79-3.17-1.96-2.36L5.5 18h11l-3.54-4.71zM20 4V1h-2v3h-3c.01.01 0 2 0 2h3v2.99c.01.01 2 0 2 0V6h3V4h-3z"},child:[]}]})(e)}function d3(e){return dt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}function hE(e){return dt({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)}function $t(){const e=N.useContext(b1);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const f3=e=>({[`${qn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${qn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${qn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${qn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${qn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${qn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),h3=(e,t,n)=>e.size>n?{ok:!1,reason:"oversize"}:t.includes(e.type)?{ok:!0}:{ok:!1,reason:"type"},p3=({allowedMime:e=_g,maxBytes:t=of,onReject:n}={})=>{const[r,s]=N.useState(null),a=N.useCallback(l=>{const d=l&&"length"in l?l[0]:null;if(!d)return;const f=h3(d,e,t);if(!f.ok){n==null||n(f.reason);return}s(d)},[e,t,n]),u=N.useCallback(()=>s(null),[]);return{file:r,attach:a,clear:u}},pE=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:M(e,`${O}-close-button`),disabled:r,onClick:n,type:"button",children:w.jsx("svg",{"aria-hidden":"true",focusable:"false",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"})})}),m3=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const s=e.name||"",[a,u]=N.useState("");return N.useEffect(()=>{const l=URL.createObjectURL(e);return u(l),()=>URL.revokeObjectURL(l)},[e]),w.jsxs("div",{className:M(n,`cim-${t}-component`,`${O}-image-file-preview`),children:[w.jsx("img",{className:M(n,`cim-${t}-component`,`${O}-image-preview`),src:a,alt:`${s} preview`,loading:"lazy"}),w.jsx("span",{className:M(n,`cim-${t}-component`,`${O}-image-file-name`),title:s,children:s}),w.jsx(pE,{className:M(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})},g3=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:s,className:a,icon:u=w.jsx(d3,{}),onFiles:l})=>{const d=N.useRef(null),f=N.useId(),p=r!=null?r:f,m=N.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=N.useCallback(y=>{const _=y.target;l(_.files),_.value=""},[l]);return w.jsxs("button",{type:"button",className:M(s,a,`cim-${e}-component`,n&&"disabled",`${O}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[w.jsx("span",{className:M(s,a,`cim-${e}-component`,n&&"disabled",`${O}-image-upload-label`),"aria-hidden":"true",children:u}),w.jsx("input",{ref:d,className:M(s,a,`cim-${e}-component`,`${O}-file-input`),type:"file",id:p,accept:t,name:`${O}-file-input`,disabled:n,onInput:T})]})},Kf=({className:e,children:t,type:n,disabled:r=!1,onClick:s,"aria-label":a})=>w.jsx("button",{"aria-label":a,className:M(`${O}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),E3=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:M(`${O}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Xf,{size:"16px"})},y3=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(yr,{className:M(e,n,`cim-${r}-component`,`${O}-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(Xf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(Kf,{className:M(e,n,`cim-${r}-component`,`${O}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(E3,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function jj(){}function $j(){}function mE(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 gE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const T3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w3={};function EE(e,t){return(w3.jsx?b3:T3).test(e)}const x3=/[ \t\n\f\r]/g;function _3(e){return typeof e=="object"?e.type==="text"?yE(e.value):!1:yE(e)}function yE(e){return e.replace(x3,"")===""}class Ta{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ta.prototype.normal={},Ta.prototype.property={},Ta.prototype.space=void 0;function TE(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ta(n,r,t)}function ba(e){return e.toLowerCase()}class Ln{constructor(t,n){this.attribute=n,this.property=t}}Ln.prototype.attribute="",Ln.prototype.booleanish=!1,Ln.prototype.boolean=!1,Ln.prototype.commaOrSpaceSeparated=!1,Ln.prototype.commaSeparated=!1,Ln.prototype.defined=!1,Ln.prototype.mustUseProperty=!1,Ln.prototype.number=!1,Ln.prototype.overloadedBoolean=!1,Ln.prototype.property="",Ln.prototype.spaceSeparated=!1,Ln.prototype.space=void 0;let S3=0;const Je=cs(),Yt=cs(),Qf=cs(),we=cs(),xt=cs(),ls=cs(),Yn=cs();function cs(){return Dd(2,++S3)}const Jf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:Yt,commaOrSpaceSeparated:Yn,commaSeparated:ls,number:we,overloadedBoolean:Qf,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),Zf=Object.keys(Jf);class eh extends Ln{constructor(t,n,r,s){let a=-1;if(super(t,n),bE(this,"space",s),typeof r=="number")for(;++a<Zf.length;){const u=Zf[a];bE(this,Zf[a],(r&Jf[u])===Jf[u])}}}eh.prototype.defined=!0;function bE(e,t,n){n&&(e[t]=n)}function so(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new eh(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ba(r)]=r,n[ba(a.attribute)]=r}return new Ta(t,n,e.space)}const wE=so({properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:xt,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:we,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:xt,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:Yt,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function xE(e,t){return t in e?e[t]:t}function _E(e,t){return xE(e,t.toLowerCase())}const v3=so({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ls,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alpha:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:xt,autoFocus:Je,autoPlay:Je,blocking:xt,capture:null,charSet:null,checked:Je,cite:null,className:xt,closedBy:null,colorSpace:null,cols:we,colSpan:we,command:null,commandFor:null,content:null,contentEditable:Yt,controls:Je,controlsList:xt,coords:we|ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:Qf,draggable:Yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:xt,height:we,hidden:Qf,high:we,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:xt,itemRef:xt,itemScope:Je,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,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:we,pattern:null,ping:xt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:xt,required:Je,reversed:Je,rows:we,rowSpan:we,sandbox:xt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootCustomElementRegistry:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shadowRootSerializable:Je,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:Yt,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,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:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Je,disablePictureInPicture:Je,disableRemotePlayback:Je,exportParts:ls,part:xt,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:_E}),A3=so({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:Yn,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:xt,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:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,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:ls,g2:ls,glyphName:ls,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:Yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,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:we,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:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yn,rev:Yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yn,requiredFeatures:Yn,requiredFonts:Yn,requiredFormats:Yn,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:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:Yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yn,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xE}),SE=so({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()}}),vE=so({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_E}),AE=so({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),C3={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"},N3=/[A-Z]/g,CE=/-[a-z]/g,k3=/^data[-\w.:]+$/i;function wl(e,t){const n=ba(t);let r=t,s=Ln;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&k3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(CE,I3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!CE.test(a)){let u=a.replace(N3,O3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=eh}return new s(r,t)}function O3(e){return"-"+e.toLowerCase()}function I3(e){return e.charAt(1).toUpperCase()}const wa=TE([wE,v3,SE,vE,AE],"html"),wi=TE([wE,A3,SE,vE,AE],"svg");function NE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function kE(e){return e.join(" ").trim()}var oo={},th,OE;function P3(){if(OE)return th;OE=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=`
|
|
23
|
+
`+b.stack}return{value:i,source:o,stack:E,digest:null}}function f0(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function h0(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var $H=typeof WeakMap=="function"?WeakMap:Map;function RS(i,o,c){c=mi(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){bd||(bd=!0,N0=h),h0(i,o)},c}function LS(i,o,c){c=mi(-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(){h0(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){h0(i,o),typeof h!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),c}function DS(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new $H;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=nj.bind(null,i,o,c),o.then(i,i))}function MS(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 FS(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=mi(-1,1),o.tag=2,qi(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var zH=j.ReactCurrentOwner,$n=!1;function kn(i,o,c,h){o.child=i===null?rS(o,null,c,h):Xo(o,i.child,c,h)}function BS(i,o,c,h,E){c=c.render;var b=o.ref;return Qo(o,E),h=i0(i,o,c,h,b,E),c=s0(),i!==null&&!$n?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Lt&&c&&jm(o),o.flags|=1,kn(i,o,h,E),o.child)}function US(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!D0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,HS(i,o,b,h,E)):(i=Ad(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var S=b.memoizedProps;if(c=c.compare,c=c!==null?c:gu,c(S,h)&&i.ref===o.ref)return gi(i,o,E)}return o.flags|=1,i=Qi(b,h),i.ref=o.ref,i.return=o,o.child=i}function HS(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(gu(b,h)&&i.ref===o.ref)if($n=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&($n=!0);else return o.lanes=i.lanes,gi(i,o,E)}return p0(i,o,c,h,E)}function jS(i,o,c){var h=o.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},At(ta,Zn),Zn|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,At(ta,Zn),Zn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,At(ta,Zn),Zn|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,At(ta,Zn),Zn|=h;return kn(i,o,E,c),o.child}function $S(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function p0(i,o,c,h,E){var b=jn(c)?Ls:wn.current;return b=qo(o,b),Qo(o,E),c=i0(i,o,c,h,b,E),h=s0(),i!==null&&!$n?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Lt&&h&&jm(o),o.flags|=1,kn(i,o,c,E),o.child)}function zS(i,o,c,h,E){if(jn(c)){var b=!0;Qc(o)}else b=!1;if(Qo(o,E),o.stateNode===null)md(i,o),IS(o,c,h),d0(o,c,h,E),h=!0;else if(i===null){var S=o.stateNode,U=o.memoizedProps;S.props=U;var z=S.context,ie=c.contextType;typeof ie=="object"&&ie!==null?ie=cr(ie):(ie=jn(c)?Ls:wn.current,ie=qo(o,ie));var ye=c.getDerivedStateFromProps,be=typeof ye=="function"||typeof S.getSnapshotBeforeUpdate=="function";be||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(U!==h||z!==ie)&&PS(o,S,h,ie),Vi=!1;var ge=o.memoizedState;S.state=ge,od(o,h,S,E),z=o.memoizedState,U!==h||ge!==z||Hn.current||Vi?(typeof ye=="function"&&(c0(o,c,ye,h),z=o.memoizedState),(U=Vi||OS(o,c,U,h,ge,z,ie))?(be||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=z),S.props=h,S.state=z,S.context=ie,h=U):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,sS(i,o),U=o.memoizedProps,ie=o.type===o.elementType?U:Nr(o.type,U),S.props=ie,be=o.pendingProps,ge=S.context,z=c.contextType,typeof z=="object"&&z!==null?z=cr(z):(z=jn(c)?Ls:wn.current,z=qo(o,z));var Pe=c.getDerivedStateFromProps;(ye=typeof Pe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(U!==be||ge!==z)&&PS(o,S,h,z),Vi=!1,ge=o.memoizedState,S.state=ge,od(o,h,S,E);var Me=o.memoizedState;U!==be||ge!==Me||Hn.current||Vi?(typeof Pe=="function"&&(c0(o,c,Pe,h),Me=o.memoizedState),(ie=Vi||OS(o,c,ie,h,ge,Me,z)||!1)?(ye||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Me,z),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Me,z)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Me),S.props=h,S.state=Me,S.context=z,h=ie):(typeof S.componentDidUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||U===i.memoizedProps&&ge===i.memoizedState||(o.flags|=1024),h=!1)}return m0(i,o,c,h,b,E)}function m0(i,o,c,h,E,b){$S(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&G_(o,c,!1),gi(i,o,b);h=o.stateNode,zH.current=o;var U=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=Xo(o,i.child,null,b),o.child=Xo(o,null,U,b)):kn(i,o,U,b),o.memoizedState=h.state,E&&G_(o,c,!0),o.child}function VS(i){var o=i.stateNode;o.pendingContext?W_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&W_(i,o.context,!1),Jm(i,o.containerInfo)}function qS(i,o,c,h,E){return Go(),qm(E),o.flags|=256,kn(i,o,c,h),o.child}var g0={dehydrated:null,treeContext:null,retryLane:0};function E0(i){return{baseLanes:i,cachePool:null,transitions:null}}function WS(i,o,c){var h=o.pendingProps,E=Mt.current,b=!1,S=(o.flags&128)!==0,U;if((U=S)||(U=i!==null&&i.memoizedState===null?!1:(E&2)!==0),U?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),At(Mt,E&1),i===null)return Vm(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):(S=h.children,i=h.fallback,b?(h=o.mode,b=o.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=Cd(S,h,0,null),i=Vs(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=E0(c),o.memoizedState=g0,i):y0(o,S));if(E=i.memoizedState,E!==null&&(U=E.dehydrated,U!==null))return VH(i,o,S,h,U,E,c);if(b){b=h.fallback,S=o.mode,E=i.child,U=E.sibling;var z={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=z,o.deletions=null):(h=Qi(E,z),h.subtreeFlags=E.subtreeFlags&14680064),U!==null?b=Qi(U,b):(b=Vs(b,S,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,S=i.child.memoizedState,S=S===null?E0(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~c,o.memoizedState=g0,h}return b=i.child,i=b.sibling,h=Qi(b,{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 y0(i,o){return o=Cd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function pd(i,o,c,h){return h!==null&&qm(h),Xo(o,i.child,null,c),i=y0(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function VH(i,o,c,h,E,b,S){if(c)return o.flags&256?(o.flags&=-257,h=f0(Error(n(422))),pd(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=Cd({mode:"visible",children:h.children},E,0,null),b=Vs(b,E,S,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&Xo(o,i.child,null,S),o.child.memoizedState=E0(S),o.memoizedState=g0,b);if((o.mode&1)===0)return pd(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var U=h.dgst;return h=U,b=Error(n(419)),h=f0(b,h,void 0),pd(i,o,S,h)}if(U=(S&i.childLanes)!==0,$n||U){if(h=un,h!==null){switch(S&-S){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|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,pi(i,E),Ir(h,i,E,-1))}return L0(),h=f0(Error(n(421))),pd(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=rj.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Jn=Hi(E.nextSibling),Qn=o,Lt=!0,Cr=null,i!==null&&(ur[lr++]=fi,ur[lr++]=hi,ur[lr++]=Ds,fi=i.id,hi=i.overflow,Ds=o),o=y0(o,h.children),o.flags|=4096,o)}function YS(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),Xm(i.return,o,c)}function T0(i,o,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function GS(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(kn(i,o,h.children,c),h=Mt.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&&YS(i,c,o);else if(i.tag===19)YS(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(At(Mt,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&&ad(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),T0(o,!1,E,c,b);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&ad(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}T0(o,!0,c,null,b);break;case"together":T0(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function md(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function gi(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Hs|=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=Qi(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Qi(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function qH(i,o,c){switch(o.tag){case 3:VS(o),Go();break;case 5:uS(o);break;case 1:jn(o.type)&&Qc(o);break;case 4:Jm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;At(rd,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(At(Mt,Mt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?WS(i,o,c):(At(Mt,Mt.current&1),i=gi(i,o,c),i!==null?i.sibling:null);At(Mt,Mt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return GS(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),At(Mt,Mt.current),h)break;return null;case 22:case 23:return o.lanes=0,jS(i,o,c)}return gi(i,o,c)}var XS,b0,KS,QS;XS=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}},b0=function(){},KS=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Bs(Zr.current);var b=null;switch(c){case"input":E=vt(i,E),h=vt(i,h),b=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),b=[];break;case"textarea":E=Et(i,E),h=Et(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Gc)}Ut(c,h);var S;c=null;for(ie in E)if(!h.hasOwnProperty(ie)&&E.hasOwnProperty(ie)&&E[ie]!=null)if(ie==="style"){var U=E[ie];for(S in U)U.hasOwnProperty(S)&&(c||(c={}),c[S]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(s.hasOwnProperty(ie)?b||(b=[]):(b=b||[]).push(ie,null));for(ie in h){var z=h[ie];if(U=E!=null?E[ie]:void 0,h.hasOwnProperty(ie)&&z!==U&&(z!=null||U!=null))if(ie==="style")if(U){for(S in U)!U.hasOwnProperty(S)||z&&z.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in z)z.hasOwnProperty(S)&&U[S]!==z[S]&&(c||(c={}),c[S]=z[S])}else c||(b||(b=[]),b.push(ie,c)),c=z;else ie==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,U=U?U.__html:void 0,z!=null&&U!==z&&(b=b||[]).push(ie,z)):ie==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(ie,""+z):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(s.hasOwnProperty(ie)?(z!=null&&ie==="onScroll"&&Ot("scroll",i),b||U===z||(b=[])):(b=b||[]).push(ie,z))}c&&(b=b||[]).push("style",c);var ie=b;(o.updateQueue=ie)&&(o.flags|=4)}},QS=function(i,o,c,h){c!==h&&(o.flags|=4)};function Iu(i,o){if(!Lt)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 _n(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 WH(i,o,c){var h=o.pendingProps;switch($m(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _n(o),null;case 1:return jn(o.type)&&Kc(),_n(o),null;case 3:return h=o.stateNode,Jo(),It(Hn),It(wn),t0(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(td(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Cr!==null&&(I0(Cr),Cr=null))),b0(i,o),_n(o),null;case 5:Zm(o);var E=Bs(Au.current);if(c=o.type,i!==null&&o.stateNode!=null)KS(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 _n(o),null}if(i=Bs(Zr.current),td(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Jr]=o,h[wu]=b,i=(o.mode&1)!==0,c){case"dialog":Ot("cancel",h),Ot("close",h);break;case"iframe":case"object":case"embed":Ot("load",h);break;case"video":case"audio":for(E=0;E<yu.length;E++)Ot(yu[E],h);break;case"source":Ot("error",h);break;case"img":case"image":case"link":Ot("error",h),Ot("load",h);break;case"details":Ot("toggle",h);break;case"input":pt(h,b),Ot("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},Ot("invalid",h);break;case"textarea":Sr(h,b),Ot("invalid",h)}Ut(c,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var U=b[S];S==="children"?typeof U=="string"?h.textContent!==U&&(b.suppressHydrationWarning!==!0&&Yc(h.textContent,U,i),E=["children",U]):typeof U=="number"&&h.textContent!==""+U&&(b.suppressHydrationWarning!==!0&&Yc(h.textContent,U,i),E=["children",""+U]):s.hasOwnProperty(S)&&U!=null&&S==="onScroll"&&Ot("scroll",h)}switch(c){case"input":Dt(h),Gt(h,b,!0);break;case"textarea":Dt(h),Os(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Gc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ce(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(c,{is:h.is}):(i=S.createElement(c),c==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,c),i[Jr]=o,i[wu]=h,XS(i,o,!1,!1),o.stateNode=i;e:{switch(S=or(c,h),c){case"dialog":Ot("cancel",i),Ot("close",i),E=h;break;case"iframe":case"object":case"embed":Ot("load",i),E=h;break;case"video":case"audio":for(E=0;E<yu.length;E++)Ot(yu[E],i);E=h;break;case"source":Ot("error",i),E=h;break;case"img":case"image":case"link":Ot("error",i),Ot("load",i),E=h;break;case"details":Ot("toggle",i),E=h;break;case"input":pt(i,h),E=vt(i,h),Ot("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),Ot("invalid",i);break;case"textarea":Sr(i,h),E=Et(i,h),Ot("invalid",i);break;default:E=h}Ut(c,E),U=E;for(b in U)if(U.hasOwnProperty(b)){var z=U[b];b==="style"?ir(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&et(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&it(i,z):typeof z=="number"&&it(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?z!=null&&b==="onScroll"&&Ot("scroll",i):z!=null&&I(i,b,z,S))}switch(c){case"input":Dt(i),Gt(i,h,!1);break;case"textarea":Dt(i),Os(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ie(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?ot(i,!!h.multiple,b,!1):h.defaultValue!=null&&ot(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Gc)}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 _n(o),null;case 6:if(i&&o.stateNode!=null)QS(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=Bs(Au.current),Bs(Zr.current),td(o)){if(h=o.stateNode,c=o.memoizedProps,h[Jr]=o,(b=h.nodeValue!==c)&&(i=Qn,i!==null))switch(i.tag){case 3:Yc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Yc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Jr]=o,o.stateNode=h}return _n(o),null;case 13:if(It(Mt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Lt&&Jn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)eS(),Go(),o.flags|=98560,b=!1;else if(b=td(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Jr]=o}else Go(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;_n(o),b=!1}else Cr!==null&&(I0(Cr),Cr=null),b=!0;if(!b)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||(Mt.current&1)!==0?tn===0&&(tn=3):L0())),o.updateQueue!==null&&(o.flags|=4),_n(o),null);case 4:return Jo(),b0(i,o),i===null&&Tu(o.stateNode.containerInfo),_n(o),null;case 10:return Gm(o.type._context),_n(o),null;case 17:return jn(o.type)&&Kc(),_n(o),null;case 19:if(It(Mt),b=o.memoizedState,b===null)return _n(o),null;if(h=(o.flags&128)!==0,S=b.rendering,S===null)if(h)Iu(b,!1);else{if(tn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=ad(i),S!==null){for(o.flags|=128,Iu(b,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)b=c,i=h,b.flags&=14680066,S=b.alternate,S===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return At(Mt,Mt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Vt()>na&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304)}else{if(!h)if(i=ad(S),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),Iu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!Lt)return _n(o),null}else 2*Vt()-b.renderingStartTime>na&&c!==1073741824&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304);b.isBackwards?(S.sibling=o.child,o.child=S):(c=b.last,c!==null?c.sibling=S:o.child=S,b.last=S)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=Vt(),o.sibling=null,c=Mt.current,At(Mt,h?c&1|2:c&1),o):(_n(o),null);case 22:case 23:return R0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Zn&1073741824)!==0&&(_n(o),o.subtreeFlags&6&&(o.flags|=8192)):_n(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function YH(i,o){switch($m(o),o.tag){case 1:return jn(o.type)&&Kc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Jo(),It(Hn),It(wn),t0(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Zm(o),null;case 13:if(It(Mt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Go()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return It(Mt),null;case 4:return Jo(),null;case 10:return Gm(o.type._context),null;case 22:case 23:return R0(),null;case 24:return null;default:return null}}var gd=!1,Sn=!1,GH=typeof WeakSet=="function"?WeakSet:Set,Le=null;function ea(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Ht(i,o,h)}else c.current=null}function w0(i,o,c){try{c()}catch(h){Ht(i,o,h)}}var JS=!1;function XH(i,o){if(Rm=Mc,i=O_(),vm(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,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(Se){c=null;break e}var S=0,U=-1,z=-1,ie=0,ye=0,be=i,ge=null;t:for(;;){for(var Pe;be!==c||E!==0&&be.nodeType!==3||(U=S+E),be!==b||h!==0&&be.nodeType!==3||(z=S+h),be.nodeType===3&&(S+=be.nodeValue.length),(Pe=be.firstChild)!==null;)ge=be,be=Pe;for(;;){if(be===i)break t;if(ge===c&&++ie===E&&(U=S),ge===b&&++ye===h&&(z=S),(Pe=be.nextSibling)!==null)break;be=ge,ge=be.parentNode}be=Pe}c=U===-1||z===-1?null:{start:U,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Lm={focusedElem:i,selectionRange:c},Mc=!1,Le=o;Le!==null;)if(o=Le,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Le=i;else for(;Le!==null;){o=Le;try{var Me=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Me!==null){var Be=Me.memoizedProps,qt=Me.memoizedState,K=o.stateNode,Y=K.getSnapshotBeforeUpdate(o.elementType===o.type?Be:Nr(o.type,Be),qt);K.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:var te=o.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Se){Ht(o,o.return,Se)}if(i=o.sibling,i!==null){i.return=o.return,Le=i;break}Le=o.return}return Me=JS,JS=!1,Me}function Pu(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 b=E.destroy;E.destroy=void 0,b!==void 0&&w0(o,c,b)}E=E.next}while(E!==h)}}function Ed(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 x0(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 ZS(i){var o=i.alternate;o!==null&&(i.alternate=null,ZS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Jr],delete o[wu],delete o[Bm],delete o[IH],delete o[PH])),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 ev(i){return i.tag===5||i.tag===3||i.tag===4}function tv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||ev(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 _0(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=Gc));else if(h!==4&&(i=i.child,i!==null))for(_0(i,o,c),i=i.sibling;i!==null;)_0(i,o,c),i=i.sibling}function S0(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(S0(i,o,c),i=i.sibling;i!==null;)S0(i,o,c),i=i.sibling}var hn=null,kr=!1;function Wi(i,o,c){for(c=c.child;c!==null;)nv(i,o,c),c=c.sibling}function nv(i,o,c){if(Qr&&typeof Qr.onCommitFiberUnmount=="function")try{Qr.onCommitFiberUnmount(Oc,c)}catch(U){}switch(c.tag){case 5:Sn||ea(c,o);case 6:var h=hn,E=kr;hn=null,Wi(i,o,c),hn=h,kr=E,hn!==null&&(kr?(i=hn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):hn.removeChild(c.stateNode));break;case 18:hn!==null&&(kr?(i=hn,c=c.stateNode,i.nodeType===8?Fm(i.parentNode,c):i.nodeType===1&&Fm(i,c),cu(i)):Fm(hn,c.stateNode));break;case 4:h=hn,E=kr,hn=c.stateNode.containerInfo,kr=!0,Wi(i,o,c),hn=h,kr=E;break;case 0:case 11:case 14:case 15:if(!Sn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&w0(c,o,S),E=E.next}while(E!==h)}Wi(i,o,c);break;case 1:if(!Sn&&(ea(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(U){Ht(c,o,U)}Wi(i,o,c);break;case 21:Wi(i,o,c);break;case 22:c.mode&1?(Sn=(h=Sn)||c.memoizedState!==null,Wi(i,o,c),Sn=h):Wi(i,o,c);break;default:Wi(i,o,c)}}function rv(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new GH),o.forEach(function(h){var E=ij.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function Or(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,S=o,U=S;e:for(;U!==null;){switch(U.tag){case 5:hn=U.stateNode,kr=!1;break e;case 3:hn=U.stateNode.containerInfo,kr=!0;break e;case 4:hn=U.stateNode.containerInfo,kr=!0;break e}U=U.return}if(hn===null)throw Error(n(160));nv(b,S,E),hn=null,kr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(ie){Ht(E,o,ie)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)iv(o,i),o=o.sibling}function iv(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Or(o,i),ti(i),h&4){try{Pu(3,i,i.return),Ed(3,i)}catch(Be){Ht(i,i.return,Be)}try{Pu(5,i,i.return)}catch(Be){Ht(i,i.return,Be)}}break;case 1:Or(o,i),ti(i),h&512&&c!==null&&ea(c,c.return);break;case 5:if(Or(o,i),ti(i),h&512&&c!==null&&ea(c,c.return),i.flags&32){var E=i.stateNode;try{it(E,"")}catch(Be){Ht(i,i.return,Be)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=c!==null?c.memoizedProps:b,U=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{U==="input"&&b.type==="radio"&&b.name!=null&&$e(E,b),or(U,S);var ie=or(U,b);for(S=0;S<z.length;S+=2){var ye=z[S],be=z[S+1];ye==="style"?ir(E,be):ye==="dangerouslySetInnerHTML"?et(E,be):ye==="children"?it(E,be):I(E,ye,be,ie)}switch(U){case"input":bt(E,b);break;case"textarea":ks(E,b);break;case"select":var ge=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Pe=b.value;Pe!=null?ot(E,!!b.multiple,Pe,!1):ge!==!!b.multiple&&(b.defaultValue!=null?ot(E,!!b.multiple,b.defaultValue,!0):ot(E,!!b.multiple,b.multiple?[]:"",!1))}E[wu]=b}catch(Be){Ht(i,i.return,Be)}}break;case 6:if(Or(o,i),ti(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Be){Ht(i,i.return,Be)}}break;case 3:if(Or(o,i),ti(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{cu(o.containerInfo)}catch(Be){Ht(i,i.return,Be)}break;case 4:Or(o,i),ti(i);break;case 13:Or(o,i),ti(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(C0=Vt())),h&4&&rv(i);break;case 22:if(ye=c!==null&&c.memoizedState!==null,i.mode&1?(Sn=(ie=Sn)||ye,Or(o,i),Sn=ie):Or(o,i),ti(i),h&8192){if(ie=i.memoizedState!==null,(i.stateNode.isHidden=ie)&&!ye&&(i.mode&1)!==0)for(Le=i,ye=i.child;ye!==null;){for(be=Le=ye;Le!==null;){switch(ge=Le,Pe=ge.child,ge.tag){case 0:case 11:case 14:case 15:Pu(4,ge,ge.return);break;case 1:ea(ge,ge.return);var Me=ge.stateNode;if(typeof Me.componentWillUnmount=="function"){h=ge,c=ge.return;try{o=h,Me.props=o.memoizedProps,Me.state=o.memoizedState,Me.componentWillUnmount()}catch(Be){Ht(h,c,Be)}}break;case 5:ea(ge,ge.return);break;case 22:if(ge.memoizedState!==null){av(be);continue}}Pe!==null?(Pe.return=ge,Le=Pe):av(be)}ye=ye.sibling}e:for(ye=null,be=i;;){if(be.tag===5){if(ye===null){ye=be;try{E=be.stateNode,ie?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(U=be.stateNode,z=be.memoizedProps.style,S=z!=null&&z.hasOwnProperty("display")?z.display:null,U.style.display=Nn("display",S))}catch(Be){Ht(i,i.return,Be)}}}else if(be.tag===6){if(ye===null)try{be.stateNode.nodeValue=ie?"":be.memoizedProps}catch(Be){Ht(i,i.return,Be)}}else if((be.tag!==22&&be.tag!==23||be.memoizedState===null||be===i)&&be.child!==null){be.child.return=be,be=be.child;continue}if(be===i)break e;for(;be.sibling===null;){if(be.return===null||be.return===i)break e;ye===be&&(ye=null),be=be.return}ye===be&&(ye=null),be.sibling.return=be.return,be=be.sibling}}break;case 19:Or(o,i),ti(i),h&4&&rv(i);break;case 21:break;default:Or(o,i),ti(i)}}function ti(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(ev(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&&(it(E,""),h.flags&=-33);var b=tv(i);S0(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,U=tv(i);_0(i,U,S);break;default:throw Error(n(161))}}catch(z){Ht(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function KH(i,o,c){Le=i,sv(i)}function sv(i,o,c){for(var h=(i.mode&1)!==0;Le!==null;){var E=Le,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||gd;if(!S){var U=E.alternate,z=U!==null&&U.memoizedState!==null||Sn;U=gd;var ie=Sn;if(gd=S,(Sn=z)&&!ie)for(Le=E;Le!==null;)S=Le,z=S.child,S.tag===22&&S.memoizedState!==null?uv(E):z!==null?(z.return=S,Le=z):uv(E);for(;b!==null;)Le=b,sv(b),b=b.sibling;Le=E,gd=U,Sn=ie}ov(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Le=b):ov(i)}}function ov(i){for(;Le!==null;){var o=Le;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Sn||Ed(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!Sn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:Nr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&aS(o,b,h);break;case 3:var S=o.updateQueue;if(S!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}aS(o,S,c)}break;case 5:var U=o.stateNode;if(c===null&&o.flags&4){c=U;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ie=o.alternate;if(ie!==null){var ye=ie.memoizedState;if(ye!==null){var be=ye.dehydrated;be!==null&&cu(be)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Sn||o.flags&512&&x0(o)}catch(ge){Ht(o,o.return,ge)}}if(o===i){Le=null;break}if(c=o.sibling,c!==null){c.return=o.return,Le=c;break}Le=o.return}}function av(i){for(;Le!==null;){var o=Le;if(o===i){Le=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Le=c;break}Le=o.return}}function uv(i){for(;Le!==null;){var o=Le;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Ed(4,o)}catch(z){Ht(o,c,z)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(z){Ht(o,E,z)}}var b=o.return;try{x0(o)}catch(z){Ht(o,b,z)}break;case 5:var S=o.return;try{x0(o)}catch(z){Ht(o,S,z)}}}catch(z){Ht(o,o.return,z)}if(o===i){Le=null;break}var U=o.sibling;if(U!==null){U.return=o.return,Le=U;break}Le=o.return}}var QH=Math.ceil,yd=j.ReactCurrentDispatcher,v0=j.ReactCurrentOwner,fr=j.ReactCurrentBatchConfig,ct=0,un=null,Qt=null,pn=0,Zn=0,ta=ji(0),tn=0,Ru=null,Hs=0,Td=0,A0=0,Lu=null,zn=null,C0=0,na=1/0,Ei=null,bd=!1,N0=null,Yi=null,wd=!1,Gi=null,xd=0,Du=0,k0=null,_d=-1,Sd=0;function On(){return(ct&6)!==0?Vt():_d!==-1?_d:_d=Vt()}function Xi(i){return(i.mode&1)===0?1:(ct&2)!==0&&pn!==0?pn&-pn:LH.transition!==null?(Sd===0&&(Sd=t_()),Sd):(i=yt,i!==0||(i=window.event,i=i===void 0?16:c_(i.type)),i)}function Ir(i,o,c,h){if(50<Du)throw Du=0,k0=null,Error(n(185));su(i,c,h),((ct&2)===0||i!==un)&&(i===un&&((ct&2)===0&&(Td|=c),tn===4&&Ki(i,pn)),Vn(i,h),c===1&&ct===0&&(o.mode&1)===0&&(na=Vt()+500,Jc&&zi()))}function Vn(i,o){var c=i.callbackNode;LU(i,o);var h=Rc(i,i===un?pn:0);if(h===0)c!==null&&Jx(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&Jx(c),o===1)i.tag===0?RH(cv.bind(null,i)):X_(cv.bind(null,i)),kH(function(){(ct&6)===0&&zi()}),c=null;else{switch(n_(h)){case 1:c=um;break;case 4:c=Zx;break;case 16:c=kc;break;case 536870912:c=e_;break;default:c=kc}c=yv(c,lv.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function lv(i,o){if(_d=-1,Sd=0,(ct&6)!==0)throw Error(n(327));var c=i.callbackNode;if(ra()&&i.callbackNode!==c)return null;var h=Rc(i,i===un?pn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=vd(i,h);else{o=h;var E=ct;ct|=2;var b=fv();(un!==i||pn!==o)&&(Ei=null,na=Vt()+500,$s(i,o));do try{ej();break}catch(U){dv(i,U)}while(!0);Ym(),yd.current=b,ct=E,Qt!==null?o=0:(un=null,pn=0,o=tn)}if(o!==0){if(o===2&&(E=lm(i),E!==0&&(h=E,o=O0(i,E))),o===1)throw c=Ru,$s(i,0),Ki(i,h),Vn(i,Vt()),c;if(o===6)Ki(i,h);else{if(E=i.current.alternate,(h&30)===0&&!JH(E)&&(o=vd(i,h),o===2&&(b=lm(i),b!==0&&(h=b,o=O0(i,b))),o===1))throw c=Ru,$s(i,0),Ki(i,h),Vn(i,Vt()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:zs(i,zn,Ei);break;case 3:if(Ki(i,h),(h&130023424)===h&&(o=C0+500-Vt(),10<o)){if(Rc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){On(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Mm(zs.bind(null,i,zn,Ei),o);break}zs(i,zn,Ei);break;case 4:if(Ki(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-vr(h);b=1<<S,S=o[S],S>E&&(E=S),h&=~b}if(h=E,h=Vt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*QH(h/1960))-h,10<h){i.timeoutHandle=Mm(zs.bind(null,i,zn,Ei),h);break}zs(i,zn,Ei);break;case 5:zs(i,zn,Ei);break;default:throw Error(n(329))}}}return Vn(i,Vt()),i.callbackNode===c?lv.bind(null,i):null}function O0(i,o){var c=Lu;return i.current.memoizedState.isDehydrated&&($s(i,o).flags|=256),i=vd(i,o),i!==2&&(o=zn,zn=c,o!==null&&I0(o)),i}function I0(i){zn===null?zn=i:zn.push.apply(zn,i)}function JH(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],b=E.getSnapshot;E=E.value;try{if(!Ar(b(),E))return!1}catch(S){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 Ki(i,o){for(o&=~A0,o&=~Td,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-vr(o),h=1<<c;i[c]=-1,o&=~h}}function cv(i){if((ct&6)!==0)throw Error(n(327));ra();var o=Rc(i,0);if((o&1)===0)return Vn(i,Vt()),null;var c=vd(i,o);if(i.tag!==0&&c===2){var h=lm(i);h!==0&&(o=h,c=O0(i,h))}if(c===1)throw c=Ru,$s(i,0),Ki(i,o),Vn(i,Vt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,zs(i,zn,Ei),Vn(i,Vt()),null}function P0(i,o){var c=ct;ct|=1;try{return i(o)}finally{ct=c,ct===0&&(na=Vt()+500,Jc&&zi())}}function js(i){Gi!==null&&Gi.tag===0&&(ct&6)===0&&ra();var o=ct;ct|=1;var c=fr.transition,h=yt;try{if(fr.transition=null,yt=1,i)return i()}finally{yt=h,fr.transition=c,ct=o,(ct&6)===0&&zi()}}function R0(){Zn=ta.current,It(ta)}function $s(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,NH(c)),Qt!==null)for(c=Qt.return;c!==null;){var h=c;switch($m(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Kc();break;case 3:Jo(),It(Hn),It(wn),t0();break;case 5:Zm(h);break;case 4:Jo();break;case 13:It(Mt);break;case 19:It(Mt);break;case 10:Gm(h.type._context);break;case 22:case 23:R0()}c=c.return}if(un=i,Qt=i=Qi(i.current,null),pn=Zn=o,tn=0,Ru=null,A0=Td=Hs=0,zn=Lu=null,Fs!==null){for(o=0;o<Fs.length;o++)if(c=Fs[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}c.pending=h}Fs=null}return i}function dv(i,o){do{var c=Qt;try{if(Ym(),ud.current=fd,ld){for(var h=Ft.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}ld=!1}if(Us=0,an=en=Ft=null,Cu=!1,Nu=0,v0.current=null,c===null||c.return===null){tn=1,Ru=o,Qt=null;break}e:{var b=i,S=c.return,U=c,z=o;if(o=pn,U.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var ie=z,ye=U,be=ye.tag;if((ye.mode&1)===0&&(be===0||be===11||be===15)){var ge=ye.alternate;ge?(ye.updateQueue=ge.updateQueue,ye.memoizedState=ge.memoizedState,ye.lanes=ge.lanes):(ye.updateQueue=null,ye.memoizedState=null)}var Pe=MS(S);if(Pe!==null){Pe.flags&=-257,FS(Pe,S,U,b,o),Pe.mode&1&&DS(b,ie,o),o=Pe,z=ie;var Me=o.updateQueue;if(Me===null){var Be=new Set;Be.add(z),o.updateQueue=Be}else Me.add(z);break e}else{if((o&1)===0){DS(b,ie,o),L0();break e}z=Error(n(426))}}else if(Lt&&U.mode&1){var qt=MS(S);if(qt!==null){(qt.flags&65536)===0&&(qt.flags|=256),FS(qt,S,U,b,o),qm(Zo(z,U));break e}}b=z=Zo(z,U),tn!==4&&(tn=2),Lu===null?Lu=[b]:Lu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var K=RS(b,z,o);oS(b,K);break e;case 1:U=z;var Y=b.type,te=b.stateNode;if((b.flags&128)===0&&(typeof Y.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Yi===null||!Yi.has(te)))){b.flags|=65536,o&=-o,b.lanes|=o;var Se=LS(b,U,o);oS(b,Se);break e}}b=b.return}while(b!==null)}pv(c)}catch(He){o=He,Qt===c&&c!==null&&(Qt=c=c.return);continue}break}while(!0)}function fv(){var i=yd.current;return yd.current=fd,i===null?fd:i}function L0(){(tn===0||tn===3||tn===2)&&(tn=4),un===null||(Hs&268435455)===0&&(Td&268435455)===0||Ki(un,pn)}function vd(i,o){var c=ct;ct|=2;var h=fv();(un!==i||pn!==o)&&(Ei=null,$s(i,o));do try{ZH();break}catch(E){dv(i,E)}while(!0);if(Ym(),ct=c,yd.current=h,Qt!==null)throw Error(n(261));return un=null,pn=0,tn}function ZH(){for(;Qt!==null;)hv(Qt)}function ej(){for(;Qt!==null&&!vU();)hv(Qt)}function hv(i){var o=Ev(i.alternate,i,Zn);i.memoizedProps=i.pendingProps,o===null?pv(i):Qt=o,v0.current=null}function pv(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=WH(c,o,Zn),c!==null){Qt=c;return}}else{if(c=YH(c,o),c!==null){c.flags&=32767,Qt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{tn=6,Qt=null;return}}if(o=o.sibling,o!==null){Qt=o;return}Qt=o=i}while(o!==null);tn===0&&(tn=5)}function zs(i,o,c){var h=yt,E=fr.transition;try{fr.transition=null,yt=1,tj(i,o,c,h)}finally{fr.transition=E,yt=h}return null}function tj(i,o,c,h){do ra();while(Gi!==null);if((ct&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 b=c.lanes|c.childLanes;if(DU(i,b),i===un&&(Qt=un=null,pn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||wd||(wd=!0,yv(kc,function(){return ra(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=fr.transition,fr.transition=null;var S=yt;yt=1;var U=ct;ct|=4,v0.current=null,XH(i,c),iv(c,i),wH(Lm),Mc=!!Rm,Lm=Rm=null,i.current=c,KH(c),AU(),ct=U,yt=S,fr.transition=b}else i.current=c;if(wd&&(wd=!1,Gi=i,xd=E),b=i.pendingLanes,b===0&&(Yi=null),kU(c.stateNode),Vn(i,Vt()),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(bd)throw bd=!1,i=N0,N0=null,i;return(xd&1)!==0&&i.tag!==0&&ra(),b=i.pendingLanes,(b&1)!==0?i===k0?Du++:(Du=0,k0=i):Du=0,zi(),null}function ra(){if(Gi!==null){var i=n_(xd),o=fr.transition,c=yt;try{if(fr.transition=null,yt=16>i?16:i,Gi===null)var h=!1;else{if(i=Gi,Gi=null,xd=0,(ct&6)!==0)throw Error(n(331));var E=ct;for(ct|=4,Le=i.current;Le!==null;){var b=Le,S=b.child;if((Le.flags&16)!==0){var U=b.deletions;if(U!==null){for(var z=0;z<U.length;z++){var ie=U[z];for(Le=ie;Le!==null;){var ye=Le;switch(ye.tag){case 0:case 11:case 15:Pu(8,ye,b)}var be=ye.child;if(be!==null)be.return=ye,Le=be;else for(;Le!==null;){ye=Le;var ge=ye.sibling,Pe=ye.return;if(ZS(ye),ye===ie){Le=null;break}if(ge!==null){ge.return=Pe,Le=ge;break}Le=Pe}}}var Me=b.alternate;if(Me!==null){var Be=Me.child;if(Be!==null){Me.child=null;do{var qt=Be.sibling;Be.sibling=null,Be=qt}while(Be!==null)}}Le=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,Le=S;else e:for(;Le!==null;){if(b=Le,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Pu(9,b,b.return)}var K=b.sibling;if(K!==null){K.return=b.return,Le=K;break e}Le=b.return}}var Y=i.current;for(Le=Y;Le!==null;){S=Le;var te=S.child;if((S.subtreeFlags&2064)!==0&&te!==null)te.return=S,Le=te;else e:for(S=Y;Le!==null;){if(U=Le,(U.flags&2048)!==0)try{switch(U.tag){case 0:case 11:case 15:Ed(9,U)}}catch(He){Ht(U,U.return,He)}if(U===S){Le=null;break e}var Se=U.sibling;if(Se!==null){Se.return=U.return,Le=Se;break e}Le=U.return}}if(ct=E,zi(),Qr&&typeof Qr.onPostCommitFiberRoot=="function")try{Qr.onPostCommitFiberRoot(Oc,i)}catch(He){}h=!0}return h}finally{yt=c,fr.transition=o}}return!1}function mv(i,o,c){o=Zo(c,o),o=RS(i,o,1),i=qi(i,o,1),o=On(),i!==null&&(su(i,1,o),Vn(i,o))}function Ht(i,o,c){if(i.tag===3)mv(i,i,c);else for(;o!==null;){if(o.tag===3){mv(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Yi===null||!Yi.has(h))){i=Zo(c,i),i=LS(o,i,1),o=qi(o,i,1),i=On(),o!==null&&(su(o,1,i),Vn(o,i));break}}o=o.return}}function nj(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=On(),i.pingedLanes|=i.suspendedLanes&c,un===i&&(pn&c)===c&&(tn===4||tn===3&&(pn&130023424)===pn&&500>Vt()-C0?$s(i,0):A0|=c),Vn(i,o)}function gv(i,o){o===0&&((i.mode&1)===0?o=1:(o=Pc,Pc<<=1,(Pc&130023424)===0&&(Pc=4194304)));var c=On();i=pi(i,o),i!==null&&(su(i,o,c),Vn(i,c))}function rj(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),gv(i,c)}function ij(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),gv(i,c)}var Ev;Ev=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Hn.current)$n=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return $n=!1,qH(i,o,c);$n=(i.flags&131072)!==0}else $n=!1,Lt&&(o.flags&1048576)!==0&&K_(o,ed,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;md(i,o),i=o.pendingProps;var E=qo(o,wn.current);Qo(o,c),E=i0(null,o,h,i,E,c);var b=s0();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,jn(h)?(b=!0,Qc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Qm(o),E.updater=hd,o.stateNode=E,E._reactInternals=o,d0(o,h,i,c),o=m0(null,o,h,!0,b,c)):(o.tag=0,Lt&&b&&jm(o),kn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(md(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=oj(h),i=Nr(h,i),E){case 0:o=p0(null,o,h,i,c);break e;case 1:o=zS(null,o,h,i,c);break e;case 11:o=BS(null,o,h,i,c);break e;case 14:o=US(null,o,h,Nr(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:Nr(h,E),p0(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Nr(h,E),zS(i,o,h,E,c);case 3:e:{if(VS(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,sS(i,o),od(o,h,null,c);var S=o.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Zo(Error(n(423)),o),o=qS(i,o,h,c,E);break e}else if(h!==E){E=Zo(Error(n(424)),o),o=qS(i,o,h,c,E);break e}else for(Jn=Hi(o.stateNode.containerInfo.firstChild),Qn=o,Lt=!0,Cr=null,c=rS(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Go(),h===E){o=gi(i,o,c);break e}kn(i,o,h,c)}o=o.child}return o;case 5:return uS(o),i===null&&Vm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,Dm(h,E)?S=null:b!==null&&Dm(h,b)&&(o.flags|=32),$S(i,o),kn(i,o,S,c),o.child;case 6:return i===null&&Vm(o),null;case 13:return WS(i,o,c);case 4:return Jm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Xo(o,null,h,c):kn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Nr(h,E),BS(i,o,h,E,c);case 7:return kn(i,o,o.pendingProps,c),o.child;case 8:return kn(i,o,o.pendingProps.children,c),o.child;case 12:return kn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,S=E.value,At(rd,h._currentValue),h._currentValue=S,b!==null)if(Ar(b.value,S)){if(b.children===E.children&&!Hn.current){o=gi(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var U=b.dependencies;if(U!==null){S=b.child;for(var z=U.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=mi(-1,c&-c),z.tag=2;var ie=b.updateQueue;if(ie!==null){ie=ie.shared;var ye=ie.pending;ye===null?z.next=z:(z.next=ye.next,ye.next=z),ie.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),Xm(b.return,c,o),U.lanes|=c;break}z=z.next}}else if(b.tag===10)S=b.type===o.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=c,U=S.alternate,U!==null&&(U.lanes|=c),Xm(S,c,o),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===o){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}kn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Qo(o,c),E=cr(E),h=h(E),o.flags|=1,kn(i,o,h,c),o.child;case 14:return h=o.type,E=Nr(h,o.pendingProps),E=Nr(h.type,E),US(i,o,h,E,c);case 15:return HS(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Nr(h,E),md(i,o),o.tag=1,jn(h)?(i=!0,Qc(o)):i=!1,Qo(o,c),IS(o,h,E),d0(o,h,E,c),m0(null,o,h,!0,i,c);case 19:return GS(i,o,c);case 22:return jS(i,o,c)}throw Error(n(156,o.tag))};function yv(i,o){return Qx(i,o)}function sj(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 hr(i,o,c,h){return new sj(i,o,c,h)}function D0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function oj(i){if(typeof i=="function")return D0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===V)return 11;if(i===oe)return 14}return 2}function Qi(i,o){var c=i.alternate;return c===null?(c=hr(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 Ad(i,o,c,h,E,b){var S=2;if(h=i,typeof i=="function")D0(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case X:return Vs(c.children,E,b,o);case ne:S=8,E|=8;break;case se:return i=hr(12,c,o,E|2),i.elementType=se,i.lanes=b,i;case ee:return i=hr(13,c,o,E),i.elementType=ee,i.lanes=b,i;case ae:return i=hr(19,c,o,E),i.elementType=ae,i.lanes=b,i;case de:return Cd(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:S=10;break e;case re:S=9;break e;case V:S=11;break e;case oe:S=14;break e;case me:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=hr(S,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function Vs(i,o,c,h){return i=hr(7,i,h,o),i.lanes=c,i}function Cd(i,o,c,h){return i=hr(22,i,h,o),i.elementType=de,i.lanes=c,i.stateNode={isHidden:!1},i}function M0(i,o,c){return i=hr(6,i,null,o),i.lanes=c,i}function F0(i,o,c){return o=hr(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function aj(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=cm(0),this.expirationTimes=cm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cm(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function B0(i,o,c,h,E,b,S,U,z){return i=new aj(i,o,c,U,z),o===1?(o=1,b===!0&&(o|=8)):o=0,b=hr(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qm(b),i}function uj(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function Tv(i){if(!i)return $i;i=i._reactInternals;e:{if(Ps(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(jn(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(jn(c))return Y_(i,c,o)}return o}function bv(i,o,c,h,E,b,S,U,z){return i=B0(c,h,!0,i,E,b,S,U,z),i.context=Tv(null),c=i.current,h=On(),E=Xi(c),b=mi(h,E),b.callback=o!=null?o:null,qi(c,b,E),i.current.lanes=E,su(i,E,h),Vn(i,h),i}function Nd(i,o,c,h){var E=o.current,b=On(),S=Xi(E);return c=Tv(c),o.context===null?o.context=c:o.pendingContext=c,o=mi(b,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=qi(E,o,S),i!==null&&(Ir(i,E,S,b),sd(i,E,S)),S}function kd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function wv(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function U0(i,o){wv(i,o),(i=i.alternate)&&wv(i,o)}function lj(){return null}var xv=typeof reportError=="function"?reportError:function(i){console.error(i)};function H0(i){this._internalRoot=i}Od.prototype.render=H0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));Nd(i,o,null,null)},Od.prototype.unmount=H0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;js(function(){Nd(null,i,null,null)}),o[ci]=null}};function Od(i){this._internalRoot=i}Od.prototype.unstable_scheduleHydration=function(i){if(i){var o=s_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Fi.length&&o!==0&&o<Fi[c].priority;c++);Fi.splice(c,0,i),c===0&&u_(i)}};function j0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Id(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function _v(){}function cj(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ie=kd(S);b.call(ie)}}var S=bv(o,h,i,0,null,!1,!1,"",_v);return i._reactRootContainer=S,i[ci]=S.current,Tu(i.nodeType===8?i.parentNode:i),js(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var U=h;h=function(){var ie=kd(z);U.call(ie)}}var z=B0(i,0,!1,null,null,!1,!1,"",_v);return i._reactRootContainer=z,i[ci]=z.current,Tu(i.nodeType===8?i.parentNode:i),js(function(){Nd(o,z,c,h)}),z}function Pd(i,o,c,h,E){var b=c._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var U=E;E=function(){var z=kd(S);U.call(z)}}Nd(o,S,i,E)}else S=cj(c,o,i,E,h);return kd(S)}r_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=iu(o.pendingLanes);c!==0&&(dm(o,c|1),Vn(o,Vt()),(ct&6)===0&&(na=Vt()+500,zi()))}break;case 13:js(function(){var h=pi(i,1);if(h!==null){var E=On();Ir(h,i,1,E)}}),U0(i,1)}},fm=function(i){if(i.tag===13){var o=pi(i,134217728);if(o!==null){var c=On();Ir(o,i,134217728,c)}U0(i,134217728)}},i_=function(i){if(i.tag===13){var o=Xi(i),c=pi(i,o);if(c!==null){var h=On();Ir(c,i,o,h)}U0(i,o)}},s_=function(){return yt},o_=function(i,o){var c=yt;try{return yt=i,o()}finally{yt=c}},Ce=function(i,o,c){switch(o){case"input":if(bt(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=Xc(h);if(!E)throw Error(n(90));ft(h),bt(h,E)}}}break;case"textarea":ks(i,c);break;case"select":o=c.value,o!=null&&ot(i,!!c.multiple,o,!1)}},wt=P0,fn=js;var dj={usingClientEntryPoint:!1,Events:[xu,zo,Xc,je,Kt,P0]},Mu={findFiberByHostInstance:Rs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fj={bundleType:Mu.bundleType,version:Mu.version,rendererPackageName:Mu.rendererPackageName,rendererConfig:Mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Xx(i),i===null?null:i.stateNode},findFiberByHostInstance:Mu.findFiberByHostInstance||lj,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 Rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rd.isDisabled&&Rd.supportsFiber)try{Oc=Rd.inject(fj),Qr=Rd}catch(i){}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dj,Rn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!j0(o))throw Error(n(200));return uj(i,o,null,c)},Rn.createRoot=function(i,o){if(!j0(i))throw Error(n(299));var c=!1,h="",E=xv;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=B0(i,1,!1,null,null,c,!1,h,E),i[ci]=o.current,Tu(i.nodeType===8?i.parentNode:i),new H0(o)},Rn.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=Xx(o),i=i===null?null:i.stateNode,i},Rn.flushSync=function(i){return js(i)},Rn.hydrate=function(i,o,c){if(!Id(o))throw Error(n(200));return Pd(null,i,o,!0,c)},Rn.hydrateRoot=function(i,o,c){if(!j0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",S=xv;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),o=bv(o,null,i,1,c!=null?c:null,E,!1,b,S),i[ci]=o.current,Tu(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 Od(o)},Rn.render=function(i,o,c){if(!Id(o))throw Error(n(200));return Pd(null,i,o,!1,c)},Rn.unmountComponentAtNode=function(i){if(!Id(i))throw Error(n(40));return i._reactRootContainer?(js(function(){Pd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},Rn.unstable_batchedUpdates=P0,Rn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!Id(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Pd(i,o,c,!1,h)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var rE;function iE(){if(rE)return Vf.exports;rE=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(),Vf.exports=Uk(),Vf.exports}var io=iE();function sE(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=sE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function M(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=sE(e))&&(r&&(r+=" "),r+=t);return r}const Hk=()=>document.querySelector(`input[name="${O}-user-input"]:not(:disabled)`),Yf=()=>{var e;return(e=Hk())!=null?e:document.querySelector(`.${O}-dialog-content, .${O}-modal-content`)},jk=()=>{var e;return(e=Yf())==null?void 0:e.focus({preventScroll:!0})},Gf=()=>{const e=()=>{const n=document.querySelector(`.${O}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var oE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},aE=es.createContext&&es.createContext(oE),$k=["attr","size","title"];function zk(e,t){if(e==null)return{};var n=Vk(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 Vk(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 Tl(){return Tl=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},Tl.apply(this,arguments)}function uE(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 bl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uE(Object(n),!0).forEach(function(r){qk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qk(e,t,n){return t=Wk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wk(e){var t=Yk(e,"string");return typeof t=="symbol"?t:t+""}function Yk(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 lE(e){return e&&e.map((t,n)=>es.createElement(t.tag,bl({key:n},t.attr),lE(t.child)))}function dt(e){return t=>es.createElement(Gk,Tl({attr:bl({},e.attr)},t),lE(e.child))}function Gk(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=zk(e,$k),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),es.createElement("svg",Tl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:bl(bl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&es.createElement("title",null,a),e.children)};return aE!==void 0?es.createElement(aE.Consumer,null,n=>t(n)):t(oE)}function Xk(e){return dt({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 Kk(e){return dt({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 Qk(e){return dt({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 yr=({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:M(e,`${O}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:M(`${O}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),Jk="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",Zk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:s}=lt(),a=s==="messaging",l=r||(a?"Open Commerce Client":"Open Copilot"),d=a?w.jsx(Qk,{className:M(t,`${O}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||Jk,alt:"Copilot",className:M(t,`${O}-minimized-icon-img`)});return w.jsx(yr,{className:M(t,`${O}-minimized-button`),ariaLabel:l,title:l,icon:d,onClick:e})},e3=()=>{const{globalClassName:e,themeVariables:t}=lt(),n=()=>{Xs(!1),ni(!0),setTimeout(jk)};return io.createPortal(w.jsx("div",{className:M(e,`${O}-minimized-container`),style:t,children:w.jsx(Zk,{onClick:n})}),document.body)};function t3(e){return dt({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 cE(e){return dt({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 n3(e){return dt({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 Xf(e){return dt({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 r3(e){return dt({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 i3(e){return dt({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 s3(e){return dt({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 dE(e){return dt({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 fE(e){return dt({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 o3(e){return dt({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 a3(e){return dt({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 u3(e){return dt({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 l3(e){return dt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function c3(e){return dt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18 20H4V6h9V4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2v9zm-7.79-3.17-1.96-2.36L5.5 18h11l-3.54-4.71zM20 4V1h-2v3h-3c.01.01 0 2 0 2h3v2.99c.01.01 2 0 2 0V6h3V4h-3z"},child:[]}]})(e)}function d3(e){return dt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}function hE(e){return dt({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)}function $t(){const e=N.useContext(b1);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const f3=e=>({[`${qn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${qn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${qn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${qn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${qn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${qn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),h3=(e,t,n)=>e.size>n?{ok:!1,reason:"oversize"}:t.includes(e.type)?{ok:!0}:{ok:!1,reason:"type"},p3=({allowedMime:e=_g,maxBytes:t=of,onReject:n}={})=>{const[r,s]=N.useState(null),a=N.useCallback(l=>{const d=l&&"length"in l?l[0]:null;if(!d)return;const f=h3(d,e,t);if(!f.ok){n==null||n(f.reason);return}s(d)},[e,t,n]),u=N.useCallback(()=>s(null),[]);return{file:r,attach:a,clear:u}},pE=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:M(e,`${O}-close-button`),disabled:r,onClick:n,type:"button",children:w.jsx("svg",{"aria-hidden":"true",focusable:"false",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"})})}),m3=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const s=e.name||"",[a,u]=N.useState("");return N.useEffect(()=>{const l=URL.createObjectURL(e);return u(l),()=>URL.revokeObjectURL(l)},[e]),w.jsxs("div",{className:M(n,`cim-${t}-component`,`${O}-image-file-preview`),children:[w.jsx("img",{className:M(n,`cim-${t}-component`,`${O}-image-preview`),src:a,alt:`${s} preview`,loading:"lazy"}),w.jsx("span",{className:M(n,`cim-${t}-component`,`${O}-image-file-name`),title:s,children:s}),w.jsx(pE,{className:M(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})},g3=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:s,className:a,icon:u=w.jsx(d3,{}),onFiles:l})=>{const d=N.useRef(null),f=N.useId(),p=r!=null?r:f,m=N.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=N.useCallback(y=>{const _=y.target;l(_.files),_.value=""},[l]);return w.jsxs("button",{type:"button",className:M(s,a,`cim-${e}-component`,n&&"disabled",`${O}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[w.jsx("span",{className:M(s,a,`cim-${e}-component`,n&&"disabled",`${O}-image-upload-label`),"aria-hidden":"true",children:u}),w.jsx("input",{ref:d,className:M(s,a,`cim-${e}-component`,`${O}-file-input`),type:"file",id:p,accept:t,name:`${O}-file-input`,disabled:n,onInput:T})]})},Kf=({className:e,children:t,type:n,disabled:r=!1,onClick:s,"aria-label":a})=>w.jsx("button",{"aria-label":a,className:M(`${O}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),E3=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:M(`${O}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Xf,{size:"16px"})},y3=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(yr,{className:M(e,n,`cim-${r}-component`,`${O}-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(Xf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(Kf,{className:M(e,n,`cim-${r}-component`,`${O}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(E3,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function $j(){}function zj(){}function mE(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 gE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const T3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w3={};function EE(e,t){return(w3.jsx?b3:T3).test(e)}const x3=/[ \t\n\f\r]/g;function _3(e){return typeof e=="object"?e.type==="text"?yE(e.value):!1:yE(e)}function yE(e){return e.replace(x3,"")===""}class Ta{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ta.prototype.normal={},Ta.prototype.property={},Ta.prototype.space=void 0;function TE(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ta(n,r,t)}function ba(e){return e.toLowerCase()}class Ln{constructor(t,n){this.attribute=n,this.property=t}}Ln.prototype.attribute="",Ln.prototype.booleanish=!1,Ln.prototype.boolean=!1,Ln.prototype.commaOrSpaceSeparated=!1,Ln.prototype.commaSeparated=!1,Ln.prototype.defined=!1,Ln.prototype.mustUseProperty=!1,Ln.prototype.number=!1,Ln.prototype.overloadedBoolean=!1,Ln.prototype.property="",Ln.prototype.spaceSeparated=!1,Ln.prototype.space=void 0;let S3=0;const Je=cs(),Yt=cs(),Qf=cs(),we=cs(),xt=cs(),ls=cs(),Yn=cs();function cs(){return Dd(2,++S3)}const Jf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:Yt,commaOrSpaceSeparated:Yn,commaSeparated:ls,number:we,overloadedBoolean:Qf,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),Zf=Object.keys(Jf);class eh extends Ln{constructor(t,n,r,s){let a=-1;if(super(t,n),bE(this,"space",s),typeof r=="number")for(;++a<Zf.length;){const u=Zf[a];bE(this,Zf[a],(r&Jf[u])===Jf[u])}}}eh.prototype.defined=!0;function bE(e,t,n){n&&(e[t]=n)}function so(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new eh(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ba(r)]=r,n[ba(a.attribute)]=r}return new Ta(t,n,e.space)}const wE=so({properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:xt,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:we,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:xt,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:Yt,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function xE(e,t){return t in e?e[t]:t}function _E(e,t){return xE(e,t.toLowerCase())}const v3=so({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ls,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alpha:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:xt,autoFocus:Je,autoPlay:Je,blocking:xt,capture:null,charSet:null,checked:Je,cite:null,className:xt,closedBy:null,colorSpace:null,cols:we,colSpan:we,command:null,commandFor:null,content:null,contentEditable:Yt,controls:Je,controlsList:xt,coords:we|ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:Qf,draggable:Yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:xt,height:we,hidden:Qf,high:we,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:xt,itemRef:xt,itemScope:Je,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,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:we,pattern:null,ping:xt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:xt,required:Je,reversed:Je,rows:we,rowSpan:we,sandbox:xt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootCustomElementRegistry:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shadowRootSerializable:Je,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:Yt,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,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:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Je,disablePictureInPicture:Je,disableRemotePlayback:Je,exportParts:ls,part:xt,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:_E}),A3=so({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:Yn,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:xt,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:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,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:ls,g2:ls,glyphName:ls,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:Yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,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:we,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:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yn,rev:Yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yn,requiredFeatures:Yn,requiredFonts:Yn,requiredFormats:Yn,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:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:Yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yn,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xE}),SE=so({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()}}),vE=so({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_E}),AE=so({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),C3={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"},N3=/[A-Z]/g,CE=/-[a-z]/g,k3=/^data[-\w.:]+$/i;function wl(e,t){const n=ba(t);let r=t,s=Ln;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&k3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(CE,I3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!CE.test(a)){let u=a.replace(N3,O3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=eh}return new s(r,t)}function O3(e){return"-"+e.toLowerCase()}function I3(e){return e.charAt(1).toUpperCase()}const wa=TE([wE,v3,SE,vE,AE],"html"),wi=TE([wE,A3,SE,vE,AE],"svg");function NE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function kE(e){return e.join(" ").trim()}var oo={},th,OE;function P3(){if(OE)return th;OE=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
24
|
`,f="/",p="*",m="",T="comment",y="declaration";function _(v,x){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];x=x||{};var k=1,I=1;function j(ae){var oe=ae.match(t);oe&&(k+=oe.length);var me=ae.lastIndexOf(d);I=~me?ae.length-me:I+ae.length}function q(){var ae={line:k,column:I};return function(oe){return oe.position=new R(ae),se(),oe}}function R(ae){this.start=ae,this.end={line:k,column:I},this.source=x.source}R.prototype.content=v;function X(ae){var oe=new Error(x.source+":"+k+":"+I+": "+ae);if(oe.reason=ae,oe.filename=x.source,oe.line=k,oe.column=I,oe.source=v,!x.silent)throw oe}function ne(ae){var oe=ae.exec(v);if(oe){var me=oe[0];return j(me),v=v.slice(me.length),oe}}function se(){ne(n)}function H(ae){var oe;for(ae=ae||[];oe=re();)oe!==!1&&ae.push(oe);return ae}function re(){var ae=q();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var oe=2;m!=v.charAt(oe)&&(p!=v.charAt(oe)||f!=v.charAt(oe+1));)++oe;if(oe+=2,m===v.charAt(oe-1))return X("End of comment missing");var me=v.slice(2,oe-2);return I+=2,j(me),v=v.slice(oe),I+=2,ae({type:T,comment:me})}}function V(){var ae=q(),oe=ne(r);if(oe){if(re(),!ne(s))return X("property missing ':'");var me=ne(a),de=ae({type:y,property:A(oe[0].replace(e,m)),value:me?A(me[0].replace(e,m)):m});return ne(u),de}}function ee(){var ae=[];H(ae);for(var oe;oe=V();)oe!==!1&&(ae.push(oe),H(ae));return ae}return se(),ee()}function A(v){return v?v.replace(l,m):m}return th=_,th}var IE;function R3(){if(IE)return oo;IE=1;var e=oo&&oo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oo,"__esModule",{value:!0}),oo.default=n;const t=e(P3());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 oo}var xa={},PE;function L3(){if(PE)return xa;PE=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.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 xa.camelCase=d,xa}var _a,RE;function D3(){if(RE)return _a;RE=1;var e=_a&&_a.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(R3()),n=L3();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,_a=r,_a}var M3=D3();const F3=nt(M3),xl=LE("end"),Ur=LE("start");function LE(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 DE(e){const t=Ur(e),n=xl(e);if(t&&n)return{start:t,end:n}}function Sa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ME(e.position):"start"in e||"end"in e?ME(e):"line"in e||"column"in e?nh(e):""}function nh(e){return FE(e&&e.line)+":"+FE(e&&e.column)}function ME(e){return nh(e&&e.start)+"-"+nh(e&&e.end)}function FE(e){return e&&typeof e=="number"?e:1}class En 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=F({},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=Sa(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}}En.prototype.file="",En.prototype.name="",En.prototype.reason="",En.prototype.message="",En.prototype.stack="",En.prototype.column=void 0,En.prototype.line=void 0,En.prototype.ancestors=void 0,En.prototype.cause=void 0,En.prototype.fatal=void 0,En.prototype.place=void 0,En.prototype.ruleId=void 0,En.prototype.source=void 0;const rh={}.hasOwnProperty,B3=new Map,U3=/[A-Z]/g,H3=new Set(["table","tbody","thead","tfoot","tr"]),j3=new Set(["td","th"]),BE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $3(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=K3(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=X3(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"?wi:wa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=UE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function UE(e,t,n){if(t.type==="element")return z3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return V3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return W3(e,t,n);if(t.type==="mdxjsEsm")return q3(e,t);if(t.type==="root")return Y3(e,t,n);if(t.type==="text")return G3(e,t)}function z3(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=wi,e.schema=s),e.ancestors.push(t);const a=jE(e,t.tagName,!1),u=Q3(e,t);let l=sh(e,t);return H3.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!_3(d):!0})),HE(e,u,a,t),ih(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function V3(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)}va(e,t.position)}function q3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);va(e,t.position)}function W3(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=wi,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:jE(e,t.name,!0),u=J3(e,t),l=sh(e,t);return HE(e,u,a,t),ih(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Y3(e,t,n){const r={};return ih(r,sh(e,t)),e.create(t,e.Fragment,r,n)}function G3(e,t){return t.value}function HE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ih(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function X3(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 K3(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=Ur(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 Q3(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&rh.call(t.properties,s)){const a=Z3(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&j3.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 J3(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 va(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 va(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function sh(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:B3;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=UE(e,a,u);l!==void 0&&n.push(l)}return n}function Z3(e,t,n){const r=wl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?gE(n):kE(n)),r.property==="style"){let s=typeof n=="object"?n:eO(e,String(n));return e.stylePropertyNameCase==="css"&&(s=tO(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?C3[r.property]||r.property:r.attribute,n]}}function eO(e,t){try{return F3(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new En("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=BE+"#cannot-parse-style-attribute",s}}function jE(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=EE(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=EE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return rh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);va(e)}function va(e,t){const n=new En("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=BE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function tO(e){const t={};let n;for(n in e)rh.call(e,n)&&(t[nO(n)]=e[n]);return t}function nO(e){let t=e.replace(U3,rO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function rO(e){return"-"+e.toLowerCase()}const oh={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"]},iO={};function ah(e,t){const n=iO,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $E(e,r,s)}function $E(e,t,n){if(sO(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 zE(e.children,t,n)}return Array.isArray(e)?zE(e,t,n):""}function zE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=$E(e[s],t,n);return r.join("")}function sO(e){return!!(e&&typeof e=="object")}const VE=document.createElement("i");function uh(e){const t="&"+e+";";VE.innerHTML=t;const n=VE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Gn(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 tr(e,t){return e.length>0?(Gn(e,e.length,0,t),e):t}const qE={}.hasOwnProperty;function WE(e){const t={};let n=-1;for(;++n<e.length;)oO(t,e[n]);return t}function oO(e,t){let n;for(n in t){const s=(qE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){qE.call(s,u)||(s[u]=[]);const l=a[u];aO(s[u],Array.isArray(l)?l:l?[l]:[])}}}function aO(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Gn(e,0,0,r)}function YE(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 Tr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Cn=xi(/[A-Za-z]/),yn=xi(/[\dA-Za-z]/),uO=xi(/[#-'*+\--9=?A-Z^-~]/);function _l(e){return e!==null&&(e<32||e===127)}const lh=xi(/\d/),lO=xi(/[\dA-Fa-f]/),cO=xi(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function _t(e){return e!==null&&(e<0||e===32)}function rt(e){return e===-2||e===-1||e===32}const Sl=xi(new RegExp("\\p{P}|\\p{S}","u")),ds=xi(/\s/);function xi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ao(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&yn(e.charCodeAt(n+1))&&yn(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 rt(d)?(e.enter(n),l(d)):t(d)}function l(d){return rt(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const dO={tokenize:fO};function fO(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 hO={tokenize:pO},GE={tokenize:mO};function pO(e){const t=this,n=[];let r=0,s,a,u;return l;function l(I){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const j=t.events.length;let q=j,R;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){R=t.events[q][1].end;break}x(r);let X=j;for(;X<t.events.length;)t.events[X][1].end=F({},R),X++;return Gn(t.events,q+1,0,t.events.slice(j)),t.events.length=X,f(I)}return l(I)}function f(I){if(r===n.length){if(!s)return T(I);if(s.currentConstruct&&s.currentConstruct.concrete)return _(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(GE,p,m)(I)}function p(I){return s&&k(),x(r),T(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(I)}function T(I){return t.containerState={},e.attempt(GE,y,_)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),T(I)}function _(I){if(I===null){s&&k(),x(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(I)}function A(I){if(I===null){v(e.exit("chunkFlow"),!0),x(0),e.consume(I);return}return Ve(I)?(e.consume(I),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),A)}function v(I,j){const q=t.sliceStream(I);if(j&&q.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(q),t.parser.lazy[I.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<u&&(!s.events[R][1].end||s.events[R][1].end.offset>u))return;const X=t.events.length;let ne=X,se,H;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(se){H=t.events[ne][1].end;break}se=!0}for(x(r),R=X;R<t.events.length;)t.events[R][1].end=F({},H),R++;Gn(t.events,ne+1,0,t.events.slice(X)),t.events.length=R}}function x(I){let j=n.length;for(;j-- >I;){const q=n[j];t.containerState=q[1],q[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 mO(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 uo(e){if(e===null||_t(e)||ds(e))return 1;if(Sl(e))return 2}function vl(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 ch={name:"attention",resolveAll:gO,tokenize:EO};function gO(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=F({},e[r][1].end),T=F({},e[n][1].start);XE(m,-d),XE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},l.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=tr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=tr(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=tr(f,vl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=tr(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=tr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Gn(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 EO(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=uo(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=uo(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function XE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const yO={name:"autolink",tokenize:TO};function TO(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 Cn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||yn(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||yn(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||_l(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):uO(y)?(e.consume(y),f):n(y)}function p(y){return yn(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):T(y)}function T(y){if((y===45||yn(y))&&r++<63){const _=y===45?T:m;return e.consume(y),_}return n(y)}}const Aa={partial:!0,tokenize:bO};function bO(e,t,n){return r;function r(a){return rt(a)?at(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ve(a)?t(a):n(a)}}const KE={continuation:{tokenize:xO},exit:_O,name:"blockQuote",tokenize:wO};function wO(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 rt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function xO(e,t,n){const r=this;return s;function s(u){return rt(u)?at(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(KE,t,n)(u)}}function _O(e){e.exit("blockQuote")}const QE={name:"characterEscape",tokenize:SO};function SO(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 cO(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const JE={name:"characterReference",tokenize:vO};function vO(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=yn,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=lO,p):(e.enter("characterReferenceValue"),a=7,u=lh,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===yn&&!uh(r.sliceSerialize(T))?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 ZE={partial:!0,tokenize:CO},ey={concrete:!0,name:"codeFenced",tokenize:AO};function AO(e,t,n){const r=this,s={partial:!0,tokenize:q};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const X=r.events[r.events.length-1];return a=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),rt(R)?at(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Ve(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(ZE,A,j)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||Ve(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):rt(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||Ve(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(R))}function _(R){return R===null||Ve(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),_)}function A(R){return e.attempt(s,j,v)(R)}function v(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return a>0&&rt(R)?at(e,k,"linePrefix",a+1)(R):k(R)}function k(R){return R===null||Ve(R)?e.check(ZE,A,j)(R):(e.enter("codeFlowValue"),I(R))}function I(R){return R===null||Ve(R)?(e.exit("codeFlowValue"),k(R)):(e.consume(R),I)}function j(R){return e.exit("codeFenced"),t(R)}function q(R,X,ne){let se=0;return H;function H(oe){return R.enter("lineEnding"),R.consume(oe),R.exit("lineEnding"),re}function re(oe){return R.enter("codeFencedFence"),rt(oe)?at(R,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):V(oe)}function V(oe){return oe===l?(R.enter("codeFencedFenceSequence"),ee(oe)):ne(oe)}function ee(oe){return oe===l?(se++,R.consume(oe),ee):se>=u?(R.exit("codeFencedFenceSequence"),rt(oe)?at(R,ae,"whitespace")(oe):ae(oe)):ne(oe)}function ae(oe){return oe===null||Ve(oe)?(R.exit("codeFencedFence"),X(oe)):ne(oe)}}}function CO(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 dh={name:"codeIndented",tokenize:kO},NO={partial:!0,tokenize:OO};function kO(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(NO,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 OO(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 IO={name:"codeText",previous:RO,resolve:PO,tokenize:LO};function PO(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 RO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function LO(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 DO{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&&Ca(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),Ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ca(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);Ca(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ca(this.left,n.reverse())}}}function Ca(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 ty(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new DO(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,MO(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=F({},p.get(s)[1].start),l=p.slice(s,n),l.unshift(r),p.splice(s,n-s+1,l))}}return Gn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function MO(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,T=-1,y=n,_=0,A=0;const v=[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;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(A=T+1,v.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),T=v.length;T--;){const x=l.slice(v[T],v[T+1]),k=a.pop();d.push([k,k+x.length-1]),e.splice(k,2,x)}for(d.reverse(),T=-1;++T<d.length;)f[_+d[T][0]]=_+d[T][1],_+=d[T][1]-d[T][0]-1;return f}const FO={resolve:UO,tokenize:HO},BO={partial:!0,tokenize:jO};function UO(e){return ty(e),e}function HO(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(BO,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 jO(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 ny(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(x){return x===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(x),e.exit(a),T):x===null||x===32||x===41||_l(x)?n(x):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),A(x))}function T(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===62?(e.exit("chunkString"),e.exit(l),T(x)):x===null||x===60||Ve(x)?n(x):(e.consume(x),x===92?_:y)}function _(x){return x===60||x===62||x===92?(e.consume(x),y):y(x)}function A(x){return!p&&(x===null||x===41||_t(x))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(x)):p<f&&x===40?(e.consume(x),p++,A):x===41?(e.consume(x),p--,A):x===null||x===32||x===40||_l(x)?n(x):(e.consume(x),x===92?v:A)}function v(x){return x===40||x===41||x===92?(e.consume(x),A):A(x)}}function ry(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=!rt(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function iy(e,t,n,r,s,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Ve(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),at(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Ve(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Na(e,t){let n;return r;function r(s){return Ve(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):rt(s)?at(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const $O={name:"definition",tokenize:VO},zO={partial:!0,tokenize:qO};function VO(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return ry.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=Tr(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 _t(y)?Na(e,f)(y):f(y)}function f(y){return ny(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(zO,m,m)(y)}function m(y){return rt(y)?at(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Ve(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function qO(e,t,n){return r;function r(l){return _t(l)?Na(e,s)(l):n(l)}function s(l){return iy(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return rt(l)?at(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Ve(l)?t(l):n(l)}}const WO={name:"hardBreakEscape",tokenize:YO};function YO(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 GO={name:"headingAtx",resolve:XO,tokenize:KO};function XO(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"},Gn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function KO(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||_t(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)):rt(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||_t(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const QO=["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"],sy=["pre","script","style","textarea"],JO={concrete:!0,name:"htmlFlow",resolveTo:tI,tokenize:nI},ZO={partial:!0,tokenize:iI},eI={partial:!0,tokenize:rI};function tI(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 nI(e,t,n){const r=this;let s,a,u,l,d;return f;function f(L){return p(L)}function p(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),m}function m(L){return L===33?(e.consume(L),T):L===47?(e.consume(L),a=!0,A):L===63?(e.consume(L),s=3,r.interrupt?t:C):Cn(L)?(e.consume(L),u=String.fromCharCode(L),v):n(L)}function T(L){return L===45?(e.consume(L),s=2,y):L===91?(e.consume(L),s=5,l=0,_):Cn(L)?(e.consume(L),s=4,r.interrupt?t:C):n(L)}function y(L){return L===45?(e.consume(L),r.interrupt?t:C):n(L)}function _(L){const xe="CDATA[";return L===xe.charCodeAt(l++)?(e.consume(L),l===xe.length?r.interrupt?t:V:_):n(L)}function A(L){return Cn(L)?(e.consume(L),u=String.fromCharCode(L),v):n(L)}function v(L){if(L===null||L===47||L===62||_t(L)){const xe=L===47,De=u.toLowerCase();return!xe&&!a&&sy.includes(De)?(s=1,r.interrupt?t(L):V(L)):QO.includes(u.toLowerCase())?(s=6,xe?(e.consume(L),x):r.interrupt?t(L):V(L)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):a?k(L):I(L))}return L===45||yn(L)?(e.consume(L),u+=String.fromCharCode(L),v):n(L)}function x(L){return L===62?(e.consume(L),r.interrupt?t:V):n(L)}function k(L){return rt(L)?(e.consume(L),k):H(L)}function I(L){return L===47?(e.consume(L),H):L===58||L===95||Cn(L)?(e.consume(L),j):rt(L)?(e.consume(L),I):H(L)}function j(L){return L===45||L===46||L===58||L===95||yn(L)?(e.consume(L),j):q(L)}function q(L){return L===61?(e.consume(L),R):rt(L)?(e.consume(L),q):I(L)}function R(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),d=L,X):rt(L)?(e.consume(L),R):ne(L)}function X(L){return L===d?(e.consume(L),d=null,se):L===null||Ve(L)?n(L):(e.consume(L),X)}function ne(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||_t(L)?q(L):(e.consume(L),ne)}function se(L){return L===47||L===62||rt(L)?I(L):n(L)}function H(L){return L===62?(e.consume(L),re):n(L)}function re(L){return L===null||Ve(L)?V(L):rt(L)?(e.consume(L),re):n(L)}function V(L){return L===45&&s===2?(e.consume(L),me):L===60&&s===1?(e.consume(L),de):L===62&&s===4?(e.consume(L),B):L===63&&s===3?(e.consume(L),C):L===93&&s===5?(e.consume(L),le):Ve(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ZO,Z,ee)(L)):L===null||Ve(L)?(e.exit("htmlFlowData"),ee(L)):(e.consume(L),V)}function ee(L){return e.check(eI,ae,Z)(L)}function ae(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),oe}function oe(L){return L===null||Ve(L)?ee(L):(e.enter("htmlFlowData"),V(L))}function me(L){return L===45?(e.consume(L),C):V(L)}function de(L){return L===47?(e.consume(L),u="",W):V(L)}function W(L){if(L===62){const xe=u.toLowerCase();return sy.includes(xe)?(e.consume(L),B):V(L)}return Cn(L)&&u.length<8?(e.consume(L),u+=String.fromCharCode(L),W):V(L)}function le(L){return L===93?(e.consume(L),C):V(L)}function C(L){return L===62?(e.consume(L),B):L===45&&s===2?(e.consume(L),C):V(L)}function B(L){return L===null||Ve(L)?(e.exit("htmlFlowData"),Z(L)):(e.consume(L),B)}function Z(L){return e.exit("htmlFlow"),t(L)}}function rI(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 iI(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Aa,t,n)}}const sI={name:"htmlText",tokenize:oI};function oI(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),q):C===63?(e.consume(C),I):Cn(C)?(e.consume(C),ne):n(C)}function f(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,_):Cn(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),T):Ve(C)?(u=m,de(C)):(e.consume(C),m)}function T(C){return C===45?(e.consume(C),y):m(C)}function y(C){return C===62?me(C):C===45?T(C):m(C)}function _(C){const B="CDATA[";return C===B.charCodeAt(a++)?(e.consume(C),a===B.length?A:_):n(C)}function A(C){return C===null?n(C):C===93?(e.consume(C),v):Ve(C)?(u=A,de(C)):(e.consume(C),A)}function v(C){return C===93?(e.consume(C),x):A(C)}function x(C){return C===62?me(C):C===93?(e.consume(C),x):A(C)}function k(C){return C===null||C===62?me(C):Ve(C)?(u=k,de(C)):(e.consume(C),k)}function I(C){return C===null?n(C):C===63?(e.consume(C),j):Ve(C)?(u=I,de(C)):(e.consume(C),I)}function j(C){return C===62?me(C):I(C)}function q(C){return Cn(C)?(e.consume(C),R):n(C)}function R(C){return C===45||yn(C)?(e.consume(C),R):X(C)}function X(C){return Ve(C)?(u=X,de(C)):rt(C)?(e.consume(C),X):me(C)}function ne(C){return C===45||yn(C)?(e.consume(C),ne):C===47||C===62||_t(C)?se(C):n(C)}function se(C){return C===47?(e.consume(C),me):C===58||C===95||Cn(C)?(e.consume(C),H):Ve(C)?(u=se,de(C)):rt(C)?(e.consume(C),se):me(C)}function H(C){return C===45||C===46||C===58||C===95||yn(C)?(e.consume(C),H):re(C)}function re(C){return C===61?(e.consume(C),V):Ve(C)?(u=re,de(C)):rt(C)?(e.consume(C),re):se(C)}function V(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,ee):Ve(C)?(u=V,de(C)):rt(C)?(e.consume(C),V):(e.consume(C),ae)}function ee(C){return C===s?(e.consume(C),s=void 0,oe):C===null?n(C):Ve(C)?(u=ee,de(C)):(e.consume(C),ee)}function ae(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||_t(C)?se(C):(e.consume(C),ae)}function oe(C){return C===47||C===62||_t(C)?se(C):n(C)}function me(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"),W}function W(C){return rt(C)?at(e,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):le(C)}function le(C){return e.enter("htmlTextData"),u(C)}}const fh={name:"labelEnd",resolveAll:cI,resolveTo:dI,tokenize:fI},aI={tokenize:hI},uI={tokenize:pI},lI={tokenize:mI};function cI(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&&Gn(e,0,e.length,n),e}function dI(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:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=tr(l,e.slice(a+1,a+r+3)),l=tr(l,[["enter",p,t]]),l=tr(l,vl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=tr(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=tr(l,e.slice(u+1)),l=tr(l,[["exit",d,t]]),Gn(e,a,e.length,l),e}function fI(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(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(Tr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(aI,p,u?p:m)(T):T===91?e.attempt(uI,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(lI,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function hI(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 _t(m)?Na(e,a)(m):a(m)}function a(m){return m===41?p(m):ny(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return _t(m)?Na(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?iy(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return _t(m)?Na(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 pI(e,t,n){const r=this;return s;function s(l){return ry.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function mI(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 gI={name:"labelStartImage",resolveAll:fh.resolveAll,tokenize:EI};function EI(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 yI={name:"labelStartLink",resolveAll:fh.resolveAll,tokenize:TI};function TI(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 hh={name:"lineEnding",tokenize:bI};function bI(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),at(e,t,"linePrefix")}}const Al={name:"thematicBreak",tokenize:wI};function wI(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"),rt(f)?at(e,l,"whitespace")(f):l(f))}}const Dn={continuation:{tokenize:vI},exit:CI,name:"list",tokenize:SI},xI={partial:!0,tokenize:NI},_I={partial:!0,tokenize:AI};function SI(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 _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:lh(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Al,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 lh(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(Aa,r.interrupt?n:p,e.attempt(xI,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return rt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function vI(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Aa,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||!rt(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(_I,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,at(e,e.attempt(Dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function AI(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 CI(e){e.exit(this.containerState.type)}function NI(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!rt(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const oy={name:"setextUnderline",resolveTo:kI,tokenize:OI};function kI(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:F({},e[r][1].start),end:F({},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=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function OI(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"),rt(f)?at(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ve(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const II={tokenize:PI};function PI(e){const t=this,n=e.attempt(Aa,r,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(FO,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 RI={resolveAll:uy()},LI=ay("string"),DI=ay("text");function ay(e){return{resolveAll:uy(e==="text"?MI: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 T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function uy(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 MI(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:F({},r.end)};r.end=F({},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 FI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:$O},disable:{null:[]},document:{42:Dn,43:Dn,45:Dn,48:Dn,49:Dn,50:Dn,51:Dn,52:Dn,53:Dn,54:Dn,55:Dn,56:Dn,57:Dn,62:KE},flow:{35:GO,42:Al,45:[oy,Al],60:JO,61:oy,95:Al,96:ey,126:ey},flowInitial:{[-2]:dh,[-1]:dh,32:dh},insideSpan:{null:[ch,RI]},string:{38:JE,92:QE},text:{[-5]:hh,[-4]:hh,[-3]:hh,33:gI,38:JE,42:ch,60:[yO,sI],91:yI,92:[WO,QE],93:fh,95:ch,96:IO}},Symbol.toStringTag,{value:"Module"}));function BI(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:X(q),check:X(R),consume:k,enter:I,exit:j,interrupt:X(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(re){return u=tr(u,re),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=vl(a,f.events,f),f.events)}function T(re,V){return HI(y(re),V)}function y(re){return UI(u,re)}function _(){const{_bufferIndex:re,_index:V,line:ee,column:ae,offset:oe}=r;return{_bufferIndex:re,_index:V,line:ee,column:ae,offset:oe}}function A(re){s[re.line]=re.column,H()}function v(){let re;for(;r._index<u.length;){const V=u[r._index];if(typeof V=="string")for(re=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===re&&r._bufferIndex<V.length;)x(V.charCodeAt(r._bufferIndex));else x(V)}}function x(re){p=p(re)}function k(re){Ve(re)?(r.line++,r.column=1,r.offset+=re===-3?2:1,H()):re!==-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=re}function I(re,V){const ee=V||{};return ee.type=re,ee.start=_(),f.events.push(["enter",ee,f]),l.push(ee),ee}function j(re){const V=l.pop();return V.end=_(),f.events.push(["exit",V,f]),V}function q(re,V){ne(re,V.from)}function R(re,V){V.restore()}function X(re,V){return ee;function ee(ae,oe,me){let de,W,le,C;return Array.isArray(ae)?Z(ae):"tokenize"in ae?Z([ae]):B(ae);function B(he){return Ne;function Ne(Ie){const Ze=Ie!==null&&he[Ie],gt=Ie!==null&&he.null,Dt=[...Array.isArray(Ze)?Ze:Ze?[Ze]:[],...Array.isArray(gt)?gt:gt?[gt]:[]];return Z(Dt)(Ie)}}function Z(he){return de=he,W=0,he.length===0?me:L(he[W])}function L(he){return Ne;function Ne(Ie){return C=se(),le=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?De():he.tokenize.call(V?Object.assign(Object.create(f),V):f,d,xe,De)(Ie)}}function xe(he){return re(le,C),oe}function De(he){return C.restore(),++W<de.length?L(de[W]):me}}}function ne(re,V){re.resolveAll&&!a.includes(re)&&a.push(re),re.resolve&&Gn(f.events,V,f.events.length-V,re.resolve(f.events.slice(V),f)),re.resolveTo&&(f.events=re.resolveTo(f.events,f))}function se(){const re=_(),V=f.previous,ee=f.currentConstruct,ae=f.events.length,oe=Array.from(l);return{from:ae,restore:me};function me(){r=re,f.previous=V,f.currentConstruct=ee,f.events.length=ae,l=oe,H()}}function H(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function UI(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 HI(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
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 jI(e){const r={constructs:WE([FI,...(e||{}).extensions||[]]),content:s(dO),defined:[],document:s(hO),flow:s(II),lazy:{},string:s(LI),text:s(DI)};return r;function s(a){return u;function u(l){return BI(r,a,l)}}}function $I(e){for(;!ty(e););return e}const ly=/[\0\t\n\r]/g;function zI(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,T,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(ly.lastIndex=m,f=ly.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-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=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const VI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qI(e){return e.replace(VI,WI)}function WI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return YE(n.slice(a?2:1),a?16:10)}return uh(n)||e}const cy={}.hasOwnProperty;function YI(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),GI(n)($I(jI(n).document().write(zI()(e,t,!0))))}function GI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Re),autolinkProtocol:se,autolinkEmail:se,atxHeading:a(pt),blockQuote:a(gt),characterEscape:se,characterReference:se,codeFenced:a(Dt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Dt,u),codeText:a(ft,u),codeTextData:se,data:se,codeFlowValue:se,definition:a(ht),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(vt),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(bt,u),htmlFlowData:se,htmlText:a(bt,u),htmlTextData:se,image:a(Gt),label:u,link:a(Re),listItem:a(ot),listItemValue:T,listOrdered:a(Ke,m),listUnordered:a(Ke),paragraph:a(Et),reference:L,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(pt),strong:a(Sr),thematicBreak:a(Os)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:Ze,autolinkProtocol:Ie,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:De,characterReferenceMarkerNumeric:De,characterReferenceValue:he,characterReference:Ne,codeFenced:d(v),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:d(x),codeText:d(oe),codeTextData:H,data:H,definition:d(),definitionDestinationString:j,definitionLabelString:k,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(V),hardBreakTrailing:d(V),htmlFlow:d(ee),htmlFlowData:H,htmlText:d(ae),htmlTextData:H,image:d(de),label:le,labelText:W,lineEnding:re,link:d(me),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:xe,resourceDestinationString:C,resourceTitleString:B,resource:Z,setextHeading:d(ne),setextHeadingLineSequence:X,setextHeadingText:R,strong:d(),thematicBreak:d()}};dy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ce){let _e={type:"root",children:[]};const Ye={stack:[_e],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},et=[];let it=-1;for(;++it<ce.length;)if(ce[it][1].type==="listOrdered"||ce[it][1].type==="listUnordered")if(ce[it][0]==="enter")et.push(it);else{const Xt=et.pop();it=s(ce,Xt,it)}for(it=-1;++it<ce.length;){const Xt=t[ce[it][0]];cy.call(Xt,ce[it][1].type)&&Xt[ce[it][1].type].call(Object.assign({sliceSerialize:ce[it][2].sliceSerialize},Ye),ce[it][1])}if(Ye.tokenStack.length>0){const Xt=Ye.tokenStack[Ye.tokenStack.length-1];(Xt[1]||fy).call(Ye,void 0,Xt[0])}for(_e.position={start:_i(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:_i(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<t.transforms.length;)_e=t.transforms[it](_e)||_e;return _e}function s(ce,_e,Ye){let et=_e-1,it=-1,Xt=!1,Un,Nn,ir,sr;for(;++et<=Ye;){const Ut=ce[et];switch(Ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ut[0]==="enter"?it++:it--,sr=void 0;break}case"lineEndingBlank":{Ut[0]==="enter"&&(Un&&!sr&&!it&&!ir&&(ir=et),sr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:sr=void 0}if(!it&&Ut[0]==="enter"&&Ut[1].type==="listItemPrefix"||it===-1&&Ut[0]==="exit"&&(Ut[1].type==="listUnordered"||Ut[1].type==="listOrdered")){if(Un){let or=et;for(Nn=void 0;or--;){const J=ce[or];if(J[1].type==="lineEnding"||J[1].type==="lineEndingBlank"){if(J[0]==="exit")continue;Nn&&(ce[Nn][1].type="lineEndingBlank",Xt=!0),J[1].type="lineEnding",Nn=or}else if(!(J[1].type==="linePrefix"||J[1].type==="blockQuotePrefix"||J[1].type==="blockQuotePrefixWhitespace"||J[1].type==="blockQuoteMarker"||J[1].type==="listItemIndent"))break}ir&&(!Nn||ir<Nn)&&(Un._spread=!0),Un.end=Object.assign({},Nn?ce[Nn][1].start:Ut[1].end),ce.splice(Nn||et,0,["exit",Un,Ut[2]]),et++,Ye++}if(Ut[1].type==="listItemPrefix"){const or={type:"listItem",_spread:!1,start:Object.assign({},Ut[1].start),end:void 0};Un=or,ce.splice(et,0,["enter",or,Ut[2]]),et++,Ye++,ir=void 0,sr=!0}}}return ce[_e][1]._spread=Xt,Ye}function a(ce,_e){return Ye;function Ye(et){l.call(this,ce(et),et),_e&&_e.call(this,et)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ce,_e,Ye){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([_e,Ye||void 0]),ce.position={start:_i(_e.start),end:void 0}}function d(ce){return _e;function _e(Ye){ce&&ce.call(this,Ye),f.call(this,Ye)}}function f(ce,_e){const Ye=this.stack.pop(),et=this.tokenStack.pop();if(et)et[0].type!==ce.type&&(_e?_e.call(this,ce,et[0]):(et[1]||fy).call(this,ce,et[0]));else throw new Error("Cannot close `"+ce.type+"` ("+Sa({start:ce.start,end:ce.end})+"): it’s not open");Ye.position.end=_i(ce.end)}function p(){return ah(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(ce){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=ce}function _(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=ce}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ce.replace(/(\r?\n|\r)$/g,"")}function k(ce){const _e=this.resume(),Ye=this.stack[this.stack.length-1];Ye.label=_e,Ye.identifier=Tr(this.sliceSerialize(ce)).toLowerCase()}function I(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ce}function j(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ce}function q(ce){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Ye=this.sliceSerialize(ce).length;_e.depth=Ye}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function X(ce){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function se(ce){const Ye=this.stack[this.stack.length-1].children;let et=Ye[Ye.length-1];(!et||et.type!=="text")&&(et=ks(),et.position={start:_i(ce.start),end:void 0},Ye.push(et)),this.stack.push(et)}function H(ce){const _e=this.stack.pop();_e.value+=this.sliceSerialize(ce),_e.position.end=_i(ce.end)}function re(ce){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ye=_e.children[_e.children.length-1];Ye.position.end=_i(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(se.call(this,ce),H.call(this,ce))}function V(){this.data.atHardBreak=!0}function ee(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ce}function ae(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ce}function oe(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ce}function me(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=_e,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function de(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=_e,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function W(ce){const _e=this.sliceSerialize(ce),Ye=this.stack[this.stack.length-2];Ye.label=qI(_e),Ye.identifier=Tr(_e).toLowerCase()}function le(){const ce=this.stack[this.stack.length-1],_e=this.resume(),Ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ye.type==="link"){const et=ce.children;Ye.children=et}else Ye.alt=_e}function C(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ce}function B(){const ce=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ce}function Z(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function xe(ce){const _e=this.resume(),Ye=this.stack[this.stack.length-1];Ye.label=_e,Ye.identifier=Tr(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function De(ce){this.data.characterReferenceType=ce.type}function he(ce){const _e=this.sliceSerialize(ce),Ye=this.data.characterReferenceType;let et;Ye?(et=YE(_e,Ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):et=uh(_e);const it=this.stack[this.stack.length-1];it.value+=et}function Ne(ce){const _e=this.stack.pop();_e.position.end=_i(ce.end)}function Ie(ce){H.call(this,ce);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(ce)}function Ze(ce){H.call(this,ce);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(ce)}function gt(){return{type:"blockquote",children:[]}}function Dt(){return{type:"code",lang:null,meta:null,value:""}}function ft(){return{type:"inlineCode",value:""}}function ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vt(){return{type:"emphasis",children:[]}}function pt(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function bt(){return{type:"html",value:""}}function Gt(){return{type:"image",title:null,url:"",alt:null}}function Re(){return{type:"link",title:null,url:"",children:[]}}function Ke(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function ot(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Sr(){return{type:"strong",children:[]}}function ks(){return{type:"text",value:""}}function Os(){return{type:"thematicBreak"}}}function _i(e){return{line:e.line,column:e.column,offset:e.offset}}function dy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?dy(e,r):XI(e,r)}}function XI(e,t){let n;for(n in t)if(cy.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 fy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Sa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Sa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Sa({start:t.start,end:t.end})+") is still open")}function KI(e){const t=this;t.parser=n;function n(r){return YI(r,fe(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function QI(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 JI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
@@ -29,12 +29,12 @@ Error generating stack: `+b.message+`
|
|
|
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
30
|
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function dP(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=py(n[r])}return t}function py(e){const t=e.spread;return t==null?e.children.length>1:t}function fP(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 hP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function mP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gP(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=Ur(t.children[1]),d=xl(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 EP(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],T={},y=u?u[d]:void 0;y&&(T.align=y);let _={type:"element",tagName:a,properties:T,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function yP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const my=9,gy=32;function TP(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(Ey(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(Ey(t.slice(s),s>0,!1)),a.join("")}function Ey(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===my||a===gy;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===my||a===gy;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function bP(e,t){const n={type:"text",value:TP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xP={blockquote:QI,break:JI,code:ZI,delete:eP,emphasis:tP,footnoteReference:nP,heading:rP,html:iP,imageReference:sP,image:oP,inlineCode:aP,linkReference:uP,link:lP,listItem:cP,list:fP,paragraph:hP,root:pP,strong:mP,table:gP,tableCell:yP,tableRow:EP,text:bP,thematicBreak:wP,toml:Cl,yaml:Cl,definition:Cl,footnoteDefinition:Cl};function Cl(){}const yy=-1,Nl=0,ka=1,kl=2,ph=3,mh=4,gh=5,Eh=6,Ty=7,by=8,{defineProperty:_P}=Object,wy=typeof self=="object"?self:globalThis,xy=(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 wy[e](t)},SP=(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 Nl:case yy:return n(u,s);case ka:{const l=n([],s);for(const d of u)l.push(r(d));return l}case kl:{const l=n({},s);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?_P(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case ph:return n(new Date(u),s);case mh:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case gh:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Eh:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case Ty:{const{name:l,message:d}=u;return n(typeof wy[l]=="function"?xy(l,d):new Error(d),s)}case by: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)}case"-0":return-0}return n(xy(a,u),s)};return r},_y=e=>SP(new Map,e)(0),fs="",{toString:vP}={},{keys:AP,is:CP}=Object,Oa=e=>{const t=typeof e;if(t!=="object"||!e)return[Nl,t];const n=vP.call(e).slice(8,-1);switch(n){case"Array":return[ka,fs];case"Object":return[kl,fs];case"Date":return[ph,fs];case"RegExp":return[mh,fs];case"Map":return[gh,fs];case"Set":return[Eh,fs];case"DataView":return[ka,n]}return n.includes("Array")?[ka,n]:e instanceof Error?[Ty,e.name||"Error"]:[kl,n]},Ol=([e,t])=>e===Nl&&(t==="function"||t==="symbol"),NP=(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]=Oa(u);switch(l){case Nl:{let p=u;switch(d){case"bigint":l=by,p=u.toString();break;case"number":if(!u&&CP(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([yy],u)}return s([l,p],u)}case ka:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),s([d,[...T]],u)}const p=[],m=s([l,p],u);for(const T of u)p.push(a(T));return m}case kl:{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 T of AP(u))(e||!Ol(Oa(u[T])))&&p.push([a(T),a(u[T])]);return m}case ph:return s([l,isNaN(u.getTime())?fs:u.toISOString()],u);case mh:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case gh:{const p=[],m=s([l,p],u);for(const[T,y]of u)(e||!(Ol(Oa(T))||Ol(Oa(y))))&&p.push([a(T),a(y)]);return m}case Eh:{const p=[],m=s([l,p],u);for(const T of u)(e||!Ol(Oa(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},Sy=(e,{json:t,lossy:n}={})=>{const r=[];return NP(!(t||n),!!t,new Map,r)(e),r},hs=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?_y(Sy(e,t)):structuredClone(e):(e,t)=>_y(Sy(e,t));function kP(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 OP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function IP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kP,r=e.options.footnoteBackLabel||OP,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(),T=ao(m.toLowerCase());let y=0;const _=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++y<=A;){_.length>0&&_.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else p.push(..._);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:fe(F({},hs(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 Il=(function(e){if(e==null)return DP;if(typeof e=="function")return Pl(e);if(typeof e=="object")return Array.isArray(e)?PP(e):RP(e);if(typeof e=="string")return LP(e);throw new Error("Expected function, string, or object as test")});function PP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Il(e[n]);return Pl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function RP(e){const t=e;return Pl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function LP(e){return Pl(t);function t(n){return n&&n.type===e}}function Pl(e){return t;function t(n,r,s){return!!(MP(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function DP(){return!0}function MP(e){return e!==null&&typeof e=="object"&&"type"in e}function
|
|
32
|
+
`}]}}const Il=(function(e){if(e==null)return DP;if(typeof e=="function")return Pl(e);if(typeof e=="object")return Array.isArray(e)?PP(e):RP(e);if(typeof e=="string")return LP(e);throw new Error("Expected function, string, or object as test")});function PP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Il(e[n]);return Pl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function RP(e){const t=e;return Pl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function LP(e){return Pl(t);function t(n){return n&&n.type===e}}function Pl(e){return t;function t(n,r,s){return!!(MP(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function DP(){return!0}function MP(e){return e!==null&&typeof e=="object"&&"type"in e}function Zj(e){return e}const vy=[],FP=!0,yh=!1,BP="skip";function Ay(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Il(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(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=vy,_,A,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=UP(n(d,p)),y[0]===yh))return y;if("children"in d&&d.children){const x=d;if(x.children&&y[0]!==BP)for(A=(r?x.children.length:-1)+u,v=p.concat(x);A>-1&&A<x.children.length;){const k=x.children[A];if(_=l(k,A,v)(),_[0]===yh)return _;A=typeof _[1]=="number"?_[1]:A+u}}return y}}}function UP(e){return Array.isArray(e)?e:typeof e=="number"?[FP,e]:e==null?vy:[e]}function Rl(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),Ay(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 Th={}.hasOwnProperty,HP={};function jP(e,t){const n=t||HP,r=new Map,s=new Map,a=new Map,u=F(F({},xP),n.handlers),l={all:f,applyData:zP,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:$P,wrap:qP};return Rl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(Th.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const A=p,{children:v}=A,x=vn(A,["children"]),k=hs(x);return k.children=l.all(p),k}return hs(p)}return(l.options.unknownHandler||VP)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const _=l.one(T[y],p);if(_){if(y&&T[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=Cy(_.value)),!Array.isArray(_)&&_.type==="element")){const A=_.children[0];A&&A.type==="text"&&(A.value=Cy(A.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function $P(e,t){e.position&&(t.position=DE(e))}function zP(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,hs(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function VP(e,t){const n=t.data||{},r="value"in t&&!(Th.call(n,"hProperties")||Th.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 qP(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
35
|
`}),n}function Cy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ny(e,t){const n=jP(e,t),r=n.one(e,void 0),s=IP(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
36
36
|
`},s),a}function WP(e,t){return e&&"run"in e?function(n,r){return ke(this,null,function*(){const s=Ny(n,F({file:r},t));yield e.run(s,r)})}:function(n,r){return Ny(n,F({file:r},e||t))}}function ky(e){if(e)throw e}var bh,Oy;function YP(){if(Oy)return bh;Oy=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 T;for(T in f);return typeof T=="undefined"||e.call(f,T)},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 bh=function d(){var f,p,m,T,y,_,A=arguments[0],v=1,x=arguments.length,k=!1;for(typeof A=="boolean"&&(k=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});v<x;++v)if(f=arguments[v],f!=null)for(p in f)m=l(A,p),T=l(f,p),A!==T&&(k&&T&&(a(T)||(y=s(T)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(k,_,T)})):typeof T!="undefined"&&u(A,{name:p,newValue:T}));return A},bh}var GP=YP();const wh=nt(GP);function xh(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 XP(){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?KP(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 KP(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 Hr={basename:QP,dirname:JP,extname:ZP,join:eR,sep:"/"};function QP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ia(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 JP(e){if(Ia(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 ZP(e){Ia(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 eR(...e){let t=-1,n;for(;++t<e.length;)Ia(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":tR(n)}function tR(e){Ia(e);const t=e.codePointAt(0)===47;let n=nR(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function nR(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 Ia(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const rR={cwd:iR};function iR(){return"/"}function _h(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sR(e){if(typeof e=="string")e=new URL(e);else if(!_h(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 oR(e)}function oR(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 Sh=["history","path","basename","stem","extname","dirname"];class Iy{constructor(t){let n;t?_h(t)?n={path:t}:typeof t=="string"||aR(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":rR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Sh.length;){const a=Sh[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)Sh.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Hr.basename(this.path):void 0}set basename(t){Ah(t,"basename"),vh(t,"basename"),this.path=Hr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Hr.dirname(this.path):void 0}set dirname(t){Py(this.basename,"dirname"),this.path=Hr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Hr.extname(this.path):void 0}set extname(t){if(vh(t,"extname"),Py(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=Hr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_h(t)&&(t=sR(t)),Ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Hr.basename(this.path,this.extname):void 0}set stem(t){Ah(t,"stem"),vh(t,"stem"),this.path=Hr.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 En(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 vh(e,t){if(e&&e.includes(Hr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Hr.sep+"`")}function Ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Py(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function aR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uR=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),lR={}.hasOwnProperty;class Ch extends uR{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=XP()}copy(){const t=new Ch;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(wh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Oh("data",this.frozen),this.namespace[t]=n,this):lR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Oh("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=Ll(t),r=this.parser||this.Parser;return Nh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Nh("process",this.parser||this.Parser),kh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=Ll(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,_=r.stringify(y,T);fR(_)?T.value=_:T.result=_,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Nh("processSync",this.parser||this.Parser),kh("processSync",this.compiler||this.Compiler),this.process(t,s),Ly("processSync","process",n),r;function s(a,u){n=!0,ky(a),r=u}}run(t,n,r){Ry(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=Ll(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),Ly("runSync","run",r),s;function a(u,l){ky(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=Ll(n),s=this.compiler||this.Compiler;return kh("stringify",s),Ry(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Oh("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=wh(!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,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const A=r[T][1];xh(A)&&xh(y)&&(y=wh(!0,A,y)),r[T]=[f,y,..._]}}}}const cR=new Ch().freeze();function Nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Oh(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 Ry(e){if(!xh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ly(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ll(e){return dR(e)?e:new Iy(e)}function dR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fR(e){return typeof e=="string"||hR(e)}function hR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Dy=[],My={allowDangerousHtml:!0},mR=/^(https?|ircs?|mailto|xmpp)$/i,gR=[{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 Fy(e){const t=ER(e),n=yR(e);return TR(t.runSync(t.parse(n),n),e)}function ER(e){const t=e.rehypePlugins||Dy,n=e.remarkPlugins||Dy,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),My):My;return cR().use(KI).use(n).use(WP,r).use(t)}function yR(e){const t=e.children||"",n=new Iy;return typeof t=="string"&&(n.value=t),n}function TR(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||bR;for(const p of gR)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+pR+p.id,void 0);return Rl(e,f),$3(e,{Fragment:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in oh)if(Object.hasOwn(oh,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],A=oh[y];(A===null||A.includes(p.tagName))&&(p.properties[y]=d(String(_||""),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,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function bR(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||mR.test(e.slice(0,t))?e:""}const By=/[#.]/g;function wR(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){By.lastIndex=s;const l=By.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 Uy(e,t,n){const r=n?vR(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=wR(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,xR(u))l.unshift(u);else for(const[m,T]of Object.entries(u))_R(e,d.properties,m,T)}for(const f of l)Ih(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function xR(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 _R(e,t,n,r){const s=wl(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=NE(r):s.commaSeparated?a=mE(r):s.commaOrSpaceSeparated?a=NE(mE(r).join(" ")):a=Hy(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?SR(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(Hy(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function Ih(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)Ih(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ih(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Hy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ba(n)===ba(t)))return!0}return n}function SR(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function vR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const AR=["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"],CR=Uy(wa,"div"),NR=Uy(wi,"g",AR);function kR(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=jy(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=jy(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 jy(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 ps={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/"},$y={}.hasOwnProperty,OR=Object.prototype;function IR(e,t){const n=t||{};return Ph({file:n.file||void 0,location:!1,schema:n.space==="svg"?wi:wa,verbose:n.verbose||!1},e)}function Ph(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Dl(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:zy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=kR(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"},Dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Dl(e,r,n),n}default:return n=PR(e,t),n}}function zy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Ph(e,t[n]);r.push(s)}return r}function PR(e,t){const n=e.schema;e.schema=t.namespaceURI===ps.svg?wi:wa;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;$y.call(OR,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?NR:CR)(t.tagName,s,zy(e,t.childNodes));if(Dl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&lo(d.startTag),p=d&&d.endTag&&lo(d.endTag),m=Ph(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=RR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function RR(e,t,n){const r=lo(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)$y.call(n.attrs,u)&&(a[wl(e.schema,u).property]=lo(n.attrs[u]));n.startTag;const l=lo(n.startTag),d=n.endTag?lo(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function lo(e){const t=Vy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Vy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Vy(e){return e.line&&e.column?e:void 0}const qy={}.hasOwnProperty;function Wy(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&qy.call(s,e)){const d=String(s[e]);u=qy.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 LR={},DR={}.hasOwnProperty,Yy=Wy("type",{handlers:{root:FR,element:$R,text:HR,comment:jR,doctype:UR}});function MR(e,t){const r=(t||LR).space;return Yy(e,r==="svg"?wi:wa)}function FR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Rh(e.children,n,t),co(e,n),n}function BR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Rh(e.children,n,t),co(e,n),n}function UR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return co(e,t),t}function HR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return co(e,t),t}function jR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return co(e,t),t}function $R(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=wi);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&DR.call(e.properties,a)){const d=zR(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ps[u],childNodes:[],parentNode:null};return l.childNodes=Rh(e.children,l,r),co(e,l),e.tagName==="template"&&e.content&&(l.content=BR(e.content,r)),l}function zR(e,t,n){const r=wl(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?gE(n):kE(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=ps[r.space]}return s}function Rh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=Yy(e[r],n);a.parentNode=t,s.push(a)}return s}function co(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 VR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],qR=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]),Pt="�";var P;(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"})(P||(P={}));const Mn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Gy(e){return e>=55296&&e<=57343}function WR(e){return e>=56320&&e<=57343}function YR(e,t){return(e-55296)*1024+9216+t}function Xy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ky(e){return e>=64976&&e<=65007||qR.has(e)}var ue;(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"})(ue||(ue={}));const GR=65536;class XR{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=GR,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(WR(n))return this.pos++,this._addGap(),YR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(ue.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,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.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,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Gy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Xy(t)?this._err(ue.controlCharacterInInputStream):Ky(t)&&this._err(ue.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(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"})(tt||(tt={}));function Qy(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 KR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),QR=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 JR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=QR.get(e))!==null&&t!==void 0?t:e}var nn;(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"})(nn||(nn={}));const ZR=32;var Si;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Si||(Si={}));function Lh(e){return e>=nn.ZERO&&e<=nn.NINE}function e4(e){return e>=nn.UPPER_A&&e<=nn.UPPER_F||e>=nn.LOWER_A&&e<=nn.LOWER_F}function t4(e){return e>=nn.UPPER_A&&e<=nn.UPPER_Z||e>=nn.LOWER_A&&e<=nn.LOWER_Z||Lh(e)}function n4(e){return e===nn.EQUALS||t4(e)}var rn;(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"})(rn||(rn={}));var ri;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ri||(ri={}));class r4{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=rn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ri.Strict}startEntity(t){this.decodeMode=t,this.state=rn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case rn.EntityStart:return t.charCodeAt(n)===nn.NUM?(this.state=rn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=rn.NamedEntity,this.stateNamedEntity(t,n));case rn.NumericStart:return this.stateNumericStart(t,n);case rn.NumericDecimal:return this.stateNumericDecimal(t,n);case rn.NumericHex:return this.stateNumericHex(t,n);case rn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ZR)===nn.LOWER_X?(this.state=rn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=rn.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(Lh(s)||e4(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(Lh(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===nn.SEMI)this.consumed+=1;else if(this.decodeMode===ri.Strict)return 0;return this.emitCodePoint(JR(this.result),this.consumed),this.errors&&(t!==nn.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&Si.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=i4(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ri.Attribute&&(a===0||n4(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&Si.VALUE_LENGTH)>>14,a!==0){if(u===nn.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ri.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]&Si.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]&~Si.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case rn.NamedEntity:return this.result!==0&&(this.decodeMode!==ri.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case rn.NumericDecimal:return this.emitNumericEntity(0,2);case rn.NumericHex:return this.emitNumericEntity(0,3);case rn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case rn.EntityStart:return 0}}}function i4(e,t,n,r){const s=(t&Si.BRANCH_LENGTH)>>7,a=t&Si.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 Ee;(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/"})(Ee||(Ee={}));var ms;(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"})(ms||(ms={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));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 s4=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 fo(e){var t;return(t=s4.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,o4={[Ee.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[Ee.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[Ee.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[Ee.XLINK]:new Set,[Ee.XML]:new Set,[Ee.XMLNS]:new Set},Dh=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var D;(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"})(D||(D={}));const zt={DATA:D.DATA,RCDATA:D.RCDATA,RAWTEXT:D.RAWTEXT,SCRIPT_DATA:D.SCRIPT_DATA,PLAINTEXT:D.PLAINTEXT,CDATA_SECTION:D.CDATA_SECTION};function a4(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Pa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function u4(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function vi(e){return u4(e)||Pa(e)}function Jy(e){return vi(e)||a4(e)}function Ml(e){return e+32}function Zy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function eT(e){return Zy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function l4(e){return e===P.NULL?ue.nullCharacterReference:e>1114111?ue.characterReferenceOutsideUnicodeRange:Gy(e)?ue.surrogateCharacterReference:Ky(e)?ue.noncharacterCharacterReference:Xy(e)||e===P.CARRIAGE_RETURN?ue.controlCharacterReference:null}class c4{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=D.DATA,this.returnState=D.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new XR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new r4(KR,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ue.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ue.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=l4(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:tt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.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(Qy(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(ue.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=fo(t.tagName),t.type===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ue.endTagWithAttributes),t.selfClosing&&this._err(ue.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 tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.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:tt.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=Zy(t)?tt.WHITESPACE_CHARACTER:t===P.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=D.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ri.Attribute:ri.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===D.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===D.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===D.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case D.DATA:{this._stateData(t);break}case D.RCDATA:{this._stateRcdata(t);break}case D.RAWTEXT:{this._stateRawtext(t);break}case D.SCRIPT_DATA:{this._stateScriptData(t);break}case D.PLAINTEXT:{this._statePlaintext(t);break}case D.TAG_OPEN:{this._stateTagOpen(t);break}case D.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case D.TAG_NAME:{this._stateTagName(t);break}case D.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case D.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case D.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case D.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case D.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case D.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case D.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case D.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case D.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case D.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case D.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case D.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case D.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case D.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case D.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case D.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case D.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case D.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case D.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case D.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case D.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case D.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case D.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case D.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case D.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case D.BOGUS_COMMENT:{this._stateBogusComment(t);break}case D.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case D.COMMENT_START:{this._stateCommentStart(t);break}case D.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case D.COMMENT:{this._stateComment(t);break}case D.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case D.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case D.COMMENT_END:{this._stateCommentEnd(t);break}case D.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case D.DOCTYPE:{this._stateDoctype(t);break}case D.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case D.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case D.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case D.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case D.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case D.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case D.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case D.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case D.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case D.CDATA_SECTION:{this._stateCdataSection(t);break}case D.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case D.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case D.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case D.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=D.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=D.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=D.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(vi(t))this._createStartTagToken(),this.state=D.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=D.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=D.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(ue.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=D.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(vi(t))this._createEndTagToken(),this.state=D.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(ue.missingEndTagName),this.state=D.DATA;break}case P.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=D.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.tagName+=Pt;break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Pa(t)?Ml(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=D.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=D.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){vi(t)?(this.state=D.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=D.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=D.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=D.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=D.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=D.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){vi(t)?(this.state=D.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=D.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=D.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=D.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){vi(t)?(this.state=D.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=D.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=D.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=D.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=D.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:vi(t)?(this._emitChars("<"),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){vi(t)?(this.state=D.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&eT(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=D.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&eT(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=D.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=D.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(ue.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=D.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=D.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=D.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=D.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(ue.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.name+=Pt;break}default:this.currentAttr.name+=String.fromCodePoint(Pa(t)?Ml(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=D.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=D.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=D.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=D.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=D.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingAttributeValue),this.state=D.DATA,this.emitCurrentTagToken();break}default:this.state=D.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=D.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=D.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=D.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=D.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(ue.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=D.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=D.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=D.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.missingWhitespaceBetweenAttributes),this.state=D.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=D.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.unexpectedSolidusInTag),this.state=D.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=Pt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Mn.DASH_DASH,!0)?(this._createCommentToken(Mn.DASH_DASH.length+1),this.state=D.COMMENT_START):this._consumeSequenceIfMatch(Mn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Mn.DOCTYPE.length+1),this.state=D.DOCTYPE):this._consumeSequenceIfMatch(Mn.CDATA_START,!0)?this.inForeignNode?this.state=D.CDATA_SECTION:(this._err(ue.cdataInHtmlContent),this._createCommentToken(Mn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=D.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ue.incorrectlyOpenedComment),this._createCommentToken(2),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=D.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=D.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=D.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=D.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=D.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=Pt;break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=D.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=D.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=D.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=D.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=D.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=D.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(ue.nestedComment),this.state=D.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_END;break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=D.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=D.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=D.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=D.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ue.incorrectlyClosedComment),this.state=D.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=D.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=D.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(ue.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingWhitespaceBeforeDoctypeName),this.state=D.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Pa(t))this._createDoctypeToken(String.fromCharCode(Ml(t))),this.state=D.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(ue.unexpectedNullCharacter),this._createDoctypeToken(Pt),this.state=D.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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=D.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.name+=Pt;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Pa(t)?Ml(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Mn.PUBLIC,!1)?this.state=D.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Mn.SYSTEM,!1)?this.state=D.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ue.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.APOSTROPHE:{this.state=D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.APOSTROPHE:{this.state=D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.NULL:{this._err(ue.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=D.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(ue.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=D.CDATA_SECTION_END:(this._emitChars("]"),this.state=D.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=D.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=D.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(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Jy(this.preprocessor.peek(1))?D.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Jy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(ue.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const tT=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),nT=new Set([...tT,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Fl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),d4=new Set([...Fl,g.OL,g.UL]),f4=new Set([...Fl,g.BUTTON]),rT=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),iT=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),h4=new Set([g.TR,g.TEMPLATE,g.HTML]),p4=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),m4=new Set([g.TABLE,g.TEMPLATE,g.HTML]),g4=new Set([g.TD,g.TH]);class E4{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)===Ee.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])!==Ee.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(Dh,Ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(g4,Ee.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(m4,Ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(p4,Ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(h4,Ee.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 Ee.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case Ee.SVG:{if(iT.has(s))return!1;break}case Ee.MATHML:{if(rT.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fl)}hasInListItemScope(t){return this.hasInDynamicScope(t,d4)}hasInButtonScope(t){return this.hasInDynamicScope(t,f4)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Ee.HTML:{if(Dh.has(n))return!0;if(Fl.has(n))return!1;break}case Ee.SVG:{if(iT.has(n))return!1;break}case Ee.MATHML:{if(rT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Ee.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])===Ee.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])===Ee.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&&tT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&nT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&nT.has(this.currentTagId);)this.pop()}}const Mh=3;var jr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(jr||(jr={}));const sT={type:jr.Marker};class y4{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===jr.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<Mh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Mh)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>=Mh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(sT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:jr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:jr.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(sT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===jr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===jr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===jr.Element&&n.element===t)}}const Ai={createDocument(){return{nodeName:"#document",mode:nr.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};Ai.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(Ai.isTextNode(n)){n.value+=t;return}}Ai.appendChild(e,Ai.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ai.isTextNode(r)?r.value+=t:Ai.insertBefore(e,Ai.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=F(F({},e.sourceCodeLocation),t)}},oT="html",T4="about:legacy-compat",b4="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",aT=["+//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//"],w4=[...aT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],x4=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),uT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],_4=[...uT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function lT(e,t){return t.some(n=>e.startsWith(n))}function S4(e){return e.name===oT&&e.publicId===null&&(e.systemId===null||e.systemId===T4)}function v4(e){if(e.name!==oT)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===b4)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),x4.has(n))return nr.QUIRKS;let r=t===null?w4:aT;if(lT(n,r))return nr.QUIRKS;if(r=t===null?uT:_4,lT(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const cT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},A4="definitionurl",C4="definitionURL",N4=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])),k4=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Ee.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Ee.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Ee.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Ee.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Ee.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Ee.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Ee.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Ee.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Ee.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Ee.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Ee.XMLNS}]]),O4=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])),I4=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 P4(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ms.COLOR||r===ms.SIZE||r===ms.FACE)||I4.has(t)}function dT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===A4){e.attrs[t].name=C4;break}}function fT(e){for(let t=0;t<e.attrs.length;t++){const n=N4.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Fh(e){for(let t=0;t<e.attrs.length;t++){const n=k4.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 R4(e){const t=O4.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=fo(e.tagName))}function L4(e,t){return t===Ee.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function D4(e,t,n){if(t===Ee.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ms.ENCODING){const s=n[r].value.toLowerCase();return s===cT.TEXT_HTML||s===cT.APPLICATION_XML}}return t===Ee.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function M4(e,t,n,r){return(!r||r===Ee.HTML)&&D4(e,t,n)||(!r||r===Ee.MATHML)&&L4(e,t)}const F4="hidden",B4=8,U4=3;var $;(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"})($||($={}));const H4={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},hT=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),pT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ai,onParseError:null};class mT{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.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=F(F({},pT),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 c4(this.options,this),this.activeFormattingElements=new y4(this.treeAdapter),this.fragmentContextID=r?fo(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new E4(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=F(F({},pT),n);t!=null||(t=r.treeAdapter.createElement(Q.TEMPLATE,Ee.HTML,[]));const s=r.treeAdapter.createElement("documentmock",Ee.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift($.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:H4,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)===Ee.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Ee.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=zt.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)!==Ee.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=zt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=zt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=zt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=zt.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&&fe(F({},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,Ee.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Ee.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,Ee.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===tt.END_TAG&&s===n.tagName?{endTag:F({},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)===Ee.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Ee.HTML)}_processToken(t){switch(t.type){case tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return M4(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===jr.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=$.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=$.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=$.IN_TABLE;return}case g.BODY:{this.insertionMode=$.IN_BODY;return}case g.FRAMESET:{this.insertionMode=$.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?$.AFTER_HEAD:$.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=$.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.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=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(t){return hT.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)===Ee.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 o4[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gL(this,t);return}switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{La(this,t);break}case $.BEFORE_HEAD:{Da(this,t);break}case $.IN_HEAD:{Ma(this,t);break}case $.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case $.AFTER_HEAD:{Ba(this,t);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{ET(this,t);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{jh(this,t);break}case $.IN_TABLE_TEXT:{vT(this,t);break}case $.IN_COLUMN_GROUP:{Hl(this,t);break}case $.AFTER_BODY:{zl(this,t);break}case $.AFTER_AFTER_BODY:{Vl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mL(this,t);return}switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{La(this,t);break}case $.BEFORE_HEAD:{Da(this,t);break}case $.IN_HEAD:{Ma(this,t);break}case $.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case $.AFTER_HEAD:{Ba(this,t);break}case $.TEXT:{this._insertCharacters(t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{jh(this,t);break}case $.IN_COLUMN_GROUP:{Hl(this,t);break}case $.AFTER_BODY:{zl(this,t);break}case $.AFTER_AFTER_BODY:{Vl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Uh(this,t);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{Uh(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.AFTER_BODY:{Y4(this,t);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{G4(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{X4(this,t);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(t,ue.misplacedDoctype);break}case $.IN_TABLE_TEXT:{ja(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ue.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?EL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{K4(this,t);break}case $.BEFORE_HEAD:{J4(this,t);break}case $.IN_HEAD:{br(this,t);break}case $.IN_HEAD_NO_SCRIPT:{t6(this,t);break}case $.AFTER_HEAD:{r6(this,t);break}case $.IN_BODY:{Tn(this,t);break}case $.IN_TABLE:{ho(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.IN_CAPTION:{Z6(this,t);break}case $.IN_COLUMN_GROUP:{$h(this,t);break}case $.IN_TABLE_BODY:{jl(this,t);break}case $.IN_ROW:{$l(this,t);break}case $.IN_CELL:{nL(this,t);break}case $.IN_SELECT:{NT(this,t);break}case $.IN_SELECT_IN_TABLE:{iL(this,t);break}case $.IN_TEMPLATE:{oL(this,t);break}case $.AFTER_BODY:{uL(this,t);break}case $.IN_FRAMESET:{lL(this,t);break}case $.AFTER_FRAMESET:{dL(this,t);break}case $.AFTER_AFTER_BODY:{hL(this,t);break}case $.AFTER_AFTER_FRAMESET:{pL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{Q4(this,t);break}case $.BEFORE_HEAD:{Z4(this,t);break}case $.IN_HEAD:{e6(this,t);break}case $.IN_HEAD_NO_SCRIPT:{n6(this,t);break}case $.AFTER_HEAD:{i6(this,t);break}case $.IN_BODY:{Ul(this,t);break}case $.TEXT:{z6(this,t);break}case $.IN_TABLE:{Ua(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.IN_CAPTION:{eL(this,t);break}case $.IN_COLUMN_GROUP:{tL(this,t);break}case $.IN_TABLE_BODY:{zh(this,t);break}case $.IN_ROW:{CT(this,t);break}case $.IN_CELL:{rL(this,t);break}case $.IN_SELECT:{kT(this,t);break}case $.IN_SELECT_IN_TABLE:{sL(this,t);break}case $.IN_TEMPLATE:{aL(this,t);break}case $.AFTER_BODY:{IT(this,t);break}case $.IN_FRAMESET:{cL(this,t);break}case $.AFTER_FRAMESET:{fL(this,t);break}case $.AFTER_AFTER_BODY:{Vl(this,t);break}}}onEof(t){switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{La(this,t);break}case $.BEFORE_HEAD:{Da(this,t);break}case $.IN_HEAD:{Ma(this,t);break}case $.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case $.AFTER_HEAD:{Ba(this,t);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{_T(this,t);break}case $.TEXT:{V6(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.IN_TEMPLATE:{OT(this,t);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Hh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.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 $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(t);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{gT(this,t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{jh(this,t);break}case $.IN_TABLE_TEXT:{ST(this,t);break}}}}function j4(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):xT(e,t),n}function $4(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 z4(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>=U4;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=V4(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function V4(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 q4(e,t,n){const r=e.treeAdapter.getTagName(t),s=fo(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===Ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function W4(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 Bh(e,t){for(let n=0;n<B4;n++){const r=j4(e,t);if(!r)break;const s=$4(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=z4(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&q4(e,u,a),W4(e,s,r)}}function Uh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Y4(e,t){e._appendCommentNode(t,e.openElements.items[0])}function G4(e,t){e._appendCommentNode(t,e.document)}function Hh(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 X4(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:v4(t);S4(t)||e._err(t,ue.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function Ra(e,t){e._err(t,ue.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function K4(e,t){t.tagID===g.HTML?(e._insertElement(t,Ee.HTML),e.insertionMode=$.BEFORE_HEAD):La(e,t)}function Q4(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function J4(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.HEAD:{e._insertElement(t,Ee.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break}default:Da(e,t)}}function Z4(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Da(e,t):e._err(t,ue.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(Q.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function br(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,zt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,zt.RAWTEXT):(e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,zt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,zt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function e6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ma(e,t);break}case g.TEMPLATE:{gs(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function gs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ue.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ue.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function t6(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{br(e,t);break}case g.NOSCRIPT:{e._err(t,ue.nestedNoscriptInHead);break}default:Fa(e,t)}}function n6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=$.IN_HEAD;break}case g.BR:{Fa(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===tt.EOF?ue.openElementsLeftAfterEof:ue.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function r6(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.BODY:{e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,Ee.HTML),e.insertionMode=$.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,ue.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),br(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function i6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ba(e,t);break}case g.TEMPLATE:{gs(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(Q.BODY,g.BODY),e.insertionMode=$.IN_BODY,Bl(e,t)}function Bl(e,t){switch(t.type){case tt.CHARACTER:{ET(e,t);break}case tt.WHITESPACE_CHARACTER:{gT(e,t);break}case tt.COMMENT:{Uh(e,t);break}case tt.START_TAG:{Tn(e,t);break}case tt.END_TAG:{Ul(e,t);break}case tt.EOF:{_T(e,t);break}}}function gT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ET(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function s6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function o6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function a6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_FRAMESET)}function u6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function l6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Dh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Ee.HTML)}function c6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function d6(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),n||(e.formElement=e.openElements.current))}function f6(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,Ee.HTML)}function h6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.tokenizer.state=zt.PLAINTEXT}function p6(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1}function m6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(Bh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function g6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function E6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Bh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function y6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function T6(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function yT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TT(e){const t=Qy(e,ms.TYPE);return t!=null&&t.toLowerCase()===F4}function b6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),TT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function w6(e,t){e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0}function x6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _6(e,t){t.tagName=Q.IMG,t.tagID=g.IMG,yT(e,t)}function S6(e,t){e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=zt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function v6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,zt.RAWTEXT)}function A6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,zt.RAWTEXT)}function bT(e,t){e._switchToTextParsing(t,zt.RAWTEXT)}function C6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function N6(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function k6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Ee.HTML)}function O6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,Ee.HTML)}function I6(e,t){e._reconstructActiveFormattingElements(),dT(t),Fh(t),t.selfClosing?e._appendElement(t,Ee.MATHML):e._insertElement(t,Ee.MATHML),t.ackSelfClosing=!0}function P6(e,t){e._reconstructActiveFormattingElements(),fT(t),Fh(t),t.selfClosing?e._appendElement(t,Ee.SVG):e._insertElement(t,Ee.SVG),t.ackSelfClosing=!0}function wT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function Tn(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:{g6(e,t);break}case g.A:{m6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{l6(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:{u6(e,t);break}case g.LI:case g.DD:case g.DT:{f6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{yT(e,t);break}case g.HR:{x6(e,t);break}case g.RB:case g.RTC:{k6(e,t);break}case g.RT:case g.RP:{O6(e,t);break}case g.PRE:case g.LISTING:{c6(e,t);break}case g.XMP:{v6(e,t);break}case g.SVG:{P6(e,t);break}case g.HTML:{s6(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:{br(e,t);break}case g.BODY:{o6(e,t);break}case g.FORM:{d6(e,t);break}case g.NOBR:{E6(e,t);break}case g.MATH:{I6(e,t);break}case g.TABLE:{T6(e,t);break}case g.INPUT:{b6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{w6(e,t);break}case g.IMAGE:{_6(e,t);break}case g.BUTTON:{p6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{y6(e,t);break}case g.IFRAME:{A6(e,t);break}case g.SELECT:{C6(e,t);break}case g.OPTION:case g.OPTGROUP:{N6(e,t);break}case g.NOEMBED:case g.NOFRAMES:{bT(e,t);break}case g.FRAMESET:{a6(e,t);break}case g.TEXTAREA:{S6(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?bT(e,t):wT(e,t);break}case g.PLAINTEXT:{h6(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:wT(e,t)}}function R6(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function L6(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=$.AFTER_BODY,IT(e,t))}function D6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function M6(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 F6(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(Q.P,g.P),e._closePElement()}function B6(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function U6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function H6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function j6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function $6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function xT(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 Ul(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:{Bh(e,t);break}case g.P:{F6(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:{D6(e,t);break}case g.LI:{B6(e);break}case g.DD:case g.DT:{U6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{H6(e);break}case g.BR:{$6(e);break}case g.BODY:{R6(e,t);break}case g.HTML:{L6(e,t);break}case g.FORM:{M6(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{j6(e,t);break}case g.TEMPLATE:{gs(e,t);break}default:xT(e,t)}}function _T(e,t){e.tmplInsertionModeStack.length>0?OT(e,t):Hh(e,t)}function z6(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 V6(e,t){e._err(t,ue.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function jh(e,t){if(e.openElements.currentTagId!==void 0&&hT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{vT(e,t);break}case tt.WHITESPACE_CHARACTER:{ST(e,t);break}}else Ha(e,t)}function q6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_CAPTION}function W6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function Y6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,g.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,$h(e,t)}function G6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_TABLE_BODY}function X6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,g.TBODY),e.insertionMode=$.IN_TABLE_BODY,jl(e,t)}function K6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Q6(e,t){TT(t)?e._appendElement(t,Ee.HTML):Ha(e,t),t.ackSelfClosing=!0}function J6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ho(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{X6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{br(e,t);break}case g.COL:{Y6(e,t);break}case g.FORM:{J6(e,t);break}case g.TABLE:{K6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{G6(e,t);break}case g.INPUT:{Q6(e,t);break}case g.CAPTION:{q6(e,t);break}case g.COLGROUP:{W6(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{gs(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:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Bl(e,t),e.fosterParentingEnabled=n}function ST(e,t){e.pendingCharacterTokens.push(t)}function vT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ja(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ha(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const AT=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function Z6(e,t){const n=t.tagID;AT.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,ho(e,t)):Tn(e,t)}function eL(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=$.IN_TABLE,n===g.TABLE&&Ua(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:Ul(e,t)}}function $h(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.COL:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{br(e,t);break}default:Hl(e,t)}}function tL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break}case g.TEMPLATE:{gs(e,t);break}case g.COL:break;default:Hl(e,t)}}function Hl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,g.TR),e.insertionMode=$.IN_ROW,$l(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=$.IN_TABLE,ho(e,t));break}default:ho(e,t)}}function zh(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=$.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,Ua(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:Ua(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.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=$.IN_TABLE_BODY,jl(e,t));break}default:ho(e,t)}}function CT(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,zh(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=$.IN_TABLE_BODY,zh(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:Ua(e,t)}}function nL(e,t){const n=t.tagID;AT.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):Tn(e,t)}function rL(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=$.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),CT(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ul(e,t)}}function NT(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Ee.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:{br(e,t);break}}}function kT(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:{gs(e,t);break}}}function iL(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)):NT(e,t)}function sL(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)):kT(e,t)}function oL(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:{br(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,ho(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,$h(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,Tn(e,t)}}function aL(e,t){t.tagID===g.TEMPLATE&&gs(e,t)}function OT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Hh(e,t)}function uL(e,t){t.tagID===g.HTML?Tn(e,t):zl(e,t)}function IT(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=$.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 zl(e,t)}function zl(e,t){e.insertionMode=$.IN_BODY,Bl(e,t)}function lL(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.FRAMESET:{e._insertElement(t,Ee.HTML);break}case g.FRAME:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{br(e,t);break}}}function cL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function dL(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function fL(e,t){t.tagID===g.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function hL(e,t){t.tagID===g.HTML?Tn(e,t):Vl(e,t)}function Vl(e,t){e.insertionMode=$.IN_BODY,Bl(e,t)}function pL(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function mL(e,t){t.chars=Pt,e._insertCharacters(t)}function gL(e,t){e._insertCharacters(t),e.framesetOk=!1}function PT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Ee.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function EL(e,t){if(P4(t))PT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Ee.MATHML?dT(t):r===Ee.SVG&&(R4(t),fT(t)),Fh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function yL(e,t){if(t.tagID===g.P||t.tagID===g.BR){PT(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)===Ee.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 TL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,bL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),RT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function LT(e,t){const n=OL(e),r=Wy("type",{handlers:{root:wL,element:xL,text:_L,comment:MT,doctype:SL,raw:AL},unknown:CL}),s={parser:n?new mT(RT):mT.getFragmentParser(void 0,RT),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),po(s,Ur());const a=n?s.parser.document:s.parser.getFragment(),u=IR(a,{file:s.options.file});return s.stitches&&Rl(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 DT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function wL(e,t){DT(e.children,t)}function xL(e,t){NL(e,t),DT(e.children,t),kL(e,t)}function _L(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:tt.CHARACTER,chars:e.value,location:$a(e)};po(t,Ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function SL(e,t){const n={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:$a(e)};po(t,Ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function vL(e,t){t.stitches=!0;const n=IL(e);if("children"in e&&"children"in n){const r=LT({type:"root",children:e.children},t.options);n.children=r.children}MT({type:"comment",value:{stitch:n}},t)}function MT(e,t){const n=e.value,r={type:tt.COMMENT,data:n,location:$a(e)};po(t,Ur(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function AL(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,FT(t,Ur(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(TL,"<$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 CL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))vL(n,t);else{let r="";throw bL.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 po(e,t){FT(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=zt.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 FT(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 NL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===zt.PLAINTEXT)return;po(t,Ur(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:ps.html;s===ps.html&&n==="svg"&&(s=ps.svg);const a=MR(fe(F({},e),{children:[]}),{space:s===ps.svg?"svg":"html"}),u={type:tt.START_TAG,tagName:n,tagID:fo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:$a(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function kL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&VR.includes(n)||t.parser.tokenizer.state===zt.PLAINTEXT)return;po(t,xl(e));const r={type:tt.END_TAG,tagName:n,tagID:fo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:$a(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===zt.RCDATA||t.parser.tokenizer.state===zt.RAWTEXT||t.parser.tokenizer.state===zt.SCRIPT_DATA)&&(t.parser.tokenizer.state=zt.DATA)}function OL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function $a(e){const t=Ur(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 IL(e){return"children"in e?hs(fe(F({},e),{children:[]})):hs(e)}function BT(e){return function(t,n){return LT(t,fe(F({},e),{file:n}))}}const Es=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],UT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Es,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Es],h2:[["className","sr-only"]],img:[...Es,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Es,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Es],table:[...Es],ul:[...Es,["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"]},Ci={}.hasOwnProperty;function PL(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},UT),t):UT,stack:[]},s=HT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function HT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return RL(e,n);case"doctype":return LL(e,n);case"element":return DL(e,n);case"root":return ML(e,n);case"text":return FL(e,n)}}}function RL(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 za(a,t),a}}function LL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return za(n,t),n}}function DL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=jT(e,t.children),s=BL(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&&Ci.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 za(u,t),u}function ML(e,t){const r={type:"root",children:jT(e,t.children)};return za(r,t),r}function FL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return za(r,t),r}function jT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=HT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function BL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ci.call(r,n)?r[n]:void 0,u=r&&Ci.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ci.call(l,f)){const p=l[f];let m=$T(e,VT(a,f),f,p);m==null&&(m=$T(e,VT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&Ci.call(s,n)){const p=s[n];for(f in p)Ci.call(p,f)&&!Ci.call(d,f)&&(d[f]=p[f])}return d}function $T(e,t,n,r){return t?Array.isArray(r)?UL(e,t,n,r):zT(e,t,n,r):void 0}function UL(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=zT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function zT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&HL(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 HL(e,t,n){const r=e.schema.protocols&&Ci.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 za(e,t){const n=DE(t);t.data&&(e.data=hs(t.data)),n&&(e.position=n)}function VT(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 jL(e){return function(t){return PL(t,e)}}const qT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",fe(F(F({className:M(e,`${O}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},$L=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=lt();return!e&&!t?null:w.jsx("div",{className:M(n,`${O}-disclaimer`),children:t?w.jsx(Fy,{rehypePlugins:[BT,jL],components:{ul:({children:r})=>w.jsx("ul",{className:M(n,`${O}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:M(n,`${O}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:M(n,`${O}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(qT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:M(n,`${O}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:M(n,`${O}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:M(n,`${O}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:M(n,`${O}-disclaimer-text`),children:e})})},zL=Math.round(of/(1024*1024)),VL=e=>e==="oversize"?`File size exceeds the ${zL}MB limit. Please choose a smaller file.`:"That file type isn't supported. Please choose a PNG, JPG, or GIF image.",Vh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=$t(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:p,enableImageUpload:m}=lt(),T=N.useRef(null),y=N.useRef(l);y.current=l;const[_,A]=N.useState(!1),[v,x]=N.useState(null),k=m,I=!k1(s,a,u),j=t||I,q=N.useCallback(oe=>x(VL(oe)),[]),{file:R,attach:X,clear:ne}=p3({allowedMime:_g,maxBytes:Number.POSITIVE_INFINITY,onReject:q});N.useEffect(()=>{R&&x(null)},[R]);const se=N.useCallback(oe=>ke(null,null,function*(){var de,W,le;if(oe.preventDefault(),j)return;x(null);const me=(((de=T.current)==null?void 0:de.value)||"").trim();if(me||R){const C=!s&&!a&&u===!0,B=y.current.length;T.current.value="",(W=T.current)==null||W.focus({preventScroll:!0});const Z={text:me};R&&(Z.file=R),ne();const L=yield r(Z),xe=!!L&&L.outcome!=="success",De=y.current.length===B,he=((le=T.current)==null?void 0:le.value)==="";xe&&(C&&De&&he)&&(T.current.value=me,Z.file&&X([Z.file]),T.current.disabled||T.current.focus({preventScroll:!0}))}}),[R,s,a,u,j,ne,r,X]),H=N.useCallback(()=>{r({text:"Can you connect me to a human?"})},[r]),re=N.useCallback(oe=>{!k||j||(oe.preventDefault(),A(!0))},[k,j]),V=N.useCallback(()=>A(!1),[]),ee=N.useCallback(oe=>{!k||j||(oe.preventDefault(),A(!1),X(oe.dataTransfer.files))},[k,j,X]),ae=N.useCallback(oe=>{!k||j||oe.clipboardData.files.length>0&&X(oe.clipboardData.files)},[k,j,X]);return w.jsxs("div",{className:M(d,e,`cim-${n}-component`,R&&"with-attachments",`${O}-search-bar-wrapper`),children:[k&&R&&w.jsx(m3,{file:R,componentType:n,globalClassName:d,onRemove:ne}),k&&v&&w.jsx("div",{className:M(d,`${O}-attach-error`),role:"alert",children:v}),w.jsxs("form",{className:M(d,e,`cim-${n}-component`,_&&"drag-over",`${O}-search-bar`),name:`${O}-search-form`,onSubmit:se,onDragOver:re,onDragLeave:V,onDrop:ee,children:[w.jsxs("div",{className:M(d,e,`cim-${n}-component`,`${O}-messaging-input-group`),children:[k&&w.jsx(g3,{componentType:n,accept:Z2,disabled:j,globalClassName:d,className:e,icon:w.jsx(c3,{}),onFiles:X}),w.jsx("input",{className:M(d,e,`cim-${n}-component`,`${O}-search-input`),type:"text",ref:T,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything","aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask us anything",name:`${O}-user-input`,disabled:I,readOnly:t,onPaste:ae})]}),w.jsx(y3,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:j}),p&&w.jsx(yr,{className:M(d,`${O}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:j,onClick:H,icon:w.jsx(t3,{})})]}),w.jsx($L,{})]})};function qL(e){return dt({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 WL(e){return dt({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 WT=N.createContext({isOpen:!1}),qh=N.createContext(null),YT=N.createContext(null),ys=()=>{var n,r;const e=N.useContext(qh),t=N.useContext(YT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},GT=({onClearChat:e,componentType:t})=>{const n=ys(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${O}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(WL,{}),"Clear chat"]})},XT=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=lt(),r=ys(),[s,a]=N.useState(!1),u=()=>ke(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:M(`${O}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(qL,{}),"Download transcript"]})},KT=({onEndConversation:e,componentType:t})=>{const n=ys(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${O}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[w.jsx(l3,{}),"End conversation"]})};function YL(e){return e==null?[]:Array.isArray(e)?e:[e]}var GL=(e,...t)=>e.concat(t),XL=(e,...t)=>e.filter(n=>!t.includes(n)),KL=e=>Array.from(new Set(e));function QT(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 QL(e,t,n={}){const{step:r=1,loop:s=!0}=n;return QT(e,t,{step:-r,loop:s})}var JL=e=>Array.isArray(e),JT=e=>e!=null&&typeof e=="object",ZL=e=>JT(e)&&!JL(e),ql=e=>typeof e=="string",mo=e=>typeof e=="function",e5=e=>e==null,t5=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n5=e=>Object.prototype.toString.call(e),ZT=Function.prototype.toString,r5=ZT.call(Object),i5=e=>{if(!JT(e)||n5(e)!="[object Object]"||a5(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=t5(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ZT.call(n)==r5},s5=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,o5=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,a5=e=>s5(e)||o5(e),u5=e=>e(),l5=()=>{},Wh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function c5(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:d5,max:f5}=Math,h5=e=>Number.isNaN(e),p5=e=>h5(e)?0:e,eb=(e,t,n)=>d5(f5(p5(e),t),n);function Yh(e){if(!i5(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]=Yh(s))}return n}function Gh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function m5(e,t){if(e==null)throw new Error(t())}function g5(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 E5=Object.defineProperty,y5=(e,t,n)=>t in e?E5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xh=(e,t,n)=>y5(e,typeof t!="symbol"?t+"":t,n),tb=()=>{},Wl=e=>typeof e=="object"&&e!==null,go=e=>e?"":void 0,nb=e=>e?"true":void 0,T5=1,b5=9,w5=11,sn=e=>Wl(e)&&e.nodeType===T5&&typeof e.nodeName=="string",Yl=e=>Wl(e)&&e.nodeType===b5,x5=e=>Wl(e)&&e===e.window,rb=e=>sn(e)?e.localName||"":"#document";function _5(e){return["html","body","#document"].includes(rb(e))}var S5=e=>Wl(e)&&e.nodeType!==void 0,Ts=e=>S5(e)&&e.nodeType===w5&&"host"in e,v5=e=>sn(e)&&e.localName==="input",A5=e=>sn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Va(e){if(!e)return!1;const t=e.getRootNode();return To(t)===e}var C5=/(textarea|select)/;function N5(e){if(e==null||!sn(e))return!1;try{return v5(e)&&e.selectionStart!=null||C5.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Eo(e,t){var r;if(!e||!t||!sn(e)||!sn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Ts(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function $r(e){var t;return Yl(e)?e:x5(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function k5(e){return $r(e).documentElement}function yo(e){var t,n,r;return Ts(e)?yo(e.host):Yl(e)?(t=e.defaultView)!=null?t:window:sn(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 O5(e){if(rb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ts(e)&&e.host||k5(e);return Ts(t)?t.host:t}function Kh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Yl(t)||Ts(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Qh=new WeakMap;function bo(e){return Qh.has(e)||Qh.set(e,yo(e).getComputedStyle(e)),Qh.get(e)}var Jh=new Set(["menu","listbox","dialog","grid","tree","region"]),I5=e=>Jh.has(e),ib=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function sb(e,t){const n=new Set,r=Kh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=ib(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"),T=p.getAttribute("aria-modal")==="true";if(m&&I5(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function ob(e,t){const n=Kh(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=ib(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"),T=p.getAttribute("aria-modal")==="true";m&&Jh.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function P5(e){const t=new Set;return ob(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function R5(e){const t=e.getAttribute("role");return!!(t&&Jh.has(t))}function L5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function D5(e){var t;return L5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function M5(e){if(!e.id)return!1;const t=Kh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&R5(e))}var Zh=()=>typeof document!="undefined";function F5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var ep=e=>Zh()&&e.test(F5()),B5=e=>Zh()&&e.test(navigator.vendor),ab=()=>Zh()&&!!navigator.maxTouchPoints,U5=()=>ep(/^iPhone/i),H5=()=>ep(/^iPad/i)||tp()&&navigator.maxTouchPoints>1,Gl=()=>U5()||H5(),j5=()=>tp()||Gl(),tp=()=>ep(/^Mac/i),$5=()=>j5()&&B5(/apple/i);function z5(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 wr(e){var n;const t=z5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var ub=e=>e.button===0,V5=e=>e.button===2||tp()&&e.ctrlKey&&e.button===0,q5=e=>"touches"in e&&e.touches.length>0,W5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},lb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Y5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=W5[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in lb&&(s=lb[s]),s}function cb(e,t="client"){const n=q5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var on=(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)}},db=e=>sn(e)&&e.tagName==="IFRAME",G5=/^(audio|video|details)$/;function fb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var X5=e=>!Number.isNaN(fb(e)),K5=e=>fb(e)<0;function Q5(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 hb(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=Q5(d,t);if(f){const p=Array.from(f.querySelectorAll(Xl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,T+_)})}s.push(...p)}}return r}var Xl="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",pb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Xl));(n==!0||n=="if-empty"&&s.length===0)&&sn(e)&&zr(e)&&s.unshift(e);const u=[];for(const l of s)if(zr(l)){if(db(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...pb(d,{getShadowRoot:r}));continue}u.push(l)}return r?hb(u,r,zr):u};function zr(e){return!sn(e)||e.closest("[inert]")?!1:e.matches(Xl)&&A5(e)}function wo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Xl));n&&bs(e)&&s.unshift(e);const a=[];for(const u of s)if(bs(u)){if(db(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...wo(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=hb(a,r,bs);return!u.length&&n?s:u}return!a.length&&n?s:a}function bs(e){return sn(e)&&e.tabIndex>0?!0:zr(e)&&!K5(e)}function J5(e,t={}){const n=wo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function Z5(e,t={}){const{current:n,getShadowRoot:r}=t,s=wo(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 qa(e){return e.tabIndex<0&&(G5.test(e.localName)||N5(e))&&!X5(e)?0:e.tabIndex}function mb(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=wo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var eD=class kv{constructor(){Xh(this,"id",null),Xh(this,"fn_cleanup"),Xh(this,"cleanup",()=>{this.cancel()})}static create(){return new kv}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 Jt(e){const t=eD.create();return t.request(e),t.cleanup}function gb(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 np(e){const t=O5(e);return _5(t)?$r(t).body:sn(t)&&rD(t)?t:np(t)}var tD=/auto|scroll|overlay|hidden|clip/,nD=new Set(["inline","contents"]);function rD(e){const t=yo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return tD.test(n+s+r)&&!nD.has(a)}var xo="default",rp="",Kl=new WeakMap;function iD(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Gl()?(xo==="default"&&(rp=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),xo="disabled"):t&&(Kl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>sD({target:t,doc:r})}function sD(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Gl()){if(xo!=="disabled")return;xo="restoring",setTimeout(()=>{gb(()=>{xo==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=rp||""),rp="",xo="default")})},300)}else if(t&&Kl.has(t)){const a=Kl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Kl.delete(t)}}function oD(e={}){const u=e,{defer:t,target:n}=u,r=vn(u,["defer","target"]),s=t?Jt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(iD(fe(F({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function aD(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=cb(l),f=Math.sqrt(Dd(d.x,2)+Dd(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=cb(l);r({point:d,event:l})},u=[on(e,"pointermove",s,!1),on(e,"pointerup",a,!1),on(e,"pointercancel",a,!1),on(e,"contextmenu",a,!1),oD({doc:e})];return()=>{u.forEach(l=>l())}}function uD(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,T]=J5(e,{includeContainer:!0,getShadowRoot:a}),y=Z5(l,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Va(y)?(s==null||s(),p=T):f.shiftKey&&(Va(m)||_)?p=n:!f.shiftKey&&Va(n)?(s==null||s(),p=m):!f.shiftKey&&(Va(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return on(u,"keydown",d,!0)}function lD(e,t){const l=t,{defer:n,triggerElement:r}=l,s=vn(l,["defer","triggerElement"]),a=n?Jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(uD(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function cD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ql(e,t){if(!e)return tb;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 dD(e,t,n){if(!e)return tb;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 fD(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 hD(e,t){const{timeout:n,rootNode:r}=t,s=yo(r),a=$r(r),u=new s.AbortController;return fD(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 pD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),mD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Eb=e=>{const t={};let n;for(;n=mD.exec(e);)t[n[1]]=n[2];return t},gD=(e,t)=>{if(ql(e)){if(ql(t))return`${e};${t}`;e=Eb(e)}else ql(t)&&(t=Eb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Zt(...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]=Wh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=pD(t[s],n[s]);continue}if(s==="style"){t[s]=gD(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 Zj(e){return e}var _o=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(_o||{}),ip="__init__";function ED(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>$r(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>To(t()),a=u=>t().getElementById(u);return fe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Va,getById:a})}function yD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var So=()=>e=>Array.from(new Set(e)),yb=typeof globalThis.document!="undefined"?N.useLayoutEffect:N.useEffect;function Jl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=N.useState(t),[s,a]=N.useState(r),u=e().value!==void 0,l=N.useRef(s);l.current=u?e().value:s;const d=N.useRef(l.current);yb(()=>{d.current=l.current},[s,e().value]);const f=y=>{var v,x;const _=d.current,A=mo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(x=(v=e()).onChange)==null||x.call(v,A,_)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?io.flushSync:u5)(()=>f(y))},invoke(y,_){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,_)},hash(y){var _,A,v;return(v=(A=(_=e()).hash)==null?void 0:A.call(_,y))!=null?v:String(y)}}}Jl.cleanup=e=>{N.useEffect(()=>e,[])},Jl.ref=e=>{const t=N.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function TD(e){const t=N.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var bD=(e,t)=>{const n=N.useRef(!1),r=N.useRef(!1);N.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),N.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Zl(e,t={}){var re,V,ee,ae,oe,me;const n=N.useMemo(()=>{const{id:de,ids:W,getRootNode:le}=t;return ED({id:de,ids:W,getRootNode:le})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(V=(re=e.props)==null?void 0:re.call(e,{props:Yh(t),scope:n}))!=null?V:t,a=wD(s),u=(ee=e.context)==null?void 0:ee.call(e,{prop:a,bindable:Jl,scope:n,flush:bb,getContext(){return d},getComputed(){return q},getRefs(){return A},getEvent(){return y()}}),l=Tb(u),d={get(de){var W;return(W=l.current)==null?void 0:W[de].ref.current},set(de,W){var le;(le=l.current)==null||le[de].set(W)},initial(de){var W;return(W=l.current)==null?void 0:W[de].initial},hash(de){var le,C;const W=(le=l.current)==null?void 0:le[de].get();return(C=l.current)==null?void 0:C[de].hash(W)}},f=N.useRef(new Map),p=N.useRef(null),m=N.useRef(null),T=N.useRef({type:""}),y=()=>fe(F({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>fe(F({},R),{matches(...de){return de.includes(R.ref.current)},hasTag(de){var W,le;return!!((le=(W=e.states[R.ref.current])==null?void 0:W.tags)!=null&&le.includes(de))}}),A=TD((oe=(ae=e.refs)==null?void 0:ae.call(e,{prop:a,context:d}))!=null?oe:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:H,action:x,guard:k,track:bD,refs:A,computed:q,flush:bb,scope:n,choose:j}),x=de=>{const W=mo(de)?de(v()):de;if(!W)return;const le=W.map(C=>{var Z,L;const B=(L=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:L[C];return B||Gh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),B});for(const C of le)C==null||C(v())},k=de=>{var W,le;return mo(de)?de(v()):(le=(W=e.implementations)==null?void 0:W.guards)==null?void 0:le[de](v())},I=de=>{const W=mo(de)?de(v()):de;if(!W)return;const le=W.map(B=>{var L,xe;const Z=(xe=(L=e.implementations)==null?void 0:L.effects)==null?void 0:xe[B];return Z||Gh(`[zag-js] No implementation found for effect "${JSON.stringify(B)}"`),Z}),C=[];for(const B of le){const Z=B==null?void 0:B(v());Z&&C.push(Z)}return()=>C.forEach(B=>B==null?void 0:B())},j=de=>YL(de).find(W=>{let le=!W.guard;return ql(W.guard)?le=!!k(W.guard):mo(W.guard)&&(le=W.guard(v())),le}),q=de=>{m5(e.computed,()=>"[zag-js] No computed object found on machine");const W=e.computed[de];return W({context:d,event:y(),prop:a,refs:A,scope:n,computed:q})},R=Jl(()=>({defaultValue:e.initialState({prop:a}),onChange(de,W){var C,B,Z,L;if(W){const xe=f.current.get(W);xe==null||xe(),f.current.delete(W)}W&&x((C=e.states[W])==null?void 0:C.exit),x((B=p.current)==null?void 0:B.actions);const le=I((Z=e.states[de])==null?void 0:Z.effects);if(le&&f.current.set(de,le),W===ip){x(e.entry);const xe=I(e.effects);xe&&f.current.set(ip,xe)}x((L=e.states[de])==null?void 0:L.entry)}})),X=N.useRef(void 0),ne=N.useRef(_o.NotStarted);yb(()=>{queueMicrotask(()=>{var B;const le=ne.current===_o.Started;ne.current=_o.Started,r(le?"rehydrating...":"initializing...");const C=(B=X.current)!=null?B:R.initial;R.invoke(C,le?R.get():ip)});const de=f.current,W=R.ref.current;return()=>{r("unmounting..."),X.current=W,ne.current=_o.Stopped,de.forEach(le=>le==null?void 0:le()),f.current=new Map,p.current=null,queueMicrotask(()=>{x(e.exit)})}},[]);const se=()=>"ref"in R?R.ref.current:R.get(),H=de=>{queueMicrotask(()=>{var L,xe,De,he,Ne;if(ne.current!==_o.Started)return;m.current=T.current,T.current=de;let W=se();const le=(De=(L=e.states[W].on)==null?void 0:L[de.type])!=null?De:(xe=e.on)==null?void 0:xe[de.type],C=j(le);if(!C)return;p.current=C;const B=(he=C.target)!=null?he:W;r("transition",de.type,C.target||W,`(${C.actions})`);const Z=B!==W;Z?io.flushSync(()=>R.set(B)):C.reenter&&!Z?R.invoke(W,W):x((Ne=C.actions)!=null?Ne:[])})};return(me=e.watch)==null||me.call(e,v()),{state:_(),send:H,context:d,prop:a,scope:n,refs:A,computed:q,event:y(),getStatus:()=>ne.current}}function Tb(e){const t=N.useRef(e);return t.current=e,t}function wD(e){const t=Tb(e);return function(r){return t.current[r]}}function bb(e){queueMicrotask(()=>{io.flushSync(()=>e())})}var sp=yD(e=>e);function ec(...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 xD(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 op=e=>{const t=N.memo(N.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=vn(f,["asChild","children"]);if(!s)return N.createElement(e,fe(F({},u),{ref:r}),a);if(!N.isValidElement(a))return null;const l=N.Children.only(a),d=xD(l);return N.cloneElement(l,fe(F({},Zt(u,l.props)),{ref:r?ec(r,d):d}))}));return t.displayName=e.displayName||e.name,t},bn=(()=>{const e=new Map;return new Proxy(op,{apply(t,n,r){return op(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,op(r)),e.get(r)}})})();function _D(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ws(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=N.createContext(u);l.displayName=t;function d(){var p;const f=N.useContext(l);if(!f&&n){const m=new Error(a!=null?a:_D(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[SD,ap]=ws({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[wb,Wa]=ws({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),xb=N.forwardRef((e,t)=>{const n=ap(),r=Wa(),s=Zt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(bn.div,fe(F({},s),{ref:ec(r.ref,t)}))});xb.displayName="PopoverContent";const _b=N.forwardRef((e,t)=>{const n=ap(),r=Wa(),s=Zt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(bn.div,fe(F({},s),{ref:t}))});_b.displayName="PopoverPositioner";const Ya=()=>(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]},[{},F({},e)]),Sb=e=>Ya()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function vD(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 AD={props({props:e}){return fe(F({},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",bo(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"});Jt(()=>{var l,d;const u=tc(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})=>{Jt(()=>{e.set("prevAnimationName",tc(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,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",tc(t.get("styles")))},u=d=>{const f=tc(t.get("styles"));wr(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=Ql(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),gb(()=>l())}}}}};function tc(e){return(e==null?void 0:e.animationName)||"none"}So()(["onExitComplete","present","immediate"]);function CD(e,t={}){const{sync:n=!1}=t,r=ND(e);return N.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 ND(e){const t=N.useRef(e);return t.current=e,t}const up=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=vn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=N.useRef(!1),l=fe(F({},a),{present:r,onExitComplete:CD(e.onExitComplete)}),d=Zl(AD,l),f=vD(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 xs=(e,t=[])=>({parts:(...n)=>{if(kD(t))return xs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>xs(e,[...t,...n]),omit:(...n)=>xs(e,t.filter(r=>!n.includes(r))),rename:n=>xs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${vo(e)}"][data-part="${vo(r)}"]`,`& [data-scope="${vo(e)}"][data-part="${vo(r)}"]`].join(", "),attrs:{"data-scope":vo(e),"data-part":vo(r)}}}),{})}),vo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),kD=e=>e.length===0;const OD=["top","right","bottom","left"],Ni=Math.min,ii=Math.max,nc=Math.round,rc=Math.floor,Vr=e=>({x:e,y:e}),ID={left:"right",right:"left",bottom:"top",top:"bottom"};function vb(e,t,n){return ii(e,Ni(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function Ao(e){return e.split("-")[1]}function lp(e){return e==="x"?"y":"x"}function cp(e){return e==="y"?"height":"width"}function qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dp(e){return lp(qr(e))}function PD(e,t,n){n===void 0&&(n=!1);const r=Ao(e),s=dp(e),a=cp(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ic(u)),[u,ic(u)]}function RD(e){const t=ic(e);return[fp(e),t,fp(t)]}function fp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ab=["left","right"],Cb=["right","left"],LD=["top","bottom"],DD=["bottom","top"];function MD(e,t,n){switch(e){case"top":case"bottom":return n?t?Cb:Ab:t?Ab:Cb;case"left":case"right":return t?LD:DD;default:return[]}}function FD(e,t,n,r){const s=Ao(e);let a=MD(ki(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(fp)))),a}function ic(e){const t=ki(e);return ID[t]+e.slice(t.length)}function BD(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 Nb(e){return typeof e!="number"?BD(e):{top:e,right:e,bottom:e,left:e}}function sc(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 kb(e,t,n){let{reference:r,floating:s}=e;const a=qr(t),u=dp(t),l=cp(u),d=ki(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=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 _=Ao(t);return _&&(y[u]+=T*(_==="end"?1:-1)*(n&&f?-1:1)),y}function UD(e,t){return ke(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:T=!1,padding:y=0}=si(t,e),_=Nb(y),v=l[T?m==="floating"?"reference":"floating":m],x=sc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.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),j=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},q=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:I,strategy:d}):k);return{top:(x.top-q.top+_.top)/j.y,bottom:(q.bottom-x.bottom+_.bottom)/j.y,left:(x.left-q.left+_.left)/j.x,right:(q.right-x.right+_.right)/j.x}})}const HD=50,jD=(e,t,n)=>ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:fe(F({},u),{detectOverflow:UD}),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}=kb(f,r,d),T=r,y=0;const _={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:x,fn:k}=v,{x:I,y:j,data:q,reset:R}=yield k({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:_,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=j!=null?j:m,_[x]=F(F({},_[x]),q),R&&y<HD&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=kb(f,T,d)),A=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:_}}),$D=e=>({name:"arrow",options:e,fn(n){return ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=si(e,n)||{};if(p==null)return{};const T=Nb(m),y={x:r,y:s},_=dp(a),A=cp(_),v=yield l.getDimensions(p),x=_==="y",k=x?"top":"left",I=x?"bottom":"right",j=x?"clientHeight":"clientWidth",q=u.reference[A]+u.reference[_]-y[_]-u.floating[A],R=y[_]-u.reference[_],X=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ne=X?X[j]:0;(!ne||!(yield l.isElement==null?void 0:l.isElement(X)))&&(ne=d.floating[j]||u.floating[A]);const se=q/2-R/2,H=ne/2-v[A]/2-1,re=Ni(T[k],H),V=Ni(T[I],H),ee=ne-v[A]-V,ae=ne/2-v[A]/2+se,oe=vb(re,ae,ee),me=!f.arrow&&Ao(a)!=null&&ae!==oe&&u.reference[A]/2-(ae<re?re:V)-v[A]/2<0,de=me?ae<re?ae-re:ae-ee:0;return{[_]:y[_]+de,data:F({[_]:oe,centerOffset:ae-oe-de},me&&{alignmentOffset:de}),reset:me}})}}),zD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,oe=si(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=oe,x=vn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=ki(a),I=qr(d),j=ki(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(j||!v?[ic(d)]:RD(d)),X=A!=="none";!y&&X&&R.push(...FD(d,v,A,q));const ne=[d,...R],se=yield f.detectOverflow(n,x),H=[];let re=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&H.push(se[k]),T){const me=PD(a,l,q);H.push(se[me[0]],se[me[1]])}if(re=[...re,{placement:a,overflows:H}],!H.every(me=>me<=0)){var V,ee;const me=(((V=u.flip)==null?void 0:V.index)||0)+1,de=ne[me];if(de&&(!(T==="alignment"?I!==qr(de):!1)||re.every(C=>qr(C.placement)===I?C.overflows[0]>0:!0)))return{data:{index:me,overflows:re},reset:{placement:de}};let W=(ee=re.filter(le=>le.overflows[0]<=0).sort((le,C)=>le.overflows[1]-C.overflows[1])[0])==null?void 0:ee.placement;if(!W)switch(_){case"bestFit":{var ae;const le=(ae=re.filter(C=>{if(X){const B=qr(C.placement);return B===I||B==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(B=>B>0).reduce((B,Z)=>B+Z,0)]).sort((C,B)=>C[1]-B[1])[0])==null?void 0:ae[0];le&&(W=le);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function Ob(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ib(e){return OD.some(t=>e[t]>=0)}const VD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return ke(this,null,function*(){const{rects:r,platform:s}=n,l=si(e,n),{strategy:a="referenceHidden"}=l,u=vn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,fe(F({},u),{elementContext:"reference"})),f=Ob(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Ib(f)}}}case"escaped":{const d=yield s.detectOverflow(n,fe(F({},u),{altBoundary:!0})),f=Ob(d,r.floating);return{data:{escapedOffsets:f,escaped:Ib(f)}}}default:return{}}})}}},Pb=new Set(["left","top"]);function qD(e,t){return ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ki(n),l=Ao(n),d=qr(n)==="y",f=Pb.has(u)?-1:1,p=a&&d?-1:1,m=si(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof _=="number"&&(y=l==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const WD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return ke(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield qD(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:fe(F({},f),{placement:l})}})}}},YD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=si(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:q,y:R}=j;return{x:q,y:R}}}}=I,p=vn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=qr(a),_=lp(y);let A=m[_],v=m[y];const x=(j,q)=>vb(q+T[j==="y"?"top":"left"],q,q-T[j==="y"?"bottom":"right"]);l&&(A=x(_,A)),d&&(v=x(y,v));const k=f.fn(fe(F({},n),{[_]:A,[y]:v}));return fe(F({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[_]:l,[y]:d}}})})}}},GD=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}=si(e,t),T={x:s,y:a},y=qr(u),_=lp(y);let A=T[_],v=T[y];const x=si(f,t),k=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(r=x.crossAxis)!=null?r:0};if(p){const q=_==="y"?"height":"width",R=l.reference[_]-l.floating[q]+k.mainAxis,X=l.reference[_]+l.reference[q]-k.mainAxis;A<R?A=R:A>X&&(A=X)}if(m){var I,j;const q=_==="y"?"width":"height",R=Pb.has(ki(u)),X=l.reference[y]-l.floating[q]+(R&&((I=d.offset)==null?void 0:I[y])||0)+(R?0:k.crossAxis),ne=l.reference[y]+l.reference[q]+(R?0:((j=d.offset)==null?void 0:j[y])||0)-(R?k.crossAxis:0);v<X?v=X:v>ne&&(v=ne)}return{[_]:A,[y]:v}}}},XD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,H=si(e,n),{apply:l=()=>{}}=H,d=vn(H,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=Ao(r),T=qr(r)==="y",{width:y,height:_}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const x=_-f.top-f.bottom,k=y-f.left-f.right,I=Ni(_-f[A],x),j=Ni(y-f[v],k),q=n.middlewareData.shift,R=!q;let X=I,ne=j;q!=null&&q.enabled.x&&(ne=k),q!=null&&q.enabled.y&&(X=x),R&&!m&&(T?ne=y-2*ii(f.left,f.right):X=_-2*ii(f.top,f.bottom)),yield l(fe(F({},n),{availableWidth:ne,availableHeight:X}));const se=yield a.getDimensions(u.floating);return y!==se.width||_!==se.height?{reset:{rects:!0}}:{}})}}};function oc(){return typeof window!="undefined"}function Co(e){return Rb(e)?(e.nodeName||"").toLowerCase():"#document"}function Xn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(Rb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rb(e){return oc()?e instanceof Node||e instanceof Xn(e).Node:!1}function xr(e){return oc()?e instanceof Element||e instanceof Xn(e).Element:!1}function Yr(e){return oc()?e instanceof HTMLElement||e instanceof Xn(e).HTMLElement:!1}function Lb(e){return!oc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Xn(e).ShadowRoot}function Ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function KD(e){return/^(table|td|th)$/.test(Co(e))}function ac(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const QD=/transform|translate|scale|rotate|perspective|filter/,JD=/paint|layout|strict|content/,_s=e=>!!e&&e!=="none";let hp;function pp(e){const t=xr(e)?_r(e):e;return _s(t.transform)||_s(t.translate)||_s(t.scale)||_s(t.rotate)||_s(t.perspective)||!mp()&&(_s(t.backdropFilter)||_s(t.filter))||QD.test(t.willChange||"")||JD.test(t.contain||"")}function ZD(e){let t=Oi(e);for(;Yr(t)&&!No(t);){if(pp(t))return t;if(ac(t))return null;t=Oi(t)}return null}function mp(){return hp==null&&(hp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hp}function No(e){return/^(html|body|#document)$/.test(Co(e))}function _r(e){return Xn(e).getComputedStyle(e)}function uc(e){return xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oi(e){if(Co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lb(e)&&e.host||Wr(e);return Lb(t)?t.host:t}function Db(e){const t=Oi(e);return No(t)?(e.ownerDocument||e).body:Yr(t)&&Ga(t)?t:Db(t)}function Xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Db(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Xn(s);if(a){const l=gp(u);return t.concat(u,u.visualViewport||[],Ga(s)?s:[],l&&n?Xa(l):[])}else return t.concat(s,Xa(s,[],n))}function gp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mb(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Yr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=nc(n)!==a||nc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Ep(e){return xr(e)?e:e.contextElement}function ko(e){const t=Ep(e);if(!Yr(t))return Vr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=Mb(t);let u=(a?nc(n.width):n.width)/r,l=(a?nc(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const eM=Vr(0);function Fb(e){const t=Xn(e);return!mp()||!t.visualViewport?eM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xn(e)?!1:t}function Ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ep(e);let u=Vr(1);t&&(r?xr(r)&&(u=ko(r)):u=ko(e));const l=tM(a,n,r)?Fb(a):Vr(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 T=Xn(a),y=r&&xr(r)?Xn(r):r;let _=T,A=gp(_);for(;A&&r&&y!==_;){const v=ko(A),x=A.getBoundingClientRect(),k=_r(A),I=x.left+(A.clientLeft+parseFloat(k.paddingLeft))*v.x,j=x.top+(A.clientTop+parseFloat(k.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=I,f+=j,_=Xn(A),A=gp(_)}}return sc({width:p,height:m,x:d,y:f})}function lc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:Ss(Wr(e)).left+n}function Bb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lc(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function nM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Wr(r),l=t?ac(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Vr(1);const p=Vr(0),m=Yr(r);if((m||!m&&!a)&&((Co(r)!=="body"||Ga(u))&&(d=uc(r)),Yr(r))){const y=Ss(r);f=ko(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?Bb(u,d):Vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function rM(e){return Array.from(e.getClientRects())}function iM(e){const t=Wr(e),n=uc(e),r=e.ownerDocument.body,s=ii(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ii(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+lc(e);const l=-n.scrollTop;return _r(r).direction==="rtl"&&(u+=ii(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const Ub=25;function sM(e,t){const n=Xn(e),r=Wr(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=mp();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=lc(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=Ub&&(a-=_)}else f<=Ub&&(a+=f);return{width:a,height:u,x:l,y:d}}const oM=new Set(["absolute","fixed"]);function aM(e,t){const n=Ss(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Yr(e)?ko(e):Vr(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 Hb(e,t,n){let r;if(t==="viewport")r=sM(e,n);else if(t==="document")r=iM(Wr(e));else if(xr(t))r=aM(t,n);else{const s=Fb(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return sc(r)}function jb(e,t){const n=Oi(e);return n===t||!xr(n)||No(n)?!1:_r(n).position==="fixed"||jb(n,t)}function uM(e,t){const n=t.get(e);if(n)return n;let r=Xa(e,[],!1).filter(l=>xr(l)&&Co(l)!=="body"),s=null;const a=_r(e).position==="fixed";let u=a?Oi(e):e;for(;xr(u)&&!No(u);){const l=_r(u),d=pp(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&oM.has(s.position)||Ga(u)&&!d&&jb(e,u))?r=r.filter(p=>p!==u):s=l,u=Oi(u)}return t.set(e,r),r}function lM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?ac(t)?[]:uM(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=Hb(t,p,s);return f.top=ii(m.top,f.top),f.right=Ni(m.right,f.right),f.bottom=Ni(m.bottom,f.bottom),f.left=ii(m.left,f.left),f},Hb(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function cM(e){const{width:t,height:n}=Mb(e);return{width:t,height:n}}function dM(e,t,n){const r=Yr(t),s=Wr(t),a=n==="fixed",u=Ss(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Vr(0);function f(){d.x=lc(s)}if(r||!r&&!a)if((Co(t)!=="body"||Ga(s))&&(l=uc(t)),r){const y=Ss(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?Bb(s,l):Vr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function yp(e){return _r(e).position==="static"}function $b(e,t){if(!Yr(e)||_r(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function zb(e,t){const n=Xn(e);if(ac(e))return n;if(!Yr(e)){let s=Oi(e);for(;s&&!No(s);){if(xr(s)&&!yp(s))return s;s=Oi(s)}return n}let r=$b(e,t);for(;r&&KD(r)&&yp(r);)r=$b(r,t);return r&&No(r)&&yp(r)&&!pp(r)?n:r||ZD(e)||n}const fM=function(e){return ke(this,null,function*(){const t=this.getOffsetParent||zb,n=this.getDimensions,r=yield n(e.floating);return{reference:dM(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function hM(e){return _r(e).direction==="rtl"}const pM={convertOffsetParentRelativeRectToViewportRelativeRect:nM,getDocumentElement:Wr,getClippingRect:lM,getOffsetParent:zb,getElementRects:fM,getClientRects:rM,getDimensions:cM,getScale:ko,isElement:xr,isRTL:hM};function Vb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mM(e,t){let n=null,r;const s=Wr(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:T,height:y}=f;if(l||t(),!T||!y)return;const _=rc(m),A=rc(s.clientWidth-(p+T)),v=rc(s.clientHeight-(m+y)),x=rc(p),I={rootMargin:-_+"px "+-A+"px "+-v+"px "+-x+"px",threshold:ii(0,Ni(1,d))||1};let j=!0;function q(R){const X=R[0].intersectionRatio;if(X!==d){if(!j)return u();X?u(!1,X):r=setTimeout(()=>{u(!1,1e-7)},1e3)}X===1&&!Vb(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(q,fe(F({},I),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(q,I)}n.observe(e)}return u(!0),a}function gM(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=Ep(e),p=s||a?[...f?Xa(f):[],...Xa(t)]:[];p.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=f&&l?mM(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(x=>{let[k]=x;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,A=d?Ss(e):null;d&&v();function v(){const x=Ss(e);A&&!Vb(A,x)&&n(),A=x,_=requestAnimationFrame(v)}return n(),()=>{var x;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const EM=WD,yM=YD,TM=zD,bM=XD,wM=VD,xM=$D,_M=GD,SM=(e,t,n)=>{const r=new Map,s=F({platform:pM},n),a=fe(F({},s.platform),{_c:r});return jD(e,t,fe(F({},s),{platform:a}))};function qb(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 fe(F({},s),{toJSON:()=>s})}function vM(e){if(!e)return qb();const{x:t,y:n,width:r,height:s}=e;return qb(t,n,r,s)}function AM(e,t){return{contextElement:sn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?vM(r):n.getBoundingClientRect()}}}var Ka=e=>({variable:e,reference:`var(${e})`}),oi={arrowSize:Ka("--arrow-size"),arrowSizeHalf:Ka("--arrow-size-half"),arrowBg:Ka("--arrow-background"),transformOrigin:Ka("--transform-origin"),arrowOffset:Ka("--arrow-offset")},CM=e=>e==="top"||e==="bottom"?"y":"x";function NM(e,t){return{name:"transformOrigin",fn(n){var se,H,re,V,ee;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=CM(d),p=((se=s.arrow)==null?void 0:se.x)||0,m=((H=s.arrow)==null?void 0:H.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,A=m+y/2,v=Math.abs(((re=s.shift)==null?void 0:re.y)||0),x=u.reference.height/2,k=y/2,I=(ee=(V=e.offset)==null?void 0:V.mainAxis)!=null?ee:e.gutter,j=typeof I=="number"?I+k:I!=null?I:k,q=v>j,R={top:`${_}px calc(100% + ${j}px)`,bottom:`${_}px ${-j}px`,left:`calc(100% + ${j}px) ${A}px`,right:`${-j}px ${A}px`}[d],X=`${_}px ${u.reference.y+x-l}px`,ne=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(oi.transformOrigin.variable,ne?X:R),{data:{transformOrigin:ne?X:R}}}}}var kM={name:"rects",fn({rects:e}){return{data:e}}},OM=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% + ${oi.arrowOffset.reference})`}),{}}}};function IM(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var PM={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Wb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Tp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function RM(e,t,n){const r=e||t.createElement("div");return xM({element:r,padding:n.arrowPadding})}function LM(e,t){var n;if(!e5((n=t.offset)!=null?n:t.gutter))return EM(({placement:r})=>{var p,m,T,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}=IM(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Yh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function DM(e){if(!e.flip)return;const t=Tp(e.boundary);return TM(fe(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function MM(e){if(!e.slide&&!e.overlap)return;const t=Tp(e.boundary);return yM(fe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_M()}))}function FM(e){return bM({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 BM(e){var t;if(e.hideWhenDetached)return wM({strategy:"referenceHidden",boundary:(t=Tp(e.boundary))!=null?t:"clippingAncestors"})}function UM(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function HM(e,t,n={}){const r=AM(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},PM,n),a=t.querySelector("[data-part=arrow]"),u=[LM(a,s),DM(s),MM(s),RM(a,t.ownerDocument,s),OM(a),NM({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),FM(s),BM(s),kM],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>ke(null,null,function*(){var j;if(!r||!t)return;const A=yield SM(r,t,{placement:l,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=yo(t),x=Wb(v,A.x),k=Wb(v,A.y);t.style.setProperty("--x",`${x}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((j=A.middlewareData.hide)==null?void 0:j.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 q=bo(I);t.style.setProperty("--z-index",q.zIndex)}}),T=()=>ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=UM(s.listeners),_=s.listeners?gM(r,t,T,y):l5;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function Yb(e,t,n={}){const l=n,{defer:r}=l,s=vn(l,["defer"]),a=r?Jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(HM(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var jM={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function $M(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:oi.arrowSize.reference,height:oi.arrowSize.reference,[oi.arrowSizeHalf.variable]:`calc(${oi.arrowSize.reference} / 2)`,[oi.arrowOffset.variable]:`calc(${oi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?jM[t.split("-")[0]]:void 0,background:oi.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 Oo=new WeakMap,cc=new WeakMap,dc={},bp=0,Gb=e=>e&&(e.host||Gb(e.parentNode)),zM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Gb(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),VM=new Set(["script","output","status","next-route-announcer"]),qM=e=>VM.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),WM=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=zM(n,Array.isArray(e)?e:[e]);dc[r]||(dc[r]=new WeakMap);const l=dc[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&&sn(y)&&ob(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(qM(_))return;const v=_.getAttribute(s)==="true",x=(Oo.get(_)||0)+1,k=(l.get(_)||0)+1;Oo.set(_,x),l.set(_,k),d.push(_),x===1&&v&&cc.set(_,!0),k===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return T(n),f.clear(),bp++,()=>{d.forEach(y=>{const _=Oo.get(y)-1,A=l.get(y)-1;Oo.set(y,_),l.set(y,A),_||(cc.has(y)||y.removeAttribute(s),cc.delete(y)),A||y.removeAttribute(r)}),bp--,bp||(Oo=new WeakMap,Oo=new WeakMap,cc=new WeakMap,dc={})}},YM=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,GM=(e,t=YM(e),n="data-aria-hidden",r=!0)=>{if(t)return WM(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},XM=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Xb(e,t={}){const{defer:n=!0}=t,r=n?XM:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(GM(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function KM(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 QM(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 Kb="pointerdown.outside",Qb="focus.outside";function JM(e){for(const t of e)if(sn(t)&&zr(t))return!0;return!1}var Jb=e=>"clientY"in e;function ZM(e,t){if(!Jb(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 e8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Zb(e,t){if(!t||!Jb(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 e8(u,l)?r||a:!1}function t8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=$r(e),f=yo(e),p=KM(f),m=QM(f);function T(I,j){if(!sn(j)||!j.isConnected||Eo(e,j)||ZM(e,I)||l&&sb(e,j))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const X=np(q);if(Zb(I,X))return!1}const R=np(e);return Zb(I,R)?!1:!(n!=null&&n(j))}const y=new Set,_=Ts(e==null?void 0:e.getRootNode());function A(I){function j(q){var se,H;const R=u&&!ab()?Jt:re=>re(),X=q!=null?q:I,ne=(H=(se=X==null?void 0:X.composedPath)==null?void 0:se.call(X))!=null?H:[X==null?void 0:X.target];R(()=>{const re=_?ne[0]:wr(I);if(!(!e||!T(I,re))){if(s||a){const V=Wh(s,a);e.addEventListener(Kb,V,{once:!0})}ew(e,Kb,{bubbles:!1,cancelable:!0,detail:{originalEvent:X,contextmenu:V5(X),focusable:JM(ne),target:re}})}})}I.pointerType==="touch"?(y.forEach(q=>q()),y.add(on(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const v=new Set,x=setTimeout(()=>{v.add(on(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function k(I){(u?Jt:q=>q())(()=>{var X,ne;const q=(ne=(X=I==null?void 0:I.composedPath)==null?void 0:X.call(I))!=null?ne:[I==null?void 0:I.target],R=_?q[0]:wr(I);if(!(!e||!T(I,R))){if(r||a){const se=Wh(r,a);e.addEventListener(Qb,se,{once:!0})}ew(e,Qb,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:zr(R),target:R}})}})}return ab()||(v.add(on(d,"focusin",k,!0)),v.add(m.addEventListener("focusin",k,!0)),v.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(x),y.forEach(I=>I()),v.forEach(I=>I())}}function n8(e,t){const{defer:n}=t,r=n?Jt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(t8(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function ew(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function r8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return on($r(e),"keydown",n,{capture:!0})}var tw="layer:request-dismiss",rr={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=>Eo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Eo(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=>rr.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];s8(e,tw,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),i8(e,tw,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function i8(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 s8(e,t,n){e.addEventListener(t,n,{once:!0})}var nw;function rw(){rr.layers.forEach(({node:e})=>{e.style.pointerEvents=rr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function o8(e){e.style.pointerEvents=""}function a8(e,t){const n=$r(e),r=[];return rr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(nw=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=hD(()=>{const l=s();return sn(l)?l:null},{timeout:1e3});a.then(l=>r.push(Ql(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{rr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=nw,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function u8(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};rr.add(f),rw();function p(A){var x,k;const v=wr(A.detail.originalEvent);rr.isBelowPointerBlockingLayer(e)||rr.isInBranch(v)||((x=t.onPointerDownOutside)==null||x.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(l&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var x,k;const v=wr(A.detail.originalEvent);rr.isInBranch(v)||((x=t.onFocusOutside)==null||x.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(l&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function T(A){var v;rr.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var I;if(!e)return!1;const v=typeof u=="function"?u():u,x=Array.isArray(v)?v:[v],k=(I=t.persistentElements)==null?void 0:I.map(j=>j()).filter(sn);return k&&x.push(...k),x.some(j=>Eo(j,A))||rr.isInNestedLayer(e,A)}const _=[a?a8(e,t.persistentElements):void 0,r8(e,T),n8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{rr.remove(e),rw(),o8(e),_.forEach(A=>A==null?void 0:A())}}function iw(e,t){const{defer:n}=t,r=n?Jt:a=>a(),s=[];return s.push(r(()=>{const a=mo(e)?e():e;s.push(u8(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var l8=Object.defineProperty,c8=(e,t,n)=>t in e?l8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rt=(e,t,n)=>c8(e,typeof t!="symbol"?t+"":t,n),sw={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()}},d8=[],f8=class{constructor(e,t){Rt(this,"trapStack"),Rt(this,"config"),Rt(this,"doc"),Rt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Rt(this,"portalContainers",new Set),Rt(this,"listenerCleanups",[]),Rt(this,"handleFocus",r=>{const s=wr(r),a=this.findContainerIndex(s,r)>=0;if(a||Yl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(qa(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=>qa(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}),Rt(this,"handlePointerDown",r=>{const s=wr(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()}}),Rt(this,"handleClick",r=>{const s=wr(r);this.findContainerIndex(s,r)>=0||Ja(this.config.clickOutsideDeactivates,r)||Ja(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Rt(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;Qa(r)&&r.preventDefault(),this.tryFocus(a)}}),Rt(this,"handleEscapeKey",r=>{h8(r)&&Ja(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Rt(this,"_mutationObserver"),Rt(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 D5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?M5(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Rt(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)}))}),Rt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!zr(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}),Rt(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,p8(r)&&r.select()}}),Rt(this,"deactivate",r=>{if(!this.state.active)return this;const s=F({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(),sw.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=()=>{ow(()=>{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}),Rt(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}),Rt(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}),Rt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Rt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),Rt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),Rt(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}),Rt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||wr(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||zr(u)&&!bs(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=qa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Qa(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||zr(u)&&!bs(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=qa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Qa(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||d8;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Qa(r)&&!r.shiftKey},isKeyBackward(r){return Qa(r)&&r.shiftKey}},t);this.doc=n.document||$r(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=>{P5(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?sb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=wo(e,{getShadowRoot:this.config.getShadowRoot}),n=pb(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(qa(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 T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(bs(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(bs(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 sw.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ow(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(on(this.doc,"focusin",this.handleFocus,!0),on(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),on(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),on(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),on(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),on(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)}},Qa=e=>e.key==="Tab",Ja=(e,...t)=>typeof e=="function"?e(...t):e,h8=e=>!e.isComposing&&e.key==="Escape",ow=e=>setTimeout(e,0),p8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function aw(e,t={}){let n;const r=Jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new f8(s,fe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:$r(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var wp="data-scroll-lock";function m8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function uw(e){const t=bo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function lw(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(wp))return;const u=uw(r)||uw(s),l=n.innerWidth-r.clientWidth;s.setAttribute(wp,"");const d=()=>dD(r,"--scrollbar-width",`${l}px`),f=m8(r),p=()=>{const _={overflow:"hidden"};return!u&&l>0&&(_[f]=`${l}px`),Ql(s,_)},m=()=>{var q,R;const{scrollX:_,scrollY:A,visualViewport:v}=n,x=(q=v==null?void 0:v.offsetLeft)!=null?q:0,k=(R=v==null?void 0:v.offsetTop)!=null?R:0,I={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(k))}px`,left:`${-(_-Math.floor(x))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const j=Ql(s,I);return()=>{j==null||j(),n.scrollTo({left:_,top:A,behavior:"instant"})}},T=[d(),Gl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),s.removeAttribute(wp)}}var g8=xs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Gr=g8.build(),cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},dw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},xp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},fw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},E8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},_p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},hw=e=>e.getById(cw(e)),Io=e=>e.getById(dw(e)),Po=e=>e.getById(xp(e)),pw=e=>e.getById(fw(e)),T8=e=>e.getById(_p(e)),b8=e=>e.getById(Sp(e));function w8(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"),T=$M(fe(F({},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(fe(F({id:E8(l)},Gr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(fe(F({},Gr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(fe(F({},Gr.anchor.attrs),{dir:u("dir"),id:cw(l)}))},getTriggerProps(){return t.button(fe(F({},Gr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:dw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":xp(l),onPointerDown(y){ub(y)&&$5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(fe(F({},Gr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({id:fw(l)},Gr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(fe(F({},Gr.content.attrs),{dir:u("dir"),id:xp(l),tabIndex:-1,role:"dialog","aria-modal":nb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":go(d),"aria-labelledby":m.title?_p(l):void 0,"aria-describedby":m.description?Sp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(fe(F({},Gr.title.attrs),{id:_p(l),dir:u("dir")}))},getDescriptionProps(){return t.element(fe(F({},Gr.description.attrs),{id:Sp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(fe(F({},Gr.closeTrigger.attrs),{dir:u("dir"),id:y8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var x8={props({props:e}){return fe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({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=hw(n))!=null?a:Io(n);return Yb(r,()=>pw(n),fe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Po(n);let s=!0;return iw(r,{type:"popover",pointerBlocking:t("modal"),exclude:Io(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:lD(()=>Po(t),{triggerElement:Io(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Xb(()=>[Po(t),Io(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return lw(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?aw(()=>Po(t),{initialFocus:()=>mb({root:Po(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=hw(n))!=null?u:Io(n);Yb(s,()=>pw(n),fe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Jt(()=>{Object.assign(e.get("renderedElements"),{title:!!T8(t),description:!!b8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Jt(()=>{const n=mb({root:Po(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||Jt(()=>{const a=Io(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})}}}};So()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[t$,fc]=ws({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[n$,vp]=ws({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),_8=e=>{const t=N.useId(),{getRootNode:n}=fc(),{dir:r}=vp(),s=F({id:t,dir:r,getRootNode:n},e),a=Zl(x8,s);return w8(a,sp)},S8=e=>{const[t,u]=Sb(e),l=u,{children:n}=l,r=vn(l,["children"]),s=_8(r),a=up(Zt({present:s.open},t));return w.jsx(SD,{value:s,children:w.jsx(wb,{value:a,children:n})})},mw=N.forwardRef((e,t)=>{const n=ap(),r=Wa(),s=Zt(fe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(bn.button,fe(F({},s),{ref:t}))});mw.displayName="PopoverTrigger";function v8(e){return dt({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 A8(e){return dt({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 gw(e){return dt({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 Ew(e){return dt({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 C8(e){return dt({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 N8(e){return dt({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 Ap(e){return dt({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 yw(e){return dt({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 k8=({className:e,componentType:t,children:n})=>{const[r,s]=N.useState(!1),{globalClassName:a}=lt(),u=f=>{s(f.open)},l=N.useCallback(()=>{s(!1)},[]),d=N.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(S8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(mw,{"aria-label":`Overflow menu for ${t}`,className:M(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(yw,{})}),w.jsx(_b,{children:w.jsx(xb,{className:M(`${O}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(YT.Provider,{value:d,children:n})})})]})};function Tw(e){return dt({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 bw(e){return dt({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[O8,vs]=ws({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Cp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getControlProps(),e);return w.jsx(bn.div,fe(F(F({},r),e),{ref:t}))});Cp.displayName="CarouselControl";const Np=N.forwardRef((e,t)=>{const[n,r]=Ya()(e,["readOnly","index"]),s=vs(),a=Zt(s.getIndicatorProps(n),r);return w.jsx(bn.button,fe(F({},a),{ref:t}))});Np.displayName="CarouselIndicator";const kp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getIndicatorGroupProps(),e);return w.jsx(bn.div,fe(F({},r),{ref:t}))});kp.displayName="CarouselIndicatorGroup";const Op=N.forwardRef((e,t)=>{const[n,r]=Ya()(e,["index","snapAlign"]),s=vs(),a=Zt(s.getItemProps(n),r);return w.jsx(bn.div,fe(F({},a),{ref:t}))});Op.displayName="CarouselItem";const Ip=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getItemGroupProps(),e);return w.jsx(bn.div,fe(F({},r),{ref:t}))});Ip.displayName="CarouselItemGroup";const Pp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getNextTriggerProps(),e);return w.jsx(bn.button,fe(F({},r),{ref:t}))});Pp.displayName="CarouselNextTrigger";const Rp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getPrevTriggerProps(),e);return w.jsx(bn.button,fe(F({},r),{ref:t}))});Rp.displayName="CarouselPrevTrigger";function I8(e){const t=bo(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(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}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 P8(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 ww(e){let t=[];for(const n of e.children)t=t.concat(n,ww(n));return t}function xw(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?ww(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(!P8(n,m,u))continue;const T=bo(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const A=a==="x"?_:y,v=m[l]-n[l]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function _w(e){const t=e.getBoundingClientRect(),n=I8(e),r=xw(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Sw([...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(vw(0,s.x))),y:Sw([...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(vw(0,s.y)))}}function R8(e,t,n){const r=xw(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Sw=e=>[...new Set(e)],vw=(e,t)=>n=>Math.max(e,Math.min(t,n)),L8=xs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ai=L8.build(),D8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},M8=(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}`},hc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},F8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},B8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},U8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Aw=(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}`},Fn=e=>e.getById(hc(e)),Cw=e=>cD(Fn(e),"[data-part=item]"),H8=(e,t)=>e.getById(Aw(e,t)),Nw=e=>{const t=Fn(e);if(!t)return;const n=wo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function j8(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"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=l("slidesPerPage"),v=l("padding"),x=l("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/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(fe(F({},ai.root.attrs),{id:D8(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":A,"--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(fe(F({},ai.itemGroup.attrs),{id:hc(u),"data-orientation":l("orientation"),"data-dragging":go(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(k){Eo(k.currentTarget,wr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Eo(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!l("allowMouseDrag")||!ub(k))return;const I=wr(k);zr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:c5(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:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:v,[T?"paddingInline":"paddingBlock"]:v,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const I=r.get("slidesInView").includes(k.index);return t.element(fe(F({},ai.item.attrs),{id:M8(u,k.index),dir:l("dir"),role:"group","data-index":k.index,"data-inview":go(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":x.item(k.index,l("slideCount")),"aria-hidden":nb(!I),style:{scrollSnapAlign:(()=>{var ne;const j=(ne=k.snapAlign)!=null?ne:"start",q=l("slidesPerMove"),R=q==="auto"?Math.floor(l("slidesPerPage")):q;return(k.index+R)%R===0?j:void 0})()}}))},getControlProps(){return t.element(fe(F({},ai.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(fe(F({},ai.prevTrigger.attrs),{id:B8(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":x.prevTrigger,"data-orientation":l("orientation"),"aria-controls":hc(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(fe(F({},ai.nextTrigger.attrs),{dir:l("dir"),id:F8(u),type:"button","aria-label":x.nextTrigger,"data-orientation":l("orientation"),"aria-controls":hc(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(fe(F({},ai.indicatorGroup.attrs),{dir:l("dir"),id:U8(u),"data-orientation":l("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",j={ArrowDown(X){T||(a({type:"PAGE.NEXT",src:I}),X.preventDefault())},ArrowUp(X){T||(a({type:"PAGE.PREV",src:I}),X.preventDefault())},ArrowRight(X){T&&(a({type:"PAGE.NEXT",src:I}),X.preventDefault())},ArrowLeft(X){T&&(a({type:"PAGE.PREV",src:I}),X.preventDefault())},Home(X){a({type:"PAGE.SET",index:0,src:I}),X.preventDefault()},End(X){a({type:"PAGE.SET",index:y.length-1,src:I}),X.preventDefault()}},q=Y5(k,{dir:l("dir"),orientation:l("orientation")}),R=j[q];R==null||R(k)}}))},getIndicatorProps(k){return t.button(fe(F({},ai.indicator.attrs),{dir:l("dir"),id:Aw(u,k.index),type:"button","data-orientation":l("orientation"),"data-index":k.index,"data-readonly":go(k.readOnly),"data-current":go(k.index===_),"aria-label":x.indicator(k.index),onClick(I){I.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(fe(F({},ai.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":go(d),"aria-label":d?x.autoplayStop:x.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var $8={props({props:e}){return g5(e,["slideCount"],"carousel"),fe(F({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:F({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:z8(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 ZL(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(Fn(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=Fn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Nw(e)});return Nw(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Fn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Jt(()=>{s(),Jt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Cw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Fn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?GL(d,m):XL(d,m)},n.get("slidesInView"));n.set("slidesInView",KL(l))},{root:r,threshold:t("inViewThreshold")});return Cw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Fn(n);return r?on(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 on(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return aD(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 on(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=eb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Fn(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=Fn(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=QT(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=QL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Fn(r);if(!s)return;const a=R8(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=eb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Fn(n);if(!r)return;const s=_w(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Fn(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=Fn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Fn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=_w(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]);Jt(()=>{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=H8(n,e.get("page"));r&&Jt(()=>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 z8(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}So()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),So()(["index","readOnly"]),So()(["index","snapAlign"]);const V8=e=>{const t=N.useId(),{getRootNode:n}=fc(),{dir:r}=vp(),s=F({id:t,dir:r,getRootNode:n},e),a=Zl($8,s);return j8(a,sp)},Lp=N.forwardRef((e,t)=>{const[n,r]=Ya()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=V8(n),a=Zt(s.getRootProps(),r);return w.jsx(O8,{value:s,children:w.jsx(bn.div,fe(F({},a),{ref:t}))})});Lp.displayName="CarouselRoot";const q8=180,W8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},Y8=({globalClassName:e,className:t,itemMinWidth:n=q8,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((ne,se)=>({node:ne,key:N.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${se}`})),T=m.length,y=N.useRef(null),[_,A]=N.useState(0),{width:v}=Q2();N.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,T]);const x=W8(r),k=n+x,I=_>0?(_+x)/k:1,j=Math.max(1,Math.floor(I));if(T===0)return null;const q=T>j,R=Math.ceil(T/j),X=q?Math.max(1,I):j;return w.jsxs(Lp,{ref:y,className:M(e,t,`${O}-carousel`),slidesPerPage:X,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[w.jsx(Ip,{className:M(e,`${O}-carousel__item-group`,{"carousel-row-container":!q}),children:m.map(({node:ne,key:se},H)=>w.jsx(Op,{index:H,className:M(e,`${O}-carousel__item`),children:ne},se))}),l&&q&&w.jsxs(Cp,{className:M(e,`${O}-carousel__control`),children:[w.jsx(Rp,{className:M(e,`${O}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(gw,{size:"16px"})}),w.jsx(Pp,{className:M(e,`${O}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Ew,{size:"16px"})})]}),u&&q&&w.jsx(kp,{className:M(e,`${O}-carousel__indicator-group`),children:Array.from({length:R},(ne,se)=>w.jsx(Np,{index:se,className:M(e,`${O}-carousel__indicator`),"aria-label":`Go to slide group ${se+1}`},se))})]})},[G8,X8]=ws({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),K8=e=>Ya()(e,["lazyMount","unmountOnExit"]),[Q8,Za]=ws({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),kw=N.forwardRef((e,t)=>{const n=Za(),r=X8(),s=up(fe(F({},r),{present:n.open})),a=Zt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(bn.div,fe(F({},a),{ref:ec(s.ref,t)}))});kw.displayName="DialogBackdrop";const Dp=N.forwardRef((e,t)=>{const n=Za(),r=Wa(),s=Zt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(bn.div,fe(F({},s),{ref:ec(r.ref,t)}))});Dp.displayName="DialogContent";const Mp=N.forwardRef((e,t)=>{const n=Za(),r=Zt(n.getDescriptionProps(),e);return w.jsx(bn.div,fe(F({},r),{ref:t}))});Mp.displayName="DialogDescription";const Fp=N.forwardRef((e,t)=>{const n=Za(),r=Zt(n.getPositionerProps(),e);return Wa().unmounted?null:w.jsx(bn.div,fe(F({},r),{ref:t}))});Fp.displayName="DialogPositioner";var J8=xs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),As=J8.build(),Ow=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Iw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Rw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},pc=e=>e.getById(Bp(e)),Z8=e=>e.getById(Ow(e)),e9=e=>e.getById(Iw(e)),t9=e=>e.getById(Pw(e)),n9=e=>e.getById(Up(e)),r9=e=>e.getById(Hp(e)),i9=e=>e.getById(Rw(e));function s9(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(fe(F({},As.trigger.attrs),{dir:a("dir"),id:Pw(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Bp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(fe(F({},As.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Iw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({},As.positioner.attrs),{dir:a("dir"),id:Ow(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(fe(F({},As.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Bp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Up(u),"aria-describedby":f.description?Hp(u):void 0}))},getTitleProps(){return t.element(fe(F({},As.title.attrs),{dir:a("dir"),id:Up(u)}))},getDescriptionProps(){return t.element(fe(F({},As.description.attrs),{dir:a("dir"),id:Hp(u)}))},getCloseTriggerProps(){return t.button(fe(F({},As.closeTrigger.attrs),{dir:a("dir"),id:Rw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var o9={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>i9(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return F({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 iw(()=>pc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[t9(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 lw(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?aw(()=>pc(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")?Xb(()=>[pc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Jt(()=>{e.set("rendered",{title:!!n9(t),description:!!r9(t)})})},syncZIndex({scope:e}){Jt(()=>{const t=pc(e);if(!t)return;const n=bo(t);[Z8(e),e9(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})}}}};So()(["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 a9=e=>{const t=N.useId(),{getRootNode:n}=fc(),{dir:r}=vp(),s=F({id:t,getRootNode:n,dir:r},e),a=Zl(o9,s);return s9(a,sp)},Lw=e=>{const[t,l]=Sb(e),d=l,{children:n}=d,r=vn(d,["children"]),[s]=K8(t),a=a9(r),u=up(Zt({present:a.open},t));return w.jsx(Q8,{value:a,children:w.jsx(G8,{value:s,children:w.jsx(wb,{value:u,children:n})})})},Dw=N.forwardRef((e,t)=>{const n=Za(),r=Zt(n.getTitleProps(),e);return w.jsx(bn.h2,fe(F({},r),{ref:t}))});Dw.displayName="DialogTitle";const u9=({children:e})=>{const[t,n]=N.useState(!1),r=N.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=N.useMemo(()=>({isOpen:t}),[t]);return w.jsx(qh.Provider,{value:r,children:w.jsx(WT.Provider,{value:s,children:e})})},Mw=()=>N.useContext(WT),Fw=()=>{const e=N.useContext(qh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},l9=`${O}-overflow-menu-button-trigger`,c9=({componentType:e,children:t})=>{const{isOpen:n}=Mw(),{closeMenu:r}=Fw(),{globalClassName:s}=lt(),a=N.useRef(null);return N.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${l9}`)||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,className:M(`${O}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},d9=({componentType:e,className:t})=>{const{toggleMenu:n}=Fw(),{isOpen:r}=Mw(),{globalClassName:s}=lt();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:M(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(yw,{})})};class f9{constructor(){Xe(this,"initialState",Ag);Xe(this,"promptsStateProxy");Xe(this,"promptsParamsProxy");Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return m9(n,r),Reflect.set(t,n,r)});Xe(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Xe(this,"updatePromptsParamsProxy",t=>new Proxy(F({},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 Ii=new f9,h9=e=>{window.addEventListener(Jd,e)},p9=e=>{window.removeEventListener(Jd,e)},m9=(e,t)=>{const n=new CustomEvent(Jd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Bw=e=>{const t=Ii.isOpen,n=typeof e=="boolean"?e:!t;Ii.promptsStateProxy.isOpen=n},g9=e=>{const t=Ii.isInline,n=typeof e=="boolean"?e:!t;Ii.promptsStateProxy.isInline=n},E9=({elementId:e,entryType:t,params:n,isInline:r})=>{Ii.promptsStateProxy.elementId=e,t&&(Ii.promptsStateProxy.entryType=t),typeof r=="boolean"&&g9(r),n&&Ii.updatePromptsParamsProxy(n),Ii.isOpen||Bw(!0)},y9=()=>{pg("resetConversation",!0,Yu.RESET_CONVERSATION)},T9=()=>{pg("endConversation",!0,Yu.END_CONVERSATION)},jp=()=>{const e=N.useContext(Q1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},b9=()=>{const e=N.useContext(K1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},mc=()=>{const e=N.useContext(X1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},w9=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),{previousComponentType:r}=Mr(),s=ys(),a=()=>{Xu(r||"dialog"),s()};return t?w.jsx(yr,{className:M(n,`${O}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(Tw,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(Tw,{}),"Show ",r||"dialog"]})},x9=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),{isModalFullscreen:r}=Mr(),s=ys(),a=()=>{nf(!r),s()},u=r?o3:a3,l="Toggle Fullscreen";return t?w.jsx(yr,{ariaLabel:l,title:l,className:M(n,`${O}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},_9=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),{dialogPosition:r}=Mr(),s=ys(),a=r==="bottom-left",u=()=>{rf(a?"bottom-right":"bottom-left"),s()},l=a?A8:v8,d=a?"Move right":"Move left";return t?w.jsx(yr,{className:M(n,`${O}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},Uw=({componentType:e,onClearChat:t,onEndConversation:n,onClose:r,onDownloadTranscript:s})=>{const{headerConfig:a,globalClassName:u,mode:l,enableDownloadTranscript:d}=lt(),{mode:f}=Mr(),p=l==="messaging"&&d&&!!s,m=f==="standalone",T=e==="modal",y=T?w9:jw,_=T?x9:_9,A=N.useMemo(()=>a?f3(a):{},[a]);return w.jsx(u9,{children:w.jsxs("div",{className:M(u,`${O}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:M(u,`${O}-${e}-header`,{standalone:m,embedded:!m}),style:A,children:[(a==null?void 0:a.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:M(u,`${O}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),w.jsx(Dw,{className:M(u,`${O}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),w.jsxs("div",{className:M(u,`${O}-${e}-controls`),children:[w.jsx(y,{componentType:e,isIcon:!0}),w.jsx(d9,{componentType:e}),w.jsx(pE,{className:M(u,`cim-${e}-component`),label:a==null?void 0:a.closeButtonAriaLabel,onClick:r})]})]}),w.jsxs(c9,{componentType:e,children:[w.jsx(_,{componentType:e}),w.jsx(N9,{componentType:e}),w.jsx(GT,{componentType:e,onClearChat:t}),n&&w.jsx(KT,{componentType:e,onEndConversation:n}),p&&w.jsx(XT,{componentType:e,onDownloadTranscript:s})]})]})})},Ro="USD",gc=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),ui=(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}`}},S9=({retailPrice:e,discountPrice:t,currencyCode:n=Ro})=>{const r=n||Ro,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:ui(a,r),comparePrice:ui(u,r),hasDiscount:s}},Ec=e=>typeof e=="number"&&Number.isFinite(e),$p=({min:e,max:t,currencyCode:n=Ro})=>{if(!Ec(e)||!Ec(t))return null;const r=n||Ro,s=ui(e,r),a=ui(t,r);if(s===null||a===null)return null;const u=e!==t;return{value:u?`${s} – ${a}`:s,low:s,high:a,isRange:u}},v9=({priceBreakdown:e,currencyCode:t=Ro})=>{if(!e)return null;const n=t||Ro,r=[e.promotional,e.sales,e.original],s=r.map(f=>f==null?void 0:f.min).filter(Ec),a=r.map(f=>f==null?void 0:f.max).filter(Ec);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=$p({min:u,max:l,currencyCode:n});return d?{range:d.value,low:d.low,high:d.high}:null},zp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=S9({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:M(s,a,`${O}-price`),style:f,children:[w.jsx("span",{className:`${O}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:M(s,`${O}-price__amount`),children:u}),d&&l&&w.jsxs("span",{className:M(s,`${O}-price__compare`),children:[w.jsx("span",{className:`${O}-visually-hidden`,children:"Original price: "}),l]})]})},A9={sparkle:Ap,plus:C8,"paper-plane":N8},Hw=({icon:e,className:t})=>{const n=A9[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},C9=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=lt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=_=>w.jsxs(w.Fragment,{children:[l&&w.jsx(Hw,{icon:l,className:`${O}-suggestion-button-icon`}),w.jsx("span",{children:_})]});return w.jsx("div",{className:M(t,`${O}-suggestion-container ${f}`,e),children:n.map(_=>s?w.jsx(Kf,{disabled:r,className:M(t,`${O}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):w.jsx("button",{disabled:r,className:M(t,`${O}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},N9=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=lt();if(!r)return null;const s=()=>{ni(!1),Xs(!0),Gf()};return t?w.jsx(yr,{className:M(n,`${O}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(cE,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(cE,{}),"Minimize"]})},jw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),r=ys(),s=()=>{Xu("modal"),r()};return t?w.jsx(yr,{className:M(n,`${O}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(bw,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(bw,{}),"Show modal"]})};function yc(){const{sendMessage:e}=$t(),{productId:t}=jp(),{enablePageContext:n}=lt();return N.useCallback((r,s)=>{var l;if(n)return e(r,s);const{prompt:a,display:u}=Pf(r,t);return e(a,fe(F({},s),{displayContent:(l=s==null?void 0:s.displayContent)!=null?l:u}))},[e,t,n])}function Vp(){const{sendFile:e}=$t(),{productId:t}=jp();return N.useCallback(n=>{if(!n.file||!t)return e(n);const{prompt:r}=Pf(n.text,t);return e(fe(F({},n),{text:r,displayContent:n.text}))},[e,t])}const k9=["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"],O9=3e3,I9=400,P9=({globalClassName:e,isWidgetStandalone:t,messages:n=k9})=>{const[r,s]=N.useState(0),[a,u]=N.useState(!0);return N.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},I9)},O9);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:M(e,`${O}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${O}-connecting-pulse-wrapper`,"aria-hidden":"true",children:[w.jsx("div",{className:`${O}-connecting-pulse`}),w.jsx("div",{className:`${O}-connecting-ring`})]}),w.jsx("span",{className:M(`${O}-connecting-text`,a&&`${O}-connecting-text--visible`),"aria-hidden":"true",children:n[r]})]})},R9=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${O}-processing-text`,"aria-hidden":"true",children:t}):null,L9=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${O}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${O}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${O}-processing-shimmer-bar`,"aria-hidden":"true"})]}):null,qp=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:M(e,`${O}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(R9,{shouldShow:!!n,loadingText:n}),w.jsx(L9,{shouldShow:!n})]});function $w(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 D9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function M9(e,t,n){const s=Il((n||{}).ignore||[]),a=F9(t);let u=-1;for(;++u<a.length;)Ay(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(s(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let x=!1,k=[];T.lastIndex=0;let I=T.exec(f.value);for(;I;){const j=I.index,q={index:I.index,input:I.input,stack:[...p,f]};let R=y(...I,q);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=j+1:(_!==j&&k.push({type:"text",value:f.value.slice(_,j)}),Array.isArray(R)?k.push(...R):R&&k.push(R),_=j+I[0].length,x=!0),!T.global)break;I=T.exec(f.value)}return x?(_<f.value.length&&k.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...k)):k=[f],v+k.length}}function F9(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([B9(s[0]),U9(s[1])])}return t}function B9(e){return typeof e=="string"?new RegExp(D9(e),"g"):e}function U9(e){return typeof e=="function"?e:function(){return e}}const Wp="phrasing",Yp=["autolink","link","image","label"];function H9(){return{transforms:[Y9],enter:{literalAutolink:$9,literalAutolinkEmail:Gp,literalAutolinkHttp:Gp,literalAutolinkWww:Gp},exit:{literalAutolink:W9,literalAutolinkEmail:q9,literalAutolinkHttp:z9,literalAutolinkWww:V9}}}function j9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Wp,notInConstruct:Yp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Wp,notInConstruct:Yp},{character:":",before:"[ps]",after:"\\/",inConstruct:Wp,notInConstruct:Yp}]}}function $9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gp(e){this.config.enter.autolinkProtocol.call(this,e)}function z9(e){this.config.exit.autolinkProtocol.call(this,e)}function V9(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 q9(e){this.config.exit.autolinkEmail.call(this,e)}function W9(e){this.exit(e)}function Y9(e){M9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,G9],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),X9]],{ignore:["link","linkReference"]})}function G9(e,t,n,r,s){let a="";if(!zw(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!K9(n)))return!1;const u=Q9(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 X9(e,t,n,r){return!zw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function K9(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 Q9(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=$w(e,"(");let a=$w(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 zw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ds(n)||Sl(n))&&(!t||n!==47)}Vw.peek=oF;function J9(){this.buffer()}function Z9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function eF(){this.buffer()}function tF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function nF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rF(e){this.exit(e)}function iF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sF(e){this.exit(e)}function oF(){return"["}function Vw(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 aF(){return{enter:{gfmFootnoteCallString:J9,gfmFootnoteCall:Z9,gfmFootnoteDefinitionLabelString:eF,gfmFootnoteDefinition:tF},exit:{gfmFootnoteCallString:nF,gfmFootnoteCall:rF,gfmFootnoteDefinitionLabelString:iF,gfmFootnoteDefinition:sF}}}function uF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Vw},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?`
|
|
37
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ps={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/"},$y={}.hasOwnProperty,OR=Object.prototype;function IR(e,t){const n=t||{};return Ph({file:n.file||void 0,location:!1,schema:n.space==="svg"?wi:wa,verbose:n.verbose||!1},e)}function Ph(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Dl(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:zy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=kR(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"},Dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Dl(e,r,n),n}default:return n=PR(e,t),n}}function zy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Ph(e,t[n]);r.push(s)}return r}function PR(e,t){const n=e.schema;e.schema=t.namespaceURI===ps.svg?wi:wa;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;$y.call(OR,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?NR:CR)(t.tagName,s,zy(e,t.childNodes));if(Dl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&lo(d.startTag),p=d&&d.endTag&&lo(d.endTag),m=Ph(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=RR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function RR(e,t,n){const r=lo(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)$y.call(n.attrs,u)&&(a[wl(e.schema,u).property]=lo(n.attrs[u]));n.startTag;const l=lo(n.startTag),d=n.endTag?lo(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function lo(e){const t=Vy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Vy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Vy(e){return e.line&&e.column?e:void 0}const qy={}.hasOwnProperty;function Wy(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&qy.call(s,e)){const d=String(s[e]);u=qy.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 LR={},DR={}.hasOwnProperty,Yy=Wy("type",{handlers:{root:FR,element:$R,text:HR,comment:jR,doctype:UR}});function MR(e,t){const r=(t||LR).space;return Yy(e,r==="svg"?wi:wa)}function FR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Rh(e.children,n,t),co(e,n),n}function BR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Rh(e.children,n,t),co(e,n),n}function UR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return co(e,t),t}function HR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return co(e,t),t}function jR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return co(e,t),t}function $R(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=wi);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&DR.call(e.properties,a)){const d=zR(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ps[u],childNodes:[],parentNode:null};return l.childNodes=Rh(e.children,l,r),co(e,l),e.tagName==="template"&&e.content&&(l.content=BR(e.content,r)),l}function zR(e,t,n){const r=wl(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?gE(n):kE(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=ps[r.space]}return s}function Rh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=Yy(e[r],n);a.parentNode=t,s.push(a)}return s}function co(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 VR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],qR=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]),Pt="�";var P;(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"})(P||(P={}));const Mn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Gy(e){return e>=55296&&e<=57343}function WR(e){return e>=56320&&e<=57343}function YR(e,t){return(e-55296)*1024+9216+t}function Xy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ky(e){return e>=64976&&e<=65007||qR.has(e)}var ue;(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"})(ue||(ue={}));const GR=65536;class XR{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=GR,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(WR(n))return this.pos++,this._addGap(),YR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(ue.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,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.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,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Gy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Xy(t)?this._err(ue.controlCharacterInInputStream):Ky(t)&&this._err(ue.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(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"})(tt||(tt={}));function Qy(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 KR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),QR=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 JR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=QR.get(e))!==null&&t!==void 0?t:e}var nn;(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"})(nn||(nn={}));const ZR=32;var Si;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Si||(Si={}));function Lh(e){return e>=nn.ZERO&&e<=nn.NINE}function e4(e){return e>=nn.UPPER_A&&e<=nn.UPPER_F||e>=nn.LOWER_A&&e<=nn.LOWER_F}function t4(e){return e>=nn.UPPER_A&&e<=nn.UPPER_Z||e>=nn.LOWER_A&&e<=nn.LOWER_Z||Lh(e)}function n4(e){return e===nn.EQUALS||t4(e)}var rn;(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"})(rn||(rn={}));var ri;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ri||(ri={}));class r4{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=rn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ri.Strict}startEntity(t){this.decodeMode=t,this.state=rn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case rn.EntityStart:return t.charCodeAt(n)===nn.NUM?(this.state=rn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=rn.NamedEntity,this.stateNamedEntity(t,n));case rn.NumericStart:return this.stateNumericStart(t,n);case rn.NumericDecimal:return this.stateNumericDecimal(t,n);case rn.NumericHex:return this.stateNumericHex(t,n);case rn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ZR)===nn.LOWER_X?(this.state=rn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=rn.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(Lh(s)||e4(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(Lh(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===nn.SEMI)this.consumed+=1;else if(this.decodeMode===ri.Strict)return 0;return this.emitCodePoint(JR(this.result),this.consumed),this.errors&&(t!==nn.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&Si.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=i4(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ri.Attribute&&(a===0||n4(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&Si.VALUE_LENGTH)>>14,a!==0){if(u===nn.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ri.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]&Si.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]&~Si.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case rn.NamedEntity:return this.result!==0&&(this.decodeMode!==ri.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case rn.NumericDecimal:return this.emitNumericEntity(0,2);case rn.NumericHex:return this.emitNumericEntity(0,3);case rn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case rn.EntityStart:return 0}}}function i4(e,t,n,r){const s=(t&Si.BRANCH_LENGTH)>>7,a=t&Si.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 Ee;(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/"})(Ee||(Ee={}));var ms;(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"})(ms||(ms={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));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 s4=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 fo(e){var t;return(t=s4.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,o4={[Ee.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[Ee.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[Ee.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[Ee.XLINK]:new Set,[Ee.XML]:new Set,[Ee.XMLNS]:new Set},Dh=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var D;(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"})(D||(D={}));const zt={DATA:D.DATA,RCDATA:D.RCDATA,RAWTEXT:D.RAWTEXT,SCRIPT_DATA:D.SCRIPT_DATA,PLAINTEXT:D.PLAINTEXT,CDATA_SECTION:D.CDATA_SECTION};function a4(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Pa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function u4(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function vi(e){return u4(e)||Pa(e)}function Jy(e){return vi(e)||a4(e)}function Ml(e){return e+32}function Zy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function eT(e){return Zy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function l4(e){return e===P.NULL?ue.nullCharacterReference:e>1114111?ue.characterReferenceOutsideUnicodeRange:Gy(e)?ue.surrogateCharacterReference:Ky(e)?ue.noncharacterCharacterReference:Xy(e)||e===P.CARRIAGE_RETURN?ue.controlCharacterReference:null}class c4{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=D.DATA,this.returnState=D.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new XR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new r4(KR,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ue.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ue.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=l4(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:tt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.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(Qy(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(ue.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=fo(t.tagName),t.type===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ue.endTagWithAttributes),t.selfClosing&&this._err(ue.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 tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.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:tt.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=Zy(t)?tt.WHITESPACE_CHARACTER:t===P.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=D.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ri.Attribute:ri.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===D.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===D.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===D.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case D.DATA:{this._stateData(t);break}case D.RCDATA:{this._stateRcdata(t);break}case D.RAWTEXT:{this._stateRawtext(t);break}case D.SCRIPT_DATA:{this._stateScriptData(t);break}case D.PLAINTEXT:{this._statePlaintext(t);break}case D.TAG_OPEN:{this._stateTagOpen(t);break}case D.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case D.TAG_NAME:{this._stateTagName(t);break}case D.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case D.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case D.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case D.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case D.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case D.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case D.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case D.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case D.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case D.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case D.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case D.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case D.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case D.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case D.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case D.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case D.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case D.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case D.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case D.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case D.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case D.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case D.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case D.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case D.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case D.BOGUS_COMMENT:{this._stateBogusComment(t);break}case D.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case D.COMMENT_START:{this._stateCommentStart(t);break}case D.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case D.COMMENT:{this._stateComment(t);break}case D.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case D.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case D.COMMENT_END:{this._stateCommentEnd(t);break}case D.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case D.DOCTYPE:{this._stateDoctype(t);break}case D.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case D.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case D.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case D.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case D.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case D.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case D.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case D.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case D.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case D.CDATA_SECTION:{this._stateCdataSection(t);break}case D.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case D.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case D.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case D.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=D.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=D.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=D.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(vi(t))this._createStartTagToken(),this.state=D.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=D.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=D.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(ue.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=D.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(vi(t))this._createEndTagToken(),this.state=D.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(ue.missingEndTagName),this.state=D.DATA;break}case P.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=D.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.tagName+=Pt;break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Pa(t)?Ml(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=D.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=D.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){vi(t)?(this.state=D.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=D.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=D.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=D.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=D.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=D.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){vi(t)?(this.state=D.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=D.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=D.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=D.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){vi(t)?(this.state=D.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=D.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=D.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=D.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=D.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:vi(t)?(this._emitChars("<"),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){vi(t)?(this.state=D.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&eT(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=D.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case P.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Mn.SCRIPT,!1)&&eT(this.preprocessor.peek(Mn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=D.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=D.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(ue.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=D.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=D.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=D.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=D.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(ue.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.name+=Pt;break}default:this.currentAttr.name+=String.fromCodePoint(Pa(t)?Ml(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=D.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=D.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=D.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=D.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=D.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingAttributeValue),this.state=D.DATA,this.emitCurrentTagToken();break}default:this.state=D.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=D.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=D.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=D.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=D.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(ue.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=D.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=D.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=D.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.missingWhitespaceBetweenAttributes),this.state=D.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=D.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.unexpectedSolidusInTag),this.state=D.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=Pt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Mn.DASH_DASH,!0)?(this._createCommentToken(Mn.DASH_DASH.length+1),this.state=D.COMMENT_START):this._consumeSequenceIfMatch(Mn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Mn.DOCTYPE.length+1),this.state=D.DOCTYPE):this._consumeSequenceIfMatch(Mn.CDATA_START,!0)?this.inForeignNode?this.state=D.CDATA_SECTION:(this._err(ue.cdataInHtmlContent),this._createCommentToken(Mn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=D.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ue.incorrectlyOpenedComment),this._createCommentToken(2),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=D.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=D.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=D.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=D.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=D.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=Pt;break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=D.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=D.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=D.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=D.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=D.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=D.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(ue.nestedComment),this.state=D.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=D.COMMENT_END;break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=D.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=D.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=D.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=D.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(ue.incorrectlyClosedComment),this.state=D.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=D.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=D.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(ue.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingWhitespaceBeforeDoctypeName),this.state=D.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Pa(t))this._createDoctypeToken(String.fromCharCode(Ml(t))),this.state=D.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(ue.unexpectedNullCharacter),this._createDoctypeToken(Pt),this.state=D.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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=D.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.name+=Pt;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Pa(t)?Ml(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Mn.PUBLIC,!1)?this.state=D.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Mn.SYSTEM,!1)?this.state=D.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ue.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.APOSTROPHE:{this.state=D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.APOSTROPHE:{this.state=D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=Pt;break}case P.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.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 P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case P.NULL:{this._err(ue.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=D.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(ue.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=D.CDATA_SECTION_END:(this._emitChars("]"),this.state=D.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=D.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=D.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(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Jy(this.preprocessor.peek(1))?D.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Jy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(ue.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const tT=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),nT=new Set([...tT,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Fl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),d4=new Set([...Fl,g.OL,g.UL]),f4=new Set([...Fl,g.BUTTON]),rT=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),iT=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),h4=new Set([g.TR,g.TEMPLATE,g.HTML]),p4=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),m4=new Set([g.TABLE,g.TEMPLATE,g.HTML]),g4=new Set([g.TD,g.TH]);class E4{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)===Ee.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])!==Ee.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(Dh,Ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(g4,Ee.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(m4,Ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(p4,Ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(h4,Ee.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 Ee.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case Ee.SVG:{if(iT.has(s))return!1;break}case Ee.MATHML:{if(rT.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fl)}hasInListItemScope(t){return this.hasInDynamicScope(t,d4)}hasInButtonScope(t){return this.hasInDynamicScope(t,f4)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Ee.HTML:{if(Dh.has(n))return!0;if(Fl.has(n))return!1;break}case Ee.SVG:{if(iT.has(n))return!1;break}case Ee.MATHML:{if(rT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Ee.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])===Ee.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])===Ee.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&&tT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&nT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&nT.has(this.currentTagId);)this.pop()}}const Mh=3;var jr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(jr||(jr={}));const sT={type:jr.Marker};class y4{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===jr.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<Mh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Mh)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>=Mh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(sT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:jr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:jr.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(sT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===jr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===jr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===jr.Element&&n.element===t)}}const Ai={createDocument(){return{nodeName:"#document",mode:nr.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};Ai.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(Ai.isTextNode(n)){n.value+=t;return}}Ai.appendChild(e,Ai.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ai.isTextNode(r)?r.value+=t:Ai.insertBefore(e,Ai.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=F(F({},e.sourceCodeLocation),t)}},oT="html",T4="about:legacy-compat",b4="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",aT=["+//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//"],w4=[...aT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],x4=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),uT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],_4=[...uT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function lT(e,t){return t.some(n=>e.startsWith(n))}function S4(e){return e.name===oT&&e.publicId===null&&(e.systemId===null||e.systemId===T4)}function v4(e){if(e.name!==oT)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===b4)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),x4.has(n))return nr.QUIRKS;let r=t===null?w4:aT;if(lT(n,r))return nr.QUIRKS;if(r=t===null?uT:_4,lT(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const cT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},A4="definitionurl",C4="definitionURL",N4=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])),k4=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Ee.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Ee.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Ee.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Ee.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Ee.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Ee.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Ee.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Ee.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Ee.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Ee.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Ee.XMLNS}]]),O4=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])),I4=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 P4(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ms.COLOR||r===ms.SIZE||r===ms.FACE)||I4.has(t)}function dT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===A4){e.attrs[t].name=C4;break}}function fT(e){for(let t=0;t<e.attrs.length;t++){const n=N4.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Fh(e){for(let t=0;t<e.attrs.length;t++){const n=k4.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 R4(e){const t=O4.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=fo(e.tagName))}function L4(e,t){return t===Ee.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function D4(e,t,n){if(t===Ee.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ms.ENCODING){const s=n[r].value.toLowerCase();return s===cT.TEXT_HTML||s===cT.APPLICATION_XML}}return t===Ee.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function M4(e,t,n,r){return(!r||r===Ee.HTML)&&D4(e,t,n)||(!r||r===Ee.MATHML)&&L4(e,t)}const F4="hidden",B4=8,U4=3;var $;(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"})($||($={}));const H4={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},hT=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),pT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ai,onParseError:null};class mT{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.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=F(F({},pT),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 c4(this.options,this),this.activeFormattingElements=new y4(this.treeAdapter),this.fragmentContextID=r?fo(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new E4(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=F(F({},pT),n);t!=null||(t=r.treeAdapter.createElement(Q.TEMPLATE,Ee.HTML,[]));const s=r.treeAdapter.createElement("documentmock",Ee.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift($.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:H4,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)===Ee.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Ee.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=zt.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)!==Ee.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=zt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=zt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=zt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=zt.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&&fe(F({},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,Ee.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Ee.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,Ee.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===tt.END_TAG&&s===n.tagName?{endTag:F({},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)===Ee.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Ee.HTML)}_processToken(t){switch(t.type){case tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return M4(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===jr.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=$.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=$.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=$.IN_TABLE;return}case g.BODY:{this.insertionMode=$.IN_BODY;return}case g.FRAMESET:{this.insertionMode=$.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?$.AFTER_HEAD:$.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=$.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.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=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(t){return hT.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)===Ee.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 o4[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gL(this,t);return}switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{La(this,t);break}case $.BEFORE_HEAD:{Da(this,t);break}case $.IN_HEAD:{Ma(this,t);break}case $.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case $.AFTER_HEAD:{Ba(this,t);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{ET(this,t);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{jh(this,t);break}case $.IN_TABLE_TEXT:{vT(this,t);break}case $.IN_COLUMN_GROUP:{Hl(this,t);break}case $.AFTER_BODY:{zl(this,t);break}case $.AFTER_AFTER_BODY:{Vl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mL(this,t);return}switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{La(this,t);break}case $.BEFORE_HEAD:{Da(this,t);break}case $.IN_HEAD:{Ma(this,t);break}case $.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case $.AFTER_HEAD:{Ba(this,t);break}case $.TEXT:{this._insertCharacters(t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{jh(this,t);break}case $.IN_COLUMN_GROUP:{Hl(this,t);break}case $.AFTER_BODY:{zl(this,t);break}case $.AFTER_AFTER_BODY:{Vl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Uh(this,t);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{Uh(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.AFTER_BODY:{Y4(this,t);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{G4(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{X4(this,t);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(t,ue.misplacedDoctype);break}case $.IN_TABLE_TEXT:{ja(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ue.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?EL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{K4(this,t);break}case $.BEFORE_HEAD:{J4(this,t);break}case $.IN_HEAD:{br(this,t);break}case $.IN_HEAD_NO_SCRIPT:{t6(this,t);break}case $.AFTER_HEAD:{r6(this,t);break}case $.IN_BODY:{Tn(this,t);break}case $.IN_TABLE:{ho(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.IN_CAPTION:{Z6(this,t);break}case $.IN_COLUMN_GROUP:{$h(this,t);break}case $.IN_TABLE_BODY:{jl(this,t);break}case $.IN_ROW:{$l(this,t);break}case $.IN_CELL:{nL(this,t);break}case $.IN_SELECT:{NT(this,t);break}case $.IN_SELECT_IN_TABLE:{iL(this,t);break}case $.IN_TEMPLATE:{oL(this,t);break}case $.AFTER_BODY:{uL(this,t);break}case $.IN_FRAMESET:{lL(this,t);break}case $.AFTER_FRAMESET:{dL(this,t);break}case $.AFTER_AFTER_BODY:{hL(this,t);break}case $.AFTER_AFTER_FRAMESET:{pL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{Q4(this,t);break}case $.BEFORE_HEAD:{Z4(this,t);break}case $.IN_HEAD:{e6(this,t);break}case $.IN_HEAD_NO_SCRIPT:{n6(this,t);break}case $.AFTER_HEAD:{i6(this,t);break}case $.IN_BODY:{Ul(this,t);break}case $.TEXT:{z6(this,t);break}case $.IN_TABLE:{Ua(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.IN_CAPTION:{eL(this,t);break}case $.IN_COLUMN_GROUP:{tL(this,t);break}case $.IN_TABLE_BODY:{zh(this,t);break}case $.IN_ROW:{CT(this,t);break}case $.IN_CELL:{rL(this,t);break}case $.IN_SELECT:{kT(this,t);break}case $.IN_SELECT_IN_TABLE:{sL(this,t);break}case $.IN_TEMPLATE:{aL(this,t);break}case $.AFTER_BODY:{IT(this,t);break}case $.IN_FRAMESET:{cL(this,t);break}case $.AFTER_FRAMESET:{fL(this,t);break}case $.AFTER_AFTER_BODY:{Vl(this,t);break}}}onEof(t){switch(this.insertionMode){case $.INITIAL:{Ra(this,t);break}case $.BEFORE_HTML:{La(this,t);break}case $.BEFORE_HEAD:{Da(this,t);break}case $.IN_HEAD:{Ma(this,t);break}case $.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case $.AFTER_HEAD:{Ba(this,t);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{_T(this,t);break}case $.TEXT:{V6(this,t);break}case $.IN_TABLE_TEXT:{ja(this,t);break}case $.IN_TEMPLATE:{OT(this,t);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Hh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.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 $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(t);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{gT(this,t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{jh(this,t);break}case $.IN_TABLE_TEXT:{ST(this,t);break}}}}function j4(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):xT(e,t),n}function $4(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 z4(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>=U4;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=V4(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function V4(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 q4(e,t,n){const r=e.treeAdapter.getTagName(t),s=fo(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===Ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function W4(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 Bh(e,t){for(let n=0;n<B4;n++){const r=j4(e,t);if(!r)break;const s=$4(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=z4(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&q4(e,u,a),W4(e,s,r)}}function Uh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Y4(e,t){e._appendCommentNode(t,e.openElements.items[0])}function G4(e,t){e._appendCommentNode(t,e.document)}function Hh(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 X4(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:v4(t);S4(t)||e._err(t,ue.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function Ra(e,t){e._err(t,ue.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function K4(e,t){t.tagID===g.HTML?(e._insertElement(t,Ee.HTML),e.insertionMode=$.BEFORE_HEAD):La(e,t)}function Q4(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function J4(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.HEAD:{e._insertElement(t,Ee.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break}default:Da(e,t)}}function Z4(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Da(e,t):e._err(t,ue.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(Q.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function br(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,zt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,zt.RAWTEXT):(e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,zt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,zt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function e6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ma(e,t);break}case g.TEMPLATE:{gs(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function gs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ue.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ue.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function t6(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{br(e,t);break}case g.NOSCRIPT:{e._err(t,ue.nestedNoscriptInHead);break}default:Fa(e,t)}}function n6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=$.IN_HEAD;break}case g.BR:{Fa(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===tt.EOF?ue.openElementsLeftAfterEof:ue.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function r6(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.BODY:{e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,Ee.HTML),e.insertionMode=$.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,ue.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),br(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function i6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ba(e,t);break}case g.TEMPLATE:{gs(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(Q.BODY,g.BODY),e.insertionMode=$.IN_BODY,Bl(e,t)}function Bl(e,t){switch(t.type){case tt.CHARACTER:{ET(e,t);break}case tt.WHITESPACE_CHARACTER:{gT(e,t);break}case tt.COMMENT:{Uh(e,t);break}case tt.START_TAG:{Tn(e,t);break}case tt.END_TAG:{Ul(e,t);break}case tt.EOF:{_T(e,t);break}}}function gT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ET(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function s6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function o6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function a6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_FRAMESET)}function u6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function l6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Dh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Ee.HTML)}function c6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function d6(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),n||(e.formElement=e.openElements.current))}function f6(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,Ee.HTML)}function h6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.tokenizer.state=zt.PLAINTEXT}function p6(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1}function m6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(Bh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function g6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function E6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Bh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function y6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function T6(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function yT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TT(e){const t=Qy(e,ms.TYPE);return t!=null&&t.toLowerCase()===F4}function b6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),TT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function w6(e,t){e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0}function x6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _6(e,t){t.tagName=Q.IMG,t.tagID=g.IMG,yT(e,t)}function S6(e,t){e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=zt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function v6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,zt.RAWTEXT)}function A6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,zt.RAWTEXT)}function bT(e,t){e._switchToTextParsing(t,zt.RAWTEXT)}function C6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function N6(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function k6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Ee.HTML)}function O6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,Ee.HTML)}function I6(e,t){e._reconstructActiveFormattingElements(),dT(t),Fh(t),t.selfClosing?e._appendElement(t,Ee.MATHML):e._insertElement(t,Ee.MATHML),t.ackSelfClosing=!0}function P6(e,t){e._reconstructActiveFormattingElements(),fT(t),Fh(t),t.selfClosing?e._appendElement(t,Ee.SVG):e._insertElement(t,Ee.SVG),t.ackSelfClosing=!0}function wT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function Tn(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:{g6(e,t);break}case g.A:{m6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{l6(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:{u6(e,t);break}case g.LI:case g.DD:case g.DT:{f6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{yT(e,t);break}case g.HR:{x6(e,t);break}case g.RB:case g.RTC:{k6(e,t);break}case g.RT:case g.RP:{O6(e,t);break}case g.PRE:case g.LISTING:{c6(e,t);break}case g.XMP:{v6(e,t);break}case g.SVG:{P6(e,t);break}case g.HTML:{s6(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:{br(e,t);break}case g.BODY:{o6(e,t);break}case g.FORM:{d6(e,t);break}case g.NOBR:{E6(e,t);break}case g.MATH:{I6(e,t);break}case g.TABLE:{T6(e,t);break}case g.INPUT:{b6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{w6(e,t);break}case g.IMAGE:{_6(e,t);break}case g.BUTTON:{p6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{y6(e,t);break}case g.IFRAME:{A6(e,t);break}case g.SELECT:{C6(e,t);break}case g.OPTION:case g.OPTGROUP:{N6(e,t);break}case g.NOEMBED:case g.NOFRAMES:{bT(e,t);break}case g.FRAMESET:{a6(e,t);break}case g.TEXTAREA:{S6(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?bT(e,t):wT(e,t);break}case g.PLAINTEXT:{h6(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:wT(e,t)}}function R6(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function L6(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=$.AFTER_BODY,IT(e,t))}function D6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function M6(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 F6(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(Q.P,g.P),e._closePElement()}function B6(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function U6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function H6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function j6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function $6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function xT(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 Ul(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:{Bh(e,t);break}case g.P:{F6(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:{D6(e,t);break}case g.LI:{B6(e);break}case g.DD:case g.DT:{U6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{H6(e);break}case g.BR:{$6(e);break}case g.BODY:{R6(e,t);break}case g.HTML:{L6(e,t);break}case g.FORM:{M6(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{j6(e,t);break}case g.TEMPLATE:{gs(e,t);break}default:xT(e,t)}}function _T(e,t){e.tmplInsertionModeStack.length>0?OT(e,t):Hh(e,t)}function z6(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 V6(e,t){e._err(t,ue.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function jh(e,t){if(e.openElements.currentTagId!==void 0&&hT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{vT(e,t);break}case tt.WHITESPACE_CHARACTER:{ST(e,t);break}}else Ha(e,t)}function q6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_CAPTION}function W6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function Y6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,g.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,$h(e,t)}function G6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_TABLE_BODY}function X6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,g.TBODY),e.insertionMode=$.IN_TABLE_BODY,jl(e,t)}function K6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Q6(e,t){TT(t)?e._appendElement(t,Ee.HTML):Ha(e,t),t.ackSelfClosing=!0}function J6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ho(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{X6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{br(e,t);break}case g.COL:{Y6(e,t);break}case g.FORM:{J6(e,t);break}case g.TABLE:{K6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{G6(e,t);break}case g.INPUT:{Q6(e,t);break}case g.CAPTION:{q6(e,t);break}case g.COLGROUP:{W6(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{gs(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:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Bl(e,t),e.fosterParentingEnabled=n}function ST(e,t){e.pendingCharacterTokens.push(t)}function vT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ja(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ha(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const AT=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function Z6(e,t){const n=t.tagID;AT.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,ho(e,t)):Tn(e,t)}function eL(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=$.IN_TABLE,n===g.TABLE&&Ua(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:Ul(e,t)}}function $h(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.COL:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{br(e,t);break}default:Hl(e,t)}}function tL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break}case g.TEMPLATE:{gs(e,t);break}case g.COL:break;default:Hl(e,t)}}function Hl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,g.TR),e.insertionMode=$.IN_ROW,$l(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=$.IN_TABLE,ho(e,t));break}default:ho(e,t)}}function zh(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=$.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,Ua(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:Ua(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Ee.HTML),e.insertionMode=$.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=$.IN_TABLE_BODY,jl(e,t));break}default:ho(e,t)}}function CT(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,zh(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=$.IN_TABLE_BODY,zh(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:Ua(e,t)}}function nL(e,t){const n=t.tagID;AT.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):Tn(e,t)}function rL(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=$.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),CT(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ul(e,t)}}function NT(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Ee.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:{br(e,t);break}}}function kT(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:{gs(e,t);break}}}function iL(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)):NT(e,t)}function sL(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)):kT(e,t)}function oL(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:{br(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,ho(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,$h(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,Tn(e,t)}}function aL(e,t){t.tagID===g.TEMPLATE&&gs(e,t)}function OT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Hh(e,t)}function uL(e,t){t.tagID===g.HTML?Tn(e,t):zl(e,t)}function IT(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=$.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 zl(e,t)}function zl(e,t){e.insertionMode=$.IN_BODY,Bl(e,t)}function lL(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.FRAMESET:{e._insertElement(t,Ee.HTML);break}case g.FRAME:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{br(e,t);break}}}function cL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function dL(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function fL(e,t){t.tagID===g.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function hL(e,t){t.tagID===g.HTML?Tn(e,t):Vl(e,t)}function Vl(e,t){e.insertionMode=$.IN_BODY,Bl(e,t)}function pL(e,t){switch(t.tagID){case g.HTML:{Tn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function mL(e,t){t.chars=Pt,e._insertCharacters(t)}function gL(e,t){e._insertCharacters(t),e.framesetOk=!1}function PT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Ee.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function EL(e,t){if(P4(t))PT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Ee.MATHML?dT(t):r===Ee.SVG&&(R4(t),fT(t)),Fh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function yL(e,t){if(t.tagID===g.P||t.tagID===g.BR){PT(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)===Ee.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 TL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,bL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),RT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function LT(e,t){const n=OL(e),r=Wy("type",{handlers:{root:wL,element:xL,text:_L,comment:MT,doctype:SL,raw:AL},unknown:CL}),s={parser:n?new mT(RT):mT.getFragmentParser(void 0,RT),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),po(s,Ur());const a=n?s.parser.document:s.parser.getFragment(),u=IR(a,{file:s.options.file});return s.stitches&&Rl(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 DT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function wL(e,t){DT(e.children,t)}function xL(e,t){NL(e,t),DT(e.children,t),kL(e,t)}function _L(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:tt.CHARACTER,chars:e.value,location:$a(e)};po(t,Ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function SL(e,t){const n={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:$a(e)};po(t,Ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function vL(e,t){t.stitches=!0;const n=IL(e);if("children"in e&&"children"in n){const r=LT({type:"root",children:e.children},t.options);n.children=r.children}MT({type:"comment",value:{stitch:n}},t)}function MT(e,t){const n=e.value,r={type:tt.COMMENT,data:n,location:$a(e)};po(t,Ur(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function AL(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,FT(t,Ur(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(TL,"<$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 CL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))vL(n,t);else{let r="";throw bL.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 po(e,t){FT(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=zt.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 FT(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 NL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===zt.PLAINTEXT)return;po(t,Ur(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:ps.html;s===ps.html&&n==="svg"&&(s=ps.svg);const a=MR(fe(F({},e),{children:[]}),{space:s===ps.svg?"svg":"html"}),u={type:tt.START_TAG,tagName:n,tagID:fo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:$a(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function kL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&VR.includes(n)||t.parser.tokenizer.state===zt.PLAINTEXT)return;po(t,xl(e));const r={type:tt.END_TAG,tagName:n,tagID:fo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:$a(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===zt.RCDATA||t.parser.tokenizer.state===zt.RAWTEXT||t.parser.tokenizer.state===zt.SCRIPT_DATA)&&(t.parser.tokenizer.state=zt.DATA)}function OL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function $a(e){const t=Ur(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 IL(e){return"children"in e?hs(fe(F({},e),{children:[]})):hs(e)}function BT(e){return function(t,n){return LT(t,fe(F({},e),{file:n}))}}const Es=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],UT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Es,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Es],h2:[["className","sr-only"]],img:[...Es,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Es,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Es],table:[...Es],ul:[...Es,["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"]},Ci={}.hasOwnProperty;function PL(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},UT),t):UT,stack:[]},s=HT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function HT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return RL(e,n);case"doctype":return LL(e,n);case"element":return DL(e,n);case"root":return ML(e,n);case"text":return FL(e,n)}}}function RL(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 za(a,t),a}}function LL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return za(n,t),n}}function DL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=jT(e,t.children),s=BL(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&&Ci.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 za(u,t),u}function ML(e,t){const r={type:"root",children:jT(e,t.children)};return za(r,t),r}function FL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return za(r,t),r}function jT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=HT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function BL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ci.call(r,n)?r[n]:void 0,u=r&&Ci.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ci.call(l,f)){const p=l[f];let m=$T(e,VT(a,f),f,p);m==null&&(m=$T(e,VT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&Ci.call(s,n)){const p=s[n];for(f in p)Ci.call(p,f)&&!Ci.call(d,f)&&(d[f]=p[f])}return d}function $T(e,t,n,r){return t?Array.isArray(r)?UL(e,t,n,r):zT(e,t,n,r):void 0}function UL(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=zT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function zT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&HL(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 HL(e,t,n){const r=e.schema.protocols&&Ci.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 za(e,t){const n=DE(t);t.data&&(e.data=hs(t.data)),n&&(e.position=n)}function VT(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 jL(e){return function(t){return PL(t,e)}}const qT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",fe(F(F({className:M(e,`${O}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},$L=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=lt();return!e&&!t?null:w.jsx("div",{className:M(n,`${O}-disclaimer`),children:t?w.jsx(Fy,{rehypePlugins:[BT,jL],components:{ul:({children:r})=>w.jsx("ul",{className:M(n,`${O}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:M(n,`${O}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:M(n,`${O}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(qT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:M(n,`${O}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:M(n,`${O}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:M(n,`${O}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:M(n,`${O}-disclaimer-text`),children:e})})},zL=Math.round(of/(1024*1024)),VL=e=>e==="oversize"?`File size exceeds the ${zL}MB limit. Please choose a smaller file.`:"That file type isn't supported. Please choose a PNG, JPG, or GIF image.",Vh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=$t(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:p,enableImageUpload:m}=lt(),T=N.useRef(null),y=N.useRef(l);y.current=l;const[_,A]=N.useState(!1),[v,x]=N.useState(null),k=m,I=!k1(s,a,u),j=t||I,q=N.useCallback(oe=>x(VL(oe)),[]),{file:R,attach:X,clear:ne}=p3({allowedMime:_g,maxBytes:Number.POSITIVE_INFINITY,onReject:q});N.useEffect(()=>{R&&x(null)},[R]);const se=N.useCallback(oe=>ke(null,null,function*(){var de,W,le;if(oe.preventDefault(),j)return;x(null);const me=(((de=T.current)==null?void 0:de.value)||"").trim();if(me||R){const C=!s&&!a&&u===!0,B=y.current.length;T.current.value="",(W=T.current)==null||W.focus({preventScroll:!0});const Z={text:me};R&&(Z.file=R),ne();const L=yield r(Z),xe=!!L&&L.outcome!=="success",De=y.current.length===B,he=((le=T.current)==null?void 0:le.value)==="";xe&&(C&&De&&he)&&(T.current.value=me,Z.file&&X([Z.file]),T.current.disabled||T.current.focus({preventScroll:!0}))}}),[R,s,a,u,j,ne,r,X]),H=N.useCallback(()=>{r({text:"Can you connect me to a human?"})},[r]),re=N.useCallback(oe=>{!k||j||(oe.preventDefault(),A(!0))},[k,j]),V=N.useCallback(()=>A(!1),[]),ee=N.useCallback(oe=>{!k||j||(oe.preventDefault(),A(!1),X(oe.dataTransfer.files))},[k,j,X]),ae=N.useCallback(oe=>{!k||j||oe.clipboardData.files.length>0&&X(oe.clipboardData.files)},[k,j,X]);return w.jsxs("div",{className:M(d,e,`cim-${n}-component`,R&&"with-attachments",`${O}-search-bar-wrapper`),children:[k&&R&&w.jsx(m3,{file:R,componentType:n,globalClassName:d,onRemove:ne}),k&&v&&w.jsx("div",{className:M(d,`${O}-attach-error`),role:"alert",children:v}),w.jsxs("form",{className:M(d,e,`cim-${n}-component`,_&&"drag-over",`${O}-search-bar`),name:`${O}-search-form`,onSubmit:se,onDragOver:re,onDragLeave:V,onDrop:ee,children:[w.jsxs("div",{className:M(d,e,`cim-${n}-component`,`${O}-messaging-input-group`),children:[k&&w.jsx(g3,{componentType:n,accept:Z2,disabled:j,globalClassName:d,className:e,icon:w.jsx(c3,{}),onFiles:X}),w.jsx("input",{className:M(d,e,`cim-${n}-component`,`${O}-search-input`),type:"text",ref:T,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything","aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask us anything",name:`${O}-user-input`,disabled:I,readOnly:t,onPaste:ae})]}),w.jsx(y3,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:j}),p&&w.jsx(yr,{className:M(d,`${O}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:j,onClick:H,icon:w.jsx(t3,{})})]}),w.jsx($L,{})]})};function qL(e){return dt({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 WL(e){return dt({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 WT=N.createContext({isOpen:!1}),qh=N.createContext(null),YT=N.createContext(null),ys=()=>{var n,r;const e=N.useContext(qh),t=N.useContext(YT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},GT=({onClearChat:e,componentType:t})=>{const n=ys(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${O}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(WL,{}),"Clear chat"]})},XT=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=lt(),r=ys(),[s,a]=N.useState(!1),u=()=>ke(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:M(`${O}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(qL,{}),"Download transcript"]})},KT=({onEndConversation:e,componentType:t})=>{const n=ys(),r=()=>{e(),n()};return w.jsxs("button",{className:M(`${O}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[w.jsx(l3,{}),"End conversation"]})};function YL(e){return e==null?[]:Array.isArray(e)?e:[e]}var GL=(e,...t)=>e.concat(t),XL=(e,...t)=>e.filter(n=>!t.includes(n)),KL=e=>Array.from(new Set(e));function QT(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 QL(e,t,n={}){const{step:r=1,loop:s=!0}=n;return QT(e,t,{step:-r,loop:s})}var JL=e=>Array.isArray(e),JT=e=>e!=null&&typeof e=="object",ZL=e=>JT(e)&&!JL(e),ql=e=>typeof e=="string",mo=e=>typeof e=="function",e5=e=>e==null,t5=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n5=e=>Object.prototype.toString.call(e),ZT=Function.prototype.toString,r5=ZT.call(Object),i5=e=>{if(!JT(e)||n5(e)!="[object Object]"||a5(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=t5(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ZT.call(n)==r5},s5=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,o5=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,a5=e=>s5(e)||o5(e),u5=e=>e(),l5=()=>{},Wh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function c5(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:d5,max:f5}=Math,h5=e=>Number.isNaN(e),p5=e=>h5(e)?0:e,eb=(e,t,n)=>d5(f5(p5(e),t),n);function Yh(e){if(!i5(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]=Yh(s))}return n}function Gh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function m5(e,t){if(e==null)throw new Error(t())}function g5(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 E5=Object.defineProperty,y5=(e,t,n)=>t in e?E5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xh=(e,t,n)=>y5(e,typeof t!="symbol"?t+"":t,n),tb=()=>{},Wl=e=>typeof e=="object"&&e!==null,go=e=>e?"":void 0,nb=e=>e?"true":void 0,T5=1,b5=9,w5=11,sn=e=>Wl(e)&&e.nodeType===T5&&typeof e.nodeName=="string",Yl=e=>Wl(e)&&e.nodeType===b5,x5=e=>Wl(e)&&e===e.window,rb=e=>sn(e)?e.localName||"":"#document";function _5(e){return["html","body","#document"].includes(rb(e))}var S5=e=>Wl(e)&&e.nodeType!==void 0,Ts=e=>S5(e)&&e.nodeType===w5&&"host"in e,v5=e=>sn(e)&&e.localName==="input",A5=e=>sn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Va(e){if(!e)return!1;const t=e.getRootNode();return To(t)===e}var C5=/(textarea|select)/;function N5(e){if(e==null||!sn(e))return!1;try{return v5(e)&&e.selectionStart!=null||C5.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Eo(e,t){var r;if(!e||!t||!sn(e)||!sn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Ts(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function $r(e){var t;return Yl(e)?e:x5(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function k5(e){return $r(e).documentElement}function yo(e){var t,n,r;return Ts(e)?yo(e.host):Yl(e)?(t=e.defaultView)!=null?t:window:sn(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 O5(e){if(rb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ts(e)&&e.host||k5(e);return Ts(t)?t.host:t}function Kh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Yl(t)||Ts(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Qh=new WeakMap;function bo(e){return Qh.has(e)||Qh.set(e,yo(e).getComputedStyle(e)),Qh.get(e)}var Jh=new Set(["menu","listbox","dialog","grid","tree","region"]),I5=e=>Jh.has(e),ib=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function sb(e,t){const n=new Set,r=Kh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=ib(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"),T=p.getAttribute("aria-modal")==="true";if(m&&I5(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function ob(e,t){const n=Kh(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=ib(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"),T=p.getAttribute("aria-modal")==="true";m&&Jh.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function P5(e){const t=new Set;return ob(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function R5(e){const t=e.getAttribute("role");return!!(t&&Jh.has(t))}function L5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function D5(e){var t;return L5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function M5(e){if(!e.id)return!1;const t=Kh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&R5(e))}var Zh=()=>typeof document!="undefined";function F5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var ep=e=>Zh()&&e.test(F5()),B5=e=>Zh()&&e.test(navigator.vendor),ab=()=>Zh()&&!!navigator.maxTouchPoints,U5=()=>ep(/^iPhone/i),H5=()=>ep(/^iPad/i)||tp()&&navigator.maxTouchPoints>1,Gl=()=>U5()||H5(),j5=()=>tp()||Gl(),tp=()=>ep(/^Mac/i),$5=()=>j5()&&B5(/apple/i);function z5(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 wr(e){var n;const t=z5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var ub=e=>e.button===0,V5=e=>e.button===2||tp()&&e.ctrlKey&&e.button===0,q5=e=>"touches"in e&&e.touches.length>0,W5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},lb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Y5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=W5[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in lb&&(s=lb[s]),s}function cb(e,t="client"){const n=q5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var on=(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)}},db=e=>sn(e)&&e.tagName==="IFRAME",G5=/^(audio|video|details)$/;function fb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var X5=e=>!Number.isNaN(fb(e)),K5=e=>fb(e)<0;function Q5(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 hb(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=Q5(d,t);if(f){const p=Array.from(f.querySelectorAll(Xl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,T+_)})}s.push(...p)}}return r}var Xl="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",pb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Xl));(n==!0||n=="if-empty"&&s.length===0)&&sn(e)&&zr(e)&&s.unshift(e);const u=[];for(const l of s)if(zr(l)){if(db(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...pb(d,{getShadowRoot:r}));continue}u.push(l)}return r?hb(u,r,zr):u};function zr(e){return!sn(e)||e.closest("[inert]")?!1:e.matches(Xl)&&A5(e)}function wo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Xl));n&&bs(e)&&s.unshift(e);const a=[];for(const u of s)if(bs(u)){if(db(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...wo(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=hb(a,r,bs);return!u.length&&n?s:u}return!a.length&&n?s:a}function bs(e){return sn(e)&&e.tabIndex>0?!0:zr(e)&&!K5(e)}function J5(e,t={}){const n=wo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function Z5(e,t={}){const{current:n,getShadowRoot:r}=t,s=wo(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 qa(e){return e.tabIndex<0&&(G5.test(e.localName)||N5(e))&&!X5(e)?0:e.tabIndex}function mb(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=wo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var eD=class kv{constructor(){Xh(this,"id",null),Xh(this,"fn_cleanup"),Xh(this,"cleanup",()=>{this.cancel()})}static create(){return new kv}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 Jt(e){const t=eD.create();return t.request(e),t.cleanup}function gb(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 np(e){const t=O5(e);return _5(t)?$r(t).body:sn(t)&&rD(t)?t:np(t)}var tD=/auto|scroll|overlay|hidden|clip/,nD=new Set(["inline","contents"]);function rD(e){const t=yo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return tD.test(n+s+r)&&!nD.has(a)}var xo="default",rp="",Kl=new WeakMap;function iD(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Gl()?(xo==="default"&&(rp=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),xo="disabled"):t&&(Kl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>sD({target:t,doc:r})}function sD(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Gl()){if(xo!=="disabled")return;xo="restoring",setTimeout(()=>{gb(()=>{xo==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=rp||""),rp="",xo="default")})},300)}else if(t&&Kl.has(t)){const a=Kl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Kl.delete(t)}}function oD(e={}){const u=e,{defer:t,target:n}=u,r=vn(u,["defer","target"]),s=t?Jt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(iD(fe(F({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function aD(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=cb(l),f=Math.sqrt(Dd(d.x,2)+Dd(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=cb(l);r({point:d,event:l})},u=[on(e,"pointermove",s,!1),on(e,"pointerup",a,!1),on(e,"pointercancel",a,!1),on(e,"contextmenu",a,!1),oD({doc:e})];return()=>{u.forEach(l=>l())}}function uD(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,T]=J5(e,{includeContainer:!0,getShadowRoot:a}),y=Z5(l,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Va(y)?(s==null||s(),p=T):f.shiftKey&&(Va(m)||_)?p=n:!f.shiftKey&&Va(n)?(s==null||s(),p=m):!f.shiftKey&&(Va(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return on(u,"keydown",d,!0)}function lD(e,t){const l=t,{defer:n,triggerElement:r}=l,s=vn(l,["defer","triggerElement"]),a=n?Jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(uD(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function cD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ql(e,t){if(!e)return tb;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 dD(e,t,n){if(!e)return tb;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 fD(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 hD(e,t){const{timeout:n,rootNode:r}=t,s=yo(r),a=$r(r),u=new s.AbortController;return fD(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 pD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),mD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Eb=e=>{const t={};let n;for(;n=mD.exec(e);)t[n[1]]=n[2];return t},gD=(e,t)=>{if(ql(e)){if(ql(t))return`${e};${t}`;e=Eb(e)}else ql(t)&&(t=Eb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Zt(...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]=Wh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=pD(t[s],n[s]);continue}if(s==="style"){t[s]=gD(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 e$(e){return e}var _o=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(_o||{}),ip="__init__";function ED(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>$r(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>To(t()),a=u=>t().getElementById(u);return fe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Va,getById:a})}function yD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var So=()=>e=>Array.from(new Set(e)),yb=typeof globalThis.document!="undefined"?N.useLayoutEffect:N.useEffect;function Jl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=N.useState(t),[s,a]=N.useState(r),u=e().value!==void 0,l=N.useRef(s);l.current=u?e().value:s;const d=N.useRef(l.current);yb(()=>{d.current=l.current},[s,e().value]);const f=y=>{var v,x;const _=d.current,A=mo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(x=(v=e()).onChange)==null||x.call(v,A,_)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?io.flushSync:u5)(()=>f(y))},invoke(y,_){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,_)},hash(y){var _,A,v;return(v=(A=(_=e()).hash)==null?void 0:A.call(_,y))!=null?v:String(y)}}}Jl.cleanup=e=>{N.useEffect(()=>e,[])},Jl.ref=e=>{const t=N.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function TD(e){const t=N.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var bD=(e,t)=>{const n=N.useRef(!1),r=N.useRef(!1);N.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),N.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Zl(e,t={}){var re,V,ee,ae,oe,me;const n=N.useMemo(()=>{const{id:de,ids:W,getRootNode:le}=t;return ED({id:de,ids:W,getRootNode:le})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(V=(re=e.props)==null?void 0:re.call(e,{props:Yh(t),scope:n}))!=null?V:t,a=wD(s),u=(ee=e.context)==null?void 0:ee.call(e,{prop:a,bindable:Jl,scope:n,flush:bb,getContext(){return d},getComputed(){return q},getRefs(){return A},getEvent(){return y()}}),l=Tb(u),d={get(de){var W;return(W=l.current)==null?void 0:W[de].ref.current},set(de,W){var le;(le=l.current)==null||le[de].set(W)},initial(de){var W;return(W=l.current)==null?void 0:W[de].initial},hash(de){var le,C;const W=(le=l.current)==null?void 0:le[de].get();return(C=l.current)==null?void 0:C[de].hash(W)}},f=N.useRef(new Map),p=N.useRef(null),m=N.useRef(null),T=N.useRef({type:""}),y=()=>fe(F({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>fe(F({},R),{matches(...de){return de.includes(R.ref.current)},hasTag(de){var W,le;return!!((le=(W=e.states[R.ref.current])==null?void 0:W.tags)!=null&&le.includes(de))}}),A=TD((oe=(ae=e.refs)==null?void 0:ae.call(e,{prop:a,context:d}))!=null?oe:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:H,action:x,guard:k,track:bD,refs:A,computed:q,flush:bb,scope:n,choose:j}),x=de=>{const W=mo(de)?de(v()):de;if(!W)return;const le=W.map(C=>{var Z,L;const B=(L=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:L[C];return B||Gh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),B});for(const C of le)C==null||C(v())},k=de=>{var W,le;return mo(de)?de(v()):(le=(W=e.implementations)==null?void 0:W.guards)==null?void 0:le[de](v())},I=de=>{const W=mo(de)?de(v()):de;if(!W)return;const le=W.map(B=>{var L,xe;const Z=(xe=(L=e.implementations)==null?void 0:L.effects)==null?void 0:xe[B];return Z||Gh(`[zag-js] No implementation found for effect "${JSON.stringify(B)}"`),Z}),C=[];for(const B of le){const Z=B==null?void 0:B(v());Z&&C.push(Z)}return()=>C.forEach(B=>B==null?void 0:B())},j=de=>YL(de).find(W=>{let le=!W.guard;return ql(W.guard)?le=!!k(W.guard):mo(W.guard)&&(le=W.guard(v())),le}),q=de=>{m5(e.computed,()=>"[zag-js] No computed object found on machine");const W=e.computed[de];return W({context:d,event:y(),prop:a,refs:A,scope:n,computed:q})},R=Jl(()=>({defaultValue:e.initialState({prop:a}),onChange(de,W){var C,B,Z,L;if(W){const xe=f.current.get(W);xe==null||xe(),f.current.delete(W)}W&&x((C=e.states[W])==null?void 0:C.exit),x((B=p.current)==null?void 0:B.actions);const le=I((Z=e.states[de])==null?void 0:Z.effects);if(le&&f.current.set(de,le),W===ip){x(e.entry);const xe=I(e.effects);xe&&f.current.set(ip,xe)}x((L=e.states[de])==null?void 0:L.entry)}})),X=N.useRef(void 0),ne=N.useRef(_o.NotStarted);yb(()=>{queueMicrotask(()=>{var B;const le=ne.current===_o.Started;ne.current=_o.Started,r(le?"rehydrating...":"initializing...");const C=(B=X.current)!=null?B:R.initial;R.invoke(C,le?R.get():ip)});const de=f.current,W=R.ref.current;return()=>{r("unmounting..."),X.current=W,ne.current=_o.Stopped,de.forEach(le=>le==null?void 0:le()),f.current=new Map,p.current=null,queueMicrotask(()=>{x(e.exit)})}},[]);const se=()=>"ref"in R?R.ref.current:R.get(),H=de=>{queueMicrotask(()=>{var L,xe,De,he,Ne;if(ne.current!==_o.Started)return;m.current=T.current,T.current=de;let W=se();const le=(De=(L=e.states[W].on)==null?void 0:L[de.type])!=null?De:(xe=e.on)==null?void 0:xe[de.type],C=j(le);if(!C)return;p.current=C;const B=(he=C.target)!=null?he:W;r("transition",de.type,C.target||W,`(${C.actions})`);const Z=B!==W;Z?io.flushSync(()=>R.set(B)):C.reenter&&!Z?R.invoke(W,W):x((Ne=C.actions)!=null?Ne:[])})};return(me=e.watch)==null||me.call(e,v()),{state:_(),send:H,context:d,prop:a,scope:n,refs:A,computed:q,event:y(),getStatus:()=>ne.current}}function Tb(e){const t=N.useRef(e);return t.current=e,t}function wD(e){const t=Tb(e);return function(r){return t.current[r]}}function bb(e){queueMicrotask(()=>{io.flushSync(()=>e())})}var sp=yD(e=>e);function ec(...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 xD(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 op=e=>{const t=N.memo(N.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=vn(f,["asChild","children"]);if(!s)return N.createElement(e,fe(F({},u),{ref:r}),a);if(!N.isValidElement(a))return null;const l=N.Children.only(a),d=xD(l);return N.cloneElement(l,fe(F({},Zt(u,l.props)),{ref:r?ec(r,d):d}))}));return t.displayName=e.displayName||e.name,t},bn=(()=>{const e=new Map;return new Proxy(op,{apply(t,n,r){return op(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,op(r)),e.get(r)}})})();function _D(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ws(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=N.createContext(u);l.displayName=t;function d(){var p;const f=N.useContext(l);if(!f&&n){const m=new Error(a!=null?a:_D(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[SD,ap]=ws({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[wb,Wa]=ws({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),xb=N.forwardRef((e,t)=>{const n=ap(),r=Wa(),s=Zt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(bn.div,fe(F({},s),{ref:ec(r.ref,t)}))});xb.displayName="PopoverContent";const _b=N.forwardRef((e,t)=>{const n=ap(),r=Wa(),s=Zt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(bn.div,fe(F({},s),{ref:t}))});_b.displayName="PopoverPositioner";const Ya=()=>(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]},[{},F({},e)]),Sb=e=>Ya()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function vD(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 AD={props({props:e}){return fe(F({},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",bo(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"});Jt(()=>{var l,d;const u=tc(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})=>{Jt(()=>{e.set("prevAnimationName",tc(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,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",tc(t.get("styles")))},u=d=>{const f=tc(t.get("styles"));wr(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=Ql(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),gb(()=>l())}}}}};function tc(e){return(e==null?void 0:e.animationName)||"none"}So()(["onExitComplete","present","immediate"]);function CD(e,t={}){const{sync:n=!1}=t,r=ND(e);return N.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 ND(e){const t=N.useRef(e);return t.current=e,t}const up=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=vn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=N.useRef(!1),l=fe(F({},a),{present:r,onExitComplete:CD(e.onExitComplete)}),d=Zl(AD,l),f=vD(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 xs=(e,t=[])=>({parts:(...n)=>{if(kD(t))return xs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>xs(e,[...t,...n]),omit:(...n)=>xs(e,t.filter(r=>!n.includes(r))),rename:n=>xs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${vo(e)}"][data-part="${vo(r)}"]`,`& [data-scope="${vo(e)}"][data-part="${vo(r)}"]`].join(", "),attrs:{"data-scope":vo(e),"data-part":vo(r)}}}),{})}),vo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),kD=e=>e.length===0;const OD=["top","right","bottom","left"],Ni=Math.min,ii=Math.max,nc=Math.round,rc=Math.floor,Vr=e=>({x:e,y:e}),ID={left:"right",right:"left",bottom:"top",top:"bottom"};function vb(e,t,n){return ii(e,Ni(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function Ao(e){return e.split("-")[1]}function lp(e){return e==="x"?"y":"x"}function cp(e){return e==="y"?"height":"width"}function qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dp(e){return lp(qr(e))}function PD(e,t,n){n===void 0&&(n=!1);const r=Ao(e),s=dp(e),a=cp(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ic(u)),[u,ic(u)]}function RD(e){const t=ic(e);return[fp(e),t,fp(t)]}function fp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ab=["left","right"],Cb=["right","left"],LD=["top","bottom"],DD=["bottom","top"];function MD(e,t,n){switch(e){case"top":case"bottom":return n?t?Cb:Ab:t?Ab:Cb;case"left":case"right":return t?LD:DD;default:return[]}}function FD(e,t,n,r){const s=Ao(e);let a=MD(ki(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(fp)))),a}function ic(e){const t=ki(e);return ID[t]+e.slice(t.length)}function BD(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 Nb(e){return typeof e!="number"?BD(e):{top:e,right:e,bottom:e,left:e}}function sc(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 kb(e,t,n){let{reference:r,floating:s}=e;const a=qr(t),u=dp(t),l=cp(u),d=ki(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=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 _=Ao(t);return _&&(y[u]+=T*(_==="end"?1:-1)*(n&&f?-1:1)),y}function UD(e,t){return ke(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:T=!1,padding:y=0}=si(t,e),_=Nb(y),v=l[T?m==="floating"?"reference":"floating":m],x=sc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.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),j=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},q=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:I,strategy:d}):k);return{top:(x.top-q.top+_.top)/j.y,bottom:(q.bottom-x.bottom+_.bottom)/j.y,left:(x.left-q.left+_.left)/j.x,right:(q.right-x.right+_.right)/j.x}})}const HD=50,jD=(e,t,n)=>ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:fe(F({},u),{detectOverflow:UD}),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}=kb(f,r,d),T=r,y=0;const _={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:x,fn:k}=v,{x:I,y:j,data:q,reset:R}=yield k({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:_,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=j!=null?j:m,_[x]=F(F({},_[x]),q),R&&y<HD&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=kb(f,T,d)),A=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:_}}),$D=e=>({name:"arrow",options:e,fn(n){return ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=si(e,n)||{};if(p==null)return{};const T=Nb(m),y={x:r,y:s},_=dp(a),A=cp(_),v=yield l.getDimensions(p),x=_==="y",k=x?"top":"left",I=x?"bottom":"right",j=x?"clientHeight":"clientWidth",q=u.reference[A]+u.reference[_]-y[_]-u.floating[A],R=y[_]-u.reference[_],X=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ne=X?X[j]:0;(!ne||!(yield l.isElement==null?void 0:l.isElement(X)))&&(ne=d.floating[j]||u.floating[A]);const se=q/2-R/2,H=ne/2-v[A]/2-1,re=Ni(T[k],H),V=Ni(T[I],H),ee=ne-v[A]-V,ae=ne/2-v[A]/2+se,oe=vb(re,ae,ee),me=!f.arrow&&Ao(a)!=null&&ae!==oe&&u.reference[A]/2-(ae<re?re:V)-v[A]/2<0,de=me?ae<re?ae-re:ae-ee:0;return{[_]:y[_]+de,data:F({[_]:oe,centerOffset:ae-oe-de},me&&{alignmentOffset:de}),reset:me}})}}),zD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,oe=si(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=oe,x=vn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=ki(a),I=qr(d),j=ki(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(j||!v?[ic(d)]:RD(d)),X=A!=="none";!y&&X&&R.push(...FD(d,v,A,q));const ne=[d,...R],se=yield f.detectOverflow(n,x),H=[];let re=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&H.push(se[k]),T){const me=PD(a,l,q);H.push(se[me[0]],se[me[1]])}if(re=[...re,{placement:a,overflows:H}],!H.every(me=>me<=0)){var V,ee;const me=(((V=u.flip)==null?void 0:V.index)||0)+1,de=ne[me];if(de&&(!(T==="alignment"?I!==qr(de):!1)||re.every(C=>qr(C.placement)===I?C.overflows[0]>0:!0)))return{data:{index:me,overflows:re},reset:{placement:de}};let W=(ee=re.filter(le=>le.overflows[0]<=0).sort((le,C)=>le.overflows[1]-C.overflows[1])[0])==null?void 0:ee.placement;if(!W)switch(_){case"bestFit":{var ae;const le=(ae=re.filter(C=>{if(X){const B=qr(C.placement);return B===I||B==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(B=>B>0).reduce((B,Z)=>B+Z,0)]).sort((C,B)=>C[1]-B[1])[0])==null?void 0:ae[0];le&&(W=le);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function Ob(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ib(e){return OD.some(t=>e[t]>=0)}const VD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return ke(this,null,function*(){const{rects:r,platform:s}=n,l=si(e,n),{strategy:a="referenceHidden"}=l,u=vn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,fe(F({},u),{elementContext:"reference"})),f=Ob(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Ib(f)}}}case"escaped":{const d=yield s.detectOverflow(n,fe(F({},u),{altBoundary:!0})),f=Ob(d,r.floating);return{data:{escapedOffsets:f,escaped:Ib(f)}}}default:return{}}})}}},Pb=new Set(["left","top"]);function qD(e,t){return ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ki(n),l=Ao(n),d=qr(n)==="y",f=Pb.has(u)?-1:1,p=a&&d?-1:1,m=si(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof _=="number"&&(y=l==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const WD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return ke(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield qD(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:fe(F({},f),{placement:l})}})}}},YD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=si(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:q,y:R}=j;return{x:q,y:R}}}}=I,p=vn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=qr(a),_=lp(y);let A=m[_],v=m[y];const x=(j,q)=>vb(q+T[j==="y"?"top":"left"],q,q-T[j==="y"?"bottom":"right"]);l&&(A=x(_,A)),d&&(v=x(y,v));const k=f.fn(fe(F({},n),{[_]:A,[y]:v}));return fe(F({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[_]:l,[y]:d}}})})}}},GD=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}=si(e,t),T={x:s,y:a},y=qr(u),_=lp(y);let A=T[_],v=T[y];const x=si(f,t),k=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(r=x.crossAxis)!=null?r:0};if(p){const q=_==="y"?"height":"width",R=l.reference[_]-l.floating[q]+k.mainAxis,X=l.reference[_]+l.reference[q]-k.mainAxis;A<R?A=R:A>X&&(A=X)}if(m){var I,j;const q=_==="y"?"width":"height",R=Pb.has(ki(u)),X=l.reference[y]-l.floating[q]+(R&&((I=d.offset)==null?void 0:I[y])||0)+(R?0:k.crossAxis),ne=l.reference[y]+l.reference[q]+(R?0:((j=d.offset)==null?void 0:j[y])||0)-(R?k.crossAxis:0);v<X?v=X:v>ne&&(v=ne)}return{[_]:A,[y]:v}}}},XD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,H=si(e,n),{apply:l=()=>{}}=H,d=vn(H,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=Ao(r),T=qr(r)==="y",{width:y,height:_}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const x=_-f.top-f.bottom,k=y-f.left-f.right,I=Ni(_-f[A],x),j=Ni(y-f[v],k),q=n.middlewareData.shift,R=!q;let X=I,ne=j;q!=null&&q.enabled.x&&(ne=k),q!=null&&q.enabled.y&&(X=x),R&&!m&&(T?ne=y-2*ii(f.left,f.right):X=_-2*ii(f.top,f.bottom)),yield l(fe(F({},n),{availableWidth:ne,availableHeight:X}));const se=yield a.getDimensions(u.floating);return y!==se.width||_!==se.height?{reset:{rects:!0}}:{}})}}};function oc(){return typeof window!="undefined"}function Co(e){return Rb(e)?(e.nodeName||"").toLowerCase():"#document"}function Xn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(Rb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rb(e){return oc()?e instanceof Node||e instanceof Xn(e).Node:!1}function xr(e){return oc()?e instanceof Element||e instanceof Xn(e).Element:!1}function Yr(e){return oc()?e instanceof HTMLElement||e instanceof Xn(e).HTMLElement:!1}function Lb(e){return!oc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Xn(e).ShadowRoot}function Ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function KD(e){return/^(table|td|th)$/.test(Co(e))}function ac(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const QD=/transform|translate|scale|rotate|perspective|filter/,JD=/paint|layout|strict|content/,_s=e=>!!e&&e!=="none";let hp;function pp(e){const t=xr(e)?_r(e):e;return _s(t.transform)||_s(t.translate)||_s(t.scale)||_s(t.rotate)||_s(t.perspective)||!mp()&&(_s(t.backdropFilter)||_s(t.filter))||QD.test(t.willChange||"")||JD.test(t.contain||"")}function ZD(e){let t=Oi(e);for(;Yr(t)&&!No(t);){if(pp(t))return t;if(ac(t))return null;t=Oi(t)}return null}function mp(){return hp==null&&(hp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hp}function No(e){return/^(html|body|#document)$/.test(Co(e))}function _r(e){return Xn(e).getComputedStyle(e)}function uc(e){return xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oi(e){if(Co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lb(e)&&e.host||Wr(e);return Lb(t)?t.host:t}function Db(e){const t=Oi(e);return No(t)?(e.ownerDocument||e).body:Yr(t)&&Ga(t)?t:Db(t)}function Xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Db(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Xn(s);if(a){const l=gp(u);return t.concat(u,u.visualViewport||[],Ga(s)?s:[],l&&n?Xa(l):[])}else return t.concat(s,Xa(s,[],n))}function gp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mb(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Yr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=nc(n)!==a||nc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Ep(e){return xr(e)?e:e.contextElement}function ko(e){const t=Ep(e);if(!Yr(t))return Vr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=Mb(t);let u=(a?nc(n.width):n.width)/r,l=(a?nc(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const eM=Vr(0);function Fb(e){const t=Xn(e);return!mp()||!t.visualViewport?eM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xn(e)?!1:t}function Ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ep(e);let u=Vr(1);t&&(r?xr(r)&&(u=ko(r)):u=ko(e));const l=tM(a,n,r)?Fb(a):Vr(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 T=Xn(a),y=r&&xr(r)?Xn(r):r;let _=T,A=gp(_);for(;A&&r&&y!==_;){const v=ko(A),x=A.getBoundingClientRect(),k=_r(A),I=x.left+(A.clientLeft+parseFloat(k.paddingLeft))*v.x,j=x.top+(A.clientTop+parseFloat(k.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=I,f+=j,_=Xn(A),A=gp(_)}}return sc({width:p,height:m,x:d,y:f})}function lc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:Ss(Wr(e)).left+n}function Bb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lc(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function nM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Wr(r),l=t?ac(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Vr(1);const p=Vr(0),m=Yr(r);if((m||!m&&!a)&&((Co(r)!=="body"||Ga(u))&&(d=uc(r)),Yr(r))){const y=Ss(r);f=ko(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?Bb(u,d):Vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function rM(e){return Array.from(e.getClientRects())}function iM(e){const t=Wr(e),n=uc(e),r=e.ownerDocument.body,s=ii(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ii(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+lc(e);const l=-n.scrollTop;return _r(r).direction==="rtl"&&(u+=ii(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const Ub=25;function sM(e,t){const n=Xn(e),r=Wr(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=mp();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=lc(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=Ub&&(a-=_)}else f<=Ub&&(a+=f);return{width:a,height:u,x:l,y:d}}const oM=new Set(["absolute","fixed"]);function aM(e,t){const n=Ss(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Yr(e)?ko(e):Vr(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 Hb(e,t,n){let r;if(t==="viewport")r=sM(e,n);else if(t==="document")r=iM(Wr(e));else if(xr(t))r=aM(t,n);else{const s=Fb(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return sc(r)}function jb(e,t){const n=Oi(e);return n===t||!xr(n)||No(n)?!1:_r(n).position==="fixed"||jb(n,t)}function uM(e,t){const n=t.get(e);if(n)return n;let r=Xa(e,[],!1).filter(l=>xr(l)&&Co(l)!=="body"),s=null;const a=_r(e).position==="fixed";let u=a?Oi(e):e;for(;xr(u)&&!No(u);){const l=_r(u),d=pp(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&oM.has(s.position)||Ga(u)&&!d&&jb(e,u))?r=r.filter(p=>p!==u):s=l,u=Oi(u)}return t.set(e,r),r}function lM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?ac(t)?[]:uM(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=Hb(t,p,s);return f.top=ii(m.top,f.top),f.right=Ni(m.right,f.right),f.bottom=Ni(m.bottom,f.bottom),f.left=ii(m.left,f.left),f},Hb(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function cM(e){const{width:t,height:n}=Mb(e);return{width:t,height:n}}function dM(e,t,n){const r=Yr(t),s=Wr(t),a=n==="fixed",u=Ss(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Vr(0);function f(){d.x=lc(s)}if(r||!r&&!a)if((Co(t)!=="body"||Ga(s))&&(l=uc(t)),r){const y=Ss(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?Bb(s,l):Vr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function yp(e){return _r(e).position==="static"}function $b(e,t){if(!Yr(e)||_r(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function zb(e,t){const n=Xn(e);if(ac(e))return n;if(!Yr(e)){let s=Oi(e);for(;s&&!No(s);){if(xr(s)&&!yp(s))return s;s=Oi(s)}return n}let r=$b(e,t);for(;r&&KD(r)&&yp(r);)r=$b(r,t);return r&&No(r)&&yp(r)&&!pp(r)?n:r||ZD(e)||n}const fM=function(e){return ke(this,null,function*(){const t=this.getOffsetParent||zb,n=this.getDimensions,r=yield n(e.floating);return{reference:dM(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function hM(e){return _r(e).direction==="rtl"}const pM={convertOffsetParentRelativeRectToViewportRelativeRect:nM,getDocumentElement:Wr,getClippingRect:lM,getOffsetParent:zb,getElementRects:fM,getClientRects:rM,getDimensions:cM,getScale:ko,isElement:xr,isRTL:hM};function Vb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mM(e,t){let n=null,r;const s=Wr(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:T,height:y}=f;if(l||t(),!T||!y)return;const _=rc(m),A=rc(s.clientWidth-(p+T)),v=rc(s.clientHeight-(m+y)),x=rc(p),I={rootMargin:-_+"px "+-A+"px "+-v+"px "+-x+"px",threshold:ii(0,Ni(1,d))||1};let j=!0;function q(R){const X=R[0].intersectionRatio;if(X!==d){if(!j)return u();X?u(!1,X):r=setTimeout(()=>{u(!1,1e-7)},1e3)}X===1&&!Vb(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(q,fe(F({},I),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(q,I)}n.observe(e)}return u(!0),a}function gM(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=Ep(e),p=s||a?[...f?Xa(f):[],...Xa(t)]:[];p.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=f&&l?mM(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(x=>{let[k]=x;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,A=d?Ss(e):null;d&&v();function v(){const x=Ss(e);A&&!Vb(A,x)&&n(),A=x,_=requestAnimationFrame(v)}return n(),()=>{var x;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const EM=WD,yM=YD,TM=zD,bM=XD,wM=VD,xM=$D,_M=GD,SM=(e,t,n)=>{const r=new Map,s=F({platform:pM},n),a=fe(F({},s.platform),{_c:r});return jD(e,t,fe(F({},s),{platform:a}))};function qb(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 fe(F({},s),{toJSON:()=>s})}function vM(e){if(!e)return qb();const{x:t,y:n,width:r,height:s}=e;return qb(t,n,r,s)}function AM(e,t){return{contextElement:sn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?vM(r):n.getBoundingClientRect()}}}var Ka=e=>({variable:e,reference:`var(${e})`}),oi={arrowSize:Ka("--arrow-size"),arrowSizeHalf:Ka("--arrow-size-half"),arrowBg:Ka("--arrow-background"),transformOrigin:Ka("--transform-origin"),arrowOffset:Ka("--arrow-offset")},CM=e=>e==="top"||e==="bottom"?"y":"x";function NM(e,t){return{name:"transformOrigin",fn(n){var se,H,re,V,ee;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=CM(d),p=((se=s.arrow)==null?void 0:se.x)||0,m=((H=s.arrow)==null?void 0:H.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,A=m+y/2,v=Math.abs(((re=s.shift)==null?void 0:re.y)||0),x=u.reference.height/2,k=y/2,I=(ee=(V=e.offset)==null?void 0:V.mainAxis)!=null?ee:e.gutter,j=typeof I=="number"?I+k:I!=null?I:k,q=v>j,R={top:`${_}px calc(100% + ${j}px)`,bottom:`${_}px ${-j}px`,left:`calc(100% + ${j}px) ${A}px`,right:`${-j}px ${A}px`}[d],X=`${_}px ${u.reference.y+x-l}px`,ne=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(oi.transformOrigin.variable,ne?X:R),{data:{transformOrigin:ne?X:R}}}}}var kM={name:"rects",fn({rects:e}){return{data:e}}},OM=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% + ${oi.arrowOffset.reference})`}),{}}}};function IM(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var PM={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Wb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Tp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function RM(e,t,n){const r=e||t.createElement("div");return xM({element:r,padding:n.arrowPadding})}function LM(e,t){var n;if(!e5((n=t.offset)!=null?n:t.gutter))return EM(({placement:r})=>{var p,m,T,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}=IM(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Yh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function DM(e){if(!e.flip)return;const t=Tp(e.boundary);return TM(fe(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function MM(e){if(!e.slide&&!e.overlap)return;const t=Tp(e.boundary);return yM(fe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_M()}))}function FM(e){return bM({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 BM(e){var t;if(e.hideWhenDetached)return wM({strategy:"referenceHidden",boundary:(t=Tp(e.boundary))!=null?t:"clippingAncestors"})}function UM(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function HM(e,t,n={}){const r=AM(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},PM,n),a=t.querySelector("[data-part=arrow]"),u=[LM(a,s),DM(s),MM(s),RM(a,t.ownerDocument,s),OM(a),NM({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),FM(s),BM(s),kM],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>ke(null,null,function*(){var j;if(!r||!t)return;const A=yield SM(r,t,{placement:l,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=yo(t),x=Wb(v,A.x),k=Wb(v,A.y);t.style.setProperty("--x",`${x}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((j=A.middlewareData.hide)==null?void 0:j.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 q=bo(I);t.style.setProperty("--z-index",q.zIndex)}}),T=()=>ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=UM(s.listeners),_=s.listeners?gM(r,t,T,y):l5;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function Yb(e,t,n={}){const l=n,{defer:r}=l,s=vn(l,["defer"]),a=r?Jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(HM(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var jM={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function $M(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:oi.arrowSize.reference,height:oi.arrowSize.reference,[oi.arrowSizeHalf.variable]:`calc(${oi.arrowSize.reference} / 2)`,[oi.arrowOffset.variable]:`calc(${oi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?jM[t.split("-")[0]]:void 0,background:oi.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 Oo=new WeakMap,cc=new WeakMap,dc={},bp=0,Gb=e=>e&&(e.host||Gb(e.parentNode)),zM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Gb(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),VM=new Set(["script","output","status","next-route-announcer"]),qM=e=>VM.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),WM=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=zM(n,Array.isArray(e)?e:[e]);dc[r]||(dc[r]=new WeakMap);const l=dc[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&&sn(y)&&ob(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(qM(_))return;const v=_.getAttribute(s)==="true",x=(Oo.get(_)||0)+1,k=(l.get(_)||0)+1;Oo.set(_,x),l.set(_,k),d.push(_),x===1&&v&&cc.set(_,!0),k===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return T(n),f.clear(),bp++,()=>{d.forEach(y=>{const _=Oo.get(y)-1,A=l.get(y)-1;Oo.set(y,_),l.set(y,A),_||(cc.has(y)||y.removeAttribute(s),cc.delete(y)),A||y.removeAttribute(r)}),bp--,bp||(Oo=new WeakMap,Oo=new WeakMap,cc=new WeakMap,dc={})}},YM=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,GM=(e,t=YM(e),n="data-aria-hidden",r=!0)=>{if(t)return WM(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},XM=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Xb(e,t={}){const{defer:n=!0}=t,r=n?XM:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(GM(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function KM(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 QM(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 Kb="pointerdown.outside",Qb="focus.outside";function JM(e){for(const t of e)if(sn(t)&&zr(t))return!0;return!1}var Jb=e=>"clientY"in e;function ZM(e,t){if(!Jb(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 e8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Zb(e,t){if(!t||!Jb(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 e8(u,l)?r||a:!1}function t8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=$r(e),f=yo(e),p=KM(f),m=QM(f);function T(I,j){if(!sn(j)||!j.isConnected||Eo(e,j)||ZM(e,I)||l&&sb(e,j))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const X=np(q);if(Zb(I,X))return!1}const R=np(e);return Zb(I,R)?!1:!(n!=null&&n(j))}const y=new Set,_=Ts(e==null?void 0:e.getRootNode());function A(I){function j(q){var se,H;const R=u&&!ab()?Jt:re=>re(),X=q!=null?q:I,ne=(H=(se=X==null?void 0:X.composedPath)==null?void 0:se.call(X))!=null?H:[X==null?void 0:X.target];R(()=>{const re=_?ne[0]:wr(I);if(!(!e||!T(I,re))){if(s||a){const V=Wh(s,a);e.addEventListener(Kb,V,{once:!0})}ew(e,Kb,{bubbles:!1,cancelable:!0,detail:{originalEvent:X,contextmenu:V5(X),focusable:JM(ne),target:re}})}})}I.pointerType==="touch"?(y.forEach(q=>q()),y.add(on(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const v=new Set,x=setTimeout(()=>{v.add(on(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function k(I){(u?Jt:q=>q())(()=>{var X,ne;const q=(ne=(X=I==null?void 0:I.composedPath)==null?void 0:X.call(I))!=null?ne:[I==null?void 0:I.target],R=_?q[0]:wr(I);if(!(!e||!T(I,R))){if(r||a){const se=Wh(r,a);e.addEventListener(Qb,se,{once:!0})}ew(e,Qb,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:zr(R),target:R}})}})}return ab()||(v.add(on(d,"focusin",k,!0)),v.add(m.addEventListener("focusin",k,!0)),v.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(x),y.forEach(I=>I()),v.forEach(I=>I())}}function n8(e,t){const{defer:n}=t,r=n?Jt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(t8(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function ew(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function r8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return on($r(e),"keydown",n,{capture:!0})}var tw="layer:request-dismiss",rr={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=>Eo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Eo(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=>rr.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];s8(e,tw,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),i8(e,tw,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function i8(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 s8(e,t,n){e.addEventListener(t,n,{once:!0})}var nw;function rw(){rr.layers.forEach(({node:e})=>{e.style.pointerEvents=rr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function o8(e){e.style.pointerEvents=""}function a8(e,t){const n=$r(e),r=[];return rr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(nw=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=hD(()=>{const l=s();return sn(l)?l:null},{timeout:1e3});a.then(l=>r.push(Ql(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{rr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=nw,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function u8(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};rr.add(f),rw();function p(A){var x,k;const v=wr(A.detail.originalEvent);rr.isBelowPointerBlockingLayer(e)||rr.isInBranch(v)||((x=t.onPointerDownOutside)==null||x.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(l&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var x,k;const v=wr(A.detail.originalEvent);rr.isInBranch(v)||((x=t.onFocusOutside)==null||x.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(l&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function T(A){var v;rr.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var I;if(!e)return!1;const v=typeof u=="function"?u():u,x=Array.isArray(v)?v:[v],k=(I=t.persistentElements)==null?void 0:I.map(j=>j()).filter(sn);return k&&x.push(...k),x.some(j=>Eo(j,A))||rr.isInNestedLayer(e,A)}const _=[a?a8(e,t.persistentElements):void 0,r8(e,T),n8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{rr.remove(e),rw(),o8(e),_.forEach(A=>A==null?void 0:A())}}function iw(e,t){const{defer:n}=t,r=n?Jt:a=>a(),s=[];return s.push(r(()=>{const a=mo(e)?e():e;s.push(u8(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var l8=Object.defineProperty,c8=(e,t,n)=>t in e?l8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rt=(e,t,n)=>c8(e,typeof t!="symbol"?t+"":t,n),sw={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()}},d8=[],f8=class{constructor(e,t){Rt(this,"trapStack"),Rt(this,"config"),Rt(this,"doc"),Rt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Rt(this,"portalContainers",new Set),Rt(this,"listenerCleanups",[]),Rt(this,"handleFocus",r=>{const s=wr(r),a=this.findContainerIndex(s,r)>=0;if(a||Yl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(qa(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=>qa(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}),Rt(this,"handlePointerDown",r=>{const s=wr(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()}}),Rt(this,"handleClick",r=>{const s=wr(r);this.findContainerIndex(s,r)>=0||Ja(this.config.clickOutsideDeactivates,r)||Ja(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Rt(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;Qa(r)&&r.preventDefault(),this.tryFocus(a)}}),Rt(this,"handleEscapeKey",r=>{h8(r)&&Ja(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Rt(this,"_mutationObserver"),Rt(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 D5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?M5(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Rt(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)}))}),Rt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!zr(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}),Rt(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,p8(r)&&r.select()}}),Rt(this,"deactivate",r=>{if(!this.state.active)return this;const s=F({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(),sw.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=()=>{ow(()=>{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}),Rt(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}),Rt(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}),Rt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Rt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),Rt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),Rt(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}),Rt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||wr(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||zr(u)&&!bs(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=qa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Qa(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||zr(u)&&!bs(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=qa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Qa(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||d8;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Qa(r)&&!r.shiftKey},isKeyBackward(r){return Qa(r)&&r.shiftKey}},t);this.doc=n.document||$r(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=>{P5(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?sb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=wo(e,{getShadowRoot:this.config.getShadowRoot}),n=pb(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(qa(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 T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(bs(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(bs(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 sw.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ow(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(on(this.doc,"focusin",this.handleFocus,!0),on(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),on(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),on(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),on(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),on(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)}},Qa=e=>e.key==="Tab",Ja=(e,...t)=>typeof e=="function"?e(...t):e,h8=e=>!e.isComposing&&e.key==="Escape",ow=e=>setTimeout(e,0),p8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function aw(e,t={}){let n;const r=Jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new f8(s,fe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:$r(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var wp="data-scroll-lock";function m8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function uw(e){const t=bo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function lw(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(wp))return;const u=uw(r)||uw(s),l=n.innerWidth-r.clientWidth;s.setAttribute(wp,"");const d=()=>dD(r,"--scrollbar-width",`${l}px`),f=m8(r),p=()=>{const _={overflow:"hidden"};return!u&&l>0&&(_[f]=`${l}px`),Ql(s,_)},m=()=>{var q,R;const{scrollX:_,scrollY:A,visualViewport:v}=n,x=(q=v==null?void 0:v.offsetLeft)!=null?q:0,k=(R=v==null?void 0:v.offsetTop)!=null?R:0,I={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(k))}px`,left:`${-(_-Math.floor(x))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const j=Ql(s,I);return()=>{j==null||j(),n.scrollTo({left:_,top:A,behavior:"instant"})}},T=[d(),Gl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),s.removeAttribute(wp)}}var g8=xs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Gr=g8.build(),cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},dw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},xp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},fw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},E8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},_p=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},hw=e=>e.getById(cw(e)),Io=e=>e.getById(dw(e)),Po=e=>e.getById(xp(e)),pw=e=>e.getById(fw(e)),T8=e=>e.getById(_p(e)),b8=e=>e.getById(Sp(e));function w8(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"),T=$M(fe(F({},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(fe(F({id:E8(l)},Gr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(fe(F({},Gr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(fe(F({},Gr.anchor.attrs),{dir:u("dir"),id:cw(l)}))},getTriggerProps(){return t.button(fe(F({},Gr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:dw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":xp(l),onPointerDown(y){ub(y)&&$5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(fe(F({},Gr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({id:fw(l)},Gr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(fe(F({},Gr.content.attrs),{dir:u("dir"),id:xp(l),tabIndex:-1,role:"dialog","aria-modal":nb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":go(d),"aria-labelledby":m.title?_p(l):void 0,"aria-describedby":m.description?Sp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(fe(F({},Gr.title.attrs),{id:_p(l),dir:u("dir")}))},getDescriptionProps(){return t.element(fe(F({},Gr.description.attrs),{id:Sp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(fe(F({},Gr.closeTrigger.attrs),{dir:u("dir"),id:y8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var x8={props({props:e}){return fe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({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=hw(n))!=null?a:Io(n);return Yb(r,()=>pw(n),fe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Po(n);let s=!0;return iw(r,{type:"popover",pointerBlocking:t("modal"),exclude:Io(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:lD(()=>Po(t),{triggerElement:Io(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Xb(()=>[Po(t),Io(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return lw(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?aw(()=>Po(t),{initialFocus:()=>mb({root:Po(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=hw(n))!=null?u:Io(n);Yb(s,()=>pw(n),fe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Jt(()=>{Object.assign(e.get("renderedElements"),{title:!!T8(t),description:!!b8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Jt(()=>{const n=mb({root:Po(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||Jt(()=>{const a=Io(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})}}}};So()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[n$,fc]=ws({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[r$,vp]=ws({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),_8=e=>{const t=N.useId(),{getRootNode:n}=fc(),{dir:r}=vp(),s=F({id:t,dir:r,getRootNode:n},e),a=Zl(x8,s);return w8(a,sp)},S8=e=>{const[t,u]=Sb(e),l=u,{children:n}=l,r=vn(l,["children"]),s=_8(r),a=up(Zt({present:s.open},t));return w.jsx(SD,{value:s,children:w.jsx(wb,{value:a,children:n})})},mw=N.forwardRef((e,t)=>{const n=ap(),r=Wa(),s=Zt(fe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(bn.button,fe(F({},s),{ref:t}))});mw.displayName="PopoverTrigger";function v8(e){return dt({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 A8(e){return dt({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 gw(e){return dt({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 Ew(e){return dt({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 C8(e){return dt({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 N8(e){return dt({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 Ap(e){return dt({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 yw(e){return dt({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 k8=({className:e,componentType:t,children:n})=>{const[r,s]=N.useState(!1),{globalClassName:a}=lt(),u=f=>{s(f.open)},l=N.useCallback(()=>{s(!1)},[]),d=N.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(S8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(mw,{"aria-label":`Overflow menu for ${t}`,className:M(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(yw,{})}),w.jsx(_b,{children:w.jsx(xb,{className:M(`${O}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(YT.Provider,{value:d,children:n})})})]})};function Tw(e){return dt({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 bw(e){return dt({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[O8,vs]=ws({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Cp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getControlProps(),e);return w.jsx(bn.div,fe(F(F({},r),e),{ref:t}))});Cp.displayName="CarouselControl";const Np=N.forwardRef((e,t)=>{const[n,r]=Ya()(e,["readOnly","index"]),s=vs(),a=Zt(s.getIndicatorProps(n),r);return w.jsx(bn.button,fe(F({},a),{ref:t}))});Np.displayName="CarouselIndicator";const kp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getIndicatorGroupProps(),e);return w.jsx(bn.div,fe(F({},r),{ref:t}))});kp.displayName="CarouselIndicatorGroup";const Op=N.forwardRef((e,t)=>{const[n,r]=Ya()(e,["index","snapAlign"]),s=vs(),a=Zt(s.getItemProps(n),r);return w.jsx(bn.div,fe(F({},a),{ref:t}))});Op.displayName="CarouselItem";const Ip=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getItemGroupProps(),e);return w.jsx(bn.div,fe(F({},r),{ref:t}))});Ip.displayName="CarouselItemGroup";const Pp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getNextTriggerProps(),e);return w.jsx(bn.button,fe(F({},r),{ref:t}))});Pp.displayName="CarouselNextTrigger";const Rp=N.forwardRef((e,t)=>{const n=vs(),r=Zt(n.getPrevTriggerProps(),e);return w.jsx(bn.button,fe(F({},r),{ref:t}))});Rp.displayName="CarouselPrevTrigger";function I8(e){const t=bo(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(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}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 P8(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 ww(e){let t=[];for(const n of e.children)t=t.concat(n,ww(n));return t}function xw(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?ww(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(!P8(n,m,u))continue;const T=bo(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const A=a==="x"?_:y,v=m[l]-n[l]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function _w(e){const t=e.getBoundingClientRect(),n=I8(e),r=xw(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Sw([...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(vw(0,s.x))),y:Sw([...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(vw(0,s.y)))}}function R8(e,t,n){const r=xw(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Sw=e=>[...new Set(e)],vw=(e,t)=>n=>Math.max(e,Math.min(t,n)),L8=xs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ai=L8.build(),D8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},M8=(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}`},hc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},F8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},B8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},U8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Aw=(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}`},Fn=e=>e.getById(hc(e)),Cw=e=>cD(Fn(e),"[data-part=item]"),H8=(e,t)=>e.getById(Aw(e,t)),Nw=e=>{const t=Fn(e);if(!t)return;const n=wo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function j8(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"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=l("slidesPerPage"),v=l("padding"),x=l("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/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(fe(F({},ai.root.attrs),{id:D8(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":A,"--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(fe(F({},ai.itemGroup.attrs),{id:hc(u),"data-orientation":l("orientation"),"data-dragging":go(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(k){Eo(k.currentTarget,wr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Eo(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!l("allowMouseDrag")||!ub(k))return;const I=wr(k);zr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:c5(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:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:v,[T?"paddingInline":"paddingBlock"]:v,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const I=r.get("slidesInView").includes(k.index);return t.element(fe(F({},ai.item.attrs),{id:M8(u,k.index),dir:l("dir"),role:"group","data-index":k.index,"data-inview":go(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":x.item(k.index,l("slideCount")),"aria-hidden":nb(!I),style:{scrollSnapAlign:(()=>{var ne;const j=(ne=k.snapAlign)!=null?ne:"start",q=l("slidesPerMove"),R=q==="auto"?Math.floor(l("slidesPerPage")):q;return(k.index+R)%R===0?j:void 0})()}}))},getControlProps(){return t.element(fe(F({},ai.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(fe(F({},ai.prevTrigger.attrs),{id:B8(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":x.prevTrigger,"data-orientation":l("orientation"),"aria-controls":hc(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(fe(F({},ai.nextTrigger.attrs),{dir:l("dir"),id:F8(u),type:"button","aria-label":x.nextTrigger,"data-orientation":l("orientation"),"aria-controls":hc(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(fe(F({},ai.indicatorGroup.attrs),{dir:l("dir"),id:U8(u),"data-orientation":l("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",j={ArrowDown(X){T||(a({type:"PAGE.NEXT",src:I}),X.preventDefault())},ArrowUp(X){T||(a({type:"PAGE.PREV",src:I}),X.preventDefault())},ArrowRight(X){T&&(a({type:"PAGE.NEXT",src:I}),X.preventDefault())},ArrowLeft(X){T&&(a({type:"PAGE.PREV",src:I}),X.preventDefault())},Home(X){a({type:"PAGE.SET",index:0,src:I}),X.preventDefault()},End(X){a({type:"PAGE.SET",index:y.length-1,src:I}),X.preventDefault()}},q=Y5(k,{dir:l("dir"),orientation:l("orientation")}),R=j[q];R==null||R(k)}}))},getIndicatorProps(k){return t.button(fe(F({},ai.indicator.attrs),{dir:l("dir"),id:Aw(u,k.index),type:"button","data-orientation":l("orientation"),"data-index":k.index,"data-readonly":go(k.readOnly),"data-current":go(k.index===_),"aria-label":x.indicator(k.index),onClick(I){I.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(fe(F({},ai.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":go(d),"aria-label":d?x.autoplayStop:x.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var $8={props({props:e}){return g5(e,["slideCount"],"carousel"),fe(F({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:F({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:z8(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 ZL(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(Fn(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=Fn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Nw(e)});return Nw(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Fn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Jt(()=>{s(),Jt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Cw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Fn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?GL(d,m):XL(d,m)},n.get("slidesInView"));n.set("slidesInView",KL(l))},{root:r,threshold:t("inViewThreshold")});return Cw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Fn(n);return r?on(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 on(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return aD(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 on(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=eb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Fn(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=Fn(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=QT(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=QL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Fn(r);if(!s)return;const a=R8(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=eb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Fn(n);if(!r)return;const s=_w(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Fn(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=Fn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Fn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=_w(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]);Jt(()=>{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=H8(n,e.get("page"));r&&Jt(()=>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 z8(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}So()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),So()(["index","readOnly"]),So()(["index","snapAlign"]);const V8=e=>{const t=N.useId(),{getRootNode:n}=fc(),{dir:r}=vp(),s=F({id:t,dir:r,getRootNode:n},e),a=Zl($8,s);return j8(a,sp)},Lp=N.forwardRef((e,t)=>{const[n,r]=Ya()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=V8(n),a=Zt(s.getRootProps(),r);return w.jsx(O8,{value:s,children:w.jsx(bn.div,fe(F({},a),{ref:t}))})});Lp.displayName="CarouselRoot";const q8=180,W8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},Y8=({globalClassName:e,className:t,itemMinWidth:n=q8,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((ne,se)=>({node:ne,key:N.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${se}`})),T=m.length,y=N.useRef(null),[_,A]=N.useState(0),{width:v}=Q2();N.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,T]);const x=W8(r),k=n+x,I=_>0?(_+x)/k:1,j=Math.max(1,Math.floor(I));if(T===0)return null;const q=T>j,R=Math.ceil(T/j),X=q?Math.max(1,I):j;return w.jsxs(Lp,{ref:y,className:M(e,t,`${O}-carousel`),slidesPerPage:X,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[w.jsx(Ip,{className:M(e,`${O}-carousel__item-group`,{"carousel-row-container":!q}),children:m.map(({node:ne,key:se},H)=>w.jsx(Op,{index:H,className:M(e,`${O}-carousel__item`),children:ne},se))}),l&&q&&w.jsxs(Cp,{className:M(e,`${O}-carousel__control`),children:[w.jsx(Rp,{className:M(e,`${O}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(gw,{size:"16px"})}),w.jsx(Pp,{className:M(e,`${O}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Ew,{size:"16px"})})]}),u&&q&&w.jsx(kp,{className:M(e,`${O}-carousel__indicator-group`),children:Array.from({length:R},(ne,se)=>w.jsx(Np,{index:se,className:M(e,`${O}-carousel__indicator`),"aria-label":`Go to slide group ${se+1}`},se))})]})},[G8,X8]=ws({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),K8=e=>Ya()(e,["lazyMount","unmountOnExit"]),[Q8,Za]=ws({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),kw=N.forwardRef((e,t)=>{const n=Za(),r=X8(),s=up(fe(F({},r),{present:n.open})),a=Zt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(bn.div,fe(F({},a),{ref:ec(s.ref,t)}))});kw.displayName="DialogBackdrop";const Dp=N.forwardRef((e,t)=>{const n=Za(),r=Wa(),s=Zt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(bn.div,fe(F({},s),{ref:ec(r.ref,t)}))});Dp.displayName="DialogContent";const Mp=N.forwardRef((e,t)=>{const n=Za(),r=Zt(n.getDescriptionProps(),e);return w.jsx(bn.div,fe(F({},r),{ref:t}))});Mp.displayName="DialogDescription";const Fp=N.forwardRef((e,t)=>{const n=Za(),r=Zt(n.getPositionerProps(),e);return Wa().unmounted?null:w.jsx(bn.div,fe(F({},r),{ref:t}))});Fp.displayName="DialogPositioner";var J8=xs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),As=J8.build(),Ow=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Iw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Rw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},pc=e=>e.getById(Bp(e)),Z8=e=>e.getById(Ow(e)),e9=e=>e.getById(Iw(e)),t9=e=>e.getById(Pw(e)),n9=e=>e.getById(Up(e)),r9=e=>e.getById(Hp(e)),i9=e=>e.getById(Rw(e));function s9(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(fe(F({},As.trigger.attrs),{dir:a("dir"),id:Pw(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Bp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(fe(F({},As.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Iw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({},As.positioner.attrs),{dir:a("dir"),id:Ow(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(fe(F({},As.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Bp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Up(u),"aria-describedby":f.description?Hp(u):void 0}))},getTitleProps(){return t.element(fe(F({},As.title.attrs),{dir:a("dir"),id:Up(u)}))},getDescriptionProps(){return t.element(fe(F({},As.description.attrs),{dir:a("dir"),id:Hp(u)}))},getCloseTriggerProps(){return t.button(fe(F({},As.closeTrigger.attrs),{dir:a("dir"),id:Rw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var o9={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>i9(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return F({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 iw(()=>pc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[t9(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 lw(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?aw(()=>pc(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")?Xb(()=>[pc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Jt(()=>{e.set("rendered",{title:!!n9(t),description:!!r9(t)})})},syncZIndex({scope:e}){Jt(()=>{const t=pc(e);if(!t)return;const n=bo(t);[Z8(e),e9(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})}}}};So()(["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 a9=e=>{const t=N.useId(),{getRootNode:n}=fc(),{dir:r}=vp(),s=F({id:t,getRootNode:n,dir:r},e),a=Zl(o9,s);return s9(a,sp)},Lw=e=>{const[t,l]=Sb(e),d=l,{children:n}=d,r=vn(d,["children"]),[s]=K8(t),a=a9(r),u=up(Zt({present:a.open},t));return w.jsx(Q8,{value:a,children:w.jsx(G8,{value:s,children:w.jsx(wb,{value:u,children:n})})})},Dw=N.forwardRef((e,t)=>{const n=Za(),r=Zt(n.getTitleProps(),e);return w.jsx(bn.h2,fe(F({},r),{ref:t}))});Dw.displayName="DialogTitle";const u9=({children:e})=>{const[t,n]=N.useState(!1),r=N.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=N.useMemo(()=>({isOpen:t}),[t]);return w.jsx(qh.Provider,{value:r,children:w.jsx(WT.Provider,{value:s,children:e})})},Mw=()=>N.useContext(WT),Fw=()=>{const e=N.useContext(qh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},l9=`${O}-overflow-menu-button-trigger`,c9=({componentType:e,children:t})=>{const{isOpen:n}=Mw(),{closeMenu:r}=Fw(),{globalClassName:s}=lt(),a=N.useRef(null);return N.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${l9}`)||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,className:M(`${O}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},d9=({componentType:e,className:t})=>{const{toggleMenu:n}=Fw(),{isOpen:r}=Mw(),{globalClassName:s}=lt();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:M(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(yw,{})})};class f9{constructor(){Xe(this,"initialState",Ag);Xe(this,"promptsStateProxy");Xe(this,"promptsParamsProxy");Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return m9(n,r),Reflect.set(t,n,r)});Xe(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Xe(this,"updatePromptsParamsProxy",t=>new Proxy(F({},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 Ii=new f9,h9=e=>{window.addEventListener(Jd,e)},p9=e=>{window.removeEventListener(Jd,e)},m9=(e,t)=>{const n=new CustomEvent(Jd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Bw=e=>{const t=Ii.isOpen,n=typeof e=="boolean"?e:!t;Ii.promptsStateProxy.isOpen=n},g9=e=>{const t=Ii.isInline,n=typeof e=="boolean"?e:!t;Ii.promptsStateProxy.isInline=n},E9=({elementId:e,entryType:t,params:n,isInline:r})=>{Ii.promptsStateProxy.elementId=e,t&&(Ii.promptsStateProxy.entryType=t),typeof r=="boolean"&&g9(r),n&&Ii.updatePromptsParamsProxy(n),Ii.isOpen||Bw(!0)},y9=()=>{pg("resetConversation",!0,Yu.RESET_CONVERSATION)},T9=()=>{pg("endConversation",!0,Yu.END_CONVERSATION)},jp=()=>{const e=N.useContext(Q1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},b9=()=>{const e=N.useContext(K1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},mc=()=>{const e=N.useContext(X1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},w9=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),{previousComponentType:r}=Mr(),s=ys(),a=()=>{Xu(r||"dialog"),s()};return t?w.jsx(yr,{className:M(n,`${O}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(Tw,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(Tw,{}),"Show ",r||"dialog"]})},x9=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),{isModalFullscreen:r}=Mr(),s=ys(),a=()=>{nf(!r),s()},u=r?o3:a3,l="Toggle Fullscreen";return t?w.jsx(yr,{ariaLabel:l,title:l,className:M(n,`${O}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},_9=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),{dialogPosition:r}=Mr(),s=ys(),a=r==="bottom-left",u=()=>{rf(a?"bottom-right":"bottom-left"),s()},l=a?A8:v8,d=a?"Move right":"Move left";return t?w.jsx(yr,{className:M(n,`${O}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},Uw=({componentType:e,onClearChat:t,onEndConversation:n,onClose:r,onDownloadTranscript:s})=>{const{headerConfig:a,globalClassName:u,mode:l,enableDownloadTranscript:d}=lt(),{mode:f}=Mr(),p=l==="messaging"&&d&&!!s,m=f==="standalone",T=e==="modal",y=T?w9:jw,_=T?x9:_9,A=N.useMemo(()=>a?f3(a):{},[a]);return w.jsx(u9,{children:w.jsxs("div",{className:M(u,`${O}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:M(u,`${O}-${e}-header`,{standalone:m,embedded:!m}),style:A,children:[(a==null?void 0:a.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:M(u,`${O}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),w.jsx(Dw,{className:M(u,`${O}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),w.jsxs("div",{className:M(u,`${O}-${e}-controls`),children:[w.jsx(y,{componentType:e,isIcon:!0}),w.jsx(d9,{componentType:e}),w.jsx(pE,{className:M(u,`cim-${e}-component`),label:a==null?void 0:a.closeButtonAriaLabel,onClick:r})]})]}),w.jsxs(c9,{componentType:e,children:[w.jsx(_,{componentType:e}),w.jsx(N9,{componentType:e}),w.jsx(GT,{componentType:e,onClearChat:t}),n&&w.jsx(KT,{componentType:e,onEndConversation:n}),p&&w.jsx(XT,{componentType:e,onDownloadTranscript:s})]})]})})},Ro="USD",gc=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),ui=(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}`}},S9=({retailPrice:e,discountPrice:t,currencyCode:n=Ro})=>{const r=n||Ro,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:ui(a,r),comparePrice:ui(u,r),hasDiscount:s}},Ec=e=>typeof e=="number"&&Number.isFinite(e),$p=({min:e,max:t,currencyCode:n=Ro})=>{if(!Ec(e)||!Ec(t))return null;const r=n||Ro,s=ui(e,r),a=ui(t,r);if(s===null||a===null)return null;const u=e!==t;return{value:u?`${s} – ${a}`:s,low:s,high:a,isRange:u}},v9=({priceBreakdown:e,currencyCode:t=Ro})=>{if(!e)return null;const n=t||Ro,r=[e.promotional,e.sales,e.original],s=r.map(f=>f==null?void 0:f.min).filter(Ec),a=r.map(f=>f==null?void 0:f.max).filter(Ec);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=$p({min:u,max:l,currencyCode:n});return d?{range:d.value,low:d.low,high:d.high}:null},zp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=S9({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:M(s,a,`${O}-price`),style:f,children:[w.jsx("span",{className:`${O}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:M(s,`${O}-price__amount`),children:u}),d&&l&&w.jsxs("span",{className:M(s,`${O}-price__compare`),children:[w.jsx("span",{className:`${O}-visually-hidden`,children:"Original price: "}),l]})]})},A9={sparkle:Ap,plus:C8,"paper-plane":N8},Hw=({icon:e,className:t})=>{const n=A9[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},C9=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=lt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=_=>w.jsxs(w.Fragment,{children:[l&&w.jsx(Hw,{icon:l,className:`${O}-suggestion-button-icon`}),w.jsx("span",{children:_})]});return w.jsx("div",{className:M(t,`${O}-suggestion-container ${f}`,e),children:n.map(_=>s?w.jsx(Kf,{disabled:r,className:M(t,`${O}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):w.jsx("button",{disabled:r,className:M(t,`${O}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},N9=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=lt();if(!r)return null;const s=()=>{ni(!1),Xs(!0),Gf()};return t?w.jsx(yr,{className:M(n,`${O}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(cE,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(cE,{}),"Minimize"]})},jw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=lt(),r=ys(),s=()=>{Xu("modal"),r()};return t?w.jsx(yr,{className:M(n,`${O}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(bw,{})}):w.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(bw,{}),"Show modal"]})};function yc(){const{sendMessage:e}=$t(),{productId:t}=jp(),{enablePageContext:n}=lt();return N.useCallback((r,s)=>{var l;if(n)return e(r,s);const{prompt:a,display:u}=Pf(r,t);return e(a,fe(F({},s),{displayContent:(l=s==null?void 0:s.displayContent)!=null?l:u}))},[e,t,n])}function Vp(){const{sendFile:e}=$t(),{productId:t}=jp();return N.useCallback(n=>{if(!n.file||!t)return e(n);const{prompt:r}=Pf(n.text,t);return e(fe(F({},n),{text:r,displayContent:n.text}))},[e,t])}const k9=["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"],O9=3e3,I9=400,P9=({globalClassName:e,isWidgetStandalone:t,messages:n=k9})=>{const[r,s]=N.useState(0),[a,u]=N.useState(!0);return N.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},I9)},O9);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:M(e,`${O}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${O}-connecting-pulse-wrapper`,"aria-hidden":"true",children:[w.jsx("div",{className:`${O}-connecting-pulse`}),w.jsx("div",{className:`${O}-connecting-ring`})]}),w.jsx("span",{className:M(`${O}-connecting-text`,a&&`${O}-connecting-text--visible`),"aria-hidden":"true",children:n[r]})]})},R9=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${O}-processing-text`,"aria-hidden":"true",children:t}):null,L9=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${O}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${O}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${O}-processing-shimmer-bar`,"aria-hidden":"true"})]}):null,qp=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:M(e,`${O}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(R9,{shouldShow:!!n,loadingText:n}),w.jsx(L9,{shouldShow:!n})]});function $w(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 D9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function M9(e,t,n){const s=Il((n||{}).ignore||[]),a=F9(t);let u=-1;for(;++u<a.length;)Ay(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(s(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let x=!1,k=[];T.lastIndex=0;let I=T.exec(f.value);for(;I;){const j=I.index,q={index:I.index,input:I.input,stack:[...p,f]};let R=y(...I,q);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=j+1:(_!==j&&k.push({type:"text",value:f.value.slice(_,j)}),Array.isArray(R)?k.push(...R):R&&k.push(R),_=j+I[0].length,x=!0),!T.global)break;I=T.exec(f.value)}return x?(_<f.value.length&&k.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...k)):k=[f],v+k.length}}function F9(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([B9(s[0]),U9(s[1])])}return t}function B9(e){return typeof e=="string"?new RegExp(D9(e),"g"):e}function U9(e){return typeof e=="function"?e:function(){return e}}const Wp="phrasing",Yp=["autolink","link","image","label"];function H9(){return{transforms:[Y9],enter:{literalAutolink:$9,literalAutolinkEmail:Gp,literalAutolinkHttp:Gp,literalAutolinkWww:Gp},exit:{literalAutolink:W9,literalAutolinkEmail:q9,literalAutolinkHttp:z9,literalAutolinkWww:V9}}}function j9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Wp,notInConstruct:Yp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Wp,notInConstruct:Yp},{character:":",before:"[ps]",after:"\\/",inConstruct:Wp,notInConstruct:Yp}]}}function $9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gp(e){this.config.enter.autolinkProtocol.call(this,e)}function z9(e){this.config.exit.autolinkProtocol.call(this,e)}function V9(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 q9(e){this.config.exit.autolinkEmail.call(this,e)}function W9(e){this.exit(e)}function Y9(e){M9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,G9],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),X9]],{ignore:["link","linkReference"]})}function G9(e,t,n,r,s){let a="";if(!zw(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!K9(n)))return!1;const u=Q9(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 X9(e,t,n,r){return!zw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function K9(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 Q9(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=$w(e,"(");let a=$w(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 zw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ds(n)||Sl(n))&&(!t||n!==47)}Vw.peek=oF;function J9(){this.buffer()}function Z9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function eF(){this.buffer()}function tF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function nF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rF(e){this.exit(e)}function iF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sF(e){this.exit(e)}function oF(){return"["}function Vw(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 aF(){return{enter:{gfmFootnoteCallString:J9,gfmFootnoteCall:Z9,gfmFootnoteDefinitionLabelString:eF,gfmFootnoteDefinition:tF},exit:{gfmFootnoteCallString:nF,gfmFootnoteCall:rF,gfmFootnoteDefinitionLabelString:iF,gfmFootnoteDefinition:sF}}}function uF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Vw},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
38
|
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?qw:lF))),f(),d}}function lF(e,t,n){return t===0?e:qw(e,t,n)}function qw(e,t,n){return(n?"":" ")+e}const cF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ww.peek=mF;function dF(){return{canContainEols:["delete"],enter:{strikethrough:hF},exit:{strikethrough:pF}}}function fF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:cF}],handlers:{delete:Ww}}}function hF(e){this.enter({type:"delete",children:[]},e)}function pF(e){this.exit(e)}function Ww(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,fe(F({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function mF(){return"~"}function gF(e){return e.length}function EF(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||gF,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],v=[];let x=-1;for(e[p].length>f&&(f=e[p].length);++x<e[p].length;){const k=yF(e[p][x]);if(n.alignDelimiters!==!1){const I=s(k);v[x]=I,(d[x]===void 0||I>d[x])&&(d[x]=I)}A.push(k)}u[p]=A,l[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Yw(r[m]);else{const A=Yw(r);for(;++m<f;)a[m]=A}m=-1;const T=[],y=[];for(;++m<f;){const A=a[m];let v="",x="";A===99?(v=":",x=":"):A===108?v=":":A===114&&(x=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-x.length);const I=v+"-".repeat(k)+x;n.alignDelimiters!==!1&&(k=v.length+k+x.length,k>d[m]&&(d[m]=k),y[m]=k),T[m]=I}u.splice(1,0,T),l.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const A=u[p],v=l[p];m=-1;const x=[];for(;++m<f;){const k=A[m]||"";let I="",j="";if(n.alignDelimiters!==!1){const q=d[m]-(v[m]||0),R=a[m];R===114?I=" ".repeat(q):R===99?q%2?(I=" ".repeat(q/2+.5),j=" ".repeat(q/2-.5)):(I=" ".repeat(q/2),j=I):j=" ".repeat(q)}n.delimiterStart!==!1&&!m&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&x.push(" "),n.alignDelimiters!==!1&&x.push(I),x.push(k),n.alignDelimiters!==!1&&x.push(j),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&x.push("|")}_.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return _.join(`
|
|
39
39
|
`)}function yF(e){return e==null?"":String(e)}function Yw(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 TF(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()),bF);return s(),u}function bF(e,t,n){return">"+(n?"":" ")+e}function wF(e,t){return Gw(e,t.inConstruct,!0)&&!Gw(e,t.notInConstruct,!1)}function Gw(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 Xw(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
40
40
|
`&&wF(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
@@ -49,4 +49,4 @@ Error generating stack: `+b.message+`
|
|
|
49
49
|
`))+1))}const u="#".repeat(s),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,F({before:"# ",after:`
|
|
50
50
|
`},a.current()));return/^[\t ]/.test(f)&&(f=eu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Qw.peek=PF;function Qw(e){return e.value||""}function PF(){return"<"}Jw.peek=RF;function Jw(e,t,n,r){const s=Xp(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,F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({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,F({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function RF(){return"!"}Zw.peek=LF;function Zw(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,F({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),F({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 LF(){return"!"}ex.peek=DF;function ex(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 DF(){return"`"}function tx(e,t){const n=ah(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))}nx.peek=MF;function nx(e,t,n,r){const s=Xp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(tx(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,F({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,F({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,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({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,F({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function MF(e,t,n){return tx(e,n)?"<":"["}rx.peek=FF;function rx(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,F({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),F({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 FF(){return"["}function Kp(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 BF(e){const t=Kp(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 UF(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 ix(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 HF(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?UF(n):Kp(n);const l=e.ordered?u==="."?")":".":BF(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),ix(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.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 jF(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 $F(e,t,n,r){const s=jF(n);let a=n.bulletCurrent||Kp(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,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function zF(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const VF=Il(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qF(e,t,n,r){return(e.children.some(function(u){return VF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function WF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}sx.peek=YF;function sx(e,t,n,r){const s=WF(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,F({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=eu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=Tc(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+eu(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function YF(e,t,n){return n.options.strong||"*"}function GF(e,t,n,r){return n.safe(e.value,r)}function XF(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 KF(e,t,n){const r=(ix(n)+(n.options.ruleSpaces?" ":"")).repeat(XF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ox={blockquote:TF,break:Xw,code:vF,definition:CF,emphasis:Kw,hardBreak:Xw,heading:IF,html:Qw,image:Jw,imageReference:Zw,inlineCode:ex,link:nx,linkReference:rx,list:HF,listItem:$F,paragraph:zF,root:qF,strong:sx,text:GF,thematicBreak:KF};function QF(){return{enter:{table:JF,tableData:ax,tableHeader:ax,tableRow:eB},exit:{codeText:tB,table:ZF,tableData:Qp,tableHeader:Qp,tableRow:Qp}}}function JF(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 ZF(e){this.exit(e),this.data.inTable=void 0}function eB(e){this.enter({type:"tableRow",children:[]},e)}function Qp(e){this.exit(e)}function ax(e){this.enter({type:"tableCell",children:[]},e)}function tB(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,nB));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function nB(e,t){return t==="|"?t:e}function rB(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
51
51
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:l}};function u(y,_,A,v){return f(p(y,A,v),y.align)}function l(y,_,A,v){const x=m(y,A,v),k=f([x]);return k.slice(0,k.indexOf(`
|
|
52
|
-
`))}function d(y,_,A,v){const x=A.enter("tableCell"),k=A.enter("phrasing"),I=A.containerPhrasing(y,fe(F({},v),{before:a,after:a}));return k(),x(),I}function f(y,_){return EF(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,A){const v=y.children;let x=-1;const k=[],I=_.enter("table");for(;++x<v.length;)k[x]=m(v[x],_,A);return I(),k}function m(y,_,A){const v=y.children;let x=-1;const k=[],I=_.enter("tableRow");for(;++x<v.length;)k[x]=d(v[x],y,_,A);return I(),k}function T(y,_,A){let v=ox.inlineCode(y,_,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function iB(){return{exit:{taskListCheckValueChecked:ux,taskListCheckValueUnchecked:ux,paragraph:oB}}}function sB(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:aB}}}function ux(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function oB(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 aB(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=ox.listItem(e,t,n,F(F({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function uB(){return[H9(),aF(),dF(),QF(),iB()]}function lB(e){return{extensions:[j9(),uF(e),fF(),rB(e),sB()]}}const cB={tokenize:gB,partial:!0},lx={tokenize:EB,partial:!0},cx={tokenize:yB,partial:!0},dx={tokenize:TB,partial:!0},dB={tokenize:bB,partial:!0},fx={name:"wwwAutolink",tokenize:pB,previous:px},hx={name:"protocolAutolink",tokenize:mB,previous:mx},li={name:"emailAutolink",tokenize:hB,previous:gx},Xr={};function fB(){return{text:Xr}}let Cs=48;for(;Cs<123;)Xr[Cs]=li,Cs++,Cs===58?Cs=65:Cs===91&&(Cs=97);Xr[43]=li,Xr[45]=li,Xr[46]=li,Xr[95]=li,Xr[72]=[li,hx],Xr[104]=[li,hx],Xr[87]=[li,fx],Xr[119]=[li,fx];function hB(e,t,n){const r=this;let s,a;return u;function u(m){return!Jp(m)||!gx.call(r,r.previous)||Zp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Jp(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(dB,p,f)(m):m===45||m===95||yn(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&&Cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function pB(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!px.call(r,r.previous)||Zp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cB,e.attempt(lx,e.attempt(cx,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function mB(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&mx.call(r,r.previous)&&!Zp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Cn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="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||_l(m)||_t(m)||ds(m)||Sl(m)?n(m):e.attempt(lx,e.attempt(cx,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function gB(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 EB(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(dx,d,l)(f):f===null||_t(f)||ds(f)||f!==45&&Sl(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 yB(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(dx,t,a)(u):u===null||_t(u)||ds(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function TB(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||_t(l)||ds(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||_t(l)||ds(l)?t(l):r(l)}function a(l){return Cn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Cn(l)?(e.consume(l),u):n(l)}}function bB(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return yn(a)?n(a):t(a)}}function px(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_t(e)}function mx(e){return!Cn(e)}function gx(e){return!(e===47||Jp(e))}function Jp(e){return e===43||e===45||e===46||e===95||yn(e)}function Zp(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 wB={tokenize:kB,partial:!0};function xB(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:AB,continuation:{tokenize:CB},exit:NB}},text:{91:{name:"gfmFootnoteCall",tokenize:vB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_B,resolveTo:SB}}}}function _B(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=Tr(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 SB(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 vB(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||_t(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(Tr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return _t(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 AB(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!l||_===null||_===91||_t(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=Tr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return _t(_)||(l=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),at(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function CB(e,t,n){return e.check(Aa,t,e.attempt(wB,t,n))}function NB(e){e.exit("gfmFootnoteDefinition")}function kB(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 OB(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)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Gn(T,T.length,0,vl(y,u.slice(f+1,d),l)),Gn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Gn(u,f-1,d-f+3,T),d=f+T.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 T;function T(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const A=uo(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),x=uo(_);return v._open=!x||x===2&&!!A,v._close=!A||A===2&&!!x,l(_)}}}class IB{constructor(){this.map=[]}add(t,n,r){PB(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 PB(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 RB(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 LB(){return{flow:{null:{name:"table",tokenize:DB,resolveAll:MB}}}}function DB(e,t,n){const r=this;let s=0,a=0,u;return l;function l(H){let re=r.events.length-1;for(;re>-1;){const ae=r.events[re][1].type;if(ae==="lineEnding"||ae==="linePrefix")re--;else break}const V=re>-1?r.events[re][1].type:null,ee=V==="tableHead"||V==="tableRow"?R:d;return ee===R&&r.parser.lazy[r.now().line]?n(H):ee(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):rt(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||_t(H)?(e.exit("data"),p(H)):(e.consume(H),H===92?T:m)}function T(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,rt(H)?at(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):_(H))}function _(H){return H===45||H===58?v(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),A):q(H)}function A(H){return rt(H)?at(e,v,"whitespace")(H):v(H)}function v(H){return H===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),x):H===45?(a+=1,x(H)):H===null||Ve(H)?j(H):q(H)}function x(H){return H===45?(e.enter("tableDelimiterFiller"),k(H)):q(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 rt(H)?at(e,j,"whitespace")(H):j(H)}function j(H){return H===124?_(H):H===null||Ve(H)?!u||s!==a?q(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):q(H)}function q(H){return n(H)}function R(H){return e.enter("tableRow"),X(H)}function X(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),X):H===null||Ve(H)?(e.exit("tableRow"),t(H)):rt(H)?at(e,X,"whitespace")(H):(e.enter("data"),ne(H))}function ne(H){return H===null||H===124||_t(H)?(e.exit("data"),X(H)):(e.consume(H),H===92?se:ne)}function se(H){return H===92||H===124?(e.consume(H),ne):ne(H)}}function MB(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 T=new IB;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(l=!1,d!==0&&(Ex(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.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({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=bc(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=bc(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(l=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=bc(T,t,a,s,n,m)):u[1]!==0&&(m=bc(T,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Ex(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=RB(t.events,n))}return e}function bc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Lo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Lo(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=Lo(t.events,n[2]),p=Lo(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 T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},Lo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Ex(e,t,n,r,s){const a=[],u=Lo(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 Lo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const FB={name:"tasklistCheck",tokenize:UB};function BB(){return{text:{91:FB}}}function UB(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 _t(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):rt(d)?e.check({tokenize:HB},t,n)(d):n(d)}}function HB(e,t,n){return at(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function jB(e){return WE([fB(),xB(),OB(e),LB(),BB()])}const $B={};function zB(e){const t=this,n=e||$B,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(jB(n)),a.push(uB()),u.push(lB(n))}const VB=()=>w.jsx("span",{className:`${O}-blinking-cursor`,children:w.jsx("svg",{"aria-hidden":"true",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"})})}),Do=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(Fy,{remarkPlugins:[zB],rehypePlugins:[BT],components:{h1:({children:s})=>w.jsx("h1",{className:M(e,`${O}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:M(e,`${O}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:M(e,`${O}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:M(e,`${O}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:M(e,`${O}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:M(e,`${O}-li`),children:s}),a:({href:s,children:a})=>w.jsx(qT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:M(e,`${O}-table-container`),children:w.jsx("table",{className:M(e,`${O}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:M(e,`${O}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:M(e,`${O}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:M(e,`${O}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:M(e,`${O}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:M(e,`${O}-td`),children:s}),span:({className:s,children:a})=>s===`${O}-blinking-cursor`?w.jsx(VB,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${O}-blinking-cursor'></span>`:"")});function qB(){const{messages:e}=$t();return N.useMemo(()=>aN(e,"cart"),[e])}const Pi=()=>N.useContext(J1),Ns=()=>{const{sendMessage:e,loading:t,isConnected:n}=$t(),{mode:r,status:s}=Mr();return N.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function WB(e){return e.includes("-")&&e===e.toLowerCase()}function Ri({tagName:e,props:t,label:n}){const r=N.useRef(null),s=N.useRef(null),a=N.useRef(e),u=N.useRef(null);return N.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!WB(e)){u.current!==e&&(u.current=e,kt(!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){kt(!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){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),N.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class yx extends N.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){kt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function YB(e){return dt({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 GB="(max-width: 576px)";function XB(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function wc({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||XB(e)&&typeof window!="undefined"&&window.matchMedia(GB).matches&&(Xs(!0),F2())}const KB=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=$t();return w.jsx("div",{className:M(t,`${O}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:M(t,`${O}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:M(t,`${O}-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,onClick:f=>wc({event:f,openLinksInNewTab:s,isCartMgmtSupported:n}),children:w.jsx("img",{className:M(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:M(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:M(t,`${O}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(YB,{"aria-hidden":"true"})})})},QB=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=$t();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:M(t,`${O}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:M(t,`${O}-msg-product-card__title-link`),"aria-label":a,onClick:d=>wc({event:d,openLinksInNewTab:s,isCartMgmtSupported:n}),children:e}):w.jsx("p",{className:M(t,`${O}-msg-product-card__title`),children:e})},JB=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=lt(),{overrides:u,isInitialized:l}=Pi(),{sendMessage:d,loading:f}=$t(),p=Ns(),m=l?u.ProductTile:void 0;if(m){const H={name:"ProductTile",payload:s!=null?s:{},api:p};return w.jsx(Ri,{tagName:m,props:H,label:"ProductTile"})}const{id:T,name:y,imageUrl:_,description:A,productPageUrl:v,price:x,priceBreakdown:k,discountPrice:I,listPrice:j,currencyCode:q}=e,R=I!=null?I:x,X=v9({priceBreakdown:k,currencyCode:q}),ne=()=>{if(f)return;const H=y||"this product",re=T?` [SKU: ${T}]`:"";d(`Show me details for ${H}${re}`)},se=r?`View details for ${y}`:`Go to product page for ${y}`;return w.jsxs("div",{className:M(t,`${O}-msg-product-card`),children:[w.jsx(KB,{imageUrl:_||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:se,name:y,showInWidgetDetails:ne}),w.jsxs("div",{className:M(t,`${O}-msg-product-card__content`),children:[w.jsxs("div",{className:M(t,`${O}-msg-product-card__content-header`),children:[w.jsx(QB,{name:y||T,globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:se,showInWidgetDetails:ne}),a&&A&&w.jsx("div",{className:M(t,`${O}-msg-product-card__description`),title:A,children:w.jsx(Do,{globalClassName:t,text:A})})]}),w.jsx("div",{className:M(t,`${O}-msg-product-card__price-row`),children:X?w.jsx("span",{className:M(t,`${O}-msg-product-card__price`),"aria-label":`Price from ${X.low} to ${X.high}`,children:X.range}):w.jsx(zp,{globalClassName:t,retailPrice:j,discountPrice:R,currencyCode:q})})]})]})},ZB=e=>{var n,r,s;const t=gc(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);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:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(s=e.data.priceBreakdown)!=null?s:void 0,currencyCode:e.data.currencyCode}},e7=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=lt(),{overrides:l,isInitialized:d}=Pi(),f=Ns(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(Ri,{tagName:p,props:m,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:M(n,`${O}-product-carousel-title`),children:e}),w.jsx(Y8,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>w.jsxs("div",{className:M(n,`${O}-product-carousel-item`),children:[w.jsx(JB,{product:ZB(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:M(n,`${O}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},em=44,t7=400,n7=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?em:Math.min(Math.max(Math.round(t),em),t7)},r7=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},i7="parentOrigin",s7=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(i7,t),n.toString()}catch(n){return e}},o7=(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}},Tx=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=N.useRef(null),[s,a]=N.useState(!1),[u,l]=N.useState(em),d=typeof window!="undefined"?window.location.origin:"",f=s7(e,d),p=r7(e);return N.useEffect(()=>{const m=T=>{var _,A,v;if(p&&T.origin!==p||r.current&&T.source!==r.current.contentWindow)return;const y=T.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(n7((_=y.payload)==null?void 0:_.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((v=(A=y.payload)==null?void 0:A.orderId)!=null?v:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),w.jsx("div",{className:M(t,`${O}-cart-express`,{[`${O}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:M(t,`${O}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},xc=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:M(t,`${O}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(hE,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Bn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")f=ui(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:M(s,`${O}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:M(s,`${O}-cart-total-label`),children:[e,t&&w.jsx("span",{className:M(s,`${O}-cart-total-badge`),children:t})]}),w.jsx("span",{className:M(s,`${O}-cart-total-value`),children:d?w.jsx("span",{className:M(s,`${O}-cart-total-shimmer`)}):f})]})};function bx(e){var a;const n=((a=e.variants)!=null?a:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",s=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${s}`}function wx(e){var r;const n=((r=e.variants)!=null?r:[]).filter(s=>s.value).map(s=>s.value).join(", ");return n?`${e.name} (${n})`:e.name}function tm(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function nm(e){return(e!=null?e:[]).map(tm).filter(t=>t!==null)}function xx(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function a7(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=tm(a),l=xx(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=tm(a);if(u===null)continue;const l=(s=xx(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function _x(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>nm(s.coupons)).map(s=>s.toLowerCase()));return a7(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const Sx=e=>{const{sendMessage:t}=$t();return{removeItem:a=>{e||t(`Remove ${bx(a)} from my cart`,{displayContent:`Remove ${wx(a)} from cart`})},changeItemQuantity:(a,u)=>{e||u<1||t(`Update ${bx(a)} quantity to ${u}`,{displayContent:`Update ${wx(a)} to qty ${u}`})},applyCoupon:a=>{const u=a.trim();!u||e||t(`Apply coupon code ${u}`)}}},u7=e=>{const t=F({},e);return delete t.checkoutButtonUrl,delete t.expressPaymentUrl,t},l7=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const[s,a]=N.useState(e.toString());N.useEffect(()=>{a(e.toString())},[e]);const u=f=>{if(t)return;const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!t&&!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return w.jsx("div",{className:M(n,`${O}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:M(n,`${O}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},c7=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:s,onQuantityChange:a})=>{var d,f;const u=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,l=nm(e.coupons);return w.jsxs("li",{className:M(r,`${O}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(r,`${O}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(r,`${O}-cart-item-details`),children:[w.jsx("p",{className:M(r,`${O}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(r,`${O}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(p=>w.jsxs("p",{className:M(r,`${O}-cart-item-attr`),children:[p.lbl,": ",p.value]},`${p.type}-${p.value}`)),((f=e.promotions)!=null?f:[]).map(p=>w.jsxs("p",{className:M(r,`${O}-cart-item-attr`),children:["Promotion: ",p]},p))]}),l.length>0&&w.jsx("div",{className:M(r,`${O}-cart-chips`),children:l.map(p=>w.jsx(xc,{code:p,globalClassName:r},p))}),w.jsxs("span",{className:M(r,`${O}-cart-item-price`),children:[u&&w.jsx("span",{className:M(r,`${O}-cart-item-original-price`),children:ui(e.originalSubtotal,t)}),w.jsx("span",{className:M(r,`${O}-cart-item-final-price`),children:ui(e.itemSubtotal,t)})]}),w.jsxs("div",{className:M(r,`${O}-cart-item-footer`),children:[w.jsx("span",{className:M(r,`${O}-cart-qty-heading`),children:"Quantity"}),w.jsx(l7,{quantity:e.quantity,disabled:n,globalClassName:r,onChange:p=>a(e,p)}),w.jsx("button",{type:"button",className:M(r,`${O}-cart-item-remove`),disabled:n,onClick:()=>s(e),children:"Remove"})]})]})]})},vx=({expressPaymentUrl:e,checkoutButtonUrl:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s}=$t(),a=u=>{s(u?`I completed express payment. Show my order confirmation for order ${u}.`:"I completed express payment. Show my order confirmation.")};return w.jsxs(w.Fragment,{children:[e&&w.jsx(Tx,{expressPaymentUrl:e,globalClassName:n,onOrderComplete:a}),t&&w.jsxs("a",{className:M(n,`${O}-cart-checkout-button`),href:t,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(n3,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]})]})},d7=({cartOverrideTag:e,cart:t,productsToHighlight:n,readOnly:r,globalClassName:s,openLinksInNewTab:a})=>{const{loading:u,isConnected:l}=$t(),{mode:d,status:f}=Mr(),p=u||!!r,{removeItem:m,changeItemQuantity:T,applyCoupon:y}=Sx(p),_=x=>t.items.find(k=>k.itemId===x),A={isConnected:l,isLoading:u,componentType:f.type,mode:d,cart:{setQuantity:(x,k)=>{var R,X;const I=_(x);if(!I)return;const j=Math.max(1,(R=I.minQuantity)!=null?R:1),q=(X=I.maxQuantity)!=null?X:1/0;T(I,Math.min(q,Math.max(j,Math.floor(k))))},remove:x=>{const k=_(x);k&&m(k)},applyCoupon:y}},v={name:"Cart",payload:{cart:u7(t),productsToHighlight:n,readOnly:r},api:A};return w.jsxs("div",{className:M(s,`${O}-cart`),children:[w.jsx(yx,{overrideName:"Cart",children:w.jsx(Ri,{tagName:e,props:v,label:"Cart"})}),w.jsx(vx,{expressPaymentUrl:t.expressPaymentUrl,checkoutButtonUrl:t.checkoutButtonUrl,globalClassName:s,openLinksInNewTab:a})]})},f7=({cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:s})=>{const{loading:a}=$t(),[u,l]=N.useState(!1),[d,f]=N.useState(""),{overrides:p,isInitialized:m}=Pi(),T=m?p.Cart:void 0,y=a||!!n,{removeItem:_,changeItemQuantity:A,applyCoupon:v}=Sx(y);if(T)return w.jsx(d7,{cartOverrideTag:T,cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:s});const{items:x=[],currencyCode:k="USD",subtotal:I,total:j,taxes:q,shippingCost:R,shippingDiscount:X,shippingPromotions:ne=[],promotionsDiscount:se,promotions:H=[],couponsDiscount:re,bodyMessage:V,footerMessage:ee,checkoutButtonUrl:ae,expressPaymentUrl:oe}=e,me=_x(x,e.couponsApplied,e.coupons),de=()=>{const W=d.trim();!W||y||(v(W),f(""))};return w.jsxs("div",{className:M(r,`${O}-cart`,y&&`${O}-cart-busy`),children:[w.jsxs("div",{className:M(r,`${O}-cart-box`),children:[V&&w.jsxs("button",{type:"button",className:M(r,`${O}-cart-summary`),"aria-expanded":u,onClick:()=>l(W=>!W),children:[w.jsx("span",{className:M(r,`${O}-cart-summary-text`),children:w.jsx(Do,{text:V,globalClassName:r,openLinksInNewTab:s,showIsLoading:!1})}),w.jsx("span",{className:M(r,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:u?w.jsx(dE,{}):w.jsx(fE,{})})]}),u&&w.jsxs("div",{className:M(r,`${O}-cart-expanded`),children:[w.jsxs("div",{className:M(r,`${O}-cart-items-section`),children:[w.jsx("ul",{className:M(r,`${O}-cart-items`),children:x.map(W=>w.jsx(c7,{item:W,currencyCode:k,disabled:y,globalClassName:r,onRemove:_,onQuantityChange:A},W.itemId))}),me.length>0&&w.jsx("div",{className:M(r,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:me.map(W=>w.jsx(xc,{code:W.code,inactive:!W.applied,globalClassName:r},W.code))})]}),w.jsxs("div",{className:M(r,`${O}-cart-totals`),children:[w.jsx(Bn,{label:"Subtotal",value:I,currencyCode:k,globalClassName:r,loading:!1}),w.jsx(Bn,{label:"Coupon",value:re,currencyCode:k,globalClassName:r,isDiscount:!0,loading:!1}),w.jsx(Bn,{label:"Promotions",badge:H[0],value:se,currencyCode:k,globalClassName:r,isDiscount:!0,loading:!1}),w.jsx(Bn,{label:"Shipping",value:R,currencyCode:k,globalClassName:r,fallback:"TBD",loading:!1}),w.jsx(Bn,{label:"Shipping Discount",badge:ne[0],value:X,currencyCode:k,globalClassName:r,isDiscount:!0,loading:!1}),w.jsx(Bn,{label:"Tax",value:q,currencyCode:k,globalClassName:r,fallback:"TBD",loading:!1}),w.jsx(Bn,{label:"Total",value:j,currencyCode:k,globalClassName:r,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:M(r,`${O}-cart-coupon`),children:[w.jsxs("div",{className:M(r,`${O}-cart-coupon-field`),children:[w.jsx("span",{className:M(r,`${O}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(hE,{})}),w.jsx("input",{type:"text",className:M(r,`${O}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:y,onChange:W=>f(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),de())}})]}),w.jsx("button",{type:"button",className:M(r,`${O}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!d.trim(),onClick:de,children:w.jsx(i3,{"aria-hidden":"true"})})]}),w.jsx(vx,{expressPaymentUrl:oe,checkoutButtonUrl:ae,globalClassName:r,openLinksInNewTab:s}),w.jsx("p",{className:M(r,`${O}-cart-footer`),children:ee||"Shipping and taxes calculated at checkout."})]})},h7=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=nm(e.coupons);return w.jsxs("li",{className:M(n,`${O}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(n,`${O}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(n,`${O}-cart-item-details`),children:[w.jsx("p",{className:M(n,`${O}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(n,`${O}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:M(n,`${O}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:M(n,`${O}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:M(n,`${O}-cart-chips`),children:s.map(l=>w.jsx(xc,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:M(n,`${O}-cart-item-price`),children:[r&&w.jsx("span",{className:M(n,`${O}-cart-item-original-price`),children:ui(e.originalSubtotal,t)}),w.jsx("span",{className:M(n,`${O}-cart-item-final-price`),children:ui(e.itemSubtotal,t)})]}),w.jsx("div",{className:M(n,`${O}-cart-item-footer`),children:w.jsxs("span",{className:M(n,`${O}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},p7=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},m7=({order:e,globalClassName:t})=>{const[n,r]=N.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:T,shippingPromotions:y=[],promotionsDiscount:_,promotions:A=[],couponsDiscount:v,bodyMessage:x,footerMessage:k}=e,I=_x(u,e.couponsApplied);return w.jsxs("div",{className:M(t,`${O}-cart`),children:[w.jsxs("div",{className:M(t,`${O}-cart-banner`),children:[w.jsx("span",{className:M(t,`${O}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(s3,{})}),w.jsx("p",{className:M(t,`${O}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:M(t,`${O}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",p7(a)]})]}),w.jsxs("div",{className:M(t,`${O}-cart-box`),children:[x&&w.jsxs("button",{type:"button",className:M(t,`${O}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[w.jsx("span",{className:M(t,`${O}-cart-summary-text`),children:w.jsx(Do,{text:x,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:M(t,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(dE,{}):w.jsx(fE,{})})]}),n&&w.jsxs("div",{className:M(t,`${O}-cart-expanded`),children:[w.jsx("ul",{className:M(t,`${O}-cart-items`),children:u.map(j=>w.jsx(h7,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),I.length>0&&w.jsx("div",{className:M(t,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:I.map(j=>w.jsx(xc,{code:j.code,globalClassName:t},j.code))}),w.jsxs("div",{className:M(t,`${O}-cart-totals`),children:[w.jsx(Bn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Bn,{label:"Coupon",value:v,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Bn,{label:"Promotions",badge:A[0],value:_,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Bn,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Bn,{label:"Shipping Discount",badge:y[0],value:T,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Bn,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Bn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:M(t,`${O}-cart-footer`),children:k||"Shipping and taxes calculated at checkout."})]})},g7=({image:e,alt:t,globalClassName:n})=>{const[r,s]=N.useState(e.src),[a,u]=N.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:M(n,`${O}-pdp-gallery__image`,{[`${O}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},E7=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(Lp,{className:M(n,`${O}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(Ip,{className:M(n,`${O}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(Op,{index:a,className:M(n,`${O}-pdp-gallery__item`),children:w.jsx(g7,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(Cp,{className:M(n,`${O}-pdp-gallery__control`),children:[w.jsx(Rp,{className:M(n,`${O}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(gw,{size:"16px"})}),w.jsx(Pp,{className:M(n,`${O}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(Ew,{size:"16px"})})]}),r&&w.jsx(kp,{className:M(n,`${O}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(Np,{index:a,className:M(n,`${O}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},y7="color",_c=e=>(e!=null?e:"").toLowerCase()===y7,T7=e=>e.replace(/(^|\/)large\//,"$1medium/"),Ax=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>_c(n.id)&&n.vals.includes(t)),Cx=(e,t)=>{const n=T7(t),r=Wu(e,n);return n===t?{src:r}:{src:r,fallbackSrc:Wu(e,t)}},b7=["hi-res","large","medium","small"],Nx=(e,t)=>{var n;return((n=e.viewType)!=null?n:"").toLowerCase()===t},w7=e=>b7.find(t=>e.some(n=>Nx(n,t))),x7=(e,t,n)=>{var s;const r=[...t?e.filter(a=>Ax(a,t)):[],...e.filter(a=>!a.vattr),...e];for(const a of r){const u=((s=a.imgs)!=null?s:[]).filter(l=>{var d;return((d=l.url)!=null?d:"").trim().length>0}).map(l=>Cx(n,l.url));if(u.length>0)return u}return[]},_7=(e,t)=>{var s;const n=(s=e.imgGroups)!=null?s:[],r=w7(n);if(r){const a=n.filter(l=>Nx(l,r)),u=x7(a,t,e.baseUrl);if(u.length>0)return u}return e.imageUrl?[Cx(e.baseUrl,e.imageUrl)]:[]},S7=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&Ax(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Wu(e.baseUrl,r):""},v7=e=>{const t=e.vattr,n=e.vmat;if(!t||t.length===0||!n||n.length===0)return e;const r=new Set(t.map(f=>f.id)),s=[...new Set(n.flatMap(f=>Object.keys(f.vars)))];if(s.every(f=>r.has(f)))return e;const a={},u=new Set;for(const f of s){if(r.has(f)){a[f]=f,u.add(f);continue}const p=new Set(n.map(T=>T.vars[f]).filter(Boolean));if(p.size===0)continue;const m=t.filter(T=>!u.has(T.id)&&T.opts.length>0&&[...p].every(y=>T.opts.some(_=>_.val===y)));m.length===1&&(a[f]=m[0].id,u.add(m[0].id))}const l=s.filter(f=>!r.has(f)).length;return Object.keys(a).filter(f=>a[f]!==f).length<l?e:fe(F({},e),{vmat:n.map(f=>fe(F({},f),{vars:Object.fromEntries(Object.entries(f.vars).map(([p,m])=>{var T;return[(T=a[p])!=null?T:p,m]}))}))})},Sc=(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})}),A7=(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]}))},C7=(e,t,n,r,s)=>{if(!e||e.length===0)return fe(F({},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 F({},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?F({},u.vars):fe(F({},s),{[n]:r})},kx=(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},N7=(e,t)=>{var a;const n=gc(e.promotions,(a=e.extendedData)==null?void 0:a.productPromotions),r=typeof n=="number"?fe(F({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const s=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([l,d])=>{var f;return((f=u.vars)==null?void 0:f[l])===d}));return s!=null&&s.pr?s.pr:r},rm=e=>{const t=e.filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length!==0)return{min:Math.min(...t),max:Math.max(...t)}},k7=e=>{var y,_,A;if(!((y=e.vmat)!=null&&y.length))return;const t=gc(e.promotions,(_=e.extendedData)==null?void 0:_.productPromotions),n=t===void 0?e.pr:fe(F({},e.pr),{prom:t}),r=e.vmat.filter(v=>v.ord!==!1).map(v=>{var x;return(x=v.pr)!=null?x:n}).filter(v=>v!==void 0);if(r.length===0)return;const s=rm(r.map(v=>v.prom)),a=rm(r.map(v=>v.cur)),u=rm(r.map(v=>v.orig)),l=r.some(v=>typeof v.cur=="number"&&typeof v.orig=="number"&&v.cur<v.orig),d=s!=null?s:a,f=s||l?u:void 0;if(!d)return;const p=d.min!==d.max,m=f&&f.min!==f.max,T=d.min!==((A=n==null?void 0:n.prom)!=null?A:n==null?void 0:n.cur)||f!==void 0&&f.min!==(n==null?void 0:n.orig);if(!(!p&&!m&&!T))return F({active:d},f?{compare:f}:{})},Ox=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Sc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},O7=300,I7=e=>{const{overrides:t,isInitialized:n}=Pi(),r=Ns(),s=n?t.ProductDetailCard:void 0;if(s){const a={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(Ri,{tagName:s,props:a,label:"ProductDetailCard"})}return w.jsx(P7,F({},e))},P7=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var Dt,ft,ht,vt,pt,$e,bt,Gt;const{addToCart:s,sendMessage:a,loading:u}=$t(),l=N.useMemo(()=>v7(e.data),[e.data]),d=(Dt=l.vattr)!=null?Dt:[],[f,p]=N.useState(()=>Ox(l)),[m,T]=N.useState(!1);N.useEffect(()=>{p(Ox(l)),T(!1)},[l,e.id]);const y=A7(l.vmat,f),_=(ht=(ft=l.quantity)==null?void 0:ft.minQuantity)!=null?ht:1,A=(pt=(vt=l.quantity)==null?void 0:vt.maxQuantity)!=null?pt:Number.POSITIVE_INFINITY,v=(bt=($e=l.quantity)==null?void 0:$e.increment)!=null?bt:1,[x,k]=N.useState(_),[I,j]=N.useState(!1),q=N.useRef(!1);N.useEffect(()=>{I&&(u?q.current=!0:q.current&&(q.current=!1,j(!1)))},[I,u]);const R=d.find(Re=>_c(Re.id)),X=d.filter(Re=>!_c(Re.id)),ne=R?f[R.id]:void 0,se=N.useMemo(()=>_7(l,ne),[l,ne]),H=N.useMemo(()=>N7(l,f),[l,f]),re=N.useMemo(()=>k7(l),[l]),V=re?$p(fe(F({},re.active),{currencyCode:l.ccy})):null,ee=re!=null&&re.compare?$p(fe(F({},re.compare),{currencyCode:l.ccy})):null,ae=kx(l,f),[oe,me]=N.useState(x),de=N.useRef(ae),W=de.current===ae?oe:x;N.useEffect(()=>{if(de.current!==ae){de.current=ae,me(x);return}const Re=window.setTimeout(()=>me(x),O7);return()=>window.clearTimeout(Re)},[x,ae]);const le=x===oe,C=N.useMemo(()=>y&&(de.current!==ae||le)?o7(l.expressPaymentUrl,ae,W):null,[l.expressPaymentUrl,ae,W,y,le]),B=N.useCallback(Re=>{a(Re?`I completed express payment. Show my order confirmation for order ${Re}.`:"I completed express payment. Show my order confirmation.")},[a]),Z=(Re,Ke)=>()=>{T(!0),p(ot=>{const Et=!Sc(l.vmat,Re,Ke,ot);return _c(Re)||Et?C7(l.vmat,d,Re,Ke,ot):fe(F({},ot),{[Re]:Ke})})},L=()=>{if(u)return;const Re=kx(l,f);if(!Re)return;const Ke=d.map(ot=>{const Et=ot.opts.find(Sr=>Sr.val===f[ot.id]);return Et?{label:ot.lbl||ot.id,value:Et.name||Et.val}:null}).filter(ot=>ot!==null);j(!0),s({productName:l.name,sku:Re,quantity:x,variants:Ke})},xe=!y||x-v<_,De=!y||x+v>A,he=Re=>{var ot;const Ke=f[Re.id];return(ot=Re.opts.find(Et=>Et.val===Ke))==null?void 0:ot.name},Ne=()=>k(Re=>Math.max(_,Re-v)),Ie=()=>k(Re=>Math.min(A,Re+v)),Ze=Re=>w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__variant-name`),children:Re.lbl||Re.id}),he(Re)&&w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:he(Re)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__chips`),children:Re.opts.map(Ke=>{const ot=Sc(l.vmat,Re.id,Ke.val,f),Et=f[Re.id]===Ke.val;return w.jsxs("label",{className:M(`${O}-msg-pdp__chip`,{selected:Et,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Re.id}`,value:Ke.val,checked:Et,"aria-description":ot?void 0:"unavailable",onChange:Z(Re.id,Ke.val),className:`${O}-msg-pdp__radio-input`}),w.jsx("span",{children:Ke.name||Ke.val})]},Ke.val)})})]},Re.id),gt=Re=>w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__variant-name`),children:Re.lbl||"Color"}),he(Re)&&w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:he(Re)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__swatches`),children:Re.opts.map(Ke=>{const ot=Sc(l.vmat,Re.id,Ke.val,f),Et=f[Re.id]===Ke.val,Sr=S7(l,Ke.val);return Sr?w.jsxs("label",{className:M(`${O}-msg-pdp__swatch`,{selected:Et,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Re.id}`,value:Ke.val,checked:Et,"aria-label":Ke.name||Ke.val,"aria-description":ot?void 0:"unavailable",onChange:Z(Re.id,Ke.val),className:`${O}-msg-pdp__radio-input`}),w.jsx("img",{className:M(t,`${O}-msg-pdp__swatch-image`),src:Sr,alt:Ke.name||Ke.val,loading:"lazy"})]},Ke.val):w.jsxs("label",{className:M(`${O}-msg-pdp__chip`,{selected:Et,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Re.id}`,value:Ke.val,checked:Et,"aria-description":ot?void 0:"unavailable",onChange:Z(Re.id,Ke.val),className:`${O}-msg-pdp__radio-input`}),w.jsx("span",{children:Ke.name||Ke.val})]},Ke.val)})})]});return w.jsx("div",{className:M(t,`${O}-msg-pdp`),children:w.jsxs("div",{className:M(t,`${O}-msg-pdp__card`),children:[w.jsx("div",{className:M(t,`${O}-msg-pdp__gallery`),children:w.jsx(E7,{images:se,altText:l.name,globalClassName:t})}),w.jsxs("div",{className:M(t,`${O}-msg-pdp__content`),children:[l.slugUrl&&!r?w.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:M(t,`${O}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,onClick:Re=>wc({event:Re,openLinksInNewTab:n,isCartMgmtSupported:r}),children:l.name}):w.jsx("p",{className:M(t,`${O}-msg-pdp__title`),children:l.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:!m&&V?w.jsxs("div",{className:M(t,`${O}-price`,`${O}-msg-pdp__price`),style:{fontSize:"14px"},children:[w.jsxs("span",{className:`${O}-visually-hidden`,children:["Current price",V.isRange?" range":"",":"]}),w.jsx("span",{className:M(t,`${O}-price__amount`),children:V.value}),ee&&w.jsxs("span",{className:M(t,`${O}-price__compare`),children:[w.jsxs("span",{className:`${O}-visually-hidden`,children:["Original price",ee.isRange?" range":"",":"]}),ee.value]})]}):w.jsx(zp,{globalClassName:t,className:`${O}-msg-pdp__price`,retailPrice:H==null?void 0:H.orig,discountPrice:(Gt=H==null?void 0:H.prom)!=null?Gt:H==null?void 0:H.cur,currencyCode:l.ccy,fontSize:"14px"})}),l.dscr&&w.jsx("div",{className:M(t,`${O}-msg-pdp__description`),children:w.jsx(Do,{globalClassName:t,text:l.dscr})}),R&>(R),X.map(Ze),r&&w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:x})]}),w.jsxs("div",{className:M(t,`${O}-msg-pdp__stepper`),children:[w.jsx(yr,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(Xk,{}),disabled:xe,onClick:Ne}),w.jsx("span",{className:M(t,`${O}-msg-pdp__quantity`),children:x}),w.jsx(yr,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(Kk,{}),disabled:De,onClick:Ie})]})]}),r&&w.jsxs("div",{className:M(t,`${O}-msg-pdp__actions`),children:[C&&w.jsx(Tx,{expressPaymentUrl:C,globalClassName:t,onOrderComplete:B},C),w.jsx(Kf,{className:`${O}-msg-pdp__add-to-cart`,disabled:!y||u||I,onClick:L,children:I?"Adding...":"Add to cart"})]})]})]})})},R7=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:s}=lt(),{overrides:a,isInitialized:u}=Pi(),l=Ns(),d=u?a.ProductComparison:void 0;if(d){const m={name:"ProductComparison",payload:{products:e,table:t},api:l};return w.jsx(Ri,{tagName:d,props:m,label:"ProductComparison"})}if(!e.length)return null;const f=`auto repeat(${e.length}, 1fr)`,p=`${90+e.length*140}px`;return w.jsx("div",{className:M(n,`${O}-product-comparison`),children:w.jsxs("div",{className:`${O}-product-comparison__grid`,style:{gridTemplateColumns:f,minWidth:p},children:[w.jsxs("div",{className:`${O}-product-comparison__header`,children:[w.jsx("div",{className:`${O}-product-comparison__header-spacer`}),e.map(m=>{var _,A,v,x,k,I,j;const T=m.imageUrl?Wu(m.baseUrl,m.imageUrl):void 0,y=gc(m.promotions,(_=m.extendedData)==null?void 0:_.productPromotions);return w.jsxs("div",{className:M(n,`${O}-product-comparison__product-col`),children:[T&&w.jsx("img",{className:M(n,`${O}-product-comparison__image`),src:T,alt:m.name||"Product image",loading:"eager"}),m.slugUrl&&!s?w.jsx("a",{href:m.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:M(n,`${O}-product-comparison__name`,`${O}-product-comparison__name-link`),"aria-label":`Go to product page for ${m.name}`,onClick:q=>wc({event:q,openLinksInNewTab:r,isCartMgmtSupported:s}),children:m.name}):w.jsx("span",{className:M(n,`${O}-product-comparison__name`),children:m.name}),w.jsx(zp,{globalClassName:n,retailPrice:(x=(A=m.pr)==null?void 0:A.orig)!=null?x:(v=m.pr)==null?void 0:v.cur,discountPrice:(j=y!=null?y:(k=m.pr)==null?void 0:k.prom)!=null?j:(I=m.pr)==null?void 0:I.cur,currencyCode:m.ccy,fontSize:"0.875rem"})]},m.id)})]}),w.jsx("div",{className:`${O}-product-comparison__table`,children:t.map(m=>w.jsxs("div",{className:`${O}-product-comparison__row`,children:[w.jsx("div",{className:M(n,`${O}-product-comparison__row-label`),children:m.row_name}),e.map((T,y)=>w.jsx("div",{className:M(n,`${O}-product-comparison__row-value`),children:m.values[y]},`${m.row_name}-${T.id}`))]},m.row_name))})]})})},L7=({suggestions:e,disabled:t,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:s})=>{const{overrides:a,isInitialized:u}=Pi(),l=Ns(),d=u?a.Suggestions:void 0;if(d){const f={name:"Suggestions",payload:{suggestions:e},api:l};return w.jsx(Ri,{tagName:d,props:f,label:"Suggestions"})}return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(C9,{disabled:t,suggestions:e,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:s})})},Ix=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{loading:a}=$t(),u=yc(),l=qB(),{isCartMgmtSupported:d,logger:f}=lt(),{overrides:p,isInitialized:m}=Pi(),T=Ns(),y=N.useMemo(()=>e.response.flatMap(Sf),[e.response]);return w.jsx(w.Fragment,{children:y.map((_,A)=>{var v,x,k,I,j,q,R,X,ne,se,H,re,V,ee,ae,oe,me,de,W,le,C,B,Z,L,xe,De;switch(_.type){case"markdown":{const he=(x=(v=_.data)==null?void 0:v.content)!=null?x:"";return _.index===bi&&E1(he)?null:w.jsx(Do,{text:he,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${_.type}-${(k=_.index)!=null?k:A}`)}case"product_carousel":return w.jsx(e7,{title:(j=(I=_.data)==null?void 0:I.title)!=null?j:"",products:(R=(q=_.data)==null?void 0:q.products)!=null?R:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(X=_.index)!=null?X:A}`);case"product_tile":return w.jsx(I7,{product:_.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(ne=_.index)!=null?ne:A}`);case"product_comparison":return w.jsx(R7,{products:(H=(se=_.data)==null?void 0:se.products)!=null?H:[],table:(V=(re=_.data)==null?void 0:re.table)!=null?V:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(ee=_.index)!=null?ee:A}`);case"cart":{const he=(me=(oe=(ae=_.data)==null?void 0:ae.cart)==null?void 0:oe.cartSummary)==null?void 0:me.cartDetails;return he?w.jsx(f7,{cart:he,productsToHighlight:_.data.products_to_highlight,readOnly:!l||t!==l,globalClassName:n,openLinksInNewTab:r},`${_.type}-${(de=_.index)!=null?de:A}`):null}case"order_confirmation":{const he=_.data,Ne=(C=(W=he==null?void 0:he.order)==null?void 0:W.orderDetails)!=null?C:(le=he==null?void 0:he.data)==null?void 0:le.orderConfirmation;return Ne?w.jsx(m7,{order:Ne,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(B=_.index)!=null?B:A}`):null}case"tool_results":{const he=_.data,Ne=_.output_name,Ie=m&&Ne&&Object.prototype.hasOwnProperty.call(p,Ne)?p[Ne]:void 0,Ze=typeof Ie=="string"?Ie:void 0;if(!Ze||!Ne)return f!=null&&f.isDevelopment&&(Ne?f.warn(`🦜 tool_results "${Ne}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${Ne}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(p),payload:he}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:he})),null;const gt={name:Ne,payload:he,api:T};return w.jsx(yx,{overrideName:Ne,children:w.jsx(Ri,{tagName:Ze,props:gt,label:`toolResult:${Ne}`})},`${_.type}-${Ne}-${(Z=_.index)!=null?Z:A}`)}case"suggestions":return w.jsx(L7,{disabled:a,suggestions:(xe=(L=_.data)==null?void 0:L.display_text)!=null?xe:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:u},`${_.type}-${(De=_.index)!=null?De:A}`);default:return null}})})};class Px extends N.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){kt(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:M(this.props.globalClassName,`${O}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const D7=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r}=lt();return QN(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:M(t,`${O}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:M(t,`${O}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:M(t,`${O}-user-message-row`,n?"standalone":"embedded"),children:[w.jsx("span",{className:M(t,`${O}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(r3,{})}),w.jsxs("div",{className:M(t,`${O}-user-message-body`,n?"standalone":"embedded"),children:[e.attachmentImageUrl&&w.jsx("img",{src:e.attachmentImageUrl,alt:e.content||"Attachment",className:M(t,`${O}-user-message-image`)}),e.content&&w.jsx("p",{className:M(t,`${O}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})]})})})},M7=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=lt(),a=N.useMemo(()=>{if(typeof e.content!="string")return null;const l=ha(e.content);if(l)return l;const d=al(e.content);return d?{response:[d]}:null},[e.content]),u=N.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=_f(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(D7,{message:e,globalClassName:t,isWidgetStandalone:r});case"agent":return w.jsx("div",{className:M(t,`${O}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${O}-message-group-child`,children:a?w.jsx(Px,{globalClassName:t,children:w.jsx(Ix,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(Do,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:M(t,`${O}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:M(t,`${O}-reset-message`),children:e.content})})}},F7=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:M(n,`${O}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:M(n,`${O}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:M(n,`${O}-retry-button`),onClick:t,children:[w.jsx(u3,{"aria-hidden":"true"})," Retry"]})]}),B7=({globalClassName:e,onClick:t})=>w.jsx("div",{className:M(e,`${O}-jump-to-latest`),children:w.jsx("button",{type:"button",className:M(e,`${O}-jump-to-latest-button`),"aria-label":"Jump to latest message",title:"Jump to latest message",onClick:t,children:w.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:w.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})})})}),U7=`${O}-message-container`,H7=24,j7=100,vc=e=>{const t=e==null?void 0:e.closest(`.${U7}`);return t instanceof HTMLElement?t:null},Rx=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=H7,$7=()=>typeof window!="undefined"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,z7=(e,t)=>!(e!=null&&e.anchorMessageId)||!t.some(n=>n.id===e.anchorMessageId)?null:e,V7=({autoScroll:e,messages:t,streamingBlocks:n,sendError:r,error:s,isOpen:a,scrollSnapshotRef:u})=>{var se,H,re;const l=N.useRef(null),d=N.useRef(null),f=N.useRef(!0),p=N.useRef(!1),m=N.useRef(null),T=N.useRef(!1),y=N.useRef((H=(se=t[t.length-1])==null?void 0:se.id)!=null?H:null),_=N.useRef(null),A=N.useRef(!1),v=N.useRef(t);if(v.current=t,!A.current){A.current=!0;const V=u?z7(u.current,t):null;V&&(f.current=V.shouldStickToBottom,T.current=V.hasSentLiveMessage,V.shouldStickToBottom||(_.current=V.scrollTop))}const x=N.useRef(e);x.current=e;const k=N.useRef(!1);k.current=n.length>0;const I=N.useRef(!1);I.current=((re=t[t.length-1])==null?void 0:re.restored)===!0;const[j,q]=N.useState(!1),R=N.useCallback((V="smooth")=>{var oe;const ee=(oe=d.current)!=null?oe:vc(l.current);if(!ee)return;const ae=V==="smooth"&&$7()?"auto":V;f.current=!0,ae==="smooth"&&(p.current=!0),ee.scrollTo({top:ee.scrollHeight,behavior:ae})},[]),X=N.useCallback(()=>{const V=d.current;if(!V||V.clientHeight===0){V||q(!1);return}q(!Rx(V))},[]),ne=N.useCallback(()=>{const V=d.current;if(!V){f.current=!0,q(!1);return}V.clientHeight!==0&&(f.current=Rx(V),X())},[X]);return N.useLayoutEffect(()=>{const V=_.current;if(V==null)return;const ee=vc(l.current);d.current=ee,ee&&(ee.scrollTop=V,f.current=!1,q(!0))},[]),N.useLayoutEffect(()=>{const V=l.current;return()=>{var oe,me,de,W;if(!u)return;const ee=(oe=d.current)!=null?oe:vc(V),ae=v.current;u.current={scrollTop:(me=ee==null?void 0:ee.scrollTop)!=null?me:0,shouldStickToBottom:f.current,hasSentLiveMessage:T.current,anchorMessageId:(W=(de=ae[ae.length-1])==null?void 0:de.id)!=null?W:null}}},[u]),N.useEffect(()=>{const V=vc(l.current);if(d.current=V,X(),!V)return;const ee=()=>{m.current&&(clearTimeout(m.current),m.current=null)},ae=()=>{ee(),p.current=!1,ne()},oe=()=>{if(!p.current){ne();return}ee(),m.current=setTimeout(ae,j7)},me=()=>{ee(),p.current=!1};V.addEventListener("scroll",oe,{passive:!0}),V.addEventListener("scrollend",ae),V.addEventListener("wheel",me,{passive:!0}),V.addEventListener("touchstart",me,{passive:!0});const de=()=>{if(p.current)return;const C=T.current,B=!C,Z=f.current,L=I.current,xe=x.current,De=k.current;if(Z&&(xe||L||B)){R(De&&C?"smooth":"auto");return}ne()},W=new ResizeObserver(de);W.observe(V),l.current&&W.observe(l.current);const le=new MutationObserver(de);return le.observe(V,{childList:!0,subtree:!0}),()=>{ee(),V.removeEventListener("scroll",oe),V.removeEventListener("scrollend",ae),V.removeEventListener("wheel",me),V.removeEventListener("touchstart",me),W.disconnect(),le.disconnect()}},[R,X,ne]),N.useEffect(()=>{_.current==null&&R("auto")},[R]),N.useEffect(()=>{a&&_.current==null&&R("auto")},[a,R]),N.useEffect(()=>{var B;const V=t[t.length-1],ee=(B=V==null?void 0:V.id)!=null?B:null,ae=ee!==y.current;y.current=ee;const oe=(V==null?void 0:V.restored)===!0,me=(V==null?void 0:V.role)==="user"&&!oe;me&&(T.current=!0);const de=f.current,W=t.length>0,le=!T.current&&W;if(de&&(e||oe||le)){R(oe||le?"auto":"smooth");return}if(ae&&me){R("smooth");return}ne()},[t,e,R,ne]),N.useEffect(()=>{if(e&&f.current){R(T.current?"smooth":"auto");return}ne()},[n,r,s,e,R,ne]),{endRef:l,showJumpToLatest:j,scrollToLatest:R}},q7=4e3,Lx=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,q7),tu="Assistant response available",W7=e=>{if(typeof e!="object"||e===null)return"";const t=e;if(t.type!=="product_carousel"||typeof t.data!="object"||t.data===null)return"";const n=t.data.products;if(!Array.isArray(n))return"";if(n.length===0)return"No products found.";const r=n.map(l=>{if(typeof l!="object"||l===null||Array.isArray(l))return"";const d=l,f=typeof d.data=="object"&&d.data!==null&&!Array.isArray(d.data)?d.data:null,p=typeof(f==null?void 0:f.name)=="string"?f.name.trim():"",m=typeof d.id=="string"?d.id.trim():"";return p||m}).filter(Boolean),s=n.length===1?"1 product found.":`${n.length} products found.`;if(r.length===0)return s;const a=n.length===1?"Product title":"Product titles",u=`${s} ${a}: ${r.join("; ")}`;return/[.!?]$/.test(u)?u:`${u}.`},Y7=e=>{var a,u;if(typeof e!="string")return tu;const t=ha(e),n=t?null:al(e),r=(a=t==null?void 0:t.response)!=null?a:n?[n]:null;if(r)return r.map(d=>d.type==="markdown"?Lx(d.data.content):W7(d)).filter(Boolean).join(" ").trim()||tu;const s=e.trim();try{const l=JSON.parse(s);if(typeof l=="object"&&l!==null)return(u=_f(l))!=null?u:tu}catch(l){if(s.startsWith("{")||s.startsWith("["))return tu}return Lx(e)||tu},G7=({message:e,announcementKey:t})=>{const[n,r]=N.useState("");return N.useEffect(()=>{if(r(""),!e)return;const s=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(s),clearTimeout(a)}},[e,t]),w.jsx("span",{className:`${O}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},X7=()=>{const{messages:e}=$t(),t=[...e].reverse().find(n=>n.role==="agent"&&!n.restored);return w.jsx(G7,{message:t?Y7(t.content):"",announcementKey:t==null?void 0:t.id})},K7="You are offline or we couldn't reach the assistant. Check connection and try again.",im=({isWidgetStandalone:e,isOpen:t,scrollSnapshotRef:n})=>{var ae,oe;const{globalClassName:r,openLinksInNewTab:s,logger:a,autoScroll:u}=lt(),{messages:l,streamingBlocks:d,isAgentTyping:f,loading:p,progressMessage:m,connectionStatus:T,error:y,sendError:_,retryLastMessage:A,retryConnection:v}=$t(),{endRef:x,showJumpToLatest:k,scrollToLatest:I}=V7({autoScroll:u,messages:l,streamingBlocks:d,sendError:_,error:y,isOpen:t,scrollSnapshotRef:n}),j=l.length>0,q=d.some(uN),R=l[l.length-1],X=R?g1(R.content,"suggestions"):!1,ne=j&&(p||f)&&!q&&!X,se=T==="reconnecting"&&!ne,H=T==="error";let re=null;H?re={message:y!=null?y:K7,kind:"connection",onRetry:v}:_&&(re={message:_.message,kind:"send",onRetry:A});const V=(ae=re==null?void 0:re.message)!=null?ae:null,ee=(oe=re==null?void 0:re.kind)!=null?oe:null;return N.useEffect(()=>{V&&(a==null||a.error("Error message shown to user",{message:V,kind:ee}))},[V,ee,a]),w.jsxs(w.Fragment,{children:[w.jsx(X7,{}),p&&!j&&w.jsx(P9,{globalClassName:r,isWidgetStandalone:e}),l.map(me=>w.jsx(M7,{message:me,globalClassName:r,openLinksInNewTab:s,isWidgetStandalone:e},me.id)),re&&w.jsx(F7,{message:re.message,onRetry:re.onRetry,globalClassName:r,isWidgetStandalone:e}),q&&w.jsxs("div",{className:M(r,`${O}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Px,{globalClassName:r,children:w.jsx(Ix,{content:{response:d},globalClassName:r,openLinksInNewTab:s,isWidgetStandalone:e})}),(p||f)&&w.jsx(qp,{globalClassName:r,isWidgetStandalone:e})]}),ne&&w.jsx(qp,{globalClassName:r,isWidgetStandalone:e,loadingText:m}),se&&w.jsx(qp,{globalClassName:r,isWidgetStandalone:e,loadingText:"Reconnecting..."}),k&&w.jsx(B7,{globalClassName:r,onClick:()=>I()}),w.jsx("div",{ref:x,"aria-hidden":"true"})]})},Q7=()=>w.jsxs("svg",{"aria-hidden":"true",className:`${O}-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"})]}),J7=()=>w.jsx("svg",{"aria-hidden":"true",className:`${O}-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"})}),Z7=(e,t)=>e===0?[]:e<0?t:t.slice(-e),sm=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=lt(),s=e!=null?e:r,{overrides:a,isInitialized:u}=Pi(),l=Ns();if(t.length===0||s===0)return null;const d=Z7(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(Ri,{tagName:f,props:p,label:"ProgressSteps"})}return w.jsx("div",{className:M(n,`${O}-progress-steps-panel`),children:w.jsx("div",{className:`${O}-progress-steps`,children:w.jsx("ul",{className:`${O}-progress-steps-list`,children:d.map((p,m)=>{const T=m<d.length-1,y=m===d.length-1;return w.jsxs("li",{className:M(`${O}-progress-step`,y&&"active"),"aria-label":`${p} (${T?"completed":"in progress"})`,children:[y&&w.jsx("span",{className:`${O}-progress-step-arc`}),w.jsx("span",{className:`${O}-progress-step-text`,children:p}),w.jsx("span",{className:M(`${O}-progress-step-icon`,T?"done":"active"),children:T?w.jsx(Q7,{}):w.jsx(J7,{})})]},`${m}-${p}`)})})})})},Dx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=lt(),{isAgentTyping:s,resetConversation:a,endConversation:u,progressSteps:l,downloadTranscript:d}=$t(),f=yc(),p=Vp(),m=s,T=y=>y.file?p(y):f(y.text);return w.jsxs("div",{className:M(e,`${O}-container`,`${O}-embedded-chat`),style:t,children:[w.jsx("div",{className:M(e,`${O}-message-container`,`container-${n}`,"embedded"),role:"region","aria-label":"Conversation",children:w.jsx(im,{isWidgetStandalone:!1})}),w.jsx(sm,{steps:l,globalClassName:e}),w.jsx(Vh,{componentType:"chat",className:"embedded-chat",isLoading:m,onSubmit:T}),w.jsx("div",{className:M(`${O}-embedded-chat-menu`),children:w.jsxs(k8,{componentType:"chat",children:[w.jsx(jw,{componentType:"chat"}),w.jsx(GT,{componentType:"chat",onClearChat:a}),w.jsx(KT,{componentType:"chat",onEndConversation:u}),r&&w.jsx(XT,{componentType:"chat",onDownloadTranscript:d})]})})]})},Mx=e=>{var d;const{children:t,disabled:n}=e,[r,s]=N.useState((d=e.container)==null?void 0:d.current),a=N.useSyncExternalStore(tU,()=>!1,()=>!0),{getRootNode:u}=fc();if(N.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:eU(u);return w.jsx(w.Fragment,{children:N.Children.map(t,f=>io.createPortal(f,l))})},eU=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Ts(n)?n:$r(t).body},tU=()=>()=>{},Fx=({scrollSnapshotRef:e})=>{const{globalClassName:t,themeVariables:n,messageAlignment:r}=lt(),{mode:s,status:a,dialogPosition:u,isDialogFullHeight:l,dialogWidth:d}=Mr(),{loading:f,isAgentTyping:p,resetConversation:m,endConversation:T,progressSteps:y,downloadTranscript:_}=$t(),A=yc(),v=Vp(),{isOpen:x}=a||{},k=!!a.isOpen,I=s==="standalone",j=p||f,q=()=>{ni(!1),Gf()},R=X=>X.file?v(X):A(X.text);return k?w.jsx(Lw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:k,initialFocusEl:Yf,children:w.jsx(Mx,{children:w.jsx(Fp,{className:M(t,`${O}-container`,`${O}-dialog`,u,l&&"full-height"),style:F(F({},n),d&&{width:d}),children:w.jsxs(Dp,{className:M(t,`${O}-dialog-content`,{standalone:I,embedded:!I}),children:[w.jsx(Uw,{componentType:"dialog",onClearChat:m,onEndConversation:T,onClose:q,onDownloadTranscript:_}),w.jsx(Mp,{className:M(t,`${O}-message-container`,`container-${r}`,{standalone:I,embedded:!I}),role:"region","aria-label":"Conversation",children:w.jsx(im,{isWidgetStandalone:I,isOpen:x,scrollSnapshotRef:e})}),w.jsx(sm,{steps:y,globalClassName:t}),w.jsx(Vh,{componentType:"dialog",isLoading:j,onSubmit:R})]})})})}):null},Bx=({scrollSnapshotRef:e})=>{const{globalClassName:t,themeVariables:n,messageAlignment:r}=lt(),{mode:s,status:a,isModalFullscreen:u}=Mr(),{loading:l,isAgentTyping:d,resetConversation:f,endConversation:p,progressSteps:m,downloadTranscript:T}=$t(),y=yc(),_=Vp(),{isOpen:A}=a||{},v=!!a.isOpen,x=s==="standalone",k=d||l,I=({open:R})=>{if(R){ni(!0);return}j()},j=()=>{ni(!1),Gf()},q=R=>R.file?_(R):y(R.text);return v?w.jsx(Lw,{lazyMount:!0,unmountOnExit:!0,open:v,onOpenChange:I,initialFocusEl:Yf,children:w.jsx(Mx,{children:w.jsxs("div",{className:M(t,`${O}-modal-container`),style:n,children:[w.jsx(kw,{className:M(t,`${O}-modal-backdrop`)}),w.jsx(Fp,{className:M(t,`${O}-container`,`${O}-modal`,{fullscreen:u,standalone:x,embedded:!x}),children:w.jsxs(Dp,{className:M(t,`${O}-modal-content`,{standalone:x,embedded:!x}),children:[w.jsx(Uw,{componentType:"modal",onClearChat:f,onEndConversation:p,onClose:j,onDownloadTranscript:T}),w.jsx(Mp,{className:M(t,`${O}-message-container`,`container-${r}`,{standalone:x,embedded:!x}),role:"region","aria-label":"Conversation",children:w.jsx(im,{isWidgetStandalone:x,isOpen:A,scrollSnapshotRef:e})}),w.jsx(sm,{steps:m,globalClassName:t}),w.jsx(Vh,{componentType:"modal",isLoading:k,onSubmit:q})]})})]})})}):null},nU=()=>{const e=Mr(),t=N.useRef(null),{status:{type:n,isMinimized:r}}=e||{status:{}};return r?w.jsx(e3,{}):n==="dialog"?w.jsx(Fx,{scrollSnapshotRef:t}):n==="modal"?w.jsx(Bx,{scrollSnapshotRef:t}):w.jsx(Dx,{})},rU=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=b9();N.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 h9(a),()=>{p9(a)}},[e,t,n,r,s])},Ux=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function iU({isReady:e,hasError:t,transmit:n}){const r=N.useRef([]),s=N.useRef(e);s.current=e;const a=N.useRef(n);a.current=n;const u=N.useCallback((l,d)=>{s.current?Ux(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return N.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>Ux(a.current,d,f))}},[e]),N.useEffect(()=>{t&&(r.current=[])},[t]),u}const Hx={copilot:"Ask Copilot",messaging:"Ask a question"},sU=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=lt(),{placeholder:s,isResponseLoading:a}=mc(),u=s||Hx[r],[l,d]=N.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return w.jsxs("form",{className:M(n,`${O}-prompts-input-container`),name:`${O}-prompts-form`,onSubmit:p,children:[w.jsx("label",{htmlFor:`${O}-prompts-input`,"aria-label":u,children:w.jsx(Ap,{className:M(n,`${O}-prompts-input-icon`)})}),w.jsx("input",{id:`${O}-prompts-input`,className:M(n,`${O}-prompts-input`),name:`${O}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),w.jsx(yr,{className:M(n,`${O}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Xf,{}),disabled:f})]})},oU=()=>{const{globalClassName:e,mode:t}=lt(),{placeholder:n}=mc(),r=n||Hx[t];return w.jsxs("div",{className:M(e,`${O}-prompts-header`),children:[w.jsx(Ap,{className:M(e,`${O}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:M(e,`${O}-prompts-header-text`),children:r})]})},jx=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=lt(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:M(r,`${O}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(Hw,{icon:a,className:`${O}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},aU="Ask me something else",uU=({label:e,disabled:t=!1})=>w.jsx(jx,{label:e||aU,disabled:t,onClick:()=>ni(!0)}),lU=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=lt(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=mc();if(!(r!=null&&r.length))return null;const u=l=>()=>{const d=l.trim();d&&e(d)};return w.jsxs("div",{className:M(n,`${O}-prompts-button-group`),children:[r.map(l=>w.jsx(jx,{label:l,disabled:t,onClick:u(l)},l)),!a&&w.jsx(uU,{label:s,disabled:t})]})},cU=()=>{const{globalClassName:e,themeVariables:t,enablePageContext:n}=lt(),{isOpen:r,elementId:s,promptsDisplay:a}=mc(),{isConnected:u,sessionExpired:l,sendMessage:d,connectionStatus:f}=$t(),{productId:p}=jp(),m=a!=="buttons",T=a!=="input",[y,_]=N.useState(null),A=f==="error",v=f==="connecting",x=k1(u,l),k=iU({isReady:x,hasError:A,transmit:d});N.useEffect(()=>{if(!s||y)return;const j=document.getElementById(s);j&&_(j)},[s,y]);const I=N.useCallback(j=>{if(ni(!0),n){k(j);return}const{prompt:q,display:R}=Pf(j,p);if(R&&R.length>0){k(q,{displayContent:R});return}k(q)},[k,p,n]);return!r||!y?null:io.createPortal(w.jsxs("div",{className:M(e,`${O}-prompts-extension-container`),style:t,children:[m&&w.jsx(sU,{onSubmit:I,disabled:A}),!m&&w.jsx(oU,{}),T&&w.jsx(lU,{onPromptClick:I,disabled:A}),!A&&v&&w.jsx("p",{className:M(e,`${O}-prompts-connecting-message`),children:"Connecting to agent..."}),A&&w.jsx("p",{className:M(e,`${O}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),y)},dU=()=>(rU(),w.jsx(cU,{})),$x=e=>w.jsxs(Z1,fe(F({},e),{children:[w.jsx(nU,{}),w.jsx(dU,{})]}));function zx(e,t){return ke(this,null,function*(){return R1().sendMessage(e,t)})}const fU={components:{setEntryType:tf,toggleWidgetOpen:ni,toggleWidgetMinimized:Xs,toggleModalFullscreen:nf,setWidgetType:Xu,setWidgetDialogPosition:rf,loadPromptsComponent:E9,togglePromptsExtensionOpen:Bw},session:{resetConversation:y9,endConversation:T9,sendMessage:zx},pageContext:{set:L1,get:Rf,clear:D1}};var Ac={},Vx;function hU(){if(Vx)return Ac;Vx=1;var e=iE();return Ac.createRoot=e.createRoot,Ac.hydrateRoot=e.hydrateRoot,Ac}var pU=hU();const qx=new WeakMap,Wx=(e,t,n,r)=>{var a;(a=qx.get(e))==null||a.unmount();const s=pU.createRoot(e);qx.set(e,s),s.render(w.jsx($x,fe(F({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},mU=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 T of p)if(T.type==="childList"&&T.addedNodes.length)for(const y of T.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(kt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),Wx(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),kt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},gU=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=vn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){kt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){kt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){kt(!0,"warn","Container element not found for id:",t),kt(!0,"warn","Beginning observation for element"),mU(F({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Wx(l,s,n,r)};function EU(){return ke(this,null,function*(){return R1().getAuthLinkKey()})}class yU extends HTMLElement{constructor(){super(...arguments);Xe(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}Fe.AgentForceWidget=$x,Fe.AgentforceWidgetProvider=Z1,Fe.CIMULATE_WIDGET_READY_EVENT=bg,Fe.MessagingDialog=Fx,Fe.MessagingEmbed=Dx,Fe.MessagingModal=Bx,Fe.MessagingProvider=F1,Fe.OverrideElement=yU,Fe.clearPageContext=D1,Fe.eventHandlers=fU,Fe.getAuthLinkKey=EU,Fe.getPageContext=Rf,Fe.injectMessagingWidget=gU,Fe.sendMessage=zx,Fe.setPageContext=L1,Fe.useMessaging=$t,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
|
|
52
|
+
`))}function d(y,_,A,v){const x=A.enter("tableCell"),k=A.enter("phrasing"),I=A.containerPhrasing(y,fe(F({},v),{before:a,after:a}));return k(),x(),I}function f(y,_){return EF(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,A){const v=y.children;let x=-1;const k=[],I=_.enter("table");for(;++x<v.length;)k[x]=m(v[x],_,A);return I(),k}function m(y,_,A){const v=y.children;let x=-1;const k=[],I=_.enter("tableRow");for(;++x<v.length;)k[x]=d(v[x],y,_,A);return I(),k}function T(y,_,A){let v=ox.inlineCode(y,_,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function iB(){return{exit:{taskListCheckValueChecked:ux,taskListCheckValueUnchecked:ux,paragraph:oB}}}function sB(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:aB}}}function ux(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function oB(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 aB(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=ox.listItem(e,t,n,F(F({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function uB(){return[H9(),aF(),dF(),QF(),iB()]}function lB(e){return{extensions:[j9(),uF(e),fF(),rB(e),sB()]}}const cB={tokenize:gB,partial:!0},lx={tokenize:EB,partial:!0},cx={tokenize:yB,partial:!0},dx={tokenize:TB,partial:!0},dB={tokenize:bB,partial:!0},fx={name:"wwwAutolink",tokenize:pB,previous:px},hx={name:"protocolAutolink",tokenize:mB,previous:mx},li={name:"emailAutolink",tokenize:hB,previous:gx},Xr={};function fB(){return{text:Xr}}let Cs=48;for(;Cs<123;)Xr[Cs]=li,Cs++,Cs===58?Cs=65:Cs===91&&(Cs=97);Xr[43]=li,Xr[45]=li,Xr[46]=li,Xr[95]=li,Xr[72]=[li,hx],Xr[104]=[li,hx],Xr[87]=[li,fx],Xr[119]=[li,fx];function hB(e,t,n){const r=this;let s,a;return u;function u(m){return!Jp(m)||!gx.call(r,r.previous)||Zp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Jp(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(dB,p,f)(m):m===45||m===95||yn(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&&Cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function pB(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!px.call(r,r.previous)||Zp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cB,e.attempt(lx,e.attempt(cx,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function mB(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&mx.call(r,r.previous)&&!Zp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Cn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="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||_l(m)||_t(m)||ds(m)||Sl(m)?n(m):e.attempt(lx,e.attempt(cx,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function gB(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 EB(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(dx,d,l)(f):f===null||_t(f)||ds(f)||f!==45&&Sl(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 yB(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(dx,t,a)(u):u===null||_t(u)||ds(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function TB(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||_t(l)||ds(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||_t(l)||ds(l)?t(l):r(l)}function a(l){return Cn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Cn(l)?(e.consume(l),u):n(l)}}function bB(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return yn(a)?n(a):t(a)}}function px(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_t(e)}function mx(e){return!Cn(e)}function gx(e){return!(e===47||Jp(e))}function Jp(e){return e===43||e===45||e===46||e===95||yn(e)}function Zp(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 wB={tokenize:kB,partial:!0};function xB(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:AB,continuation:{tokenize:CB},exit:NB}},text:{91:{name:"gfmFootnoteCall",tokenize:vB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_B,resolveTo:SB}}}}function _B(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=Tr(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 SB(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 vB(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||_t(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(Tr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return _t(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 AB(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!l||_===null||_===91||_t(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=Tr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return _t(_)||(l=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),at(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function CB(e,t,n){return e.check(Aa,t,e.attempt(wB,t,n))}function NB(e){e.exit("gfmFootnoteDefinition")}function kB(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 OB(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)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Gn(T,T.length,0,vl(y,u.slice(f+1,d),l)),Gn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Gn(u,f-1,d-f+3,T),d=f+T.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 T;function T(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const A=uo(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),x=uo(_);return v._open=!x||x===2&&!!A,v._close=!A||A===2&&!!x,l(_)}}}class IB{constructor(){this.map=[]}add(t,n,r){PB(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 PB(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 RB(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 LB(){return{flow:{null:{name:"table",tokenize:DB,resolveAll:MB}}}}function DB(e,t,n){const r=this;let s=0,a=0,u;return l;function l(H){let re=r.events.length-1;for(;re>-1;){const ae=r.events[re][1].type;if(ae==="lineEnding"||ae==="linePrefix")re--;else break}const V=re>-1?r.events[re][1].type:null,ee=V==="tableHead"||V==="tableRow"?R:d;return ee===R&&r.parser.lazy[r.now().line]?n(H):ee(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):rt(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||_t(H)?(e.exit("data"),p(H)):(e.consume(H),H===92?T:m)}function T(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,rt(H)?at(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):_(H))}function _(H){return H===45||H===58?v(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),A):q(H)}function A(H){return rt(H)?at(e,v,"whitespace")(H):v(H)}function v(H){return H===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),x):H===45?(a+=1,x(H)):H===null||Ve(H)?j(H):q(H)}function x(H){return H===45?(e.enter("tableDelimiterFiller"),k(H)):q(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 rt(H)?at(e,j,"whitespace")(H):j(H)}function j(H){return H===124?_(H):H===null||Ve(H)?!u||s!==a?q(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):q(H)}function q(H){return n(H)}function R(H){return e.enter("tableRow"),X(H)}function X(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),X):H===null||Ve(H)?(e.exit("tableRow"),t(H)):rt(H)?at(e,X,"whitespace")(H):(e.enter("data"),ne(H))}function ne(H){return H===null||H===124||_t(H)?(e.exit("data"),X(H)):(e.consume(H),H===92?se:ne)}function se(H){return H===92||H===124?(e.consume(H),ne):ne(H)}}function MB(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 T=new IB;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(l=!1,d!==0&&(Ex(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.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({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=bc(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=bc(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(l=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=bc(T,t,a,s,n,m)):u[1]!==0&&(m=bc(T,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Ex(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=RB(t.events,n))}return e}function bc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Lo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Lo(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=Lo(t.events,n[2]),p=Lo(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 T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},Lo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Ex(e,t,n,r,s){const a=[],u=Lo(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 Lo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const FB={name:"tasklistCheck",tokenize:UB};function BB(){return{text:{91:FB}}}function UB(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 _t(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):rt(d)?e.check({tokenize:HB},t,n)(d):n(d)}}function HB(e,t,n){return at(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function jB(e){return WE([fB(),xB(),OB(e),LB(),BB()])}const $B={};function zB(e){const t=this,n=e||$B,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(jB(n)),a.push(uB()),u.push(lB(n))}const VB=()=>w.jsx("span",{className:`${O}-blinking-cursor`,children:w.jsx("svg",{"aria-hidden":"true",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"})})}),Do=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(Fy,{remarkPlugins:[zB],rehypePlugins:[BT],components:{h1:({children:s})=>w.jsx("h1",{className:M(e,`${O}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:M(e,`${O}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:M(e,`${O}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:M(e,`${O}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:M(e,`${O}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:M(e,`${O}-li`),children:s}),a:({href:s,children:a})=>w.jsx(qT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:M(e,`${O}-table-container`),children:w.jsx("table",{className:M(e,`${O}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:M(e,`${O}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:M(e,`${O}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:M(e,`${O}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:M(e,`${O}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:M(e,`${O}-td`),children:s}),span:({className:s,children:a})=>s===`${O}-blinking-cursor`?w.jsx(VB,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${O}-blinking-cursor'></span>`:"")});function qB(){const{messages:e}=$t();return N.useMemo(()=>aN(e,"cart"),[e])}const Pi=()=>N.useContext(J1),Ns=()=>{const{sendMessage:e,loading:t,isConnected:n}=$t(),{mode:r,status:s}=Mr();return N.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function WB(e){return e.includes("-")&&e===e.toLowerCase()}function Ri({tagName:e,props:t,label:n}){const r=N.useRef(null),s=N.useRef(null),a=N.useRef(e),u=N.useRef(null);return N.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!WB(e)){u.current!==e&&(u.current=e,kt(!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){kt(!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){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),N.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class yx extends N.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){kt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function YB(e){return dt({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 GB="(max-width: 576px)";function XB(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function wc({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||XB(e)&&typeof window!="undefined"&&window.matchMedia(GB).matches&&(Xs(!0),F2())}const KB=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=$t();return w.jsx("div",{className:M(t,`${O}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:M(t,`${O}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:M(t,`${O}-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,onClick:f=>wc({event:f,openLinksInNewTab:s,isCartMgmtSupported:n}),children:w.jsx("img",{className:M(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:M(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:M(t,`${O}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(YB,{"aria-hidden":"true"})})})},QB=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=$t();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:M(t,`${O}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:M(t,`${O}-msg-product-card__title-link`),"aria-label":a,onClick:d=>wc({event:d,openLinksInNewTab:s,isCartMgmtSupported:n}),children:e}):w.jsx("p",{className:M(t,`${O}-msg-product-card__title`),children:e})},JB=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=lt(),{overrides:u,isInitialized:l}=Pi(),{sendMessage:d,loading:f}=$t(),p=Ns(),m=l?u.ProductTile:void 0;if(m){const H={name:"ProductTile",payload:s!=null?s:{},api:p};return w.jsx(Ri,{tagName:m,props:H,label:"ProductTile"})}const{id:T,name:y,imageUrl:_,description:A,productPageUrl:v,price:x,priceBreakdown:k,discountPrice:I,listPrice:j,currencyCode:q}=e,R=I!=null?I:x,X=v9({priceBreakdown:k,currencyCode:q}),ne=()=>{if(f)return;const H=y||"this product",re=T?` [SKU: ${T}]`:"";d(`Show me details for ${H}${re}`)},se=r?`View details for ${y}`:`Go to product page for ${y}`;return w.jsxs("div",{className:M(t,`${O}-msg-product-card`),children:[w.jsx(KB,{imageUrl:_||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:se,name:y,showInWidgetDetails:ne}),w.jsxs("div",{className:M(t,`${O}-msg-product-card__content`),children:[w.jsxs("div",{className:M(t,`${O}-msg-product-card__content-header`),children:[w.jsx(QB,{name:y||T,globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:se,showInWidgetDetails:ne}),a&&A&&w.jsx("div",{className:M(t,`${O}-msg-product-card__description`),title:A,children:w.jsx(Do,{globalClassName:t,text:A})})]}),w.jsx("div",{className:M(t,`${O}-msg-product-card__price-row`),children:X?w.jsx("span",{className:M(t,`${O}-msg-product-card__price`),"aria-label":`Price from ${X.low} to ${X.high}`,children:X.range}):w.jsx(zp,{globalClassName:t,retailPrice:j,discountPrice:R,currencyCode:q})})]})]})},ZB=e=>{var n,r,s;const t=gc(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);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:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(s=e.data.priceBreakdown)!=null?s:void 0,currencyCode:e.data.currencyCode}},e7=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=lt(),{overrides:l,isInitialized:d}=Pi(),f=Ns(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(Ri,{tagName:p,props:m,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:M(n,`${O}-product-carousel-title`),children:e}),w.jsx(Y8,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>w.jsxs("div",{className:M(n,`${O}-product-carousel-item`),children:[w.jsx(JB,{product:ZB(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:M(n,`${O}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},em=44,t7=400,n7=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?em:Math.min(Math.max(Math.round(t),em),t7)},r7=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},i7="parentOrigin",s7=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(i7,t),n.toString()}catch(n){return e}},o7=(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}},Tx=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=N.useRef(null),[s,a]=N.useState(!1),[u,l]=N.useState(em),d=typeof window!="undefined"?window.location.origin:"",f=s7(e,d),p=r7(e);return N.useEffect(()=>{const m=T=>{var _,A,v;if(p&&T.origin!==p||r.current&&T.source!==r.current.contentWindow)return;const y=T.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(n7((_=y.payload)==null?void 0:_.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((v=(A=y.payload)==null?void 0:A.orderId)!=null?v:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),w.jsx("div",{className:M(t,`${O}-cart-express`,{[`${O}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:M(t,`${O}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},xc=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:M(t,`${O}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(hE,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Bn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")f=ui(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:M(s,`${O}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:M(s,`${O}-cart-total-label`),children:[e,t&&w.jsx("span",{className:M(s,`${O}-cart-total-badge`),children:t})]}),w.jsx("span",{className:M(s,`${O}-cart-total-value`),children:d?w.jsx("span",{className:M(s,`${O}-cart-total-shimmer`)}):f})]})};function bx(e){var a;const n=((a=e.variants)!=null?a:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",s=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${s}`}function wx(e){var r;const n=((r=e.variants)!=null?r:[]).filter(s=>s.value).map(s=>s.value).join(", ");return n?`${e.name} (${n})`:e.name}function tm(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function nm(e){return(e!=null?e:[]).map(tm).filter(t=>t!==null)}function xx(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function a7(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=tm(a),l=xx(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=tm(a);if(u===null)continue;const l=(s=xx(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function _x(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>nm(s.coupons)).map(s=>s.toLowerCase()));return a7(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const Sx=e=>{const{sendMessage:t}=$t();return{removeItem:a=>{e||t(`Remove ${bx(a)} from my cart`,{displayContent:`Remove ${wx(a)} from cart`})},changeItemQuantity:(a,u)=>{e||u<1||t(`Update ${bx(a)} quantity to ${u}`,{displayContent:`Update ${wx(a)} to qty ${u}`})},applyCoupon:a=>{const u=a.trim();!u||e||t(`Apply coupon code ${u}`)}}},u7=e=>{const t=F({},e);return delete t.checkoutButtonUrl,delete t.expressPaymentUrl,t},l7=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const[s,a]=N.useState(e.toString());N.useEffect(()=>{a(e.toString())},[e]);const u=f=>{if(t)return;const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!t&&!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return w.jsx("div",{className:M(n,`${O}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:M(n,`${O}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},c7=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:s,onQuantityChange:a})=>{var d,f;const u=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,l=nm(e.coupons);return w.jsxs("li",{className:M(r,`${O}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(r,`${O}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(r,`${O}-cart-item-details`),children:[w.jsx("p",{className:M(r,`${O}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(r,`${O}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(p=>w.jsxs("p",{className:M(r,`${O}-cart-item-attr`),children:[p.lbl,": ",p.value]},`${p.type}-${p.value}`)),((f=e.promotions)!=null?f:[]).map(p=>w.jsxs("p",{className:M(r,`${O}-cart-item-attr`),children:["Promotion: ",p]},p))]}),l.length>0&&w.jsx("div",{className:M(r,`${O}-cart-chips`),children:l.map(p=>w.jsx(xc,{code:p,globalClassName:r},p))}),w.jsxs("span",{className:M(r,`${O}-cart-item-price`),children:[u&&w.jsx("span",{className:M(r,`${O}-cart-item-original-price`),children:ui(e.originalSubtotal,t)}),w.jsx("span",{className:M(r,`${O}-cart-item-final-price`),children:ui(e.itemSubtotal,t)})]}),w.jsxs("div",{className:M(r,`${O}-cart-item-footer`),children:[w.jsx("span",{className:M(r,`${O}-cart-qty-heading`),children:"Quantity"}),w.jsx(l7,{quantity:e.quantity,disabled:n,globalClassName:r,onChange:p=>a(e,p)}),w.jsx("button",{type:"button",className:M(r,`${O}-cart-item-remove`),disabled:n,onClick:()=>s(e),children:"Remove"})]})]})]})},vx=({expressPaymentUrl:e,checkoutButtonUrl:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s}=$t(),a=u=>{s(u?`I completed express payment. Show my order confirmation for order ${u}.`:"I completed express payment. Show my order confirmation.")};return w.jsxs(w.Fragment,{children:[e&&w.jsx(Tx,{expressPaymentUrl:e,globalClassName:n,onOrderComplete:a}),t&&w.jsxs("a",{className:M(n,`${O}-cart-checkout-button`),href:t,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(n3,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]})]})},d7=({cartOverrideTag:e,cart:t,productsToHighlight:n,readOnly:r,globalClassName:s,openLinksInNewTab:a})=>{const{loading:u,isConnected:l}=$t(),{mode:d,status:f}=Mr(),p=u||!!r,{removeItem:m,changeItemQuantity:T,applyCoupon:y}=Sx(p),_=x=>t.items.find(k=>k.itemId===x),A={isConnected:l,isLoading:u,componentType:f.type,mode:d,cart:{setQuantity:(x,k)=>{var R,X;const I=_(x);if(!I)return;const j=Math.max(1,(R=I.minQuantity)!=null?R:1),q=(X=I.maxQuantity)!=null?X:1/0;T(I,Math.min(q,Math.max(j,Math.floor(k))))},remove:x=>{const k=_(x);k&&m(k)},applyCoupon:y}},v={name:"Cart",payload:{cart:u7(t),productsToHighlight:n,readOnly:r},api:A};return w.jsxs("div",{className:M(s,`${O}-cart`),children:[w.jsx(yx,{overrideName:"Cart",children:w.jsx(Ri,{tagName:e,props:v,label:"Cart"})}),w.jsx(vx,{expressPaymentUrl:t.expressPaymentUrl,checkoutButtonUrl:t.checkoutButtonUrl,globalClassName:s,openLinksInNewTab:a})]})},f7=({cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:s})=>{const{loading:a}=$t(),[u,l]=N.useState(!1),[d,f]=N.useState(""),{overrides:p,isInitialized:m}=Pi(),T=m?p.Cart:void 0,y=a||!!n,{removeItem:_,changeItemQuantity:A,applyCoupon:v}=Sx(y);if(T)return w.jsx(d7,{cartOverrideTag:T,cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:s});const{items:x=[],currencyCode:k="USD",subtotal:I,total:j,taxes:q,shippingCost:R,shippingDiscount:X,shippingPromotions:ne=[],promotionsDiscount:se,promotions:H=[],couponsDiscount:re,bodyMessage:V,footerMessage:ee,checkoutButtonUrl:ae,expressPaymentUrl:oe}=e,me=_x(x,e.couponsApplied,e.coupons),de=()=>{const W=d.trim();!W||y||(v(W),f(""))};return w.jsxs("div",{className:M(r,`${O}-cart`,y&&`${O}-cart-busy`),children:[w.jsxs("div",{className:M(r,`${O}-cart-box`),children:[V&&w.jsxs("button",{type:"button",className:M(r,`${O}-cart-summary`),"aria-expanded":u,onClick:()=>l(W=>!W),children:[w.jsx("span",{className:M(r,`${O}-cart-summary-text`),children:w.jsx(Do,{text:V,globalClassName:r,openLinksInNewTab:s,showIsLoading:!1})}),w.jsx("span",{className:M(r,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:u?w.jsx(dE,{}):w.jsx(fE,{})})]}),u&&w.jsxs("div",{className:M(r,`${O}-cart-expanded`),children:[w.jsxs("div",{className:M(r,`${O}-cart-items-section`),children:[w.jsx("ul",{className:M(r,`${O}-cart-items`),children:x.map(W=>w.jsx(c7,{item:W,currencyCode:k,disabled:y,globalClassName:r,onRemove:_,onQuantityChange:A},W.itemId))}),me.length>0&&w.jsx("div",{className:M(r,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:me.map(W=>w.jsx(xc,{code:W.code,inactive:!W.applied,globalClassName:r},W.code))})]}),w.jsxs("div",{className:M(r,`${O}-cart-totals`),children:[w.jsx(Bn,{label:"Subtotal",value:I,currencyCode:k,globalClassName:r,loading:!1}),w.jsx(Bn,{label:"Coupon",value:re,currencyCode:k,globalClassName:r,isDiscount:!0,loading:!1}),w.jsx(Bn,{label:"Promotions",badge:H[0],value:se,currencyCode:k,globalClassName:r,isDiscount:!0,loading:!1}),w.jsx(Bn,{label:"Shipping",value:R,currencyCode:k,globalClassName:r,fallback:"TBD",loading:!1}),w.jsx(Bn,{label:"Shipping Discount",badge:ne[0],value:X,currencyCode:k,globalClassName:r,isDiscount:!0,loading:!1}),w.jsx(Bn,{label:"Tax",value:q,currencyCode:k,globalClassName:r,fallback:"TBD",loading:!1}),w.jsx(Bn,{label:"Total",value:j,currencyCode:k,globalClassName:r,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:M(r,`${O}-cart-coupon`),children:[w.jsxs("div",{className:M(r,`${O}-cart-coupon-field`),children:[w.jsx("span",{className:M(r,`${O}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(hE,{})}),w.jsx("input",{type:"text",className:M(r,`${O}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:y,onChange:W=>f(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),de())}})]}),w.jsx("button",{type:"button",className:M(r,`${O}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!d.trim(),onClick:de,children:w.jsx(i3,{"aria-hidden":"true"})})]}),w.jsx(vx,{expressPaymentUrl:oe,checkoutButtonUrl:ae,globalClassName:r,openLinksInNewTab:s}),w.jsx("p",{className:M(r,`${O}-cart-footer`),children:ee||"Shipping and taxes calculated at checkout."})]})},h7=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=nm(e.coupons);return w.jsxs("li",{className:M(n,`${O}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:M(n,`${O}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:M(n,`${O}-cart-item-details`),children:[w.jsx("p",{className:M(n,`${O}-cart-item-name`),children:e.name}),w.jsxs("div",{className:M(n,`${O}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:M(n,`${O}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:M(n,`${O}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:M(n,`${O}-cart-chips`),children:s.map(l=>w.jsx(xc,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:M(n,`${O}-cart-item-price`),children:[r&&w.jsx("span",{className:M(n,`${O}-cart-item-original-price`),children:ui(e.originalSubtotal,t)}),w.jsx("span",{className:M(n,`${O}-cart-item-final-price`),children:ui(e.itemSubtotal,t)})]}),w.jsx("div",{className:M(n,`${O}-cart-item-footer`),children:w.jsxs("span",{className:M(n,`${O}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},p7=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},m7=({order:e,globalClassName:t})=>{const[n,r]=N.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:T,shippingPromotions:y=[],promotionsDiscount:_,promotions:A=[],couponsDiscount:v,bodyMessage:x,footerMessage:k}=e,I=_x(u,e.couponsApplied);return w.jsxs("div",{className:M(t,`${O}-cart`),children:[w.jsxs("div",{className:M(t,`${O}-cart-banner`),children:[w.jsx("span",{className:M(t,`${O}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(s3,{})}),w.jsx("p",{className:M(t,`${O}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:M(t,`${O}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",p7(a)]})]}),w.jsxs("div",{className:M(t,`${O}-cart-box`),children:[x&&w.jsxs("button",{type:"button",className:M(t,`${O}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[w.jsx("span",{className:M(t,`${O}-cart-summary-text`),children:w.jsx(Do,{text:x,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:M(t,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(dE,{}):w.jsx(fE,{})})]}),n&&w.jsxs("div",{className:M(t,`${O}-cart-expanded`),children:[w.jsx("ul",{className:M(t,`${O}-cart-items`),children:u.map(j=>w.jsx(h7,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),I.length>0&&w.jsx("div",{className:M(t,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:I.map(j=>w.jsx(xc,{code:j.code,globalClassName:t},j.code))}),w.jsxs("div",{className:M(t,`${O}-cart-totals`),children:[w.jsx(Bn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Bn,{label:"Coupon",value:v,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Bn,{label:"Promotions",badge:A[0],value:_,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Bn,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Bn,{label:"Shipping Discount",badge:y[0],value:T,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Bn,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Bn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:M(t,`${O}-cart-footer`),children:k||"Shipping and taxes calculated at checkout."})]})},g7=({image:e,alt:t,globalClassName:n})=>{const[r,s]=N.useState(e.src),[a,u]=N.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:M(n,`${O}-pdp-gallery__image`,{[`${O}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},E7=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(Lp,{className:M(n,`${O}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(Ip,{className:M(n,`${O}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(Op,{index:a,className:M(n,`${O}-pdp-gallery__item`),children:w.jsx(g7,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(Cp,{className:M(n,`${O}-pdp-gallery__control`),children:[w.jsx(Rp,{className:M(n,`${O}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(gw,{size:"16px"})}),w.jsx(Pp,{className:M(n,`${O}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(Ew,{size:"16px"})})]}),r&&w.jsx(kp,{className:M(n,`${O}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(Np,{index:a,className:M(n,`${O}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},y7="color",_c=e=>(e!=null?e:"").toLowerCase()===y7,T7=e=>e.replace(/(^|\/)large\//,"$1medium/"),Ax=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>_c(n.id)&&n.vals.includes(t)),Cx=(e,t)=>{const n=T7(t),r=Wu(e,n);return n===t?{src:r}:{src:r,fallbackSrc:Wu(e,t)}},b7=["hi-res","large","medium","small"],Nx=(e,t)=>{var n;return((n=e.viewType)!=null?n:"").toLowerCase()===t},w7=e=>b7.find(t=>e.some(n=>Nx(n,t))),x7=(e,t,n)=>{var s;const r=[...t?e.filter(a=>Ax(a,t)):[],...e.filter(a=>!a.vattr),...e];for(const a of r){const u=((s=a.imgs)!=null?s:[]).filter(l=>{var d;return((d=l.url)!=null?d:"").trim().length>0}).map(l=>Cx(n,l.url));if(u.length>0)return u}return[]},_7=(e,t)=>{var s;const n=(s=e.imgGroups)!=null?s:[],r=w7(n);if(r){const a=n.filter(l=>Nx(l,r)),u=x7(a,t,e.baseUrl);if(u.length>0)return u}return e.imageUrl?[Cx(e.baseUrl,e.imageUrl)]:[]},S7=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&Ax(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Wu(e.baseUrl,r):""},v7=e=>{const t=e.vattr,n=e.vmat;if(!t||t.length===0||!n||n.length===0)return e;const r=new Set(t.map(f=>f.id)),s=[...new Set(n.flatMap(f=>Object.keys(f.vars)))];if(s.every(f=>r.has(f)))return e;const a={},u=new Set;for(const f of s){if(r.has(f)){a[f]=f,u.add(f);continue}const p=new Set(n.map(T=>T.vars[f]).filter(Boolean));if(p.size===0)continue;const m=t.filter(T=>!u.has(T.id)&&T.opts.length>0&&[...p].every(y=>T.opts.some(_=>_.val===y)));m.length===1&&(a[f]=m[0].id,u.add(m[0].id))}const l=s.filter(f=>!r.has(f)).length;return Object.keys(a).filter(f=>a[f]!==f).length<l?e:fe(F({},e),{vmat:n.map(f=>fe(F({},f),{vars:Object.fromEntries(Object.entries(f.vars).map(([p,m])=>{var T;return[(T=a[p])!=null?T:p,m]}))}))})},Sc=(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})}),A7=(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]}))},C7=(e,t,n,r,s)=>{if(!e||e.length===0)return fe(F({},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 F({},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?F({},u.vars):fe(F({},s),{[n]:r})},kx=(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},N7=(e,t)=>{var a;const n=gc(e.promotions,(a=e.extendedData)==null?void 0:a.productPromotions),r=typeof n=="number"?fe(F({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const s=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([l,d])=>{var f;return((f=u.vars)==null?void 0:f[l])===d}));return s!=null&&s.pr?s.pr:r},rm=e=>{const t=e.filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length!==0)return{min:Math.min(...t),max:Math.max(...t)}},k7=e=>{var y,_,A;if(!((y=e.vmat)!=null&&y.length))return;const t=gc(e.promotions,(_=e.extendedData)==null?void 0:_.productPromotions),n=t===void 0?e.pr:fe(F({},e.pr),{prom:t}),r=e.vmat.filter(v=>v.ord!==!1).map(v=>{var x;return(x=v.pr)!=null?x:n}).filter(v=>v!==void 0);if(r.length===0)return;const s=rm(r.map(v=>v.prom)),a=rm(r.map(v=>v.cur)),u=rm(r.map(v=>v.orig)),l=r.some(v=>typeof v.cur=="number"&&typeof v.orig=="number"&&v.cur<v.orig),d=s!=null?s:a,f=s||l?u:void 0;if(!d)return;const p=d.min!==d.max,m=f&&f.min!==f.max,T=d.min!==((A=n==null?void 0:n.prom)!=null?A:n==null?void 0:n.cur)||f!==void 0&&f.min!==(n==null?void 0:n.orig);if(!(!p&&!m&&!T))return F({active:d},f?{compare:f}:{})},Ox=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Sc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},O7=300,I7=e=>{const{overrides:t,isInitialized:n}=Pi(),r=Ns(),s=n?t.ProductDetailCard:void 0;if(s){const a={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(Ri,{tagName:s,props:a,label:"ProductDetailCard"})}return w.jsx(P7,F({},e))},P7=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var Dt,ft,ht,vt,pt,$e,bt,Gt;const{addToCart:s,sendMessage:a,loading:u}=$t(),l=N.useMemo(()=>v7(e.data),[e.data]),d=(Dt=l.vattr)!=null?Dt:[],[f,p]=N.useState(()=>Ox(l)),[m,T]=N.useState(!1);N.useEffect(()=>{p(Ox(l)),T(!1)},[l,e.id]);const y=A7(l.vmat,f),_=(ht=(ft=l.quantity)==null?void 0:ft.minQuantity)!=null?ht:1,A=(pt=(vt=l.quantity)==null?void 0:vt.maxQuantity)!=null?pt:Number.POSITIVE_INFINITY,v=(bt=($e=l.quantity)==null?void 0:$e.increment)!=null?bt:1,[x,k]=N.useState(_),[I,j]=N.useState(!1),q=N.useRef(!1);N.useEffect(()=>{I&&(u?q.current=!0:q.current&&(q.current=!1,j(!1)))},[I,u]);const R=d.find(Re=>_c(Re.id)),X=d.filter(Re=>!_c(Re.id)),ne=R?f[R.id]:void 0,se=N.useMemo(()=>_7(l,ne),[l,ne]),H=N.useMemo(()=>N7(l,f),[l,f]),re=N.useMemo(()=>k7(l),[l]),V=re?$p(fe(F({},re.active),{currencyCode:l.ccy})):null,ee=re!=null&&re.compare?$p(fe(F({},re.compare),{currencyCode:l.ccy})):null,ae=kx(l,f),[oe,me]=N.useState(x),de=N.useRef(ae),W=de.current===ae?oe:x;N.useEffect(()=>{if(de.current!==ae){de.current=ae,me(x);return}const Re=window.setTimeout(()=>me(x),O7);return()=>window.clearTimeout(Re)},[x,ae]);const le=x===oe,C=N.useMemo(()=>y&&(de.current!==ae||le)?o7(l.expressPaymentUrl,ae,W):null,[l.expressPaymentUrl,ae,W,y,le]),B=N.useCallback(Re=>{a(Re?`I completed express payment. Show my order confirmation for order ${Re}.`:"I completed express payment. Show my order confirmation.")},[a]),Z=(Re,Ke)=>()=>{T(!0),p(ot=>{const Et=!Sc(l.vmat,Re,Ke,ot);return _c(Re)||Et?C7(l.vmat,d,Re,Ke,ot):fe(F({},ot),{[Re]:Ke})})},L=()=>{if(u)return;const Re=kx(l,f);if(!Re)return;const Ke=d.map(ot=>{const Et=ot.opts.find(Sr=>Sr.val===f[ot.id]);return Et?{label:ot.lbl||ot.id,value:Et.name||Et.val}:null}).filter(ot=>ot!==null);j(!0),s({productName:l.name,sku:Re,quantity:x,variants:Ke})},xe=!y||x-v<_,De=!y||x+v>A,he=Re=>{var ot;const Ke=f[Re.id];return(ot=Re.opts.find(Et=>Et.val===Ke))==null?void 0:ot.name},Ne=()=>k(Re=>Math.max(_,Re-v)),Ie=()=>k(Re=>Math.min(A,Re+v)),Ze=Re=>w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__variant-name`),children:Re.lbl||Re.id}),he(Re)&&w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:he(Re)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__chips`),children:Re.opts.map(Ke=>{const ot=Sc(l.vmat,Re.id,Ke.val,f),Et=f[Re.id]===Ke.val;return w.jsxs("label",{className:M(`${O}-msg-pdp__chip`,{selected:Et,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Re.id}`,value:Ke.val,checked:Et,"aria-description":ot?void 0:"unavailable",onChange:Z(Re.id,Ke.val),className:`${O}-msg-pdp__radio-input`}),w.jsx("span",{children:Ke.name||Ke.val})]},Ke.val)})})]},Re.id),gt=Re=>w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__variant-name`),children:Re.lbl||"Color"}),he(Re)&&w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:he(Re)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Re.id}`,className:M(t,`${O}-msg-pdp__swatches`),children:Re.opts.map(Ke=>{const ot=Sc(l.vmat,Re.id,Ke.val,f),Et=f[Re.id]===Ke.val,Sr=S7(l,Ke.val);return Sr?w.jsxs("label",{className:M(`${O}-msg-pdp__swatch`,{selected:Et,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Re.id}`,value:Ke.val,checked:Et,"aria-label":Ke.name||Ke.val,"aria-description":ot?void 0:"unavailable",onChange:Z(Re.id,Ke.val),className:`${O}-msg-pdp__radio-input`}),w.jsx("img",{className:M(t,`${O}-msg-pdp__swatch-image`),src:Sr,alt:Ke.name||Ke.val,loading:"lazy"})]},Ke.val):w.jsxs("label",{className:M(`${O}-msg-pdp__chip`,{selected:Et,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Re.id}`,value:Ke.val,checked:Et,"aria-description":ot?void 0:"unavailable",onChange:Z(Re.id,Ke.val),className:`${O}-msg-pdp__radio-input`}),w.jsx("span",{children:Ke.name||Ke.val})]},Ke.val)})})]});return w.jsx("div",{className:M(t,`${O}-msg-pdp`),children:w.jsxs("div",{className:M(t,`${O}-msg-pdp__card`),children:[w.jsx("div",{className:M(t,`${O}-msg-pdp__gallery`),children:w.jsx(E7,{images:se,altText:l.name,globalClassName:t})}),w.jsxs("div",{className:M(t,`${O}-msg-pdp__content`),children:[l.slugUrl&&!r?w.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:M(t,`${O}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,onClick:Re=>wc({event:Re,openLinksInNewTab:n,isCartMgmtSupported:r}),children:l.name}):w.jsx("p",{className:M(t,`${O}-msg-pdp__title`),children:l.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:!m&&V?w.jsxs("div",{className:M(t,`${O}-price`,`${O}-msg-pdp__price`),style:{fontSize:"14px"},children:[w.jsxs("span",{className:`${O}-visually-hidden`,children:["Current price",V.isRange?" range":"",":"]}),w.jsx("span",{className:M(t,`${O}-price__amount`),children:V.value}),ee&&w.jsxs("span",{className:M(t,`${O}-price__compare`),children:[w.jsxs("span",{className:`${O}-visually-hidden`,children:["Original price",ee.isRange?" range":"",":"]}),ee.value]})]}):w.jsx(zp,{globalClassName:t,className:`${O}-msg-pdp__price`,retailPrice:H==null?void 0:H.orig,discountPrice:(Gt=H==null?void 0:H.prom)!=null?Gt:H==null?void 0:H.cur,currencyCode:l.ccy,fontSize:"14px"})}),l.dscr&&w.jsx("div",{className:M(t,`${O}-msg-pdp__description`),children:w.jsx(Do,{globalClassName:t,text:l.dscr})}),R&>(R),X.map(Ze),r&&w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[w.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:x})]}),w.jsxs("div",{className:M(t,`${O}-msg-pdp__stepper`),children:[w.jsx(yr,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(Xk,{}),disabled:xe,onClick:Ne}),w.jsx("span",{className:M(t,`${O}-msg-pdp__quantity`),children:x}),w.jsx(yr,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(Kk,{}),disabled:De,onClick:Ie})]})]}),r&&w.jsxs("div",{className:M(t,`${O}-msg-pdp__actions`),children:[C&&w.jsx(Tx,{expressPaymentUrl:C,globalClassName:t,onOrderComplete:B},C),w.jsx(Kf,{className:`${O}-msg-pdp__add-to-cart`,disabled:!y||u||I,onClick:L,children:I?"Adding...":"Add to cart"})]})]})]})})},R7=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:s}=lt(),{overrides:a,isInitialized:u}=Pi(),l=Ns(),d=u?a.ProductComparison:void 0;if(d){const m={name:"ProductComparison",payload:{products:e,table:t},api:l};return w.jsx(Ri,{tagName:d,props:m,label:"ProductComparison"})}if(!e.length)return null;const f=`auto repeat(${e.length}, 1fr)`,p=`${90+e.length*140}px`;return w.jsx("div",{className:M(n,`${O}-product-comparison`),children:w.jsxs("div",{className:`${O}-product-comparison__grid`,style:{gridTemplateColumns:f,minWidth:p},children:[w.jsxs("div",{className:`${O}-product-comparison__header`,children:[w.jsx("div",{className:`${O}-product-comparison__header-spacer`}),e.map(m=>{var _,A,v,x,k,I,j;const T=m.imageUrl?Wu(m.baseUrl,m.imageUrl):void 0,y=gc(m.promotions,(_=m.extendedData)==null?void 0:_.productPromotions);return w.jsxs("div",{className:M(n,`${O}-product-comparison__product-col`),children:[T&&w.jsx("img",{className:M(n,`${O}-product-comparison__image`),src:T,alt:m.name||"Product image",loading:"eager"}),m.slugUrl&&!s?w.jsx("a",{href:m.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:M(n,`${O}-product-comparison__name`,`${O}-product-comparison__name-link`),"aria-label":`Go to product page for ${m.name}`,onClick:q=>wc({event:q,openLinksInNewTab:r,isCartMgmtSupported:s}),children:m.name}):w.jsx("span",{className:M(n,`${O}-product-comparison__name`),children:m.name}),w.jsx(zp,{globalClassName:n,retailPrice:(x=(A=m.pr)==null?void 0:A.orig)!=null?x:(v=m.pr)==null?void 0:v.cur,discountPrice:(j=y!=null?y:(k=m.pr)==null?void 0:k.prom)!=null?j:(I=m.pr)==null?void 0:I.cur,currencyCode:m.ccy,fontSize:"0.875rem"})]},m.id)})]}),w.jsx("div",{className:`${O}-product-comparison__table`,children:t.map(m=>w.jsxs("div",{className:`${O}-product-comparison__row`,children:[w.jsx("div",{className:M(n,`${O}-product-comparison__row-label`),children:m.row_name}),e.map((T,y)=>w.jsx("div",{className:M(n,`${O}-product-comparison__row-value`),children:m.values[y]},`${m.row_name}-${T.id}`))]},m.row_name))})]})})},L7=({suggestions:e,disabled:t,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:s})=>{const{overrides:a,isInitialized:u}=Pi(),l=Ns(),d=u?a.Suggestions:void 0;if(d){const f={name:"Suggestions",payload:{suggestions:e},api:l};return w.jsx(Ri,{tagName:d,props:f,label:"Suggestions"})}return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(C9,{disabled:t,suggestions:e,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:s})})},Ix=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{loading:a}=$t(),u=yc(),l=qB(),{isCartMgmtSupported:d,logger:f}=lt(),{overrides:p,isInitialized:m}=Pi(),T=Ns(),y=N.useMemo(()=>e.response.flatMap(Sf),[e.response]);return w.jsx(w.Fragment,{children:y.map((_,A)=>{var v,x,k,I,j,q,R,X,ne,se,H,re,V,ee,ae,oe,me,de,W,le,C,B,Z,L,xe,De;switch(_.type){case"markdown":{const he=(x=(v=_.data)==null?void 0:v.content)!=null?x:"";return _.index===bi&&E1(he)?null:w.jsx(Do,{text:he,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${_.type}-${(k=_.index)!=null?k:A}`)}case"product_carousel":return w.jsx(e7,{title:(j=(I=_.data)==null?void 0:I.title)!=null?j:"",products:(R=(q=_.data)==null?void 0:q.products)!=null?R:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(X=_.index)!=null?X:A}`);case"product_tile":return w.jsx(I7,{product:_.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${_.type}-${(ne=_.index)!=null?ne:A}`);case"product_comparison":return w.jsx(R7,{products:(H=(se=_.data)==null?void 0:se.products)!=null?H:[],table:(V=(re=_.data)==null?void 0:re.table)!=null?V:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(ee=_.index)!=null?ee:A}`);case"cart":{const he=(me=(oe=(ae=_.data)==null?void 0:ae.cart)==null?void 0:oe.cartSummary)==null?void 0:me.cartDetails;return he?w.jsx(f7,{cart:he,productsToHighlight:_.data.products_to_highlight,readOnly:!l||t!==l,globalClassName:n,openLinksInNewTab:r},`${_.type}-${(de=_.index)!=null?de:A}`):null}case"order_confirmation":{const he=_.data,Ne=(C=(W=he==null?void 0:he.order)==null?void 0:W.orderDetails)!=null?C:(le=he==null?void 0:he.data)==null?void 0:le.orderConfirmation;return Ne?w.jsx(m7,{order:Ne,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${_.type}-${(B=_.index)!=null?B:A}`):null}case"tool_results":{const he=_.data,Ne=_.output_name,Ie=m&&Ne&&Object.prototype.hasOwnProperty.call(p,Ne)?p[Ne]:void 0,Ze=typeof Ie=="string"?Ie:void 0;if(!Ze||!Ne)return f!=null&&f.isDevelopment&&(Ne?f.warn(`🦜 tool_results "${Ne}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${Ne}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(p),payload:he}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:he})),null;const gt={name:Ne,payload:he,api:T};return w.jsx(yx,{overrideName:Ne,children:w.jsx(Ri,{tagName:Ze,props:gt,label:`toolResult:${Ne}`})},`${_.type}-${Ne}-${(Z=_.index)!=null?Z:A}`)}case"suggestions":return w.jsx(L7,{disabled:a,suggestions:(xe=(L=_.data)==null?void 0:L.display_text)!=null?xe:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:u},`${_.type}-${(De=_.index)!=null?De:A}`);default:return null}})})};class Px extends N.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){kt(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:M(this.props.globalClassName,`${O}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const D7=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r}=lt();return QN(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:M(t,`${O}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:M(t,`${O}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:M(t,`${O}-user-message-row`,n?"standalone":"embedded"),children:[w.jsx("span",{className:M(t,`${O}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(r3,{})}),w.jsxs("div",{className:M(t,`${O}-user-message-body`,n?"standalone":"embedded"),children:[e.attachmentImageUrl&&w.jsx("img",{src:e.attachmentImageUrl,alt:e.content||"Attachment",className:M(t,`${O}-user-message-image`)}),e.content&&w.jsx("p",{className:M(t,`${O}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})]})})})};function M7(e){switch(e==null?void 0:e.toLowerCase()){case"chatbot":return"chatbot";case"agent":return"human-agent";default:return null}}const F7=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{var l;const{logger:s}=lt(),a=N.useMemo(()=>{if(typeof e.content!="string")return null;const d=ha(e.content);if(d)return d;const f=al(e.content);return f?{response:[f]}:null},[e.content]),u=N.useMemo(()=>{var p;const d="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),d;const f=e.content.trim();try{const m=JSON.parse(f);if(typeof m=="object"&&m!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),(p=_f(m))!=null?p:d}catch(m){if(f.startsWith("{")||f.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),d}return e.content||d},[s,e.content]);switch(e.role){case"user":return w.jsx(D7,{message:e,globalClassName:t,isWidgetStandalone:r});case"agent":return w.jsx("div",{className:M(t,`${O}-message-group`,M7((l=e.sender)==null?void 0:l.role),r?"standalone":"embedded"),children:w.jsx("div",{className:`${O}-message-group-child`,children:a?w.jsx(Px,{globalClassName:t,children:w.jsx(Ix,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(Do,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:M(t,`${O}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:M(t,`${O}-reset-message`),children:e.content})})}},B7=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:M(n,`${O}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:M(n,`${O}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:M(n,`${O}-retry-button`),onClick:t,children:[w.jsx(u3,{"aria-hidden":"true"})," Retry"]})]}),U7=({globalClassName:e,onClick:t})=>w.jsx("div",{className:M(e,`${O}-jump-to-latest`),children:w.jsx("button",{type:"button",className:M(e,`${O}-jump-to-latest-button`),"aria-label":"Jump to latest message",title:"Jump to latest message",onClick:t,children:w.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",children:w.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})})})}),H7=`${O}-message-container`,j7=24,$7=100,vc=e=>{const t=e==null?void 0:e.closest(`.${H7}`);return t instanceof HTMLElement?t:null},Rx=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=j7,z7=()=>typeof window!="undefined"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,V7=(e,t)=>!(e!=null&&e.anchorMessageId)||!t.some(n=>n.id===e.anchorMessageId)?null:e,q7=({autoScroll:e,messages:t,streamingBlocks:n,sendError:r,error:s,isOpen:a,scrollSnapshotRef:u})=>{var se,H,re;const l=N.useRef(null),d=N.useRef(null),f=N.useRef(!0),p=N.useRef(!1),m=N.useRef(null),T=N.useRef(!1),y=N.useRef((H=(se=t[t.length-1])==null?void 0:se.id)!=null?H:null),_=N.useRef(null),A=N.useRef(!1),v=N.useRef(t);if(v.current=t,!A.current){A.current=!0;const V=u?V7(u.current,t):null;V&&(f.current=V.shouldStickToBottom,T.current=V.hasSentLiveMessage,V.shouldStickToBottom||(_.current=V.scrollTop))}const x=N.useRef(e);x.current=e;const k=N.useRef(!1);k.current=n.length>0;const I=N.useRef(!1);I.current=((re=t[t.length-1])==null?void 0:re.restored)===!0;const[j,q]=N.useState(!1),R=N.useCallback((V="smooth")=>{var oe;const ee=(oe=d.current)!=null?oe:vc(l.current);if(!ee)return;const ae=V==="smooth"&&z7()?"auto":V;f.current=!0,ae==="smooth"&&(p.current=!0),ee.scrollTo({top:ee.scrollHeight,behavior:ae})},[]),X=N.useCallback(()=>{const V=d.current;if(!V||V.clientHeight===0){V||q(!1);return}q(!Rx(V))},[]),ne=N.useCallback(()=>{const V=d.current;if(!V){f.current=!0,q(!1);return}V.clientHeight!==0&&(f.current=Rx(V),X())},[X]);return N.useLayoutEffect(()=>{const V=_.current;if(V==null)return;const ee=vc(l.current);d.current=ee,ee&&(ee.scrollTop=V,f.current=!1,q(!0))},[]),N.useLayoutEffect(()=>{const V=l.current;return()=>{var oe,me,de,W;if(!u)return;const ee=(oe=d.current)!=null?oe:vc(V),ae=v.current;u.current={scrollTop:(me=ee==null?void 0:ee.scrollTop)!=null?me:0,shouldStickToBottom:f.current,hasSentLiveMessage:T.current,anchorMessageId:(W=(de=ae[ae.length-1])==null?void 0:de.id)!=null?W:null}}},[u]),N.useEffect(()=>{const V=vc(l.current);if(d.current=V,X(),!V)return;const ee=()=>{m.current&&(clearTimeout(m.current),m.current=null)},ae=()=>{ee(),p.current=!1,ne()},oe=()=>{if(!p.current){ne();return}ee(),m.current=setTimeout(ae,$7)},me=()=>{ee(),p.current=!1};V.addEventListener("scroll",oe,{passive:!0}),V.addEventListener("scrollend",ae),V.addEventListener("wheel",me,{passive:!0}),V.addEventListener("touchstart",me,{passive:!0});const de=()=>{if(p.current)return;const C=T.current,B=!C,Z=f.current,L=I.current,xe=x.current,De=k.current;if(Z&&(xe||L||B)){R(De&&C?"smooth":"auto");return}ne()},W=new ResizeObserver(de);W.observe(V),l.current&&W.observe(l.current);const le=new MutationObserver(de);return le.observe(V,{childList:!0,subtree:!0}),()=>{ee(),V.removeEventListener("scroll",oe),V.removeEventListener("scrollend",ae),V.removeEventListener("wheel",me),V.removeEventListener("touchstart",me),W.disconnect(),le.disconnect()}},[R,X,ne]),N.useEffect(()=>{_.current==null&&R("auto")},[R]),N.useEffect(()=>{a&&_.current==null&&R("auto")},[a,R]),N.useEffect(()=>{var B;const V=t[t.length-1],ee=(B=V==null?void 0:V.id)!=null?B:null,ae=ee!==y.current;y.current=ee;const oe=(V==null?void 0:V.restored)===!0,me=(V==null?void 0:V.role)==="user"&&!oe;me&&(T.current=!0);const de=f.current,W=t.length>0,le=!T.current&&W;if(de&&(e||oe||le)){R(oe||le?"auto":"smooth");return}if(ae&&me){R("smooth");return}ne()},[t,e,R,ne]),N.useEffect(()=>{if(e&&f.current){R(T.current?"smooth":"auto");return}ne()},[n,r,s,e,R,ne]),{endRef:l,showJumpToLatest:j,scrollToLatest:R}},W7=4e3,Lx=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,W7),tu="Assistant response available",Y7=e=>{if(typeof e!="object"||e===null)return"";const t=e;if(t.type!=="product_carousel"||typeof t.data!="object"||t.data===null)return"";const n=t.data.products;if(!Array.isArray(n))return"";if(n.length===0)return"No products found.";const r=n.map(l=>{if(typeof l!="object"||l===null||Array.isArray(l))return"";const d=l,f=typeof d.data=="object"&&d.data!==null&&!Array.isArray(d.data)?d.data:null,p=typeof(f==null?void 0:f.name)=="string"?f.name.trim():"",m=typeof d.id=="string"?d.id.trim():"";return p||m}).filter(Boolean),s=n.length===1?"1 product found.":`${n.length} products found.`;if(r.length===0)return s;const a=n.length===1?"Product title":"Product titles",u=`${s} ${a}: ${r.join("; ")}`;return/[.!?]$/.test(u)?u:`${u}.`},G7=e=>{var a,u;if(typeof e!="string")return tu;const t=ha(e),n=t?null:al(e),r=(a=t==null?void 0:t.response)!=null?a:n?[n]:null;if(r)return r.map(d=>d.type==="markdown"?Lx(d.data.content):Y7(d)).filter(Boolean).join(" ").trim()||tu;const s=e.trim();try{const l=JSON.parse(s);if(typeof l=="object"&&l!==null)return(u=_f(l))!=null?u:tu}catch(l){if(s.startsWith("{")||s.startsWith("["))return tu}return Lx(e)||tu},X7=({message:e,announcementKey:t})=>{const[n,r]=N.useState("");return N.useEffect(()=>{if(r(""),!e)return;const s=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(s),clearTimeout(a)}},[e,t]),w.jsx("span",{className:`${O}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},K7=()=>{const{messages:e}=$t(),t=[...e].reverse().find(n=>n.role==="agent"&&!n.restored);return w.jsx(X7,{message:t?G7(t.content):"",announcementKey:t==null?void 0:t.id})},Q7="You are offline or we couldn't reach the assistant. Check connection and try again.",im=({isWidgetStandalone:e,isOpen:t,scrollSnapshotRef:n})=>{var ae,oe;const{globalClassName:r,openLinksInNewTab:s,logger:a,autoScroll:u}=lt(),{messages:l,streamingBlocks:d,isAgentTyping:f,loading:p,progressMessage:m,connectionStatus:T,error:y,sendError:_,retryLastMessage:A,retryConnection:v}=$t(),{endRef:x,showJumpToLatest:k,scrollToLatest:I}=q7({autoScroll:u,messages:l,streamingBlocks:d,sendError:_,error:y,isOpen:t,scrollSnapshotRef:n}),j=l.length>0,q=d.some(uN),R=l[l.length-1],X=R?g1(R.content,"suggestions"):!1,ne=j&&(p||f)&&!q&&!X,se=T==="reconnecting"&&!ne,H=T==="error";let re=null;H?re={message:y!=null?y:Q7,kind:"connection",onRetry:v}:_&&(re={message:_.message,kind:"send",onRetry:A});const V=(ae=re==null?void 0:re.message)!=null?ae:null,ee=(oe=re==null?void 0:re.kind)!=null?oe:null;return N.useEffect(()=>{V&&(a==null||a.error("Error message shown to user",{message:V,kind:ee}))},[V,ee,a]),w.jsxs(w.Fragment,{children:[w.jsx(K7,{}),p&&!j&&w.jsx(P9,{globalClassName:r,isWidgetStandalone:e}),l.map(me=>w.jsx(F7,{message:me,globalClassName:r,openLinksInNewTab:s,isWidgetStandalone:e},me.id)),re&&w.jsx(B7,{message:re.message,onRetry:re.onRetry,globalClassName:r,isWidgetStandalone:e}),q&&w.jsxs("div",{className:M(r,`${O}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Px,{globalClassName:r,children:w.jsx(Ix,{content:{response:d},globalClassName:r,openLinksInNewTab:s,isWidgetStandalone:e})}),(p||f)&&w.jsx(qp,{globalClassName:r,isWidgetStandalone:e})]}),ne&&w.jsx(qp,{globalClassName:r,isWidgetStandalone:e,loadingText:m}),se&&w.jsx(qp,{globalClassName:r,isWidgetStandalone:e,loadingText:"Reconnecting..."}),k&&w.jsx(U7,{globalClassName:r,onClick:()=>I()}),w.jsx("div",{ref:x,"aria-hidden":"true"})]})},J7=()=>w.jsxs("svg",{"aria-hidden":"true",className:`${O}-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"})]}),Z7=()=>w.jsx("svg",{"aria-hidden":"true",className:`${O}-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"})}),eU=(e,t)=>e===0?[]:e<0?t:t.slice(-e),sm=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=lt(),s=e!=null?e:r,{overrides:a,isInitialized:u}=Pi(),l=Ns();if(t.length===0||s===0)return null;const d=eU(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(Ri,{tagName:f,props:p,label:"ProgressSteps"})}return w.jsx("div",{className:M(n,`${O}-progress-steps-panel`),children:w.jsx("div",{className:`${O}-progress-steps`,children:w.jsx("ul",{className:`${O}-progress-steps-list`,children:d.map((p,m)=>{const T=m<d.length-1,y=m===d.length-1;return w.jsxs("li",{className:M(`${O}-progress-step`,y&&"active"),"aria-label":`${p} (${T?"completed":"in progress"})`,children:[y&&w.jsx("span",{className:`${O}-progress-step-arc`}),w.jsx("span",{className:`${O}-progress-step-text`,children:p}),w.jsx("span",{className:M(`${O}-progress-step-icon`,T?"done":"active"),children:T?w.jsx(J7,{}):w.jsx(Z7,{})})]},`${m}-${p}`)})})})})},Dx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=lt(),{isAgentTyping:s,resetConversation:a,endConversation:u,progressSteps:l,downloadTranscript:d}=$t(),f=yc(),p=Vp(),m=s,T=y=>y.file?p(y):f(y.text);return w.jsxs("div",{className:M(e,`${O}-container`,`${O}-embedded-chat`),style:t,children:[w.jsx("div",{className:M(e,`${O}-message-container`,`container-${n}`,"embedded"),role:"region","aria-label":"Conversation",children:w.jsx(im,{isWidgetStandalone:!1})}),w.jsx(sm,{steps:l,globalClassName:e}),w.jsx(Vh,{componentType:"chat",className:"embedded-chat",isLoading:m,onSubmit:T}),w.jsx("div",{className:M(`${O}-embedded-chat-menu`),children:w.jsxs(k8,{componentType:"chat",children:[w.jsx(jw,{componentType:"chat"}),w.jsx(GT,{componentType:"chat",onClearChat:a}),w.jsx(KT,{componentType:"chat",onEndConversation:u}),r&&w.jsx(XT,{componentType:"chat",onDownloadTranscript:d})]})})]})},Mx=e=>{var d;const{children:t,disabled:n}=e,[r,s]=N.useState((d=e.container)==null?void 0:d.current),a=N.useSyncExternalStore(nU,()=>!1,()=>!0),{getRootNode:u}=fc();if(N.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:tU(u);return w.jsx(w.Fragment,{children:N.Children.map(t,f=>io.createPortal(f,l))})},tU=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Ts(n)?n:$r(t).body},nU=()=>()=>{},Fx=({scrollSnapshotRef:e})=>{const{globalClassName:t,themeVariables:n,messageAlignment:r}=lt(),{mode:s,status:a,dialogPosition:u,isDialogFullHeight:l,dialogWidth:d}=Mr(),{loading:f,isAgentTyping:p,resetConversation:m,endConversation:T,progressSteps:y,downloadTranscript:_}=$t(),A=yc(),v=Vp(),{isOpen:x}=a||{},k=!!a.isOpen,I=s==="standalone",j=p||f,q=()=>{ni(!1),Gf()},R=X=>X.file?v(X):A(X.text);return k?w.jsx(Lw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:k,initialFocusEl:Yf,children:w.jsx(Mx,{children:w.jsx(Fp,{className:M(t,`${O}-container`,`${O}-dialog`,u,l&&"full-height"),style:F(F({},n),d&&{width:d}),children:w.jsxs(Dp,{className:M(t,`${O}-dialog-content`,{standalone:I,embedded:!I}),children:[w.jsx(Uw,{componentType:"dialog",onClearChat:m,onEndConversation:T,onClose:q,onDownloadTranscript:_}),w.jsx(Mp,{className:M(t,`${O}-message-container`,`container-${r}`,{standalone:I,embedded:!I}),role:"region","aria-label":"Conversation",children:w.jsx(im,{isWidgetStandalone:I,isOpen:x,scrollSnapshotRef:e})}),w.jsx(sm,{steps:y,globalClassName:t}),w.jsx(Vh,{componentType:"dialog",isLoading:j,onSubmit:R})]})})})}):null},Bx=({scrollSnapshotRef:e})=>{const{globalClassName:t,themeVariables:n,messageAlignment:r}=lt(),{mode:s,status:a,isModalFullscreen:u}=Mr(),{loading:l,isAgentTyping:d,resetConversation:f,endConversation:p,progressSteps:m,downloadTranscript:T}=$t(),y=yc(),_=Vp(),{isOpen:A}=a||{},v=!!a.isOpen,x=s==="standalone",k=d||l,I=({open:R})=>{if(R){ni(!0);return}j()},j=()=>{ni(!1),Gf()},q=R=>R.file?_(R):y(R.text);return v?w.jsx(Lw,{lazyMount:!0,unmountOnExit:!0,open:v,onOpenChange:I,initialFocusEl:Yf,children:w.jsx(Mx,{children:w.jsxs("div",{className:M(t,`${O}-modal-container`),style:n,children:[w.jsx(kw,{className:M(t,`${O}-modal-backdrop`)}),w.jsx(Fp,{className:M(t,`${O}-container`,`${O}-modal`,{fullscreen:u,standalone:x,embedded:!x}),children:w.jsxs(Dp,{className:M(t,`${O}-modal-content`,{standalone:x,embedded:!x}),children:[w.jsx(Uw,{componentType:"modal",onClearChat:f,onEndConversation:p,onClose:j,onDownloadTranscript:T}),w.jsx(Mp,{className:M(t,`${O}-message-container`,`container-${r}`,{standalone:x,embedded:!x}),role:"region","aria-label":"Conversation",children:w.jsx(im,{isWidgetStandalone:x,isOpen:A,scrollSnapshotRef:e})}),w.jsx(sm,{steps:m,globalClassName:t}),w.jsx(Vh,{componentType:"modal",isLoading:k,onSubmit:q})]})})]})})}):null},rU=()=>{const e=Mr(),t=N.useRef(null),{status:{type:n,isMinimized:r}}=e||{status:{}};return r?w.jsx(e3,{}):n==="dialog"?w.jsx(Fx,{scrollSnapshotRef:t}):n==="modal"?w.jsx(Bx,{scrollSnapshotRef:t}):w.jsx(Dx,{})},iU=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=b9();N.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 h9(a),()=>{p9(a)}},[e,t,n,r,s])},Ux=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function sU({isReady:e,hasError:t,transmit:n}){const r=N.useRef([]),s=N.useRef(e);s.current=e;const a=N.useRef(n);a.current=n;const u=N.useCallback((l,d)=>{s.current?Ux(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return N.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>Ux(a.current,d,f))}},[e]),N.useEffect(()=>{t&&(r.current=[])},[t]),u}const Hx={copilot:"Ask Copilot",messaging:"Ask a question"},oU=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=lt(),{placeholder:s,isResponseLoading:a}=mc(),u=s||Hx[r],[l,d]=N.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return w.jsxs("form",{className:M(n,`${O}-prompts-input-container`),name:`${O}-prompts-form`,onSubmit:p,children:[w.jsx("label",{htmlFor:`${O}-prompts-input`,"aria-label":u,children:w.jsx(Ap,{className:M(n,`${O}-prompts-input-icon`)})}),w.jsx("input",{id:`${O}-prompts-input`,className:M(n,`${O}-prompts-input`),name:`${O}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),w.jsx(yr,{className:M(n,`${O}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Xf,{}),disabled:f})]})},aU=()=>{const{globalClassName:e,mode:t}=lt(),{placeholder:n}=mc(),r=n||Hx[t];return w.jsxs("div",{className:M(e,`${O}-prompts-header`),children:[w.jsx(Ap,{className:M(e,`${O}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:M(e,`${O}-prompts-header-text`),children:r})]})},jx=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=lt(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:M(r,`${O}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(Hw,{icon:a,className:`${O}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},uU="Ask me something else",lU=({label:e,disabled:t=!1})=>w.jsx(jx,{label:e||uU,disabled:t,onClick:()=>ni(!0)}),cU=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=lt(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=mc();if(!(r!=null&&r.length))return null;const u=l=>()=>{const d=l.trim();d&&e(d)};return w.jsxs("div",{className:M(n,`${O}-prompts-button-group`),children:[r.map(l=>w.jsx(jx,{label:l,disabled:t,onClick:u(l)},l)),!a&&w.jsx(lU,{label:s,disabled:t})]})},dU=()=>{const{globalClassName:e,themeVariables:t,enablePageContext:n}=lt(),{isOpen:r,elementId:s,promptsDisplay:a}=mc(),{isConnected:u,sessionExpired:l,sendMessage:d,connectionStatus:f}=$t(),{productId:p}=jp(),m=a!=="buttons",T=a!=="input",[y,_]=N.useState(null),A=f==="error",v=f==="connecting",x=k1(u,l),k=sU({isReady:x,hasError:A,transmit:d});N.useEffect(()=>{if(!s||y)return;const j=document.getElementById(s);j&&_(j)},[s,y]);const I=N.useCallback(j=>{if(ni(!0),n){k(j);return}const{prompt:q,display:R}=Pf(j,p);if(R&&R.length>0){k(q,{displayContent:R});return}k(q)},[k,p,n]);return!r||!y?null:io.createPortal(w.jsxs("div",{className:M(e,`${O}-prompts-extension-container`),style:t,children:[m&&w.jsx(oU,{onSubmit:I,disabled:A}),!m&&w.jsx(aU,{}),T&&w.jsx(cU,{onPromptClick:I,disabled:A}),!A&&v&&w.jsx("p",{className:M(e,`${O}-prompts-connecting-message`),children:"Connecting to agent..."}),A&&w.jsx("p",{className:M(e,`${O}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),y)},fU=()=>(iU(),w.jsx(dU,{})),$x=e=>w.jsxs(Z1,fe(F({},e),{children:[w.jsx(rU,{}),w.jsx(fU,{})]}));function zx(e,t){return ke(this,null,function*(){return R1().sendMessage(e,t)})}const hU={components:{setEntryType:tf,toggleWidgetOpen:ni,toggleWidgetMinimized:Xs,toggleModalFullscreen:nf,setWidgetType:Xu,setWidgetDialogPosition:rf,loadPromptsComponent:E9,togglePromptsExtensionOpen:Bw},session:{resetConversation:y9,endConversation:T9,sendMessage:zx},pageContext:{set:L1,get:Rf,clear:D1}};var Ac={},Vx;function pU(){if(Vx)return Ac;Vx=1;var e=iE();return Ac.createRoot=e.createRoot,Ac.hydrateRoot=e.hydrateRoot,Ac}var mU=pU();const qx=new WeakMap,Wx=(e,t,n,r)=>{var a;(a=qx.get(e))==null||a.unmount();const s=mU.createRoot(e);qx.set(e,s),s.render(w.jsx($x,fe(F({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},gU=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 T of p)if(T.type==="childList"&&T.addedNodes.length)for(const y of T.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(kt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),Wx(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),kt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},EU=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=vn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){kt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){kt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){kt(!0,"warn","Container element not found for id:",t),kt(!0,"warn","Beginning observation for element"),gU(F({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Wx(l,s,n,r)};function yU(){return ke(this,null,function*(){return R1().getAuthLinkKey()})}class TU extends HTMLElement{constructor(){super(...arguments);Xe(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}Fe.AgentForceWidget=$x,Fe.AgentforceWidgetProvider=Z1,Fe.CIMULATE_WIDGET_READY_EVENT=bg,Fe.MessagingDialog=Fx,Fe.MessagingEmbed=Dx,Fe.MessagingModal=Bx,Fe.MessagingProvider=F1,Fe.OverrideElement=TU,Fe.clearPageContext=D1,Fe.eventHandlers=hU,Fe.getAuthLinkKey=yU,Fe.getPageContext=Rf,Fe.injectMessagingWidget=EU,Fe.sendMessage=zx,Fe.setPageContext=L1,Fe.useMessaging=$t,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
|