@cimulate/copilot-widget 1.15.3 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +16 -0
- package/dist/messaging.es.js +8870 -8704
- package/dist/messaging.umd.js +31 -31
- package/package.json +1 -1
package/dist/messaging.umd.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
(function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie.CimulateMessaging={}))})(this,(function(Ie){"use strict";var Y9=Object.defineProperty,W9=Object.defineProperties;var G9=Object.getOwnPropertyDescriptors;var Uc=Object.getOwnPropertySymbols;var e2=Object.prototype.hasOwnProperty,t2=Object.prototype.propertyIsEnumerable;var bs=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),K9=Ie=>{throw TypeError(Ie)},ru=Math.pow,_m=(Ie,Fe,We)=>Fe in Ie?Y9(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ie[Fe]=We,B=(Ie,Fe)=>{for(var We in Fe||(Fe={}))e2.call(Fe,We)&&_m(Ie,We,Fe[We]);if(Uc)for(var We of Uc(Fe))t2.call(Fe,We)&&_m(Ie,We,Fe[We]);return Ie},ae=(Ie,Fe)=>W9(Ie,G9(Fe));var sn=(Ie,Fe)=>{var We={};for(var rt in Ie)e2.call(Ie,rt)&&Fe.indexOf(rt)<0&&(We[rt]=Ie[rt]);if(Ie!=null&&Uc)for(var rt of Uc(Ie))Fe.indexOf(rt)<0&&t2.call(Ie,rt)&&(We[rt]=Ie[rt]);return We};var Ze=(Ie,Fe,We)=>_m(Ie,typeof Fe!="symbol"?Fe+"":Fe,We);var $e=(Ie,Fe,We)=>new Promise((rt,yt)=>{var dt=Tt=>{try{Lt(We.next(Tt))}catch(an){yt(an)}},Pe=Tt=>{try{Lt(We.throw(Tt))}catch(an){yt(an)}},Lt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(dt,Pe);Lt((We=We.apply(Ie,Fe)).next())}),ao=function(Ie,Fe){this[0]=Ie,this[1]=Fe},vm=(Ie,Fe,We)=>{var rt=(Pe,Lt,Tt,an)=>{try{var uo=We[Pe](Lt),Ts=(Lt=uo.value)instanceof ao,Hc=uo.done;Promise.resolve(Ts?Lt[0]:Lt).then($n=>Ts?rt(Pe==="return"?Pe:"next",Lt[1]?{done:$n.done,value:$n.value}:$n,Tt,an):Tt({value:$n,done:Hc})).catch($n=>rt("throw",$n,Tt,an))}catch($n){an($n)}},yt=Pe=>dt[Pe]=Lt=>new Promise((Tt,an)=>rt(Pe,Lt,Tt,an)),dt={};return We=We.apply(Ie,Fe),dt[bs("asyncIterator")]=()=>dt,yt("next"),yt("throw"),yt("return"),dt},Sm=Ie=>{var Fe=Ie[bs("asyncIterator")],We=!1,rt,yt={};return Fe==null?(Fe=Ie[bs("iterator")](),rt=dt=>yt[dt]=Pe=>Fe[dt](Pe)):(Fe=Fe.call(Ie),rt=dt=>yt[dt]=Pe=>{if(We){if(We=!1,dt==="throw")throw Pe;return Pe}return We=!0,{done:!1,value:new ao(new Promise(Lt=>{var Tt=Fe[dt](Pe);Tt instanceof Object||K9("Object expected"),Lt(Tt)}),1)}}),yt[bs("iterator")]=()=>yt,rt("next"),"throw"in Fe?rt("throw"):yt.throw=dt=>{throw dt},"return"in Fe&&rt("return"),yt},n2=(Ie,Fe,We)=>(Fe=Ie[bs("asyncIterator")])?Fe.call(Ie):(Ie=Ie[bs("iterator")](),Fe={},We=(rt,yt)=>(yt=Ie[rt])&&(Fe[rt]=dt=>new Promise((Pe,Lt,Tt)=>(dt=yt.call(Ie,dt),Tt=dt.done,Promise.resolve(dt.value).then(an=>Pe({value:an,done:Tt}),Lt)))),We("next"),We("return"),Fe);var Fe=document.createElement("style");Fe.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;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease;&.card-full-width{width:100%;min-width:100%}}.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}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:40%}.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__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.8125rem;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)}.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:.875rem;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:.75rem;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;align-items:baseline;gap:8px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:.875rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:.875rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-cart-item-qty{font-size:.75rem;font-weight:500;opacity:.85}.cim-widget-cart-item-remove{padding:0;border:none;background:none;font-family:inherit;font-size:.75rem;font-weight:500;color:var(--cim-widget-font-color, #3f3f46);text-decoration:underline;cursor:pointer}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8125rem;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:1rem;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-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);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-font-color, #141415) 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-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}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}@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{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.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: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}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Fe);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},yt={},dt={exports:{}},Pe={};var Lt;function Tt(){if(Lt)return Pe;Lt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function T(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function S(I,G,N){this.props=I,this.context=G,this.refs=v,this.updater=N||y}S.prototype.isReactComponent={},S.prototype.setState=function(I,G){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,G,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function A(){}A.prototype=S.prototype;function O(I,G,N){this.props=I,this.context=G,this.refs=v,this.updater=N||y}var R=O.prototype=new A;R.constructor=O,x(R,S.prototype),R.isPureReactComponent=!0;var H=Array.isArray,W=Object.prototype.hasOwnProperty,F={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function de(I,G,N){var xe,Oe={},Re=null,He=null;if(G!=null)for(xe in G.ref!==void 0&&(He=G.ref),G.key!==void 0&&(Re=""+G.key),G)W.call(G,xe)&&!K.hasOwnProperty(xe)&&(Oe[xe]=G[xe]);var Se=arguments.length-2;if(Se===1)Oe.children=N;else if(1<Se){for(var qe=Array(Se),ut=0;ut<Se;ut++)qe[ut]=arguments[ut+2];Oe.children=qe}if(I&&I.defaultProps)for(xe in Se=I.defaultProps,Se)Oe[xe]===void 0&&(Oe[xe]=Se[xe]);return{$$typeof:e,type:I,key:Re,ref:He,props:Oe,_owner:F.current}}function ge(I,G){return{$$typeof:e,type:I.type,key:G,ref:I.ref,props:I.props,_owner:I._owner}}function z(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function ue(I){var G={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(N){return G[N]})}var he=/\/+/g;function ee(I,G){return typeof I=="object"&&I!==null&&I.key!=null?ue(""+I.key):G.toString(36)}function re(I,G,N,xe,Oe){var Re=typeof I;(Re==="undefined"||Re==="boolean")&&(I=null);var He=!1;if(I===null)He=!0;else switch(Re){case"string":case"number":He=!0;break;case"object":switch(I.$$typeof){case e:case t:He=!0}}if(He)return He=I,Oe=Oe(He),I=xe===""?"."+ee(He,0):xe,H(Oe)?(N="",I!=null&&(N=I.replace(he,"$&/")+"/"),re(Oe,G,N,"",function(ut){return ut})):Oe!=null&&(z(Oe)&&(Oe=ge(Oe,N+(!Oe.key||He&&He.key===Oe.key?"":(""+Oe.key).replace(he,"$&/")+"/")+I)),G.push(Oe)),1;if(He=0,xe=xe===""?".":xe+":",H(I))for(var Se=0;Se<I.length;Se++){Re=I[Se];var qe=xe+ee(Re,Se);He+=re(Re,G,N,qe,Oe)}else if(qe=T(I),typeof qe=="function")for(I=qe.call(I),Se=0;!(Re=I.next()).done;)Re=Re.value,qe=xe+ee(Re,Se++),He+=re(Re,G,N,qe,Oe);else if(Re==="object")throw G=String(I),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return He}function te(I,G,N){if(I==null)return I;var xe=[],Oe=0;return re(I,xe,"","",function(Re){return G.call(N,Re,Oe++)}),xe}function Te(I){if(I._status===-1){var G=I._result;G=G(),G.then(function(N){(I._status===0||I._status===-1)&&(I._status=1,I._result=N)},function(N){(I._status===0||I._status===-1)&&(I._status=2,I._result=N)}),I._status===-1&&(I._status=0,I._result=G)}if(I._status===1)return I._result.default;throw I._result}var oe={current:null},X={transition:null},se={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:X,ReactCurrentOwner:F};function C(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:te,forEach:function(I,G,N){te(I,function(){G.apply(this,arguments)},N)},count:function(I){var G=0;return te(I,function(){G++}),G},toArray:function(I){return te(I,function(G){return G})||[]},only:function(I){if(!z(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Pe.Component=S,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=O,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Pe.act=C,Pe.cloneElement=function(I,G,N){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var xe=x({},I.props),Oe=I.key,Re=I.ref,He=I._owner;if(G!=null){if(G.ref!==void 0&&(Re=G.ref,He=F.current),G.key!==void 0&&(Oe=""+G.key),I.type&&I.type.defaultProps)var Se=I.type.defaultProps;for(qe in G)W.call(G,qe)&&!K.hasOwnProperty(qe)&&(xe[qe]=G[qe]===void 0&&Se!==void 0?Se[qe]:G[qe])}var qe=arguments.length-2;if(qe===1)xe.children=N;else if(1<qe){Se=Array(qe);for(var ut=0;ut<qe;ut++)Se[ut]=arguments[ut+2];xe.children=Se}return{$$typeof:e,type:I.type,key:Oe,ref:Re,props:xe,_owner:He}},Pe.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:a,_context:I},I.Consumer=I},Pe.createElement=de,Pe.createFactory=function(I){var G=de.bind(null,I);return G.type=I,G},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(I){return{$$typeof:c,render:I}},Pe.isValidElement=z,Pe.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:Te}},Pe.memo=function(I,G){return{$$typeof:h,type:I,compare:G===void 0?null:G}},Pe.startTransition=function(I){var G=X.transition;X.transition={};try{I()}finally{X.transition=G}},Pe.unstable_act=C,Pe.useCallback=function(I,G){return oe.current.useCallback(I,G)},Pe.useContext=function(I){return oe.current.useContext(I)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(I){return oe.current.useDeferredValue(I)},Pe.useEffect=function(I,G){return oe.current.useEffect(I,G)},Pe.useId=function(){return oe.current.useId()},Pe.useImperativeHandle=function(I,G,N){return oe.current.useImperativeHandle(I,G,N)},Pe.useInsertionEffect=function(I,G){return oe.current.useInsertionEffect(I,G)},Pe.useLayoutEffect=function(I,G){return oe.current.useLayoutEffect(I,G)},Pe.useMemo=function(I,G){return oe.current.useMemo(I,G)},Pe.useReducer=function(I,G,N){return oe.current.useReducer(I,G,N)},Pe.useRef=function(I){return oe.current.useRef(I)},Pe.useState=function(I){return oe.current.useState(I)},Pe.useSyncExternalStore=function(I,G,N){return oe.current.useSyncExternalStore(I,G,N)},Pe.useTransition=function(){return oe.current.useTransition()},Pe.version="18.3.1",Pe}var an;function uo(){return an||(an=1,dt.exports=Tt()),dt.exports}var Ts;function Hc(){if(Ts)return yt;Ts=1;var e=uo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,h){var p,g={},T=null,y=null;h!==void 0&&(T=""+h),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)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:y,props:g,_owner:o.current}}return yt.Fragment=n,yt.jsx=u,yt.jsxs=u,yt}var $n;function s2(){return $n||($n=1,rt.exports=Hc()),rt.exports}var w=s2();const sr=Object.create(null);sr.open="0",sr.close="1",sr.ping="2",sr.pong="3",sr.message="4",sr.upgrade="5",sr.noop="6";const iu=Object.create(null);Object.keys(sr).forEach(e=>{iu[sr[e]]=e});const zc={type:"error",data:"parser error"},Am=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Cm=typeof ArrayBuffer=="function",km=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jc=({type:e,data:t},n,r)=>Am&&t instanceof Blob?n?r(t):Nm(t,r):Cm&&(t instanceof ArrayBuffer||km(t))?n?r(t):Nm(new Blob([t]),r):r(sr[e]+(t||"")),Nm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Om(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let $c;function a2(e,t){if(Am&&e.data instanceof Blob)return e.data.arrayBuffer().then(Om).then(t);if(Cm&&(e.data instanceof ArrayBuffer||km(e.data)))return t(Om(e.data));jc(e,!1,n=>{$c||($c=new TextEncoder),t($c.encode(n))})}const Im="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Im.length;e++)xs[Im.charCodeAt(e)]=e;const u2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(r=0;r<n;r+=4)a=xs[e.charCodeAt(r)],u=xs[e.charCodeAt(r+1)],c=xs[e.charCodeAt(r+2)],d=xs[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return h},l2=typeof ArrayBuffer=="function",Vc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Rm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:c2(e.substring(1),t)}:iu[n]?e.length>1?{type:iu[n],data:e.substring(1)}:{type:iu[n]}:zc},c2=(e,t)=>{if(l2){const n=u2(e);return Rm(n,t)}else return{base64:!0,data:e}},Rm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Pm="",d2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{jc(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Pm))})})},f2=(e,t)=>{const n=e.split(Pm),r=[];for(let o=0;o<n.length;o++){const a=Vc(n[o],t);if(r.push(a),a.type==="error")break}return r};function h2(){return new TransformStream({transform(e,t){a2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let qc;function ou(e){return e.reduce((t,n)=>t+n.length,0)}function su(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=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 p2(e,t){qc||(qc=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(ou(n)<1)break;const d=su(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ou(n)<2)break;const d=su(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(ou(n)<8)break;const d=su(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(zc);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(ou(n)<o)break;const d=su(n,o);c.enqueue(Vc(a?d:qc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(zc);break}}}})}const Lm=4;function St(e){if(e)return m2(e)}function m2(e){for(var t in St.prototype)e[t]=St.prototype[t];return e}St.prototype.on=St.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},St.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},St.prototype.off=St.prototype.removeListener=St.prototype.removeAllListeners=St.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,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},St.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,o=n.length;r<o;++r)n[r].apply(this,t)}return this},St.prototype.emitReserved=St.prototype.emit,St.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},St.prototype.hasListeners=function(e){return!!this.listeners(e).length};const au=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),g2="arraybuffer";function Q9(){}function Dm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const E2=On.setTimeout,y2=On.clearTimeout;function uu(e,t){t.useNativeTimers?(e.setTimeoutFn=E2.bind(On),e.clearTimeoutFn=y2.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const b2=1.33;function T2(e){return typeof e=="string"?x2(e):Math.ceil((e.byteLength||e.size)*b2)}function x2(e){let t=0,n=0;for(let r=0,o=e.length;r<o;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 Mm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function w2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function _2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class v2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Yc extends St{constructor(t){super(),this.writable=!1,uu(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 v2(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=Vc(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=w2(t);return n.length?"?"+n:""}}class S2 extends Yc{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)};f2(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,d2(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]=Mm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Fm=!1;try{Fm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const A2=Fm;function C2(){}class k2 extends S2{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",(o,a)=>{this.onError("xhr post error",o,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 ar extends St{constructor(t,n,r){super(),this.createRequest=t,uu(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=Dm(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 o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(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 o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.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(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=ar.requestsCount++,ar.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=C2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete ar.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(ar.requestsCount=0,ar.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Bm);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Bm,!1)}}function Bm(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}const N2=(function(){const e=Um({xdomain:!1});return e&&e.responseType!==null})();class O2 extends k2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=N2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ar(Um,this.uri(),t)}}function Um(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||A2))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Hm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class I2 extends Yc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Hm?{}:Dm(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(o){return this.emitReserved("error",o)}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],o=n===t.length-1;jc(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&au(()=>{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]=Mm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Wc=On.WebSocket||On.MozWebSocket;class R2 extends I2{createSocket(t,n,r){return Hm?new Wc(t,n,r):n?new Wc(t,n):new Wc(t)}doWrite(t,n){this.ws.send(n)}}class P2 extends Yc{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=p2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=h2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};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],o=n===t.length-1;this._writer.write(r).then(()=>{o&&au(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const L2={websocket:R2,webtransport:P2,polling:O2},D2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,M2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Gc(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 o=D2.exec(e||""),a={},u=14;for(;u--;)a[M2[u]]=o[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=F2(a,a.path),a.queryKey=B2(a,a.query),a}function F2(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 B2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Kc=typeof addEventListener=="function"&&typeof removeEventListener=="function",lu=[];Kc&&addEventListener("offline",()=>{lu.forEach(e=>e())},!1);class jr extends St{constructor(t,n){if(super(),this.binaryType=g2,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=Gc(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=Gc(n.host).host);uu(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 o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=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=_2(this.opts.query)),Kc&&(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"})},lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Lm,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&&jr.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",jr.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 o=this.writeBuffer[r].data;if(o&&(n+=T2(o)),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,au(()=>{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,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=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),o&&this.once("flush",o),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(jr.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(),Kc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=lu.indexOf(this._offlineEventListener);r!==-1&&lu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}jr.protocol=Lm;class U2 extends jr{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;jr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;jr.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=g=>{const T=new Error("probe error: "+g);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function h(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),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 H2=class extends U2{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>L2[a]).filter(a=>!!a)),super(r?o:t,o)}};function z2(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=Gc(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 j2=typeof ArrayBuffer=="function",$2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,zm=Object.prototype.toString,V2=typeof Blob=="function"||typeof Blob!="undefined"&&zm.call(Blob)==="[object BlobConstructor]",q2=typeof File=="function"||typeof File!="undefined"&&zm.call(File)==="[object FileConstructor]";function Qc(e){return j2&&(e instanceof ArrayBuffer||$2(e))||V2&&e instanceof Blob||q2&&e instanceof File}function cu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(cu(e[n]))return!0;return!1}if(Qc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return cu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&cu(e[n]))return!0;return!1}function Y2(e){const t=[],n=e.data,r=e;return r.data=Xc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Xc(e,t){if(!e)return e;if(Qc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Xc(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Xc(e[r],t));return n}return e}function W2(e,t){return e.data=Jc(e.data,t),delete e.attachments,e}function Jc(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]=Jc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Jc(e[n],t));return e}const G2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ke;(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"})(Ke||(Ke={}));class K2{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&cu(t)?this.encodeAsBinary({type:t.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ke.BINARY_EVENT||t.type===Ke.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=Y2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Zc extends St{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===Ke.BINARY_EVENT;r||n.type===Ke.BINARY_ACK?(n.type=r?Ke.EVENT:Ke.ACK,this.reconstructor=new Q2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Qc(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(Ke[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ke.BINARY_EVENT||r.type===Ke.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 c=Number(u);if(!X2(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}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 o=t.charAt(n+1);if(o!==""&&Number(o)==o){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(Zc.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 Ke.CONNECT:return jm(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||jm(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&G2.indexOf(n[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Q2{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=W2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const X2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function jm(e){return Object.prototype.toString.call(e)==="[object Object]"}const J2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Zc,Encoder:K2,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Z2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $m extends St{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=[Vn(t,"open",this.onopen.bind(this)),Vn(t,"packet",this.onpacket.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(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,o,a;if(Z2.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:Ke.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);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((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(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:Ke.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 Ke.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 Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(t);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(t);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.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(...o){r||(r=!0,n.packet({type:Ke.ACK,id:t,data:o}))}}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:Ke.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 lo(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}lo.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},lo.prototype.reset=function(){this.attempts=0},lo.prototype.setMin=function(e){this.ms=e},lo.prototype.setMax=function(e){this.max=e},lo.prototype.setJitter=function(e){this.jitter=e};class ed extends St{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,uu(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 lo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||J2;this.encoder=new o.Encoder,this.decoder=new o.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 H2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Vn(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Vn(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),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(Vn(t,"ping",this.onping.bind(this)),Vn(t,"data",this.ondata.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this)),Vn(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){au(()=>{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 $m(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(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):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 ws={};function td(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=z2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ws[o]&&a in ws[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new ed(r,t):(ws[o]||(ws[o]=new ed(r,t)),d=ws[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(td,{Manager:ed,Socket:$m,io:td,connect:td});const Vm=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&Vm.call(Blob),typeof File=="function"||typeof File!="undefined"&&Vm.call(File);var qm;(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"})(qm||(qm={}));var J=uo();const wi=We(J);class e_{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,o;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((o=this.onceListeners.get(t))==null?void 0:o.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 o=this.onceListeners.get(t);if(o){for(const a of o)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}}class t_{constructor(t,n,r,o,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=o,this.logger=a,this.controller=null,this.reading=!1}connect(){return $e(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:ae(B({},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 $e(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let o="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(o+=r.decode(a,{stream:!0}),o=o.replace(/\r\n/g,`
|
|
1
|
+
(function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie.CimulateMessaging={}))})(this,(function(Ie){"use strict";var Z9=Object.defineProperty,eF=Object.defineProperties;var tF=Object.getOwnPropertyDescriptors;var zc=Object.getOwnPropertySymbols;var i2=Object.prototype.hasOwnProperty,o2=Object.prototype.propertyIsEnumerable;var xs=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),nF=Ie=>{throw TypeError(Ie)},ou=Math.pow,Sm=(Ie,Fe,We)=>Fe in Ie?Z9(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ie[Fe]=We,B=(Ie,Fe)=>{for(var We in Fe||(Fe={}))i2.call(Fe,We)&&Sm(Ie,We,Fe[We]);if(zc)for(var We of zc(Fe))o2.call(Fe,We)&&Sm(Ie,We,Fe[We]);return Ie},ie=(Ie,Fe)=>eF(Ie,tF(Fe));var sn=(Ie,Fe)=>{var We={};for(var rt in Ie)i2.call(Ie,rt)&&Fe.indexOf(rt)<0&&(We[rt]=Ie[rt]);if(Ie!=null&&zc)for(var rt of zc(Ie))Fe.indexOf(rt)<0&&o2.call(Ie,rt)&&(We[rt]=Ie[rt]);return We};var Ze=(Ie,Fe,We)=>Sm(Ie,typeof Fe!="symbol"?Fe+"":Fe,We);var $e=(Ie,Fe,We)=>new Promise((rt,yt)=>{var dt=Tt=>{try{Lt(We.next(Tt))}catch(an){yt(an)}},Pe=Tt=>{try{Lt(We.throw(Tt))}catch(an){yt(an)}},Lt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(dt,Pe);Lt((We=We.apply(Ie,Fe)).next())}),uo=function(Ie,Fe){this[0]=Ie,this[1]=Fe},Am=(Ie,Fe,We)=>{var rt=(Pe,Lt,Tt,an)=>{try{var lo=We[Pe](Lt),ws=(Lt=lo.value)instanceof uo,jc=lo.done;Promise.resolve(ws?Lt[0]:Lt).then($n=>ws?rt(Pe==="return"?Pe:"next",Lt[1]?{done:$n.done,value:$n.value}:$n,Tt,an):Tt({value:$n,done:jc})).catch($n=>rt("throw",$n,Tt,an))}catch($n){an($n)}},yt=Pe=>dt[Pe]=Lt=>new Promise((Tt,an)=>rt(Pe,Lt,Tt,an)),dt={};return We=We.apply(Ie,Fe),dt[xs("asyncIterator")]=()=>dt,yt("next"),yt("throw"),yt("return"),dt},Cm=Ie=>{var Fe=Ie[xs("asyncIterator")],We=!1,rt,yt={};return Fe==null?(Fe=Ie[xs("iterator")](),rt=dt=>yt[dt]=Pe=>Fe[dt](Pe)):(Fe=Fe.call(Ie),rt=dt=>yt[dt]=Pe=>{if(We){if(We=!1,dt==="throw")throw Pe;return Pe}return We=!0,{done:!1,value:new uo(new Promise(Lt=>{var Tt=Fe[dt](Pe);Tt instanceof Object||nF("Object expected"),Lt(Tt)}),1)}}),yt[xs("iterator")]=()=>yt,rt("next"),"throw"in Fe?rt("throw"):yt.throw=dt=>{throw dt},"return"in Fe&&rt("return"),yt},s2=(Ie,Fe,We)=>(Fe=Ie[xs("asyncIterator")])?Fe.call(Ie):(Ie=Ie[xs("iterator")](),Fe={},We=(rt,yt)=>(yt=Ie[rt])&&(Fe[rt]=dt=>new Promise((Pe,Lt,Tt)=>(dt=yt.call(Ie,dt),Tt=dt.done,Promise.resolve(dt.value).then(an=>Pe({value:an,done:Tt}),Lt)))),We("next"),We("return"),Fe);var Fe=document.createElement("style");Fe.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;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease;&.card-full-width{width:100%;min-width:100%}}.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}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:40%}.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__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.8125rem;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)}.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:.875rem;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:.75rem;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;align-items:baseline;gap:8px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:.875rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:.875rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-cart-item-qty{font-size:.75rem;font-weight:500;opacity:.85}.cim-widget-cart-item-remove{padding:0;border:none;background:none;font-family:inherit;font-size:.75rem;font-weight:500;color:var(--cim-widget-font-color, #3f3f46);text-decoration:underline;cursor:pointer}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8125rem;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:1rem;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-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);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-font-color, #141415) 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-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}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}@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{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.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: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}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Fe);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},yt={},dt={exports:{}},Pe={};var Lt;function Tt(){if(Lt)return Pe;Lt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function T(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function A(I,W,O){this.props=I,this.context=W,this.refs=v,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(I,W){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,W,"setState")},A.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=A.prototype;function k(I,W,O){this.props=I,this.context=W,this.refs=v,this.updater=O||y}var R=k.prototype=new C;R.constructor=k,w(R,A.prototype),R.isPureReactComponent=!0;var U=Array.isArray,Y=Object.prototype.hasOwnProperty,F={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function ce(I,W,O){var be,Oe={},Re=null,He=null;if(W!=null)for(be in W.ref!==void 0&&(He=W.ref),W.key!==void 0&&(Re=""+W.key),W)Y.call(W,be)&&!X.hasOwnProperty(be)&&(Oe[be]=W[be]);var ve=arguments.length-2;if(ve===1)Oe.children=O;else if(1<ve){for(var qe=Array(ve),ut=0;ut<ve;ut++)qe[ut]=arguments[ut+2];Oe.children=qe}if(I&&I.defaultProps)for(be in ve=I.defaultProps,ve)Oe[be]===void 0&&(Oe[be]=ve[be]);return{$$typeof:e,type:I,key:Re,ref:He,props:Oe,_owner:F.current}}function de(I,W){return{$$typeof:e,type:I.type,key:W,ref:I.ref,props:I.props,_owner:I._owner}}function z(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function oe(I){var W={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(O){return W[O]})}var he=/\/+/g;function ae(I,W){return typeof I=="object"&&I!==null&&I.key!=null?oe(""+I.key):W.toString(36)}function se(I,W,O,be,Oe){var Re=typeof I;(Re==="undefined"||Re==="boolean")&&(I=null);var He=!1;if(I===null)He=!0;else switch(Re){case"string":case"number":He=!0;break;case"object":switch(I.$$typeof){case e:case t:He=!0}}if(He)return He=I,Oe=Oe(He),I=be===""?"."+ae(He,0):be,U(Oe)?(O="",I!=null&&(O=I.replace(he,"$&/")+"/"),se(Oe,W,O,"",function(ut){return ut})):Oe!=null&&(z(Oe)&&(Oe=de(Oe,O+(!Oe.key||He&&He.key===Oe.key?"":(""+Oe.key).replace(he,"$&/")+"/")+I)),W.push(Oe)),1;if(He=0,be=be===""?".":be+":",U(I))for(var ve=0;ve<I.length;ve++){Re=I[ve];var qe=be+ae(Re,ve);He+=se(Re,W,O,qe,Oe)}else if(qe=T(I),typeof qe=="function")for(I=qe.call(I),ve=0;!(Re=I.next()).done;)Re=Re.value,qe=be+ae(Re,ve++),He+=se(Re,W,O,qe,Oe);else if(Re==="object")throw W=String(I),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return He}function Te(I,W,O){if(I==null)return I;var be=[],Oe=0;return se(I,be,"","",function(Re){return W.call(O,Re,Oe++)}),be}function Ce(I){if(I._status===-1){var W=I._result;W=W(),W.then(function(O){(I._status===0||I._status===-1)&&(I._status=1,I._result=O)},function(O){(I._status===0||I._status===-1)&&(I._status=2,I._result=O)}),I._status===-1&&(I._status=0,I._result=W)}if(I._status===1)return I._result.default;throw I._result}var ee={current:null},V={transition:null},q={ReactCurrentDispatcher:ee,ReactCurrentBatchConfig:V,ReactCurrentOwner:F};function S(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:Te,forEach:function(I,W,O){Te(I,function(){W.apply(this,arguments)},O)},count:function(I){var W=0;return Te(I,function(){W++}),W},toArray:function(I){return Te(I,function(W){return W})||[]},only:function(I){if(!z(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Pe.Component=A,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=k,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Pe.act=S,Pe.cloneElement=function(I,W,O){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var be=w({},I.props),Oe=I.key,Re=I.ref,He=I._owner;if(W!=null){if(W.ref!==void 0&&(Re=W.ref,He=F.current),W.key!==void 0&&(Oe=""+W.key),I.type&&I.type.defaultProps)var ve=I.type.defaultProps;for(qe in W)Y.call(W,qe)&&!X.hasOwnProperty(qe)&&(be[qe]=W[qe]===void 0&&ve!==void 0?ve[qe]:W[qe])}var qe=arguments.length-2;if(qe===1)be.children=O;else if(1<qe){ve=Array(qe);for(var ut=0;ut<qe;ut++)ve[ut]=arguments[ut+2];be.children=ve}return{$$typeof:e,type:I.type,key:Oe,ref:Re,props:be,_owner:He}},Pe.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:a,_context:I},I.Consumer=I},Pe.createElement=ce,Pe.createFactory=function(I){var W=ce.bind(null,I);return W.type=I,W},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(I){return{$$typeof:c,render:I}},Pe.isValidElement=z,Pe.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:Ce}},Pe.memo=function(I,W){return{$$typeof:h,type:I,compare:W===void 0?null:W}},Pe.startTransition=function(I){var W=V.transition;V.transition={};try{I()}finally{V.transition=W}},Pe.unstable_act=S,Pe.useCallback=function(I,W){return ee.current.useCallback(I,W)},Pe.useContext=function(I){return ee.current.useContext(I)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(I){return ee.current.useDeferredValue(I)},Pe.useEffect=function(I,W){return ee.current.useEffect(I,W)},Pe.useId=function(){return ee.current.useId()},Pe.useImperativeHandle=function(I,W,O){return ee.current.useImperativeHandle(I,W,O)},Pe.useInsertionEffect=function(I,W){return ee.current.useInsertionEffect(I,W)},Pe.useLayoutEffect=function(I,W){return ee.current.useLayoutEffect(I,W)},Pe.useMemo=function(I,W){return ee.current.useMemo(I,W)},Pe.useReducer=function(I,W,O){return ee.current.useReducer(I,W,O)},Pe.useRef=function(I){return ee.current.useRef(I)},Pe.useState=function(I){return ee.current.useState(I)},Pe.useSyncExternalStore=function(I,W,O){return ee.current.useSyncExternalStore(I,W,O)},Pe.useTransition=function(){return ee.current.useTransition()},Pe.version="18.3.1",Pe}var an;function lo(){return an||(an=1,dt.exports=Tt()),dt.exports}var ws;function jc(){if(ws)return yt;ws=1;var e=lo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,h){var p,g={},T=null,y=null;h!==void 0&&(T=""+h),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)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:y,props:g,_owner:o.current}}return yt.Fragment=n,yt.jsx=u,yt.jsxs=u,yt}var $n;function c2(){return $n||($n=1,rt.exports=jc()),rt.exports}var x=c2();const sr=Object.create(null);sr.open="0",sr.close="1",sr.ping="2",sr.pong="3",sr.message="4",sr.upgrade="5",sr.noop="6";const su=Object.create(null);Object.keys(sr).forEach(e=>{su[sr[e]]=e});const $c={type:"error",data:"parser error"},km=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Nm=typeof ArrayBuffer=="function",Om=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Vc=({type:e,data:t},n,r)=>km&&t instanceof Blob?n?r(t):Im(t,r):Nm&&(t instanceof ArrayBuffer||Om(t))?n?r(t):Im(new Blob([t]),r):r(sr[e]+(t||"")),Im=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Rm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qc;function d2(e,t){if(km&&e.data instanceof Blob)return e.data.arrayBuffer().then(Rm).then(t);if(Nm&&(e.data instanceof ArrayBuffer||Om(e.data)))return t(Rm(e.data));Vc(e,!1,n=>{qc||(qc=new TextEncoder),t(qc.encode(n))})}const Pm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_s=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Pm.length;e++)_s[Pm.charCodeAt(e)]=e;const f2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(r=0;r<n;r+=4)a=_s[e.charCodeAt(r)],u=_s[e.charCodeAt(r+1)],c=_s[e.charCodeAt(r+2)],d=_s[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return h},h2=typeof ArrayBuffer=="function",Yc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Lm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:p2(e.substring(1),t)}:su[n]?e.length>1?{type:su[n],data:e.substring(1)}:{type:su[n]}:$c},p2=(e,t)=>{if(h2){const n=f2(e);return Lm(n,t)}else return{base64:!0,data:e}},Lm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Dm="",m2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Vc(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Dm))})})},g2=(e,t)=>{const n=e.split(Dm),r=[];for(let o=0;o<n.length;o++){const a=Yc(n[o],t);if(r.push(a),a.type==="error")break}return r};function E2(){return new TransformStream({transform(e,t){d2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Wc;function au(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 o=0;o<t;o++)n[o]=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 y2(e,t){Wc||(Wc=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(au(n)<1)break;const d=uu(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(au(n)<2)break;const d=uu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(au(n)<8)break;const d=uu(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue($c);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(au(n)<o)break;const d=uu(n,o);c.enqueue(Yc(a?d:Wc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue($c);break}}}})}const Mm=4;function St(e){if(e)return b2(e)}function b2(e){for(var t in St.prototype)e[t]=St.prototype[t];return e}St.prototype.on=St.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},St.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},St.prototype.off=St.prototype.removeListener=St.prototype.removeAllListeners=St.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,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},St.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,o=n.length;r<o;++r)n[r].apply(this,t)}return this},St.prototype.emitReserved=St.prototype.emit,St.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},St.prototype.hasListeners=function(e){return!!this.listeners(e).length};const lu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),T2="arraybuffer";function rF(){}function Fm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const x2=On.setTimeout,w2=On.clearTimeout;function cu(e,t){t.useNativeTimers?(e.setTimeoutFn=x2.bind(On),e.clearTimeoutFn=w2.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const _2=1.33;function v2(e){return typeof e=="string"?S2(e):Math.ceil((e.byteLength||e.size)*_2)}function S2(e){let t=0,n=0;for(let r=0,o=e.length;r<o;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 Bm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function A2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function C2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class k2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Gc extends St{constructor(t){super(),this.writable=!1,cu(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 k2(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=Yc(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=A2(t);return n.length?"?"+n:""}}class N2 extends Gc{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)};g2(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,m2(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]=Bm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Um=!1;try{Um=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const O2=Um;function I2(){}class R2 extends N2{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",(o,a)=>{this.onError("xhr post error",o,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 ar extends St{constructor(t,n,r){super(),this.createRequest=t,cu(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=Fm(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 o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(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 o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.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(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=ar.requestsCount++,ar.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=I2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete ar.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(ar.requestsCount=0,ar.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Hm);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Hm,!1)}}function Hm(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}const P2=(function(){const e=zm({xdomain:!1});return e&&e.responseType!==null})();class L2 extends R2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=P2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ar(zm,this.uri(),t)}}function zm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||O2))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const jm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class D2 extends Gc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=jm?{}:Fm(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(o){return this.emitReserved("error",o)}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],o=n===t.length-1;Vc(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&lu(()=>{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]=Bm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Kc=On.WebSocket||On.MozWebSocket;class M2 extends D2{createSocket(t,n,r){return jm?new Kc(t,n,r):n?new Kc(t,n):new Kc(t)}doWrite(t,n){this.ws.send(n)}}class F2 extends Gc{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=y2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=E2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};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],o=n===t.length-1;this._writer.write(r).then(()=>{o&&lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const B2={websocket:M2,webtransport:F2,polling:L2},U2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Qc(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 o=U2.exec(e||""),a={},u=14;for(;u--;)a[H2[u]]=o[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=z2(a,a.path),a.queryKey=j2(a,a.query),a}function z2(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 j2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Xc=typeof addEventListener=="function"&&typeof removeEventListener=="function",du=[];Xc&&addEventListener("offline",()=>{du.forEach(e=>e())},!1);class $r extends St{constructor(t,n){if(super(),this.binaryType=T2,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=Qc(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=Qc(n.host).host);cu(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 o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=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=C2(this.opts.query)),Xc&&(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"})},du.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Mm,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&&$r.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",$r.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 o=this.writeBuffer[r].data;if(o&&(n+=v2(o)),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,lu(()=>{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,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=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),o&&this.once("flush",o),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($r.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(),Xc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=du.indexOf(this._offlineEventListener);r!==-1&&du.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}$r.protocol=Mm;class $2 extends $r{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;$r.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$r.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=g=>{const T=new Error("probe error: "+g);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function h(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),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 V2=class extends $2{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>B2[a]).filter(a=>!!a)),super(r?o:t,o)}};function q2(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=Qc(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 Y2=typeof ArrayBuffer=="function",W2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,$m=Object.prototype.toString,G2=typeof Blob=="function"||typeof Blob!="undefined"&&$m.call(Blob)==="[object BlobConstructor]",K2=typeof File=="function"||typeof File!="undefined"&&$m.call(File)==="[object FileConstructor]";function Jc(e){return Y2&&(e instanceof ArrayBuffer||W2(e))||G2&&e instanceof Blob||K2&&e instanceof File}function fu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(fu(e[n]))return!0;return!1}if(Jc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return fu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&fu(e[n]))return!0;return!1}function Q2(e){const t=[],n=e.data,r=e;return r.data=Zc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Zc(e,t){if(!e)return e;if(Jc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Zc(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Zc(e[r],t));return n}return e}function X2(e,t){return e.data=ed(e.data,t),delete e.attachments,e}function ed(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]=ed(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ed(e[n],t));return e}const J2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ke;(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"})(Ke||(Ke={}));class Z2{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&fu(t)?this.encodeAsBinary({type:t.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ke.BINARY_EVENT||t.type===Ke.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=Q2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class td extends St{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===Ke.BINARY_EVENT;r||n.type===Ke.BINARY_ACK?(n.type=r?Ke.EVENT:Ke.ACK,this.reconstructor=new e_(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Jc(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(Ke[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ke.BINARY_EVENT||r.type===Ke.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 c=Number(u);if(!t_(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}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 o=t.charAt(n+1);if(o!==""&&Number(o)==o){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(td.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 Ke.CONNECT:return Vm(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||Vm(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&J2.indexOf(n[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class e_{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=X2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const t_=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Vm(e){return Object.prototype.toString.call(e)==="[object Object]"}const n_=Object.freeze(Object.defineProperty({__proto__:null,Decoder:td,Encoder:Z2,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const r_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class qm extends St{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=[Vn(t,"open",this.onopen.bind(this)),Vn(t,"packet",this.onpacket.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(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,o,a;if(r_.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:Ke.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);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((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(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:Ke.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 Ke.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 Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(t);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(t);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.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(...o){r||(r=!0,n.packet({type:Ke.ACK,id:t,data:o}))}}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:Ke.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 co(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}co.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},co.prototype.reset=function(){this.attempts=0},co.prototype.setMin=function(e){this.ms=e},co.prototype.setMax=function(e){this.max=e},co.prototype.setJitter=function(e){this.jitter=e};class nd extends St{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,cu(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 co({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||n_;this.encoder=new o.Encoder,this.decoder=new o.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 V2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Vn(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Vn(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),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(Vn(t,"ping",this.onping.bind(this)),Vn(t,"data",this.ondata.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this)),Vn(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){lu(()=>{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 qm(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(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):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 vs={};function rd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=q2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=vs[o]&&a in vs[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new nd(r,t):(vs[o]||(vs[o]=new nd(r,t)),d=vs[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(rd,{Manager:nd,Socket:qm,io:rd,connect:rd});const Ym=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&Ym.call(Blob),typeof File=="function"||typeof File!="undefined"&&Ym.call(File);var Wm;(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"})(Wm||(Wm={}));var Z=lo();const _i=We(Z);class i_{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,o;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((o=this.onceListeners.get(t))==null?void 0:o.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 o=this.onceListeners.get(t);if(o){for(const a of o)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}}class o_{constructor(t,n,r,o,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=o,this.logger=a,this.controller=null,this.reading=!1}connect(){return $e(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:ie(B({},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 $e(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let o="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(o+=r.decode(a,{stream:!0}),o=o.replace(/\r\n/g,`
|
|
3
3
|
`).replace(/\r/g,`
|
|
4
4
|
`);(c=o.indexOf(`
|
|
5
5
|
|
|
6
6
|
`))>=0;){const d=o.slice(0,c);o=o.slice(c+2),this.parseFrame(d)}}}catch(a){return a instanceof DOMException&&a.name==="AbortError"?void this.logger.debug("SSE stream aborted (intentional disconnect)"):(this.logger.error("SSE stream error:",a),this.reading=!1,void this.onClose(a instanceof Error?a.message:"Unknown stream error"))}finally{n.releaseLock()}this.reading=!1,this.logger.info("SSE stream ended"),this.onClose("stream_ended")})}parseFrame(t){let n="message";const r=[];for(const a of t.split(`
|
|
7
7
|
`))if(a.startsWith("event:"))n=a.slice(6).trim();else if(a.startsWith("data:")){const u=a.slice(5);r.push(u.startsWith(" ")?u.slice(1):u)}else a.startsWith(":");if(r.length===0)return;const o=r.join(`
|
|
8
|
-
`);this.logger.debug(`SSE event: ${n}`,o.slice(0,200)),this.onEvent(n,o)}}class $r extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let n_=class extends $r{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class Ym extends $r{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let nd=class extends $r{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class r_{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class i_ extends e_{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:o={}}){var u,c,d,h,p,g,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=o.maxRetries)!=null?u:3,timeout:(c=o.timeout)!=null?c:15e3,maxReconnectAttempts:(d=o.maxReconnectAttempts)!=null?d:5,reconnectDelay:(h=o.reconnectDelay)!=null?h:2e3,enableLogging:(p=o.enableLogging)!=null?p:!1,platform:(g=o.platform)!=null?g:"Web",capabilitiesVersion:(T=o.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new r_(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return $e(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return $e(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return $e(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new $r("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return $e(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return $e(this,null,function*(){var u,c,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),o="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",o);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(c=a.openConversationsFound)!=null?c:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return $e(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const o=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${o?`?${o}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}resumeConversation(t){if(this.assertConnected(),!t)throw new $r("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return $e(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return $e(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new t_(n,r,(o,a)=>this.handleSSEEvent(o,a),o=>this.handleSSEClose(o),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>$e(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const o=r instanceof Error?r.message:String(r);if(o.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${o}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(o){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",o=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:o,failureType:o?void 0:r,raw:n}),o||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var c;const n=t.conversationEntry;if(!n)return;const r=((c=n.sender)==null?void 0:c.role)||"";if(r==="EndUser"||r==="Customer")return;const o=this.parseEntryPayload(n),a=this.getNestedValue(o,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:o})}handleStreamingToken(t){let n,r,o,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),c=this.getNestedValue(u,"streamingToken");a=this.getNestedString(c,"token","text")||this.getNestedString(c,"token","content")||"";const d=this.getNestedValue(c,"sequenceNumber");typeof d=="number"&&(n=d);const h=this.getNestedString(c,"targetMessageIdentifier");h&&(r=h);const p=this.getNestedString(c,"tokenType");p&&(o=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",B(B(B({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),o?{tokenType:o}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),o=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(o,"progressMessage","text")||this.getNestedString(o,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(o,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var o,a,u,c,d,h,p;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries;if(r&&r.length>0)for(const g of r){const T=g.participant,y=g.displayName||(T==null?void 0:T.displayName)||((o=t.conversationEntry)==null?void 0:o.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((u=(a=t.conversationEntry)==null?void 0:a.sender)==null?void 0:u.role)||"",v=g.operation||g.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(v)})}else{const g=((c=t.conversationEntry)==null?void 0:c.senderDisplayName)||n.participantName||((d=n.participant)==null?void 0:d.displayName)||"Agent",T=n.operation||n.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:((p=(h=t.conversationEntry)==null?void 0:h.sender)==null?void 0:p.role)||"",name:g},action:this.normalizeParticipantAction(T)})}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return $e(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new nd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,o){return $e(this,null,function*(){const a=(o==null?void 0:o.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(o==null?void 0:o.timeout)||this.timeout);const h=B({"Content-Type":"application/json"},o==null?void 0:o.headers);a&&this._accessToken&&(h.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:h,signal:(o==null?void 0:o.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const g=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!g.ok){const T=yield g.text().catch(()=>g.statusText);if(g.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new nd(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new nd(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new n_(`Request ${t} ${n} failed (${g.status}): ${T}`,g.status,T)}return g.status===204||t==="DELETE"?{}:g.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(c),d instanceof $r)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new Ym("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const h=100*Math.random(),p=300*Math.pow(2,u-1)+h;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(g=>setTimeout(g,p));continue}throw new Ym(`Network error: ${d.message}`,u,{cause:d})}throw new $r(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new $r("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const D="cim-widget",Ar=`--${D}`,Vr={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},o_=(e=Vr)=>({[`${Ar}-primary-color`]:e.primaryColor||Vr.primaryColor,[`${Ar}-secondary-color`]:e.secondaryColor||Vr.secondaryColor,[`${Ar}-font-color`]:e.fontColor||Vr.fontColor,[`${Ar}-font-family`]:e.fontFamily||Vr.fontFamily,[`${Ar}-background-color`]:e.backgroundColor||Vr.backgroundColor,[`${Ar}-border-color`]:e.borderColor||Vr.borderColor,[`${Ar}-border-radius`]:e.borderRadius||Vr.borderRadius});function Wm(e,t){return function(){return e.apply(t,arguments)}}const{toString:s_}=Object.prototype,{getPrototypeOf:du}=Object,{iterator:fu,toStringTag:Gm}=Symbol,hu=(e=>t=>{const n=s_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>hu(t)===e),pu=e=>t=>typeof t===e,{isArray:co}=Array,fo=pu("undefined");function _s(e){return e!==null&&!fo(e)&&e.constructor!==null&&!fo(e.constructor)&&un(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Km=qn("ArrayBuffer");function a_(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Km(e.buffer),t}const u_=pu("string"),un=pu("function"),Qm=pu("number"),vs=e=>e!==null&&typeof e=="object",l_=e=>e===!0||e===!1,mu=e=>{if(hu(e)!=="object")return!1;const t=du(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Gm in e)&&!(fu in e)},c_=e=>{if(!vs(e)||_s(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},d_=qn("Date"),f_=qn("File"),h_=e=>!!(e&&typeof e.uri!="undefined"),p_=e=>e&&typeof e.getParts!="undefined",m_=qn("Blob"),g_=qn("FileList"),E_=e=>vs(e)&&un(e.pipe);function y_(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Xm=y_(),Jm=typeof Xm.FormData!="undefined"?Xm.FormData:void 0,b_=e=>{if(!e)return!1;if(Jm&&e instanceof Jm)return!0;const t=du(e);if(!t||t===Object.prototype||!un(e.append))return!1;const n=hu(e);return n==="formdata"||n==="object"&&un(e.toString)&&e.toString()==="[object FormData]"},T_=qn("URLSearchParams"),[x_,w_,__,v_]=["ReadableStream","Request","Response","Headers"].map(qn),S_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ss(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),co(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(_s(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function Zm(e,t){if(_s(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _i=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,e0=e=>!fo(e)&&e!==_i;function rd(...e){const{caseless:t,skipUndefined:n}=e0(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&Zm(r,u)||u,d=id(r,c)?r[c]:void 0;mu(d)&&mu(a)?r[c]=rd(d,a):mu(a)?r[c]=rd({},a):co(a)?r[c]=a.slice():(!n||!fo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&Ss(e[a],o);return r}const A_=(e,t,n,{allOwnKeys:r}={})=>(Ss(t,(o,a)=>{n&&un(o)?Object.defineProperty(e,a,{__proto__:null,value:Wm(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),C_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),k_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},N_=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&du(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},O_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},I_=e=>{if(!e)return null;if(co(e))return e;let t=e.length;if(!Qm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},R_=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&du(Uint8Array)),P_=(e,t)=>{const r=(e&&e[fu]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},L_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},D_=qn("HTMLFormElement"),M_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),id=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F_=qn("RegExp"),t0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ss(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},B_=e=>{t0(e,(t,n)=>{if(un(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(un(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},U_=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return co(e)?r(e):r(String(e).split(t)),n},H_=()=>{},z_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function j_(e){return!!(e&&un(e.append)&&e[Gm]==="FormData"&&e[fu])}const $_=e=>{const t=new WeakSet,n=r=>{if(vs(r)){if(t.has(r))return;if(_s(r))return r;if(!("toJSON"in r)){t.add(r);const o=co(r)?[]:{};return Ss(r,(a,u)=>{const c=n(a);!fo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},V_=qn("AsyncFunction"),q_=e=>e&&(vs(e)||un(e))&&un(e.then)&&un(e.catch),n0=((e,t)=>e?setImmediate:t?((n,r)=>(_i.addEventListener("message",({source:o,data:a})=>{o===_i&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_i.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",un(_i.postMessage)),Y_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(_i):typeof process!="undefined"&&process.nextTick||n0,V={isArray:co,isArrayBuffer:Km,isBuffer:_s,isFormData:b_,isArrayBufferView:a_,isString:u_,isNumber:Qm,isBoolean:l_,isObject:vs,isPlainObject:mu,isEmptyObject:c_,isReadableStream:x_,isRequest:w_,isResponse:__,isHeaders:v_,isUndefined:fo,isDate:d_,isFile:f_,isReactNativeBlob:h_,isReactNative:p_,isBlob:m_,isRegExp:F_,isFunction:un,isStream:E_,isURLSearchParams:T_,isTypedArray:R_,isFileList:g_,forEach:Ss,merge:rd,extend:A_,trim:S_,stripBOM:C_,inherits:k_,toFlatObject:N_,kindOf:hu,kindOfTest:qn,endsWith:O_,toArray:I_,forEachEntry:P_,matchAll:L_,isHTMLForm:D_,hasOwnProperty:id,hasOwnProp:id,reduceDescriptors:t0,freezeMethods:B_,toObjectSet:U_,toCamelCase:M_,noop:H_,toFiniteNumber:z_,findKey:Zm,global:_i,isContextDefined:e0,isSpecCompliantForm:j_,toJSONObject:$_,isAsyncFn:V_,isThenable:q_,setImmediate:n0,asap:Y_,isIterable:e=>e!=null&&un(e[fu])},W_=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),G_=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
9
|
-
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&
|
|
10
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[i0]=this[i0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=As(u);r[c]||(rv(o,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(tn);const iv="[REDACTED ****]";function ov(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function sv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof tn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const h=o(c);V.isUndefined(h)||(u[d]=h)});else{if(!V.isPlainObject(a)&&ov(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?iv:o(d);V.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ce=class r2 extends Error{static from(t,n,r,o,a,u){const c=new r2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?sv(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const av=null;function ad(e){return V.isPlainObject(e)||V.isArray(e)}function o0(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function ud(e,t,n){return e?e.concat(t).map(function(o,a){return o=o0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function uv(e){return V.isArray(e)&&!e.some(ad)}const lv=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function Eu(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,A){return!V.isUndefined(A[S])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,h=c&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function p(v){if(v===null)return"";if(V.isDate(v))return v.toISOString();if(V.isBoolean(v))return v.toString();if(!h&&V.isBlob(v))throw new Ce("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(v)||V.isTypedArray(v)?h&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function g(v,S,A){let O=v;if(V.isReactNative(t)&&V.isReactNativeBlob(v))return t.append(ud(A,S,a),p(v)),!1;if(v&&!A&&typeof v=="object"){if(V.endsWith(S,"{}"))S=r?S:S.slice(0,-2),v=JSON.stringify(v);else if(V.isArray(v)&&uv(v)||(V.isFileList(v)||V.endsWith(S,"[]"))&&(O=V.toArray(v)))return S=o0(S),O.forEach(function(H,W){!(V.isUndefined(H)||H===null)&&t.append(u===!0?ud([S],W,a):u===null?S:S+"[]",p(H))}),!1}return ad(v)?!0:(t.append(ud(A,S,a),p(v)),!1)}const T=[],y=Object.assign(lv,{defaultVisitor:g,convertValue:p,isVisitable:ad});function x(v,S,A=0){if(!V.isUndefined(v)){if(A>d)throw new Ce("Object is too deeply nested ("+A+" levels). Max depth: "+d,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(v)!==-1)throw Error("Circular reference detected in "+S.join("."));T.push(v),V.forEach(v,function(R,H){(!(V.isUndefined(R)||R===null)&&o.call(t,R,V.isString(H)?H.trim():H,S,y))===!0&&x(R,S?S.concat(H):[H],A+1)}),T.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return x(e),t}function s0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ld(e,t){this._pairs=[],e&&Eu(e,this,t)}const a0=ld.prototype;a0.append=function(t,n){this._pairs.push([t,n])},a0.toString=function(t){const n=t?function(r){return t.call(this,r,s0)}:s0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function cv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function u0(e,t,n){if(!t)return e;const r=n&&n.encode||cv,o=V.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=V.isURLSearchParams(t)?t.toString():new ld(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class l0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},dv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ld,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},dd=typeof window!="undefined"&&typeof document!="undefined",fd=typeof navigator=="object"&&navigator||void 0,fv=dd&&(!fd||["ReactNative","NativeScript","NS"].indexOf(fd.product)<0),hv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pv=dd&&window.location.href||"http://localhost",Yt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dd,hasStandardBrowserEnv:fv,hasStandardBrowserWebWorkerEnv:hv,navigator:fd,origin:pv},Symbol.toStringTag,{value:"Module"}))),dv);function mv(e,t){return Eu(e,new Yt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Yt.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function gv(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ev(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function c0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=Ev(o[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(gv(r),o,n,0)}),n}return null}const ho=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function yv(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Cs={transitional:cd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(c0(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=ho(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return mv(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=ho(this,"env"),p=h&&h.FormData;return Eu(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),yv(t)):t}],transformResponse:[function(t){const n=ho(this,"transitional")||Cs.transitional,r=n&&n.forcedJSONParsing,o=ho(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,ho(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ce.from(d,Ce.ERR_BAD_RESPONSE,this,null,ho(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{Cs.headers[e]={}});function hd(e,t){const n=this||Cs,r=t||n,o=tn.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function d0(e){return!!(e&&e.__CANCEL__)}let ks=class extends Ce{constructor(t,n,r){super(t==null?"canceled":t,Ce.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function f0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ce("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ce.ERR_BAD_REQUEST:Ce.ERR_BAD_RESPONSE,n.config,n.request,n))}function bv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Tv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=r[a];u||(u=h),n[o]=d,r[o]=h;let g=a,T=0;for(;g!==o;)T+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const y=p&&h-p;return y?Math.round(T*1e3/y):void 0}}function xv(e,t){let n=0,r=1e3/t,o,a;const u=(h,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const p=Date.now(),g=p-n;g>=r?u(h,p):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const yu=(e,t,n=3)=>{let r=0;const o=Tv(50,250);return xv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,h=Math.max(0,d-r),p=o(h);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},h0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},p0=e=>(...t)=>V.asap(()=>e(...t)),wv=Yt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,_v=Yt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function vv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Sv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function m0(e,t,n){let r=!vv(t);return e&&(r||n===!1)?Sv(e,t):t}const g0=e=>e instanceof tn?B({},e):e;function vi(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,p,g,T){return V.isPlainObject(h)&&V.isPlainObject(p)?V.merge.call({caseless:T},h,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function o(h,p,g,T){if(V.isUndefined(p)){if(!V.isUndefined(h))return r(void 0,h,g,T)}else return r(h,p,g,T)}function a(h,p){if(!V.isUndefined(p))return r(void 0,p)}function u(h,p){if(V.isUndefined(p)){if(!V.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function c(h,p,g){if(V.hasOwnProp(t,g))return r(h,p);if(V.hasOwnProp(e,g))return r(void 0,h)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(h,p,g)=>o(g0(h),g0(p),g,!0)};return V.forEach(Object.keys(B(B({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=V.hasOwnProp(d,p)?d[p]:o,T=V.hasOwnProp(e,p)?e[p]:void 0,y=V.hasOwnProp(t,p)?t[p]:void 0,x=g(T,y,p);V.isUndefined(x)&&g!==c||(n[p]=x)}),n}const Av=["content-type","content-length"];function Cv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{Av.includes(r.toLowerCase())&&e.set(r,o)})}const kv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),E0=e=>{const t=vi({},e),n=T=>V.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=tn.from(c),t.url=u0(m0(h,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?kv(d.password):""))),V.isFormData(r)&&(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&Cv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Yt.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&wv(t.url))){const y=a&&u&&_v.read(u);y&&c.set(a,y)}return t},Nv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=E0(e);let a=o.data;const u=tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,p,g,T,y,x;function v(){y&&y(),x&&x(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function A(){if(!S)return;const R=tn.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:R,config:e,request:S};f0(function(K){n(K),v()},function(K){r(K),v()},W),S=null}"onloadend"in S?S.onloadend=A:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.startsWith("file:"))||setTimeout(A)},S.onabort=function(){S&&(r(new Ce("Request aborted",Ce.ECONNABORTED,e,S)),v(),S=null)},S.onerror=function(H){const W=H&&H.message?H.message:"Network Error",F=new Ce(W,Ce.ERR_NETWORK,e,S);F.event=H||null,r(F),v(),S=null},S.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||cd;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new Ce(H,W.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,S)),v(),S=null},a===void 0&&u.setContentType(null),"setRequestHeader"in S&&V.forEach(r0(u),function(H,W){S.setRequestHeader(W,H)}),V.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),c&&c!=="json"&&(S.responseType=o.responseType),h&&([T,x]=yu(h,!0),S.addEventListener("progress",T)),d&&S.upload&&([g,y]=yu(d),S.upload.addEventListener("progress",g),S.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=R=>{S&&(r(!R||R.type?new ks(null,e,S):R),S.abort(),v(),S=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const O=bv(o.url);if(O&&!Yt.protocols.includes(O)){r(new Ce("Unsupported protocol "+O+":",Ce.ERR_BAD_REQUEST,e));return}S.send(a||null)})},Ov=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const h=d instanceof Error?d:this.reason;n.abort(h instanceof Ce?h:new ks(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,o(new Ce(`timeout of ${t}ms exceeded`,Ce.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},Iv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Rv=function(e,t){return vm(this,null,function*(){try{for(var n=n2(Pv(e)),r,o,a;r=!(o=yield new ao(n.next())).done;r=!1){const u=o.value;yield*Sm(Iv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new ao(o.call(n)))}finally{if(a)throw a[0]}}})},Pv=function(e){return vm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Sm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ao(t.read());if(n)break;yield r}}finally{yield new ao(t.cancel())}})},y0=(e,t,n,r)=>{const o=Rv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return $e(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),h.close();return}let T=g.byteLength;if(n){let y=a+=T;n(y)}h.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})};function Lv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const x=r.charCodeAt(y+1),v=r.charCodeAt(y+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(u-=2,y+=2)}let d=0,h=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):p(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||p(h))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const h=r.charCodeAt(u+1);h>=56320&&h<=57343?(a+=4,u++):a+=3}else a+=3}return a}const pd="1.16.1",b0=64*1024,{isFunction:bu}=V,T0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Dv=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?bu(o):typeof fetch=="function",d=bu(a),h=bu(u);if(!c)return!1;const p=c&&bu(n),g=c&&(typeof r=="function"?(A=>O=>A.encode(O))(new r):A=>$e(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),T=d&&p&&T0(()=>{let A=!1;const O=new a(Yt.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),R=O.headers.has("Content-Type");return O.body!=null&&O.body.cancel(),A&&!R}),y=h&&p&&T0(()=>V.isReadableStream(new u("").body)),x={stream:y&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!x[A]&&(x[A]=(O,R)=>{let H=O&&O[A];if(H)return H.call(O);throw new Ce(`Response type '${A}' is not supported`,Ce.ERR_NOT_SUPPORT,R)})});const v=A=>$e(null,null,function*(){if(A==null)return 0;if(V.isBlob(A))return A.size;if(V.isSpecCompliantForm(A))return(yield new a(Yt.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(V.isArrayBufferView(A)||V.isArrayBuffer(A))return A.byteLength;if(V.isURLSearchParams(A)&&(A=A+""),V.isString(A))return(yield g(A)).byteLength}),S=(A,O)=>$e(null,null,function*(){const R=V.toFiniteNumber(A.getContentLength());return R==null?v(O):R});return A=>$e(null,null,function*(){let{url:O,method:R,data:H,signal:W,cancelToken:F,timeout:K,onDownloadProgress:de,onUploadProgress:ge,responseType:z,headers:ue,withCredentials:he="same-origin",fetchOptions:ee,maxContentLength:re,maxBodyLength:te}=E0(A);const Te=V.isNumber(re)&&re>-1,oe=V.isNumber(te)&&te>-1;let X=o||fetch;z=z?(z+"").toLowerCase():"text";let se=Ov([W,F&&F.toAbortSignal()],K),C=null;const I=se&&se.unsubscribe&&(()=>{se.unsubscribe()});let G;try{if(Te&&typeof O=="string"&&O.startsWith("data:")&&Lv(O)>re)throw new Ce("maxContentLength size of "+re+" exceeded",Ce.ERR_BAD_RESPONSE,A,C);if(oe&&R!=="get"&&R!=="head"){const Se=yield S(ue,H);if(typeof Se=="number"&&isFinite(Se)&&Se>te)throw new Ce("Request body larger than maxBodyLength limit",Ce.ERR_BAD_REQUEST,A,C)}if(ge&&T&&R!=="get"&&R!=="head"&&(G=yield S(ue,H))!==0){let Se=new a(O,{method:"POST",body:H,duplex:"half"}),qe;if(V.isFormData(H)&&(qe=Se.headers.get("content-type"))&&ue.setContentType(qe),Se.body){const[ut,pn]=h0(G,yu(p0(ge)));H=y0(Se.body,b0,ut,pn)}}V.isString(he)||(he=he?"include":"omit");const N=d&&"credentials"in a.prototype;if(V.isFormData(H)){const Se=ue.getContentType();Se&&/^multipart\/form-data/i.test(Se)&&!/boundary=/i.test(Se)&&ue.delete("content-type")}ue.set("User-Agent","axios/"+pd,!1);const xe=ae(B({},ee),{signal:se,method:R.toUpperCase(),headers:r0(ue.normalize()),body:H,duplex:"half",credentials:N?he:void 0});C=d&&new a(O,xe);let Oe=yield d?X(C,ee):X(O,xe);if(Te){const Se=V.toFiniteNumber(Oe.headers.get("content-length"));if(Se!=null&&Se>re)throw new Ce("maxContentLength size of "+re+" exceeded",Ce.ERR_BAD_RESPONSE,A,C)}const Re=y&&(z==="stream"||z==="response");if(y&&Oe.body&&(de||Te||Re&&I)){const Se={};["status","statusText","headers"].forEach(Jn=>{Se[Jn]=Oe[Jn]});const qe=V.toFiniteNumber(Oe.headers.get("content-length")),[ut,pn]=de&&h0(qe,yu(p0(de),!0))||[];let Yi=0;const Zr=Jn=>{if(Te&&(Yi=Jn,Yi>re))throw new Ce("maxContentLength size of "+re+" exceeded",Ce.ERR_BAD_RESPONSE,A,C);ut&&ut(Jn)};Oe=new u(y0(Oe.body,b0,Zr,()=>{pn&&pn(),I&&I()}),Se)}z=z||"text";let He=yield x[V.findKey(x,z)||"text"](Oe,A);if(Te&&!y&&!Re){let Se;if(He!=null&&(typeof He.byteLength=="number"?Se=He.byteLength:typeof He.size=="number"?Se=He.size:typeof He=="string"&&(Se=typeof r=="function"?new r().encode(He).byteLength:He.length)),typeof Se=="number"&&Se>re)throw new Ce("maxContentLength size of "+re+" exceeded",Ce.ERR_BAD_RESPONSE,A,C)}return!Re&&I&&I(),yield new Promise((Se,qe)=>{f0(Se,qe,{data:He,headers:tn.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:A,request:C})})}catch(N){if(I&&I(),se&&se.aborted&&se.reason instanceof Ce){const xe=se.reason;throw xe.config=A,C&&(xe.request=C),N!==xe&&(xe.cause=N),xe}throw N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,A,C,N&&N.response),{cause:N.cause||N}):Ce.from(N,N&&N.code,A,C,N&&N.response)}})},Mv=new Map,x0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,h,p=Mv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Dv(t)),p=h;return h};x0();const md={http:av,xhr:Nv,fetch:{get:x0}};V.forEach(md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const w0=e=>`- ${e}`,Fv=e=>V.isFunction(e)||e===null||e===!1;function Bv(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!Fv(r)&&(o=md[(c=String(r)).toLowerCase()],o===void 0))throw new Ce(`Unknown adapter '${c}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
11
|
-
`+u.map(
|
|
12
|
-
`):" "+
|
|
8
|
+
`);this.logger.debug(`SSE event: ${n}`,o.slice(0,200)),this.onEvent(n,o)}}class Vr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let s_=class extends Vr{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class Gm extends Vr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let id=class extends Vr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class a_{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class u_ extends i_{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:o={}}){var u,c,d,h,p,g,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=o.maxRetries)!=null?u:3,timeout:(c=o.timeout)!=null?c:15e3,maxReconnectAttempts:(d=o.maxReconnectAttempts)!=null?d:5,reconnectDelay:(h=o.reconnectDelay)!=null?h:2e3,enableLogging:(p=o.enableLogging)!=null?p:!1,platform:(g=o.platform)!=null?g:"Web",capabilitiesVersion:(T=o.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new a_(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return $e(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return $e(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return $e(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Vr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return $e(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return $e(this,null,function*(){var u,c,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),o="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",o);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(c=a.openConversationsFound)!=null?c:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return $e(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const o=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${o?`?${o}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}resumeConversation(t){if(this.assertConnected(),!t)throw new Vr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return $e(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return $e(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new o_(n,r,(o,a)=>this.handleSSEEvent(o,a),o=>this.handleSSEClose(o),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>$e(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const o=r instanceof Error?r.message:String(r);if(o.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${o}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(o){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",o=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:o,failureType:o?void 0:r,raw:n}),o||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var c;const n=t.conversationEntry;if(!n)return;const r=((c=n.sender)==null?void 0:c.role)||"";if(r==="EndUser"||r==="Customer")return;const o=this.parseEntryPayload(n),a=this.getNestedValue(o,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:o})}handleStreamingToken(t){let n,r,o,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),c=this.getNestedValue(u,"streamingToken");a=this.getNestedString(c,"token","text")||this.getNestedString(c,"token","content")||"";const d=this.getNestedValue(c,"sequenceNumber");typeof d=="number"&&(n=d);const h=this.getNestedString(c,"targetMessageIdentifier");h&&(r=h);const p=this.getNestedString(c,"tokenType");p&&(o=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",B(B(B({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),o?{tokenType:o}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),o=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(o,"progressMessage","text")||this.getNestedString(o,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(o,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var o,a,u,c,d,h,p;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries;if(r&&r.length>0)for(const g of r){const T=g.participant,y=g.displayName||(T==null?void 0:T.displayName)||((o=t.conversationEntry)==null?void 0:o.senderDisplayName)||"Agent",w=(T==null?void 0:T.role)||((u=(a=t.conversationEntry)==null?void 0:a.sender)==null?void 0:u.role)||"",v=g.operation||g.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:w,name:y},action:this.normalizeParticipantAction(v)})}else{const g=((c=t.conversationEntry)==null?void 0:c.senderDisplayName)||n.participantName||((d=n.participant)==null?void 0:d.displayName)||"Agent",T=n.operation||n.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:((p=(h=t.conversationEntry)==null?void 0:h.sender)==null?void 0:p.role)||"",name:g},action:this.normalizeParticipantAction(T)})}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return $e(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new id("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,o){return $e(this,null,function*(){const a=(o==null?void 0:o.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(o==null?void 0:o.timeout)||this.timeout);const h=B({"Content-Type":"application/json"},o==null?void 0:o.headers);a&&this._accessToken&&(h.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:h,signal:(o==null?void 0:o.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const g=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!g.ok){const T=yield g.text().catch(()=>g.statusText);if(g.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new id(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new id(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new s_(`Request ${t} ${n} failed (${g.status}): ${T}`,g.status,T)}return g.status===204||t==="DELETE"?{}:g.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(c),d instanceof Vr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new Gm("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const h=100*Math.random(),p=300*Math.pow(2,u-1)+h;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(g=>setTimeout(g,p));continue}throw new Gm(`Network error: ${d.message}`,u,{cause:d})}throw new Vr(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new Vr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const D="cim-widget",Cr=`--${D}`,qr={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},l_=(e=qr)=>({[`${Cr}-primary-color`]:e.primaryColor||qr.primaryColor,[`${Cr}-secondary-color`]:e.secondaryColor||qr.secondaryColor,[`${Cr}-font-color`]:e.fontColor||qr.fontColor,[`${Cr}-font-family`]:e.fontFamily||qr.fontFamily,[`${Cr}-background-color`]:e.backgroundColor||qr.backgroundColor,[`${Cr}-border-color`]:e.borderColor||qr.borderColor,[`${Cr}-border-radius`]:e.borderRadius||qr.borderRadius});function Km(e,t){return function(){return e.apply(t,arguments)}}const{toString:c_}=Object.prototype,{getPrototypeOf:hu}=Object,{iterator:pu,toStringTag:Qm}=Symbol,mu=(e=>t=>{const n=c_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>mu(t)===e),gu=e=>t=>typeof t===e,{isArray:fo}=Array,ho=gu("undefined");function Ss(e){return e!==null&&!ho(e)&&e.constructor!==null&&!ho(e.constructor)&&un(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xm=qn("ArrayBuffer");function d_(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xm(e.buffer),t}const f_=gu("string"),un=gu("function"),Jm=gu("number"),As=e=>e!==null&&typeof e=="object",h_=e=>e===!0||e===!1,Eu=e=>{if(mu(e)!=="object")return!1;const t=hu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Qm in e)&&!(pu in e)},p_=e=>{if(!As(e)||Ss(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},m_=qn("Date"),g_=qn("File"),E_=e=>!!(e&&typeof e.uri!="undefined"),y_=e=>e&&typeof e.getParts!="undefined",b_=qn("Blob"),T_=qn("FileList"),x_=e=>As(e)&&un(e.pipe);function w_(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Zm=w_(),e0=typeof Zm.FormData!="undefined"?Zm.FormData:void 0,__=e=>{if(!e)return!1;if(e0&&e instanceof e0)return!0;const t=hu(e);if(!t||t===Object.prototype||!un(e.append))return!1;const n=mu(e);return n==="formdata"||n==="object"&&un(e.toString)&&e.toString()==="[object FormData]"},v_=qn("URLSearchParams"),[S_,A_,C_,k_]=["ReadableStream","Request","Response","Headers"].map(qn),N_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),fo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Ss(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function t0(e,t){if(Ss(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const vi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,n0=e=>!ho(e)&&e!==vi;function od(...e){const{caseless:t,skipUndefined:n}=n0(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&t0(r,u)||u,d=sd(r,c)?r[c]:void 0;Eu(d)&&Eu(a)?r[c]=od(d,a):Eu(a)?r[c]=od({},a):fo(a)?r[c]=a.slice():(!n||!ho(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&Cs(e[a],o);return r}const O_=(e,t,n,{allOwnKeys:r}={})=>(Cs(t,(o,a)=>{n&&un(o)?Object.defineProperty(e,a,{__proto__:null,value:Km(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),I_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),R_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},P_=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&hu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},L_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},D_=e=>{if(!e)return null;if(fo(e))return e;let t=e.length;if(!Jm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},M_=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&hu(Uint8Array)),F_=(e,t)=>{const r=(e&&e[pu]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},B_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},U_=qn("HTMLFormElement"),H_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),sd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),z_=qn("RegExp"),r0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Cs(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},j_=e=>{r0(e,(t,n)=>{if(un(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(un(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$_=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return fo(e)?r(e):r(String(e).split(t)),n},V_=()=>{},q_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Y_(e){return!!(e&&un(e.append)&&e[Qm]==="FormData"&&e[pu])}const W_=e=>{const t=new WeakSet,n=r=>{if(As(r)){if(t.has(r))return;if(Ss(r))return r;if(!("toJSON"in r)){t.add(r);const o=fo(r)?[]:{};return Cs(r,(a,u)=>{const c=n(a);!ho(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},G_=qn("AsyncFunction"),K_=e=>e&&(As(e)||un(e))&&un(e.then)&&un(e.catch),i0=((e,t)=>e?setImmediate:t?((n,r)=>(vi.addEventListener("message",({source:o,data:a})=>{o===vi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),vi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",un(vi.postMessage)),Q_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(vi):typeof process!="undefined"&&process.nextTick||i0,G={isArray:fo,isArrayBuffer:Xm,isBuffer:Ss,isFormData:__,isArrayBufferView:d_,isString:f_,isNumber:Jm,isBoolean:h_,isObject:As,isPlainObject:Eu,isEmptyObject:p_,isReadableStream:S_,isRequest:A_,isResponse:C_,isHeaders:k_,isUndefined:ho,isDate:m_,isFile:g_,isReactNativeBlob:E_,isReactNative:y_,isBlob:b_,isRegExp:z_,isFunction:un,isStream:x_,isURLSearchParams:v_,isTypedArray:M_,isFileList:T_,forEach:Cs,merge:od,extend:O_,trim:N_,stripBOM:I_,inherits:R_,toFlatObject:P_,kindOf:mu,kindOfTest:qn,endsWith:L_,toArray:D_,forEachEntry:F_,matchAll:B_,isHTMLForm:U_,hasOwnProperty:sd,hasOwnProp:sd,reduceDescriptors:r0,freezeMethods:j_,toObjectSet:$_,toCamelCase:H_,noop:V_,toFiniteNumber:q_,findKey:t0,global:vi,isContextDefined:n0,isSpecCompliantForm:Y_,toJSONObject:W_,isAsyncFn:G_,isThenable:K_,setImmediate:i0,asap:Q_,isIterable:e=>e!=null&&un(e[pu])},X_=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),J_=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
9
|
+
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&X_[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Z_(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const ev=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),tv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ad(e,t){return G.isArray(e)?e.map(n=>ad(n,t)):Z_(String(e).replace(t,""))}const nv=e=>ad(e,ev),rv=e=>ad(e,tv);function o0(e){const t=Object.create(null);return G.forEach(e.toJSON(),(n,r)=>{t[r]=rv(n)}),t}const s0=Symbol("internals");function ks(e){return e&&String(e).trim().toLowerCase()}function yu(e){return e===!1||e==null?e:G.isArray(e)?e.map(yu):nv(String(e))}function iv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const ov=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ud(e,t,n,r,o){if(G.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function sv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function av(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,h){const p=ks(d);if(!p)throw new Error("header name must be a non-empty string");const g=G.findKey(o,p);(!g||o[g]===void 0||h===!0||h===void 0&&o[g]!==!1)&&(o[g||d]=yu(c))}const u=(c,d)=>G.forEach(c,(h,p)=>a(h,p,d));if(G.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(G.isString(t)&&(t=t.trim())&&!ov(t))u(J_(t),n);else if(G.isObject(t)&&G.isIterable(t)){let c={},d,h;for(const p of t){if(!G.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[h=p[0]]=(d=c[h])?G.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ks(t),t){const r=G.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return iv(o);if(G.isFunction(n))return n.call(this,o,r);if(G.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ks(t),t){const r=G.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ud(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=ks(u),u){const c=G.findKey(r,u);c&&(!n||ud(r,r[c],c,n))&&(delete r[c],o=!0)}}return G.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||ud(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return G.forEach(this,(o,a)=>{const u=G.findKey(r,a);if(u){n[u]=yu(o),delete n[a];return}const c=t?sv(a):String(a).trim();c!==a&&delete n[a],n[c]=yu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
10
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[s0]=this[s0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=ks(u);r[c]||(av(o,u),r[c]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}};tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),G.freezeMethods(tn);const uv="[REDACTED ****]";function lv(e){if(G.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(G.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function cv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||G.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof tn&&(a=a.toJSON()),r.push(a);let u;if(G.isArray(a))u=[],a.forEach((c,d)=>{const h=o(c);G.isUndefined(h)||(u[d]=h)});else{if(!G.isPlainObject(a)&&lv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?uv:o(d);G.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ae=class a2 extends Error{static from(t,n,r,o,a,u){const c=new a2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&G.hasOwnProp(t,"redact")?t.redact:void 0,r=G.isArray(n)&&n.length>0?cv(t,n):G.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ae.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ae.ERR_BAD_OPTION="ERR_BAD_OPTION",Ae.ECONNABORTED="ECONNABORTED",Ae.ETIMEDOUT="ETIMEDOUT",Ae.ECONNREFUSED="ECONNREFUSED",Ae.ERR_NETWORK="ERR_NETWORK",Ae.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ae.ERR_DEPRECATED="ERR_DEPRECATED",Ae.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ae.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ae.ERR_CANCELED="ERR_CANCELED",Ae.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ae.ERR_INVALID_URL="ERR_INVALID_URL",Ae.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const dv=null;function ld(e){return G.isPlainObject(e)||G.isArray(e)}function a0(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function cd(e,t,n){return e?e.concat(t).map(function(o,a){return o=a0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function fv(e){return G.isArray(e)&&!e.some(ld)}const hv=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function bu(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,C){return!G.isUndefined(C[A])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,h=c&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function p(v){if(v===null)return"";if(G.isDate(v))return v.toISOString();if(G.isBoolean(v))return v.toString();if(!h&&G.isBlob(v))throw new Ae("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(v)||G.isTypedArray(v)?h&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function g(v,A,C){let k=v;if(G.isReactNative(t)&&G.isReactNativeBlob(v))return t.append(cd(C,A,a),p(v)),!1;if(v&&!C&&typeof v=="object"){if(G.endsWith(A,"{}"))A=r?A:A.slice(0,-2),v=JSON.stringify(v);else if(G.isArray(v)&&fv(v)||(G.isFileList(v)||G.endsWith(A,"[]"))&&(k=G.toArray(v)))return A=a0(A),k.forEach(function(U,Y){!(G.isUndefined(U)||U===null)&&t.append(u===!0?cd([A],Y,a):u===null?A:A+"[]",p(U))}),!1}return ld(v)?!0:(t.append(cd(C,A,a),p(v)),!1)}const T=[],y=Object.assign(hv,{defaultVisitor:g,convertValue:p,isVisitable:ld});function w(v,A,C=0){if(!G.isUndefined(v)){if(C>d)throw new Ae("Object is too deeply nested ("+C+" levels). Max depth: "+d,Ae.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(v)!==-1)throw Error("Circular reference detected in "+A.join("."));T.push(v),G.forEach(v,function(R,U){(!(G.isUndefined(R)||R===null)&&o.call(t,R,G.isString(U)?U.trim():U,A,y))===!0&&w(R,A?A.concat(U):[U],C+1)}),T.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return w(e),t}function u0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function dd(e,t){this._pairs=[],e&&bu(e,this,t)}const l0=dd.prototype;l0.append=function(t,n){this._pairs.push([t,n])},l0.toString=function(t){const n=t?function(r){return t.call(this,r,u0)}:u0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function pv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function c0(e,t,n){if(!t)return e;const r=n&&n.encode||pv,o=G.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=G.isURLSearchParams(t)?t.toString():new dd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class d0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},mv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:dd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},hd=typeof window!="undefined"&&typeof document!="undefined",pd=typeof navigator=="object"&&navigator||void 0,gv=hd&&(!pd||["ReactNative","NativeScript","NS"].indexOf(pd.product)<0),Ev=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yv=hd&&window.location.href||"http://localhost",Yt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hd,hasStandardBrowserEnv:gv,hasStandardBrowserWebWorkerEnv:Ev,navigator:pd,origin:yv},Symbol.toStringTag,{value:"Module"}))),mv);function bv(e,t){return bu(e,new Yt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Yt.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Tv(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xv(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function f0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&G.isArray(o)?o.length:u,d?(G.hasOwnProp(o,u)?o[u]=G.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!G.hasOwnProp(o,u)||!G.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&G.isArray(o[u])&&(o[u]=xv(o[u])),!c)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,o)=>{t(Tv(r),o,n,0)}),n}return null}const po=(e,t)=>e!=null&&G.hasOwnProp(e,t)?e[t]:void 0;function wv(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ns={transitional:fd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return o?JSON.stringify(f0(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=po(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return bv(t,d).toString();if((c=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=po(this,"env"),p=h&&h.FormData;return bu(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),wv(t)):t}],transformResponse:[function(t){const n=po(this,"transitional")||Ns.transitional,r=n&&n.forcedJSONParsing,o=po(this,"responseType"),a=o==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,po(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ae.from(d,Ae.ERR_BAD_RESPONSE,this,null,po(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch","query"],e=>{Ns.headers[e]={}});function md(e,t){const n=this||Ns,r=t||n,o=tn.from(r.headers);let a=r.data;return G.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function h0(e){return!!(e&&e.__CANCEL__)}let Os=class extends Ae{constructor(t,n,r){super(t==null?"canceled":t,Ae.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function p0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ae("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ae.ERR_BAD_REQUEST:Ae.ERR_BAD_RESPONSE,n.config,n.request,n))}function _v(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function vv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=r[a];u||(u=h),n[o]=d,r[o]=h;let g=a,T=0;for(;g!==o;)T+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const y=p&&h-p;return y?Math.round(T*1e3/y):void 0}}function Sv(e,t){let n=0,r=1e3/t,o,a;const u=(h,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const p=Date.now(),g=p-n;g>=r?u(h,p):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const Tu=(e,t,n=3)=>{let r=0;const o=vv(50,250);return Sv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,h=Math.max(0,d-r),p=o(h);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},m0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},g0=e=>(...t)=>G.asap(()=>e(...t)),Av=Yt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,Cv=Yt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];G.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),G.isString(r)&&c.push(`path=${r}`),G.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),G.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function kv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function E0(e,t,n){let r=!kv(t);return e&&(r||n===!1)?Nv(e,t):t}const y0=e=>e instanceof tn?B({},e):e;function Si(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,p,g,T){return G.isPlainObject(h)&&G.isPlainObject(p)?G.merge.call({caseless:T},h,p):G.isPlainObject(p)?G.merge({},p):G.isArray(p)?p.slice():p}function o(h,p,g,T){if(G.isUndefined(p)){if(!G.isUndefined(h))return r(void 0,h,g,T)}else return r(h,p,g,T)}function a(h,p){if(!G.isUndefined(p))return r(void 0,p)}function u(h,p){if(G.isUndefined(p)){if(!G.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function c(h,p,g){if(G.hasOwnProp(t,g))return r(h,p);if(G.hasOwnProp(e,g))return r(void 0,h)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(h,p,g)=>o(y0(h),y0(p),g,!0)};return G.forEach(Object.keys(B(B({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=G.hasOwnProp(d,p)?d[p]:o,T=G.hasOwnProp(e,p)?e[p]:void 0,y=G.hasOwnProp(t,p)?t[p]:void 0,w=g(T,y,p);G.isUndefined(w)&&g!==c||(n[p]=w)}),n}const Ov=["content-type","content-length"];function Iv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{Ov.includes(r.toLowerCase())&&e.set(r,o)})}const Rv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),b0=e=>{const t=Si({},e),n=T=>G.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=tn.from(c),t.url=c0(E0(h,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?Rv(d.password):""))),G.isFormData(r)&&(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):G.isFunction(r.getHeaders)&&Iv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Yt.hasStandardBrowserEnv&&(G.isFunction(o)&&(o=o(t)),o===!0||o==null&&Av(t.url))){const y=a&&u&&Cv.read(u);y&&c.set(a,y)}return t},Pv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=b0(e);let a=o.data;const u=tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,p,g,T,y,w;function v(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function C(){if(!A)return;const R=tn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:R,config:e,request:A};p0(function(X){n(X),v()},function(X){r(X),v()},Y),A=null}"onloadend"in A?A.onloadend=C:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(C)},A.onabort=function(){A&&(r(new Ae("Request aborted",Ae.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(U){const Y=U&&U.message?U.message:"Network Error",F=new Ae(Y,Ae.ERR_NETWORK,e,A);F.event=U||null,r(F),v(),A=null},A.ontimeout=function(){let U=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const Y=o.transitional||fd;o.timeoutErrorMessage&&(U=o.timeoutErrorMessage),r(new Ae(U,Y.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&G.forEach(o0(u),function(U,Y){A.setRequestHeader(Y,U)}),G.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),h&&([T,w]=Tu(h,!0),A.addEventListener("progress",T)),d&&A.upload&&([g,y]=Tu(d),A.upload.addEventListener("progress",g),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=R=>{A&&(r(!R||R.type?new Os(null,e,A):R),A.abort(),v(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const k=_v(o.url);if(k&&!Yt.protocols.includes(k)){r(new Ae("Unsupported protocol "+k+":",Ae.ERR_BAD_REQUEST,e));return}A.send(a||null)})},Lv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const h=d instanceof Error?d:this.reason;n.abort(h instanceof Ae?h:new Os(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,o(new Ae(`timeout of ${t}ms exceeded`,Ae.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>G.asap(u),c},Dv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Mv=function(e,t){return Am(this,null,function*(){try{for(var n=s2(Fv(e)),r,o,a;r=!(o=yield new uo(n.next())).done;r=!1){const u=o.value;yield*Cm(Dv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new uo(o.call(n)))}finally{if(a)throw a[0]}}})},Fv=function(e){return Am(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Cm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new uo(t.read());if(n)break;yield r}}finally{yield new uo(t.cancel())}})},T0=(e,t,n,r)=>{const o=Mv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return $e(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),h.close();return}let T=g.byteLength;if(n){let y=a+=T;n(y)}h.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})};function Bv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const w=r.charCodeAt(y+1),v=r.charCodeAt(y+2);(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(u-=2,y+=2)}let d=0,h=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):p(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||p(h))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const h=r.charCodeAt(u+1);h>=56320&&h<=57343?(a+=4,u++):a+=3}else a+=3}return a}const gd="1.16.1",x0=64*1024,{isFunction:xu}=G,w0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Uv=e=>{const t=G.global!==void 0&&G.global!==null?G.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=G.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?xu(o):typeof fetch=="function",d=xu(a),h=xu(u);if(!c)return!1;const p=c&&xu(n),g=c&&(typeof r=="function"?(C=>k=>C.encode(k))(new r):C=>$e(null,null,function*(){return new Uint8Array(yield new a(C).arrayBuffer())})),T=d&&p&&w0(()=>{let C=!1;const k=new a(Yt.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),R=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),C&&!R}),y=h&&p&&w0(()=>G.isReadableStream(new u("").body)),w={stream:y&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!w[C]&&(w[C]=(k,R)=>{let U=k&&k[C];if(U)return U.call(k);throw new Ae(`Response type '${C}' is not supported`,Ae.ERR_NOT_SUPPORT,R)})});const v=C=>$e(null,null,function*(){if(C==null)return 0;if(G.isBlob(C))return C.size;if(G.isSpecCompliantForm(C))return(yield new a(Yt.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(G.isArrayBufferView(C)||G.isArrayBuffer(C))return C.byteLength;if(G.isURLSearchParams(C)&&(C=C+""),G.isString(C))return(yield g(C)).byteLength}),A=(C,k)=>$e(null,null,function*(){const R=G.toFiniteNumber(C.getContentLength());return R==null?v(k):R});return C=>$e(null,null,function*(){let{url:k,method:R,data:U,signal:Y,cancelToken:F,timeout:X,onDownloadProgress:ce,onUploadProgress:de,responseType:z,headers:oe,withCredentials:he="same-origin",fetchOptions:ae,maxContentLength:se,maxBodyLength:Te}=b0(C);const Ce=G.isNumber(se)&&se>-1,ee=G.isNumber(Te)&&Te>-1;let V=o||fetch;z=z?(z+"").toLowerCase():"text";let q=Lv([Y,F&&F.toAbortSignal()],X),S=null;const I=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let W;try{if(Ce&&typeof k=="string"&&k.startsWith("data:")&&Bv(k)>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S);if(ee&&R!=="get"&&R!=="head"){const ve=yield A(oe,U);if(typeof ve=="number"&&isFinite(ve)&&ve>Te)throw new Ae("Request body larger than maxBodyLength limit",Ae.ERR_BAD_REQUEST,C,S)}if(de&&T&&R!=="get"&&R!=="head"&&(W=yield A(oe,U))!==0){let ve=new a(k,{method:"POST",body:U,duplex:"half"}),qe;if(G.isFormData(U)&&(qe=ve.headers.get("content-type"))&&oe.setContentType(qe),ve.body){const[ut,pn]=m0(W,Tu(g0(de)));U=T0(ve.body,x0,ut,pn)}}G.isString(he)||(he=he?"include":"omit");const O=d&&"credentials"in a.prototype;if(G.isFormData(U)){const ve=oe.getContentType();ve&&/^multipart\/form-data/i.test(ve)&&!/boundary=/i.test(ve)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+gd,!1);const be=ie(B({},ae),{signal:q,method:R.toUpperCase(),headers:o0(oe.normalize()),body:U,duplex:"half",credentials:O?he:void 0});S=d&&new a(k,be);let Oe=yield d?V(S,ae):V(k,be);if(Ce){const ve=G.toFiniteNumber(Oe.headers.get("content-length"));if(ve!=null&&ve>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S)}const Re=y&&(z==="stream"||z==="response");if(y&&Oe.body&&(ce||Ce||Re&&I)){const ve={};["status","statusText","headers"].forEach(Jn=>{ve[Jn]=Oe[Jn]});const qe=G.toFiniteNumber(Oe.headers.get("content-length")),[ut,pn]=ce&&m0(qe,Tu(g0(ce),!0))||[];let Wi=0;const ei=Jn=>{if(Ce&&(Wi=Jn,Wi>se))throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S);ut&&ut(Jn)};Oe=new u(T0(Oe.body,x0,ei,()=>{pn&&pn(),I&&I()}),ve)}z=z||"text";let He=yield w[G.findKey(w,z)||"text"](Oe,C);if(Ce&&!y&&!Re){let ve;if(He!=null&&(typeof He.byteLength=="number"?ve=He.byteLength:typeof He.size=="number"?ve=He.size:typeof He=="string"&&(ve=typeof r=="function"?new r().encode(He).byteLength:He.length)),typeof ve=="number"&&ve>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S)}return!Re&&I&&I(),yield new Promise((ve,qe)=>{p0(ve,qe,{data:He,headers:tn.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:C,request:S})})}catch(O){if(I&&I(),q&&q.aborted&&q.reason instanceof Ae){const be=q.reason;throw be.config=C,S&&(be.request=S),O!==be&&(be.cause=O),be}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,C,S,O&&O.response),{cause:O.cause||O}):Ae.from(O,O&&O.code,C,S,O&&O.response)}})},Hv=new Map,_0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,h,p=Hv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Uv(t)),p=h;return h};_0();const Ed={http:dv,xhr:Pv,fetch:{get:_0}};G.forEach(Ed,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const v0=e=>`- ${e}`,zv=e=>G.isFunction(e)||e===null||e===!1;function jv(e,t){e=G.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!zv(r)&&(o=Ed[(c=String(r)).toLowerCase()],o===void 0))throw new Ae(`Unknown adapter '${c}'`);if(o&&(G.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
11
|
+
`+u.map(v0).join(`
|
|
12
|
+
`):" "+v0(u[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const S0={getAdapter:jv,adapters:Ed};function yd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Os(null,e)}function A0(e){return yd(e),e.headers=tn.from(e.headers),e.data=md.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),S0.getAdapter(e.adapter||Ns.adapter,e)(e).then(function(r){yd(e),e.response=r;try{r.data=md.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=tn.from(r.headers),r},function(r){if(!h0(r)&&(yd(e),r&&r.response)){e.response=r.response;try{r.response.data=md.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=tn.from(r.response.headers)}return Promise.reject(r)})}const wu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const C0={};wu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+gd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ae(o(u," has been removed"+(n?" in "+n:"")),Ae.ERR_DEPRECATED);return n&&!C0[u]&&(C0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},wu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function $v(e,t,n){if(typeof e!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Ae("option "+a+" must be "+d,Ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ae("Unknown option "+a,Ae.ERR_BAD_OPTION)}}const _u={assertOptions:$v,validators:wu},In=_u.validators;let Ai=class{constructor(t){this.defaults=t||{},this.interceptors={request:new d0,response:new d0}}request(t,n){return $e(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
|
|
13
13
|
`);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
|
|
14
14
|
`),c=u===-1?-1:a.indexOf(`
|
|
15
15
|
`,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
16
|
-
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&xu.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean),legacyInterceptorReqResOrdering:In.transitional(In.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:xu.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xu.assertOptions(n,{baseUrl:In.spelling("baseURL"),withXsrfToken:In.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=tn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const S=n.transitional||cd;S&&S.legacyInterceptorReqResOrdering?c.unshift(v.fulfilled,v.rejected):c.push(v.fulfilled,v.rejected)});const h=[];this.interceptors.response.forEach(function(v){h.push(v.fulfilled,v.rejected)});let p,g=0,T;if(!d){const x=[v0.bind(this),void 0];for(x.unshift(...c),x.push(...h),T=x.length,p=Promise.resolve(n);g<T;)p=p.then(x[g++],x[g++]);return p}T=c.length;let y=n;for(;g<T;){const x=c[g++],v=c[g++];try{y=x(y)}catch(S){v.call(this,S);break}}try{p=v0.call(this,y)}catch(x){return Promise.reject(x)}for(g=0,T=h.length;g<T;)p=p.then(h[g++],h[g++]);return p}getUri(t){t=vi(this.defaults,t);const n=m0(t.baseURL,t.url,t.allowAbsoluteUrls);return u0(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){Si.prototype[t]=function(n,r){return this.request(vi(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(vi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Si.prototype[t]=n(),t!=="query"&&(Si.prototype[t+"Form"]=n(!0))});let Hv=class i2{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(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new ks(a,u,c),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 i2(function(o){t=o}),cancel:t}}};function zv(e){return function(n){return e.apply(null,n)}}function jv(e){return V.isObject(e)&&e.isAxiosError===!0}const Ed={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(Ed).forEach(([e,t])=>{Ed[t]=e});function A0(e){const t=new Si(e),n=Wm(Si.prototype.request,t);return V.extend(n,Si.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return A0(vi(e,o))},n}const xt=A0(Cs);xt.Axios=Si,xt.CanceledError=ks,xt.CancelToken=Hv,xt.isCancel=d0,xt.VERSION=pd,xt.toFormData=Eu,xt.AxiosError=Ce,xt.Cancel=xt.CanceledError,xt.all=function(t){return Promise.all(t)},xt.spread=zv,xt.isAxiosError=jv,xt.mergeConfig=vi,xt.AxiosHeaders=tn,xt.formToJSON=e=>c0(V.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=_0.getAdapter,xt.HttpStatusCode=Ed,xt.default=xt;const{Axios:rF,AxiosError:iF,CanceledError:oF,isCancel:sF,CancelToken:aF,VERSION:uF,all:lF,Cancel:cF,isAxiosError:dF,spread:fF,toFormData:hF,AxiosHeaders:pF,HttpStatusCode:mF,formToJSON:gF,getAdapter:EF,mergeConfig:yF,create:bF}=xt;class $v{constructor(t,n,r,o=!1,a,u){Ze(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ze(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ze(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ze(this,"baseApiUrl");Ze(this,"headers",{});Ze(this,"fetchConfig",()=>$e(this,null,function*(){try{const t=yield xt.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}}));Ze(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.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,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class Vv{constructor(t,n,r,o=!1,a,u){Ze(this,"apiService");Ze(this,"config",null);Ze(this,"getConfig",()=>$e(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}}));Ze(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ze(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ze(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ze(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ze(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ze(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ze(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ze(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ze(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ze(this,"getProductField",t=>this.config?this.config[t]:"");Ze(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new $v(t,n,r,o,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 Ai=(e,t,n,...r)=>{if(!e)return;const o=["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]",o,n,...r)};class qv{constructor(t=!1){Ze(this,"isDevelopment");Ze(this,"_log",(t,n,...r)=>{Ai(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 Yv={copilot:"Your Search Assistant",messaging:"Commerce Client"},C0=J.createContext(null),Wv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,searchPlaceholder:g,searchButtonLabel:T,searchConfig:y,componentConfig:x,conversationHistory:v,resetConversationMessage:S="",apiKey:A,apiToken:O,baseUrl:R,customerId:H,tenantId:W,theme:F,isDevelopment:K,__features:de,routingAttributes:ge,children:z})=>{const ue=e==="messaging",he=J.useMemo(()=>{const se=ge==null?void 0:ge.isCartMgmtSupported;return se===!0||se==="true"},[ge]),ee=J.useMemo(()=>ue?{config:null}:new Vv(R,A,O,K,H,W),[ue,R,A,O,K,H,W]),re=J.useMemo(()=>new qv(K),[K]);J.useEffect(()=>{ue||!ee||ee.config||ee.getConfig()},[ee,ue]);const te=J.useMemo(()=>o_(F),[F]),Te=J.useMemo(()=>{const se=(y==null?void 0:y.placeholder)||g,C=(y==null?void 0:y.buttonLabel)||T;let I="icon";return y!=null&&y.buttonType?I=y.buttonType:T&&(I="text"),ae(B({},y||{}),{placeholder:se,buttonLabel:C,buttonType:I})},[y,g,T]),oe=J.useMemo(()=>ae(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||Yv[e!=null?e:"copilot"]}),[r,t,n,e]),X=J.useMemo(()=>({configModule:ee,mode:e!=null?e:"copilot",headerConfig:oe,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:te,logger:re,searchConfig:Te,enableMinimize:!!(x!=null&&x.enableMinimize),resetConversationMessage:S,conversationHistory:{sinceHours:typeof(v==null?void 0:v.sinceHours)=="number"?v.sinceHours:1,limit:v==null?void 0:v.limit},features:de,isCartMgmtSupported:he}),[ee,e,oe,a,o,h,p,c,d,u,Te,x,S,re,te,v,de,he]);return w.jsx(C0.Provider,{value:X,children:z})},At=()=>{const e=J.useContext(C0);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Gv=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart"],wu=-1;function Kv(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return Gv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:wu,data:{content:e}}}function Qv(e,t){if(t.index===wu){const o=e[e.length-1];if(o&&o.type==="markdown"&&o.index===wu&&t.type==="markdown"){const a={type:"markdown",index:wu,data:{content:o.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(o=>o.index===t.index);return[...n>=0?e.map((o,a)=>a===n?t:o):[...e,t]].sort((o,a)=>o.index-a.index)}const k0={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sessionExpired:!1};function Xv(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return B(ae(B({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ae(B({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ae(B({},e),{conversationId:t.id});case"ADD_MESSAGE":return ae(B({},e),{messages:[...e.messages,ae(B({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Kv(t.token);return n?ae(B({},e),{streamingBlocks:Qv(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":return ae(B({},e),{messages:[...e.messages,ae(B({},t.message),{type:"FLUSH_STREAMING"})],streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[]});case"SET_AGENT_TYPING":return ae(B({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return B(ae(B({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ae(B({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ae(B({},e),{routingResult:t.result});case"SET_ERROR":return ae(B({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"LOAD_HISTORY":return ae(B({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ae(B({},e),{sessionExpired:t.expired});case"RESET":return ae(B({},k0),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const N0=J.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{}});function yd(e,t){return`cim_af_conv_${e}_${t}`}function bd(e,t){return Date.now()-e>t}function Jv(e,t,n){try{const r=yd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);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"||bd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Ns(e,t,n){try{const r=yd(e,t),o={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(o))}catch(r){}}function _u(e,t){try{const n=yd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Td(e,t){return`cim_af_ct_${e}_${t}`}function O0(e,t,n){try{const r=Td(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("accessToken"in a)||!("lastEventId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.accessToken!="string"||!u.accessToken||typeof u.lastEventId!="string"||!u.lastEventId?null:typeof u.storedAt!="number"||Date.now()-u.storedAt>n?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Zv(e,t,n,r){try{const o=Td(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(o,JSON.stringify(a))}catch(o){}}function eS(e,t){try{const n=Td(e,t);sessionStorage.removeItem(n)}catch(n){}}function tS(e,t){return`cim_af_conv_${e}_${t}`}function nS(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=tS(e,t);return new BroadcastChannel(n)}catch(n){return null}}function rS(e,t=500){return e?new Promise(n=>{let r=!1;const o=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(o),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(o),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function iS(e,t,n){if(!e)return()=>{};function r(o){var a;if((a=o.data)!=null&&a.type)switch(o.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(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function oS(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function sS(e){if(e)try{e.close()}catch(t){}}function aS(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function uS(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function I0(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 lS(e){if(e.entryType!=="Message")return null;const n=uS(e.entryPayload).abstractMessage;if(!n)return null;const r=I0(n,"staticContent","text")||I0(n,"content","text")||"";if(!r)return null;const o=aS(e.sender.role);return{id:e.identifier,role:o,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function cS(e){const t=[];for(const n of e){const r=lS(n);r&&t.push(r)}return t}const R0="onCimulateWidgetReady",dS=5e3;function Os(e={}){const{routingAttributes:t,timeoutMs:n=dS}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=B({},t!=null?t:{});return new Promise(o=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;o(p?r:t)},c={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(R0,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function fS(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=J.useRef(null),u=J.useRef(null),c=J.useRef(null),d=o.sinceHours*60*60*1e3,h=J.useCallback(()=>(c.current||(c.current=rS(a.current)),c.current),[]);J.useEffect(()=>{const S=nS(t,n);a.current=S,c.current=null;const A=iS(S,()=>{const O=u.current;if(!O)return null;const R=O0(t,n,d);return{conversationId:O,continuationToken:R==null?void 0:R.accessToken,lastEventId:R==null?void 0:R.lastEventId}},()=>{_u(t,n),u.current=null});return()=>{A(),sS(S),a.current=null}},[t,n,d]);const p=J.useCallback(S=>$e(null,null,function*(){let A=Jv(t,n,d);if(!A){const O=yield h();O&&!bd(O.storedAt,d)&&(A=O)}if(!A){const O=yield S.createConversation(yield Os({routingAttributes:r}));return Ns(t,n,O),u.current=O,{conversationId:O,restoredMessages:[],resumed:!1}}try{const O=Date.now()-d,H=(yield S.listConversations({conversationId:A.conversationId,startTimestamp:O})).conversations.find(F=>F.conversationId===A.conversationId&&!F.isConversationClosed);if(!H){_u(t,n);const F=yield S.createConversation(yield Os({routingAttributes:r}));return Ns(t,n,F),u.current=F,{conversationId:F,restoredMessages:[],resumed:!1}}S.resumeConversation(H.conversationId),u.current=H.conversationId,Ns(t,n,H.conversationId);let W=[];try{const F=yield S.listConversationEntries(H.conversationId,{limit:o.limit,startTimestamp:O,direction:"FromStart"});W=cS(F.conversationEntries)}catch(F){}return{conversationId:H.conversationId,restoredMessages:W,resumed:!0}}catch(O){_u(t,n);const R=yield S.createConversation(yield Os({routingAttributes:r}));return Ns(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),g=J.useCallback(S=>{Ns(t,n,S),u.current=S},[t,n]),T=J.useCallback(()=>{_u(t,n),eS(t,n),oS(a.current),u.current=null},[t,n]),y=J.useCallback(()=>{const S=O0(t,n,d);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n,d]),x=J.useCallback(()=>$e(null,null,function*(){const S=yield h();return!(S!=null&&S.continuationToken)||bd(S.storedAt,d)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[d,h]),v=J.useCallback(S=>$e(null,null,function*(){try{const{accessToken:A,lastEventId:O}=yield S.generateContinuationToken();Zv(t,n,A,O)}catch(A){}}),[t,n]);return{initializeConversation:p,persistConversationId:g,clearPersistedConversation:T,getStoredConnectOptions:y,getPeerConnectOptions:x,persistContinuationToken:v}}const hS="Your session ended due to inactivity. Starting a new session…";function pS(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function mS(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),o=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=o?` (${o})`:"",c=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",h=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${h}`,g=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:p,display:g}}const P0=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:o,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,children:h})=>{const{logger:p,conversationHistory:g}=At(),[T,y]=J.useReducer(Xv,k0),x=fS({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:g}),v=J.useRef(null),S=J.useRef(c),A=J.useRef(d),O=J.useRef(u),R=J.useRef(!1),H=J.useRef(!1),W=J.useRef(0);S.current=c,A.current=d,O.current=u,J.useEffect(()=>{const ee=new i_({baseURL:e,orgId:t,esDeveloperName:n,options:B({enableLogging:a},o?{capabilitiesVersion:o}:{})});return v.current=ee,ee.on("connected",()=>{var te;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(te=O.current)==null||te.call(O)}),ee.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ee.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ee.on("message",te=>{var oe;const Te={id:te.messageId||crypto.randomUUID(),role:"agent",content:te.content,timestamp:te.timestamp,sender:te.sender,raw:te};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:Te.id,tokensBeforeFlush:W.current,streamedFinalOnly:W.current===0}),W.current=0,y({type:"FLUSH_STREAMING",message:Te}),(oe=S.current)==null||oe.call(S,Te)}),ee.on("streaming_token",te=>{W.current+=1,y({type:"APPEND_STREAMING_TOKEN",token:te.token})}),ee.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),ee.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),ee.on("progress_indicator",te=>{y({type:"ADD_PROGRESS_STEP",message:te.message})}),ee.on("routing_result",te=>{var Te;if(y({type:"SET_ROUTING_RESULT",result:te}),!te.isSuccessful){const oe=`Routing failed: ${te.failureType||"unknown"}`;y({type:"SET_ERROR",error:oe}),(Te=A.current)==null||Te.call(A,oe)}}),ee.on("participant_changed",te=>{if(te.participant.name==="Automated Process")return;const Te={id:crypto.randomUUID(),role:"system",content:te.action==="add"?`${te.participant.name||"Agent"} joined the conversation`:`${te.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:te}),y({type:"ADD_MESSAGE",message:Te})}),ee.on("conversation_closed",()=>{const te={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:te}),y({type:"SET_CONVERSATION_ID",id:null}),x.clearPersistedConversation()}),ee.on("error",te=>{var Te;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:te}),te.code==="SESSION_EXPIRED"){H.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:te.message}),te.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(Te=A.current)==null||Te.call(A,te.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),$e(null,null,function*(){let te=x.getStoredConnectOptions(),Te=!1;te||(te=yield x.getPeerConnectOptions(),Te=!!te);try{yield ee.connect(te!=null?te:void 0)}catch(X){if(te)p==null||p.log("Continuation token failed, falling back to fresh connect"),Te||x.clearPersistedConversation(),yield ee.connect();else throw X}yield x.persistContinuationToken(ee);const oe=yield x.initializeConversation(ee);y({type:"SET_CONVERSATION_ID",id:oe.conversationId}),oe.resumed&&oe.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:oe.restoredMessages})}).catch(te=>{var Te;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:te.message}),(Te=A.current)==null||Te.call(A,te.message)}),()=>{ee.disconnect(),ee.off(),v.current=null}},[e,t,n,o]),J.useEffect(()=>{const ee=()=>{document.visibilityState==="visible"&&v.current&&!H.current&&v.current.reconnect()};return document.addEventListener("visibilitychange",ee),()=>{document.removeEventListener("visibilitychange",ee)}},[]);const F=J.useCallback(ee=>$e(null,null,function*(){var te;const re=v.current;if(!(!re||R.current)){R.current=!0,H.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:hS,timestamp:new Date().toISOString()}}),x.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{re.disconnect(),yield re.connect(),yield x.persistContinuationToken(re);const Te=yield re.createConversation(yield Os({routingAttributes:r}));y({type:"SET_CONVERSATION_ID",id:Te}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),x.persistConversationId(Te),ee&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield re.sendMessage(ee))}catch(Te){const oe=Te instanceof Error?Te.message:String(Te);y({type:"SET_ERROR",error:oe}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(te=A.current)==null||te.call(A,oe)}finally{R.current=!1}}}),[r,x]),K=J.useRef(F);K.current=F;const de=J.useCallback((ee,re)=>{const te=v.current;if(!te)return;const Te={id:crypto.randomUUID(),role:"user",content:re!=null?re:ee,timestamp:new Date().toISOString()};if(y({type:"ADD_MESSAGE",message:Te}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),H.current){K.current(ee);return}te.sendMessage(ee).catch(oe=>{var X;if(pS(oe)){K.current(ee);return}y({type:"SET_ERROR",error:oe.message}),(X=A.current)==null||X.call(A,oe.message)})},[]),ge=J.useCallback(ee=>{ee.trim()&&de(ee)},[de]),z=J.useCallback(ee=>{if(!v.current)return;const{prompt:re,display:te}=mS(ee);de(re,te)},[de]),ue=J.useCallback(()=>{const ee=v.current;ee&&(H.current=!1,x.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ee.endConversation().then(()=>(ee.disconnect(),ee.connect())).then(()=>$e(null,null,function*(){return yield x.persistContinuationToken(ee),ee.createConversation(yield Os({routingAttributes:r}))})).then(re=>{y({type:"SET_CONVERSATION_ID",id:re}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),x.persistConversationId(re)}).catch(re=>{var te;y({type:"SET_ERROR",error:re.message}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(te=A.current)==null||te.call(A,re.message)}))},[r,x]),he=J.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,progressSteps:T.progressSteps,error:T.error,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:ge,addToCart:z,resetConversation:ue}),[T,ge,z,ue]);return w.jsx(N0.Provider,{value:he,children:h})};function gS(){var e=J.useRef(!0);return e.current?(e.current=!1,!0):e.current}function ES(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function yS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var xd=typeof window!="undefined",vu=function(e){J.useEffect(e,[])},bS=function(e){var t=J.useRef(e);t.current=e,vu(function(){return function(){return t.current()}})},TS=function(e){var t=J.useRef(0),n=J.useState(e),r=n[0],o=n[1],a=J.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return bS(function(){cancelAnimationFrame(t.current)}),[r,a]},xS=function(e,t){return e===t};function wS(e,t){t===void 0&&(t=xS);var n=J.useRef(),r=J.useRef(e),o=gS();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var _S=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=TS({width:xd?window.innerWidth:r,height:xd?window.innerHeight:a}),d=c[0],h=c[1];return J.useEffect(function(){if(xd){var p=function(){var g=window.innerWidth,T=window.innerHeight;h({width:g,height:T}),u&&u(g,T)};return ES(window,"resize",p),function(){yS(window,"resize",p)}}},[]),d};const wd="cimulate:ui-state-update",vS=e=>{window.addEventListener(wd,e)},SS=e=>{window.removeEventListener(wd,e)},AS=(e,t)=>{const n=new CustomEvent(wd,{detail:{property:e,value:t}});window.dispatchEvent(n)},L0=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);tt.entryTypeProxy.entryType=e},Ci=e=>{const t=tt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;tt.statusProxy.isOpen=n,n&&(tt.statusProxy.isMinimized=!1)},Su=e=>{const t=tt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;tt.statusProxy.isMinimized=n,n&&(tt.statusProxy.isOpen=!1)},_d=e=>{tt.modalProxy.isFullscreen=e},Au=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);tt.statusProxy.type=e,e==="dialog"||e==="chat"?tt.modeProxy.mode="embedded":tt.modeProxy.mode="standalone"},vd=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);tt.dialogProxy.position=e},CS=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class kS{constructor(){Ze(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Ze(this,"connectedProxy");Ze(this,"modeProxy");Ze(this,"entryTypeProxy");Ze(this,"statusProxy");Ze(this,"dialogProxy");Ze(this,"modalProxy",{isFullscreen:!1});Ze(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ze(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return AS(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const tt=new kS,D0=J.createContext({mode:tt.modeProxy.mode,entryType:tt.entryType,status:tt.statusProxy,dialogPosition:tt.dialogProxy.position,isDialogFullHeight:tt.dialogProxy.isFullHeight,dialogWidth:tt.dialogProxy.width,isModalFullscreen:tt.modalProxy.isFullscreen,previousComponentType:tt.statusProxy.type}),NS=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=J.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=J.useState(tt.modeProxy.mode),[d,h]=J.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,g]=J.useState(tt.dialogProxy.position),[T,y]=J.useState(tt.dialogProxy.isFullHeight),[x,v]=J.useState(tt.dialogProxy.width),[S,A]=J.useState(tt.modalProxy.isFullscreen),O=wS(d.type);J.useEffect(()=>{const H=W=>{const{property:F,value:K}=W.detail||{};if(!(!F||K===void 0)){if(F==="mode"){c(K);return}if(F==="entryType"){a(K);return}if(F==="isMinimized"){h(de=>ae(B({},de),{isMinimized:K}));return}if(F==="isOpen"){h(de=>ae(B({},de),{isOpen:K}));return}if(F==="type"){h(de=>ae(B({},de),{type:K}));return}if(F==="position"){g(K);return}if(F==="isFullHeight"){y(K);return}if(F==="width"){v(K);return}if(F==="isFullscreen"){A(K);return}}};return vS(H),()=>{SS(H)}},[]),vu(()=>{e&&L0(e)}),vu(()=>{const H=n||(t==null?void 0:t.type);H&&Au(H),t&&"isOpen"in t&&Ci(!!t.isOpen),t&&"isMinimized"in t&&Su(!!t.isMinimized)}),vu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:H}=t.options;H&&vd(H),"dialogFullHeight"in t.options&&CS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&_d(!!t.options.isModalFullscreen)});const R=J.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:O||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:S}),[u,o,d,O,p,T,x,S]);return w.jsx(D0.Provider,{value:R,children:r})},M0=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:h,isDevelopment:p=!1,componentType:g,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:v,disclaimerMarkdown:S,clientContext:A,searchPlaceholder:O,searchButtonLabel:R,searchConfig:H,resetConversationMessage:W,conversationHistory:F,messagingConfig:K,__features:de,children:ge})=>w.jsx(Wv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:x,theme:c,globalClassName:h,openLinksInNewTab:d,searchPlaceholder:O,searchButtonLabel:R,searchConfig:H,componentConfig:T,clientContext:A,disclaimerMarkdown:S,disclaimerText:v,resetConversationMessage:W,conversationHistory:F,isDevelopment:p,__features:de,routingAttributes:K==null?void 0:K.routingAttributes,children:w.jsx(NS,{entryType:y,componentConfig:T,componentType:g,children:w.jsx(P0,{scrt2Url:(K==null?void 0:K.scrt2Url)||"",orgId:(K==null?void 0:K.orgId)||"",esDeveloperName:(K==null?void 0:K.esDeveloperName)||"",routingAttributes:(K==null?void 0:K.routingAttributes)||{},capabilitiesVersion:K==null?void 0:K.capabilitiesVersion,enableLogging:p,children:ge})})}),ki=()=>{const e=J.useContext(D0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var Sd={exports:{}},ln={},Ad={exports:{}},Cd={};var F0;function OS(){return F0||(F0=1,(function(e){function t(X,se){var C=X.length;X.push(se);e:for(;0<C;){var I=C-1>>>1,G=X[I];if(0<o(G,se))X[I]=se,X[C]=G,C=I;else break e}}function n(X){return X.length===0?null:X[0]}function r(X){if(X.length===0)return null;var se=X[0],C=X.pop();if(C!==se){X[0]=C;e:for(var I=0,G=X.length,N=G>>>1;I<N;){var xe=2*(I+1)-1,Oe=X[xe],Re=xe+1,He=X[Re];if(0>o(Oe,C))Re<G&&0>o(He,Oe)?(X[I]=He,X[Re]=C,I=Re):(X[I]=Oe,X[xe]=C,I=xe);else if(Re<G&&0>o(He,C))X[I]=He,X[Re]=C,I=Re;else break e}}return se}function o(X,se){var C=X.sortIndex-se.sortIndex;return C!==0?C:X.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],h=[],p=1,g=null,T=3,y=!1,x=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(X){for(var se=n(h);se!==null;){if(se.callback===null)r(h);else if(se.startTime<=X)r(h),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(h)}}function H(X){if(v=!1,R(X),!x)if(n(d)!==null)x=!0,Te(W);else{var se=n(h);se!==null&&oe(H,se.startTime-X)}}function W(X,se){x=!1,v&&(v=!1,A(de),de=-1),y=!0;var C=T;try{for(R(se),g=n(d);g!==null&&(!(g.expirationTime>se)||X&&!ue());){var I=g.callback;if(typeof I=="function"){g.callback=null,T=g.priorityLevel;var G=I(g.expirationTime<=se);se=e.unstable_now(),typeof G=="function"?g.callback=G:g===n(d)&&r(d),R(se)}else r(d);g=n(d)}if(g!==null)var N=!0;else{var xe=n(h);xe!==null&&oe(H,xe.startTime-se),N=!1}return N}finally{g=null,T=C,y=!1}}var F=!1,K=null,de=-1,ge=5,z=-1;function ue(){return!(e.unstable_now()-z<ge)}function he(){if(K!==null){var X=e.unstable_now();z=X;var se=!0;try{se=K(!0,X)}finally{se?ee():(F=!1,K=null)}}else F=!1}var ee;if(typeof O=="function")ee=function(){O(he)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,te=re.port2;re.port1.onmessage=he,ee=function(){te.postMessage(null)}}else ee=function(){S(he,0)};function Te(X){K=X,F||(F=!0,ee())}function oe(X,se){de=S(function(){X(e.unstable_now())},se)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,Te(W))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(X){switch(T){case 1:case 2:case 3:var se=3;break;default:se=T}var C=T;T=se;try{return X()}finally{T=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,se){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var C=T;T=X;try{return se()}finally{T=C}},e.unstable_scheduleCallback=function(X,se,C){var I=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?I+C:I):C=I,X){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=C+G,X={id:p++,callback:se,priorityLevel:X,startTime:C,expirationTime:G,sortIndex:-1},C>I?(X.sortIndex=C,t(h,X),n(d)===null&&X===n(h)&&(v?(A(de),de=-1):v=!0,oe(H,C-I))):(X.sortIndex=G,t(d,X),x||y||(x=!0,Te(W))),X},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(X){var se=T;return function(){var C=T;T=se;try{return X.apply(this,arguments)}finally{T=C}}}})(Cd)),Cd}var B0;function IS(){return B0||(B0=1,Ad.exports=OS()),Ad.exports}var U0;function RS(){if(U0)return ln;U0=1;var e=uo(),t=IS();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[: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={},g={};function T(i){return d.call(g,i)?!0:d.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,s,l,f){if(s===null||typeof s=="undefined"||y(i,s,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,l,f,E,b,_){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=_}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new v(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){S[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function O(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 s=i.replace(A,O);S[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(A,O);S[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(A,O);S[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,s,l,f){var E=S.hasOwnProperty(s)?S[s]:null;(E!==null?E.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(x(s,l,E,f)&&(l=null),f||E===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,f=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,f?i.setAttributeNS(f,s,l):i.setAttribute(s,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),F=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),de=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),ue=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),X=Symbol.iterator;function se(i){return i===null||typeof i!="object"?null:(i=X&&i[X]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,I;function G(i){if(I===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|
|
17
|
-
`+I+i}var
|
|
16
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Si(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&_u.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean),legacyInterceptorReqResOrdering:In.transitional(In.boolean)},!1),o!=null&&(G.isFunction(o)?n.paramsSerializer={serialize:o}:_u.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_u.assertOptions(n,{baseUrl:In.spelling("baseURL"),withXsrfToken:In.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"],w=>{delete a[w]}),n.headers=tn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const A=n.transitional||fd;A&&A.legacyInterceptorReqResOrdering?c.unshift(v.fulfilled,v.rejected):c.push(v.fulfilled,v.rejected)});const h=[];this.interceptors.response.forEach(function(v){h.push(v.fulfilled,v.rejected)});let p,g=0,T;if(!d){const w=[A0.bind(this),void 0];for(w.unshift(...c),w.push(...h),T=w.length,p=Promise.resolve(n);g<T;)p=p.then(w[g++],w[g++]);return p}T=c.length;let y=n;for(;g<T;){const w=c[g++],v=c[g++];try{y=w(y)}catch(A){v.call(this,A);break}}try{p=A0.call(this,y)}catch(w){return Promise.reject(w)}for(g=0,T=h.length;g<T;)p=p.then(h[g++],h[g++]);return p}getUri(t){t=Si(this.defaults,t);const n=E0(t.baseURL,t.url,t.allowAbsoluteUrls);return c0(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){Ai.prototype[t]=function(n,r){return this.request(Si(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(Si(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Ai.prototype[t]=n(),t!=="query"&&(Ai.prototype[t+"Form"]=n(!0))});let Vv=class u2{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(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new Os(a,u,c),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 u2(function(o){t=o}),cancel:t}}};function qv(e){return function(n){return e.apply(null,n)}}function Yv(e){return G.isObject(e)&&e.isAxiosError===!0}const bd={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(bd).forEach(([e,t])=>{bd[t]=e});function k0(e){const t=new Ai(e),n=Km(Ai.prototype.request,t);return G.extend(n,Ai.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return k0(Si(e,o))},n}const xt=k0(Ns);xt.Axios=Ai,xt.CanceledError=Os,xt.CancelToken=Vv,xt.isCancel=h0,xt.VERSION=gd,xt.toFormData=bu,xt.AxiosError=Ae,xt.Cancel=xt.CanceledError,xt.all=function(t){return Promise.all(t)},xt.spread=qv,xt.isAxiosError=Yv,xt.mergeConfig=Si,xt.AxiosHeaders=tn,xt.formToJSON=e=>f0(G.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=S0.getAdapter,xt.HttpStatusCode=bd,xt.default=xt;const{Axios:cF,AxiosError:dF,CanceledError:fF,isCancel:hF,CancelToken:pF,VERSION:mF,all:gF,Cancel:EF,isAxiosError:yF,spread:bF,toFormData:TF,AxiosHeaders:xF,HttpStatusCode:wF,formToJSON:_F,getAdapter:vF,mergeConfig:SF,create:AF}=xt;class Wv{constructor(t,n,r,o=!1,a,u){Ze(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ze(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ze(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ze(this,"baseApiUrl");Ze(this,"headers",{});Ze(this,"fetchConfig",()=>$e(this,null,function*(){try{const t=yield xt.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}}));Ze(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.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,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class Gv{constructor(t,n,r,o=!1,a,u){Ze(this,"apiService");Ze(this,"config",null);Ze(this,"getConfig",()=>$e(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}}));Ze(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ze(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ze(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ze(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ze(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ze(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ze(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ze(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ze(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ze(this,"getProductField",t=>this.config?this.config[t]:"");Ze(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Wv(t,n,r,o,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 Ci=(e,t,n,...r)=>{if(!e)return;const o=["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]",o,n,...r)};class Kv{constructor(t=!1){Ze(this,"isDevelopment");Ze(this,"_log",(t,n,...r)=>{Ci(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 Qv={copilot:"Your Search Assistant",messaging:"Commerce Client"},N0=Z.createContext(null),Xv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,searchPlaceholder:g,searchButtonLabel:T,searchConfig:y,componentConfig:w,conversationHistory:v,resetConversationMessage:A="",apiKey:C,apiToken:k,baseUrl:R,customerId:U,tenantId:Y,theme:F,isDevelopment:X,__features:ce,routingAttributes:de,children:z})=>{const oe=e==="messaging",he=Z.useMemo(()=>{const q=de==null?void 0:de.isCartMgmtSupported;return q===!0||q==="true"},[de]),ae=Z.useMemo(()=>oe?{config:null}:new Gv(R,C,k,X,U,Y),[oe,R,C,k,X,U,Y]),se=Z.useMemo(()=>new Kv(X),[X]);Z.useEffect(()=>{oe||!ae||ae.config||ae.getConfig()},[ae,oe]);const Te=Z.useMemo(()=>l_(F),[F]),Ce=Z.useMemo(()=>{const q=(y==null?void 0:y.placeholder)||g,S=(y==null?void 0:y.buttonLabel)||T;let I="icon";return y!=null&&y.buttonType?I=y.buttonType:T&&(I="text"),ie(B({},y||{}),{placeholder:q,buttonLabel:S,buttonType:I})},[y,g,T]),ee=Z.useMemo(()=>ie(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||Qv[e!=null?e:"copilot"]}),[r,t,n,e]),V=Z.useMemo(()=>({configModule:ae,mode:e!=null?e:"copilot",headerConfig:ee,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:Te,logger:se,searchConfig:Ce,enableMinimize:!!(w!=null&&w.enableMinimize),resetConversationMessage:A,conversationHistory:{sinceHours:typeof(v==null?void 0:v.sinceHours)=="number"?v.sinceHours:1,limit:v==null?void 0:v.limit},features:ce,isCartMgmtSupported:he}),[ae,e,ee,a,o,h,p,c,d,u,Ce,w,A,se,Te,v,ce,he]);return x.jsx(N0.Provider,{value:V,children:z})},At=()=>{const e=Z.useContext(N0);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Jv=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart"],vu=-1;function Zv(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return Jv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:vu,data:{content:e}}}function eS(e,t){if(t.index===vu){const o=e[e.length-1];if(o&&o.type==="markdown"&&o.index===vu&&t.type==="markdown"){const a={type:"markdown",index:vu,data:{content:o.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(o=>o.index===t.index);return[...n>=0?e.map((o,a)=>a===n?t:o):[...e,t]].sort((o,a)=>o.index-a.index)}const O0={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function tS(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return B(ie(B({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ie(B({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ie(B({},e),{conversationId:t.id});case"ADD_MESSAGE":return ie(B({},e),{messages:[...e.messages,ie(B({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Zv(t.token);return n?ie(B({},e),{streamingBlocks:eS(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":return ie(B({},e),{messages:[...e.messages,ie(B({},t.message),{type:"FLUSH_STREAMING"})],streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null});case"SET_AGENT_TYPING":return ie(B({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return B(ie(B({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ie(B({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ie(B({},e),{routingResult:t.result});case"SET_ERROR":return ie(B({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ie(B({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ie(B({},e),{sendError:null});case"LOAD_HISTORY":return ie(B({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ie(B({},e),{sessionExpired:t.expired});case"RESET":return ie(B({},O0),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const I0=Z.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{}});function Td(e,t){return`cim_af_conv_${e}_${t}`}function xd(e,t){return Date.now()-e>t}function nS(e,t,n){try{const r=Td(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);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"||xd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Is(e,t,n){try{const r=Td(e,t),o={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(o))}catch(r){}}function Su(e,t){try{const n=Td(e,t);sessionStorage.removeItem(n)}catch(n){}}function wd(e,t){return`cim_af_ct_${e}_${t}`}function R0(e,t,n){try{const r=wd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("accessToken"in a)||!("lastEventId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.accessToken!="string"||!u.accessToken||typeof u.lastEventId!="string"||!u.lastEventId?null:typeof u.storedAt!="number"||Date.now()-u.storedAt>n?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function rS(e,t,n,r){try{const o=wd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(o,JSON.stringify(a))}catch(o){}}function iS(e,t){try{const n=wd(e,t);sessionStorage.removeItem(n)}catch(n){}}function oS(e,t){return`cim_af_conv_${e}_${t}`}function sS(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=oS(e,t);return new BroadcastChannel(n)}catch(n){return null}}function aS(e,t=500){return e?new Promise(n=>{let r=!1;const o=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(o),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(o),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function uS(e,t,n){if(!e)return()=>{};function r(o){var a;if((a=o.data)!=null&&a.type)switch(o.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(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function lS(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function cS(e){if(e)try{e.close()}catch(t){}}function dS(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function fS(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function P0(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 hS(e){if(e.entryType!=="Message")return null;const n=fS(e.entryPayload).abstractMessage;if(!n)return null;const r=P0(n,"staticContent","text")||P0(n,"content","text")||"";if(!r)return null;const o=dS(e.sender.role);return{id:e.identifier,role:o,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function pS(e){const t=[];for(const n of e){const r=hS(n);r&&t.push(r)}return t}const L0="onCimulateWidgetReady",mS=5e3;function Rs(e={}){const{routingAttributes:t,timeoutMs:n=mS}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=B({},t!=null?t:{});return new Promise(o=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;o(p?r:t)},c={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(L0,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function gS(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=Z.useRef(null),u=Z.useRef(null),c=Z.useRef(null),d=o.sinceHours*60*60*1e3,h=Z.useCallback(()=>(c.current||(c.current=aS(a.current)),c.current),[]);Z.useEffect(()=>{const A=sS(t,n);a.current=A,c.current=null;const C=uS(A,()=>{const k=u.current;if(!k)return null;const R=R0(t,n,d);return{conversationId:k,continuationToken:R==null?void 0:R.accessToken,lastEventId:R==null?void 0:R.lastEventId}},()=>{Su(t,n),u.current=null});return()=>{C(),cS(A),a.current=null}},[t,n,d]);const p=Z.useCallback(A=>$e(null,null,function*(){let C=nS(t,n,d);if(!C){const k=yield h();k&&!xd(k.storedAt,d)&&(C=k)}if(!C){const k=yield A.createConversation(yield Rs({routingAttributes:r}));return Is(t,n,k),u.current=k,{conversationId:k,restoredMessages:[],resumed:!1}}try{const k=Date.now()-d,U=(yield A.listConversations({conversationId:C.conversationId,startTimestamp:k})).conversations.find(F=>F.conversationId===C.conversationId&&!F.isConversationClosed);if(!U){Su(t,n);const F=yield A.createConversation(yield Rs({routingAttributes:r}));return Is(t,n,F),u.current=F,{conversationId:F,restoredMessages:[],resumed:!1}}A.resumeConversation(U.conversationId),u.current=U.conversationId,Is(t,n,U.conversationId);let Y=[];try{const F=yield A.listConversationEntries(U.conversationId,{limit:o.limit,startTimestamp:k,direction:"FromStart"});Y=pS(F.conversationEntries)}catch(F){}return{conversationId:U.conversationId,restoredMessages:Y,resumed:!0}}catch(k){Su(t,n);const R=yield A.createConversation(yield Rs({routingAttributes:r}));return Is(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),g=Z.useCallback(A=>{Is(t,n,A),u.current=A},[t,n]),T=Z.useCallback(()=>{Su(t,n),iS(t,n),lS(a.current),u.current=null},[t,n]),y=Z.useCallback(()=>{const A=R0(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),w=Z.useCallback(()=>$e(null,null,function*(){const A=yield h();return!(A!=null&&A.continuationToken)||xd(A.storedAt,d)?null:{continuationToken:A.continuationToken,lastEventId:A.lastEventId}}),[d,h]),v=Z.useCallback(A=>$e(null,null,function*(){try{const{accessToken:C,lastEventId:k}=yield A.generateContinuationToken();rS(t,n,C,k)}catch(C){}}),[t,n]);return{initializeConversation:p,persistConversationId:g,clearPersistedConversation:T,getStoredConnectOptions:y,getPeerConnectOptions:w,persistContinuationToken:v}}const ur={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 ES(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 mo(e){const{type:t,statusCode:n}=ES(e);if(t==="api"&&typeof n=="number")return n===429?ur.rateLimit:n>=500?ur.server:ur.default;switch(t){case"network":return ur.network;case"sse":return ur.interrupted;case"auth":return ur.connect;default:return ur.default}}function D0(e){switch(e.code){case"MAX_RECONNECT":return ur.lost;case"ROUTING_FAILED":return ur.routing;default:return ur.connect}}const yS="Your session ended due to inactivity. Starting a new session…";function M0(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function bS(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),o=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=o?` (${o})`:"",c=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",h=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${h}`,g=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:p,display:g}}const F0=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:o,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,children:h})=>{const{logger:p,conversationHistory:g}=At(),[T,y]=Z.useReducer(tS,O0),w=Z.useRef(T);w.current=T;const v=gS({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:g}),A=Z.useRef(null),C=Z.useRef(c),k=Z.useRef(d),R=Z.useRef(u),U=Z.useRef(!1),Y=Z.useRef(!1),F=Z.useRef(0),X=Z.useRef(null);C.current=c,k.current=d,R.current=u,Z.useEffect(()=>{const ee=new u_({baseURL:e,orgId:t,esDeveloperName:n,options:B({enableLogging:a},o?{capabilitiesVersion:o}:{})});A.current=ee,ee.on("connected",()=>{var q;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(q=R.current)==null||q.call(R)}),ee.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ee.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ee.on("message",q=>{var I;const S={id:q.messageId||crypto.randomUUID(),role:"agent",content:q.content,timestamp:q.timestamp,sender:q.sender,raw:q};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:S.id,tokensBeforeFlush:F.current,streamedFinalOnly:F.current===0}),F.current=0,y({type:"FLUSH_STREAMING",message:S}),(I=C.current)==null||I.call(C,S)}),ee.on("streaming_token",q=>{F.current+=1,y({type:"APPEND_STREAMING_TOKEN",token:q.token})}),ee.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),ee.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),ee.on("progress_indicator",q=>{y({type:"ADD_PROGRESS_STEP",message:q.message})}),ee.on("routing_result",q=>{var S;if(y({type:"SET_ROUTING_RESULT",result:q}),!q.isSuccessful){const I=`Routing failed: ${q.failureType||"unknown"}`;y({type:"SET_ERROR",error:D0({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(S=k.current)==null||S.call(k,I)}}),ee.on("participant_changed",q=>{if(q.participant.name==="Automated Process")return;const S={id:crypto.randomUUID(),role:"system",content:q.action==="add"?`${q.participant.name||"Agent"} joined the conversation`:`${q.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:q}),y({type:"ADD_MESSAGE",message:S})}),ee.on("conversation_closed",()=>{const q={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:q}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),ee.on("error",q=>{var S;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:q}),q.code==="SESSION_EXPIRED"){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:D0(q)}),q.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(S=k.current)==null||S.call(k,q.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const V=()=>$e(null,null,function*(){let q=v.getStoredConnectOptions(),S=!1;q||(q=yield v.getPeerConnectOptions(),S=!!q);try{yield ee.connect(q!=null?q:void 0)}catch(W){if(q)p==null||p.log("Continuation token failed, falling back to fresh connect"),S||v.clearPersistedConversation(),yield ee.connect();else throw W}yield v.persistContinuationToken(ee);const I=yield v.initializeConversation(ee);y({type:"SET_CONVERSATION_ID",id:I.conversationId}),I.resumed&&I.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:I.restoredMessages})});return X.current=V,V().catch(q=>{var S;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:mo(q)}),(S=k.current)==null||S.call(k,q.message)}),()=>{ee.disconnect(),ee.off(),A.current=null,X.current=null}},[e,t,n,o]),Z.useEffect(()=>{const ee=()=>{document.visibilityState==="visible"&&A.current&&!Y.current&&A.current.reconnect()};return document.addEventListener("visibilitychange",ee),()=>{document.removeEventListener("visibilitychange",ee)}},[]);const ce=Z.useCallback(ee=>$e(null,null,function*(){var q;const V=A.current;if(!(!V||U.current)){U.current=!0,Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:yS,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{V.disconnect(),yield V.connect(),yield v.persistContinuationToken(V);const S=yield V.createConversation(yield Rs({routingAttributes:r}));y({type:"SET_CONVERSATION_ID",id:S}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(S),ee&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield V.sendMessage(ee))}catch(S){const I=S instanceof Error?S.message:String(S);y({type:"SET_ERROR",error:mo(S)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(q=k.current)==null||q.call(k,I)}finally{U.current=!1}}}),[r,v]),de=Z.useRef(ce);de.current=ce;const z=Z.useCallback((ee,V)=>{const q=A.current;if(!q)return;const S={id:crypto.randomUUID(),role:"user",content:V!=null?V:ee,timestamp:new Date().toISOString()};if(y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:S}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),Y.current){de.current(ee);return}q.sendMessage(ee).catch(I=>{var W;if(M0(I)){de.current(ee);return}y({type:"SET_SEND_ERROR",error:{text:ee,displayContent:V,message:mo(I)}}),(W=k.current)==null||W.call(k,I.message)})},[]),oe=Z.useCallback(ee=>{ee.trim()&&z(ee)},[z]),he=Z.useCallback(ee=>{if(!A.current)return;const{prompt:V,display:q}=bS(ee);z(V,q)},[z]),ae=Z.useCallback(()=>{const ee=A.current,V=w.current.sendError;if(!(!ee||!V)){if(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),Y.current){de.current(V.text);return}ee.sendMessage(V.text).catch(q=>{var S;if(M0(q)){de.current(V.text);return}y({type:"SET_SEND_ERROR",error:ie(B({},V),{message:mo(q)})}),(S=k.current)==null||S.call(k,q.message)})}},[]),se=Z.useCallback(()=>{const ee=A.current,V=X.current;!ee||!V||(Y.current=!1,ee.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),V().catch(q=>{var S;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:mo(q)}),(S=k.current)==null||S.call(k,q.message)}))},[]),Te=Z.useCallback(()=>{const ee=A.current;ee&&(Y.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ee.endConversation().then(()=>(ee.disconnect(),ee.connect())).then(()=>$e(null,null,function*(){return yield v.persistContinuationToken(ee),ee.createConversation(yield Rs({routingAttributes:r}))})).then(V=>{y({type:"SET_CONVERSATION_ID",id:V}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(V)}).catch(V=>{var q;y({type:"SET_ERROR",error:mo(V)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(q=k.current)==null||q.call(k,V.message)}))},[r,v]),Ce=Z.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,progressSteps:T.progressSteps,error:T.error,sendError:T.sendError,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:oe,addToCart:he,resetConversation:Te,retryLastMessage:ae,retryConnection:se}),[T,oe,he,Te,ae,se]);return x.jsx(I0.Provider,{value:Ce,children:h})};function TS(){var e=Z.useRef(!0);return e.current?(e.current=!1,!0):e.current}function xS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function wS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var _d=typeof window!="undefined",Au=function(e){Z.useEffect(e,[])},_S=function(e){var t=Z.useRef(e);t.current=e,Au(function(){return function(){return t.current()}})},vS=function(e){var t=Z.useRef(0),n=Z.useState(e),r=n[0],o=n[1],a=Z.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return _S(function(){cancelAnimationFrame(t.current)}),[r,a]},SS=function(e,t){return e===t};function AS(e,t){t===void 0&&(t=SS);var n=Z.useRef(),r=Z.useRef(e),o=TS();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var CS=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=vS({width:_d?window.innerWidth:r,height:_d?window.innerHeight:a}),d=c[0],h=c[1];return Z.useEffect(function(){if(_d){var p=function(){var g=window.innerWidth,T=window.innerHeight;h({width:g,height:T}),u&&u(g,T)};return xS(window,"resize",p),function(){wS(window,"resize",p)}}},[]),d};const vd="cimulate:ui-state-update",kS=e=>{window.addEventListener(vd,e)},NS=e=>{window.removeEventListener(vd,e)},OS=(e,t)=>{const n=new CustomEvent(vd,{detail:{property:e,value:t}});window.dispatchEvent(n)},B0=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);tt.entryTypeProxy.entryType=e},ki=e=>{const t=tt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;tt.statusProxy.isOpen=n,n&&(tt.statusProxy.isMinimized=!1)},Cu=e=>{const t=tt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;tt.statusProxy.isMinimized=n,n&&(tt.statusProxy.isOpen=!1)},Sd=e=>{tt.modalProxy.isFullscreen=e},ku=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);tt.statusProxy.type=e,e==="dialog"||e==="chat"?tt.modeProxy.mode="embedded":tt.modeProxy.mode="standalone"},Ad=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);tt.dialogProxy.position=e},IS=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class RS{constructor(){Ze(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Ze(this,"connectedProxy");Ze(this,"modeProxy");Ze(this,"entryTypeProxy");Ze(this,"statusProxy");Ze(this,"dialogProxy");Ze(this,"modalProxy",{isFullscreen:!1});Ze(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ze(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return OS(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const tt=new RS,U0=Z.createContext({mode:tt.modeProxy.mode,entryType:tt.entryType,status:tt.statusProxy,dialogPosition:tt.dialogProxy.position,isDialogFullHeight:tt.dialogProxy.isFullHeight,dialogWidth:tt.dialogProxy.width,isModalFullscreen:tt.modalProxy.isFullscreen,previousComponentType:tt.statusProxy.type}),PS=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=Z.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=Z.useState(tt.modeProxy.mode),[d,h]=Z.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,g]=Z.useState(tt.dialogProxy.position),[T,y]=Z.useState(tt.dialogProxy.isFullHeight),[w,v]=Z.useState(tt.dialogProxy.width),[A,C]=Z.useState(tt.modalProxy.isFullscreen),k=AS(d.type);Z.useEffect(()=>{const U=Y=>{const{property:F,value:X}=Y.detail||{};if(!(!F||X===void 0)){if(F==="mode"){c(X);return}if(F==="entryType"){a(X);return}if(F==="isMinimized"){h(ce=>ie(B({},ce),{isMinimized:X}));return}if(F==="isOpen"){h(ce=>ie(B({},ce),{isOpen:X}));return}if(F==="type"){h(ce=>ie(B({},ce),{type:X}));return}if(F==="position"){g(X);return}if(F==="isFullHeight"){y(X);return}if(F==="width"){v(X);return}if(F==="isFullscreen"){C(X);return}}};return kS(U),()=>{NS(U)}},[]),Au(()=>{e&&B0(e)}),Au(()=>{const U=n||(t==null?void 0:t.type);U&&ku(U),t&&"isOpen"in t&&ki(!!t.isOpen),t&&"isMinimized"in t&&Cu(!!t.isMinimized)}),Au(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&Ad(U),"dialogFullHeight"in t.options&&IS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&Sd(!!t.options.isModalFullscreen)});const R=Z.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:A}),[u,o,d,k,p,T,w,A]);return x.jsx(U0.Provider,{value:R,children:r})},H0=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:h,isDevelopment:p=!1,componentType:g,componentConfig:T,entryType:y,entryMessage:w,disclaimerText:v,disclaimerMarkdown:A,clientContext:C,searchPlaceholder:k,searchButtonLabel:R,searchConfig:U,resetConversationMessage:Y,conversationHistory:F,messagingConfig:X,__features:ce,children:de})=>x.jsx(Xv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:w,theme:c,globalClassName:h,openLinksInNewTab:d,searchPlaceholder:k,searchButtonLabel:R,searchConfig:U,componentConfig:T,clientContext:C,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:Y,conversationHistory:F,isDevelopment:p,__features:ce,routingAttributes:X==null?void 0:X.routingAttributes,children:x.jsx(PS,{entryType:y,componentConfig:T,componentType:g,children:x.jsx(F0,{scrt2Url:(X==null?void 0:X.scrt2Url)||"",orgId:(X==null?void 0:X.orgId)||"",esDeveloperName:(X==null?void 0:X.esDeveloperName)||"",routingAttributes:(X==null?void 0:X.routingAttributes)||{},capabilitiesVersion:X==null?void 0:X.capabilitiesVersion,enableLogging:p,children:de})})}),Ni=()=>{const e=Z.useContext(U0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var Cd={exports:{}},ln={},kd={exports:{}},Nd={};var z0;function LS(){return z0||(z0=1,(function(e){function t(V,q){var S=V.length;V.push(q);e:for(;0<S;){var I=S-1>>>1,W=V[I];if(0<o(W,q))V[I]=q,V[S]=W,S=I;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var q=V[0],S=V.pop();if(S!==q){V[0]=S;e:for(var I=0,W=V.length,O=W>>>1;I<O;){var be=2*(I+1)-1,Oe=V[be],Re=be+1,He=V[Re];if(0>o(Oe,S))Re<W&&0>o(He,Oe)?(V[I]=He,V[Re]=S,I=Re):(V[I]=Oe,V[be]=S,I=be);else if(Re<W&&0>o(He,S))V[I]=He,V[Re]=S,I=Re;else break e}}return q}function o(V,q){var S=V.sortIndex-q.sortIndex;return S!==0?S:V.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],h=[],p=1,g=null,T=3,y=!1,w=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,C=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 R(V){for(var q=n(h);q!==null;){if(q.callback===null)r(h);else if(q.startTime<=V)r(h),q.sortIndex=q.expirationTime,t(d,q);else break;q=n(h)}}function U(V){if(v=!1,R(V),!w)if(n(d)!==null)w=!0,Ce(Y);else{var q=n(h);q!==null&&ee(U,q.startTime-V)}}function Y(V,q){w=!1,v&&(v=!1,C(ce),ce=-1),y=!0;var S=T;try{for(R(q),g=n(d);g!==null&&(!(g.expirationTime>q)||V&&!oe());){var I=g.callback;if(typeof I=="function"){g.callback=null,T=g.priorityLevel;var W=I(g.expirationTime<=q);q=e.unstable_now(),typeof W=="function"?g.callback=W:g===n(d)&&r(d),R(q)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var be=n(h);be!==null&&ee(U,be.startTime-q),O=!1}return O}finally{g=null,T=S,y=!1}}var F=!1,X=null,ce=-1,de=5,z=-1;function oe(){return!(e.unstable_now()-z<de)}function he(){if(X!==null){var V=e.unstable_now();z=V;var q=!0;try{q=X(!0,V)}finally{q?ae():(F=!1,X=null)}}else F=!1}var ae;if(typeof k=="function")ae=function(){k(he)};else if(typeof MessageChannel!="undefined"){var se=new MessageChannel,Te=se.port2;se.port1.onmessage=he,ae=function(){Te.postMessage(null)}}else ae=function(){A(he,0)};function Ce(V){X=V,F||(F=!0,ae())}function ee(V,q){ce=A(function(){V(e.unstable_now())},q)}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(V){V.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Ce(Y))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(V){switch(T){case 1:case 2:case 3:var q=3;break;default:q=T}var S=T;T=q;try{return V()}finally{T=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,q){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var S=T;T=V;try{return q()}finally{T=S}},e.unstable_scheduleCallback=function(V,q,S){var I=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?I+S:I):S=I,V){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=S+W,V={id:p++,callback:q,priorityLevel:V,startTime:S,expirationTime:W,sortIndex:-1},S>I?(V.sortIndex=S,t(h,V),n(d)===null&&V===n(h)&&(v?(C(ce),ce=-1):v=!0,ee(U,S-I))):(V.sortIndex=W,t(d,V),w||y||(w=!0,Ce(Y))),V},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(V){var q=T;return function(){var S=T;T=q;try{return V.apply(this,arguments)}finally{T=S}}}})(Nd)),Nd}var j0;function DS(){return j0||(j0=1,kd.exports=LS()),kd.exports}var $0;function MS(){if($0)return ln;$0=1;var e=lo(),t=DS();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[: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={},g={};function T(i){return d.call(g,i)?!0:d.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function w(i,s,l,f){if(s===null||typeof s=="undefined"||y(i,s,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,l,f,E,b,_){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=_}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var C=/[\-:]([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 s=i.replace(C,k);A[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(C,k);A[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(C,k);A[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,s,l,f){var E=A.hasOwnProperty(s)?A[s]:null;(E!==null?E.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,l,E,f)&&(l=null),f||E===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,f=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,f?i.setAttributeNS(f,s,l):i.setAttribute(s,l))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),F=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),oe=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),Te=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),V=Symbol.iterator;function q(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var S=Object.assign,I;function W(i){if(I===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|
|
17
|
+
`+I+i}var O=!1;function be(i,s){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(te){var f=te}Reflect.construct(i,[],s)}else{try{s.call()}catch(te){f=te}i.call(s.prototype)}else{try{throw Error()}catch(te){f=te}i()}}catch(te){if(te&&f&&typeof te.stack=="string"){for(var E=te.stack.split(`
|
|
18
18
|
`),b=f.stack.split(`
|
|
19
|
-
`),_=E.length-1,L=b.length-1;1<=_&&0<=L&&E[_]!==b[L];)L--;for(;1<=_&&0<=L;_--,L--)if(E[_]!==b[L]){if(_!==1||L!==1)do if(_--,L--,0>L||E[_]!==b[L]){var
|
|
20
|
-
`+E[_].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=_&&0<=L);break}}}finally{N=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?G(i):""}function Oe(i){switch(i.tag){case 5:return G(i.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("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 Re(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 K:return"Fragment";case F:return"Portal";case ge:return"Profiler";case de:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ue:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case te:return s=i.displayName||null,s!==null?s:Re(i.type)||"Memo";case Te:s=i._payload,i=i._init;try{return Re(i(s))}catch(l){}}return null}function He(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Re(s);case 8:return s===de?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Se(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function qe(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ut(i){var s=qe(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(_){f=""+_,b.call(this,_)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function pn(i){i._valueTracker||(i._valueTracker=ut(i))}function Yi(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=qe(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function Zr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Jn(i,s){var l=s.checked;return C({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function ya(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=Se(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function ba(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Wo(i,s){ba(i,s);var l=Se(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Go(i,s.type,l):s.hasOwnProperty("defaultValue")&&Go(i,s.type,Se(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function kl(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Go(i,s,l){(s!=="number"||Zr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ei=Array.isArray;function ti(i,s,l,f){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&f&&(i[l].defaultSelected=!0)}else{for(l=""+Se(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,f&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Ta(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Nl(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(ei(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Se(l)}}function Ol(i,s){var l=Se(s.value),f=Se(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),f!=null&&(i.defaultValue=""+f)}function Il(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ie(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 we(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ie(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,f,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,f,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Xe(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var jt={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},Pr=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(i){Pr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),jt[s]=jt[i]})});function Mn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||jt.hasOwnProperty(i)&&jt[i]?(""+s).trim():s+"px"}function ni(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,E=Mn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,E):i[l]=E}}var Wi=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 $t(i,s){if(s){if(Wi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Tr(i,s){if(i.indexOf("-")===-1)return typeof s.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 Sn=null;function Bh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Uh=null,Ko=null,Qo=null;function ET(i){if(i=ja(i)){if(typeof Uh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=ec(s),Uh(i.stateNode,i.type,s))}}function yT(i){Ko?Qo?Qo.push(i):Qo=[i]:Ko=i}function bT(){if(Ko){var i=Ko,s=Qo;if(Qo=Ko=null,ET(i),s)for(i=0;i<s.length;i++)ET(s[i])}}function TT(i,s){return i(s)}function xT(){}var Hh=!1;function wT(i,s,l){if(Hh)return i(s,l);Hh=!0;try{return TT(i,s,l)}finally{Hh=!1,(Ko!==null||Qo!==null)&&(xT(),bT())}}function xa(i,s){var l=i.stateNode;if(l===null)return null;var f=ec(l);if(f===null)return null;l=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var zh=!1;if(c)try{var wa={};Object.defineProperty(wa,"passive",{get:function(){zh=!0}}),window.addEventListener("test",wa,wa),window.removeEventListener("test",wa,wa)}catch(i){zh=!1}function J8(i,s,l,f,E,b,_,L,U){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(fe){this.onError(fe)}}var _a=!1,Rl=null,Pl=!1,jh=null,Z8={onError:function(i){_a=!0,Rl=i}};function eM(i,s,l,f,E,b,_,L,U){_a=!1,Rl=null,J8.apply(Z8,arguments)}function tM(i,s,l,f,E,b,_,L,U){if(eM.apply(this,arguments),_a){if(_a){var Z=Rl;_a=!1,Rl=null}else throw Error(n(198));Pl||(Pl=!0,jh=Z)}}function Gi(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function _T(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function vT(i){if(Gi(i)!==i)throw Error(n(188))}function nM(i){var s=i.alternate;if(!s){if(s=Gi(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,f=s;;){var E=l.return;if(E===null)break;var b=E.alternate;if(b===null){if(f=E.return,f!==null){l=f;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===l)return vT(E),i;if(b===f)return vT(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==f.return)l=E,f=b;else{for(var _=!1,L=E.child;L;){if(L===l){_=!0,l=E,f=b;break}if(L===f){_=!0,f=E,l=b;break}L=L.sibling}if(!_){for(L=b.child;L;){if(L===l){_=!0,l=b,f=E;break}if(L===f){_=!0,f=b,l=E;break}L=L.sibling}if(!_)throw Error(n(189))}}if(l.alternate!==f)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function ST(i){return i=nM(i),i!==null?AT(i):null}function AT(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=AT(i);if(s!==null)return s;i=i.sibling}return null}var CT=t.unstable_scheduleCallback,kT=t.unstable_cancelCallback,rM=t.unstable_shouldYield,iM=t.unstable_requestPaint,_t=t.unstable_now,oM=t.unstable_getCurrentPriorityLevel,$h=t.unstable_ImmediatePriority,NT=t.unstable_UserBlockingPriority,Ll=t.unstable_NormalPriority,sM=t.unstable_LowPriority,OT=t.unstable_IdlePriority,Dl=null,xr=null;function aM(i){if(xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(Dl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Zn=Math.clz32?Math.clz32:cM,uM=Math.log,lM=Math.LN2;function cM(i){return i>>>=0,i===0?32:31-(uM(i)/lM|0)|0}var Ml=64,Fl=4194304;function va(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 Bl(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,E=i.suspendedLanes,b=i.pingedLanes,_=l&268435455;if(_!==0){var L=_&~E;L!==0?f=va(L):(b&=_,b!==0&&(f=va(b)))}else _=l&~E,_!==0?f=va(_):b!==0&&(f=va(b));if(f===0)return 0;if(s!==0&&s!==f&&(s&E)===0&&(E=f&-f,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)l=31-Zn(s),E=1<<l,f|=i[l],s&=~E;return f}function dM(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 fM(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var _=31-Zn(b),L=1<<_,U=E[_];U===-1?((L&l)===0||(L&f)!==0)&&(E[_]=dM(L,s)):U<=s&&(i.expiredLanes|=L),b&=~L}}function Vh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function IT(){var i=Ml;return Ml<<=1,(Ml&4194240)===0&&(Ml=64),i}function qh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Sa(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Zn(s),i[s]=l}function hM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Zn(l),b=1<<E;s[E]=0,f[E]=-1,i[E]=-1,l&=~b}}function Yh(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-Zn(l),E=1<<f;E&s|i[f]&s&&(i[f]|=s),l&=~E}}var nt=0;function RT(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var PT,Wh,LT,DT,MT,Gh=!1,Ul=[],ri=null,ii=null,oi=null,Aa=new Map,Ca=new Map,si=[],pM="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 FT(i,s){switch(i){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":Aa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ca.delete(s.pointerId)}}function ka(i,s,l,f,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:b,targetContainers:[E]},s!==null&&(s=ja(s),s!==null&&Wh(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function mM(i,s,l,f,E){switch(s){case"focusin":return ri=ka(ri,i,s,l,f,E),!0;case"dragenter":return ii=ka(ii,i,s,l,f,E),!0;case"mouseover":return oi=ka(oi,i,s,l,f,E),!0;case"pointerover":var b=E.pointerId;return Aa.set(b,ka(Aa.get(b)||null,i,s,l,f,E)),!0;case"gotpointercapture":return b=E.pointerId,Ca.set(b,ka(Ca.get(b)||null,i,s,l,f,E)),!0}return!1}function BT(i){var s=Ki(i.target);if(s!==null){var l=Gi(s);if(l!==null){if(s=l.tag,s===13){if(s=_T(l),s!==null){i.blockedOn=s,MT(i.priority,function(){LT(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Hl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Qh(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Sn=f,l.target.dispatchEvent(f),Sn=null}else return s=ja(l),s!==null&&Wh(s),i.blockedOn=l,!1;s.shift()}return!0}function UT(i,s,l){Hl(i)&&l.delete(s)}function gM(){Gh=!1,ri!==null&&Hl(ri)&&(ri=null),ii!==null&&Hl(ii)&&(ii=null),oi!==null&&Hl(oi)&&(oi=null),Aa.forEach(UT),Ca.forEach(UT)}function Na(i,s){i.blockedOn===s&&(i.blockedOn=null,Gh||(Gh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,gM)))}function Oa(i){function s(E){return Na(E,i)}if(0<Ul.length){Na(Ul[0],i);for(var l=1;l<Ul.length;l++){var f=Ul[l];f.blockedOn===i&&(f.blockedOn=null)}}for(ri!==null&&Na(ri,i),ii!==null&&Na(ii,i),oi!==null&&Na(oi,i),Aa.forEach(s),Ca.forEach(s),l=0;l<si.length;l++)f=si[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<si.length&&(l=si[0],l.blockedOn===null);)BT(l),l.blockedOn===null&&si.shift()}var Xo=H.ReactCurrentBatchConfig,zl=!0;function EM(i,s,l,f){var E=nt,b=Xo.transition;Xo.transition=null;try{nt=1,Kh(i,s,l,f)}finally{nt=E,Xo.transition=b}}function yM(i,s,l,f){var E=nt,b=Xo.transition;Xo.transition=null;try{nt=4,Kh(i,s,l,f)}finally{nt=E,Xo.transition=b}}function Kh(i,s,l,f){if(zl){var E=Qh(i,s,l,f);if(E===null)hp(i,s,f,jl,l),FT(i,f);else if(mM(E,i,s,l,f))f.stopPropagation();else if(FT(i,f),s&4&&-1<pM.indexOf(i)){for(;E!==null;){var b=ja(E);if(b!==null&&PT(b),b=Qh(i,s,l,f),b===null&&hp(i,s,f,jl,l),b===E)break;E=b}E!==null&&f.stopPropagation()}else hp(i,s,f,null,l)}}var jl=null;function Qh(i,s,l,f){if(jl=null,i=Bh(f),i=Ki(i),i!==null)if(s=Gi(i),s===null)i=null;else if(l=s.tag,l===13){if(i=_T(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return jl=i,null}function HT(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(oM()){case $h:return 1;case NT:return 4;case Ll:case sM:return 16;case OT:return 536870912;default:return 16}default:return 16}}var ai=null,Xh=null,$l=null;function zT(){if($l)return $l;var i,s=Xh,l=s.length,f,E="value"in ai?ai.value:ai.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var _=l-i;for(f=1;f<=_&&s[l-f]===E[b-f];f++);return $l=E.slice(i,1<f?1-f:void 0)}function Vl(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function ql(){return!0}function jT(){return!1}function An(i){function s(l,f,E,b,_){this._reactName=l,this._targetInst=E,this.type=f,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(l=i[L],this[L]=l?l(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ql:jT,this.isPropagationStopped=jT,this}return C(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),s}var Jo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jh=An(Jo),Ia=C({},Jo,{view:0,detail:0}),bM=An(Ia),Zh,ep,Ra,Yl=C({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:np,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!==Ra&&(Ra&&i.type==="mousemove"?(Zh=i.screenX-Ra.screenX,ep=i.screenY-Ra.screenY):ep=Zh=0,Ra=i),Zh)},movementY:function(i){return"movementY"in i?i.movementY:ep}}),$T=An(Yl),TM=C({},Yl,{dataTransfer:0}),xM=An(TM),wM=C({},Ia,{relatedTarget:0}),tp=An(wM),_M=C({},Jo,{animationName:0,elapsedTime:0,pseudoElement:0}),vM=An(_M),SM=C({},Jo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),AM=An(SM),CM=C({},Jo,{data:0}),VT=An(CM),kM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NM={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"},OM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=OM[i])?!!s[i]:!1}function np(){return IM}var RM=C({},Ia,{key:function(i){if(i.key){var s=kM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Vl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?NM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:np,charCode:function(i){return i.type==="keypress"?Vl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Vl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),PM=An(RM),LM=C({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qT=An(LM),DM=C({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:np}),MM=An(DM),FM=C({},Jo,{propertyName:0,elapsedTime:0,pseudoElement:0}),BM=An(FM),UM=C({},Yl,{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}),HM=An(UM),zM=[9,13,27,32],rp=c&&"CompositionEvent"in window,Pa=null;c&&"documentMode"in document&&(Pa=document.documentMode);var jM=c&&"TextEvent"in window&&!Pa,YT=c&&(!rp||Pa&&8<Pa&&11>=Pa),WT=" ",GT=!1;function KT(i,s){switch(i){case"keyup":return zM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Zo=!1;function $M(i,s){switch(i){case"compositionend":return QT(s);case"keypress":return s.which!==32?null:(GT=!0,WT);case"textInput":return i=s.data,i===WT&>?null:i;default:return null}}function VM(i,s){if(Zo)return i==="compositionend"||!rp&&KT(i,s)?(i=zT(),$l=Xh=ai=null,Zo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return YT&&s.locale!=="ko"?null:s.data;default:return null}}var qM={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 XT(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!qM[i.type]:s==="textarea"}function JT(i,s,l,f){yT(f),s=Xl(s,"onChange"),0<s.length&&(l=new Jh("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var La=null,Da=null;function YM(i){gx(i,0)}function Wl(i){var s=is(i);if(Yi(s))return i}function WM(i,s){if(i==="change")return s}var ZT=!1;if(c){var ip;if(c){var op="oninput"in document;if(!op){var ex=document.createElement("div");ex.setAttribute("oninput","return;"),op=typeof ex.oninput=="function"}ip=op}else ip=!1;ZT=ip&&(!document.documentMode||9<document.documentMode)}function tx(){La&&(La.detachEvent("onpropertychange",nx),Da=La=null)}function nx(i){if(i.propertyName==="value"&&Wl(Da)){var s=[];JT(s,Da,i,Bh(i)),wT(YM,s)}}function GM(i,s,l){i==="focusin"?(tx(),La=s,Da=l,La.attachEvent("onpropertychange",nx)):i==="focusout"&&tx()}function KM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Wl(Da)}function QM(i,s){if(i==="click")return Wl(s)}function XM(i,s){if(i==="input"||i==="change")return Wl(s)}function JM(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var er=typeof Object.is=="function"?Object.is:JM;function Ma(i,s){if(er(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),f=Object.keys(s);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var E=l[f];if(!d.call(s,E)||!er(i[E],s[E]))return!1}return!0}function rx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ix(i,s){var l=rx(i);i=0;for(var f;l;){if(l.nodeType===3){if(f=i+l.textContent.length,i<=s&&f>=s)return{node:l,offset:s-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=rx(l)}}function ox(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?ox(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function sx(){for(var i=window,s=Zr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(f){l=!1}if(l)i=s.contentWindow;else break;s=Zr(i.document)}return s}function sp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function ZM(i){var s=sx(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&ox(l.ownerDocument.documentElement,l)){if(f!==null&&sp(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(f.start,E);f=f.end===void 0?b:Math.min(f.end,E),!i.extend&&b>f&&(E=f,f=b,b=E),E=ix(l,b);var _=ix(l,f);E&&_&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==_.node||i.focusOffset!==_.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>f?(i.addRange(s),i.extend(_.node,_.offset)):(s.setEnd(_.node,_.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var e9=c&&"documentMode"in document&&11>=document.documentMode,es=null,ap=null,Fa=null,up=!1;function ax(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;up||es==null||es!==Zr(f)||(f=es,"selectionStart"in f&&sp(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Fa&&Ma(Fa,f)||(Fa=f,f=Xl(ap,"onSelect"),0<f.length&&(s=new Jh("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=es)))}function Gl(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var ts={animationend:Gl("Animation","AnimationEnd"),animationiteration:Gl("Animation","AnimationIteration"),animationstart:Gl("Animation","AnimationStart"),transitionend:Gl("Transition","TransitionEnd")},lp={},ux={};c&&(ux=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Kl(i){if(lp[i])return lp[i];if(!ts[i])return i;var s=ts[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in ux)return lp[i]=s[l];return i}var lx=Kl("animationend"),cx=Kl("animationiteration"),dx=Kl("animationstart"),fx=Kl("transitionend"),hx=new Map,px="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,s){hx.set(i,s),a(s,[i])}for(var cp=0;cp<px.length;cp++){var dp=px[cp],t9=dp.toLowerCase(),n9=dp[0].toUpperCase()+dp.slice(1);ui(t9,"on"+n9)}ui(lx,"onAnimationEnd"),ui(cx,"onAnimationIteration"),ui(dx,"onAnimationStart"),ui("dblclick","onDoubleClick"),ui("focusin","onFocus"),ui("focusout","onBlur"),ui(fx,"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 Ba="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(" "),r9=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ba));function mx(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,tM(f,s,void 0,i),i.currentTarget=null}function gx(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var f=i[l],E=f.event;f=f.listeners;e:{var b=void 0;if(s)for(var _=f.length-1;0<=_;_--){var L=f[_],U=L.instance,Z=L.currentTarget;if(L=L.listener,U!==b&&E.isPropagationStopped())break e;mx(E,L,Z),b=U}else for(_=0;_<f.length;_++){if(L=f[_],U=L.instance,Z=L.currentTarget,L=L.listener,U!==b&&E.isPropagationStopped())break e;mx(E,L,Z),b=U}}}if(Pl)throw i=jh,Pl=!1,jh=null,i}function lt(i,s){var l=s[bp];l===void 0&&(l=s[bp]=new Set);var f=i+"__bubble";l.has(f)||(Ex(s,i,2,!1),l.add(f))}function fp(i,s,l){var f=0;s&&(f|=4),Ex(l,i,f,s)}var Ql="_reactListening"+Math.random().toString(36).slice(2);function Ua(i){if(!i[Ql]){i[Ql]=!0,r.forEach(function(l){l!=="selectionchange"&&(r9.has(l)||fp(l,!1,i),fp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Ql]||(s[Ql]=!0,fp("selectionchange",!1,s))}}function Ex(i,s,l,f){switch(HT(s)){case 1:var E=EM;break;case 4:E=yM;break;default:E=Kh}l=E.bind(null,s,l,i),E=void 0,!zh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),f?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function hp(i,s,l,f,E){var b=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var L=f.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(_===4)for(_=f.return;_!==null;){var U=_.tag;if((U===3||U===4)&&(U=_.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;_=_.return}for(;L!==null;){if(_=Ki(L),_===null)return;if(U=_.tag,U===5||U===6){f=b=_;continue e}L=L.parentNode}}f=f.return}wT(function(){var Z=b,fe=Bh(l),me=[];e:{var le=hx.get(i);if(le!==void 0){var _e=Jh,Ae=i;switch(i){case"keypress":if(Vl(l)===0)break e;case"keydown":case"keyup":_e=PM;break;case"focusin":Ae="focus",_e=tp;break;case"focusout":Ae="blur",_e=tp;break;case"beforeblur":case"afterblur":_e=tp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_e=$T;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_e=xM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_e=MM;break;case lx:case cx:case dx:_e=vM;break;case fx:_e=BM;break;case"scroll":_e=bM;break;case"wheel":_e=HM;break;case"copy":case"cut":case"paste":_e=AM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_e=qT}var ke=(s&4)!==0,vt=!ke&&i==="scroll",q=ke?le!==null?le+"Capture":null:le;ke=[];for(var j=Z,Q;j!==null;){Q=j;var be=Q.stateNode;if(Q.tag===5&&be!==null&&(Q=be,q!==null&&(be=xa(j,q),be!=null&&ke.push(Ha(j,be,Q)))),vt)break;j=j.return}0<ke.length&&(le=new _e(le,Ae,null,l,fe),me.push({event:le,listeners:ke}))}}if((s&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",_e=i==="mouseout"||i==="pointerout",le&&l!==Sn&&(Ae=l.relatedTarget||l.fromElement)&&(Ki(Ae)||Ae[Lr]))break e;if((_e||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,_e?(Ae=l.relatedTarget||l.toElement,_e=Z,Ae=Ae?Ki(Ae):null,Ae!==null&&(vt=Gi(Ae),Ae!==vt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(_e=null,Ae=Z),_e!==Ae)){if(ke=$T,be="onMouseLeave",q="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(ke=qT,be="onPointerLeave",q="onPointerEnter",j="pointer"),vt=_e==null?le:is(_e),Q=Ae==null?le:is(Ae),le=new ke(be,j+"leave",_e,l,fe),le.target=vt,le.relatedTarget=Q,be=null,Ki(fe)===Z&&(ke=new ke(q,j+"enter",Ae,l,fe),ke.target=Q,ke.relatedTarget=vt,be=ke),vt=be,_e&&Ae)t:{for(ke=_e,q=Ae,j=0,Q=ke;Q;Q=ns(Q))j++;for(Q=0,be=q;be;be=ns(be))Q++;for(;0<j-Q;)ke=ns(ke),j--;for(;0<Q-j;)q=ns(q),Q--;for(;j--;){if(ke===q||q!==null&&ke===q.alternate)break t;ke=ns(ke),q=ns(q)}ke=null}else ke=null;_e!==null&&yx(me,le,_e,ke,!1),Ae!==null&&vt!==null&&yx(me,vt,Ae,ke,!0)}}e:{if(le=Z?is(Z):window,_e=le.nodeName&&le.nodeName.toLowerCase(),_e==="select"||_e==="input"&&le.type==="file")var Ne=WM;else if(XT(le))if(ZT)Ne=XM;else{Ne=KM;var De=GM}else(_e=le.nodeName)&&_e.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Ne=QM);if(Ne&&(Ne=Ne(i,Z))){JT(me,Ne,l,fe);break e}De&&De(i,le,Z),i==="focusout"&&(De=le._wrapperState)&&De.controlled&&le.type==="number"&&Go(le,"number",le.value)}switch(De=Z?is(Z):window,i){case"focusin":(XT(De)||De.contentEditable==="true")&&(es=De,ap=Z,Fa=null);break;case"focusout":Fa=ap=es=null;break;case"mousedown":up=!0;break;case"contextmenu":case"mouseup":case"dragend":up=!1,ax(me,l,fe);break;case"selectionchange":if(e9)break;case"keydown":case"keyup":ax(me,l,fe)}var Me;if(rp)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Zo?KT(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(YT&&l.locale!=="ko"&&(Zo||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Zo&&(Me=zT()):(ai=fe,Xh="value"in ai?ai.value:ai.textContent,Zo=!0)),De=Xl(Z,Ue),0<De.length&&(Ue=new VT(Ue,i,null,l,fe),me.push({event:Ue,listeners:De}),Me?Ue.data=Me:(Me=QT(l),Me!==null&&(Ue.data=Me)))),(Me=jM?$M(i,l):VM(i,l))&&(Z=Xl(Z,"onBeforeInput"),0<Z.length&&(fe=new VT("onBeforeInput","beforeinput",null,l,fe),me.push({event:fe,listeners:Z}),fe.data=Me))}gx(me,s)})}function Ha(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Xl(i,s){for(var l=s+"Capture",f=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=xa(i,l),b!=null&&f.unshift(Ha(i,b,E)),b=xa(i,s),b!=null&&f.push(Ha(i,b,E))),i=i.return}return f}function ns(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function yx(i,s,l,f,E){for(var b=s._reactName,_=[];l!==null&&l!==f;){var L=l,U=L.alternate,Z=L.stateNode;if(U!==null&&U===f)break;L.tag===5&&Z!==null&&(L=Z,E?(U=xa(l,b),U!=null&&_.unshift(Ha(l,U,L))):E||(U=xa(l,b),U!=null&&_.push(Ha(l,U,L)))),l=l.return}_.length!==0&&i.push({event:s,listeners:_})}var i9=/\r\n?/g,o9=/\u0000|\uFFFD/g;function bx(i){return(typeof i=="string"?i:""+i).replace(i9,`
|
|
21
|
-
`).replace(o9,"")}function Jl(i,s,l){if(s=bx(s),bx(i)!==s&&l)throw Error(n(425))}function Zl(){}var pp=null,mp=null;function gp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Ep=typeof setTimeout=="function"?setTimeout:void 0,s9=typeof clearTimeout=="function"?clearTimeout:void 0,Tx=typeof Promise=="function"?Promise:void 0,a9=typeof queueMicrotask=="function"?queueMicrotask:typeof Tx!="undefined"?function(i){return Tx.resolve(null).then(i).catch(u9)}:Ep;function u9(i){setTimeout(function(){throw i})}function yp(i,s){var l=s,f=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(f===0){i.removeChild(E),Oa(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=E}while(l);Oa(s)}function li(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function xx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var rs=Math.random().toString(36).slice(2),wr="__reactFiber$"+rs,za="__reactProps$"+rs,Lr="__reactContainer$"+rs,bp="__reactEvents$"+rs,l9="__reactListeners$"+rs,c9="__reactHandles$"+rs;function Ki(i){var s=i[wr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Lr]||l[wr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=xx(i);i!==null;){if(l=i[wr])return l;i=xx(i)}return s}i=l,l=i.parentNode}return null}function ja(i){return i=i[wr]||i[Lr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function is(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function ec(i){return i[za]||null}var Tp=[],os=-1;function ci(i){return{current:i}}function ct(i){0>os||(i.current=Tp[os],Tp[os]=null,os--)}function at(i,s){os++,Tp[os]=i.current,i.current=s}var di={},Xt=ci(di),mn=ci(!1),Qi=di;function ss(i,s){var l=i.type.contextTypes;if(!l)return di;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function gn(i){return i=i.childContextTypes,i!=null}function tc(){ct(mn),ct(Xt)}function wx(i,s,l){if(Xt.current!==di)throw Error(n(168));at(Xt,s),at(mn,l)}function _x(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var E in f)if(!(E in s))throw Error(n(108,He(i)||"Unknown",E));return C({},l,f)}function nc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||di,Qi=Xt.current,at(Xt,i),at(mn,mn.current),!0}function vx(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=_x(i,s,Qi),f.__reactInternalMemoizedMergedChildContext=i,ct(mn),ct(Xt),at(Xt,i)):ct(mn),at(mn,l)}var Dr=null,rc=!1,xp=!1;function Sx(i){Dr===null?Dr=[i]:Dr.push(i)}function d9(i){rc=!0,Sx(i)}function fi(){if(!xp&&Dr!==null){xp=!0;var i=0,s=nt;try{var l=Dr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}Dr=null,rc=!1}catch(E){throw Dr!==null&&(Dr=Dr.slice(i+1)),CT($h,fi),E}finally{nt=s,xp=!1}}return null}var as=[],us=0,ic=null,oc=0,Fn=[],Bn=0,Xi=null,Mr=1,Fr="";function Ji(i,s){as[us++]=oc,as[us++]=ic,ic=i,oc=s}function Ax(i,s,l){Fn[Bn++]=Mr,Fn[Bn++]=Fr,Fn[Bn++]=Xi,Xi=i;var f=Mr;i=Fr;var E=32-Zn(f)-1;f&=~(1<<E),l+=1;var b=32-Zn(s)+E;if(30<b){var _=E-E%5;b=(f&(1<<_)-1).toString(32),f>>=_,E-=_,Mr=1<<32-Zn(s)+E|l<<E|f,Fr=b+i}else Mr=1<<b|l<<E|f,Fr=i}function wp(i){i.return!==null&&(Ji(i,1),Ax(i,1,0))}function _p(i){for(;i===ic;)ic=as[--us],as[us]=null,oc=as[--us],as[us]=null;for(;i===Xi;)Xi=Fn[--Bn],Fn[Bn]=null,Fr=Fn[--Bn],Fn[Bn]=null,Mr=Fn[--Bn],Fn[Bn]=null}var Cn=null,kn=null,pt=!1,tr=null;function Cx(i,s){var l=jn(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function kx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Cn=i,kn=li(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Cn=i,kn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Xi!==null?{id:Mr,overflow:Fr}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=jn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Cn=i,kn=null,!0):!1;default:return!1}}function vp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Sp(i){if(pt){var s=kn;if(s){var l=s;if(!kx(i,s)){if(vp(i))throw Error(n(418));s=li(l.nextSibling);var f=Cn;s&&kx(i,s)?Cx(f,l):(i.flags=i.flags&-4097|2,pt=!1,Cn=i)}}else{if(vp(i))throw Error(n(418));i.flags=i.flags&-4097|2,pt=!1,Cn=i}}}function Nx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Cn=i}function sc(i){if(i!==Cn)return!1;if(!pt)return Nx(i),pt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!gp(i.type,i.memoizedProps)),s&&(s=kn)){if(vp(i))throw Ox(),Error(n(418));for(;s;)Cx(i,s),s=li(s.nextSibling)}if(Nx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){kn=li(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}kn=null}}else kn=Cn?li(i.stateNode.nextSibling):null;return!0}function Ox(){for(var i=kn;i;)i=li(i.nextSibling)}function ls(){kn=Cn=null,pt=!1}function Ap(i){tr===null?tr=[i]:tr.push(i)}var f9=H.ReactCurrentBatchConfig;function $a(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var f=l.stateNode}if(!f)throw Error(n(147,i));var E=f,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(_){var L=E.refs;_===null?delete L[b]:L[b]=_},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function ac(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Ix(i){var s=i._init;return s(i._payload)}function Rx(i){function s(q,j){if(i){var Q=q.deletions;Q===null?(q.deletions=[j],q.flags|=16):Q.push(j)}}function l(q,j){if(!i)return null;for(;j!==null;)s(q,j),j=j.sibling;return null}function f(q,j){for(q=new Map;j!==null;)j.key!==null?q.set(j.key,j):q.set(j.index,j),j=j.sibling;return q}function E(q,j){return q=Ti(q,j),q.index=0,q.sibling=null,q}function b(q,j,Q){return q.index=Q,i?(Q=q.alternate,Q!==null?(Q=Q.index,Q<j?(q.flags|=2,j):Q):(q.flags|=2,j)):(q.flags|=1048576,j)}function _(q){return i&&q.alternate===null&&(q.flags|=2),q}function L(q,j,Q,be){return j===null||j.tag!==6?(j=Em(Q,q.mode,be),j.return=q,j):(j=E(j,Q),j.return=q,j)}function U(q,j,Q,be){var Ne=Q.type;return Ne===K?fe(q,j,Q.props.children,be,Q.key):j!==null&&(j.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Te&&Ix(Ne)===j.type)?(be=E(j,Q.props),be.ref=$a(q,j,Q),be.return=q,be):(be=Ic(Q.type,Q.key,Q.props,null,q.mode,be),be.ref=$a(q,j,Q),be.return=q,be)}function Z(q,j,Q,be){return j===null||j.tag!==4||j.stateNode.containerInfo!==Q.containerInfo||j.stateNode.implementation!==Q.implementation?(j=ym(Q,q.mode,be),j.return=q,j):(j=E(j,Q.children||[]),j.return=q,j)}function fe(q,j,Q,be,Ne){return j===null||j.tag!==7?(j=so(Q,q.mode,be,Ne),j.return=q,j):(j=E(j,Q),j.return=q,j)}function me(q,j,Q){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Em(""+j,q.mode,Q),j.return=q,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case W:return Q=Ic(j.type,j.key,j.props,null,q.mode,Q),Q.ref=$a(q,null,j),Q.return=q,Q;case F:return j=ym(j,q.mode,Q),j.return=q,j;case Te:var be=j._init;return me(q,be(j._payload),Q)}if(ei(j)||se(j))return j=so(j,q.mode,Q,null),j.return=q,j;ac(q,j)}return null}function le(q,j,Q,be){var Ne=j!==null?j.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Ne!==null?null:L(q,j,""+Q,be);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:return Q.key===Ne?U(q,j,Q,be):null;case F:return Q.key===Ne?Z(q,j,Q,be):null;case Te:return Ne=Q._init,le(q,j,Ne(Q._payload),be)}if(ei(Q)||se(Q))return Ne!==null?null:fe(q,j,Q,be,null);ac(q,Q)}return null}function _e(q,j,Q,be,Ne){if(typeof be=="string"&&be!==""||typeof be=="number")return q=q.get(Q)||null,L(j,q,""+be,Ne);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case W:return q=q.get(be.key===null?Q:be.key)||null,U(j,q,be,Ne);case F:return q=q.get(be.key===null?Q:be.key)||null,Z(j,q,be,Ne);case Te:var De=be._init;return _e(q,j,Q,De(be._payload),Ne)}if(ei(be)||se(be))return q=q.get(Q)||null,fe(j,q,be,Ne,null);ac(j,be)}return null}function Ae(q,j,Q,be){for(var Ne=null,De=null,Me=j,Ue=j=0,zt=null;Me!==null&&Ue<Q.length;Ue++){Me.index>Ue?(zt=Me,Me=null):zt=Me.sibling;var et=le(q,Me,Q[Ue],be);if(et===null){Me===null&&(Me=zt);break}i&&Me&&et.alternate===null&&s(q,Me),j=b(et,j,Ue),De===null?Ne=et:De.sibling=et,De=et,Me=zt}if(Ue===Q.length)return l(q,Me),pt&&Ji(q,Ue),Ne;if(Me===null){for(;Ue<Q.length;Ue++)Me=me(q,Q[Ue],be),Me!==null&&(j=b(Me,j,Ue),De===null?Ne=Me:De.sibling=Me,De=Me);return pt&&Ji(q,Ue),Ne}for(Me=f(q,Me);Ue<Q.length;Ue++)zt=_e(Me,q,Ue,Q[Ue],be),zt!==null&&(i&&zt.alternate!==null&&Me.delete(zt.key===null?Ue:zt.key),j=b(zt,j,Ue),De===null?Ne=zt:De.sibling=zt,De=zt);return i&&Me.forEach(function(xi){return s(q,xi)}),pt&&Ji(q,Ue),Ne}function ke(q,j,Q,be){var Ne=se(Q);if(typeof Ne!="function")throw Error(n(150));if(Q=Ne.call(Q),Q==null)throw Error(n(151));for(var De=Ne=null,Me=j,Ue=j=0,zt=null,et=Q.next();Me!==null&&!et.done;Ue++,et=Q.next()){Me.index>Ue?(zt=Me,Me=null):zt=Me.sibling;var xi=le(q,Me,et.value,be);if(xi===null){Me===null&&(Me=zt);break}i&&Me&&xi.alternate===null&&s(q,Me),j=b(xi,j,Ue),De===null?Ne=xi:De.sibling=xi,De=xi,Me=zt}if(et.done)return l(q,Me),pt&&Ji(q,Ue),Ne;if(Me===null){for(;!et.done;Ue++,et=Q.next())et=me(q,et.value,be),et!==null&&(j=b(et,j,Ue),De===null?Ne=et:De.sibling=et,De=et);return pt&&Ji(q,Ue),Ne}for(Me=f(q,Me);!et.done;Ue++,et=Q.next())et=_e(Me,q,Ue,et.value,be),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?Ue:et.key),j=b(et,j,Ue),De===null?Ne=et:De.sibling=et,De=et);return i&&Me.forEach(function(q9){return s(q,q9)}),pt&&Ji(q,Ue),Ne}function vt(q,j,Q,be){if(typeof Q=="object"&&Q!==null&&Q.type===K&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:e:{for(var Ne=Q.key,De=j;De!==null;){if(De.key===Ne){if(Ne=Q.type,Ne===K){if(De.tag===7){l(q,De.sibling),j=E(De,Q.props.children),j.return=q,q=j;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Te&&Ix(Ne)===De.type){l(q,De.sibling),j=E(De,Q.props),j.ref=$a(q,De,Q),j.return=q,q=j;break e}l(q,De);break}else s(q,De);De=De.sibling}Q.type===K?(j=so(Q.props.children,q.mode,be,Q.key),j.return=q,q=j):(be=Ic(Q.type,Q.key,Q.props,null,q.mode,be),be.ref=$a(q,j,Q),be.return=q,q=be)}return _(q);case F:e:{for(De=Q.key;j!==null;){if(j.key===De)if(j.tag===4&&j.stateNode.containerInfo===Q.containerInfo&&j.stateNode.implementation===Q.implementation){l(q,j.sibling),j=E(j,Q.children||[]),j.return=q,q=j;break e}else{l(q,j);break}else s(q,j);j=j.sibling}j=ym(Q,q.mode,be),j.return=q,q=j}return _(q);case Te:return De=Q._init,vt(q,j,De(Q._payload),be)}if(ei(Q))return Ae(q,j,Q,be);if(se(Q))return ke(q,j,Q,be);ac(q,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,j!==null&&j.tag===6?(l(q,j.sibling),j=E(j,Q),j.return=q,q=j):(l(q,j),j=Em(Q,q.mode,be),j.return=q,q=j),_(q)):l(q,j)}return vt}var cs=Rx(!0),Px=Rx(!1),uc=ci(null),lc=null,ds=null,Cp=null;function kp(){Cp=ds=lc=null}function Np(i){var s=uc.current;ct(uc),i._currentValue=s}function Op(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function fs(i,s){lc=i,Cp=ds=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(En=!0),i.firstContext=null)}function Un(i){var s=i._currentValue;if(Cp!==i)if(i={context:i,memoizedValue:s,next:null},ds===null){if(lc===null)throw Error(n(308));ds=i,lc.dependencies={lanes:0,firstContext:i}}else ds=ds.next=i;return s}var Zi=null;function Ip(i){Zi===null?Zi=[i]:Zi.push(i)}function Lx(i,s,l,f){var E=s.interleaved;return E===null?(l.next=l,Ip(s)):(l.next=E.next,E.next=l),s.interleaved=l,Br(i,f)}function Br(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var hi=!1;function Rp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Ur(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function pi(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Je&2)!==0){var E=f.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),f.pending=s,Br(i,l)}return E=f.interleaved,E===null?(s.next=s,Ip(f)):(s.next=E.next,E.next=s),f.interleaved=s,Br(i,l)}function cc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Yh(i,l)}}function Mx(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var E=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var _={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=_:b=b.next=_,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;l={baseState:f.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function dc(i,s,l,f){var E=i.updateQueue;hi=!1;var b=E.firstBaseUpdate,_=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var U=L,Z=U.next;U.next=null,_===null?b=Z:_.next=Z,_=U;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,L=fe.lastBaseUpdate,L!==_&&(L===null?fe.firstBaseUpdate=Z:L.next=Z,fe.lastBaseUpdate=U))}if(b!==null){var me=E.baseState;_=0,fe=Z=U=null,L=b;do{var le=L.lane,_e=L.eventTime;if((f&le)===le){fe!==null&&(fe=fe.next={eventTime:_e,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Ae=i,ke=L;switch(le=s,_e=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){me=Ae.call(_e,me,le);break e}me=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,le=typeof Ae=="function"?Ae.call(_e,me,le):Ae,le==null)break e;me=C({},me,le);break e;case 2:hi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[L]:le.push(L))}else _e={eventTime:_e,lane:le,tag:L.tag,payload:L.payload,callback:L.callback,next:null},fe===null?(Z=fe=_e,U=me):fe=fe.next=_e,_|=le;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;le=L,L=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(fe===null&&(U=me),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=fe,s=E.shared.interleaved,s!==null){E=s;do _|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);no|=_,i.lanes=_,i.memoizedState=me}}function Fx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],E=f.callback;if(E!==null){if(f.callback=null,f=l,typeof E!="function")throw Error(n(191,E));E.call(f)}}}var Va={},_r=ci(Va),qa=ci(Va),Ya=ci(Va);function eo(i){if(i===Va)throw Error(n(174));return i}function Pp(i,s){switch(at(Ya,s),at(qa,i),at(_r,Va),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:we(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=we(s,i)}ct(_r),at(_r,s)}function hs(){ct(_r),ct(qa),ct(Ya)}function Bx(i){eo(Ya.current);var s=eo(_r.current),l=we(s,i.type);s!==l&&(at(qa,i),at(_r,l))}function Lp(i){qa.current===i&&(ct(_r),ct(qa))}var gt=ci(0);function fc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Dp=[];function Mp(){for(var i=0;i<Dp.length;i++)Dp[i]._workInProgressVersionPrimary=null;Dp.length=0}var hc=H.ReactCurrentDispatcher,Fp=H.ReactCurrentBatchConfig,to=0,Et=null,Rt=null,Ut=null,pc=!1,Wa=!1,Ga=0,h9=0;function Jt(){throw Error(n(321))}function Bp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!er(i[l],s[l]))return!1;return!0}function Up(i,s,l,f,E,b){if(to=b,Et=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,hc.current=i===null||i.memoizedState===null?E9:y9,i=l(f,E),Wa){b=0;do{if(Wa=!1,Ga=0,25<=b)throw Error(n(301));b+=1,Ut=Rt=null,s.updateQueue=null,hc.current=b9,i=l(f,E)}while(Wa)}if(hc.current=Ec,s=Rt!==null&&Rt.next!==null,to=0,Ut=Rt=Et=null,pc=!1,s)throw Error(n(300));return i}function Hp(){var i=Ga!==0;return Ga=0,i}function vr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i,Ut}function Hn(){if(Rt===null){var i=Et.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=Ut===null?Et.memoizedState:Ut.next;if(s!==null)Ut=s,Rt=i;else{if(i===null)throw Error(n(310));Rt=i,i={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i}return Ut}function Ka(i,s){return typeof s=="function"?s(i):s}function zp(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Rt,E=f.baseQueue,b=l.pending;if(b!==null){if(E!==null){var _=E.next;E.next=b.next,b.next=_}f.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,f=f.baseState;var L=_=null,U=null,Z=b;do{var fe=Z.lane;if((to&fe)===fe)U!==null&&(U=U.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),f=Z.hasEagerState?Z.eagerState:i(f,Z.action);else{var me={lane:fe,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(L=U=me,_=f):U=U.next=me,Et.lanes|=fe,no|=fe}Z=Z.next}while(Z!==null&&Z!==b);U===null?_=f:U.next=L,er(f,s.memoizedState)||(En=!0),s.memoizedState=f,s.baseState=_,s.baseQueue=U,l.lastRenderedState=f}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Et.lanes|=b,no|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function jp(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var _=E=E.next;do b=i(b,_.action),_=_.next;while(_!==E);er(b,s.memoizedState)||(En=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,f]}function Ux(){}function Hx(i,s){var l=Et,f=Hn(),E=s(),b=!er(f.memoizedState,E);if(b&&(f.memoizedState=E,En=!0),f=f.queue,$p($x.bind(null,l,f,i),[i]),f.getSnapshot!==s||b||Ut!==null&&Ut.memoizedState.tag&1){if(l.flags|=2048,Qa(9,jx.bind(null,l,f,E,s),void 0,null),Ht===null)throw Error(n(349));(to&30)!==0||zx(l,s,E)}return E}function zx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function jx(i,s,l,f){s.value=l,s.getSnapshot=f,Vx(s)&&qx(i)}function $x(i,s,l){return l(function(){Vx(s)&&qx(i)})}function Vx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!er(i,l)}catch(f){return!0}}function qx(i){var s=Br(i,1);s!==null&&or(s,i,1,-1)}function Yx(i){var s=vr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:i},s.queue=i,i=i.dispatch=g9.bind(null,Et,i),[s.memoizedState,i]}function Qa(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(f=l.next,l.next=i,i.next=f,s.lastEffect=i)),i}function Wx(){return Hn().memoizedState}function mc(i,s,l,f){var E=vr();Et.flags|=i,E.memoizedState=Qa(1|s,l,void 0,f===void 0?null:f)}function gc(i,s,l,f){var E=Hn();f=f===void 0?null:f;var b=void 0;if(Rt!==null){var _=Rt.memoizedState;if(b=_.destroy,f!==null&&Bp(f,_.deps)){E.memoizedState=Qa(s,l,b,f);return}}Et.flags|=i,E.memoizedState=Qa(1|s,l,b,f)}function Gx(i,s){return mc(8390656,8,i,s)}function $p(i,s){return gc(2048,8,i,s)}function Kx(i,s){return gc(4,2,i,s)}function Qx(i,s){return gc(4,4,i,s)}function Xx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Jx(i,s,l){return l=l!=null?l.concat([i]):null,gc(4,4,Xx.bind(null,s,i),l)}function Vp(){}function Zx(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Bp(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function ew(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Bp(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function tw(i,s,l){return(to&21)===0?(i.baseState&&(i.baseState=!1,En=!0),i.memoizedState=l):(er(l,s)||(l=IT(),Et.lanes|=l,no|=l,i.baseState=!0),s)}function p9(i,s){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var f=Fp.transition;Fp.transition={};try{i(!1),s()}finally{nt=l,Fp.transition=f}}function nw(){return Hn().memoizedState}function m9(i,s,l){var f=yi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},rw(i))iw(s,l);else if(l=Lx(i,s,l,f),l!==null){var E=on();or(l,i,f,E),ow(l,s,f)}}function g9(i,s,l){var f=yi(i),E={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(rw(i))iw(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var _=s.lastRenderedState,L=b(_,l);if(E.hasEagerState=!0,E.eagerState=L,er(L,_)){var U=s.interleaved;U===null?(E.next=E,Ip(s)):(E.next=U.next,U.next=E),s.interleaved=E;return}}catch(Z){}l=Lx(i,s,E,f),l!==null&&(E=on(),or(l,i,f,E),ow(l,s,f))}}function rw(i){var s=i.alternate;return i===Et||s!==null&&s===Et}function iw(i,s){Wa=pc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function ow(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Yh(i,l)}}var Ec={readContext:Un,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},E9={readContext:Un,useCallback:function(i,s){return vr().memoizedState=[i,s===void 0?null:s],i},useContext:Un,useEffect:Gx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,mc(4194308,4,Xx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return mc(4194308,4,i,s)},useInsertionEffect:function(i,s){return mc(4,2,i,s)},useMemo:function(i,s){var l=vr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=vr();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=m9.bind(null,Et,i),[f.memoizedState,i]},useRef:function(i){var s=vr();return i={current:i},s.memoizedState=i},useState:Yx,useDebugValue:Vp,useDeferredValue:function(i){return vr().memoizedState=i},useTransition:function(){var i=Yx(!1),s=i[0];return i=p9.bind(null,i[1]),vr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Et,E=vr();if(pt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Ht===null)throw Error(n(349));(to&30)!==0||zx(f,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,Gx($x.bind(null,f,b,i),[i]),f.flags|=2048,Qa(9,jx.bind(null,f,b,l,s),void 0,null),l},useId:function(){var i=vr(),s=Ht.identifierPrefix;if(pt){var l=Fr,f=Mr;l=(f&~(1<<32-Zn(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=Ga++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=h9++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},y9={readContext:Un,useCallback:Zx,useContext:Un,useEffect:$p,useImperativeHandle:Jx,useInsertionEffect:Kx,useLayoutEffect:Qx,useMemo:ew,useReducer:zp,useRef:Wx,useState:function(){return zp(Ka)},useDebugValue:Vp,useDeferredValue:function(i){var s=Hn();return tw(s,Rt.memoizedState,i)},useTransition:function(){var i=zp(Ka)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:Ux,useSyncExternalStore:Hx,useId:nw,unstable_isNewReconciler:!1},b9={readContext:Un,useCallback:Zx,useContext:Un,useEffect:$p,useImperativeHandle:Jx,useInsertionEffect:Kx,useLayoutEffect:Qx,useMemo:ew,useReducer:jp,useRef:Wx,useState:function(){return jp(Ka)},useDebugValue:Vp,useDeferredValue:function(i){var s=Hn();return Rt===null?s.memoizedState=i:tw(s,Rt.memoizedState,i)},useTransition:function(){var i=jp(Ka)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:Ux,useSyncExternalStore:Hx,useId:nw,unstable_isNewReconciler:!1};function nr(i,s){if(i&&i.defaultProps){s=C({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function qp(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:C({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var yc={isMounted:function(i){return(i=i._reactInternals)?Gi(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=on(),E=yi(i),b=Ur(f,E);b.payload=s,l!=null&&(b.callback=l),s=pi(i,b,E),s!==null&&(or(s,i,E,f),cc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=on(),E=yi(i),b=Ur(f,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=pi(i,b,E),s!==null&&(or(s,i,E,f),cc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=on(),f=yi(i),E=Ur(l,f);E.tag=2,s!=null&&(E.callback=s),s=pi(i,E,f),s!==null&&(or(s,i,f,l),cc(s,i,f))}};function sw(i,s,l,f,E,b,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,_):s.prototype&&s.prototype.isPureReactComponent?!Ma(l,f)||!Ma(E,b):!0}function aw(i,s,l){var f=!1,E=di,b=s.contextType;return typeof b=="object"&&b!==null?b=Un(b):(E=gn(s)?Qi:Xt.current,f=s.contextTypes,b=(f=f!=null)?ss(i,E):di),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=yc,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function uw(i,s,l,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,f),s.state!==i&&yc.enqueueReplaceState(s,s.state,null)}function Yp(i,s,l,f){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Rp(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=Un(b):(b=gn(s)?Qi:Xt.current,E.context=ss(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(qp(i,s,b,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&yc.enqueueReplaceState(E,E.state,null),dc(i,l,E,f),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function ps(i,s){try{var l="",f=s;do l+=Oe(f),f=f.return;while(f);var E=l}catch(b){E=`
|
|
19
|
+
`),_=E.length-1,L=b.length-1;1<=_&&0<=L&&E[_]!==b[L];)L--;for(;1<=_&&0<=L;_--,L--)if(E[_]!==b[L]){if(_!==1||L!==1)do if(_--,L--,0>L||E[_]!==b[L]){var H=`
|
|
20
|
+
`+E[_].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=_&&0<=L);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?W(i):""}function Oe(i){switch(i.tag){case 5:return W(i.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return i=be(i.type,!1),i;case 11:return i=be(i.type.render,!1),i;case 1:return i=be(i.type,!0),i;default:return""}}function Re(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 F:return"Portal";case de:return"Profiler";case ce:return"StrictMode";case ae:return"Suspense";case se:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Te:return s=i.displayName||null,s!==null?s:Re(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Re(i(s))}catch(l){}}return null}function He(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Re(s);case 8:return s===ce?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function qe(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ut(i){var s=qe(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(_){f=""+_,b.call(this,_)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function pn(i){i._valueTracker||(i._valueTracker=ut(i))}function Wi(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=qe(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function ei(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Jn(i,s){var l=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ta(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=ve(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function xa(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Ko(i,s){xa(i,s);var l=ve(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Qo(i,s.type,l):s.hasOwnProperty("defaultValue")&&Qo(i,s.type,ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Ol(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Qo(i,s,l){(s!=="number"||ei(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ti=Array.isArray;function ni(i,s,l,f){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&f&&(i[l].defaultSelected=!0)}else{for(l=""+ve(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,f&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function wa(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Il(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(ti(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:ve(l)}}function Rl(i,s){var l=ve(s.value),f=ve(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),f!=null&&(i.defaultValue=""+f)}function Pl(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function re(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?re(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,f,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,f,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Xe(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var jt={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},Lr=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(i){Lr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),jt[s]=jt[i]})});function Mn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||jt.hasOwnProperty(i)&&jt[i]?(""+s).trim():s+"px"}function ri(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,E=Mn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,E):i[l]=E}}var Gi=S({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 $t(i,s){if(s){if(Gi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function xr(i,s){if(i.indexOf("-")===-1)return typeof s.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 Sn=null;function Hh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var zh=null,Xo=null,Jo=null;function xT(i){if(i=Va(i)){if(typeof zh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=nc(s),zh(i.stateNode,i.type,s))}}function wT(i){Xo?Jo?Jo.push(i):Jo=[i]:Xo=i}function _T(){if(Xo){var i=Xo,s=Jo;if(Jo=Xo=null,xT(i),s)for(i=0;i<s.length;i++)xT(s[i])}}function vT(i,s){return i(s)}function ST(){}var jh=!1;function AT(i,s,l){if(jh)return i(s,l);jh=!0;try{return vT(i,s,l)}finally{jh=!1,(Xo!==null||Jo!==null)&&(ST(),_T())}}function _a(i,s){var l=i.stateNode;if(l===null)return null;var f=nc(l);if(f===null)return null;l=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var $h=!1;if(c)try{var va={};Object.defineProperty(va,"passive",{get:function(){$h=!0}}),window.addEventListener("test",va,va),window.removeEventListener("test",va,va)}catch(i){$h=!1}function oM(i,s,l,f,E,b,_,L,H){var te=Array.prototype.slice.call(arguments,3);try{s.apply(l,te)}catch(fe){this.onError(fe)}}var Sa=!1,Ll=null,Dl=!1,Vh=null,sM={onError:function(i){Sa=!0,Ll=i}};function aM(i,s,l,f,E,b,_,L,H){Sa=!1,Ll=null,oM.apply(sM,arguments)}function uM(i,s,l,f,E,b,_,L,H){if(aM.apply(this,arguments),Sa){if(Sa){var te=Ll;Sa=!1,Ll=null}else throw Error(n(198));Dl||(Dl=!0,Vh=te)}}function Ki(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function CT(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function kT(i){if(Ki(i)!==i)throw Error(n(188))}function lM(i){var s=i.alternate;if(!s){if(s=Ki(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,f=s;;){var E=l.return;if(E===null)break;var b=E.alternate;if(b===null){if(f=E.return,f!==null){l=f;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===l)return kT(E),i;if(b===f)return kT(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==f.return)l=E,f=b;else{for(var _=!1,L=E.child;L;){if(L===l){_=!0,l=E,f=b;break}if(L===f){_=!0,f=E,l=b;break}L=L.sibling}if(!_){for(L=b.child;L;){if(L===l){_=!0,l=b,f=E;break}if(L===f){_=!0,f=b,l=E;break}L=L.sibling}if(!_)throw Error(n(189))}}if(l.alternate!==f)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function NT(i){return i=lM(i),i!==null?OT(i):null}function OT(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=OT(i);if(s!==null)return s;i=i.sibling}return null}var IT=t.unstable_scheduleCallback,RT=t.unstable_cancelCallback,cM=t.unstable_shouldYield,dM=t.unstable_requestPaint,_t=t.unstable_now,fM=t.unstable_getCurrentPriorityLevel,qh=t.unstable_ImmediatePriority,PT=t.unstable_UserBlockingPriority,Ml=t.unstable_NormalPriority,hM=t.unstable_LowPriority,LT=t.unstable_IdlePriority,Fl=null,wr=null;function pM(i){if(wr&&typeof wr.onCommitFiberRoot=="function")try{wr.onCommitFiberRoot(Fl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Zn=Math.clz32?Math.clz32:EM,mM=Math.log,gM=Math.LN2;function EM(i){return i>>>=0,i===0?32:31-(mM(i)/gM|0)|0}var Bl=64,Ul=4194304;function Aa(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 Hl(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,E=i.suspendedLanes,b=i.pingedLanes,_=l&268435455;if(_!==0){var L=_&~E;L!==0?f=Aa(L):(b&=_,b!==0&&(f=Aa(b)))}else _=l&~E,_!==0?f=Aa(_):b!==0&&(f=Aa(b));if(f===0)return 0;if(s!==0&&s!==f&&(s&E)===0&&(E=f&-f,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)l=31-Zn(s),E=1<<l,f|=i[l],s&=~E;return f}function yM(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 bM(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var _=31-Zn(b),L=1<<_,H=E[_];H===-1?((L&l)===0||(L&f)!==0)&&(E[_]=yM(L,s)):H<=s&&(i.expiredLanes|=L),b&=~L}}function Yh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function DT(){var i=Bl;return Bl<<=1,(Bl&4194240)===0&&(Bl=64),i}function Wh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ca(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Zn(s),i[s]=l}function TM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Zn(l),b=1<<E;s[E]=0,f[E]=-1,i[E]=-1,l&=~b}}function Gh(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-Zn(l),E=1<<f;E&s|i[f]&s&&(i[f]|=s),l&=~E}}var nt=0;function MT(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var FT,Kh,BT,UT,HT,Qh=!1,zl=[],ii=null,oi=null,si=null,ka=new Map,Na=new Map,ai=[],xM="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 zT(i,s){switch(i){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":oi=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":ka.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(s.pointerId)}}function Oa(i,s,l,f,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:b,targetContainers:[E]},s!==null&&(s=Va(s),s!==null&&Kh(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function wM(i,s,l,f,E){switch(s){case"focusin":return ii=Oa(ii,i,s,l,f,E),!0;case"dragenter":return oi=Oa(oi,i,s,l,f,E),!0;case"mouseover":return si=Oa(si,i,s,l,f,E),!0;case"pointerover":var b=E.pointerId;return ka.set(b,Oa(ka.get(b)||null,i,s,l,f,E)),!0;case"gotpointercapture":return b=E.pointerId,Na.set(b,Oa(Na.get(b)||null,i,s,l,f,E)),!0}return!1}function jT(i){var s=Qi(i.target);if(s!==null){var l=Ki(s);if(l!==null){if(s=l.tag,s===13){if(s=CT(l),s!==null){i.blockedOn=s,HT(i.priority,function(){BT(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function jl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Jh(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Sn=f,l.target.dispatchEvent(f),Sn=null}else return s=Va(l),s!==null&&Kh(s),i.blockedOn=l,!1;s.shift()}return!0}function $T(i,s,l){jl(i)&&l.delete(s)}function _M(){Qh=!1,ii!==null&&jl(ii)&&(ii=null),oi!==null&&jl(oi)&&(oi=null),si!==null&&jl(si)&&(si=null),ka.forEach($T),Na.forEach($T)}function Ia(i,s){i.blockedOn===s&&(i.blockedOn=null,Qh||(Qh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_M)))}function Ra(i){function s(E){return Ia(E,i)}if(0<zl.length){Ia(zl[0],i);for(var l=1;l<zl.length;l++){var f=zl[l];f.blockedOn===i&&(f.blockedOn=null)}}for(ii!==null&&Ia(ii,i),oi!==null&&Ia(oi,i),si!==null&&Ia(si,i),ka.forEach(s),Na.forEach(s),l=0;l<ai.length;l++)f=ai[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<ai.length&&(l=ai[0],l.blockedOn===null);)jT(l),l.blockedOn===null&&ai.shift()}var Zo=U.ReactCurrentBatchConfig,$l=!0;function vM(i,s,l,f){var E=nt,b=Zo.transition;Zo.transition=null;try{nt=1,Xh(i,s,l,f)}finally{nt=E,Zo.transition=b}}function SM(i,s,l,f){var E=nt,b=Zo.transition;Zo.transition=null;try{nt=4,Xh(i,s,l,f)}finally{nt=E,Zo.transition=b}}function Xh(i,s,l,f){if($l){var E=Jh(i,s,l,f);if(E===null)mp(i,s,f,Vl,l),zT(i,f);else if(wM(E,i,s,l,f))f.stopPropagation();else if(zT(i,f),s&4&&-1<xM.indexOf(i)){for(;E!==null;){var b=Va(E);if(b!==null&&FT(b),b=Jh(i,s,l,f),b===null&&mp(i,s,f,Vl,l),b===E)break;E=b}E!==null&&f.stopPropagation()}else mp(i,s,f,null,l)}}var Vl=null;function Jh(i,s,l,f){if(Vl=null,i=Hh(f),i=Qi(i),i!==null)if(s=Ki(i),s===null)i=null;else if(l=s.tag,l===13){if(i=CT(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Vl=i,null}function VT(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(fM()){case qh:return 1;case PT:return 4;case Ml:case hM:return 16;case LT:return 536870912;default:return 16}default:return 16}}var ui=null,Zh=null,ql=null;function qT(){if(ql)return ql;var i,s=Zh,l=s.length,f,E="value"in ui?ui.value:ui.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var _=l-i;for(f=1;f<=_&&s[l-f]===E[b-f];f++);return ql=E.slice(i,1<f?1-f:void 0)}function Yl(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Wl(){return!0}function YT(){return!1}function An(i){function s(l,f,E,b,_){this._reactName=l,this._targetInst=E,this.type=f,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(l=i[L],this[L]=l?l(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Wl:YT,this.isPropagationStopped=YT,this}return S(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Wl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),s}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ep=An(es),Pa=S({},es,{view:0,detail:0}),AM=An(Pa),tp,np,La,Gl=S({},Pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ip,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!==La&&(La&&i.type==="mousemove"?(tp=i.screenX-La.screenX,np=i.screenY-La.screenY):np=tp=0,La=i),tp)},movementY:function(i){return"movementY"in i?i.movementY:np}}),WT=An(Gl),CM=S({},Gl,{dataTransfer:0}),kM=An(CM),NM=S({},Pa,{relatedTarget:0}),rp=An(NM),OM=S({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),IM=An(OM),RM=S({},es,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),PM=An(RM),LM=S({},es,{data:0}),GT=An(LM),DM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MM={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"},FM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=FM[i])?!!s[i]:!1}function ip(){return BM}var UM=S({},Pa,{key:function(i){if(i.key){var s=DM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Yl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?MM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ip,charCode:function(i){return i.type==="keypress"?Yl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Yl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),HM=An(UM),zM=S({},Gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),KT=An(zM),jM=S({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ip}),$M=An(jM),VM=S({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),qM=An(VM),YM=S({},Gl,{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}),WM=An(YM),GM=[9,13,27,32],op=c&&"CompositionEvent"in window,Da=null;c&&"documentMode"in document&&(Da=document.documentMode);var KM=c&&"TextEvent"in window&&!Da,QT=c&&(!op||Da&&8<Da&&11>=Da),XT=" ",JT=!1;function ZT(i,s){switch(i){case"keyup":return GM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ex(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ts=!1;function QM(i,s){switch(i){case"compositionend":return ex(s);case"keypress":return s.which!==32?null:(JT=!0,XT);case"textInput":return i=s.data,i===XT&&JT?null:i;default:return null}}function XM(i,s){if(ts)return i==="compositionend"||!op&&ZT(i,s)?(i=qT(),ql=Zh=ui=null,ts=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return QT&&s.locale!=="ko"?null:s.data;default:return null}}var JM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tx(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!JM[i.type]:s==="textarea"}function nx(i,s,l,f){wT(f),s=Zl(s,"onChange"),0<s.length&&(l=new ep("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var Ma=null,Fa=null;function ZM(i){Tx(i,0)}function Kl(i){var s=ss(i);if(Wi(s))return i}function e9(i,s){if(i==="change")return s}var rx=!1;if(c){var sp;if(c){var ap="oninput"in document;if(!ap){var ix=document.createElement("div");ix.setAttribute("oninput","return;"),ap=typeof ix.oninput=="function"}sp=ap}else sp=!1;rx=sp&&(!document.documentMode||9<document.documentMode)}function ox(){Ma&&(Ma.detachEvent("onpropertychange",sx),Fa=Ma=null)}function sx(i){if(i.propertyName==="value"&&Kl(Fa)){var s=[];nx(s,Fa,i,Hh(i)),AT(ZM,s)}}function t9(i,s,l){i==="focusin"?(ox(),Ma=s,Fa=l,Ma.attachEvent("onpropertychange",sx)):i==="focusout"&&ox()}function n9(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Kl(Fa)}function r9(i,s){if(i==="click")return Kl(s)}function i9(i,s){if(i==="input"||i==="change")return Kl(s)}function o9(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var er=typeof Object.is=="function"?Object.is:o9;function Ba(i,s){if(er(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),f=Object.keys(s);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var E=l[f];if(!d.call(s,E)||!er(i[E],s[E]))return!1}return!0}function ax(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ux(i,s){var l=ax(i);i=0;for(var f;l;){if(l.nodeType===3){if(f=i+l.textContent.length,i<=s&&f>=s)return{node:l,offset:s-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ax(l)}}function lx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?lx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function cx(){for(var i=window,s=ei();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(f){l=!1}if(l)i=s.contentWindow;else break;s=ei(i.document)}return s}function up(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function s9(i){var s=cx(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&lx(l.ownerDocument.documentElement,l)){if(f!==null&&up(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(f.start,E);f=f.end===void 0?b:Math.min(f.end,E),!i.extend&&b>f&&(E=f,f=b,b=E),E=ux(l,b);var _=ux(l,f);E&&_&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==_.node||i.focusOffset!==_.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>f?(i.addRange(s),i.extend(_.node,_.offset)):(s.setEnd(_.node,_.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var a9=c&&"documentMode"in document&&11>=document.documentMode,ns=null,lp=null,Ua=null,cp=!1;function dx(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;cp||ns==null||ns!==ei(f)||(f=ns,"selectionStart"in f&&up(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Ua&&Ba(Ua,f)||(Ua=f,f=Zl(lp,"onSelect"),0<f.length&&(s=new ep("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=ns)))}function Ql(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var rs={animationend:Ql("Animation","AnimationEnd"),animationiteration:Ql("Animation","AnimationIteration"),animationstart:Ql("Animation","AnimationStart"),transitionend:Ql("Transition","TransitionEnd")},dp={},fx={};c&&(fx=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function Xl(i){if(dp[i])return dp[i];if(!rs[i])return i;var s=rs[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in fx)return dp[i]=s[l];return i}var hx=Xl("animationend"),px=Xl("animationiteration"),mx=Xl("animationstart"),gx=Xl("transitionend"),Ex=new Map,yx="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 li(i,s){Ex.set(i,s),a(s,[i])}for(var fp=0;fp<yx.length;fp++){var hp=yx[fp],u9=hp.toLowerCase(),l9=hp[0].toUpperCase()+hp.slice(1);li(u9,"on"+l9)}li(hx,"onAnimationEnd"),li(px,"onAnimationIteration"),li(mx,"onAnimationStart"),li("dblclick","onDoubleClick"),li("focusin","onFocus"),li("focusout","onBlur"),li(gx,"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 Ha="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(" "),c9=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ha));function bx(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,uM(f,s,void 0,i),i.currentTarget=null}function Tx(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var f=i[l],E=f.event;f=f.listeners;e:{var b=void 0;if(s)for(var _=f.length-1;0<=_;_--){var L=f[_],H=L.instance,te=L.currentTarget;if(L=L.listener,H!==b&&E.isPropagationStopped())break e;bx(E,L,te),b=H}else for(_=0;_<f.length;_++){if(L=f[_],H=L.instance,te=L.currentTarget,L=L.listener,H!==b&&E.isPropagationStopped())break e;bx(E,L,te),b=H}}}if(Dl)throw i=Vh,Dl=!1,Vh=null,i}function lt(i,s){var l=s[xp];l===void 0&&(l=s[xp]=new Set);var f=i+"__bubble";l.has(f)||(xx(s,i,2,!1),l.add(f))}function pp(i,s,l){var f=0;s&&(f|=4),xx(l,i,f,s)}var Jl="_reactListening"+Math.random().toString(36).slice(2);function za(i){if(!i[Jl]){i[Jl]=!0,r.forEach(function(l){l!=="selectionchange"&&(c9.has(l)||pp(l,!1,i),pp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Jl]||(s[Jl]=!0,pp("selectionchange",!1,s))}}function xx(i,s,l,f){switch(VT(s)){case 1:var E=vM;break;case 4:E=SM;break;default:E=Xh}l=E.bind(null,s,l,i),E=void 0,!$h||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),f?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function mp(i,s,l,f,E){var b=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var L=f.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(_===4)for(_=f.return;_!==null;){var H=_.tag;if((H===3||H===4)&&(H=_.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;_=_.return}for(;L!==null;){if(_=Qi(L),_===null)return;if(H=_.tag,H===5||H===6){f=b=_;continue e}L=L.parentNode}}f=f.return}AT(function(){var te=b,fe=Hh(l),me=[];e:{var ue=Ex.get(i);if(ue!==void 0){var we=ep,Se=i;switch(i){case"keypress":if(Yl(l)===0)break e;case"keydown":case"keyup":we=HM;break;case"focusin":Se="focus",we=rp;break;case"focusout":Se="blur",we=rp;break;case"beforeblur":case"afterblur":we=rp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=WT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=kM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=$M;break;case hx:case px:case mx:we=IM;break;case gx:we=qM;break;case"scroll":we=AM;break;case"wheel":we=WM;break;case"copy":case"cut":case"paste":we=PM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=KT}var ke=(s&4)!==0,vt=!ke&&i==="scroll",K=ke?ue!==null?ue+"Capture":null:ue;ke=[];for(var $=te,J;$!==null;){J=$;var ye=J.stateNode;if(J.tag===5&&ye!==null&&(J=ye,K!==null&&(ye=_a($,K),ye!=null&&ke.push(ja($,ye,J)))),vt)break;$=$.return}0<ke.length&&(ue=new we(ue,Se,null,l,fe),me.push({event:ue,listeners:ke}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",ue&&l!==Sn&&(Se=l.relatedTarget||l.fromElement)&&(Qi(Se)||Se[Dr]))break e;if((we||ue)&&(ue=fe.window===fe?fe:(ue=fe.ownerDocument)?ue.defaultView||ue.parentWindow:window,we?(Se=l.relatedTarget||l.toElement,we=te,Se=Se?Qi(Se):null,Se!==null&&(vt=Ki(Se),Se!==vt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(we=null,Se=te),we!==Se)){if(ke=WT,ye="onMouseLeave",K="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(ke=KT,ye="onPointerLeave",K="onPointerEnter",$="pointer"),vt=we==null?ue:ss(we),J=Se==null?ue:ss(Se),ue=new ke(ye,$+"leave",we,l,fe),ue.target=vt,ue.relatedTarget=J,ye=null,Qi(fe)===te&&(ke=new ke(K,$+"enter",Se,l,fe),ke.target=J,ke.relatedTarget=vt,ye=ke),vt=ye,we&&Se)t:{for(ke=we,K=Se,$=0,J=ke;J;J=is(J))$++;for(J=0,ye=K;ye;ye=is(ye))J++;for(;0<$-J;)ke=is(ke),$--;for(;0<J-$;)K=is(K),J--;for(;$--;){if(ke===K||K!==null&&ke===K.alternate)break t;ke=is(ke),K=is(K)}ke=null}else ke=null;we!==null&&wx(me,ue,we,ke,!1),Se!==null&&vt!==null&&wx(me,vt,Se,ke,!0)}}e:{if(ue=te?ss(te):window,we=ue.nodeName&&ue.nodeName.toLowerCase(),we==="select"||we==="input"&&ue.type==="file")var Ne=e9;else if(tx(ue))if(rx)Ne=i9;else{Ne=n9;var De=t9}else(we=ue.nodeName)&&we.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Ne=r9);if(Ne&&(Ne=Ne(i,te))){nx(me,Ne,l,fe);break e}De&&De(i,ue,te),i==="focusout"&&(De=ue._wrapperState)&&De.controlled&&ue.type==="number"&&Qo(ue,"number",ue.value)}switch(De=te?ss(te):window,i){case"focusin":(tx(De)||De.contentEditable==="true")&&(ns=De,lp=te,Ua=null);break;case"focusout":Ua=lp=ns=null;break;case"mousedown":cp=!0;break;case"contextmenu":case"mouseup":case"dragend":cp=!1,dx(me,l,fe);break;case"selectionchange":if(a9)break;case"keydown":case"keyup":dx(me,l,fe)}var Me;if(op)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ts?ZT(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(QT&&l.locale!=="ko"&&(ts||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ts&&(Me=qT()):(ui=fe,Zh="value"in ui?ui.value:ui.textContent,ts=!0)),De=Zl(te,Ue),0<De.length&&(Ue=new GT(Ue,i,null,l,fe),me.push({event:Ue,listeners:De}),Me?Ue.data=Me:(Me=ex(l),Me!==null&&(Ue.data=Me)))),(Me=KM?QM(i,l):XM(i,l))&&(te=Zl(te,"onBeforeInput"),0<te.length&&(fe=new GT("onBeforeInput","beforeinput",null,l,fe),me.push({event:fe,listeners:te}),fe.data=Me))}Tx(me,s)})}function ja(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Zl(i,s){for(var l=s+"Capture",f=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=_a(i,l),b!=null&&f.unshift(ja(i,b,E)),b=_a(i,s),b!=null&&f.push(ja(i,b,E))),i=i.return}return f}function is(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function wx(i,s,l,f,E){for(var b=s._reactName,_=[];l!==null&&l!==f;){var L=l,H=L.alternate,te=L.stateNode;if(H!==null&&H===f)break;L.tag===5&&te!==null&&(L=te,E?(H=_a(l,b),H!=null&&_.unshift(ja(l,H,L))):E||(H=_a(l,b),H!=null&&_.push(ja(l,H,L)))),l=l.return}_.length!==0&&i.push({event:s,listeners:_})}var d9=/\r\n?/g,f9=/\u0000|\uFFFD/g;function _x(i){return(typeof i=="string"?i:""+i).replace(d9,`
|
|
21
|
+
`).replace(f9,"")}function ec(i,s,l){if(s=_x(s),_x(i)!==s&&l)throw Error(n(425))}function tc(){}var gp=null,Ep=null;function yp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var bp=typeof setTimeout=="function"?setTimeout:void 0,h9=typeof clearTimeout=="function"?clearTimeout:void 0,vx=typeof Promise=="function"?Promise:void 0,p9=typeof queueMicrotask=="function"?queueMicrotask:typeof vx!="undefined"?function(i){return vx.resolve(null).then(i).catch(m9)}:bp;function m9(i){setTimeout(function(){throw i})}function Tp(i,s){var l=s,f=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(f===0){i.removeChild(E),Ra(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=E}while(l);Ra(s)}function ci(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function Sx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var os=Math.random().toString(36).slice(2),_r="__reactFiber$"+os,$a="__reactProps$"+os,Dr="__reactContainer$"+os,xp="__reactEvents$"+os,g9="__reactListeners$"+os,E9="__reactHandles$"+os;function Qi(i){var s=i[_r];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Dr]||l[_r]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=Sx(i);i!==null;){if(l=i[_r])return l;i=Sx(i)}return s}i=l,l=i.parentNode}return null}function Va(i){return i=i[_r]||i[Dr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ss(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function nc(i){return i[$a]||null}var wp=[],as=-1;function di(i){return{current:i}}function ct(i){0>as||(i.current=wp[as],wp[as]=null,as--)}function at(i,s){as++,wp[as]=i.current,i.current=s}var fi={},Xt=di(fi),mn=di(!1),Xi=fi;function us(i,s){var l=i.type.contextTypes;if(!l)return fi;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function gn(i){return i=i.childContextTypes,i!=null}function rc(){ct(mn),ct(Xt)}function Ax(i,s,l){if(Xt.current!==fi)throw Error(n(168));at(Xt,s),at(mn,l)}function Cx(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var E in f)if(!(E in s))throw Error(n(108,He(i)||"Unknown",E));return S({},l,f)}function ic(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||fi,Xi=Xt.current,at(Xt,i),at(mn,mn.current),!0}function kx(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=Cx(i,s,Xi),f.__reactInternalMemoizedMergedChildContext=i,ct(mn),ct(Xt),at(Xt,i)):ct(mn),at(mn,l)}var Mr=null,oc=!1,_p=!1;function Nx(i){Mr===null?Mr=[i]:Mr.push(i)}function y9(i){oc=!0,Nx(i)}function hi(){if(!_p&&Mr!==null){_p=!0;var i=0,s=nt;try{var l=Mr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}Mr=null,oc=!1}catch(E){throw Mr!==null&&(Mr=Mr.slice(i+1)),IT(qh,hi),E}finally{nt=s,_p=!1}}return null}var ls=[],cs=0,sc=null,ac=0,Fn=[],Bn=0,Ji=null,Fr=1,Br="";function Zi(i,s){ls[cs++]=ac,ls[cs++]=sc,sc=i,ac=s}function Ox(i,s,l){Fn[Bn++]=Fr,Fn[Bn++]=Br,Fn[Bn++]=Ji,Ji=i;var f=Fr;i=Br;var E=32-Zn(f)-1;f&=~(1<<E),l+=1;var b=32-Zn(s)+E;if(30<b){var _=E-E%5;b=(f&(1<<_)-1).toString(32),f>>=_,E-=_,Fr=1<<32-Zn(s)+E|l<<E|f,Br=b+i}else Fr=1<<b|l<<E|f,Br=i}function vp(i){i.return!==null&&(Zi(i,1),Ox(i,1,0))}function Sp(i){for(;i===sc;)sc=ls[--cs],ls[cs]=null,ac=ls[--cs],ls[cs]=null;for(;i===Ji;)Ji=Fn[--Bn],Fn[Bn]=null,Br=Fn[--Bn],Fn[Bn]=null,Fr=Fn[--Bn],Fn[Bn]=null}var Cn=null,kn=null,mt=!1,tr=null;function Ix(i,s){var l=jn(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function Rx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Cn=i,kn=ci(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Cn=i,kn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Ji!==null?{id:Fr,overflow:Br}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=jn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Cn=i,kn=null,!0):!1;default:return!1}}function Ap(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Cp(i){if(mt){var s=kn;if(s){var l=s;if(!Rx(i,s)){if(Ap(i))throw Error(n(418));s=ci(l.nextSibling);var f=Cn;s&&Rx(i,s)?Ix(f,l):(i.flags=i.flags&-4097|2,mt=!1,Cn=i)}}else{if(Ap(i))throw Error(n(418));i.flags=i.flags&-4097|2,mt=!1,Cn=i}}}function Px(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Cn=i}function uc(i){if(i!==Cn)return!1;if(!mt)return Px(i),mt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!yp(i.type,i.memoizedProps)),s&&(s=kn)){if(Ap(i))throw Lx(),Error(n(418));for(;s;)Ix(i,s),s=ci(s.nextSibling)}if(Px(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){kn=ci(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}kn=null}}else kn=Cn?ci(i.stateNode.nextSibling):null;return!0}function Lx(){for(var i=kn;i;)i=ci(i.nextSibling)}function ds(){kn=Cn=null,mt=!1}function kp(i){tr===null?tr=[i]:tr.push(i)}var b9=U.ReactCurrentBatchConfig;function qa(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var f=l.stateNode}if(!f)throw Error(n(147,i));var E=f,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(_){var L=E.refs;_===null?delete L[b]:L[b]=_},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function lc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Dx(i){var s=i._init;return s(i._payload)}function Mx(i){function s(K,$){if(i){var J=K.deletions;J===null?(K.deletions=[$],K.flags|=16):J.push($)}}function l(K,$){if(!i)return null;for(;$!==null;)s(K,$),$=$.sibling;return null}function f(K,$){for(K=new Map;$!==null;)$.key!==null?K.set($.key,$):K.set($.index,$),$=$.sibling;return K}function E(K,$){return K=xi(K,$),K.index=0,K.sibling=null,K}function b(K,$,J){return K.index=J,i?(J=K.alternate,J!==null?(J=J.index,J<$?(K.flags|=2,$):J):(K.flags|=2,$)):(K.flags|=1048576,$)}function _(K){return i&&K.alternate===null&&(K.flags|=2),K}function L(K,$,J,ye){return $===null||$.tag!==6?($=bm(J,K.mode,ye),$.return=K,$):($=E($,J),$.return=K,$)}function H(K,$,J,ye){var Ne=J.type;return Ne===X?fe(K,$,J.props.children,ye,J.key):$!==null&&($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&Dx(Ne)===$.type)?(ye=E($,J.props),ye.ref=qa(K,$,J),ye.return=K,ye):(ye=Pc(J.type,J.key,J.props,null,K.mode,ye),ye.ref=qa(K,$,J),ye.return=K,ye)}function te(K,$,J,ye){return $===null||$.tag!==4||$.stateNode.containerInfo!==J.containerInfo||$.stateNode.implementation!==J.implementation?($=Tm(J,K.mode,ye),$.return=K,$):($=E($,J.children||[]),$.return=K,$)}function fe(K,$,J,ye,Ne){return $===null||$.tag!==7?($=ao(J,K.mode,ye,Ne),$.return=K,$):($=E($,J),$.return=K,$)}function me(K,$,J){if(typeof $=="string"&&$!==""||typeof $=="number")return $=bm(""+$,K.mode,J),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case Y:return J=Pc($.type,$.key,$.props,null,K.mode,J),J.ref=qa(K,null,$),J.return=K,J;case F:return $=Tm($,K.mode,J),$.return=K,$;case Ce:var ye=$._init;return me(K,ye($._payload),J)}if(ti($)||q($))return $=ao($,K.mode,J,null),$.return=K,$;lc(K,$)}return null}function ue(K,$,J,ye){var Ne=$!==null?$.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Ne!==null?null:L(K,$,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case Y:return J.key===Ne?H(K,$,J,ye):null;case F:return J.key===Ne?te(K,$,J,ye):null;case Ce:return Ne=J._init,ue(K,$,Ne(J._payload),ye)}if(ti(J)||q(J))return Ne!==null?null:fe(K,$,J,ye,null);lc(K,J)}return null}function we(K,$,J,ye,Ne){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return K=K.get(J)||null,L($,K,""+ye,Ne);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Y:return K=K.get(ye.key===null?J:ye.key)||null,H($,K,ye,Ne);case F:return K=K.get(ye.key===null?J:ye.key)||null,te($,K,ye,Ne);case Ce:var De=ye._init;return we(K,$,J,De(ye._payload),Ne)}if(ti(ye)||q(ye))return K=K.get(J)||null,fe($,K,ye,Ne,null);lc($,ye)}return null}function Se(K,$,J,ye){for(var Ne=null,De=null,Me=$,Ue=$=0,zt=null;Me!==null&&Ue<J.length;Ue++){Me.index>Ue?(zt=Me,Me=null):zt=Me.sibling;var et=ue(K,Me,J[Ue],ye);if(et===null){Me===null&&(Me=zt);break}i&&Me&&et.alternate===null&&s(K,Me),$=b(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et,Me=zt}if(Ue===J.length)return l(K,Me),mt&&Zi(K,Ue),Ne;if(Me===null){for(;Ue<J.length;Ue++)Me=me(K,J[Ue],ye),Me!==null&&($=b(Me,$,Ue),De===null?Ne=Me:De.sibling=Me,De=Me);return mt&&Zi(K,Ue),Ne}for(Me=f(K,Me);Ue<J.length;Ue++)zt=we(Me,K,Ue,J[Ue],ye),zt!==null&&(i&&zt.alternate!==null&&Me.delete(zt.key===null?Ue:zt.key),$=b(zt,$,Ue),De===null?Ne=zt:De.sibling=zt,De=zt);return i&&Me.forEach(function(wi){return s(K,wi)}),mt&&Zi(K,Ue),Ne}function ke(K,$,J,ye){var Ne=q(J);if(typeof Ne!="function")throw Error(n(150));if(J=Ne.call(J),J==null)throw Error(n(151));for(var De=Ne=null,Me=$,Ue=$=0,zt=null,et=J.next();Me!==null&&!et.done;Ue++,et=J.next()){Me.index>Ue?(zt=Me,Me=null):zt=Me.sibling;var wi=ue(K,Me,et.value,ye);if(wi===null){Me===null&&(Me=zt);break}i&&Me&&wi.alternate===null&&s(K,Me),$=b(wi,$,Ue),De===null?Ne=wi:De.sibling=wi,De=wi,Me=zt}if(et.done)return l(K,Me),mt&&Zi(K,Ue),Ne;if(Me===null){for(;!et.done;Ue++,et=J.next())et=me(K,et.value,ye),et!==null&&($=b(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et);return mt&&Zi(K,Ue),Ne}for(Me=f(K,Me);!et.done;Ue++,et=J.next())et=we(Me,K,Ue,et.value,ye),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?Ue:et.key),$=b(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et);return i&&Me.forEach(function(J9){return s(K,J9)}),mt&&Zi(K,Ue),Ne}function vt(K,$,J,ye){if(typeof J=="object"&&J!==null&&J.type===X&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case Y:e:{for(var Ne=J.key,De=$;De!==null;){if(De.key===Ne){if(Ne=J.type,Ne===X){if(De.tag===7){l(K,De.sibling),$=E(De,J.props.children),$.return=K,K=$;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&Dx(Ne)===De.type){l(K,De.sibling),$=E(De,J.props),$.ref=qa(K,De,J),$.return=K,K=$;break e}l(K,De);break}else s(K,De);De=De.sibling}J.type===X?($=ao(J.props.children,K.mode,ye,J.key),$.return=K,K=$):(ye=Pc(J.type,J.key,J.props,null,K.mode,ye),ye.ref=qa(K,$,J),ye.return=K,K=ye)}return _(K);case F:e:{for(De=J.key;$!==null;){if($.key===De)if($.tag===4&&$.stateNode.containerInfo===J.containerInfo&&$.stateNode.implementation===J.implementation){l(K,$.sibling),$=E($,J.children||[]),$.return=K,K=$;break e}else{l(K,$);break}else s(K,$);$=$.sibling}$=Tm(J,K.mode,ye),$.return=K,K=$}return _(K);case Ce:return De=J._init,vt(K,$,De(J._payload),ye)}if(ti(J))return Se(K,$,J,ye);if(q(J))return ke(K,$,J,ye);lc(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,$!==null&&$.tag===6?(l(K,$.sibling),$=E($,J),$.return=K,K=$):(l(K,$),$=bm(J,K.mode,ye),$.return=K,K=$),_(K)):l(K,$)}return vt}var fs=Mx(!0),Fx=Mx(!1),cc=di(null),dc=null,hs=null,Np=null;function Op(){Np=hs=dc=null}function Ip(i){var s=cc.current;ct(cc),i._currentValue=s}function Rp(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function ps(i,s){dc=i,Np=hs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(En=!0),i.firstContext=null)}function Un(i){var s=i._currentValue;if(Np!==i)if(i={context:i,memoizedValue:s,next:null},hs===null){if(dc===null)throw Error(n(308));hs=i,dc.dependencies={lanes:0,firstContext:i}}else hs=hs.next=i;return s}var eo=null;function Pp(i){eo===null?eo=[i]:eo.push(i)}function Bx(i,s,l,f){var E=s.interleaved;return E===null?(l.next=l,Pp(s)):(l.next=E.next,E.next=l),s.interleaved=l,Ur(i,f)}function Ur(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var pi=!1;function Lp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ux(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Hr(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function mi(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Je&2)!==0){var E=f.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),f.pending=s,Ur(i,l)}return E=f.interleaved,E===null?(s.next=s,Pp(f)):(s.next=E.next,E.next=s),f.interleaved=s,Ur(i,l)}function fc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Gh(i,l)}}function Hx(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var E=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var _={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=_:b=b.next=_,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;l={baseState:f.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function hc(i,s,l,f){var E=i.updateQueue;pi=!1;var b=E.firstBaseUpdate,_=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var H=L,te=H.next;H.next=null,_===null?b=te:_.next=te,_=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,L=fe.lastBaseUpdate,L!==_&&(L===null?fe.firstBaseUpdate=te:L.next=te,fe.lastBaseUpdate=H))}if(b!==null){var me=E.baseState;_=0,fe=te=H=null,L=b;do{var ue=L.lane,we=L.eventTime;if((f&ue)===ue){fe!==null&&(fe=fe.next={eventTime:we,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Se=i,ke=L;switch(ue=s,we=l,ke.tag){case 1:if(Se=ke.payload,typeof Se=="function"){me=Se.call(we,me,ue);break e}me=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=ke.payload,ue=typeof Se=="function"?Se.call(we,me,ue):Se,ue==null)break e;me=S({},me,ue);break e;case 2:pi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else we={eventTime:we,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},fe===null?(te=fe=we,H=me):fe=fe.next=we,_|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(fe===null&&(H=me),E.baseState=H,E.firstBaseUpdate=te,E.lastBaseUpdate=fe,s=E.shared.interleaved,s!==null){E=s;do _|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);ro|=_,i.lanes=_,i.memoizedState=me}}function zx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],E=f.callback;if(E!==null){if(f.callback=null,f=l,typeof E!="function")throw Error(n(191,E));E.call(f)}}}var Ya={},vr=di(Ya),Wa=di(Ya),Ga=di(Ya);function to(i){if(i===Ya)throw Error(n(174));return i}function Dp(i,s){switch(at(Ga,s),at(Wa,i),at(vr,Ya),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:xe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=xe(s,i)}ct(vr),at(vr,s)}function ms(){ct(vr),ct(Wa),ct(Ga)}function jx(i){to(Ga.current);var s=to(vr.current),l=xe(s,i.type);s!==l&&(at(Wa,i),at(vr,l))}function Mp(i){Wa.current===i&&(ct(vr),ct(Wa))}var gt=di(0);function pc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Fp=[];function Bp(){for(var i=0;i<Fp.length;i++)Fp[i]._workInProgressVersionPrimary=null;Fp.length=0}var mc=U.ReactCurrentDispatcher,Up=U.ReactCurrentBatchConfig,no=0,Et=null,Rt=null,Ut=null,gc=!1,Ka=!1,Qa=0,T9=0;function Jt(){throw Error(n(321))}function Hp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!er(i[l],s[l]))return!1;return!0}function zp(i,s,l,f,E,b){if(no=b,Et=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,mc.current=i===null||i.memoizedState===null?v9:S9,i=l(f,E),Ka){b=0;do{if(Ka=!1,Qa=0,25<=b)throw Error(n(301));b+=1,Ut=Rt=null,s.updateQueue=null,mc.current=A9,i=l(f,E)}while(Ka)}if(mc.current=bc,s=Rt!==null&&Rt.next!==null,no=0,Ut=Rt=Et=null,gc=!1,s)throw Error(n(300));return i}function jp(){var i=Qa!==0;return Qa=0,i}function Sr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i,Ut}function Hn(){if(Rt===null){var i=Et.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=Ut===null?Et.memoizedState:Ut.next;if(s!==null)Ut=s,Rt=i;else{if(i===null)throw Error(n(310));Rt=i,i={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i}return Ut}function Xa(i,s){return typeof s=="function"?s(i):s}function $p(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Rt,E=f.baseQueue,b=l.pending;if(b!==null){if(E!==null){var _=E.next;E.next=b.next,b.next=_}f.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,f=f.baseState;var L=_=null,H=null,te=b;do{var fe=te.lane;if((no&fe)===fe)H!==null&&(H=H.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),f=te.hasEagerState?te.eagerState:i(f,te.action);else{var me={lane:fe,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};H===null?(L=H=me,_=f):H=H.next=me,Et.lanes|=fe,ro|=fe}te=te.next}while(te!==null&&te!==b);H===null?_=f:H.next=L,er(f,s.memoizedState)||(En=!0),s.memoizedState=f,s.baseState=_,s.baseQueue=H,l.lastRenderedState=f}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Et.lanes|=b,ro|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Vp(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var _=E=E.next;do b=i(b,_.action),_=_.next;while(_!==E);er(b,s.memoizedState)||(En=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,f]}function $x(){}function Vx(i,s){var l=Et,f=Hn(),E=s(),b=!er(f.memoizedState,E);if(b&&(f.memoizedState=E,En=!0),f=f.queue,qp(Wx.bind(null,l,f,i),[i]),f.getSnapshot!==s||b||Ut!==null&&Ut.memoizedState.tag&1){if(l.flags|=2048,Ja(9,Yx.bind(null,l,f,E,s),void 0,null),Ht===null)throw Error(n(349));(no&30)!==0||qx(l,s,E)}return E}function qx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Yx(i,s,l,f){s.value=l,s.getSnapshot=f,Gx(s)&&Kx(i)}function Wx(i,s,l){return l(function(){Gx(s)&&Kx(i)})}function Gx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!er(i,l)}catch(f){return!0}}function Kx(i){var s=Ur(i,1);s!==null&&or(s,i,1,-1)}function Qx(i){var s=Sr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:i},s.queue=i,i=i.dispatch=_9.bind(null,Et,i),[s.memoizedState,i]}function Ja(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(f=l.next,l.next=i,i.next=f,s.lastEffect=i)),i}function Xx(){return Hn().memoizedState}function Ec(i,s,l,f){var E=Sr();Et.flags|=i,E.memoizedState=Ja(1|s,l,void 0,f===void 0?null:f)}function yc(i,s,l,f){var E=Hn();f=f===void 0?null:f;var b=void 0;if(Rt!==null){var _=Rt.memoizedState;if(b=_.destroy,f!==null&&Hp(f,_.deps)){E.memoizedState=Ja(s,l,b,f);return}}Et.flags|=i,E.memoizedState=Ja(1|s,l,b,f)}function Jx(i,s){return Ec(8390656,8,i,s)}function qp(i,s){return yc(2048,8,i,s)}function Zx(i,s){return yc(4,2,i,s)}function ew(i,s){return yc(4,4,i,s)}function tw(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function nw(i,s,l){return l=l!=null?l.concat([i]):null,yc(4,4,tw.bind(null,s,i),l)}function Yp(){}function rw(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Hp(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function iw(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Hp(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function ow(i,s,l){return(no&21)===0?(i.baseState&&(i.baseState=!1,En=!0),i.memoizedState=l):(er(l,s)||(l=DT(),Et.lanes|=l,ro|=l,i.baseState=!0),s)}function x9(i,s){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var f=Up.transition;Up.transition={};try{i(!1),s()}finally{nt=l,Up.transition=f}}function sw(){return Hn().memoizedState}function w9(i,s,l){var f=bi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},aw(i))uw(s,l);else if(l=Bx(i,s,l,f),l!==null){var E=on();or(l,i,f,E),lw(l,s,f)}}function _9(i,s,l){var f=bi(i),E={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(aw(i))uw(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var _=s.lastRenderedState,L=b(_,l);if(E.hasEagerState=!0,E.eagerState=L,er(L,_)){var H=s.interleaved;H===null?(E.next=E,Pp(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(te){}l=Bx(i,s,E,f),l!==null&&(E=on(),or(l,i,f,E),lw(l,s,f))}}function aw(i){var s=i.alternate;return i===Et||s!==null&&s===Et}function uw(i,s){Ka=gc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function lw(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Gh(i,l)}}var bc={readContext:Un,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},v9={readContext:Un,useCallback:function(i,s){return Sr().memoizedState=[i,s===void 0?null:s],i},useContext:Un,useEffect:Jx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Ec(4194308,4,tw.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Ec(4194308,4,i,s)},useInsertionEffect:function(i,s){return Ec(4,2,i,s)},useMemo:function(i,s){var l=Sr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=Sr();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=w9.bind(null,Et,i),[f.memoizedState,i]},useRef:function(i){var s=Sr();return i={current:i},s.memoizedState=i},useState:Qx,useDebugValue:Yp,useDeferredValue:function(i){return Sr().memoizedState=i},useTransition:function(){var i=Qx(!1),s=i[0];return i=x9.bind(null,i[1]),Sr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Et,E=Sr();if(mt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Ht===null)throw Error(n(349));(no&30)!==0||qx(f,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,Jx(Wx.bind(null,f,b,i),[i]),f.flags|=2048,Ja(9,Yx.bind(null,f,b,l,s),void 0,null),l},useId:function(){var i=Sr(),s=Ht.identifierPrefix;if(mt){var l=Br,f=Fr;l=(f&~(1<<32-Zn(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=Qa++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=T9++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},S9={readContext:Un,useCallback:rw,useContext:Un,useEffect:qp,useImperativeHandle:nw,useInsertionEffect:Zx,useLayoutEffect:ew,useMemo:iw,useReducer:$p,useRef:Xx,useState:function(){return $p(Xa)},useDebugValue:Yp,useDeferredValue:function(i){var s=Hn();return ow(s,Rt.memoizedState,i)},useTransition:function(){var i=$p(Xa)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:$x,useSyncExternalStore:Vx,useId:sw,unstable_isNewReconciler:!1},A9={readContext:Un,useCallback:rw,useContext:Un,useEffect:qp,useImperativeHandle:nw,useInsertionEffect:Zx,useLayoutEffect:ew,useMemo:iw,useReducer:Vp,useRef:Xx,useState:function(){return Vp(Xa)},useDebugValue:Yp,useDeferredValue:function(i){var s=Hn();return Rt===null?s.memoizedState=i:ow(s,Rt.memoizedState,i)},useTransition:function(){var i=Vp(Xa)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:$x,useSyncExternalStore:Vx,useId:sw,unstable_isNewReconciler:!1};function nr(i,s){if(i&&i.defaultProps){s=S({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Wp(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:S({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Tc={isMounted:function(i){return(i=i._reactInternals)?Ki(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=on(),E=bi(i),b=Hr(f,E);b.payload=s,l!=null&&(b.callback=l),s=mi(i,b,E),s!==null&&(or(s,i,E,f),fc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=on(),E=bi(i),b=Hr(f,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=mi(i,b,E),s!==null&&(or(s,i,E,f),fc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=on(),f=bi(i),E=Hr(l,f);E.tag=2,s!=null&&(E.callback=s),s=mi(i,E,f),s!==null&&(or(s,i,f,l),fc(s,i,f))}};function cw(i,s,l,f,E,b,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,_):s.prototype&&s.prototype.isPureReactComponent?!Ba(l,f)||!Ba(E,b):!0}function dw(i,s,l){var f=!1,E=fi,b=s.contextType;return typeof b=="object"&&b!==null?b=Un(b):(E=gn(s)?Xi:Xt.current,f=s.contextTypes,b=(f=f!=null)?us(i,E):fi),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Tc,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function fw(i,s,l,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,f),s.state!==i&&Tc.enqueueReplaceState(s,s.state,null)}function Gp(i,s,l,f){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Lp(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=Un(b):(b=gn(s)?Xi:Xt.current,E.context=us(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Wp(i,s,b,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&Tc.enqueueReplaceState(E,E.state,null),hc(i,l,E,f),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function gs(i,s){try{var l="",f=s;do l+=Oe(f),f=f.return;while(f);var E=l}catch(b){E=`
|
|
22
22
|
Error generating stack: `+b.message+`
|
|
23
|
-
`+b.stack}return{value:i,source:s,stack:E,digest:null}}function Wp(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Gp(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var T9=typeof WeakMap=="function"?WeakMap:Map;function lw(i,s,l){l=Ur(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){Sc||(Sc=!0,lm=f),Gp(i,s)},l}function cw(i,s,l){l=Ur(-1,l),l.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var E=s.value;l.payload=function(){return f(E)},l.callback=function(){Gp(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Gp(i,s),typeof f!="function"&&(gi===null?gi=new Set([this]):gi.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})}),l}function dw(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new T9;var E=new Set;f.set(s,E)}else E=f.get(s),E===void 0&&(E=new Set,f.set(s,E));E.has(l)||(E.add(l),i=L9.bind(null,i,s,l),s.then(i,i))}function fw(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function hw(i,s,l,f,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Ur(-1,1),s.tag=2,pi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var x9=H.ReactCurrentOwner,En=!1;function rn(i,s,l,f){s.child=i===null?Px(s,null,l,f):cs(s,i.child,l,f)}function pw(i,s,l,f,E){l=l.render;var b=s.ref;return fs(s,E),f=Up(i,s,l,f,b,E),l=Hp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Hr(i,s,E)):(pt&&l&&wp(s),s.flags|=1,rn(i,s,f,E),s.child)}function mw(i,s,l,f,E){if(i===null){var b=l.type;return typeof b=="function"&&!gm(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,gw(i,s,b,f,E)):(i=Ic(l.type,null,f,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var _=b.memoizedProps;if(l=l.compare,l=l!==null?l:Ma,l(_,f)&&i.ref===s.ref)return Hr(i,s,E)}return s.flags|=1,i=Ti(b,f),i.ref=s.ref,i.return=s,s.child=i}function gw(i,s,l,f,E){if(i!==null){var b=i.memoizedProps;if(Ma(b,f)&&i.ref===s.ref)if(En=!1,s.pendingProps=f=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(En=!0);else return s.lanes=i.lanes,Hr(i,s,E)}return Kp(i,s,l,f,E)}function Ew(i,s,l){var f=s.pendingProps,E=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},at(gs,Nn),Nn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,at(gs,Nn),Nn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=b!==null?b.baseLanes:l,at(gs,Nn),Nn|=f}else b!==null?(f=b.baseLanes|l,s.memoizedState=null):f=l,at(gs,Nn),Nn|=f;return rn(i,s,E,l),s.child}function yw(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Kp(i,s,l,f,E){var b=gn(l)?Qi:Xt.current;return b=ss(s,b),fs(s,E),l=Up(i,s,l,f,b,E),f=Hp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Hr(i,s,E)):(pt&&f&&wp(s),s.flags|=1,rn(i,s,l,E),s.child)}function bw(i,s,l,f,E){if(gn(l)){var b=!0;nc(s)}else b=!1;if(fs(s,E),s.stateNode===null)Tc(i,s),aw(s,l,f),Yp(s,l,f,E),f=!0;else if(i===null){var _=s.stateNode,L=s.memoizedProps;_.props=L;var U=_.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=Un(Z):(Z=gn(l)?Qi:Xt.current,Z=ss(s,Z));var fe=l.getDerivedStateFromProps,me=typeof fe=="function"||typeof _.getSnapshotBeforeUpdate=="function";me||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==f||U!==Z)&&uw(s,_,f,Z),hi=!1;var le=s.memoizedState;_.state=le,dc(s,f,_,E),U=s.memoizedState,L!==f||le!==U||mn.current||hi?(typeof fe=="function"&&(qp(s,l,fe,f),U=s.memoizedState),(L=hi||sw(s,l,L,f,le,U,Z))?(me||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=U),_.props=f,_.state=U,_.context=Z,f=L):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{_=s.stateNode,Dx(i,s),L=s.memoizedProps,Z=s.type===s.elementType?L:nr(s.type,L),_.props=Z,me=s.pendingProps,le=_.context,U=l.contextType,typeof U=="object"&&U!==null?U=Un(U):(U=gn(l)?Qi:Xt.current,U=ss(s,U));var _e=l.getDerivedStateFromProps;(fe=typeof _e=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==me||le!==U)&&uw(s,_,f,U),hi=!1,le=s.memoizedState,_.state=le,dc(s,f,_,E);var Ae=s.memoizedState;L!==me||le!==Ae||mn.current||hi?(typeof _e=="function"&&(qp(s,l,_e,f),Ae=s.memoizedState),(Z=hi||sw(s,l,Z,f,le,Ae,U)||!1)?(fe||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,Ae,U),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,Ae,U)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Ae),_.props=f,_.state=Ae,_.context=U,f=Z):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),f=!1)}return Qp(i,s,l,f,b,E)}function Qp(i,s,l,f,E,b){yw(i,s);var _=(s.flags&128)!==0;if(!f&&!_)return E&&vx(s,l,!1),Hr(i,s,b);f=s.stateNode,x9.current=s;var L=_&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&_?(s.child=cs(s,i.child,null,b),s.child=cs(s,null,L,b)):rn(i,s,L,b),s.memoizedState=f.state,E&&vx(s,l,!0),s.child}function Tw(i){var s=i.stateNode;s.pendingContext?wx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&wx(i,s.context,!1),Pp(i,s.containerInfo)}function xw(i,s,l,f,E){return ls(),Ap(E),s.flags|=256,rn(i,s,l,f),s.child}var Xp={dehydrated:null,treeContext:null,retryLane:0};function Jp(i){return{baseLanes:i,cachePool:null,transitions:null}}function ww(i,s,l){var f=s.pendingProps,E=gt.current,b=!1,_=(s.flags&128)!==0,L;if((L=_)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),at(gt,E&1),i===null)return Sp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(_=f.children,i=f.fallback,b?(f=s.mode,b=s.child,_={mode:"hidden",children:_},(f&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=_):b=Rc(_,f,0,null),i=so(i,f,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Jp(l),s.memoizedState=Xp,i):Zp(s,_));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return w9(i,s,_,f,L,E,l);if(b){b=f.fallback,_=s.mode,E=i.child,L=E.sibling;var U={mode:"hidden",children:f.children};return(_&1)===0&&s.child!==E?(f=s.child,f.childLanes=0,f.pendingProps=U,s.deletions=null):(f=Ti(E,U),f.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Ti(L,b):(b=so(b,_,l,null),b.flags|=2),b.return=s,f.return=s,f.sibling=b,s.child=f,f=b,b=s.child,_=i.child.memoizedState,_=_===null?Jp(l):{baseLanes:_.baseLanes|l,cachePool:null,transitions:_.transitions},b.memoizedState=_,b.childLanes=i.childLanes&~l,s.memoizedState=Xp,f}return b=i.child,i=b.sibling,f=Ti(b,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=l),f.return=s,f.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=f,s.memoizedState=null,f}function Zp(i,s){return s=Rc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function bc(i,s,l,f){return f!==null&&Ap(f),cs(s,i.child,null,l),i=Zp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function w9(i,s,l,f,E,b,_){if(l)return s.flags&256?(s.flags&=-257,f=Wp(Error(n(422))),bc(i,s,_,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=f.fallback,E=s.mode,f=Rc({mode:"visible",children:f.children},E,0,null),b=so(b,E,_,null),b.flags|=2,f.return=s,b.return=s,f.sibling=b,s.child=f,(s.mode&1)!==0&&cs(s,i.child,null,_),s.child.memoizedState=Jp(_),s.memoizedState=Xp,b);if((s.mode&1)===0)return bc(i,s,_,null);if(E.data==="$!"){if(f=E.nextSibling&&E.nextSibling.dataset,f)var L=f.dgst;return f=L,b=Error(n(419)),f=Wp(b,f,void 0),bc(i,s,_,f)}if(L=(_&i.childLanes)!==0,En||L){if(f=Ht,f!==null){switch(_&-_){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&(f.suspendedLanes|_))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Br(i,E),or(f,i,E,-1))}return mm(),f=Wp(Error(n(421))),bc(i,s,_,f)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=D9.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,kn=li(E.nextSibling),Cn=s,pt=!0,tr=null,i!==null&&(Fn[Bn++]=Mr,Fn[Bn++]=Fr,Fn[Bn++]=Xi,Mr=i.id,Fr=i.overflow,Xi=s),s=Zp(s,f.children),s.flags|=4096,s)}function _w(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),Op(i.return,s,l)}function em(i,s,l,f,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=l,b.tailMode=E)}function vw(i,s,l){var f=s.pendingProps,E=f.revealOrder,b=f.tail;if(rn(i,s,f.children,l),f=gt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&_w(i,l,s);else if(i.tag===19)_w(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(at(gt,f),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&fc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),em(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&fc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}em(s,!0,l,null,b);break;case"together":em(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Tc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Hr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),no|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ti(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ti(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function _9(i,s,l){switch(s.tag){case 3:Tw(s),ls();break;case 5:Bx(s);break;case 1:gn(s.type)&&nc(s);break;case 4:Pp(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,E=s.memoizedProps.value;at(uc,f._currentValue),f._currentValue=E;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(at(gt,gt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?ww(i,s,l):(at(gt,gt.current&1),i=Hr(i,s,l),i!==null?i.sibling:null);at(gt,gt.current&1);break;case 19:if(f=(l&s.childLanes)!==0,(i.flags&128)!==0){if(f)return vw(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),at(gt,gt.current),f)break;return null;case 22:case 23:return s.lanes=0,Ew(i,s,l)}return Hr(i,s,l)}var Sw,tm,Aw,Cw;Sw=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},tm=function(){},Aw=function(i,s,l,f){var E=i.memoizedProps;if(E!==f){i=s.stateNode,eo(_r.current);var b=null;switch(l){case"input":E=Jn(i,E),f=Jn(i,f),b=[];break;case"select":E=C({},E,{value:void 0}),f=C({},f,{value:void 0}),b=[];break;case"textarea":E=Ta(i,E),f=Ta(i,f),b=[];break;default:typeof E.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Zl)}$t(l,f);var _;l=null;for(Z in E)if(!f.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var L=E[Z];for(_ in L)L.hasOwnProperty(_)&&(l||(l={}),l[_]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in f){var U=f[Z];if(L=E!=null?E[Z]:void 0,f.hasOwnProperty(Z)&&U!==L&&(U!=null||L!=null))if(Z==="style")if(L){for(_ in L)!L.hasOwnProperty(_)||U&&U.hasOwnProperty(_)||(l||(l={}),l[_]="");for(_ in U)U.hasOwnProperty(_)&&L[_]!==U[_]&&(l||(l={}),l[_]=U[_])}else l||(b||(b=[]),b.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,L=L?L.__html:void 0,U!=null&&L!==U&&(b=b||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&<("scroll",i),b||L===U||(b=[])):(b=b||[]).push(Z,U))}l&&(b=b||[]).push("style",l);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},Cw=function(i,s,l,f){l!==f&&(s.flags|=4)};function Xa(i,s){if(!pt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function Zt(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,f=0;if(s)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags&14680064,f|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags,f|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=f,i.childLanes=l,s}function v9(i,s,l){var f=s.pendingProps;switch(_p(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(s),null;case 1:return gn(s.type)&&tc(),Zt(s),null;case 3:return f=s.stateNode,hs(),ct(mn),ct(Xt),Mp(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(sc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,tr!==null&&(fm(tr),tr=null))),tm(i,s),Zt(s),null;case 5:Lp(s);var E=eo(Ya.current);if(l=s.type,i!==null&&s.stateNode!=null)Aw(i,s,l,f,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return Zt(s),null}if(i=eo(_r.current),sc(s)){f=s.stateNode,l=s.type;var b=s.memoizedProps;switch(f[wr]=s,f[za]=b,i=(s.mode&1)!==0,l){case"dialog":lt("cancel",f),lt("close",f);break;case"iframe":case"object":case"embed":lt("load",f);break;case"video":case"audio":for(E=0;E<Ba.length;E++)lt(Ba[E],f);break;case"source":lt("error",f);break;case"img":case"image":case"link":lt("error",f),lt("load",f);break;case"details":lt("toggle",f);break;case"input":ya(f,b),lt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!b.multiple},lt("invalid",f);break;case"textarea":Nl(f,b),lt("invalid",f)}$t(l,b),E=null;for(var _ in b)if(b.hasOwnProperty(_)){var L=b[_];_==="children"?typeof L=="string"?f.textContent!==L&&(b.suppressHydrationWarning!==!0&&Jl(f.textContent,L,i),E=["children",L]):typeof L=="number"&&f.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&Jl(f.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(_)&&L!=null&&_==="onScroll"&<("scroll",f)}switch(l){case"input":pn(f),kl(f,b,!0);break;case"textarea":pn(f),Il(f);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(f.onclick=Zl)}f=E,s.updateQueue=f,f!==null&&(s.flags|=4)}else{_=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ie(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=_.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=_.createElement(l,{is:f.is}):(i=_.createElement(l),l==="select"&&(_=i,f.multiple?_.multiple=!0:f.size&&(_.size=f.size))):i=_.createElementNS(i,l),i[wr]=s,i[za]=f,Sw(i,s,!1,!1),s.stateNode=i;e:{switch(_=Tr(l,f),l){case"dialog":lt("cancel",i),lt("close",i),E=f;break;case"iframe":case"object":case"embed":lt("load",i),E=f;break;case"video":case"audio":for(E=0;E<Ba.length;E++)lt(Ba[E],i);E=f;break;case"source":lt("error",i),E=f;break;case"img":case"image":case"link":lt("error",i),lt("load",i),E=f;break;case"details":lt("toggle",i),E=f;break;case"input":ya(i,f),E=Jn(i,f),lt("invalid",i);break;case"option":E=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},E=C({},f,{value:void 0}),lt("invalid",i);break;case"textarea":Nl(i,f),E=Ta(i,f),lt("invalid",i);break;default:E=f}$t(l,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var U=L[b];b==="style"?ni(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ye(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Xe(i,U):typeof U=="number"&&Xe(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?U!=null&&b==="onScroll"&<("scroll",i):U!=null&&R(i,b,U,_))}switch(l){case"input":pn(i),kl(i,f,!1);break;case"textarea":pn(i),Il(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Se(f.value));break;case"select":i.multiple=!!f.multiple,b=f.value,b!=null?ti(i,!!f.multiple,b,!1):f.defaultValue!=null&&ti(i,!!f.multiple,f.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Zl)}switch(l){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Zt(s),null;case 6:if(i&&s.stateNode!=null)Cw(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=eo(Ya.current),eo(_r.current),sc(s)){if(f=s.stateNode,l=s.memoizedProps,f[wr]=s,(b=f.nodeValue!==l)&&(i=Cn,i!==null))switch(i.tag){case 3:Jl(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Jl(f.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[wr]=s,s.stateNode=f}return Zt(s),null;case 13:if(ct(gt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(pt&&kn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Ox(),ls(),s.flags|=98560,b=!1;else if(b=sc(s),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[wr]=s}else ls(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Zt(s),b=!1}else tr!==null&&(fm(tr),tr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(gt.current&1)!==0?Pt===0&&(Pt=3):mm())),s.updateQueue!==null&&(s.flags|=4),Zt(s),null);case 4:return hs(),tm(i,s),i===null&&Ua(s.stateNode.containerInfo),Zt(s),null;case 10:return Np(s.type._context),Zt(s),null;case 17:return gn(s.type)&&tc(),Zt(s),null;case 19:if(ct(gt),b=s.memoizedState,b===null)return Zt(s),null;if(f=(s.flags&128)!==0,_=b.rendering,_===null)if(f)Xa(b,!1);else{if(Pt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=fc(i),_!==null){for(s.flags|=128,Xa(b,!1),f=_.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)b=l,i=f,b.flags&=14680066,_=b.alternate,_===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=_.childLanes,b.lanes=_.lanes,b.child=_.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=_.memoizedProps,b.memoizedState=_.memoizedState,b.updateQueue=_.updateQueue,b.type=_.type,i=_.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return at(gt,gt.current&1|2),s.child}i=i.sibling}b.tail!==null&&_t()>Es&&(s.flags|=128,f=!0,Xa(b,!1),s.lanes=4194304)}else{if(!f)if(i=fc(_),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Xa(b,!0),b.tail===null&&b.tailMode==="hidden"&&!_.alternate&&!pt)return Zt(s),null}else 2*_t()-b.renderingStartTime>Es&&l!==1073741824&&(s.flags|=128,f=!0,Xa(b,!1),s.lanes=4194304);b.isBackwards?(_.sibling=s.child,s.child=_):(l=b.last,l!==null?l.sibling=_:s.child=_,b.last=_)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=_t(),s.sibling=null,l=gt.current,at(gt,f?l&1|2:l&1),s):(Zt(s),null);case 22:case 23:return pm(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Nn&1073741824)!==0&&(Zt(s),s.subtreeFlags&6&&(s.flags|=8192)):Zt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function S9(i,s){switch(_p(s),s.tag){case 1:return gn(s.type)&&tc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return hs(),ct(mn),ct(Xt),Mp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Lp(s),null;case 13:if(ct(gt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ls()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ct(gt),null;case 4:return hs(),null;case 10:return Np(s.type._context),null;case 22:case 23:return pm(),null;case 24:return null;default:return null}}var xc=!1,en=!1,A9=typeof WeakSet=="function"?WeakSet:Set,ve=null;function ms(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){bt(i,s,f)}else l.current=null}function nm(i,s,l){try{l()}catch(f){bt(i,s,f)}}var kw=!1;function C9(i,s){if(pp=zl,i=sx(),sp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var E=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{l.nodeType,b.nodeType}catch(be){l=null;break e}var _=0,L=-1,U=-1,Z=0,fe=0,me=i,le=null;t:for(;;){for(var _e;me!==l||E!==0&&me.nodeType!==3||(L=_+E),me!==b||f!==0&&me.nodeType!==3||(U=_+f),me.nodeType===3&&(_+=me.nodeValue.length),(_e=me.firstChild)!==null;)le=me,me=_e;for(;;){if(me===i)break t;if(le===l&&++Z===E&&(L=_),le===b&&++fe===f&&(U=_),(_e=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=_e}l=L===-1||U===-1?null:{start:L,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(mp={focusedElem:i,selectionRange:l},zl=!1,ve=s;ve!==null;)if(s=ve,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ve=i;else for(;ve!==null;){s=ve;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,vt=Ae.memoizedState,q=s.stateNode,j=q.getSnapshotBeforeUpdate(s.elementType===s.type?ke:nr(s.type,ke),vt);q.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(be){bt(s,s.return,be)}if(i=s.sibling,i!==null){i.return=s.return,ve=i;break}ve=s.return}return Ae=kw,kw=!1,Ae}function Ja(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var E=f=f.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&nm(s,l,b)}E=E.next}while(E!==f)}}function wc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function rm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function Nw(i){var s=i.alternate;s!==null&&(i.alternate=null,Nw(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[wr],delete s[za],delete s[bp],delete s[l9],delete s[c9])),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 Ow(i){return i.tag===5||i.tag===3||i.tag===4}function Iw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Ow(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 im(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Zl));else if(f!==4&&(i=i.child,i!==null))for(im(i,s,l),i=i.sibling;i!==null;)im(i,s,l),i=i.sibling}function om(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(om(i,s,l),i=i.sibling;i!==null;)om(i,s,l),i=i.sibling}var Vt=null,rr=!1;function mi(i,s,l){for(l=l.child;l!==null;)Rw(i,s,l),l=l.sibling}function Rw(i,s,l){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(Dl,l)}catch(L){}switch(l.tag){case 5:en||ms(l,s);case 6:var f=Vt,E=rr;Vt=null,mi(i,s,l),Vt=f,rr=E,Vt!==null&&(rr?(i=Vt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Vt.removeChild(l.stateNode));break;case 18:Vt!==null&&(rr?(i=Vt,l=l.stateNode,i.nodeType===8?yp(i.parentNode,l):i.nodeType===1&&yp(i,l),Oa(i)):yp(Vt,l.stateNode));break;case 4:f=Vt,E=rr,Vt=l.stateNode.containerInfo,rr=!0,mi(i,s,l),Vt=f,rr=E;break;case 0:case 11:case 14:case 15:if(!en&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){E=f=f.next;do{var b=E,_=b.destroy;b=b.tag,_!==void 0&&((b&2)!==0||(b&4)!==0)&&nm(l,s,_),E=E.next}while(E!==f)}mi(i,s,l);break;case 1:if(!en&&(ms(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(L){bt(l,s,L)}mi(i,s,l);break;case 21:mi(i,s,l);break;case 22:l.mode&1?(en=(f=en)||l.memoizedState!==null,mi(i,s,l),en=f):mi(i,s,l);break;default:mi(i,s,l)}}function Pw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new A9),s.forEach(function(f){var E=M9.bind(null,i,f);l.has(f)||(l.add(f),f.then(E,E))})}}function ir(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var E=l[f];try{var b=i,_=s,L=_;e:for(;L!==null;){switch(L.tag){case 5:Vt=L.stateNode,rr=!1;break e;case 3:Vt=L.stateNode.containerInfo,rr=!0;break e;case 4:Vt=L.stateNode.containerInfo,rr=!0;break e}L=L.return}if(Vt===null)throw Error(n(160));Rw(b,_,E),Vt=null,rr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){bt(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Lw(s,i),s=s.sibling}function Lw(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(ir(s,i),Sr(i),f&4){try{Ja(3,i,i.return),wc(3,i)}catch(ke){bt(i,i.return,ke)}try{Ja(5,i,i.return)}catch(ke){bt(i,i.return,ke)}}break;case 1:ir(s,i),Sr(i),f&512&&l!==null&&ms(l,l.return);break;case 5:if(ir(s,i),Sr(i),f&512&&l!==null&&ms(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(ke){bt(i,i.return,ke)}}if(f&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,_=l!==null?l.memoizedProps:b,L=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&ba(E,b),Tr(L,_);var Z=Tr(L,b);for(_=0;_<U.length;_+=2){var fe=U[_],me=U[_+1];fe==="style"?ni(E,me):fe==="dangerouslySetInnerHTML"?Ye(E,me):fe==="children"?Xe(E,me):R(E,fe,me,Z)}switch(L){case"input":Wo(E,b);break;case"textarea":Ol(E,b);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var _e=b.value;_e!=null?ti(E,!!b.multiple,_e,!1):le!==!!b.multiple&&(b.defaultValue!=null?ti(E,!!b.multiple,b.defaultValue,!0):ti(E,!!b.multiple,b.multiple?[]:"",!1))}E[za]=b}catch(ke){bt(i,i.return,ke)}}break;case 6:if(ir(s,i),Sr(i),f&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(ke){bt(i,i.return,ke)}}break;case 3:if(ir(s,i),Sr(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Oa(s.containerInfo)}catch(ke){bt(i,i.return,ke)}break;case 4:ir(s,i),Sr(i);break;case 13:ir(s,i),Sr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(um=_t())),f&4&&Pw(i);break;case 22:if(fe=l!==null&&l.memoizedState!==null,i.mode&1?(en=(Z=en)||fe,ir(s,i),en=Z):ir(s,i),Sr(i),f&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!fe&&(i.mode&1)!==0)for(ve=i,fe=i.child;fe!==null;){for(me=ve=fe;ve!==null;){switch(le=ve,_e=le.child,le.tag){case 0:case 11:case 14:case 15:Ja(4,le,le.return);break;case 1:ms(le,le.return);var Ae=le.stateNode;if(typeof Ae.componentWillUnmount=="function"){f=le,l=le.return;try{s=f,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){bt(f,l,ke)}}break;case 5:ms(le,le.return);break;case 22:if(le.memoizedState!==null){Fw(me);continue}}_e!==null?(_e.return=le,ve=_e):Fw(me)}fe=fe.sibling}e:for(fe=null,me=i;;){if(me.tag===5){if(fe===null){fe=me;try{E=me.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=me.stateNode,U=me.memoizedProps.style,_=U!=null&&U.hasOwnProperty("display")?U.display:null,L.style.display=Mn("display",_))}catch(ke){bt(i,i.return,ke)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(ke){bt(i,i.return,ke)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;fe===me&&(fe=null),me=me.return}fe===me&&(fe=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:ir(s,i),Sr(i),f&4&&Pw(i);break;case 21:break;default:ir(s,i),Sr(i)}}function Sr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Ow(l)){var f=l;break e}l=l.return}throw Error(n(160))}switch(f.tag){case 5:var E=f.stateNode;f.flags&32&&(Xe(E,""),f.flags&=-33);var b=Iw(i);om(i,b,E);break;case 3:case 4:var _=f.stateNode.containerInfo,L=Iw(i);im(i,L,_);break;default:throw Error(n(161))}}catch(U){bt(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function k9(i,s,l){ve=i,Dw(i)}function Dw(i,s,l){for(var f=(i.mode&1)!==0;ve!==null;){var E=ve,b=E.child;if(E.tag===22&&f){var _=E.memoizedState!==null||xc;if(!_){var L=E.alternate,U=L!==null&&L.memoizedState!==null||en;L=xc;var Z=en;if(xc=_,(en=U)&&!Z)for(ve=E;ve!==null;)_=ve,U=_.child,_.tag===22&&_.memoizedState!==null?Bw(E):U!==null?(U.return=_,ve=U):Bw(E);for(;b!==null;)ve=b,Dw(b),b=b.sibling;ve=E,xc=L,en=Z}Mw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ve=b):Mw(i)}}function Mw(i){for(;ve!==null;){var s=ve;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:en||wc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!en)if(l===null)f.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:nr(s.type,l.memoizedProps);f.componentDidUpdate(E,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Fx(s,b,f);break;case 3:var _=s.updateQueue;if(_!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Fx(s,_,l)}break;case 5:var L=s.stateNode;if(l===null&&s.flags&4){l=L;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var fe=Z.memoizedState;if(fe!==null){var me=fe.dehydrated;me!==null&&Oa(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}en||s.flags&512&&rm(s)}catch(le){bt(s,s.return,le)}}if(s===i){ve=null;break}if(l=s.sibling,l!==null){l.return=s.return,ve=l;break}ve=s.return}}function Fw(i){for(;ve!==null;){var s=ve;if(s===i){ve=null;break}var l=s.sibling;if(l!==null){l.return=s.return,ve=l;break}ve=s.return}}function Bw(i){for(;ve!==null;){var s=ve;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{wc(4,s)}catch(U){bt(s,l,U)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var E=s.return;try{f.componentDidMount()}catch(U){bt(s,E,U)}}var b=s.return;try{rm(s)}catch(U){bt(s,b,U)}break;case 5:var _=s.return;try{rm(s)}catch(U){bt(s,_,U)}}}catch(U){bt(s,s.return,U)}if(s===i){ve=null;break}var L=s.sibling;if(L!==null){L.return=s.return,ve=L;break}ve=s.return}}var N9=Math.ceil,_c=H.ReactCurrentDispatcher,sm=H.ReactCurrentOwner,zn=H.ReactCurrentBatchConfig,Je=0,Ht=null,Nt=null,qt=0,Nn=0,gs=ci(0),Pt=0,Za=null,no=0,vc=0,am=0,eu=null,yn=null,um=0,Es=1/0,zr=null,Sc=!1,lm=null,gi=null,Ac=!1,Ei=null,Cc=0,tu=0,cm=null,kc=-1,Nc=0;function on(){return(Je&6)!==0?_t():kc!==-1?kc:kc=_t()}function yi(i){return(i.mode&1)===0?1:(Je&2)!==0&&qt!==0?qt&-qt:f9.transition!==null?(Nc===0&&(Nc=IT()),Nc):(i=nt,i!==0||(i=window.event,i=i===void 0?16:HT(i.type)),i)}function or(i,s,l,f){if(50<tu)throw tu=0,cm=null,Error(n(185));Sa(i,l,f),((Je&2)===0||i!==Ht)&&(i===Ht&&((Je&2)===0&&(vc|=l),Pt===4&&bi(i,qt)),bn(i,f),l===1&&Je===0&&(s.mode&1)===0&&(Es=_t()+500,rc&&fi()))}function bn(i,s){var l=i.callbackNode;fM(i,s);var f=Bl(i,i===Ht?qt:0);if(f===0)l!==null&&kT(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&kT(l),s===1)i.tag===0?d9(Hw.bind(null,i)):Sx(Hw.bind(null,i)),a9(function(){(Je&6)===0&&fi()}),l=null;else{switch(RT(f)){case 1:l=$h;break;case 4:l=NT;break;case 16:l=Ll;break;case 536870912:l=OT;break;default:l=Ll}l=Gw(l,Uw.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Uw(i,s){if(kc=-1,Nc=0,(Je&6)!==0)throw Error(n(327));var l=i.callbackNode;if(ys()&&i.callbackNode!==l)return null;var f=Bl(i,i===Ht?qt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Oc(i,f);else{s=f;var E=Je;Je|=2;var b=jw();(Ht!==i||qt!==s)&&(zr=null,Es=_t()+500,io(i,s));do try{R9();break}catch(L){zw(i,L)}while(!0);kp(),_c.current=b,Je=E,Nt!==null?s=0:(Ht=null,qt=0,s=Pt)}if(s!==0){if(s===2&&(E=Vh(i),E!==0&&(f=E,s=dm(i,E))),s===1)throw l=Za,io(i,0),bi(i,f),bn(i,_t()),l;if(s===6)bi(i,f);else{if(E=i.current.alternate,(f&30)===0&&!O9(E)&&(s=Oc(i,f),s===2&&(b=Vh(i),b!==0&&(f=b,s=dm(i,b))),s===1))throw l=Za,io(i,0),bi(i,f),bn(i,_t()),l;switch(i.finishedWork=E,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:oo(i,yn,zr);break;case 3:if(bi(i,f),(f&130023424)===f&&(s=um+500-_t(),10<s)){if(Bl(i,0)!==0)break;if(E=i.suspendedLanes,(E&f)!==f){on(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Ep(oo.bind(null,i,yn,zr),s);break}oo(i,yn,zr);break;case 4:if(bi(i,f),(f&4194240)===f)break;for(s=i.eventTimes,E=-1;0<f;){var _=31-Zn(f);b=1<<_,_=s[_],_>E&&(E=_),f&=~b}if(f=E,f=_t()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*N9(f/1960))-f,10<f){i.timeoutHandle=Ep(oo.bind(null,i,yn,zr),f);break}oo(i,yn,zr);break;case 5:oo(i,yn,zr);break;default:throw Error(n(329))}}}return bn(i,_t()),i.callbackNode===l?Uw.bind(null,i):null}function dm(i,s){var l=eu;return i.current.memoizedState.isDehydrated&&(io(i,s).flags|=256),i=Oc(i,s),i!==2&&(s=yn,yn=l,s!==null&&fm(s)),i}function fm(i){yn===null?yn=i:yn.push.apply(yn,i)}function O9(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var f=0;f<l.length;f++){var E=l[f],b=E.getSnapshot;E=E.value;try{if(!er(b(),E))return!1}catch(_){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function bi(i,s){for(s&=~am,s&=~vc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Zn(s),f=1<<l;i[l]=-1,s&=~f}}function Hw(i){if((Je&6)!==0)throw Error(n(327));ys();var s=Bl(i,0);if((s&1)===0)return bn(i,_t()),null;var l=Oc(i,s);if(i.tag!==0&&l===2){var f=Vh(i);f!==0&&(s=f,l=dm(i,f))}if(l===1)throw l=Za,io(i,0),bi(i,s),bn(i,_t()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,oo(i,yn,zr),bn(i,_t()),null}function hm(i,s){var l=Je;Je|=1;try{return i(s)}finally{Je=l,Je===0&&(Es=_t()+500,rc&&fi())}}function ro(i){Ei!==null&&Ei.tag===0&&(Je&6)===0&&ys();var s=Je;Je|=1;var l=zn.transition,f=nt;try{if(zn.transition=null,nt=1,i)return i()}finally{nt=f,zn.transition=l,Je=s,(Je&6)===0&&fi()}}function pm(){Nn=gs.current,ct(gs)}function io(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,s9(l)),Nt!==null)for(l=Nt.return;l!==null;){var f=l;switch(_p(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&tc();break;case 3:hs(),ct(mn),ct(Xt),Mp();break;case 5:Lp(f);break;case 4:hs();break;case 13:ct(gt);break;case 19:ct(gt);break;case 10:Np(f.type._context);break;case 22:case 23:pm()}l=l.return}if(Ht=i,Nt=i=Ti(i.current,null),qt=Nn=s,Pt=0,Za=null,am=vc=no=0,yn=eu=null,Zi!==null){for(s=0;s<Zi.length;s++)if(l=Zi[s],f=l.interleaved,f!==null){l.interleaved=null;var E=f.next,b=l.pending;if(b!==null){var _=b.next;b.next=E,f.next=_}l.pending=f}Zi=null}return i}function zw(i,s){do{var l=Nt;try{if(kp(),hc.current=Ec,pc){for(var f=Et.memoizedState;f!==null;){var E=f.queue;E!==null&&(E.pending=null),f=f.next}pc=!1}if(to=0,Ut=Rt=Et=null,Wa=!1,Ga=0,sm.current=null,l===null||l.return===null){Pt=1,Za=s,Nt=null;break}e:{var b=i,_=l.return,L=l,U=s;if(s=qt,L.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,fe=L,me=fe.tag;if((fe.mode&1)===0&&(me===0||me===11||me===15)){var le=fe.alternate;le?(fe.updateQueue=le.updateQueue,fe.memoizedState=le.memoizedState,fe.lanes=le.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var _e=fw(_);if(_e!==null){_e.flags&=-257,hw(_e,_,L,b,s),_e.mode&1&&dw(b,Z,s),s=_e,U=Z;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(U),s.updateQueue=ke}else Ae.add(U);break e}else{if((s&1)===0){dw(b,Z,s),mm();break e}U=Error(n(426))}}else if(pt&&L.mode&1){var vt=fw(_);if(vt!==null){(vt.flags&65536)===0&&(vt.flags|=256),hw(vt,_,L,b,s),Ap(ps(U,L));break e}}b=U=ps(U,L),Pt!==4&&(Pt=2),eu===null?eu=[b]:eu.push(b),b=_;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var q=lw(b,U,s);Mx(b,q);break e;case 1:L=U;var j=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(gi===null||!gi.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var be=cw(b,L,s);Mx(b,be);break e}}b=b.return}while(b!==null)}Vw(l)}catch(Ne){s=Ne,Nt===l&&l!==null&&(Nt=l=l.return);continue}break}while(!0)}function jw(){var i=_c.current;return _c.current=Ec,i===null?Ec:i}function mm(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Ht===null||(no&268435455)===0&&(vc&268435455)===0||bi(Ht,qt)}function Oc(i,s){var l=Je;Je|=2;var f=jw();(Ht!==i||qt!==s)&&(zr=null,io(i,s));do try{I9();break}catch(E){zw(i,E)}while(!0);if(kp(),Je=l,_c.current=f,Nt!==null)throw Error(n(261));return Ht=null,qt=0,Pt}function I9(){for(;Nt!==null;)$w(Nt)}function R9(){for(;Nt!==null&&!rM();)$w(Nt)}function $w(i){var s=Ww(i.alternate,i,Nn);i.memoizedProps=i.pendingProps,s===null?Vw(i):Nt=s,sm.current=null}function Vw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=v9(l,s,Nn),l!==null){Nt=l;return}}else{if(l=S9(l,s),l!==null){l.flags&=32767,Nt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Pt=6,Nt=null;return}}if(s=s.sibling,s!==null){Nt=s;return}Nt=s=i}while(s!==null);Pt===0&&(Pt=5)}function oo(i,s,l){var f=nt,E=zn.transition;try{zn.transition=null,nt=1,P9(i,s,l,f)}finally{zn.transition=E,nt=f}return null}function P9(i,s,l,f){do ys();while(Ei!==null);if((Je&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(hM(i,b),i===Ht&&(Nt=Ht=null,qt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Ac||(Ac=!0,Gw(Ll,function(){return ys(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=zn.transition,zn.transition=null;var _=nt;nt=1;var L=Je;Je|=4,sm.current=null,C9(i,l),Lw(l,i),ZM(mp),zl=!!pp,mp=pp=null,i.current=l,k9(l),iM(),Je=L,nt=_,zn.transition=b}else i.current=l;if(Ac&&(Ac=!1,Ei=i,Cc=E),b=i.pendingLanes,b===0&&(gi=null),aM(l.stateNode),bn(i,_t()),s!==null)for(f=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],f(E.value,{componentStack:E.stack,digest:E.digest});if(Sc)throw Sc=!1,i=lm,lm=null,i;return(Cc&1)!==0&&i.tag!==0&&ys(),b=i.pendingLanes,(b&1)!==0?i===cm?tu++:(tu=0,cm=i):tu=0,fi(),null}function ys(){if(Ei!==null){var i=RT(Cc),s=zn.transition,l=nt;try{if(zn.transition=null,nt=16>i?16:i,Ei===null)var f=!1;else{if(i=Ei,Ei=null,Cc=0,(Je&6)!==0)throw Error(n(331));var E=Je;for(Je|=4,ve=i.current;ve!==null;){var b=ve,_=b.child;if((ve.flags&16)!==0){var L=b.deletions;if(L!==null){for(var U=0;U<L.length;U++){var Z=L[U];for(ve=Z;ve!==null;){var fe=ve;switch(fe.tag){case 0:case 11:case 15:Ja(8,fe,b)}var me=fe.child;if(me!==null)me.return=fe,ve=me;else for(;ve!==null;){fe=ve;var le=fe.sibling,_e=fe.return;if(Nw(fe),fe===Z){ve=null;break}if(le!==null){le.return=_e,ve=le;break}ve=_e}}}var Ae=b.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var vt=ke.sibling;ke.sibling=null,ke=vt}while(ke!==null)}}ve=b}}if((b.subtreeFlags&2064)!==0&&_!==null)_.return=b,ve=_;else e:for(;ve!==null;){if(b=ve,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Ja(9,b,b.return)}var q=b.sibling;if(q!==null){q.return=b.return,ve=q;break e}ve=b.return}}var j=i.current;for(ve=j;ve!==null;){_=ve;var Q=_.child;if((_.subtreeFlags&2064)!==0&&Q!==null)Q.return=_,ve=Q;else e:for(_=j;ve!==null;){if(L=ve,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:wc(9,L)}}catch(Ne){bt(L,L.return,Ne)}if(L===_){ve=null;break e}var be=L.sibling;if(be!==null){be.return=L.return,ve=be;break e}ve=L.return}}if(Je=E,fi(),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(Dl,i)}catch(Ne){}f=!0}return f}finally{nt=l,zn.transition=s}}return!1}function qw(i,s,l){s=ps(l,s),s=lw(i,s,1),i=pi(i,s,1),s=on(),i!==null&&(Sa(i,1,s),bn(i,s))}function bt(i,s,l){if(i.tag===3)qw(i,i,l);else for(;s!==null;){if(s.tag===3){qw(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(gi===null||!gi.has(f))){i=ps(l,i),i=cw(s,i,1),s=pi(s,i,1),i=on(),s!==null&&(Sa(s,1,i),bn(s,i));break}}s=s.return}}function L9(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=on(),i.pingedLanes|=i.suspendedLanes&l,Ht===i&&(qt&l)===l&&(Pt===4||Pt===3&&(qt&130023424)===qt&&500>_t()-um?io(i,0):am|=l),bn(i,s)}function Yw(i,s){s===0&&((i.mode&1)===0?s=1:(s=Fl,Fl<<=1,(Fl&130023424)===0&&(Fl=4194304)));var l=on();i=Br(i,s),i!==null&&(Sa(i,s,l),bn(i,l))}function D9(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Yw(i,l)}function M9(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Yw(i,l)}var Ww;Ww=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||mn.current)En=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return En=!1,_9(i,s,l);En=(i.flags&131072)!==0}else En=!1,pt&&(s.flags&1048576)!==0&&Ax(s,oc,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;Tc(i,s),i=s.pendingProps;var E=ss(s,Xt.current);fs(s,l),E=Up(null,s,f,i,E,l);var b=Hp();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gn(f)?(b=!0,nc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Rp(s),E.updater=yc,s.stateNode=E,E._reactInternals=s,Yp(s,f,i,l),s=Qp(null,s,f,!0,b,l)):(s.tag=0,pt&&b&&wp(s),rn(null,s,E,l),s=s.child),s;case 16:f=s.elementType;e:{switch(Tc(i,s),i=s.pendingProps,E=f._init,f=E(f._payload),s.type=f,E=s.tag=B9(f),i=nr(f,i),E){case 0:s=Kp(null,s,f,i,l);break e;case 1:s=bw(null,s,f,i,l);break e;case 11:s=pw(null,s,f,i,l);break e;case 14:s=mw(null,s,f,nr(f.type,i),l);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),Kp(i,s,f,E,l);case 1:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),bw(i,s,f,E,l);case 3:e:{if(Tw(s),i===null)throw Error(n(387));f=s.pendingProps,b=s.memoizedState,E=b.element,Dx(i,s),dc(s,f,null,l);var _=s.memoizedState;if(f=_.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=ps(Error(n(423)),s),s=xw(i,s,f,l,E);break e}else if(f!==E){E=ps(Error(n(424)),s),s=xw(i,s,f,l,E);break e}else for(kn=li(s.stateNode.containerInfo.firstChild),Cn=s,pt=!0,tr=null,l=Px(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ls(),f===E){s=Hr(i,s,l);break e}rn(i,s,f,l)}s=s.child}return s;case 5:return Bx(s),i===null&&Sp(s),f=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,_=E.children,gp(f,E)?_=null:b!==null&&gp(f,b)&&(s.flags|=32),yw(i,s),rn(i,s,_,l),s.child;case 6:return i===null&&Sp(s),null;case 13:return ww(i,s,l);case 4:return Pp(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=cs(s,null,f,l):rn(i,s,f,l),s.child;case 11:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),pw(i,s,f,E,l);case 7:return rn(i,s,s.pendingProps,l),s.child;case 8:return rn(i,s,s.pendingProps.children,l),s.child;case 12:return rn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,E=s.pendingProps,b=s.memoizedProps,_=E.value,at(uc,f._currentValue),f._currentValue=_,b!==null)if(er(b.value,_)){if(b.children===E.children&&!mn.current){s=Hr(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){_=b.child;for(var U=L.firstContext;U!==null;){if(U.context===f){if(b.tag===1){U=Ur(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var fe=Z.pending;fe===null?U.next=U:(U.next=fe.next,fe.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),Op(b.return,l,s),L.lanes|=l;break}U=U.next}}else if(b.tag===10)_=b.type===s.type?null:b.child;else if(b.tag===18){if(_=b.return,_===null)throw Error(n(341));_.lanes|=l,L=_.alternate,L!==null&&(L.lanes|=l),Op(_,l,s),_=b.sibling}else _=b.child;if(_!==null)_.return=b;else for(_=b;_!==null;){if(_===s){_=null;break}if(b=_.sibling,b!==null){b.return=_.return,_=b;break}_=_.return}b=_}rn(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,f=s.pendingProps.children,fs(s,l),E=Un(E),f=f(E),s.flags|=1,rn(i,s,f,l),s.child;case 14:return f=s.type,E=nr(f,s.pendingProps),E=nr(f.type,E),mw(i,s,f,E,l);case 15:return gw(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),Tc(i,s),s.tag=1,gn(f)?(i=!0,nc(s)):i=!1,fs(s,l),aw(s,f,E),Yp(s,f,E,l),Qp(null,s,f,!0,i,l);case 19:return vw(i,s,l);case 22:return Ew(i,s,l)}throw Error(n(156,s.tag))};function Gw(i,s){return CT(i,s)}function F9(i,s,l,f){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(i,s,l,f){return new F9(i,s,l,f)}function gm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function B9(i){if(typeof i=="function")return gm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===te)return 14}return 2}function Ti(i,s){var l=i.alternate;return l===null?(l=jn(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Ic(i,s,l,f,E,b){var _=2;if(f=i,typeof i=="function")gm(i)&&(_=1);else if(typeof i=="string")_=5;else e:switch(i){case K:return so(l.children,E,b,s);case de:_=8,E|=8;break;case ge:return i=jn(12,l,s,E|2),i.elementType=ge,i.lanes=b,i;case ee:return i=jn(13,l,s,E),i.elementType=ee,i.lanes=b,i;case re:return i=jn(19,l,s,E),i.elementType=re,i.lanes=b,i;case oe:return Rc(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:_=10;break e;case ue:_=9;break e;case he:_=11;break e;case te:_=14;break e;case Te:_=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=jn(_,l,s,E),s.elementType=i,s.type=f,s.lanes=b,s}function so(i,s,l,f){return i=jn(7,i,f,s),i.lanes=l,i}function Rc(i,s,l,f){return i=jn(22,i,f,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function Em(i,s,l){return i=jn(6,i,null,s),i.lanes=l,i}function ym(i,s,l){return s=jn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function U9(i,s,l,f,E){this.tag=s,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=qh(0),this.expirationTimes=qh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qh(0),this.identifierPrefix=f,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function bm(i,s,l,f,E,b,_,L,U){return i=new U9(i,s,l,L,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=jn(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rp(b),i}function H9(i,s,l){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:f==null?null:""+f,children:i,containerInfo:s,implementation:l}}function Kw(i){if(!i)return di;i=i._reactInternals;e:{if(Gi(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(gn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(gn(l))return _x(i,l,s)}return s}function Qw(i,s,l,f,E,b,_,L,U){return i=bm(l,f,!0,i,E,b,_,L,U),i.context=Kw(null),l=i.current,f=on(),E=yi(l),b=Ur(f,E),b.callback=s!=null?s:null,pi(l,b,E),i.current.lanes=E,Sa(i,E,f),bn(i,f),i}function Pc(i,s,l,f){var E=s.current,b=on(),_=yi(E);return l=Kw(l),s.context===null?s.context=l:s.pendingContext=l,s=Ur(b,_),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=pi(E,s,_),i!==null&&(or(i,E,_,b),cc(i,E,_)),_}function Lc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Xw(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Tm(i,s){Xw(i,s),(i=i.alternate)&&Xw(i,s)}function z9(){return null}var Jw=typeof reportError=="function"?reportError:function(i){console.error(i)};function xm(i){this._internalRoot=i}Dc.prototype.render=xm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Pc(i,s,null,null)},Dc.prototype.unmount=xm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ro(function(){Pc(null,i,null,null)}),s[Lr]=null}};function Dc(i){this._internalRoot=i}Dc.prototype.unstable_scheduleHydration=function(i){if(i){var s=DT();i={blockedOn:null,target:i,priority:s};for(var l=0;l<si.length&&s!==0&&s<si[l].priority;l++);si.splice(l,0,i),l===0&&BT(i)}};function wm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Mc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Zw(){}function j9(i,s,l,f,E){if(E){if(typeof f=="function"){var b=f;f=function(){var Z=Lc(_);b.call(Z)}}var _=Qw(s,f,i,0,null,!1,!1,"",Zw);return i._reactRootContainer=_,i[Lr]=_.current,Ua(i.nodeType===8?i.parentNode:i),ro(),_}for(;E=i.lastChild;)i.removeChild(E);if(typeof f=="function"){var L=f;f=function(){var Z=Lc(U);L.call(Z)}}var U=bm(i,0,!1,null,null,!1,!1,"",Zw);return i._reactRootContainer=U,i[Lr]=U.current,Ua(i.nodeType===8?i.parentNode:i),ro(function(){Pc(s,U,l,f)}),U}function Fc(i,s,l,f,E){var b=l._reactRootContainer;if(b){var _=b;if(typeof E=="function"){var L=E;E=function(){var U=Lc(_);L.call(U)}}Pc(s,_,i,E)}else _=j9(l,s,i,E,f);return Lc(_)}PT=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=va(s.pendingLanes);l!==0&&(Yh(s,l|1),bn(s,_t()),(Je&6)===0&&(Es=_t()+500,fi()))}break;case 13:ro(function(){var f=Br(i,1);if(f!==null){var E=on();or(f,i,1,E)}}),Tm(i,1)}},Wh=function(i){if(i.tag===13){var s=Br(i,134217728);if(s!==null){var l=on();or(s,i,134217728,l)}Tm(i,134217728)}},LT=function(i){if(i.tag===13){var s=yi(i),l=Br(i,s);if(l!==null){var f=on();or(l,i,s,f)}Tm(i,s)}},DT=function(){return nt},MT=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},Uh=function(i,s,l){switch(s){case"input":if(Wo(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var f=l[s];if(f!==i&&f.form===i.form){var E=ec(f);if(!E)throw Error(n(90));Yi(f),Wo(f,E)}}}break;case"textarea":Ol(i,l);break;case"select":s=l.value,s!=null&&ti(i,!!l.multiple,s,!1)}},TT=hm,xT=ro;var $9={usingClientEntryPoint:!1,Events:[ja,is,ec,yT,bT,hm]},nu={findFiberByHostInstance:Ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},V9={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ST(i),i===null?null:i.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||z9,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 Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{Dl=Bc.inject(V9),xr=Bc}catch(i){}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$9,ln.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wm(s))throw Error(n(200));return H9(i,s,null,l)},ln.createRoot=function(i,s){if(!wm(i))throw Error(n(299));var l=!1,f="",E=Jw;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=bm(i,1,!1,null,null,l,!1,f,E),i[Lr]=s.current,Ua(i.nodeType===8?i.parentNode:i),new xm(s)},ln.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=ST(s),i=i===null?null:i.stateNode,i},ln.flushSync=function(i){return ro(i)},ln.hydrate=function(i,s,l){if(!Mc(s))throw Error(n(200));return Fc(null,i,s,!0,l)},ln.hydrateRoot=function(i,s,l){if(!wm(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,E=!1,b="",_=Jw;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(_=l.onRecoverableError)),s=Qw(s,null,i,1,l!=null?l:null,E,!1,b,_),i[Lr]=s.current,Ua(i),f)for(i=0;i<f.length;i++)l=f[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new Dc(s)},ln.render=function(i,s,l){if(!Mc(s))throw Error(n(200));return Fc(null,i,s,!1,l)},ln.unmountComponentAtNode=function(i){if(!Mc(i))throw Error(n(40));return i._reactRootContainer?(ro(function(){Fc(null,null,i,!1,function(){i._reactRootContainer=null,i[Lr]=null})}),!0):!1},ln.unstable_batchedUpdates=hm,ln.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!Mc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Fc(i,s,l,!1,f)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var H0;function z0(){if(H0)return Sd.exports;H0=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(),Sd.exports=RS(),Sd.exports}var Is=z0();function j0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=j0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=j0(e))&&(r&&(r+=" "),r+=t);return r}var $0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},V0=wi.createContext&&wi.createContext($0),PS=["attr","size","title"];function LS(e,t){if(e==null)return{};var n=DS(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DS(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 Cu(){return Cu=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},Cu.apply(this,arguments)}function q0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ku(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(n),!0).forEach(function(r){MS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MS(e,t,n){return t=FS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FS(e){var t=BS(e,"string");return typeof t=="symbol"?t:t+""}function BS(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 Y0(e){return e&&e.map((t,n)=>wi.createElement(t.tag,ku({key:n},t.attr),Y0(t.child)))}function mt(e){return t=>wi.createElement(US,Cu({attr:ku({},e.attr)},t),Y0(e.child))}function US(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=LS(e,PS),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),wi.createElement("svg",Cu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:ku(ku({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&wi.createElement("title",null,a),e.children)};return V0!==void 0?wi.createElement(V0.Consumer,null,n=>t(n)):t($0)}function HS(e){return mt({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 zS(e){return mt({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 jS(e){return mt({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ur=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:$(e,`${D}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:$(`${D}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),$S="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",VS=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=At(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?w.jsx(jS,{className:$(t,`${D}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||$S,alt:"Copilot",className:$(t,`${D}-minimized-icon-img`)});return w.jsx(ur,{className:$(t,`${D}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},qS=()=>{const{globalClassName:e,themeVariables:t}=At(),n=()=>{Su(!1),Ci(!0)};return Is.createPortal(w.jsx("div",{className:$(e,`${D}-minimized-container`),style:t,children:w.jsx(VS,{onClick:n})}),document.body)};function YS(e){return mt({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 Yn(){const e=J.useContext(N0);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const WS=e=>({[`${Ar}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Ar}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem"});function GS(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function W0(e){return mt({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 KS(e){return mt({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 G0(e){return mt({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 QS(e){return mt({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 XS(e){return mt({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 JS(e){return mt({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 ZS(e){return mt({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 eA(e){return mt({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 tA(e){return mt({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 K0(e){return mt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const Nu=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>w.jsx("button",{className:$(`${D}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),nA=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:$(`${D}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(G0,{size:"16px"})},rA=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(ur,{className:$(e,n,`cim-${r}-component`,`${D}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:w.jsx(G0,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(Nu,{className:$(e,n,`cim-${r}-component`,`${D}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&w.jsx(nA,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function xF(){}function wF(){}function Q0(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function X0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sA={};function J0(e,t){return(sA.jsx?oA:iA).test(e)}const aA=/[ \t\n\f\r]/g;function uA(e){return typeof e=="object"?e.type==="text"?Z0(e.value):!1:Z0(e)}function Z0(e){return e.replace(aA,"")===""}let Rs=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Rs.prototype.normal={},Rs.prototype.property={},Rs.prototype.space=void 0;function eg(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Rs(n,r,t)}function Ps(e){return e.toLowerCase()}let cn=class{constructor(t,n){this.attribute=n,this.property=t}};cn.prototype.attribute="",cn.prototype.booleanish=!1,cn.prototype.boolean=!1,cn.prototype.commaOrSpaceSeparated=!1,cn.prototype.commaSeparated=!1,cn.prototype.defined=!1,cn.prototype.mustUseProperty=!1,cn.prototype.number=!1,cn.prototype.overloadedBoolean=!1,cn.prototype.property="",cn.prototype.spaceSeparated=!1,cn.prototype.space=void 0;let lA=0;const je=Ni(),Ct=Ni(),kd=Ni(),Ee=Ni(),ot=Ni(),po=Ni(),Tn=Ni();function Ni(){return ru(2,++lA)}const Nd=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Ct,commaOrSpaceSeparated:Tn,commaSeparated:po,number:Ee,overloadedBoolean:kd,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),Od=Object.keys(Nd);let Id=class extends cn{constructor(t,n,r,o){let a=-1;if(super(t,n),tg(this,"space",o),typeof r=="number")for(;++a<Od.length;){const u=Od[a];tg(this,Od[a],(r&Nd[u])===Nd[u])}}};Id.prototype.defined=!0;function tg(e,t,n){n&&(e[t]=n)}function mo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Id(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ps(r)]=r,n[Ps(a.attribute)]=r}return new Rs(t,n,e.space)}const ng=mo({properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:ot,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:Ee,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:ot,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ct,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rg(e,t){return t in e?e[t]:t}function ig(e,t){return rg(e,t.toLowerCase())}const cA=mo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:po,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ot,autoFocus:je,autoPlay:je,blocking:ot,capture:null,charSet:null,checked:je,cite:null,className:ot,cols:Ee,colSpan:null,content:null,contentEditable:Ct,controls:je,controlsList:ot,coords:Ee|po,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:kd,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:ot,height:Ee,hidden:kd,high:Ee,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ot,itemRef:ot,itemScope:je,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,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:Ee,pattern:null,ping:ot,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ot,required:je,reversed:je,rows:Ee,rowSpan:Ee,sandbox:ot,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Ct,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,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:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:ig}),dA=mo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Tn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:ot,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:po,g2:po,glyphName:po,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:Tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tn,rev:Tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tn,requiredFeatures:Tn,requiredFonts:Tn,requiredFormats:Tn,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:Tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rg}),og=mo({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()}}),sg=mo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ig}),ag=mo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fA={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"},hA=/[A-Z]/g,ug=/-[a-z]/g,pA=/^data[-\w.:]+$/i;function Rd(e,t){const n=Ps(t);let r=t,o=cn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ug,gA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ug.test(a)){let u=a.replace(hA,mA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Id}return new o(r,t)}function mA(e){return"-"+e.toLowerCase()}function gA(e){return e.charAt(1).toUpperCase()}const Ou=eg([ng,cA,og,sg,ag],"html"),go=eg([ng,dA,og,sg,ag],"svg");function lg(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function cg(e){return e.join(" ").trim()}var Eo={},Pd,dg;function EA(){if(dg)return Pd;dg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
24
|
-
`,h="/",p="*",g="",T="comment",y="declaration";Pd=function(v,S){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];S=S||{};var A=1,O=1;function R(ee){var re=ee.match(t);re&&(A+=re.length);var te=ee.lastIndexOf(d);O=~te?ee.length-te:O+ee.length}function H(){var ee={line:A,column:O};return function(re){return re.position=new W(ee),de(),re}}function W(ee){this.start=ee,this.end={line:A,column:O},this.source=S.source}W.prototype.content=v;function F(ee){var re=new Error(S.source+":"+A+":"+O+": "+ee);if(re.reason=ee,re.filename=S.source,re.line=A,re.column=O,re.source=v,!S.silent)throw re}function K(ee){var re=ee.exec(v);if(re){var te=re[0];return R(te),v=v.slice(te.length),re}}function de(){K(n)}function ge(ee){var re;for(ee=ee||[];re=z();)re!==!1&&ee.push(re);return ee}function z(){var ee=H();if(!(h!=v.charAt(0)||p!=v.charAt(1))){for(var re=2;g!=v.charAt(re)&&(p!=v.charAt(re)||h!=v.charAt(re+1));)++re;if(re+=2,g===v.charAt(re-1))return F("End of comment missing");var te=v.slice(2,re-2);return O+=2,R(te),v=v.slice(re),O+=2,ee({type:T,comment:te})}}function ue(){var ee=H(),re=K(r);if(re){if(z(),!K(o))return F("property missing ':'");var te=K(a),Te=ee({type:y,property:x(re[0].replace(e,g)),value:te?x(te[0].replace(e,g)):g});return K(u),Te}}function he(){var ee=[];ge(ee);for(var re;re=ue();)re!==!1&&(ee.push(re),ge(ee));return ee}return de(),he()};function x(v){return v?v.replace(c,g):g}return Pd}var fg;function yA(){if(fg)return Eo;fg=1;var e=Eo&&Eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.default=n;var t=e(EA());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?o(h,p,d):p&&(a=a||{},a[h]=p)}}),a}return Eo}var Ls={},hg;function bA(){if(hg)return Ls;hg=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return Ls.camelCase=d,Ls}var Ds,pg;function TA(){if(pg)return Ds;pg=1;var e=Ds&&Ds.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(yA()),n=bA();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Ds=r,Ds}var xA=TA();const wA=We(xA),Iu=mg("end"),lr=mg("start");function mg(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 gg(e){const t=lr(e),n=Iu(e);if(t&&n)return{start:t,end:n}}function Ms(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Eg(e.position):"start"in e||"end"in e?Eg(e):"line"in e||"column"in e?Ld(e):""}function Ld(e){return yg(e&&e.line)+":"+yg(e&&e.column)}function Eg(e){return Ld(e&&e.start)+"-"+Ld(e&&e.end)}function yg(e){return e&&typeof e=="number"?e:1}class Wt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",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=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=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 c=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=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=Ms(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,this.expected,this.note,this.url}}Wt.prototype.file="",Wt.prototype.name="",Wt.prototype.reason="",Wt.prototype.message="",Wt.prototype.stack="",Wt.prototype.column=void 0,Wt.prototype.line=void 0,Wt.prototype.ancestors=void 0,Wt.prototype.cause=void 0,Wt.prototype.fatal=void 0,Wt.prototype.place=void 0,Wt.prototype.ruleId=void 0,Wt.prototype.source=void 0;const Dd={}.hasOwnProperty,_A=new Map,vA=/[A-Z]/g,SA=new Set(["table","tbody","thead","tfoot","tr"]),AA=new Set(["td","th"]),bg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function CA(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=DA(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=LA(n,t.jsx,t.jsxs)}const o={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"?go:Ou,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Tg(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Tg(e,t,n){if(t.type==="element")return kA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return NA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return IA(e,t,n);if(t.type==="mdxjsEsm")return OA(e,t);if(t.type==="root")return RA(e,t,n);if(t.type==="text")return PA(e,t)}function kA(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=go,e.schema=o),e.ancestors.push(t);const a=wg(e,t.tagName,!1),u=MA(e,t);let c=Fd(e,t);return SA.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!uA(d):!0})),xg(e,u,a,t),Md(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function NA(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)}Fs(e,t.position)}function OA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fs(e,t.position)}function IA(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=go,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:wg(e,t.name,!0),u=FA(e,t),c=Fd(e,t);return xg(e,u,a,t),Md(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function RA(e,t,n){const r={};return Md(r,Fd(e,t)),e.create(t,e.Fragment,r,n)}function PA(e,t){return t.value}function xg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Md(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function LA(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function DA(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=lr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function MA(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Dd.call(t.properties,o)){const a=BA(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&AA.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function FA(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 c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Fs(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Fs(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Fd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_A;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 h=o.get(d)||0;u=d+"-"+h,o.set(d,h+1)}}const c=Tg(e,a,u);c!==void 0&&n.push(c)}return n}function BA(e,t,n){const r=Rd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?X0(n):cg(n)),r.property==="style"){let o=typeof n=="object"?n:UA(e,String(n));return e.stylePropertyNameCase==="css"&&(o=HA(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?fA[r.property]||r.property:r.attribute,n]}}function UA(e,t){try{return wA(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Wt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=bg+"#cannot-parse-style-attribute",o}}function wg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=J0(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=J0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Dd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fs(e)}function Fs(e,t){const n=new Wt("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=bg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function HA(e){const t={};let n;for(n in e)Dd.call(e,n)&&(t[zA(n)]=e[n]);return t}function zA(e){let t=e.replace(vA,jA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jA(e){return"-"+e.toLowerCase()}const Bd={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"]},$A={};function Ud(e,t){const n=$A,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _g(e,r,o)}function _g(e,t,n){if(VA(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 vg(e.children,t,n)}return Array.isArray(e)?vg(e,t,n):""}function vg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=_g(e[o],t,n);return r.join("")}function VA(e){return!!(e&&typeof e=="object")}const Sg=document.createElement("i");function Hd(e){const t="&"+e+";";Sg.innerHTML=t;const n=Sg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o: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 Rn(e,t){return e.length>0?(xn(e,e.length,0,t),e):t}const Ag={}.hasOwnProperty;function Cg(e){const t={};let n=-1;for(;++n<e.length;)qA(t,e[n]);return t}function qA(e,t){let n;for(n in t){const o=(Ag.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){Ag.call(o,u)||(o[u]=[]);const c=a[u];YA(o[u],Array.isArray(c)?c:c?[c]:[])}}}function YA(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xn(e,0,0,r)}function kg(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 Wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=qr(/[A-Za-z]/),Gt=qr(/[\dA-Za-z]/),WA=qr(/[#-'*+\--9=?A-Z^-~]/);function Ru(e){return e!==null&&(e<32||e===127)}const zd=qr(/\d/),GA=qr(/[\dA-Fa-f]/),KA=qr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function it(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Pu=qr(new RegExp("\\p{P}|\\p{S}","u")),Oi=qr(/\s/);function qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function yo(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Gt(e.charCodeAt(n+1))&&Gt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const QA={tokenize:XA};function XA(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const JA={tokenize:ZA},Ng={tokenize:eC};function ZA(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,h)(R)}return h(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&O();const H=t.events.length;let W=H,F;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){F=t.events[W][1].end;break}A(r);let K=H;for(;K<t.events.length;)t.events[K][1].end=B({},F),K++;return xn(t.events,W+1,0,t.events.slice(H)),t.events.length=K,h(R)}return c(R)}function h(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return x(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ng,p,g)(R)}function p(R){return o&&O(),A(r),T(R)}function g(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(R)}function T(R){return t.containerState={},e.attempt(Ng,y,x)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function x(R){if(R===null){o&&O(),A(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(R)}function v(R){if(R===null){S(e.exit("chunkFlow"),!0),A(0),e.consume(R);return}return Le(R)?(e.consume(R),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),v)}function S(R,H){const W=t.sliceStream(R);if(H&&W.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(W),t.parser.lazy[R.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<u&&(!o.events[F][1].end||o.events[F][1].end.offset>u))return;const K=t.events.length;let de=K,ge,z;for(;de--;)if(t.events[de][0]==="exit"&&t.events[de][1].type==="chunkFlow"){if(ge){z=t.events[de][1].end;break}ge=!0}for(A(r),F=K;F<t.events.length;)t.events[F][1].end=B({},z),F++;xn(t.events,de+1,0,t.events.slice(K)),t.events.length=F}}function A(R){let H=n.length;for(;H-- >R;){const W=n[H];t.containerState=W[1],W[0].exit.call(t,e)}n.length=R}function O(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function eC(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function bo(e){if(e===null||it(e)||Oi(e))return 1;if(Pu(e))return 2}function Lu(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const jd={name:"attention",resolveAll:tC,tokenize:nC};function tC(e,t){let n=-1,r,o,a,u,c,d,h,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 g=B({},e[r][1].end),T=B({},e[n][1].start);Og(g,-d),Og(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:B({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},c.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Rn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Rn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Rn(h,Lu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Rn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,xn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function nC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=bo(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),p=bo(d),g=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?g:g&&(o||!T)),h._close=!!(a===42?T:T&&(p||!g)),t(d)}}function Og(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const rC={name:"autolink",tokenize:iC};function iC(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return nn(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||Gt(y)?(r=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Gt(y))&&r++<32?(e.consume(y),c):(r=0,h(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||Ru(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):WA(y)?(e.consume(y),h):n(y)}function p(y){return Gt(y)?g(y):n(y)}function g(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||Gt(y))&&r++<63){const x=y===45?T:g;return e.consume(y),x}return n(y)}}const Bs={partial:!0,tokenize:oC};function oC(e,t,n){return r;function r(a){return Ge(a)?Qe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const Ig={continuation:{tokenize:aC},exit:uC,name:"blockQuote",tokenize:sC};function sC(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ge(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function aC(e,t,n){const r=this;return o;function o(u){return Ge(u)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Ig,t,n)(u)}}function uC(e){e.exit("blockQuote")}const Rg={name:"characterEscape",tokenize:lC};function lC(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return KA(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Pg={name:"characterReference",tokenize:cC};function cC(e,t,n){const r=this;let o=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=Gt,p(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=GA,p):(e.enter("characterReferenceValue"),a=7,u=zd,p(g))}function p(g){if(g===59&&o){const T=e.exit("characterReferenceValue");return u===Gt&&!Hd(r.sliceSerialize(T))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<a?(e.consume(g),p):n(g)}}const Lg={partial:!0,tokenize:fC},Dg={concrete:!0,name:"codeFenced",tokenize:dC};function dC(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const K=r.events[r.events.length-1];return a=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(F)}function p(F){return F===c?(u++,e.consume(F),p):u<3?n(F):(e.exit("codeFencedFenceSequence"),Ge(F)?Qe(e,g,"whitespace")(F):g(F))}function g(F){return F===null||Le(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(Lg,v,H)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(F))}function T(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Ge(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),T)}function y(F){return F===null||Le(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(F))}function x(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(F)):F===96&&F===c?n(F):(e.consume(F),x)}function v(F){return e.attempt(o,H,S)(F)}function S(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),A}function A(F){return a>0&&Ge(F)?Qe(e,O,"linePrefix",a+1)(F):O(F)}function O(F){return F===null||Le(F)?e.check(Lg,v,H)(F):(e.enter("codeFlowValue"),R(F))}function R(F){return F===null||Le(F)?(e.exit("codeFlowValue"),O(F)):(e.consume(F),R)}function H(F){return e.exit("codeFenced"),t(F)}function W(F,K,de){let ge=0;return z;function z(te){return F.enter("lineEnding"),F.consume(te),F.exit("lineEnding"),ue}function ue(te){return F.enter("codeFencedFence"),Ge(te)?Qe(F,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):he(te)}function he(te){return te===c?(F.enter("codeFencedFenceSequence"),ee(te)):de(te)}function ee(te){return te===c?(ge++,F.consume(te),ee):ge>=u?(F.exit("codeFencedFenceSequence"),Ge(te)?Qe(F,re,"whitespace")(te):re(te)):de(te)}function re(te){return te===null||Le(te)?(F.exit("codeFencedFence"),K(te)):de(te)}}}function fC(e,t,n){const r=this;return o;function o(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 $d={name:"codeIndented",tokenize:pC},hC={partial:!0,tokenize:mC};function pC(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Le(h)?e.attempt(hC,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function mC(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Qe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const gC={name:"codeText",previous:yC,resolve:EC,tokenize:bC};function EC(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function yC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bC(e,t,n){let r=0,o,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),o=0,p(g)):Le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Le(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function p(g){return g===96?(e.consume(g),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",h(g))}}class TC{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 o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Us(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),Us(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Us(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);Us(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Us(this.left,n.reverse())}}}function Us(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 Mg(e){const t={};let n=-1,r,o,a,u,c,d,h;const p=new TC(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,xC(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function xC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,g,T=-1,y=n,x=0,v=0;const S=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(v=T+1,S.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):S.pop(),T=S.length;T--;){const A=c.slice(S[T],S[T+1]),O=a.pop();d.push([O,O+A.length-1]),e.splice(O,2,A)}for(d.reverse(),T=-1;++T<d.length;)h[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return h}const wC={resolve:vC,tokenize:SC},_C={partial:!0,tokenize:AC};function vC(e){return Mg(e),e}function SC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(_C,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function AC(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function Fg(e,t,n,r,o,a,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(A){return A===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(A),e.exit(a),T):A===null||A===32||A===41||Ru(A)?n(A):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(A))}function T(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===62?(e.exit("chunkString"),e.exit(c),T(A)):A===null||A===60||Le(A)?n(A):(e.consume(A),A===92?x:y)}function x(A){return A===60||A===62||A===92?(e.consume(A),y):y(A)}function v(A){return!p&&(A===null||A===41||it(A))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(A)):p<h&&A===40?(e.consume(A),p++,v):A===41?(e.consume(A),p--,v):A===null||A===32||A===40||Ru(A)?n(A):(e.consume(A),A===92?S:v)}function S(A){return A===40||A===41||A===92?(e.consume(A),v):v(A)}}function Bg(e,t,n,r,o,a){const u=this;let c=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||Le(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ge(y)),y===92?T:g)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function Ug(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),h(T))}function h(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Qe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),h(T)):(e.consume(T),T===92?g:p)}function g(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Hs(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ge(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const CC={name:"definition",tokenize:NC},kC={partial:!0,tokenize:OC};function NC(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return Bg.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=Wn(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 it(y)?Hs(e,h)(y):h(y)}function h(y){return Fg(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(kC,g,g)(y)}function g(y){return Ge(y)?Qe(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Le(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function OC(e,t,n){return r;function r(c){return it(c)?Hs(e,o)(c):n(c)}function o(c){return Ug(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ge(c)?Qe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const IC={name:"hardBreakEscape",tokenize:RC};function RC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const PC={name:"headingAtx",resolve:LC,tokenize:DC};function LC(e,t){let n=e.length-2,r=3,o,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&&(o={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"},xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function DC(e,t,n){let r=0;return o;function o(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||it(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Ge(p)?Qe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||it(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const MC=["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"],Hg=["pre","script","style","textarea"],FC={concrete:!0,name:"htmlFlow",resolveTo:HC,tokenize:zC},BC={partial:!0,tokenize:$C},UC={partial:!0,tokenize:jC};function HC(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 zC(e,t,n){const r=this;let o,a,u,c,d;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),g}function g(N){return N===33?(e.consume(N),T):N===47?(e.consume(N),a=!0,v):N===63?(e.consume(N),o=3,r.interrupt?t:C):nn(N)?(e.consume(N),u=String.fromCharCode(N),S):n(N)}function T(N){return N===45?(e.consume(N),o=2,y):N===91?(e.consume(N),o=5,c=0,x):nn(N)?(e.consume(N),o=4,r.interrupt?t:C):n(N)}function y(N){return N===45?(e.consume(N),r.interrupt?t:C):n(N)}function x(N){const xe="CDATA[";return N===xe.charCodeAt(c++)?(e.consume(N),c===xe.length?r.interrupt?t:he:x):n(N)}function v(N){return nn(N)?(e.consume(N),u=String.fromCharCode(N),S):n(N)}function S(N){if(N===null||N===47||N===62||it(N)){const xe=N===47,Oe=u.toLowerCase();return!xe&&!a&&Hg.includes(Oe)?(o=1,r.interrupt?t(N):he(N)):MC.includes(u.toLowerCase())?(o=6,xe?(e.consume(N),A):r.interrupt?t(N):he(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?O(N):R(N))}return N===45||Gt(N)?(e.consume(N),u+=String.fromCharCode(N),S):n(N)}function A(N){return N===62?(e.consume(N),r.interrupt?t:he):n(N)}function O(N){return Ge(N)?(e.consume(N),O):z(N)}function R(N){return N===47?(e.consume(N),z):N===58||N===95||nn(N)?(e.consume(N),H):Ge(N)?(e.consume(N),R):z(N)}function H(N){return N===45||N===46||N===58||N===95||Gt(N)?(e.consume(N),H):W(N)}function W(N){return N===61?(e.consume(N),F):Ge(N)?(e.consume(N),W):R(N)}function F(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),d=N,K):Ge(N)?(e.consume(N),F):de(N)}function K(N){return N===d?(e.consume(N),d=null,ge):N===null||Le(N)?n(N):(e.consume(N),K)}function de(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||it(N)?W(N):(e.consume(N),de)}function ge(N){return N===47||N===62||Ge(N)?R(N):n(N)}function z(N){return N===62?(e.consume(N),ue):n(N)}function ue(N){return N===null||Le(N)?he(N):Ge(N)?(e.consume(N),ue):n(N)}function he(N){return N===45&&o===2?(e.consume(N),Te):N===60&&o===1?(e.consume(N),oe):N===62&&o===4?(e.consume(N),I):N===63&&o===3?(e.consume(N),C):N===93&&o===5?(e.consume(N),se):Le(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(BC,G,ee)(N)):N===null||Le(N)?(e.exit("htmlFlowData"),ee(N)):(e.consume(N),he)}function ee(N){return e.check(UC,re,G)(N)}function re(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),te}function te(N){return N===null||Le(N)?ee(N):(e.enter("htmlFlowData"),he(N))}function Te(N){return N===45?(e.consume(N),C):he(N)}function oe(N){return N===47?(e.consume(N),u="",X):he(N)}function X(N){if(N===62){const xe=u.toLowerCase();return Hg.includes(xe)?(e.consume(N),I):he(N)}return nn(N)&&u.length<8?(e.consume(N),u+=String.fromCharCode(N),X):he(N)}function se(N){return N===93?(e.consume(N),C):he(N)}function C(N){return N===62?(e.consume(N),I):N===45&&o===2?(e.consume(N),C):he(N)}function I(N){return N===null||Le(N)?(e.exit("htmlFlowData"),G(N)):(e.consume(N),I)}function G(N){return e.exit("htmlFlow"),t(N)}}function jC(e,t,n){const r=this;return o;function o(u){return Le(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 $C(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Bs,t,n)}}const VC={name:"htmlText",tokenize:qC};function qC(e,t,n){const r=this;let o,a,u;return c;function c(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),W):C===63?(e.consume(C),R):nn(C)?(e.consume(C),de):n(C)}function h(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,x):nn(C)?(e.consume(C),O):n(C)}function p(C){return C===45?(e.consume(C),y):n(C)}function g(C){return C===null?n(C):C===45?(e.consume(C),T):Le(C)?(u=g,oe(C)):(e.consume(C),g)}function T(C){return C===45?(e.consume(C),y):g(C)}function y(C){return C===62?Te(C):C===45?T(C):g(C)}function x(C){const I="CDATA[";return C===I.charCodeAt(a++)?(e.consume(C),a===I.length?v:x):n(C)}function v(C){return C===null?n(C):C===93?(e.consume(C),S):Le(C)?(u=v,oe(C)):(e.consume(C),v)}function S(C){return C===93?(e.consume(C),A):v(C)}function A(C){return C===62?Te(C):C===93?(e.consume(C),A):v(C)}function O(C){return C===null||C===62?Te(C):Le(C)?(u=O,oe(C)):(e.consume(C),O)}function R(C){return C===null?n(C):C===63?(e.consume(C),H):Le(C)?(u=R,oe(C)):(e.consume(C),R)}function H(C){return C===62?Te(C):R(C)}function W(C){return nn(C)?(e.consume(C),F):n(C)}function F(C){return C===45||Gt(C)?(e.consume(C),F):K(C)}function K(C){return Le(C)?(u=K,oe(C)):Ge(C)?(e.consume(C),K):Te(C)}function de(C){return C===45||Gt(C)?(e.consume(C),de):C===47||C===62||it(C)?ge(C):n(C)}function ge(C){return C===47?(e.consume(C),Te):C===58||C===95||nn(C)?(e.consume(C),z):Le(C)?(u=ge,oe(C)):Ge(C)?(e.consume(C),ge):Te(C)}function z(C){return C===45||C===46||C===58||C===95||Gt(C)?(e.consume(C),z):ue(C)}function ue(C){return C===61?(e.consume(C),he):Le(C)?(u=ue,oe(C)):Ge(C)?(e.consume(C),ue):ge(C)}function he(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,ee):Le(C)?(u=he,oe(C)):Ge(C)?(e.consume(C),he):(e.consume(C),re)}function ee(C){return C===o?(e.consume(C),o=void 0,te):C===null?n(C):Le(C)?(u=ee,oe(C)):(e.consume(C),ee)}function re(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||it(C)?ge(C):(e.consume(C),re)}function te(C){return C===47||C===62||it(C)?ge(C):n(C)}function Te(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function oe(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),X}function X(C){return Ge(C)?Qe(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):se(C)}function se(C){return e.enter("htmlTextData"),u(C)}}const Vd={name:"labelEnd",resolveAll:KC,resolveTo:QC,tokenize:XC},YC={tokenize:JC},WC={tokenize:ZC},GC={tokenize:ek};function KC(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 o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&xn(e,0,e.length,n),e}function QC(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},h={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=Rn(c,e.slice(a+1,a+r+3)),c=Rn(c,[["enter",p,t]]),c=Rn(c,Lu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Rn(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Rn(c,e.slice(u+1)),c=Rn(c,[["exit",d,t]]),xn(e,a,e.length,c),e}function XC(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?g(T):(u=r.parser.defined.includes(Wn(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(YC,p,u?p:g)(T):T===91?e.attempt(WC,p,u?h:g)(T):u?p(T):g(T)}function h(T){return e.attempt(GC,p,g)(T)}function p(T){return t(T)}function g(T){return a._balanced=!0,n(T)}}function JC(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return it(g)?Hs(e,a)(g):a(g)}function a(g){return g===41?p(g):Fg(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return it(g)?Hs(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?Ug(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function h(g){return it(g)?Hs(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function ZC(e,t,n){const r=this;return o;function o(c){return Bg.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function ek(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const tk={name:"labelStartImage",resolveAll:Vd.resolveAll,tokenize:nk};function nk(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const rk={name:"labelStartLink",resolveAll:Vd.resolveAll,tokenize:ik};function ik(e,t,n){const r=this;return o;function o(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 qd={name:"lineEnding",tokenize:ok};function ok(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Du={name:"thematicBreak",tokenize:sk};function sk(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ge(h)?Qe(e,c,"whitespace")(h):c(h))}}const dn={continuation:{tokenize:ck},exit:fk,name:"list",tokenize:lk},ak={partial:!0,tokenize:hk},uk={partial:!0,tokenize:dk};function lk(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:zd(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Du,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return zd(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"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Bs,r.interrupt?n:p,e.attempt(ak,T,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function g(y){return Ge(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 ck(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Bs,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ge(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(uk,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function dk(e,t,n){const r=this;return Qe(e,o,"listItemIndent",r.containerState.size+1);function o(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 fk(e){e.exit(this.containerState.type)}function hk(e,t,n){const r=this;return Qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ge(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const zg={name:"setextUnderline",resolveTo:pk,tokenize:mk};function pk(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function mk(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ge(h)?Qe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const gk={tokenize:Ek};function Ek(e){const t=this,n=e.attempt(Bs,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(wC,o)),"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 o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const yk={resolveAll:$g()},bk=jg("string"),Tk=jg("text");function jg(e){return{resolveAll:$g(e==="text"?xk:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return h(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const g=o[p];let T=-1;if(g)for(;++T<g.length;){const y=g[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function $g(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function xk(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],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:B({},r.end)};r.end=B({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const wk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:CC},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:Ig},flow:{35:PC,42:Du,45:[zg,Du],60:FC,61:zg,95:Du,96:Dg,126:Dg},flowInitial:{[-2]:$d,[-1]:$d,32:$d},insideSpan:{null:[jd,yk]},string:{38:Pg,92:Rg},text:{[-5]:qd,[-4]:qd,[-3]:qd,33:tk,38:Pg,42:jd,60:[rC,VC],91:rk,92:[IC,Rg],93:Vd,95:jd,96:gC}},Symbol.toStringTag,{value:"Module"}));function _k(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 o={},a=[];let u=[],c=[];const d={attempt:K(W),check:K(F),consume:O,enter:R,exit:H,interrupt:K(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:g};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function g(ue){return u=Rn(u,ue),S(),u[u.length-1]!==null?[]:(de(t,0),h.events=Lu(a,h.events,h),h.events)}function T(ue,he){return Sk(y(ue),he)}function y(ue){return vk(u,ue)}function x(){const{_bufferIndex:ue,_index:he,line:ee,column:re,offset:te}=r;return{_bufferIndex:ue,_index:he,line:ee,column:re,offset:te}}function v(ue){o[ue.line]=ue.column,z()}function S(){let ue;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(ue=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ue&&r._bufferIndex<he.length;)A(he.charCodeAt(r._bufferIndex));else A(he)}}function A(ue){p=p(ue)}function O(ue){Le(ue)?(r.line++,r.column=1,r.offset+=ue===-3?2:1,z()):ue!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ue}function R(ue,he){const ee=he||{};return ee.type=ue,ee.start=x(),h.events.push(["enter",ee,h]),c.push(ee),ee}function H(ue){const he=c.pop();return he.end=x(),h.events.push(["exit",he,h]),he}function W(ue,he){de(ue,he.from)}function F(ue,he){he.restore()}function K(ue,he){return ee;function ee(re,te,Te){let oe,X,se,C;return Array.isArray(re)?G(re):"tokenize"in re?G([re]):I(re);function I(Re){return He;function He(Se){const qe=Se!==null&&Re[Se],ut=Se!==null&&Re.null,pn=[...Array.isArray(qe)?qe:qe?[qe]:[],...Array.isArray(ut)?ut:ut?[ut]:[]];return G(pn)(Se)}}function G(Re){return oe=Re,X=0,Re.length===0?Te:N(Re[X])}function N(Re){return He;function He(Se){return C=ge(),se=Re,Re.partial||(h.currentConstruct=Re),Re.name&&h.parser.constructs.disable.null.includes(Re.name)?Oe():Re.tokenize.call(he?Object.assign(Object.create(h),he):h,d,xe,Oe)(Se)}}function xe(Re){return ue(se,C),te}function Oe(Re){return C.restore(),++X<oe.length?N(oe[X]):Te}}}function de(ue,he){ue.resolveAll&&!a.includes(ue)&&a.push(ue),ue.resolve&&xn(h.events,he,h.events.length-he,ue.resolve(h.events.slice(he),h)),ue.resolveTo&&(h.events=ue.resolveTo(h.events,h))}function ge(){const ue=x(),he=h.previous,ee=h.currentConstruct,re=h.events.length,te=Array.from(c);return{from:re,restore:Te};function Te(){r=ue,h.previous=he,h.currentConstruct=ee,h.events.length=re,c=te,z()}}function z(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function vk(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function Sk(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
23
|
+
`+b.stack}return{value:i,source:s,stack:E,digest:null}}function Kp(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Qp(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var C9=typeof WeakMap=="function"?WeakMap:Map;function hw(i,s,l){l=Hr(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){Cc||(Cc=!0,dm=f),Qp(i,s)},l}function pw(i,s,l){l=Hr(-1,l),l.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var E=s.value;l.payload=function(){return f(E)},l.callback=function(){Qp(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Qp(i,s),typeof f!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})}),l}function mw(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new C9;var E=new Set;f.set(s,E)}else E=f.get(s),E===void 0&&(E=new Set,f.set(s,E));E.has(l)||(E.add(l),i=z9.bind(null,i,s,l),s.then(i,i))}function gw(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Ew(i,s,l,f,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Hr(-1,1),s.tag=2,mi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var k9=U.ReactCurrentOwner,En=!1;function rn(i,s,l,f){s.child=i===null?Fx(s,null,l,f):fs(s,i.child,l,f)}function yw(i,s,l,f,E){l=l.render;var b=s.ref;return ps(s,E),f=zp(i,s,l,f,b,E),l=jp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,zr(i,s,E)):(mt&&l&&vp(s),s.flags|=1,rn(i,s,f,E),s.child)}function bw(i,s,l,f,E){if(i===null){var b=l.type;return typeof b=="function"&&!ym(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,Tw(i,s,b,f,E)):(i=Pc(l.type,null,f,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var _=b.memoizedProps;if(l=l.compare,l=l!==null?l:Ba,l(_,f)&&i.ref===s.ref)return zr(i,s,E)}return s.flags|=1,i=xi(b,f),i.ref=s.ref,i.return=s,s.child=i}function Tw(i,s,l,f,E){if(i!==null){var b=i.memoizedProps;if(Ba(b,f)&&i.ref===s.ref)if(En=!1,s.pendingProps=f=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(En=!0);else return s.lanes=i.lanes,zr(i,s,E)}return Xp(i,s,l,f,E)}function xw(i,s,l){var f=s.pendingProps,E=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},at(ys,Nn),Nn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,at(ys,Nn),Nn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=b!==null?b.baseLanes:l,at(ys,Nn),Nn|=f}else b!==null?(f=b.baseLanes|l,s.memoizedState=null):f=l,at(ys,Nn),Nn|=f;return rn(i,s,E,l),s.child}function ww(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Xp(i,s,l,f,E){var b=gn(l)?Xi:Xt.current;return b=us(s,b),ps(s,E),l=zp(i,s,l,f,b,E),f=jp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,zr(i,s,E)):(mt&&f&&vp(s),s.flags|=1,rn(i,s,l,E),s.child)}function _w(i,s,l,f,E){if(gn(l)){var b=!0;ic(s)}else b=!1;if(ps(s,E),s.stateNode===null)wc(i,s),dw(s,l,f),Gp(s,l,f,E),f=!0;else if(i===null){var _=s.stateNode,L=s.memoizedProps;_.props=L;var H=_.context,te=l.contextType;typeof te=="object"&&te!==null?te=Un(te):(te=gn(l)?Xi:Xt.current,te=us(s,te));var fe=l.getDerivedStateFromProps,me=typeof fe=="function"||typeof _.getSnapshotBeforeUpdate=="function";me||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==f||H!==te)&&fw(s,_,f,te),pi=!1;var ue=s.memoizedState;_.state=ue,hc(s,f,_,E),H=s.memoizedState,L!==f||ue!==H||mn.current||pi?(typeof fe=="function"&&(Wp(s,l,fe,f),H=s.memoizedState),(L=pi||cw(s,l,L,f,ue,H,te))?(me||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=H),_.props=f,_.state=H,_.context=te,f=L):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{_=s.stateNode,Ux(i,s),L=s.memoizedProps,te=s.type===s.elementType?L:nr(s.type,L),_.props=te,me=s.pendingProps,ue=_.context,H=l.contextType,typeof H=="object"&&H!==null?H=Un(H):(H=gn(l)?Xi:Xt.current,H=us(s,H));var we=l.getDerivedStateFromProps;(fe=typeof we=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==me||ue!==H)&&fw(s,_,f,H),pi=!1,ue=s.memoizedState,_.state=ue,hc(s,f,_,E);var Se=s.memoizedState;L!==me||ue!==Se||mn.current||pi?(typeof we=="function"&&(Wp(s,l,we,f),Se=s.memoizedState),(te=pi||cw(s,l,te,f,ue,Se,H)||!1)?(fe||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,Se,H),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,Se,H)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Se),_.props=f,_.state=Se,_.context=H,f=te):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),f=!1)}return Jp(i,s,l,f,b,E)}function Jp(i,s,l,f,E,b){ww(i,s);var _=(s.flags&128)!==0;if(!f&&!_)return E&&kx(s,l,!1),zr(i,s,b);f=s.stateNode,k9.current=s;var L=_&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&_?(s.child=fs(s,i.child,null,b),s.child=fs(s,null,L,b)):rn(i,s,L,b),s.memoizedState=f.state,E&&kx(s,l,!0),s.child}function vw(i){var s=i.stateNode;s.pendingContext?Ax(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Ax(i,s.context,!1),Dp(i,s.containerInfo)}function Sw(i,s,l,f,E){return ds(),kp(E),s.flags|=256,rn(i,s,l,f),s.child}var Zp={dehydrated:null,treeContext:null,retryLane:0};function em(i){return{baseLanes:i,cachePool:null,transitions:null}}function Aw(i,s,l){var f=s.pendingProps,E=gt.current,b=!1,_=(s.flags&128)!==0,L;if((L=_)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),at(gt,E&1),i===null)return Cp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(_=f.children,i=f.fallback,b?(f=s.mode,b=s.child,_={mode:"hidden",children:_},(f&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=_):b=Lc(_,f,0,null),i=ao(i,f,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=em(l),s.memoizedState=Zp,i):tm(s,_));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return N9(i,s,_,f,L,E,l);if(b){b=f.fallback,_=s.mode,E=i.child,L=E.sibling;var H={mode:"hidden",children:f.children};return(_&1)===0&&s.child!==E?(f=s.child,f.childLanes=0,f.pendingProps=H,s.deletions=null):(f=xi(E,H),f.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=xi(L,b):(b=ao(b,_,l,null),b.flags|=2),b.return=s,f.return=s,f.sibling=b,s.child=f,f=b,b=s.child,_=i.child.memoizedState,_=_===null?em(l):{baseLanes:_.baseLanes|l,cachePool:null,transitions:_.transitions},b.memoizedState=_,b.childLanes=i.childLanes&~l,s.memoizedState=Zp,f}return b=i.child,i=b.sibling,f=xi(b,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=l),f.return=s,f.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=f,s.memoizedState=null,f}function tm(i,s){return s=Lc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function xc(i,s,l,f){return f!==null&&kp(f),fs(s,i.child,null,l),i=tm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function N9(i,s,l,f,E,b,_){if(l)return s.flags&256?(s.flags&=-257,f=Kp(Error(n(422))),xc(i,s,_,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=f.fallback,E=s.mode,f=Lc({mode:"visible",children:f.children},E,0,null),b=ao(b,E,_,null),b.flags|=2,f.return=s,b.return=s,f.sibling=b,s.child=f,(s.mode&1)!==0&&fs(s,i.child,null,_),s.child.memoizedState=em(_),s.memoizedState=Zp,b);if((s.mode&1)===0)return xc(i,s,_,null);if(E.data==="$!"){if(f=E.nextSibling&&E.nextSibling.dataset,f)var L=f.dgst;return f=L,b=Error(n(419)),f=Kp(b,f,void 0),xc(i,s,_,f)}if(L=(_&i.childLanes)!==0,En||L){if(f=Ht,f!==null){switch(_&-_){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&(f.suspendedLanes|_))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Ur(i,E),or(f,i,E,-1))}return Em(),f=Kp(Error(n(421))),xc(i,s,_,f)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=j9.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,kn=ci(E.nextSibling),Cn=s,mt=!0,tr=null,i!==null&&(Fn[Bn++]=Fr,Fn[Bn++]=Br,Fn[Bn++]=Ji,Fr=i.id,Br=i.overflow,Ji=s),s=tm(s,f.children),s.flags|=4096,s)}function Cw(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),Rp(i.return,s,l)}function nm(i,s,l,f,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=l,b.tailMode=E)}function kw(i,s,l){var f=s.pendingProps,E=f.revealOrder,b=f.tail;if(rn(i,s,f.children,l),f=gt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Cw(i,l,s);else if(i.tag===19)Cw(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(at(gt,f),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&pc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),nm(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&pc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}nm(s,!0,l,null,b);break;case"together":nm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function wc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function zr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),ro|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=xi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=xi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function O9(i,s,l){switch(s.tag){case 3:vw(s),ds();break;case 5:jx(s);break;case 1:gn(s.type)&&ic(s);break;case 4:Dp(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,E=s.memoizedProps.value;at(cc,f._currentValue),f._currentValue=E;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(at(gt,gt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Aw(i,s,l):(at(gt,gt.current&1),i=zr(i,s,l),i!==null?i.sibling:null);at(gt,gt.current&1);break;case 19:if(f=(l&s.childLanes)!==0,(i.flags&128)!==0){if(f)return kw(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),at(gt,gt.current),f)break;return null;case 22:case 23:return s.lanes=0,xw(i,s,l)}return zr(i,s,l)}var Nw,rm,Ow,Iw;Nw=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},rm=function(){},Ow=function(i,s,l,f){var E=i.memoizedProps;if(E!==f){i=s.stateNode,to(vr.current);var b=null;switch(l){case"input":E=Jn(i,E),f=Jn(i,f),b=[];break;case"select":E=S({},E,{value:void 0}),f=S({},f,{value:void 0}),b=[];break;case"textarea":E=wa(i,E),f=wa(i,f),b=[];break;default:typeof E.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=tc)}$t(l,f);var _;l=null;for(te in E)if(!f.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var L=E[te];for(_ in L)L.hasOwnProperty(_)&&(l||(l={}),l[_]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(o.hasOwnProperty(te)?b||(b=[]):(b=b||[]).push(te,null));for(te in f){var H=f[te];if(L=E!=null?E[te]:void 0,f.hasOwnProperty(te)&&H!==L&&(H!=null||L!=null))if(te==="style")if(L){for(_ in L)!L.hasOwnProperty(_)||H&&H.hasOwnProperty(_)||(l||(l={}),l[_]="");for(_ in H)H.hasOwnProperty(_)&&L[_]!==H[_]&&(l||(l={}),l[_]=H[_])}else l||(b||(b=[]),b.push(te,l)),l=H;else te==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,L=L?L.__html:void 0,H!=null&&L!==H&&(b=b||[]).push(te,H)):te==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(te,""+H):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(o.hasOwnProperty(te)?(H!=null&&te==="onScroll"&<("scroll",i),b||L===H||(b=[])):(b=b||[]).push(te,H))}l&&(b=b||[]).push("style",l);var te=b;(s.updateQueue=te)&&(s.flags|=4)}},Iw=function(i,s,l,f){l!==f&&(s.flags|=4)};function Za(i,s){if(!mt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function Zt(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,f=0;if(s)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags&14680064,f|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags,f|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=f,i.childLanes=l,s}function I9(i,s,l){var f=s.pendingProps;switch(Sp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(s),null;case 1:return gn(s.type)&&rc(),Zt(s),null;case 3:return f=s.stateNode,ms(),ct(mn),ct(Xt),Bp(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(uc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,tr!==null&&(pm(tr),tr=null))),rm(i,s),Zt(s),null;case 5:Mp(s);var E=to(Ga.current);if(l=s.type,i!==null&&s.stateNode!=null)Ow(i,s,l,f,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return Zt(s),null}if(i=to(vr.current),uc(s)){f=s.stateNode,l=s.type;var b=s.memoizedProps;switch(f[_r]=s,f[$a]=b,i=(s.mode&1)!==0,l){case"dialog":lt("cancel",f),lt("close",f);break;case"iframe":case"object":case"embed":lt("load",f);break;case"video":case"audio":for(E=0;E<Ha.length;E++)lt(Ha[E],f);break;case"source":lt("error",f);break;case"img":case"image":case"link":lt("error",f),lt("load",f);break;case"details":lt("toggle",f);break;case"input":Ta(f,b),lt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!b.multiple},lt("invalid",f);break;case"textarea":Il(f,b),lt("invalid",f)}$t(l,b),E=null;for(var _ in b)if(b.hasOwnProperty(_)){var L=b[_];_==="children"?typeof L=="string"?f.textContent!==L&&(b.suppressHydrationWarning!==!0&&ec(f.textContent,L,i),E=["children",L]):typeof L=="number"&&f.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&ec(f.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(_)&&L!=null&&_==="onScroll"&<("scroll",f)}switch(l){case"input":pn(f),Ol(f,b,!0);break;case"textarea":pn(f),Pl(f);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(f.onclick=tc)}f=E,s.updateQueue=f,f!==null&&(s.flags|=4)}else{_=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=re(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=_.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=_.createElement(l,{is:f.is}):(i=_.createElement(l),l==="select"&&(_=i,f.multiple?_.multiple=!0:f.size&&(_.size=f.size))):i=_.createElementNS(i,l),i[_r]=s,i[$a]=f,Nw(i,s,!1,!1),s.stateNode=i;e:{switch(_=xr(l,f),l){case"dialog":lt("cancel",i),lt("close",i),E=f;break;case"iframe":case"object":case"embed":lt("load",i),E=f;break;case"video":case"audio":for(E=0;E<Ha.length;E++)lt(Ha[E],i);E=f;break;case"source":lt("error",i),E=f;break;case"img":case"image":case"link":lt("error",i),lt("load",i),E=f;break;case"details":lt("toggle",i),E=f;break;case"input":Ta(i,f),E=Jn(i,f),lt("invalid",i);break;case"option":E=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},E=S({},f,{value:void 0}),lt("invalid",i);break;case"textarea":Il(i,f),E=wa(i,f),lt("invalid",i);break;default:E=f}$t(l,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var H=L[b];b==="style"?ri(i,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ye(i,H)):b==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Xe(i,H):typeof H=="number"&&Xe(i,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?H!=null&&b==="onScroll"&<("scroll",i):H!=null&&R(i,b,H,_))}switch(l){case"input":pn(i),Ol(i,f,!1);break;case"textarea":pn(i),Pl(i);break;case"option":f.value!=null&&i.setAttribute("value",""+ve(f.value));break;case"select":i.multiple=!!f.multiple,b=f.value,b!=null?ni(i,!!f.multiple,b,!1):f.defaultValue!=null&&ni(i,!!f.multiple,f.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=tc)}switch(l){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Zt(s),null;case 6:if(i&&s.stateNode!=null)Iw(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=to(Ga.current),to(vr.current),uc(s)){if(f=s.stateNode,l=s.memoizedProps,f[_r]=s,(b=f.nodeValue!==l)&&(i=Cn,i!==null))switch(i.tag){case 3:ec(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&ec(f.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[_r]=s,s.stateNode=f}return Zt(s),null;case 13:if(ct(gt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(mt&&kn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Lx(),ds(),s.flags|=98560,b=!1;else if(b=uc(s),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[_r]=s}else ds(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Zt(s),b=!1}else tr!==null&&(pm(tr),tr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(gt.current&1)!==0?Pt===0&&(Pt=3):Em())),s.updateQueue!==null&&(s.flags|=4),Zt(s),null);case 4:return ms(),rm(i,s),i===null&&za(s.stateNode.containerInfo),Zt(s),null;case 10:return Ip(s.type._context),Zt(s),null;case 17:return gn(s.type)&&rc(),Zt(s),null;case 19:if(ct(gt),b=s.memoizedState,b===null)return Zt(s),null;if(f=(s.flags&128)!==0,_=b.rendering,_===null)if(f)Za(b,!1);else{if(Pt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=pc(i),_!==null){for(s.flags|=128,Za(b,!1),f=_.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)b=l,i=f,b.flags&=14680066,_=b.alternate,_===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=_.childLanes,b.lanes=_.lanes,b.child=_.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=_.memoizedProps,b.memoizedState=_.memoizedState,b.updateQueue=_.updateQueue,b.type=_.type,i=_.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return at(gt,gt.current&1|2),s.child}i=i.sibling}b.tail!==null&&_t()>bs&&(s.flags|=128,f=!0,Za(b,!1),s.lanes=4194304)}else{if(!f)if(i=pc(_),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Za(b,!0),b.tail===null&&b.tailMode==="hidden"&&!_.alternate&&!mt)return Zt(s),null}else 2*_t()-b.renderingStartTime>bs&&l!==1073741824&&(s.flags|=128,f=!0,Za(b,!1),s.lanes=4194304);b.isBackwards?(_.sibling=s.child,s.child=_):(l=b.last,l!==null?l.sibling=_:s.child=_,b.last=_)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=_t(),s.sibling=null,l=gt.current,at(gt,f?l&1|2:l&1),s):(Zt(s),null);case 22:case 23:return gm(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Nn&1073741824)!==0&&(Zt(s),s.subtreeFlags&6&&(s.flags|=8192)):Zt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function R9(i,s){switch(Sp(s),s.tag){case 1:return gn(s.type)&&rc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ms(),ct(mn),ct(Xt),Bp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Mp(s),null;case 13:if(ct(gt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ds()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ct(gt),null;case 4:return ms(),null;case 10:return Ip(s.type._context),null;case 22:case 23:return gm(),null;case 24:return null;default:return null}}var _c=!1,en=!1,P9=typeof WeakSet=="function"?WeakSet:Set,_e=null;function Es(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){bt(i,s,f)}else l.current=null}function im(i,s,l){try{l()}catch(f){bt(i,s,f)}}var Rw=!1;function L9(i,s){if(gp=$l,i=cx(),up(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var E=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{l.nodeType,b.nodeType}catch(ye){l=null;break e}var _=0,L=-1,H=-1,te=0,fe=0,me=i,ue=null;t:for(;;){for(var we;me!==l||E!==0&&me.nodeType!==3||(L=_+E),me!==b||f!==0&&me.nodeType!==3||(H=_+f),me.nodeType===3&&(_+=me.nodeValue.length),(we=me.firstChild)!==null;)ue=me,me=we;for(;;){if(me===i)break t;if(ue===l&&++te===E&&(L=_),ue===b&&++fe===f&&(H=_),(we=me.nextSibling)!==null)break;me=ue,ue=me.parentNode}me=we}l=L===-1||H===-1?null:{start:L,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ep={focusedElem:i,selectionRange:l},$l=!1,_e=s;_e!==null;)if(s=_e,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,_e=i;else for(;_e!==null;){s=_e;try{var Se=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var ke=Se.memoizedProps,vt=Se.memoizedState,K=s.stateNode,$=K.getSnapshotBeforeUpdate(s.elementType===s.type?ke:nr(s.type,ke),vt);K.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var J=s.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){bt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,_e=i;break}_e=s.return}return Se=Rw,Rw=!1,Se}function eu(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var E=f=f.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&im(s,l,b)}E=E.next}while(E!==f)}}function vc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function om(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function Pw(i){var s=i.alternate;s!==null&&(i.alternate=null,Pw(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[_r],delete s[$a],delete s[xp],delete s[g9],delete s[E9])),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 Lw(i){return i.tag===5||i.tag===3||i.tag===4}function Dw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Lw(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 sm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=tc));else if(f!==4&&(i=i.child,i!==null))for(sm(i,s,l),i=i.sibling;i!==null;)sm(i,s,l),i=i.sibling}function am(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(am(i,s,l),i=i.sibling;i!==null;)am(i,s,l),i=i.sibling}var Vt=null,rr=!1;function gi(i,s,l){for(l=l.child;l!==null;)Mw(i,s,l),l=l.sibling}function Mw(i,s,l){if(wr&&typeof wr.onCommitFiberUnmount=="function")try{wr.onCommitFiberUnmount(Fl,l)}catch(L){}switch(l.tag){case 5:en||Es(l,s);case 6:var f=Vt,E=rr;Vt=null,gi(i,s,l),Vt=f,rr=E,Vt!==null&&(rr?(i=Vt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Vt.removeChild(l.stateNode));break;case 18:Vt!==null&&(rr?(i=Vt,l=l.stateNode,i.nodeType===8?Tp(i.parentNode,l):i.nodeType===1&&Tp(i,l),Ra(i)):Tp(Vt,l.stateNode));break;case 4:f=Vt,E=rr,Vt=l.stateNode.containerInfo,rr=!0,gi(i,s,l),Vt=f,rr=E;break;case 0:case 11:case 14:case 15:if(!en&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){E=f=f.next;do{var b=E,_=b.destroy;b=b.tag,_!==void 0&&((b&2)!==0||(b&4)!==0)&&im(l,s,_),E=E.next}while(E!==f)}gi(i,s,l);break;case 1:if(!en&&(Es(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(L){bt(l,s,L)}gi(i,s,l);break;case 21:gi(i,s,l);break;case 22:l.mode&1?(en=(f=en)||l.memoizedState!==null,gi(i,s,l),en=f):gi(i,s,l);break;default:gi(i,s,l)}}function Fw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new P9),s.forEach(function(f){var E=$9.bind(null,i,f);l.has(f)||(l.add(f),f.then(E,E))})}}function ir(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var E=l[f];try{var b=i,_=s,L=_;e:for(;L!==null;){switch(L.tag){case 5:Vt=L.stateNode,rr=!1;break e;case 3:Vt=L.stateNode.containerInfo,rr=!0;break e;case 4:Vt=L.stateNode.containerInfo,rr=!0;break e}L=L.return}if(Vt===null)throw Error(n(160));Mw(b,_,E),Vt=null,rr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(te){bt(E,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Bw(s,i),s=s.sibling}function Bw(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(ir(s,i),Ar(i),f&4){try{eu(3,i,i.return),vc(3,i)}catch(ke){bt(i,i.return,ke)}try{eu(5,i,i.return)}catch(ke){bt(i,i.return,ke)}}break;case 1:ir(s,i),Ar(i),f&512&&l!==null&&Es(l,l.return);break;case 5:if(ir(s,i),Ar(i),f&512&&l!==null&&Es(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(ke){bt(i,i.return,ke)}}if(f&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,_=l!==null?l.memoizedProps:b,L=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&xa(E,b),xr(L,_);var te=xr(L,b);for(_=0;_<H.length;_+=2){var fe=H[_],me=H[_+1];fe==="style"?ri(E,me):fe==="dangerouslySetInnerHTML"?Ye(E,me):fe==="children"?Xe(E,me):R(E,fe,me,te)}switch(L){case"input":Ko(E,b);break;case"textarea":Rl(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?ni(E,!!b.multiple,we,!1):ue!==!!b.multiple&&(b.defaultValue!=null?ni(E,!!b.multiple,b.defaultValue,!0):ni(E,!!b.multiple,b.multiple?[]:"",!1))}E[$a]=b}catch(ke){bt(i,i.return,ke)}}break;case 6:if(ir(s,i),Ar(i),f&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(ke){bt(i,i.return,ke)}}break;case 3:if(ir(s,i),Ar(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Ra(s.containerInfo)}catch(ke){bt(i,i.return,ke)}break;case 4:ir(s,i),Ar(i);break;case 13:ir(s,i),Ar(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(cm=_t())),f&4&&Fw(i);break;case 22:if(fe=l!==null&&l.memoizedState!==null,i.mode&1?(en=(te=en)||fe,ir(s,i),en=te):ir(s,i),Ar(i),f&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!fe&&(i.mode&1)!==0)for(_e=i,fe=i.child;fe!==null;){for(me=_e=fe;_e!==null;){switch(ue=_e,we=ue.child,ue.tag){case 0:case 11:case 14:case 15:eu(4,ue,ue.return);break;case 1:Es(ue,ue.return);var Se=ue.stateNode;if(typeof Se.componentWillUnmount=="function"){f=ue,l=ue.return;try{s=f,Se.props=s.memoizedProps,Se.state=s.memoizedState,Se.componentWillUnmount()}catch(ke){bt(f,l,ke)}}break;case 5:Es(ue,ue.return);break;case 22:if(ue.memoizedState!==null){zw(me);continue}}we!==null?(we.return=ue,_e=we):zw(me)}fe=fe.sibling}e:for(fe=null,me=i;;){if(me.tag===5){if(fe===null){fe=me;try{E=me.stateNode,te?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=me.stateNode,H=me.memoizedProps.style,_=H!=null&&H.hasOwnProperty("display")?H.display:null,L.style.display=Mn("display",_))}catch(ke){bt(i,i.return,ke)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=te?"":me.memoizedProps}catch(ke){bt(i,i.return,ke)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;fe===me&&(fe=null),me=me.return}fe===me&&(fe=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:ir(s,i),Ar(i),f&4&&Fw(i);break;case 21:break;default:ir(s,i),Ar(i)}}function Ar(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Lw(l)){var f=l;break e}l=l.return}throw Error(n(160))}switch(f.tag){case 5:var E=f.stateNode;f.flags&32&&(Xe(E,""),f.flags&=-33);var b=Dw(i);am(i,b,E);break;case 3:case 4:var _=f.stateNode.containerInfo,L=Dw(i);sm(i,L,_);break;default:throw Error(n(161))}}catch(H){bt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function D9(i,s,l){_e=i,Uw(i)}function Uw(i,s,l){for(var f=(i.mode&1)!==0;_e!==null;){var E=_e,b=E.child;if(E.tag===22&&f){var _=E.memoizedState!==null||_c;if(!_){var L=E.alternate,H=L!==null&&L.memoizedState!==null||en;L=_c;var te=en;if(_c=_,(en=H)&&!te)for(_e=E;_e!==null;)_=_e,H=_.child,_.tag===22&&_.memoizedState!==null?jw(E):H!==null?(H.return=_,_e=H):jw(E);for(;b!==null;)_e=b,Uw(b),b=b.sibling;_e=E,_c=L,en=te}Hw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,_e=b):Hw(i)}}function Hw(i){for(;_e!==null;){var s=_e;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:en||vc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!en)if(l===null)f.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:nr(s.type,l.memoizedProps);f.componentDidUpdate(E,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&zx(s,b,f);break;case 3:var _=s.updateQueue;if(_!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}zx(s,_,l)}break;case 5:var L=s.stateNode;if(l===null&&s.flags&4){l=L;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&l.focus();break;case"img":H.src&&(l.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var te=s.alternate;if(te!==null){var fe=te.memoizedState;if(fe!==null){var me=fe.dehydrated;me!==null&&Ra(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}en||s.flags&512&&om(s)}catch(ue){bt(s,s.return,ue)}}if(s===i){_e=null;break}if(l=s.sibling,l!==null){l.return=s.return,_e=l;break}_e=s.return}}function zw(i){for(;_e!==null;){var s=_e;if(s===i){_e=null;break}var l=s.sibling;if(l!==null){l.return=s.return,_e=l;break}_e=s.return}}function jw(i){for(;_e!==null;){var s=_e;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{vc(4,s)}catch(H){bt(s,l,H)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var E=s.return;try{f.componentDidMount()}catch(H){bt(s,E,H)}}var b=s.return;try{om(s)}catch(H){bt(s,b,H)}break;case 5:var _=s.return;try{om(s)}catch(H){bt(s,_,H)}}}catch(H){bt(s,s.return,H)}if(s===i){_e=null;break}var L=s.sibling;if(L!==null){L.return=s.return,_e=L;break}_e=s.return}}var M9=Math.ceil,Sc=U.ReactCurrentDispatcher,um=U.ReactCurrentOwner,zn=U.ReactCurrentBatchConfig,Je=0,Ht=null,Nt=null,qt=0,Nn=0,ys=di(0),Pt=0,tu=null,ro=0,Ac=0,lm=0,nu=null,yn=null,cm=0,bs=1/0,jr=null,Cc=!1,dm=null,Ei=null,kc=!1,yi=null,Nc=0,ru=0,fm=null,Oc=-1,Ic=0;function on(){return(Je&6)!==0?_t():Oc!==-1?Oc:Oc=_t()}function bi(i){return(i.mode&1)===0?1:(Je&2)!==0&&qt!==0?qt&-qt:b9.transition!==null?(Ic===0&&(Ic=DT()),Ic):(i=nt,i!==0||(i=window.event,i=i===void 0?16:VT(i.type)),i)}function or(i,s,l,f){if(50<ru)throw ru=0,fm=null,Error(n(185));Ca(i,l,f),((Je&2)===0||i!==Ht)&&(i===Ht&&((Je&2)===0&&(Ac|=l),Pt===4&&Ti(i,qt)),bn(i,f),l===1&&Je===0&&(s.mode&1)===0&&(bs=_t()+500,oc&&hi()))}function bn(i,s){var l=i.callbackNode;bM(i,s);var f=Hl(i,i===Ht?qt:0);if(f===0)l!==null&&RT(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&RT(l),s===1)i.tag===0?y9(Vw.bind(null,i)):Nx(Vw.bind(null,i)),p9(function(){(Je&6)===0&&hi()}),l=null;else{switch(MT(f)){case 1:l=qh;break;case 4:l=PT;break;case 16:l=Ml;break;case 536870912:l=LT;break;default:l=Ml}l=Jw(l,$w.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function $w(i,s){if(Oc=-1,Ic=0,(Je&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Ts()&&i.callbackNode!==l)return null;var f=Hl(i,i===Ht?qt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Rc(i,f);else{s=f;var E=Je;Je|=2;var b=Yw();(Ht!==i||qt!==s)&&(jr=null,bs=_t()+500,oo(i,s));do try{U9();break}catch(L){qw(i,L)}while(!0);Op(),Sc.current=b,Je=E,Nt!==null?s=0:(Ht=null,qt=0,s=Pt)}if(s!==0){if(s===2&&(E=Yh(i),E!==0&&(f=E,s=hm(i,E))),s===1)throw l=tu,oo(i,0),Ti(i,f),bn(i,_t()),l;if(s===6)Ti(i,f);else{if(E=i.current.alternate,(f&30)===0&&!F9(E)&&(s=Rc(i,f),s===2&&(b=Yh(i),b!==0&&(f=b,s=hm(i,b))),s===1))throw l=tu,oo(i,0),Ti(i,f),bn(i,_t()),l;switch(i.finishedWork=E,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:so(i,yn,jr);break;case 3:if(Ti(i,f),(f&130023424)===f&&(s=cm+500-_t(),10<s)){if(Hl(i,0)!==0)break;if(E=i.suspendedLanes,(E&f)!==f){on(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=bp(so.bind(null,i,yn,jr),s);break}so(i,yn,jr);break;case 4:if(Ti(i,f),(f&4194240)===f)break;for(s=i.eventTimes,E=-1;0<f;){var _=31-Zn(f);b=1<<_,_=s[_],_>E&&(E=_),f&=~b}if(f=E,f=_t()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*M9(f/1960))-f,10<f){i.timeoutHandle=bp(so.bind(null,i,yn,jr),f);break}so(i,yn,jr);break;case 5:so(i,yn,jr);break;default:throw Error(n(329))}}}return bn(i,_t()),i.callbackNode===l?$w.bind(null,i):null}function hm(i,s){var l=nu;return i.current.memoizedState.isDehydrated&&(oo(i,s).flags|=256),i=Rc(i,s),i!==2&&(s=yn,yn=l,s!==null&&pm(s)),i}function pm(i){yn===null?yn=i:yn.push.apply(yn,i)}function F9(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var f=0;f<l.length;f++){var E=l[f],b=E.getSnapshot;E=E.value;try{if(!er(b(),E))return!1}catch(_){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ti(i,s){for(s&=~lm,s&=~Ac,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Zn(s),f=1<<l;i[l]=-1,s&=~f}}function Vw(i){if((Je&6)!==0)throw Error(n(327));Ts();var s=Hl(i,0);if((s&1)===0)return bn(i,_t()),null;var l=Rc(i,s);if(i.tag!==0&&l===2){var f=Yh(i);f!==0&&(s=f,l=hm(i,f))}if(l===1)throw l=tu,oo(i,0),Ti(i,s),bn(i,_t()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,so(i,yn,jr),bn(i,_t()),null}function mm(i,s){var l=Je;Je|=1;try{return i(s)}finally{Je=l,Je===0&&(bs=_t()+500,oc&&hi())}}function io(i){yi!==null&&yi.tag===0&&(Je&6)===0&&Ts();var s=Je;Je|=1;var l=zn.transition,f=nt;try{if(zn.transition=null,nt=1,i)return i()}finally{nt=f,zn.transition=l,Je=s,(Je&6)===0&&hi()}}function gm(){Nn=ys.current,ct(ys)}function oo(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,h9(l)),Nt!==null)for(l=Nt.return;l!==null;){var f=l;switch(Sp(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&rc();break;case 3:ms(),ct(mn),ct(Xt),Bp();break;case 5:Mp(f);break;case 4:ms();break;case 13:ct(gt);break;case 19:ct(gt);break;case 10:Ip(f.type._context);break;case 22:case 23:gm()}l=l.return}if(Ht=i,Nt=i=xi(i.current,null),qt=Nn=s,Pt=0,tu=null,lm=Ac=ro=0,yn=nu=null,eo!==null){for(s=0;s<eo.length;s++)if(l=eo[s],f=l.interleaved,f!==null){l.interleaved=null;var E=f.next,b=l.pending;if(b!==null){var _=b.next;b.next=E,f.next=_}l.pending=f}eo=null}return i}function qw(i,s){do{var l=Nt;try{if(Op(),mc.current=bc,gc){for(var f=Et.memoizedState;f!==null;){var E=f.queue;E!==null&&(E.pending=null),f=f.next}gc=!1}if(no=0,Ut=Rt=Et=null,Ka=!1,Qa=0,um.current=null,l===null||l.return===null){Pt=1,tu=s,Nt=null;break}e:{var b=i,_=l.return,L=l,H=s;if(s=qt,L.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var te=H,fe=L,me=fe.tag;if((fe.mode&1)===0&&(me===0||me===11||me===15)){var ue=fe.alternate;ue?(fe.updateQueue=ue.updateQueue,fe.memoizedState=ue.memoizedState,fe.lanes=ue.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var we=gw(_);if(we!==null){we.flags&=-257,Ew(we,_,L,b,s),we.mode&1&&mw(b,te,s),s=we,H=te;var Se=s.updateQueue;if(Se===null){var ke=new Set;ke.add(H),s.updateQueue=ke}else Se.add(H);break e}else{if((s&1)===0){mw(b,te,s),Em();break e}H=Error(n(426))}}else if(mt&&L.mode&1){var vt=gw(_);if(vt!==null){(vt.flags&65536)===0&&(vt.flags|=256),Ew(vt,_,L,b,s),kp(gs(H,L));break e}}b=H=gs(H,L),Pt!==4&&(Pt=2),nu===null?nu=[b]:nu.push(b),b=_;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var K=hw(b,H,s);Hx(b,K);break e;case 1:L=H;var $=b.type,J=b.stateNode;if((b.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Ei===null||!Ei.has(J)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=pw(b,L,s);Hx(b,ye);break e}}b=b.return}while(b!==null)}Gw(l)}catch(Ne){s=Ne,Nt===l&&l!==null&&(Nt=l=l.return);continue}break}while(!0)}function Yw(){var i=Sc.current;return Sc.current=bc,i===null?bc:i}function Em(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Ht===null||(ro&268435455)===0&&(Ac&268435455)===0||Ti(Ht,qt)}function Rc(i,s){var l=Je;Je|=2;var f=Yw();(Ht!==i||qt!==s)&&(jr=null,oo(i,s));do try{B9();break}catch(E){qw(i,E)}while(!0);if(Op(),Je=l,Sc.current=f,Nt!==null)throw Error(n(261));return Ht=null,qt=0,Pt}function B9(){for(;Nt!==null;)Ww(Nt)}function U9(){for(;Nt!==null&&!cM();)Ww(Nt)}function Ww(i){var s=Xw(i.alternate,i,Nn);i.memoizedProps=i.pendingProps,s===null?Gw(i):Nt=s,um.current=null}function Gw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=I9(l,s,Nn),l!==null){Nt=l;return}}else{if(l=R9(l,s),l!==null){l.flags&=32767,Nt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Pt=6,Nt=null;return}}if(s=s.sibling,s!==null){Nt=s;return}Nt=s=i}while(s!==null);Pt===0&&(Pt=5)}function so(i,s,l){var f=nt,E=zn.transition;try{zn.transition=null,nt=1,H9(i,s,l,f)}finally{zn.transition=E,nt=f}return null}function H9(i,s,l,f){do Ts();while(yi!==null);if((Je&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(TM(i,b),i===Ht&&(Nt=Ht=null,qt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||kc||(kc=!0,Jw(Ml,function(){return Ts(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=zn.transition,zn.transition=null;var _=nt;nt=1;var L=Je;Je|=4,um.current=null,L9(i,l),Bw(l,i),s9(Ep),$l=!!gp,Ep=gp=null,i.current=l,D9(l),dM(),Je=L,nt=_,zn.transition=b}else i.current=l;if(kc&&(kc=!1,yi=i,Nc=E),b=i.pendingLanes,b===0&&(Ei=null),pM(l.stateNode),bn(i,_t()),s!==null)for(f=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],f(E.value,{componentStack:E.stack,digest:E.digest});if(Cc)throw Cc=!1,i=dm,dm=null,i;return(Nc&1)!==0&&i.tag!==0&&Ts(),b=i.pendingLanes,(b&1)!==0?i===fm?ru++:(ru=0,fm=i):ru=0,hi(),null}function Ts(){if(yi!==null){var i=MT(Nc),s=zn.transition,l=nt;try{if(zn.transition=null,nt=16>i?16:i,yi===null)var f=!1;else{if(i=yi,yi=null,Nc=0,(Je&6)!==0)throw Error(n(331));var E=Je;for(Je|=4,_e=i.current;_e!==null;){var b=_e,_=b.child;if((_e.flags&16)!==0){var L=b.deletions;if(L!==null){for(var H=0;H<L.length;H++){var te=L[H];for(_e=te;_e!==null;){var fe=_e;switch(fe.tag){case 0:case 11:case 15:eu(8,fe,b)}var me=fe.child;if(me!==null)me.return=fe,_e=me;else for(;_e!==null;){fe=_e;var ue=fe.sibling,we=fe.return;if(Pw(fe),fe===te){_e=null;break}if(ue!==null){ue.return=we,_e=ue;break}_e=we}}}var Se=b.alternate;if(Se!==null){var ke=Se.child;if(ke!==null){Se.child=null;do{var vt=ke.sibling;ke.sibling=null,ke=vt}while(ke!==null)}}_e=b}}if((b.subtreeFlags&2064)!==0&&_!==null)_.return=b,_e=_;else e:for(;_e!==null;){if(b=_e,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:eu(9,b,b.return)}var K=b.sibling;if(K!==null){K.return=b.return,_e=K;break e}_e=b.return}}var $=i.current;for(_e=$;_e!==null;){_=_e;var J=_.child;if((_.subtreeFlags&2064)!==0&&J!==null)J.return=_,_e=J;else e:for(_=$;_e!==null;){if(L=_e,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:vc(9,L)}}catch(Ne){bt(L,L.return,Ne)}if(L===_){_e=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,_e=ye;break e}_e=L.return}}if(Je=E,hi(),wr&&typeof wr.onPostCommitFiberRoot=="function")try{wr.onPostCommitFiberRoot(Fl,i)}catch(Ne){}f=!0}return f}finally{nt=l,zn.transition=s}}return!1}function Kw(i,s,l){s=gs(l,s),s=hw(i,s,1),i=mi(i,s,1),s=on(),i!==null&&(Ca(i,1,s),bn(i,s))}function bt(i,s,l){if(i.tag===3)Kw(i,i,l);else for(;s!==null;){if(s.tag===3){Kw(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ei===null||!Ei.has(f))){i=gs(l,i),i=pw(s,i,1),s=mi(s,i,1),i=on(),s!==null&&(Ca(s,1,i),bn(s,i));break}}s=s.return}}function z9(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=on(),i.pingedLanes|=i.suspendedLanes&l,Ht===i&&(qt&l)===l&&(Pt===4||Pt===3&&(qt&130023424)===qt&&500>_t()-cm?oo(i,0):lm|=l),bn(i,s)}function Qw(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ul,Ul<<=1,(Ul&130023424)===0&&(Ul=4194304)));var l=on();i=Ur(i,s),i!==null&&(Ca(i,s,l),bn(i,l))}function j9(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Qw(i,l)}function $9(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Qw(i,l)}var Xw;Xw=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||mn.current)En=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return En=!1,O9(i,s,l);En=(i.flags&131072)!==0}else En=!1,mt&&(s.flags&1048576)!==0&&Ox(s,ac,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;wc(i,s),i=s.pendingProps;var E=us(s,Xt.current);ps(s,l),E=zp(null,s,f,i,E,l);var b=jp();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gn(f)?(b=!0,ic(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Lp(s),E.updater=Tc,s.stateNode=E,E._reactInternals=s,Gp(s,f,i,l),s=Jp(null,s,f,!0,b,l)):(s.tag=0,mt&&b&&vp(s),rn(null,s,E,l),s=s.child),s;case 16:f=s.elementType;e:{switch(wc(i,s),i=s.pendingProps,E=f._init,f=E(f._payload),s.type=f,E=s.tag=q9(f),i=nr(f,i),E){case 0:s=Xp(null,s,f,i,l);break e;case 1:s=_w(null,s,f,i,l);break e;case 11:s=yw(null,s,f,i,l);break e;case 14:s=bw(null,s,f,nr(f.type,i),l);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),Xp(i,s,f,E,l);case 1:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),_w(i,s,f,E,l);case 3:e:{if(vw(s),i===null)throw Error(n(387));f=s.pendingProps,b=s.memoizedState,E=b.element,Ux(i,s),hc(s,f,null,l);var _=s.memoizedState;if(f=_.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=gs(Error(n(423)),s),s=Sw(i,s,f,l,E);break e}else if(f!==E){E=gs(Error(n(424)),s),s=Sw(i,s,f,l,E);break e}else for(kn=ci(s.stateNode.containerInfo.firstChild),Cn=s,mt=!0,tr=null,l=Fx(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ds(),f===E){s=zr(i,s,l);break e}rn(i,s,f,l)}s=s.child}return s;case 5:return jx(s),i===null&&Cp(s),f=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,_=E.children,yp(f,E)?_=null:b!==null&&yp(f,b)&&(s.flags|=32),ww(i,s),rn(i,s,_,l),s.child;case 6:return i===null&&Cp(s),null;case 13:return Aw(i,s,l);case 4:return Dp(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=fs(s,null,f,l):rn(i,s,f,l),s.child;case 11:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),yw(i,s,f,E,l);case 7:return rn(i,s,s.pendingProps,l),s.child;case 8:return rn(i,s,s.pendingProps.children,l),s.child;case 12:return rn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,E=s.pendingProps,b=s.memoizedProps,_=E.value,at(cc,f._currentValue),f._currentValue=_,b!==null)if(er(b.value,_)){if(b.children===E.children&&!mn.current){s=zr(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){_=b.child;for(var H=L.firstContext;H!==null;){if(H.context===f){if(b.tag===1){H=Hr(-1,l&-l),H.tag=2;var te=b.updateQueue;if(te!==null){te=te.shared;var fe=te.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),te.pending=H}}b.lanes|=l,H=b.alternate,H!==null&&(H.lanes|=l),Rp(b.return,l,s),L.lanes|=l;break}H=H.next}}else if(b.tag===10)_=b.type===s.type?null:b.child;else if(b.tag===18){if(_=b.return,_===null)throw Error(n(341));_.lanes|=l,L=_.alternate,L!==null&&(L.lanes|=l),Rp(_,l,s),_=b.sibling}else _=b.child;if(_!==null)_.return=b;else for(_=b;_!==null;){if(_===s){_=null;break}if(b=_.sibling,b!==null){b.return=_.return,_=b;break}_=_.return}b=_}rn(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,f=s.pendingProps.children,ps(s,l),E=Un(E),f=f(E),s.flags|=1,rn(i,s,f,l),s.child;case 14:return f=s.type,E=nr(f,s.pendingProps),E=nr(f.type,E),bw(i,s,f,E,l);case 15:return Tw(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),wc(i,s),s.tag=1,gn(f)?(i=!0,ic(s)):i=!1,ps(s,l),dw(s,f,E),Gp(s,f,E,l),Jp(null,s,f,!0,i,l);case 19:return kw(i,s,l);case 22:return xw(i,s,l)}throw Error(n(156,s.tag))};function Jw(i,s){return IT(i,s)}function V9(i,s,l,f){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(i,s,l,f){return new V9(i,s,l,f)}function ym(i){return i=i.prototype,!(!i||!i.isReactComponent)}function q9(i){if(typeof i=="function")return ym(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===Te)return 14}return 2}function xi(i,s){var l=i.alternate;return l===null?(l=jn(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Pc(i,s,l,f,E,b){var _=2;if(f=i,typeof i=="function")ym(i)&&(_=1);else if(typeof i=="string")_=5;else e:switch(i){case X:return ao(l.children,E,b,s);case ce:_=8,E|=8;break;case de:return i=jn(12,l,s,E|2),i.elementType=de,i.lanes=b,i;case ae:return i=jn(13,l,s,E),i.elementType=ae,i.lanes=b,i;case se:return i=jn(19,l,s,E),i.elementType=se,i.lanes=b,i;case ee:return Lc(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:_=10;break e;case oe:_=9;break e;case he:_=11;break e;case Te:_=14;break e;case Ce:_=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=jn(_,l,s,E),s.elementType=i,s.type=f,s.lanes=b,s}function ao(i,s,l,f){return i=jn(7,i,f,s),i.lanes=l,i}function Lc(i,s,l,f){return i=jn(22,i,f,s),i.elementType=ee,i.lanes=l,i.stateNode={isHidden:!1},i}function bm(i,s,l){return i=jn(6,i,null,s),i.lanes=l,i}function Tm(i,s,l){return s=jn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function Y9(i,s,l,f,E){this.tag=s,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=Wh(0),this.expirationTimes=Wh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wh(0),this.identifierPrefix=f,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function xm(i,s,l,f,E,b,_,L,H){return i=new Y9(i,s,l,L,H),s===1?(s=1,b===!0&&(s|=8)):s=0,b=jn(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lp(b),i}function W9(i,s,l){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:f==null?null:""+f,children:i,containerInfo:s,implementation:l}}function Zw(i){if(!i)return fi;i=i._reactInternals;e:{if(Ki(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(gn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(gn(l))return Cx(i,l,s)}return s}function e2(i,s,l,f,E,b,_,L,H){return i=xm(l,f,!0,i,E,b,_,L,H),i.context=Zw(null),l=i.current,f=on(),E=bi(l),b=Hr(f,E),b.callback=s!=null?s:null,mi(l,b,E),i.current.lanes=E,Ca(i,E,f),bn(i,f),i}function Dc(i,s,l,f){var E=s.current,b=on(),_=bi(E);return l=Zw(l),s.context===null?s.context=l:s.pendingContext=l,s=Hr(b,_),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=mi(E,s,_),i!==null&&(or(i,E,_,b),fc(i,E,_)),_}function Mc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function t2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function wm(i,s){t2(i,s),(i=i.alternate)&&t2(i,s)}function G9(){return null}var n2=typeof reportError=="function"?reportError:function(i){console.error(i)};function _m(i){this._internalRoot=i}Fc.prototype.render=_m.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Dc(i,s,null,null)},Fc.prototype.unmount=_m.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;io(function(){Dc(null,i,null,null)}),s[Dr]=null}};function Fc(i){this._internalRoot=i}Fc.prototype.unstable_scheduleHydration=function(i){if(i){var s=UT();i={blockedOn:null,target:i,priority:s};for(var l=0;l<ai.length&&s!==0&&s<ai[l].priority;l++);ai.splice(l,0,i),l===0&&jT(i)}};function vm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Bc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function r2(){}function K9(i,s,l,f,E){if(E){if(typeof f=="function"){var b=f;f=function(){var te=Mc(_);b.call(te)}}var _=e2(s,f,i,0,null,!1,!1,"",r2);return i._reactRootContainer=_,i[Dr]=_.current,za(i.nodeType===8?i.parentNode:i),io(),_}for(;E=i.lastChild;)i.removeChild(E);if(typeof f=="function"){var L=f;f=function(){var te=Mc(H);L.call(te)}}var H=xm(i,0,!1,null,null,!1,!1,"",r2);return i._reactRootContainer=H,i[Dr]=H.current,za(i.nodeType===8?i.parentNode:i),io(function(){Dc(s,H,l,f)}),H}function Uc(i,s,l,f,E){var b=l._reactRootContainer;if(b){var _=b;if(typeof E=="function"){var L=E;E=function(){var H=Mc(_);L.call(H)}}Dc(s,_,i,E)}else _=K9(l,s,i,E,f);return Mc(_)}FT=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Aa(s.pendingLanes);l!==0&&(Gh(s,l|1),bn(s,_t()),(Je&6)===0&&(bs=_t()+500,hi()))}break;case 13:io(function(){var f=Ur(i,1);if(f!==null){var E=on();or(f,i,1,E)}}),wm(i,1)}},Kh=function(i){if(i.tag===13){var s=Ur(i,134217728);if(s!==null){var l=on();or(s,i,134217728,l)}wm(i,134217728)}},BT=function(i){if(i.tag===13){var s=bi(i),l=Ur(i,s);if(l!==null){var f=on();or(l,i,s,f)}wm(i,s)}},UT=function(){return nt},HT=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},zh=function(i,s,l){switch(s){case"input":if(Ko(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var f=l[s];if(f!==i&&f.form===i.form){var E=nc(f);if(!E)throw Error(n(90));Wi(f),Ko(f,E)}}}break;case"textarea":Rl(i,l);break;case"select":s=l.value,s!=null&&ni(i,!!l.multiple,s,!1)}},vT=mm,ST=io;var Q9={usingClientEntryPoint:!1,Events:[Va,ss,nc,wT,_T,mm]},iu={findFiberByHostInstance:Qi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},X9={bundleType:iu.bundleType,version:iu.version,rendererPackageName:iu.rendererPackageName,rendererConfig:iu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=NT(i),i===null?null:i.stateNode},findFiberByHostInstance:iu.findFiberByHostInstance||G9,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 Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{Fl=Hc.inject(X9),wr=Hc}catch(i){}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q9,ln.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vm(s))throw Error(n(200));return W9(i,s,null,l)},ln.createRoot=function(i,s){if(!vm(i))throw Error(n(299));var l=!1,f="",E=n2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=xm(i,1,!1,null,null,l,!1,f,E),i[Dr]=s.current,za(i.nodeType===8?i.parentNode:i),new _m(s)},ln.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=NT(s),i=i===null?null:i.stateNode,i},ln.flushSync=function(i){return io(i)},ln.hydrate=function(i,s,l){if(!Bc(s))throw Error(n(200));return Uc(null,i,s,!0,l)},ln.hydrateRoot=function(i,s,l){if(!vm(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,E=!1,b="",_=n2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(_=l.onRecoverableError)),s=e2(s,null,i,1,l!=null?l:null,E,!1,b,_),i[Dr]=s.current,za(i),f)for(i=0;i<f.length;i++)l=f[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new Fc(s)},ln.render=function(i,s,l){if(!Bc(s))throw Error(n(200));return Uc(null,i,s,!1,l)},ln.unmountComponentAtNode=function(i){if(!Bc(i))throw Error(n(40));return i._reactRootContainer?(io(function(){Uc(null,null,i,!1,function(){i._reactRootContainer=null,i[Dr]=null})}),!0):!1},ln.unstable_batchedUpdates=mm,ln.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!Bc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Uc(i,s,l,!1,f)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var V0;function q0(){if(V0)return Cd.exports;V0=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(),Cd.exports=MS(),Cd.exports}var Ps=q0();function Y0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Y0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function j(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Y0(e))&&(r&&(r+=" "),r+=t);return r}var W0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},G0=_i.createContext&&_i.createContext(W0),FS=["attr","size","title"];function BS(e,t){if(e==null)return{};var n=US(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function US(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 Nu(){return Nu=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},Nu.apply(this,arguments)}function K0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K0(Object(n),!0).forEach(function(r){HS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HS(e,t,n){return t=zS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zS(e){var t=jS(e,"string");return typeof t=="symbol"?t:t+""}function jS(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 Q0(e){return e&&e.map((t,n)=>_i.createElement(t.tag,Ou({key:n},t.attr),Q0(t.child)))}function ft(e){return t=>_i.createElement($S,Nu({attr:Ou({},e.attr)},t),Q0(e.child))}function $S(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=BS(e,FS),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),_i.createElement("svg",Nu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Ou(Ou({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&_i.createElement("title",null,a),e.children)};return G0!==void 0?_i.createElement(G0.Consumer,null,n=>t(n)):t(W0)}function VS(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function qS(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function YS(e){return ft({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const lr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:x.jsx("button",{className:j(e,`${D}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?x.jsx("img",{className:j(`${D}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),WS="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",GS=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=At(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?x.jsx(YS,{className:j(t,`${D}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||WS,alt:"Copilot",className:j(t,`${D}-minimized-icon-img`)});return x.jsx(lr,{className:j(t,`${D}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},KS=()=>{const{globalClassName:e,themeVariables:t}=At(),n=()=>{Cu(!1),ki(!0)};return Ps.createPortal(x.jsx("div",{className:j(e,`${D}-minimized-container`),style:t,children:x.jsx(GS,{onClick:n})}),document.body)};function QS(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function Yn(){const e=Z.useContext(I0);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const XS=e=>({[`${Cr}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Cr}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem"});function JS(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function X0(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function ZS(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function J0(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function eA(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function tA(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function nA(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function rA(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function iA(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function oA(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function sA(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function Z0(e){return ft({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const Iu=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>x.jsx("button",{className:j(`${D}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),aA=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:j(`${D}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(J0,{size:"16px"})},uA=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(lr,{className:j(e,n,`cim-${r}-component`,`${D}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:x.jsx(J0,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(Iu,{className:j(e,n,`cim-${r}-component`,`${D}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&x.jsx(aA,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function kF(){}function NF(){}function eg(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function tg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const lA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dA={};function ng(e,t){return(dA.jsx?cA:lA).test(e)}const fA=/[ \t\n\f\r]/g;function hA(e){return typeof e=="object"?e.type==="text"?rg(e.value):!1:rg(e)}function rg(e){return e.replace(fA,"")===""}let Ls=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ls.prototype.normal={},Ls.prototype.property={},Ls.prototype.space=void 0;function ig(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ls(n,r,t)}function Ds(e){return e.toLowerCase()}let cn=class{constructor(t,n){this.attribute=n,this.property=t}};cn.prototype.attribute="",cn.prototype.booleanish=!1,cn.prototype.boolean=!1,cn.prototype.commaOrSpaceSeparated=!1,cn.prototype.commaSeparated=!1,cn.prototype.defined=!1,cn.prototype.mustUseProperty=!1,cn.prototype.number=!1,cn.prototype.overloadedBoolean=!1,cn.prototype.property="",cn.prototype.spaceSeparated=!1,cn.prototype.space=void 0;let pA=0;const je=Oi(),Ct=Oi(),Od=Oi(),ge=Oi(),ot=Oi(),go=Oi(),Tn=Oi();function Oi(){return ou(2,++pA)}const Id=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Ct,commaOrSpaceSeparated:Tn,commaSeparated:go,number:ge,overloadedBoolean:Od,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),Rd=Object.keys(Id);let Pd=class extends cn{constructor(t,n,r,o){let a=-1;if(super(t,n),og(this,"space",o),typeof r=="number")for(;++a<Rd.length;){const u=Rd[a];og(this,Rd[a],(r&Id[u])===Id[u])}}};Pd.prototype.defined=!0;function og(e,t,n){n&&(e[t]=n)}function Eo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Pd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ds(r)]=r,n[Ds(a.attribute)]=r}return new Ls(t,n,e.space)}const sg=Eo({properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:ot,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:ge,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:ot,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Ct,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ag(e,t){return t in e?e[t]:t}function ug(e,t){return ag(e,t.toLowerCase())}const mA=Eo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:go,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ot,autoFocus:je,autoPlay:je,blocking:ot,capture:null,charSet:null,checked:je,cite:null,className:ot,cols:ge,colSpan:null,content:null,contentEditable:Ct,controls:je,controlsList:ot,coords:ge|go,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Od,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:ot,height:ge,hidden:Od,high:ge,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ot,itemRef:ot,itemScope:je,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,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:ge,pattern:null,ping:ot,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ot,required:je,reversed:je,rows:ge,rowSpan:ge,sandbox:ot,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Ct,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,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:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:ug}),gA=Eo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Tn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:ot,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:go,g2:go,glyphName:go,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tn,rev:Tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tn,requiredFeatures:Tn,requiredFonts:Tn,requiredFormats:Tn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ag}),lg=Eo({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()}}),cg=Eo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ug}),dg=Eo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),EA={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"},yA=/[A-Z]/g,fg=/-[a-z]/g,bA=/^data[-\w.:]+$/i;function Ld(e,t){const n=Ds(t);let r=t,o=cn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(fg,xA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!fg.test(a)){let u=a.replace(yA,TA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Pd}return new o(r,t)}function TA(e){return"-"+e.toLowerCase()}function xA(e){return e.charAt(1).toUpperCase()}const Ru=ig([sg,mA,lg,cg,dg],"html"),yo=ig([sg,gA,lg,cg,dg],"svg");function hg(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function pg(e){return e.join(" ").trim()}var bo={},Dd,mg;function wA(){if(mg)return Dd;mg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
24
|
+
`,h="/",p="*",g="",T="comment",y="declaration";Dd=function(v,A){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];A=A||{};var C=1,k=1;function R(ae){var se=ae.match(t);se&&(C+=se.length);var Te=ae.lastIndexOf(d);k=~Te?ae.length-Te:k+ae.length}function U(){var ae={line:C,column:k};return function(se){return se.position=new Y(ae),ce(),se}}function Y(ae){this.start=ae,this.end={line:C,column:k},this.source=A.source}Y.prototype.content=v;function F(ae){var se=new Error(A.source+":"+C+":"+k+": "+ae);if(se.reason=ae,se.filename=A.source,se.line=C,se.column=k,se.source=v,!A.silent)throw se}function X(ae){var se=ae.exec(v);if(se){var Te=se[0];return R(Te),v=v.slice(Te.length),se}}function ce(){X(n)}function de(ae){var se;for(ae=ae||[];se=z();)se!==!1&&ae.push(se);return ae}function z(){var ae=U();if(!(h!=v.charAt(0)||p!=v.charAt(1))){for(var se=2;g!=v.charAt(se)&&(p!=v.charAt(se)||h!=v.charAt(se+1));)++se;if(se+=2,g===v.charAt(se-1))return F("End of comment missing");var Te=v.slice(2,se-2);return k+=2,R(Te),v=v.slice(se),k+=2,ae({type:T,comment:Te})}}function oe(){var ae=U(),se=X(r);if(se){if(z(),!X(o))return F("property missing ':'");var Te=X(a),Ce=ae({type:y,property:w(se[0].replace(e,g)),value:Te?w(Te[0].replace(e,g)):g});return X(u),Ce}}function he(){var ae=[];de(ae);for(var se;se=oe();)se!==!1&&(ae.push(se),de(ae));return ae}return ce(),he()};function w(v){return v?v.replace(c,g):g}return Dd}var gg;function _A(){if(gg)return bo;gg=1;var e=bo&&bo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=n;var t=e(wA());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?o(h,p,d):p&&(a=a||{},a[h]=p)}}),a}return bo}var Ms={},Eg;function vA(){if(Eg)return Ms;Eg=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return Ms.camelCase=d,Ms}var Fs,yg;function SA(){if(yg)return Fs;yg=1;var e=Fs&&Fs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(_A()),n=vA();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Fs=r,Fs}var AA=SA();const CA=We(AA),Pu=bg("end"),cr=bg("start");function bg(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 Tg(e){const t=cr(e),n=Pu(e);if(t&&n)return{start:t,end:n}}function Bs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xg(e.position):"start"in e||"end"in e?xg(e):"line"in e||"column"in e?Md(e):""}function Md(e){return wg(e&&e.line)+":"+wg(e&&e.column)}function xg(e){return Md(e&&e.start)+"-"+Md(e&&e.end)}function wg(e){return e&&typeof e=="number"?e:1}class Wt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",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=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=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 c=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=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=Bs(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,this.expected,this.note,this.url}}Wt.prototype.file="",Wt.prototype.name="",Wt.prototype.reason="",Wt.prototype.message="",Wt.prototype.stack="",Wt.prototype.column=void 0,Wt.prototype.line=void 0,Wt.prototype.ancestors=void 0,Wt.prototype.cause=void 0,Wt.prototype.fatal=void 0,Wt.prototype.place=void 0,Wt.prototype.ruleId=void 0,Wt.prototype.source=void 0;const Fd={}.hasOwnProperty,kA=new Map,NA=/[A-Z]/g,OA=new Set(["table","tbody","thead","tfoot","tr"]),IA=new Set(["td","th"]),_g="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function RA(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=HA(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=UA(n,t.jsx,t.jsxs)}const o={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"?yo:Ru,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=vg(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function vg(e,t,n){if(t.type==="element")return PA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return LA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return MA(e,t,n);if(t.type==="mdxjsEsm")return DA(e,t);if(t.type==="root")return FA(e,t,n);if(t.type==="text")return BA(e,t)}function PA(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=yo,e.schema=o),e.ancestors.push(t);const a=Ag(e,t.tagName,!1),u=zA(e,t);let c=Ud(e,t);return OA.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!hA(d):!0})),Sg(e,u,a,t),Bd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function LA(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)}Us(e,t.position)}function DA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Us(e,t.position)}function MA(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=yo,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:Ag(e,t.name,!0),u=jA(e,t),c=Ud(e,t);return Sg(e,u,a,t),Bd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function FA(e,t,n){const r={};return Bd(r,Ud(e,t)),e.create(t,e.Fragment,r,n)}function BA(e,t){return t.value}function Sg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function UA(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function HA(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=cr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function zA(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Fd.call(t.properties,o)){const a=$A(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&IA.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function jA(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 c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Us(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Us(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Ud(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:kA;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 h=o.get(d)||0;u=d+"-"+h,o.set(d,h+1)}}const c=vg(e,a,u);c!==void 0&&n.push(c)}return n}function $A(e,t,n){const r=Ld(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?tg(n):pg(n)),r.property==="style"){let o=typeof n=="object"?n:VA(e,String(n));return e.stylePropertyNameCase==="css"&&(o=qA(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?EA[r.property]||r.property:r.attribute,n]}}function VA(e,t){try{return CA(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Wt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=_g+"#cannot-parse-style-attribute",o}}function Ag(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=ng(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=ng(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Fd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Us(e)}function Us(e,t){const n=new Wt("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=_g+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qA(e){const t={};let n;for(n in e)Fd.call(e,n)&&(t[YA(n)]=e[n]);return t}function YA(e){let t=e.replace(NA,WA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function WA(e){return"-"+e.toLowerCase()}const Hd={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"]},GA={};function zd(e,t){const n=GA,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Cg(e,r,o)}function Cg(e,t,n){if(KA(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 kg(e.children,t,n)}return Array.isArray(e)?kg(e,t,n):""}function kg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Cg(e[o],t,n);return r.join("")}function KA(e){return!!(e&&typeof e=="object")}const Ng=document.createElement("i");function jd(e){const t="&"+e+";";Ng.innerHTML=t;const n=Ng.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o: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 Rn(e,t){return e.length>0?(xn(e,e.length,0,t),e):t}const Og={}.hasOwnProperty;function Ig(e){const t={};let n=-1;for(;++n<e.length;)QA(t,e[n]);return t}function QA(e,t){let n;for(n in t){const o=(Og.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){Og.call(o,u)||(o[u]=[]);const c=a[u];XA(o[u],Array.isArray(c)?c:c?[c]:[])}}}function XA(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xn(e,0,0,r)}function Rg(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 Wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=Yr(/[A-Za-z]/),Gt=Yr(/[\dA-Za-z]/),JA=Yr(/[#-'*+\--9=?A-Z^-~]/);function Lu(e){return e!==null&&(e<32||e===127)}const $d=Yr(/\d/),ZA=Yr(/[\dA-Fa-f]/),eC=Yr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function it(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Du=Yr(new RegExp("\\p{P}|\\p{S}","u")),Ii=Yr(/\s/);function Yr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function To(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Gt(e.charCodeAt(n+1))&&Gt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const tC={tokenize:nC};function nC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const rC={tokenize:iC},Pg={tokenize:oC};function iC(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,h)(R)}return h(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&k();const U=t.events.length;let Y=U,F;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){F=t.events[Y][1].end;break}C(r);let X=U;for(;X<t.events.length;)t.events[X][1].end=B({},F),X++;return xn(t.events,Y+1,0,t.events.slice(U)),t.events.length=X,h(R)}return c(R)}function h(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return w(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Pg,p,g)(R)}function p(R){return o&&k(),C(r),T(R)}function g(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(R)}function T(R){return t.containerState={},e.attempt(Pg,y,w)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function w(R){if(R===null){o&&k(),C(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(R)}function v(R){if(R===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return Le(R)?(e.consume(R),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),v)}function A(R,U){const Y=t.sliceStream(R);if(U&&Y.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(Y),t.parser.lazy[R.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<u&&(!o.events[F][1].end||o.events[F][1].end.offset>u))return;const X=t.events.length;let ce=X,de,z;for(;ce--;)if(t.events[ce][0]==="exit"&&t.events[ce][1].type==="chunkFlow"){if(de){z=t.events[ce][1].end;break}de=!0}for(C(r),F=X;F<t.events.length;)t.events[F][1].end=B({},z),F++;xn(t.events,ce+1,0,t.events.slice(X)),t.events.length=F}}function C(R){let U=n.length;for(;U-- >R;){const Y=n[U];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=R}function k(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function oC(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function xo(e){if(e===null||it(e)||Ii(e))return 1;if(Du(e))return 2}function Mu(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Vd={name:"attention",resolveAll:sC,tokenize:aC};function sC(e,t){let n=-1,r,o,a,u,c,d,h,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 g=B({},e[r][1].end),T=B({},e[n][1].start);Lg(g,-d),Lg(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:B({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},c.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Rn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Rn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Rn(h,Mu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Rn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,xn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function aC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=xo(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),p=xo(d),g=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?g:g&&(o||!T)),h._close=!!(a===42?T:T&&(p||!g)),t(d)}}function Lg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uC={name:"autolink",tokenize:lC};function lC(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return nn(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||Gt(y)?(r=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Gt(y))&&r++<32?(e.consume(y),c):(r=0,h(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||Lu(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):JA(y)?(e.consume(y),h):n(y)}function p(y){return Gt(y)?g(y):n(y)}function g(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||Gt(y))&&r++<63){const w=y===45?T:g;return e.consume(y),w}return n(y)}}const Hs={partial:!0,tokenize:cC};function cC(e,t,n){return r;function r(a){return Ge(a)?Qe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const Dg={continuation:{tokenize:fC},exit:hC,name:"blockQuote",tokenize:dC};function dC(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ge(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function fC(e,t,n){const r=this;return o;function o(u){return Ge(u)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Dg,t,n)(u)}}function hC(e){e.exit("blockQuote")}const Mg={name:"characterEscape",tokenize:pC};function pC(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return eC(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Fg={name:"characterReference",tokenize:mC};function mC(e,t,n){const r=this;let o=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=Gt,p(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=ZA,p):(e.enter("characterReferenceValue"),a=7,u=$d,p(g))}function p(g){if(g===59&&o){const T=e.exit("characterReferenceValue");return u===Gt&&!jd(r.sliceSerialize(T))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<a?(e.consume(g),p):n(g)}}const Bg={partial:!0,tokenize:EC},Ug={concrete:!0,name:"codeFenced",tokenize:gC};function gC(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const X=r.events[r.events.length-1];return a=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(F)}function p(F){return F===c?(u++,e.consume(F),p):u<3?n(F):(e.exit("codeFencedFenceSequence"),Ge(F)?Qe(e,g,"whitespace")(F):g(F))}function g(F){return F===null||Le(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(Bg,v,U)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(F))}function T(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Ge(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),T)}function y(F){return F===null||Le(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(F))}function w(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(F)):F===96&&F===c?n(F):(e.consume(F),w)}function v(F){return e.attempt(o,U,A)(F)}function A(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),C}function C(F){return a>0&&Ge(F)?Qe(e,k,"linePrefix",a+1)(F):k(F)}function k(F){return F===null||Le(F)?e.check(Bg,v,U)(F):(e.enter("codeFlowValue"),R(F))}function R(F){return F===null||Le(F)?(e.exit("codeFlowValue"),k(F)):(e.consume(F),R)}function U(F){return e.exit("codeFenced"),t(F)}function Y(F,X,ce){let de=0;return z;function z(Te){return F.enter("lineEnding"),F.consume(Te),F.exit("lineEnding"),oe}function oe(Te){return F.enter("codeFencedFence"),Ge(Te)?Qe(F,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):he(Te)}function he(Te){return Te===c?(F.enter("codeFencedFenceSequence"),ae(Te)):ce(Te)}function ae(Te){return Te===c?(de++,F.consume(Te),ae):de>=u?(F.exit("codeFencedFenceSequence"),Ge(Te)?Qe(F,se,"whitespace")(Te):se(Te)):ce(Te)}function se(Te){return Te===null||Le(Te)?(F.exit("codeFencedFence"),X(Te)):ce(Te)}}}function EC(e,t,n){const r=this;return o;function o(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 qd={name:"codeIndented",tokenize:bC},yC={partial:!0,tokenize:TC};function bC(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Le(h)?e.attempt(yC,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function TC(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Qe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const xC={name:"codeText",previous:_C,resolve:wC,tokenize:vC};function wC(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function _C(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vC(e,t,n){let r=0,o,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),o=0,p(g)):Le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Le(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function p(g){return g===96?(e.consume(g),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",h(g))}}class SC{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 o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&zs(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),zs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zs(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);zs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zs(this.left,n.reverse())}}}function zs(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 Hg(e){const t={};let n=-1,r,o,a,u,c,d,h;const p=new SC(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,AC(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function AC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,g,T=-1,y=n,w=0,v=0;const A=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(v=T+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const C=c.slice(A[T],A[T+1]),k=a.pop();d.push([k,k+C.length-1]),e.splice(k,2,C)}for(d.reverse(),T=-1;++T<d.length;)h[w+d[T][0]]=w+d[T][1],w+=d[T][1]-d[T][0]-1;return h}const CC={resolve:NC,tokenize:OC},kC={partial:!0,tokenize:IC};function NC(e){return Hg(e),e}function OC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(kC,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function IC(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function zg(e,t,n,r,o,a,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(C){return C===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(C),e.exit(a),T):C===null||C===32||C===41||Lu(C)?n(C):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(C))}function T(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),T(C)):C===null||C===60||Le(C)?n(C):(e.consume(C),C===92?w:y)}function w(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function v(C){return!p&&(C===null||C===41||it(C))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(C)):p<h&&C===40?(e.consume(C),p++,v):C===41?(e.consume(C),p--,v):C===null||C===32||C===40||Lu(C)?n(C):(e.consume(C),C===92?A:v)}function A(C){return C===40||C===41||C===92?(e.consume(C),v):v(C)}}function jg(e,t,n,r,o,a){const u=this;let c=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||Le(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ge(y)),y===92?T:g)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function $g(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),h(T))}function h(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Qe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),h(T)):(e.consume(T),T===92?g:p)}function g(T){return T===u||T===92?(e.consume(T),p):p(T)}}function js(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ge(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const RC={name:"definition",tokenize:LC},PC={partial:!0,tokenize:DC};function LC(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return jg.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=Wn(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 it(y)?js(e,h)(y):h(y)}function h(y){return zg(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(PC,g,g)(y)}function g(y){return Ge(y)?Qe(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Le(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function DC(e,t,n){return r;function r(c){return it(c)?js(e,o)(c):n(c)}function o(c){return $g(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ge(c)?Qe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const MC={name:"hardBreakEscape",tokenize:FC};function FC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const BC={name:"headingAtx",resolve:UC,tokenize:HC};function UC(e,t){let n=e.length-2,r=3,o,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&&(o={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"},xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function HC(e,t,n){let r=0;return o;function o(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||it(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Ge(p)?Qe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||it(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const zC=["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"],Vg=["pre","script","style","textarea"],jC={concrete:!0,name:"htmlFlow",resolveTo:qC,tokenize:YC},$C={partial:!0,tokenize:GC},VC={partial:!0,tokenize:WC};function qC(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 YC(e,t,n){const r=this;let o,a,u,c,d;return h;function h(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),g}function g(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),o=3,r.interrupt?t:S):nn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,w):nn(O)?(e.consume(O),o=4,r.interrupt?t:S):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:S):n(O)}function w(O){const be="CDATA[";return O===be.charCodeAt(c++)?(e.consume(O),c===be.length?r.interrupt?t:he:w):n(O)}function v(O){return nn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||it(O)){const be=O===47,Oe=u.toLowerCase();return!be&&!a&&Vg.includes(Oe)?(o=1,r.interrupt?t(O):he(O)):zC.includes(u.toLowerCase())?(o=6,be?(e.consume(O),C):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?k(O):R(O))}return O===45||Gt(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function C(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function k(O){return Ge(O)?(e.consume(O),k):z(O)}function R(O){return O===47?(e.consume(O),z):O===58||O===95||nn(O)?(e.consume(O),U):Ge(O)?(e.consume(O),R):z(O)}function U(O){return O===45||O===46||O===58||O===95||Gt(O)?(e.consume(O),U):Y(O)}function Y(O){return O===61?(e.consume(O),F):Ge(O)?(e.consume(O),Y):R(O)}function F(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,X):Ge(O)?(e.consume(O),F):ce(O)}function X(O){return O===d?(e.consume(O),d=null,de):O===null||Le(O)?n(O):(e.consume(O),X)}function ce(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||it(O)?Y(O):(e.consume(O),ce)}function de(O){return O===47||O===62||Ge(O)?R(O):n(O)}function z(O){return O===62?(e.consume(O),oe):n(O)}function oe(O){return O===null||Le(O)?he(O):Ge(O)?(e.consume(O),oe):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Ce):O===60&&o===1?(e.consume(O),ee):O===62&&o===4?(e.consume(O),I):O===63&&o===3?(e.consume(O),S):O===93&&o===5?(e.consume(O),q):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check($C,W,ae)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),ae(O)):(e.consume(O),he)}function ae(O){return e.check(VC,se,W)(O)}function se(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Te}function Te(O){return O===null||Le(O)?ae(O):(e.enter("htmlFlowData"),he(O))}function Ce(O){return O===45?(e.consume(O),S):he(O)}function ee(O){return O===47?(e.consume(O),u="",V):he(O)}function V(O){if(O===62){const be=u.toLowerCase();return Vg.includes(be)?(e.consume(O),I):he(O)}return nn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),V):he(O)}function q(O){return O===93?(e.consume(O),S):he(O)}function S(O){return O===62?(e.consume(O),I):O===45&&o===2?(e.consume(O),S):he(O)}function I(O){return O===null||Le(O)?(e.exit("htmlFlowData"),W(O)):(e.consume(O),I)}function W(O){return e.exit("htmlFlow"),t(O)}}function WC(e,t,n){const r=this;return o;function o(u){return Le(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 GC(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Hs,t,n)}}const KC={name:"htmlText",tokenize:QC};function QC(e,t,n){const r=this;let o,a,u;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),h):S===47?(e.consume(S),Y):S===63?(e.consume(S),R):nn(S)?(e.consume(S),ce):n(S)}function h(S){return S===45?(e.consume(S),p):S===91?(e.consume(S),a=0,w):nn(S)?(e.consume(S),k):n(S)}function p(S){return S===45?(e.consume(S),y):n(S)}function g(S){return S===null?n(S):S===45?(e.consume(S),T):Le(S)?(u=g,ee(S)):(e.consume(S),g)}function T(S){return S===45?(e.consume(S),y):g(S)}function y(S){return S===62?Ce(S):S===45?T(S):g(S)}function w(S){const I="CDATA[";return S===I.charCodeAt(a++)?(e.consume(S),a===I.length?v:w):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),A):Le(S)?(u=v,ee(S)):(e.consume(S),v)}function A(S){return S===93?(e.consume(S),C):v(S)}function C(S){return S===62?Ce(S):S===93?(e.consume(S),C):v(S)}function k(S){return S===null||S===62?Ce(S):Le(S)?(u=k,ee(S)):(e.consume(S),k)}function R(S){return S===null?n(S):S===63?(e.consume(S),U):Le(S)?(u=R,ee(S)):(e.consume(S),R)}function U(S){return S===62?Ce(S):R(S)}function Y(S){return nn(S)?(e.consume(S),F):n(S)}function F(S){return S===45||Gt(S)?(e.consume(S),F):X(S)}function X(S){return Le(S)?(u=X,ee(S)):Ge(S)?(e.consume(S),X):Ce(S)}function ce(S){return S===45||Gt(S)?(e.consume(S),ce):S===47||S===62||it(S)?de(S):n(S)}function de(S){return S===47?(e.consume(S),Ce):S===58||S===95||nn(S)?(e.consume(S),z):Le(S)?(u=de,ee(S)):Ge(S)?(e.consume(S),de):Ce(S)}function z(S){return S===45||S===46||S===58||S===95||Gt(S)?(e.consume(S),z):oe(S)}function oe(S){return S===61?(e.consume(S),he):Le(S)?(u=oe,ee(S)):Ge(S)?(e.consume(S),oe):de(S)}function he(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,ae):Le(S)?(u=he,ee(S)):Ge(S)?(e.consume(S),he):(e.consume(S),se)}function ae(S){return S===o?(e.consume(S),o=void 0,Te):S===null?n(S):Le(S)?(u=ae,ee(S)):(e.consume(S),ae)}function se(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||it(S)?de(S):(e.consume(S),se)}function Te(S){return S===47||S===62||it(S)?de(S):n(S)}function Ce(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function ee(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),V}function V(S){return Ge(S)?Qe(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):q(S)}function q(S){return e.enter("htmlTextData"),u(S)}}const Yd={name:"labelEnd",resolveAll:ek,resolveTo:tk,tokenize:nk},XC={tokenize:rk},JC={tokenize:ik},ZC={tokenize:ok};function ek(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 o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&xn(e,0,e.length,n),e}function tk(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},h={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=Rn(c,e.slice(a+1,a+r+3)),c=Rn(c,[["enter",p,t]]),c=Rn(c,Mu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Rn(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Rn(c,e.slice(u+1)),c=Rn(c,[["exit",d,t]]),xn(e,a,e.length,c),e}function nk(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?g(T):(u=r.parser.defined.includes(Wn(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(XC,p,u?p:g)(T):T===91?e.attempt(JC,p,u?h:g)(T):u?p(T):g(T)}function h(T){return e.attempt(ZC,p,g)(T)}function p(T){return t(T)}function g(T){return a._balanced=!0,n(T)}}function rk(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return it(g)?js(e,a)(g):a(g)}function a(g){return g===41?p(g):zg(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return it(g)?js(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?$g(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function h(g){return it(g)?js(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function ik(e,t,n){const r=this;return o;function o(c){return jg.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function ok(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const sk={name:"labelStartImage",resolveAll:Yd.resolveAll,tokenize:ak};function ak(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const uk={name:"labelStartLink",resolveAll:Yd.resolveAll,tokenize:lk};function lk(e,t,n){const r=this;return o;function o(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 Wd={name:"lineEnding",tokenize:ck};function ck(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Fu={name:"thematicBreak",tokenize:dk};function dk(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ge(h)?Qe(e,c,"whitespace")(h):c(h))}}const dn={continuation:{tokenize:mk},exit:Ek,name:"list",tokenize:pk},fk={partial:!0,tokenize:yk},hk={partial:!0,tokenize:gk};function pk(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:$d(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Fu,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return $d(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"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Hs,r.interrupt?n:p,e.attempt(fk,T,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function g(y){return Ge(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 mk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Hs,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ge(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hk,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function gk(e,t,n){const r=this;return Qe(e,o,"listItemIndent",r.containerState.size+1);function o(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 Ek(e){e.exit(this.containerState.type)}function yk(e,t,n){const r=this;return Qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ge(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const qg={name:"setextUnderline",resolveTo:bk,tokenize:Tk};function bk(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function Tk(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ge(h)?Qe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const xk={tokenize:wk};function wk(e){const t=this,n=e.attempt(Hs,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(CC,o)),"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 o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _k={resolveAll:Wg()},vk=Yg("string"),Sk=Yg("text");function Yg(e){return{resolveAll:Wg(e==="text"?Ak:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return h(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const g=o[p];let T=-1;if(g)for(;++T<g.length;){const y=g[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Wg(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function Ak(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],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:B({},r.end)};r.end=B({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Ck=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:RC},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:Dg},flow:{35:BC,42:Fu,45:[qg,Fu],60:jC,61:qg,95:Fu,96:Ug,126:Ug},flowInitial:{[-2]:qd,[-1]:qd,32:qd},insideSpan:{null:[Vd,_k]},string:{38:Fg,92:Mg},text:{[-5]:Wd,[-4]:Wd,[-3]:Wd,33:sk,38:Fg,42:Vd,60:[uC,KC],91:uk,92:[MC,Mg],93:Yd,95:Vd,96:xC}},Symbol.toStringTag,{value:"Module"}));function kk(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 o={},a=[];let u=[],c=[];const d={attempt:X(Y),check:X(F),consume:k,enter:R,exit:U,interrupt:X(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:w,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:g};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function g(oe){return u=Rn(u,oe),A(),u[u.length-1]!==null?[]:(ce(t,0),h.events=Mu(a,h.events,h),h.events)}function T(oe,he){return Ok(y(oe),he)}function y(oe){return Nk(u,oe)}function w(){const{_bufferIndex:oe,_index:he,line:ae,column:se,offset:Te}=r;return{_bufferIndex:oe,_index:he,line:ae,column:se,offset:Te}}function v(oe){o[oe.line]=oe.column,z()}function A(){let oe;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<he.length;)C(he.charCodeAt(r._bufferIndex));else C(he)}}function C(oe){p=p(oe)}function k(oe){Le(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,z()):oe!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=oe}function R(oe,he){const ae=he||{};return ae.type=oe,ae.start=w(),h.events.push(["enter",ae,h]),c.push(ae),ae}function U(oe){const he=c.pop();return he.end=w(),h.events.push(["exit",he,h]),he}function Y(oe,he){ce(oe,he.from)}function F(oe,he){he.restore()}function X(oe,he){return ae;function ae(se,Te,Ce){let ee,V,q,S;return Array.isArray(se)?W(se):"tokenize"in se?W([se]):I(se);function I(Re){return He;function He(ve){const qe=ve!==null&&Re[ve],ut=ve!==null&&Re.null,pn=[...Array.isArray(qe)?qe:qe?[qe]:[],...Array.isArray(ut)?ut:ut?[ut]:[]];return W(pn)(ve)}}function W(Re){return ee=Re,V=0,Re.length===0?Ce:O(Re[V])}function O(Re){return He;function He(ve){return S=de(),q=Re,Re.partial||(h.currentConstruct=Re),Re.name&&h.parser.constructs.disable.null.includes(Re.name)?Oe():Re.tokenize.call(he?Object.assign(Object.create(h),he):h,d,be,Oe)(ve)}}function be(Re){return oe(q,S),Te}function Oe(Re){return S.restore(),++V<ee.length?O(ee[V]):Ce}}}function ce(oe,he){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&xn(h.events,he,h.events.length-he,oe.resolve(h.events.slice(he),h)),oe.resolveTo&&(h.events=oe.resolveTo(h.events,h))}function de(){const oe=w(),he=h.previous,ae=h.currentConstruct,se=h.events.length,Te=Array.from(c);return{from:se,restore:Ce};function Ce(){r=oe,h.previous=he,h.currentConstruct=ae,h.events.length=se,c=Te,z()}}function z(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function Nk(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function Ok(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
25
25
|
`;break}case-3:{u=`\r
|
|
26
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function Ak(e){const r={constructs:Cg([wk,...(e||{}).extensions||[]]),content:o(QA),defined:[],document:o(JA),flow:o(gk),lazy:{},string:o(bk),text:o(Tk)};return r;function o(a){return u;function u(c){return _k(r,a,c)}}}function Ck(e){for(;!Mg(e););return e}const Vg=/[\0\t\n\r]/g;function kk(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,p,g,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(Vg.lastIndex=g,h=Vg.exec(a),T=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(T),!h){t=a.slice(g);break}if(y===10&&g===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<T&&(d.push(a.slice(g,T)),e+=T-g),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}g=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Nk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ok(e){return e.replace(Nk,Ik)}function Ik(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return kg(n.slice(a?2:1),a?16:10)}return Hd(n)||e}const qg={}.hasOwnProperty;function Rk(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Pk(n)(Ck(Ak(n).document().write(kk()(e,t,!0))))}function Pk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Go),autolinkProtocol:ge,autolinkEmail:ge,atxHeading:a(ya),blockQuote:a(ut),characterEscape:ge,characterReference:ge,codeFenced:a(pn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(pn,u),codeText:a(Yi,u),codeTextData:ge,data:ge,codeFlowValue:ge,definition:a(Zr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Jn),hardBreakEscape:a(ba),hardBreakTrailing:a(ba),htmlFlow:a(Wo,u),htmlFlowData:ge,htmlText:a(Wo,u),htmlTextData:ge,image:a(kl),label:u,link:a(Go),listItem:a(ti),listItemValue:T,listOrdered:a(ei,g),listUnordered:a(ei),paragraph:a(Ta),reference:N,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ya),strong:a(Nl),thematicBreak:a(Il)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:qe,autolinkProtocol:Se,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Re,characterReference:He,codeFenced:d(S),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:z,codeIndented:d(A),codeText:d(te),codeTextData:z,data:z,definition:d(),definitionDestinationString:H,definitionLabelString:O,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ee),htmlFlowData:z,htmlText:d(re),htmlTextData:z,image:d(oe),label:se,labelText:X,lineEnding:ue,link:d(Te),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:xe,resourceDestinationString:C,resourceTitleString:I,resource:G,setextHeading:d(de),setextHeadingLineSequence:K,setextHeadingText:F,strong:d(),thematicBreak:d()}};Yg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let we={type:"root",children:[]};const Be={stack:[we],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Ye=[];let Xe=-1;for(;++Xe<ie.length;)if(ie[Xe][1].type==="listOrdered"||ie[Xe][1].type==="listUnordered")if(ie[Xe][0]==="enter")Ye.push(Xe);else{const jt=Ye.pop();Xe=o(ie,jt,Xe)}for(Xe=-1;++Xe<ie.length;){const jt=t[ie[Xe][0]];qg.call(jt,ie[Xe][1].type)&&jt[ie[Xe][1].type].call(Object.assign({sliceSerialize:ie[Xe][2].sliceSerialize},Be),ie[Xe][1])}if(Be.tokenStack.length>0){const jt=Be.tokenStack[Be.tokenStack.length-1];(jt[1]||Wg).call(Be,void 0,jt[0])}for(we.position={start:Yr(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Yr(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)we=t.transforms[Xe](we)||we;return we}function o(ie,we,Be){let Ye=we-1,Xe=-1,jt=!1,Pr,Mn,ni,Wi;for(;++Ye<=Be;){const $t=ie[Ye];switch($t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$t[0]==="enter"?Xe++:Xe--,Wi=void 0;break}case"lineEndingBlank":{$t[0]==="enter"&&(Pr&&!Wi&&!Xe&&!ni&&(ni=Ye),Wi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wi=void 0}if(!Xe&&$t[0]==="enter"&&$t[1].type==="listItemPrefix"||Xe===-1&&$t[0]==="exit"&&($t[1].type==="listUnordered"||$t[1].type==="listOrdered")){if(Pr){let Tr=Ye;for(Mn=void 0;Tr--;){const Sn=ie[Tr];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;Mn&&(ie[Mn][1].type="lineEndingBlank",jt=!0),Sn[1].type="lineEnding",Mn=Tr}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}ni&&(!Mn||ni<Mn)&&(Pr._spread=!0),Pr.end=Object.assign({},Mn?ie[Mn][1].start:$t[1].end),ie.splice(Mn||Ye,0,["exit",Pr,$t[2]]),Ye++,Be++}if($t[1].type==="listItemPrefix"){const Tr={type:"listItem",_spread:!1,start:Object.assign({},$t[1].start),end:void 0};Pr=Tr,ie.splice(Ye,0,["enter",Tr,$t[2]]),Ye++,Be++,ni=void 0,Wi=!0}}}return ie[we][1]._spread=jt,Be}function a(ie,we){return Be;function Be(Ye){c.call(this,ie(Ye),Ye),we&&we.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ie,we,Be){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([we,Be||void 0]),ie.position={start:Yr(we.start),end:void 0}}function d(ie){return we;function we(Be){ie&&ie.call(this,Be),h.call(this,Be)}}function h(ie,we){const Be=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==ie.type&&(we?we.call(this,ie,Ye[0]):(Ye[1]||Wg).call(this,ie,Ye[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ms({start:ie.start,end:ie.end})+"): it’s not open");Be.position.end=Yr(ie.end)}function p(){return Ud(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function T(ie){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.lang=ie}function x(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie.replace(/(\r?\n|\r)$/g,"")}function O(ie){const we=this.resume(),Be=this.stack[this.stack.length-1];Be.label=we,Be.identifier=Wn(this.sliceSerialize(ie)).toLowerCase()}function R(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.title=ie}function H(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.url=ie}function W(ie){const we=this.stack[this.stack.length-1];if(!we.depth){const Be=this.sliceSerialize(ie).length;we.depth=Be}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function K(ie){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function de(){this.data.setextHeadingSlurpLineEnding=void 0}function ge(ie){const Be=this.stack[this.stack.length-1].children;let Ye=Be[Be.length-1];(!Ye||Ye.type!=="text")&&(Ye=Ol(),Ye.position={start:Yr(ie.start),end:void 0},Be.push(Ye)),this.stack.push(Ye)}function z(ie){const we=this.stack.pop();we.value+=this.sliceSerialize(ie),we.position.end=Yr(ie.end)}function ue(ie){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=we.children[we.children.length-1];Be.position.end=Yr(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(ge.call(this,ie),z.call(this,ie))}function he(){this.data.atHardBreak=!0}function ee(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie}function re(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie}function te(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.value=ie}function Te(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=we,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function oe(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=we,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function X(ie){const we=this.sliceSerialize(ie),Be=this.stack[this.stack.length-2];Be.label=Ok(we),Be.identifier=Wn(we).toLowerCase()}function se(){const ie=this.stack[this.stack.length-1],we=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ye=ie.children;Be.children=Ye}else Be.alt=we}function C(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.url=ie}function I(){const ie=this.resume(),we=this.stack[this.stack.length-1];we.title=ie}function G(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function xe(ie){const we=this.resume(),Be=this.stack[this.stack.length-1];Be.label=we,Be.identifier=Wn(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function Oe(ie){this.data.characterReferenceType=ie.type}function Re(ie){const we=this.sliceSerialize(ie),Be=this.data.characterReferenceType;let Ye;Be?(Ye=kg(we,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Hd(we);const Xe=this.stack[this.stack.length-1];Xe.value+=Ye}function He(ie){const we=this.stack.pop();we.position.end=Yr(ie.end)}function Se(ie){z.call(this,ie);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(ie)}function qe(ie){z.call(this,ie);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(ie)}function ut(){return{type:"blockquote",children:[]}}function pn(){return{type:"code",lang:null,meta:null,value:""}}function Yi(){return{type:"inlineCode",value:""}}function Zr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Jn(){return{type:"emphasis",children:[]}}function ya(){return{type:"heading",depth:0,children:[]}}function ba(){return{type:"break"}}function Wo(){return{type:"html",value:""}}function kl(){return{type:"image",title:null,url:"",alt:null}}function Go(){return{type:"link",title:null,url:"",children:[]}}function ei(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function ti(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Ta(){return{type:"paragraph",children:[]}}function Nl(){return{type:"strong",children:[]}}function Ol(){return{type:"text",value:""}}function Il(){return{type:"thematicBreak"}}}function Yr(e){return{line:e.line,column:e.column,offset:e.offset}}function Yg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Yg(e,r):Lk(e,r)}}function Lk(e,t){let n;for(n in t)if(qg.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 Wg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ms({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ms({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ms({start:t.start,end:t.end})+") is still open")}function Dk(e){const t=this;t.parser=n;function n(r){return Rk(r,ae(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function Mk(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 Fk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
-
`}]}function
|
|
28
|
-
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function
|
|
26
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function Ik(e){const r={constructs:Ig([Ck,...(e||{}).extensions||[]]),content:o(tC),defined:[],document:o(rC),flow:o(xk),lazy:{},string:o(vk),text:o(Sk)};return r;function o(a){return u;function u(c){return kk(r,a,c)}}}function Rk(e){for(;!Hg(e););return e}const Gg=/[\0\t\n\r]/g;function Pk(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,p,g,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(Gg.lastIndex=g,h=Gg.exec(a),T=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(T),!h){t=a.slice(g);break}if(y===10&&g===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<T&&(d.push(a.slice(g,T)),e+=T-g),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}g=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Lk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Dk(e){return e.replace(Lk,Mk)}function Mk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return Rg(n.slice(a?2:1),a?16:10)}return jd(n)||e}const Kg={}.hasOwnProperty;function Fk(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Bk(n)(Rk(Ik(n).document().write(Pk()(e,t,!0))))}function Bk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Qo),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Ta),blockQuote:a(ut),characterEscape:de,characterReference:de,codeFenced:a(pn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(pn,u),codeText:a(Wi,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(ei),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Jn),hardBreakEscape:a(xa),hardBreakTrailing:a(xa),htmlFlow:a(Ko,u),htmlFlowData:de,htmlText:a(Ko,u),htmlTextData:de,image:a(Ol),label:u,link:a(Qo),listItem:a(ni),listItemValue:T,listOrdered:a(ti,g),listUnordered:a(ti),paragraph:a(wa),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ta),strong:a(Il),thematicBreak:a(Pl)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:qe,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Re,characterReference:He,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:z,codeIndented:d(C),codeText:d(Te),codeTextData:z,data:z,definition:d(),definitionDestinationString:U,definitionLabelString:k,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ae),htmlFlowData:z,htmlText:d(se),htmlTextData:z,image:d(ee),label:q,labelText:V,lineEnding:oe,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:be,resourceDestinationString:S,resourceTitleString:I,resource:W,setextHeading:d(ce),setextHeadingLineSequence:X,setextHeadingText:F,strong:d(),thematicBreak:d()}};Qg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(re){let xe={type:"root",children:[]};const Be={stack:[xe],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Ye=[];let Xe=-1;for(;++Xe<re.length;)if(re[Xe][1].type==="listOrdered"||re[Xe][1].type==="listUnordered")if(re[Xe][0]==="enter")Ye.push(Xe);else{const jt=Ye.pop();Xe=o(re,jt,Xe)}for(Xe=-1;++Xe<re.length;){const jt=t[re[Xe][0]];Kg.call(jt,re[Xe][1].type)&&jt[re[Xe][1].type].call(Object.assign({sliceSerialize:re[Xe][2].sliceSerialize},Be),re[Xe][1])}if(Be.tokenStack.length>0){const jt=Be.tokenStack[Be.tokenStack.length-1];(jt[1]||Xg).call(Be,void 0,jt[0])}for(xe.position={start:Wr(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:Wr(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)xe=t.transforms[Xe](xe)||xe;return xe}function o(re,xe,Be){let Ye=xe-1,Xe=-1,jt=!1,Lr,Mn,ri,Gi;for(;++Ye<=Be;){const $t=re[Ye];switch($t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$t[0]==="enter"?Xe++:Xe--,Gi=void 0;break}case"lineEndingBlank":{$t[0]==="enter"&&(Lr&&!Gi&&!Xe&&!ri&&(ri=Ye),Gi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gi=void 0}if(!Xe&&$t[0]==="enter"&&$t[1].type==="listItemPrefix"||Xe===-1&&$t[0]==="exit"&&($t[1].type==="listUnordered"||$t[1].type==="listOrdered")){if(Lr){let xr=Ye;for(Mn=void 0;xr--;){const Sn=re[xr];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;Mn&&(re[Mn][1].type="lineEndingBlank",jt=!0),Sn[1].type="lineEnding",Mn=xr}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}ri&&(!Mn||ri<Mn)&&(Lr._spread=!0),Lr.end=Object.assign({},Mn?re[Mn][1].start:$t[1].end),re.splice(Mn||Ye,0,["exit",Lr,$t[2]]),Ye++,Be++}if($t[1].type==="listItemPrefix"){const xr={type:"listItem",_spread:!1,start:Object.assign({},$t[1].start),end:void 0};Lr=xr,re.splice(Ye,0,["enter",xr,$t[2]]),Ye++,Be++,ri=void 0,Gi=!0}}}return re[xe][1]._spread=jt,Be}function a(re,xe){return Be;function Be(Ye){c.call(this,re(Ye),Ye),xe&&xe.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(re,xe,Be){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([xe,Be||void 0]),re.position={start:Wr(xe.start),end:void 0}}function d(re){return xe;function xe(Be){re&&re.call(this,Be),h.call(this,Be)}}function h(re,xe){const Be=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==re.type&&(xe?xe.call(this,re,Ye[0]):(Ye[1]||Xg).call(this,re,Ye[0]));else throw new Error("Cannot close `"+re.type+"` ("+Bs({start:re.start,end:re.end})+"): it’s not open");Be.position.end=Wr(re.end)}function p(){return zd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function T(re){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function y(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=re}function w(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=re}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re.replace(/(\r?\n|\r)$/g,"")}function k(re){const xe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=xe,Be.identifier=Wn(this.sliceSerialize(re)).toLowerCase()}function R(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.title=re}function U(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.url=re}function Y(re){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Be=this.sliceSerialize(re).length;xe.depth=Be}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function X(re){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function de(re){const Be=this.stack[this.stack.length-1].children;let Ye=Be[Be.length-1];(!Ye||Ye.type!=="text")&&(Ye=Rl(),Ye.position={start:Wr(re.start),end:void 0},Be.push(Ye)),this.stack.push(Ye)}function z(re){const xe=this.stack.pop();xe.value+=this.sliceSerialize(re),xe.position.end=Wr(re.end)}function oe(re){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=xe.children[xe.children.length-1];Be.position.end=Wr(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(de.call(this,re),z.call(this,re))}function he(){this.data.atHardBreak=!0}function ae(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re}function se(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re}function Te(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re}function Ce(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=xe,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function ee(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=xe,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function V(re){const xe=this.sliceSerialize(re),Be=this.stack[this.stack.length-2];Be.label=Dk(xe),Be.identifier=Wn(xe).toLowerCase()}function q(){const re=this.stack[this.stack.length-1],xe=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ye=re.children;Be.children=Ye}else Be.alt=xe}function S(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.url=re}function I(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.title=re}function W(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function be(re){const xe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=xe,Be.identifier=Wn(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function Oe(re){this.data.characterReferenceType=re.type}function Re(re){const xe=this.sliceSerialize(re),Be=this.data.characterReferenceType;let Ye;Be?(Ye=Rg(xe,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=jd(xe);const Xe=this.stack[this.stack.length-1];Xe.value+=Ye}function He(re){const xe=this.stack.pop();xe.position.end=Wr(re.end)}function ve(re){z.call(this,re);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(re)}function qe(re){z.call(this,re);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(re)}function ut(){return{type:"blockquote",children:[]}}function pn(){return{type:"code",lang:null,meta:null,value:""}}function Wi(){return{type:"inlineCode",value:""}}function ei(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Jn(){return{type:"emphasis",children:[]}}function Ta(){return{type:"heading",depth:0,children:[]}}function xa(){return{type:"break"}}function Ko(){return{type:"html",value:""}}function Ol(){return{type:"image",title:null,url:"",alt:null}}function Qo(){return{type:"link",title:null,url:"",children:[]}}function ti(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function ni(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function wa(){return{type:"paragraph",children:[]}}function Il(){return{type:"strong",children:[]}}function Rl(){return{type:"text",value:""}}function Pl(){return{type:"thematicBreak"}}}function Wr(e){return{line:e.line,column:e.column,offset:e.offset}}function Qg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qg(e,r):Uk(e,r)}}function Uk(e,t){let n;for(n in t)if(Kg.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 Xg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Bs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Bs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Bs({start:t.start,end:t.end})+") is still open")}function Hk(e){const t=this;t.parser=n;function n(r){return Fk(r,ie(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function zk(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 jk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
+
`}]}function $k(e,t){const n=t.value?t.value+`
|
|
28
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Vk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=To(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Wk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Jg(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function Kk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jg(e,t);const o={src:To(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function Qk(e,t){const n={src:To(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Xk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Jk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jg(e,t);const o={href:To(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Zk(e,t){const n={href:To(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e3(e,t,n){const r=e.all(t),o=n?t3(n):Zg(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
29
29
|
`}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
30
|
-
`});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function
|
|
30
|
+
`});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function t3(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=Zg(n[r])}return t}function Zg(e){const t=e.spread;return t==null?e.children.length>1:t}function n3(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];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 r3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function o3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function s3(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=cr(t.children[1]),d=Pu(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function a3(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,c=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const g=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let w={type:"element",tagName:a,properties:T,children:[]};g&&(w.children=e.all(g),e.patch(g,w),w=e.applyData(g,w)),h.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function u3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const e1=9,t1=32;function l3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(n1(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(n1(t.slice(o),o>0,!1)),a.join("")}function n1(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===e1||a===t1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===e1||a===t1;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function c3(e,t){const n={type:"text",value:l3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function d3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const f3={blockquote:zk,break:jk,code:$k,delete:Vk,emphasis:qk,footnoteReference:Yk,heading:Wk,html:Gk,imageReference:Kk,image:Qk,inlineCode:Xk,linkReference:Jk,link:Zk,listItem:e3,list:n3,paragraph:r3,root:i3,strong:o3,table:s3,tableCell:u3,tableRow:a3,text:c3,thematicBreak:d3,toml:Bu,yaml:Bu,definition:Bu,footnoteDefinition:Bu};function Bu(){}const r1=-1,Uu=0,$s=1,Hu=2,Gd=3,Kd=4,Qd=5,Xd=6,i1=7,o1=8,s1=typeof self=="object"?self:globalThis,h3=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case Uu:case r1:return n(u,o);case $s:{const c=n([],o);for(const d of u)c.push(r(d));return c}case Hu:{const c=n({},o);for(const[d,h]of u)c[r(d)]=r(h);return c}case Gd:return n(new Date(u),o);case Kd:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Qd:{const c=n(new Map,o);for(const[d,h]of u)c.set(r(d),r(h));return c}case Xd:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case i1:{const{name:c,message:d}=u;return n(new s1[c](d),o)}case o1:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new s1[a](u),o)};return r},a1=e=>h3(new Map,e)(0),wo="",{toString:p3}={},{keys:m3}=Object,Vs=e=>{const t=typeof e;if(t!=="object"||!e)return[Uu,t];const n=p3.call(e).slice(8,-1);switch(n){case"Array":return[$s,wo];case"Object":return[Hu,wo];case"Date":return[Gd,wo];case"RegExp":return[Kd,wo];case"Map":return[Qd,wo];case"Set":return[Xd,wo];case"DataView":return[$s,n]}return n.includes("Array")?[$s,n]:n.includes("Error")?[i1,n]:[Hu,n]},zu=([e,t])=>e===Uu&&(t==="function"||t==="symbol"),g3=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=Vs(u);switch(c){case Uu:{let p=u;switch(d){case"bigint":c=o1,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([r1],u)}return o([c,p],u)}case $s:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const p=[],g=o([c,p],u);for(const T of u)p.push(a(T));return g}case Hu:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],g=o([c,p],u);for(const T of m3(u))(e||!zu(Vs(u[T])))&&p.push([a(T),a(u[T])]);return g}case Gd:return o([c,u.toISOString()],u);case Kd:{const{source:p,flags:g}=u;return o([c,{source:p,flags:g}],u)}case Qd:{const p=[],g=o([c,p],u);for(const[T,y]of u)(e||!(zu(Vs(T))||zu(Vs(y))))&&p.push([a(T),a(y)]);return g}case Xd:{const p=[],g=o([c,p],u);for(const T of u)(e||!zu(Vs(T)))&&p.push(a(T));return g}}const{message:h}=u;return o([c,{name:d,message:h}],u)};return a},u1=(e,{json:t,lossy:n}={})=>{const r=[];return g3(!(t||n),!!t,new Map,r)(e),r},Ri=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?a1(u1(e,t)):structuredClone(e):(e,t)=>a1(u1(e,t));function E3(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 y3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function b3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||E3,r=e.options.footnoteBackLabel||y3,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),g=String(h.identifier).toUpperCase(),T=To(g.toLowerCase());let y=0;const w=[],v=e.footnoteCounts.get(g);for(;v!==void 0&&++y<=v;){w.length>0&&w.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),w.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 A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const k=A.children[A.children.length-1];k&&k.type==="text"?k.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...w)}else p.push(...w);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(h,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ie(B({},Ri(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
|
|
31
31
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
32
|
-
`}]}}const
|
|
32
|
+
`}]}}const ju=(function(e){if(e==null)return _3;if(typeof e=="function")return $u(e);if(typeof e=="object")return Array.isArray(e)?T3(e):x3(e);if(typeof e=="string")return w3(e);throw new Error("Expected function, string, or object as test")});function T3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ju(e[n]);return $u(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function x3(e){const t=e;return $u(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function w3(e){return $u(t);function t(n){return n&&n.type===e}}function $u(e){return t;function t(n,r,o){return!!(v3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function _3(){return!0}function v3(e){return e!==null&&typeof e=="object"&&"type"in e}function UF(e){return e}const l1=[],S3=!0,Jd=!1,A3="skip";function c1(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=ju(o),u=r?-1:1;c(e,void 0,[])();function c(d,h,p){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const y=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=l1,w,v,A;if((!t||a(d,h,p[p.length-1]||void 0))&&(y=C3(n(d,p)),y[0]===Jd))return y;if("children"in d&&d.children){const C=d;if(C.children&&y[0]!==A3)for(v=(r?C.children.length:-1)+u,A=p.concat(C);v>-1&&v<C.children.length;){const k=C.children[v];if(w=c(k,v,A)(),w[0]===Jd)return w;v=typeof w[1]=="number"?w[1]:v+u}}return y}}}function C3(e){return Array.isArray(e)?e:typeof e=="number"?[S3,e]:e==null?l1:[e]}function Vu(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),c1(e,a,c,o);function c(d,h){const p=h[h.length-1],g=p?p.children.indexOf(d):void 0;return u(d,g,p)}}const Zd={}.hasOwnProperty,k3={};function N3(e,t){const n=t||k3,r=new Map,o=new Map,a=new Map,u=B(B({},f3),n.handlers),c={all:h,applyData:I3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:O3,wrap:P3};return Vu(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?r:o,T=String(p.identifier).toUpperCase();g.has(T)||g.set(T,p)}}),c;function d(p,g){const T=p.type,y=c.handlers[T];if(Zd.call(c.handlers,T)&&y)return y(c,p,g);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const v=p,{children:A}=v,C=sn(v,["children"]),k=Ri(C);return k.children=c.all(p),k}return Ri(p)}return(c.options.unknownHandler||R3)(c,p,g)}function h(p){const g=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const w=c.one(T[y],p);if(w){if(y&&T[y-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=d1(w.value)),!Array.isArray(w)&&w.type==="element")){const v=w.children[0];v&&v.type==="text"&&(v.value=d1(v.value))}Array.isArray(w)?g.push(...w):g.push(w)}}}return g}}function O3(e,t){e.position&&(t.position=Tg(e))}function I3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=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,Ri(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function R3(e,t){const n=t.data||{},r="value"in t&&!(Zd.call(n,"hProperties")||Zd.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 P3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
33
33
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
34
34
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
35
|
-
`}),n}function
|
|
36
|
-
`},o),a}function N3(e,t){return e&&"run"in e?function(n,r){return $e(this,null,function*(){const o=u1(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return u1(n,B({file:r},e||t))}}function l1(e){if(e)throw e}var Jd,c1;function O3(){if(c1)return Jd;c1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!g)return!1;var T;for(T in h);return typeof T=="undefined"||e.call(h,T)},u=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return Jd=function d(){var h,p,g,T,y,x,v=arguments[0],S=1,A=arguments.length,O=!1;for(typeof v=="boolean"&&(O=v,v=arguments[1]||{},S=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});S<A;++S)if(h=arguments[S],h!=null)for(p in h)g=c(v,p),T=c(h,p),v!==T&&(O&&T&&(a(T)||(y=o(T)))?(y?(y=!1,x=g&&o(g)?g:[]):x=g&&a(g)?g:{},u(v,{name:p,newValue:d(O,x,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},Jd}var I3=O3();const Zd=We(I3);function ef(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 R3(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...h){const p=e[++a];let g=-1;if(d){u(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,p?P3(p,c)(...h):u(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function P3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const cr={basename:L3,dirname:D3,extname:M3,join:F3,sep:"/"};function L3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');$s(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function D3(e){if($s(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 M3(e){$s(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function F3(...e){let t=-1,n;for(;++t<e.length;)$s(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":B3(n)}function B3(e){$s(e);const t=e.codePointAt(0)===47;let n=U3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function U3(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==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("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function $s(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const H3={cwd:z3};function z3(){return"/"}function tf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function j3(e){if(typeof e=="string")e=new URL(e);else if(!tf(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 $3(e)}function $3(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const nf=["history","path","basename","stem","extname","dirname"];class d1{constructor(t){let n;t?tf(t)?n={path:t}:typeof t=="string"||V3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":H3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nf.length;){const a=nf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)nf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?cr.basename(this.path):void 0}set basename(t){of(t,"basename"),rf(t,"basename"),this.path=cr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cr.dirname(this.path):void 0}set dirname(t){f1(this.basename,"dirname"),this.path=cr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cr.extname(this.path):void 0}set extname(t){if(rf(t,"extname"),f1(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=cr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tf(t)&&(t=j3(t)),of(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cr.basename(this.path,this.extname):void 0}set stem(t){of(t,"stem"),rf(t,"stem"),this.path=cr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Wt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function rf(e,t){if(e&&e.includes(cr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cr.sep+"`")}function of(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function f1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function V3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const q3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Y3={}.hasOwnProperty;class sf extends q3{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=R3()}copy(){const t=new sf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(lf("data",this.frozen),this.namespace[t]=n,this):Y3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(lf("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=$u(t),r=this.parser||this.Parser;return af("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),af("process",this.parser||this.Parser),uf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=$u(t),d=r.parse(c);r.run(d,c,function(p,g,T){if(p||!g||!T)return h(p);const y=g,x=r.stringify(y,T);K3(x)?T.value=x:T.result=x,h(p,T)});function h(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),af("processSync",this.parser||this.Parser),uf("processSync",this.compiler||this.Compiler),this.process(t,o),p1("processSync","process",n),r;function o(a,u){n=!0,l1(a),r=u}}run(t,n,r){h1(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=$u(n);o.run(t,d,h);function h(p,g,T){const y=g||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),p1("runSync","run",r),o;function a(u,c){l1(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=$u(n),o=this.compiler||this.Compiler;return uf("stringify",o),h1(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(lf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...g]=h;d(p,g)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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");c(h.plugins),h.settings&&(o.settings=Zd(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const g=h[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let g=-1,T=-1;for(;++g<r.length;)if(r[g][0]===h){T=g;break}if(T===-1)r.push([h,...p]);else if(p.length>0){let[y,...x]=p;const v=r[T][1];ef(v)&&ef(y)&&(y=Zd(!0,v,y)),r[T]=[h,y,...x]}}}}const W3=new sf().freeze();function af(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function lf(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 h1(e){if(!ef(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function p1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $u(e){return G3(e)?e:new d1(e)}function G3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function K3(e){return typeof e=="string"||Q3(e)}function Q3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const X3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",m1=[],g1={allowDangerousHtml:!0},J3=/^(https?|ircs?|mailto|xmpp)$/i,Z3=[{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 E1(e){const t=eN(e),n=tN(e);return nN(t.runSync(t.parse(n),n),e)}function eN(e){const t=e.rehypePlugins||m1,n=e.remarkPlugins||m1,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),g1):g1;return W3().use(Dk).use(n).use(N3,r).use(t)}function tN(e){const t=e.children||"",n=new d1;return typeof t=="string"&&(n.value=t),n}function nN(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||rN;for(const p of Z3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+X3+p.id,void 0);return ju(e,h),CA(e,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function h(p,g,T){if(p.type==="raw"&&T&&typeof g=="number")return u?T.children.splice(g,1):T.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Bd)if(Object.hasOwn(Bd,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],v=Bd[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,T)),y&&T&&typeof g=="number")return c&&p.children?T.children.splice(g,1,...p.children):T.children.splice(g,1),g}}}function rN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||J3.test(e.slice(0,t))?e:""}const y1=/[#.]/g;function iN(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){y1.lastIndex=o;const c=y1.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function b1(e,t,n){const r=n?uN(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const h=u;c.unshift(h)}else{d=iN(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,oN(u))c.unshift(u);else for(const[g,T]of Object.entries(u))sN(e,d.properties,g,T)}for(const h of c)cf(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function oN(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 o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function sN(e,t,n,r){const o=Rd(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"?o.spaceSeparated?a=lg(r):o.commaSeparated?a=Q0(r):o.commaOrSpaceSeparated?a=lg(Q0(r).join(" ")):a=T1(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?aN(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(T1(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function cf(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)cf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?cf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function T1(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ps(n)===Ps(t)))return!0}return n}function aN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function uN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const lN=["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"],cN=b1(Ou,"div"),dN=b1(go,"g",lN);function fN(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=x1(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(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 c=n[n.length-1],d=x1(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function x1(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 Ri={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/"},w1={}.hasOwnProperty,hN=Object.prototype;function pN(e,t){const n=t||{};return df({file:n.file||void 0,location:!1,schema:n.space==="svg"?go:Ou,verbose:n.verbose||!1},e)}function df(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Vu(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:_1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=fN(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Vu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Vu(e,r,n),n}default:return n=mN(e,t),n}}function _1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=df(e,t[n]);r.push(o)}return r}function mN(e,t){const n=e.schema;e.schema=t.namespaceURI===Ri.svg?go:Ou;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;w1.call(hN,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?dN:cN)(t.tagName,o,_1(e,t.childNodes));if(Vu(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&xo(d.startTag),p=d&&d.endTag&&xo(d.endTag),g=df(e,c.content);h&&p&&e.file&&(g.position={start:h.end,end:p.start}),u.content=g}return e.schema=n,u}function Vu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=gN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function gN(e,t,n){const r=xo(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)w1.call(n.attrs,u)&&(a[Rd(e.schema,u).property]=xo(n.attrs[u]));n.startTag;const c=xo(n.startTag),d=n.endTag?xo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function xo(e){const t=v1({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=v1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function v1(e){return e.line&&e.column?e:void 0}class Vs{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Vs.prototype.property={},Vs.prototype.normal={},Vs.prototype.space=null;function S1(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Vs(n,r,t)}function ff(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let EN=0;const ze=Pi(),kt=Pi(),A1=Pi(),ye=Pi(),st=Pi(),wo=Pi(),wn=Pi();function Pi(){return ru(2,++EN)}const hf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:kt,commaOrSpaceSeparated:wn,commaSeparated:wo,number:ye,overloadedBoolean:A1,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),pf=Object.keys(hf);class mf extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),C1(this,"space",o),typeof r=="number")for(;++a<pf.length;){const u=pf[a];C1(this,pf[a],(r&hf[u])===hf[u])}}}mf.prototype.defined=!0;function C1(e,t,n){n&&(e[t]=n)}const yN={}.hasOwnProperty;function _o(e){const t={},n={};let r;for(r in e.properties)if(yN.call(e.properties,r)){const o=e.properties[r],a=new mf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ff(r)]=r,n[ff(a.attribute)]=r}return new Vs(t,n,e.space)}const k1=_o({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),N1=_o({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function O1(e,t){return t in e?e[t]:t}function I1(e,t){return O1(e,t.toLowerCase())}const R1=_o({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:I1,properties:{xmlns:null,xmlnsXLink:null}}),P1=_o({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:st,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:ye,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:st,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:kt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null}}),bN=_o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:I1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wo,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:ye,colSpan:null,content:null,contentEditable:kt,controls:ze,controlsList:st,coords:ye|wo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:A1,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:ye,hidden:ze,high:ye,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:ye,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:ye,rowSpan:ye,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:kt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:ye,security:null,unselectable:null}}),TN=_o({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:O1,properties:{about:wn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:st,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:wo,g2:wo,glyphName:wo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),xN=/^data[-\w.:]+$/i,L1=/-[a-z]/g,wN=/[A-Z]/g;function _N(e,t){const n=ff(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&xN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(L1,SN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!L1.test(a)){let u=a.replace(wN,vN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=mf}return new o(r,t)}function vN(e){return"-"+e.toLowerCase()}function SN(e){return e.charAt(1).toUpperCase()}const AN=S1([N1,k1,R1,P1,bN],"html"),D1=S1([N1,k1,R1,P1,TN],"svg"),M1={}.hasOwnProperty;function F1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&M1.call(o,e)){const d=String(o[e]);u=M1.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const CN={},kN={}.hasOwnProperty,B1=F1("type",{handlers:{root:ON,element:DN,text:PN,comment:LN,doctype:RN}});function NN(e,t){const r=(t||CN).space;return B1(e,r==="svg"?D1:AN)}function ON(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=gf(e.children,n,t),vo(e,n),n}function IN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=gf(e.children,n,t),vo(e,n),n}function RN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return vo(e,t),t}function PN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return vo(e,t),t}function LN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return vo(e,t),t}function DN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=D1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&kN.call(e.properties,a)){const d=MN(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ri[u],childNodes:[],parentNode:null};return c.childNodes=gf(e.children,c,r),vo(e,c),e.tagName==="template"&&e.content&&(c.content=IN(e.content,r)),c}function MN(e,t,n){const r=_N(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?X0(n):cg(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=Ri[r.space]}return o}function gf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=B1(e[r],n);a.parentNode=t,o.push(a)}return o}function vo(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 FN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],BN=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]),ft="�";var k;(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"})(k||(k={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function U1(e){return e>=55296&&e<=57343}function UN(e){return e>=56320&&e<=57343}function HN(e,t){return(e-55296)*1024+9216+t}function H1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function z1(e){return e>=64976&&e<=65007||BN.has(e)}var ne;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ne||(ne={}));const zN=65536;class jN{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=zN,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_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(UN(n))return this.pos++,this._addGap(),HN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;const r=this.html.charCodeAt(n);return r===k.CARRIAGE_RETURN?k.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,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,U1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){H1(t)?this._err(ne.controlCharacterInInputStream):z1(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ve;(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"})(Ve||(Ve={}));function j1(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 $N=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))),VN=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 qN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=VN.get(e))!==null&&t!==void 0?t:e}var Dt;(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"})(Dt||(Dt={}));const YN=32;var Wr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Wr||(Wr={}));function Ef(e){return e>=Dt.ZERO&&e<=Dt.NINE}function WN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_F||e>=Dt.LOWER_A&&e<=Dt.LOWER_F}function GN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_Z||e>=Dt.LOWER_A&&e<=Dt.LOWER_Z||Ef(e)}function KN(e){return e===Dt.EQUALS||GN(e)}var Mt;(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"})(Mt||(Mt={}));var Cr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Cr||(Cr={}));class QN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cr.Strict}startEntity(t){this.decodeMode=t,this.state=Mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Mt.EntityStart:return t.charCodeAt(n)===Dt.NUM?(this.state=Mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Mt.NamedEntity,this.stateNamedEntity(t,n));case Mt.NumericStart:return this.stateNumericStart(t,n);case Mt.NumericDecimal:return this.stateNumericDecimal(t,n);case Mt.NumericHex:return this.stateNumericHex(t,n);case Mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|YN)===Dt.LOWER_X?(this.state=Mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Ef(o)||WN(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Ef(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Dt.SEMI)this.consumed+=1;else if(this.decodeMode===Cr.Strict)return 0;return this.emitCodePoint(qN(this.result),this.consumed),this.errors&&(t!==Dt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Wr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=XN(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Cr.Attribute&&(a===0||KN(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Wr.VALUE_LENGTH)>>14,a!==0){if(u===Dt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Cr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Wr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Wr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Mt.NamedEntity:return this.result!==0&&(this.decodeMode!==Cr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Mt.NumericDecimal:return this.emitNumericEntity(0,2);case Mt.NumericHex:return this.emitNumericEntity(0,3);case Mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Mt.EntityStart:return 0}}}function XN(e,t,n,r){const o=(t&Wr.BRANCH_LENGTH)>>7,a=t&Wr.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var ce;(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/"})(ce||(ce={}));var Li;(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"})(Li||(Li={}));var Ln;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));var Y;(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"})(Y||(Y={}));var m;(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"})(m||(m={}));const JN=new Map([[Y.A,m.A],[Y.ADDRESS,m.ADDRESS],[Y.ANNOTATION_XML,m.ANNOTATION_XML],[Y.APPLET,m.APPLET],[Y.AREA,m.AREA],[Y.ARTICLE,m.ARTICLE],[Y.ASIDE,m.ASIDE],[Y.B,m.B],[Y.BASE,m.BASE],[Y.BASEFONT,m.BASEFONT],[Y.BGSOUND,m.BGSOUND],[Y.BIG,m.BIG],[Y.BLOCKQUOTE,m.BLOCKQUOTE],[Y.BODY,m.BODY],[Y.BR,m.BR],[Y.BUTTON,m.BUTTON],[Y.CAPTION,m.CAPTION],[Y.CENTER,m.CENTER],[Y.CODE,m.CODE],[Y.COL,m.COL],[Y.COLGROUP,m.COLGROUP],[Y.DD,m.DD],[Y.DESC,m.DESC],[Y.DETAILS,m.DETAILS],[Y.DIALOG,m.DIALOG],[Y.DIR,m.DIR],[Y.DIV,m.DIV],[Y.DL,m.DL],[Y.DT,m.DT],[Y.EM,m.EM],[Y.EMBED,m.EMBED],[Y.FIELDSET,m.FIELDSET],[Y.FIGCAPTION,m.FIGCAPTION],[Y.FIGURE,m.FIGURE],[Y.FONT,m.FONT],[Y.FOOTER,m.FOOTER],[Y.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Y.FORM,m.FORM],[Y.FRAME,m.FRAME],[Y.FRAMESET,m.FRAMESET],[Y.H1,m.H1],[Y.H2,m.H2],[Y.H3,m.H3],[Y.H4,m.H4],[Y.H5,m.H5],[Y.H6,m.H6],[Y.HEAD,m.HEAD],[Y.HEADER,m.HEADER],[Y.HGROUP,m.HGROUP],[Y.HR,m.HR],[Y.HTML,m.HTML],[Y.I,m.I],[Y.IMG,m.IMG],[Y.IMAGE,m.IMAGE],[Y.INPUT,m.INPUT],[Y.IFRAME,m.IFRAME],[Y.KEYGEN,m.KEYGEN],[Y.LABEL,m.LABEL],[Y.LI,m.LI],[Y.LINK,m.LINK],[Y.LISTING,m.LISTING],[Y.MAIN,m.MAIN],[Y.MALIGNMARK,m.MALIGNMARK],[Y.MARQUEE,m.MARQUEE],[Y.MATH,m.MATH],[Y.MENU,m.MENU],[Y.META,m.META],[Y.MGLYPH,m.MGLYPH],[Y.MI,m.MI],[Y.MO,m.MO],[Y.MN,m.MN],[Y.MS,m.MS],[Y.MTEXT,m.MTEXT],[Y.NAV,m.NAV],[Y.NOBR,m.NOBR],[Y.NOFRAMES,m.NOFRAMES],[Y.NOEMBED,m.NOEMBED],[Y.NOSCRIPT,m.NOSCRIPT],[Y.OBJECT,m.OBJECT],[Y.OL,m.OL],[Y.OPTGROUP,m.OPTGROUP],[Y.OPTION,m.OPTION],[Y.P,m.P],[Y.PARAM,m.PARAM],[Y.PLAINTEXT,m.PLAINTEXT],[Y.PRE,m.PRE],[Y.RB,m.RB],[Y.RP,m.RP],[Y.RT,m.RT],[Y.RTC,m.RTC],[Y.RUBY,m.RUBY],[Y.S,m.S],[Y.SCRIPT,m.SCRIPT],[Y.SEARCH,m.SEARCH],[Y.SECTION,m.SECTION],[Y.SELECT,m.SELECT],[Y.SOURCE,m.SOURCE],[Y.SMALL,m.SMALL],[Y.SPAN,m.SPAN],[Y.STRIKE,m.STRIKE],[Y.STRONG,m.STRONG],[Y.STYLE,m.STYLE],[Y.SUB,m.SUB],[Y.SUMMARY,m.SUMMARY],[Y.SUP,m.SUP],[Y.TABLE,m.TABLE],[Y.TBODY,m.TBODY],[Y.TEMPLATE,m.TEMPLATE],[Y.TEXTAREA,m.TEXTAREA],[Y.TFOOT,m.TFOOT],[Y.TD,m.TD],[Y.TH,m.TH],[Y.THEAD,m.THEAD],[Y.TITLE,m.TITLE],[Y.TR,m.TR],[Y.TRACK,m.TRACK],[Y.TT,m.TT],[Y.U,m.U],[Y.UL,m.UL],[Y.SVG,m.SVG],[Y.VAR,m.VAR],[Y.WBR,m.WBR],[Y.XMP,m.XMP]]);function So(e){var t;return(t=JN.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const pe=m,ZN={[ce.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[ce.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[ce.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},yf=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var P;(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"})(P||(P={}));const wt={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function eO(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function qs(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function tO(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function Gr(e){return tO(e)||qs(e)}function $1(e){return Gr(e)||eO(e)}function qu(e){return e+32}function V1(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function q1(e){return V1(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function nO(e){return e===k.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:U1(e)?ne.surrogateCharacterReference:z1(e)?ne.noncharacterCharacterReference:H1(e)||e===k.CARRIAGE_RETURN?ne.controlCharacterReference:null}class rO{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=P.DATA,this.returnState=P.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new jN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new QN($N,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=nO(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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:Ve.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ve.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ve.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ve.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(j1(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=So(t.tagName),t.type===Ve.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ve.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ve.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ve.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:Ve.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=V1(t)?Ve.WHITESPACE_CHARACTER:t===k.NULL?Ve.NULL_CHARACTER:Ve.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ve.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=P.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Cr.Attribute:Cr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case P.DATA:{this._stateData(t);break}case P.RCDATA:{this._stateRcdata(t);break}case P.RAWTEXT:{this._stateRawtext(t);break}case P.SCRIPT_DATA:{this._stateScriptData(t);break}case P.PLAINTEXT:{this._statePlaintext(t);break}case P.TAG_OPEN:{this._stateTagOpen(t);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case P.TAG_NAME:{this._stateTagName(t);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case P.BOGUS_COMMENT:{this._stateBogusComment(t);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case P.COMMENT_START:{this._stateCommentStart(t);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case P.COMMENT:{this._stateComment(t);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case P.COMMENT_END:{this._stateCommentEnd(t);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case P.DOCTYPE:{this._stateDoctype(t);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case P.CDATA_SECTION:{this._stateCdataSection(t);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=P.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Gr(t))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Gr(t))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=P.DATA;break}case k.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(qs(t)?qu(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=P.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Gr(t)?(this.state=P.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=P.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=P.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=P.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=P.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=P.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Gr(t)?(this.state=P.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=P.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=P.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=P.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Gr(t)?(this.state=P.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Gr(t)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Gr(t)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&q1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case k.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&q1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=P.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint(qs(t)?qu(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=P.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=P.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=P.DATA,this.emitCurrentTagToken();break}default:this.state=P.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=P.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ft;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fn.DASH_DASH,!0)?(this._createCommentToken(fn.DASH_DASH.length+1),this.state=P.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=P.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=P.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=P.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=P.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{n.data+="<",this.state=P.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ft;break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{n.data+="!",this.state=P.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=P.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=P.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err(ne.nestedComment),this.state=P.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case k.EXCLAMATION_MARK:{this.state=P.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{n.data+="-";break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{n.data+="--!",this.state=P.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=P.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(qs(t))this._createDoctypeToken(String.fromCharCode(qu(t))),this.state=P.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=P.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=P.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=ft;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(qs(t)?qu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=P.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=P.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ft;break}case k.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.NULL:{this._err(ne.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=P.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=P.CDATA_SECTION_END:(this._emitChars("]"),this.state=P.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=P.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(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$1(this.preprocessor.peek(1))?P.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Y1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),W1=new Set([...Y1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Yu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),iO=new Set([...Yu,m.OL,m.UL]),oO=new Set([...Yu,m.BUTTON]),G1=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),K1=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),sO=new Set([m.TR,m.TEMPLATE,m.HTML]),aO=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),uO=new Set([m.TABLE,m.TEMPLATE,m.HTML]),lO=new Set([m.TD,m.TH]);class cO{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=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ce.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==ce.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(yf,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(lO,ce.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(uO,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(aO,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(sO,ce.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]===m.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]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ce.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ce.SVG:{if(K1.has(o))return!1;break}case ce.MATHML:{if(G1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Yu)}hasInListItemScope(t){return this.hasInDynamicScope(t,iO)}hasInButtonScope(t){return this.hasInDynamicScope(t,oO)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ce.HTML:{if(yf.has(n))return!0;if(Yu.has(n))return!1;break}case ce.SVG:{if(K1.has(n))return!1;break}case ce.MATHML:{if(G1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ce.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Y1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&W1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&W1.has(this.currentTagId);)this.pop()}}const bf=3;var dr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(dr||(dr={}));const Q1={type:dr.Marker};class dO{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===dr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const p=this.treeAdapter.getAttrList(h);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<bf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<bf)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=bf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Q1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:dr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:dr.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(Q1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===dr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===dr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===dr.Element&&n.element===t)}}const Kr={createDocument(){return{nodeName:"#document",mode:Ln.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Kr.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(Kr.isTextNode(n)){n.value+=t;return}}Kr.appendChild(e,Kr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Kr.isTextNode(r)?r.value+=t:Kr.insertBefore(e,Kr.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=B(B({},e.sourceCodeLocation),t)}},X1="html",fO="about:legacy-compat",hO="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",J1=["+//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//"],pO=[...J1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],mO=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Z1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],gO=[...Z1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function eE(e,t){return t.some(n=>e.startsWith(n))}function EO(e){return e.name===X1&&e.publicId===null&&(e.systemId===null||e.systemId===fO)}function yO(e){if(e.name!==X1)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===hO)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),mO.has(n))return Ln.QUIRKS;let r=t===null?pO:J1;if(eE(n,r))return Ln.QUIRKS;if(r=t===null?Z1:gO,eE(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const tE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},bO="definitionurl",TO="definitionURL",xO=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])),wO=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ce.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ce.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ce.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ce.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ce.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ce.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ce.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ce.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ce.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ce.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ce.XMLNS}]]),_O=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])),vO=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function SO(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Li.COLOR||r===Li.SIZE||r===Li.FACE)||vO.has(t)}function nE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===bO){e.attrs[t].name=TO;break}}function rE(e){for(let t=0;t<e.attrs.length;t++){const n=xO.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Tf(e){for(let t=0;t<e.attrs.length;t++){const n=wO.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 AO(e){const t=_O.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=So(e.tagName))}function CO(e,t){return t===ce.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function kO(e,t,n){if(t===ce.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Li.ENCODING){const o=n[r].value.toLowerCase();return o===tE.TEXT_HTML||o===tE.APPLICATION_XML}}return t===ce.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function NO(e,t,n,r){return(!r||r===ce.HTML)&&kO(e,t,n)||(!r||r===ce.MATHML)&&CO(e,t)}const OO="hidden",IO=8,RO=3;var M;(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"})(M||(M={}));const PO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},iE=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),oE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Kr,onParseError:null};class sE{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.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=B(B({},oE),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 rO(this.options,this),this.activeFormattingElements=new dO(this.treeAdapter),this.fragmentContextID=r?So(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new cO(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=B(B({},oE),n);t!=null||(t=r.treeAdapter.createElement(Y.TEMPLATE,ce.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ce.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:PO,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 o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.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)===ce.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ce.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=wt.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)===Y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ce.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=wt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=wt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=wt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=wt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ae(B({},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,ce.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ce.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(Y.HTML,ce.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,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,o=this.treeAdapter.getTagName(t),a=n.type===Ve.END_TAG&&o===n.tagName?{endTag:B({},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===m.SVG&&this.treeAdapter.getTagName(n)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ce.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ce.HTML)}_processToken(t){switch(t.type){case Ve.CHARACTER:{this.onCharacter(t);break}case Ve.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ve.COMMENT:{this.onComment(t);break}case Ve.DOCTYPE:{this.onDoctype(t);break}case Ve.START_TAG:{this._processStartTag(t);break}case Ve.END_TAG:{this.onEndTag(t);break}case Ve.EOF:{this.onEof(t);break}case Ve.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return NO(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===dr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];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=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=M.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=M.IN_TABLE;return}case m.BODY:{this.insertionMode=M.IN_BODY;return}case m.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return iE.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ce.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.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 ZN[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ys(this,t);break}case M.BEFORE_HTML:{Ws(this,t);break}case M.BEFORE_HEAD:{Gs(this,t);break}case M.IN_HEAD:{Ks(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case M.AFTER_HEAD:{Xs(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{uE(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{vf(this,t);break}case M.IN_TABLE_TEXT:{gE(this,t);break}case M.IN_COLUMN_GROUP:{Ku(this,t);break}case M.AFTER_BODY:{Ju(this,t);break}case M.AFTER_AFTER_BODY:{Zu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ys(this,t);break}case M.BEFORE_HTML:{Ws(this,t);break}case M.BEFORE_HEAD:{Gs(this,t);break}case M.IN_HEAD:{Ks(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case M.AFTER_HEAD:{Xs(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{vf(this,t);break}case M.IN_COLUMN_GROUP:{Ku(this,t);break}case M.AFTER_BODY:{Ju(this,t);break}case M.AFTER_AFTER_BODY:{Zu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){wf(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{wf(this,t);break}case M.IN_TABLE_TEXT:{ea(this,t);break}case M.AFTER_BODY:{HO(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{zO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{jO(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case M.IN_TABLE_TEXT:{ea(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?cR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ys(this,t);break}case M.BEFORE_HTML:{$O(this,t);break}case M.BEFORE_HEAD:{qO(this,t);break}case M.IN_HEAD:{Gn(this,t);break}case M.IN_HEAD_NO_SCRIPT:{GO(this,t);break}case M.AFTER_HEAD:{QO(this,t);break}case M.IN_BODY:{Kt(this,t);break}case M.IN_TABLE:{Ao(this,t);break}case M.IN_TABLE_TEXT:{ea(this,t);break}case M.IN_CAPTION:{YI(this,t);break}case M.IN_COLUMN_GROUP:{Sf(this,t);break}case M.IN_TABLE_BODY:{Qu(this,t);break}case M.IN_ROW:{Xu(this,t);break}case M.IN_CELL:{KI(this,t);break}case M.IN_SELECT:{bE(this,t);break}case M.IN_SELECT_IN_TABLE:{XI(this,t);break}case M.IN_TEMPLATE:{ZI(this,t);break}case M.AFTER_BODY:{tR(this,t);break}case M.IN_FRAMESET:{nR(this,t);break}case M.AFTER_FRAMESET:{iR(this,t);break}case M.AFTER_AFTER_BODY:{sR(this,t);break}case M.AFTER_AFTER_FRAMESET:{aR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?dR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ys(this,t);break}case M.BEFORE_HTML:{VO(this,t);break}case M.BEFORE_HEAD:{YO(this,t);break}case M.IN_HEAD:{WO(this,t);break}case M.IN_HEAD_NO_SCRIPT:{KO(this,t);break}case M.AFTER_HEAD:{XO(this,t);break}case M.IN_BODY:{Gu(this,t);break}case M.TEXT:{MI(this,t);break}case M.IN_TABLE:{Js(this,t);break}case M.IN_TABLE_TEXT:{ea(this,t);break}case M.IN_CAPTION:{WI(this,t);break}case M.IN_COLUMN_GROUP:{GI(this,t);break}case M.IN_TABLE_BODY:{Af(this,t);break}case M.IN_ROW:{yE(this,t);break}case M.IN_CELL:{QI(this,t);break}case M.IN_SELECT:{TE(this,t);break}case M.IN_SELECT_IN_TABLE:{JI(this,t);break}case M.IN_TEMPLATE:{eR(this,t);break}case M.AFTER_BODY:{wE(this,t);break}case M.IN_FRAMESET:{rR(this,t);break}case M.AFTER_FRAMESET:{oR(this,t);break}case M.AFTER_AFTER_BODY:{Zu(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ys(this,t);break}case M.BEFORE_HTML:{Ws(this,t);break}case M.BEFORE_HEAD:{Gs(this,t);break}case M.IN_HEAD:{Ks(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case M.AFTER_HEAD:{Xs(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{pE(this,t);break}case M.TEXT:{FI(this,t);break}case M.IN_TABLE_TEXT:{ea(this,t);break}case M.IN_TEMPLATE:{xE(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{_f(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.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 M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{aE(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{vf(this,t);break}case M.IN_TABLE_TEXT:{mE(this,t);break}}}}function LO(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):hE(e,t),n}function DO(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function MO(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=RO;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=FO(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function FO(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 BO(e,t,n){const r=e.treeAdapter.getTagName(t),o=So(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ce.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function UO(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function xf(e,t){for(let n=0;n<IO;n++){const r=LO(e,t);if(!r)break;const o=DO(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=MO(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&BO(e,u,a),UO(e,o,r)}}function wf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function HO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function zO(e,t){e._appendCommentNode(t,e.document)}function _f(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.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 jO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:yO(t);EO(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ys(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function $O(e,t){t.tagID===m.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=M.BEFORE_HEAD):Ws(e,t)}function VO(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ws(e,t)}function Ws(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function qO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Gs(e,t)}}function YO(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Gs(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Gs(e,t){e._insertFakeElement(Y.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Gn(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,wt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,wt.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,wt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,wt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Ks(e,t)}}function WO(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ks(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Ks(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function GO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Gn(e,t);break}case m.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:Qs(e,t)}}function KO(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case m.BR:{Qs(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Qs(e,t){const n=t.type===Ve.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function QO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Gn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Xs(e,t)}}function XO(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Xs(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Xs(e,t){e._insertFakeElement(Y.BODY,m.BODY),e.insertionMode=M.IN_BODY,Wu(e,t)}function Wu(e,t){switch(t.type){case Ve.CHARACTER:{uE(e,t);break}case Ve.WHITESPACE_CHARACTER:{aE(e,t);break}case Ve.COMMENT:{wf(e,t);break}case Ve.START_TAG:{Kt(e,t);break}case Ve.END_TAG:{Gu(e,t);break}case Ve.EOF:{pE(e,t);break}}}function aE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function uE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function JO(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ZO(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function eI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET)}function tI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function nI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&yf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function rI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function iI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),n||(e.formElement=e.openElements.current))}function oI(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function sI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=wt.PLAINTEXT}function aI(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1}function uI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(xf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(xf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function fI(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ln.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function lE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cE(e){const t=j1(e,Li.TYPE);return t!=null&&t.toLowerCase()===OO}function hI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),cE(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function pI(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function mI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gI(e,t){t.tagName=Y.IMG,t.tagID=m.IMG,lE(e,t)}function EI(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function yI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function bI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function dE(e,t){e._switchToTextParsing(t,wt.RAWTEXT)}function TI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function xI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function wI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function _I(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ce.HTML)}function vI(e,t){e._reconstructActiveFormattingElements(),nE(t),Tf(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function SI(e,t){e._reconstructActiveFormattingElements(),rE(t),Tf(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function fE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function Kt(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{lI(e,t);break}case m.A:{uI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{nI(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{tI(e,t);break}case m.LI:case m.DD:case m.DT:{oI(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{lE(e,t);break}case m.HR:{mI(e,t);break}case m.RB:case m.RTC:{wI(e,t);break}case m.RT:case m.RP:{_I(e,t);break}case m.PRE:case m.LISTING:{rI(e,t);break}case m.XMP:{yI(e,t);break}case m.SVG:{SI(e,t);break}case m.HTML:{JO(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Gn(e,t);break}case m.BODY:{ZO(e,t);break}case m.FORM:{iI(e,t);break}case m.NOBR:{cI(e,t);break}case m.MATH:{vI(e,t);break}case m.TABLE:{fI(e,t);break}case m.INPUT:{hI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{pI(e,t);break}case m.IMAGE:{gI(e,t);break}case m.BUTTON:{aI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{dI(e,t);break}case m.IFRAME:{bI(e,t);break}case m.SELECT:{TI(e,t);break}case m.OPTION:case m.OPTGROUP:{xI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{dE(e,t);break}case m.FRAMESET:{eI(e,t);break}case m.TEXTAREA:{EI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?dE(e,t):fE(e,t);break}case m.PLAINTEXT:{sI(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:fE(e,t)}}function AI(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function CI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,wE(e,t))}function kI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function NI(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function OI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(Y.P,m.P),e._closePElement()}function II(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function RI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function PI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function LI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function DI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function hE(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Gu(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{xf(e,t);break}case m.P:{OI(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{kI(e,t);break}case m.LI:{II(e);break}case m.DD:case m.DT:{RI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{PI(e);break}case m.BR:{DI(e);break}case m.BODY:{AI(e,t);break}case m.HTML:{CI(e,t);break}case m.FORM:{NI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{LI(e,t);break}case m.TEMPLATE:{Di(e,t);break}default:hE(e,t)}}function pE(e,t){e.tmplInsertionModeStack.length>0?xE(e,t):_f(e,t)}function MI(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function FI(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function vf(e,t){if(e.openElements.currentTagId!==void 0&&iE.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Ve.CHARACTER:{gE(e,t);break}case Ve.WHITESPACE_CHARACTER:{mE(e,t);break}}else Zs(e,t)}function BI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CAPTION}function UI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function HI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,m.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Sf(e,t)}function zI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_TABLE_BODY}function jI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,m.TBODY),e.insertionMode=M.IN_TABLE_BODY,Qu(e,t)}function $I(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function VI(e,t){cE(t)?e._appendElement(t,ce.HTML):Zs(e,t),t.ackSelfClosing=!0}function qI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ao(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{jI(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Gn(e,t);break}case m.COL:{HI(e,t);break}case m.FORM:{qI(e,t);break}case m.TABLE:{$I(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{zI(e,t);break}case m.INPUT:{VI(e,t);break}case m.CAPTION:{BI(e,t);break}case m.COLGROUP:{UI(e,t);break}default:Zs(e,t)}}function Js(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Di(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Zs(e,t)}}function Zs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Wu(e,t),e.fosterParentingEnabled=n}function mE(e,t){e.pendingCharacterTokens.push(t)}function gE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ea(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Zs(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const EE=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function YI(e,t){const n=t.tagID;EE.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,Ao(e,t)):Kt(e,t)}function WI(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===m.TABLE&&Js(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Gu(e,t)}}function Sf(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Gn(e,t);break}default:Ku(e,t)}}function GI(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TEMPLATE:{Di(e,t);break}case m.COL:break;default:Ku(e,t)}}function Ku(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Qu(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,m.TR),e.insertionMode=M.IN_ROW,Xu(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Ao(e,t));break}default:Ao(e,t)}}function Af(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Js(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Js(e,t)}}function Xu(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Qu(e,t));break}default:Ao(e,t)}}function yE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Af(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Af(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Js(e,t)}}function KI(e,t){const n=t.tagID;EE.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Xu(e,t)):Kt(e,t)}function QI(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),yE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Gu(e,t)}}function bE(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{Gn(e,t);break}}}function TE(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Di(e,t);break}}}function XI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):bE(e,t)}function JI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):TE(e,t)}function ZI(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Gn(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,Ao(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Sf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Qu(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Xu(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,Kt(e,t)}}function eR(e,t){t.tagID===m.TEMPLATE&&Di(e,t)}function xE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):_f(e,t)}function tR(e,t){t.tagID===m.HTML?Kt(e,t):Ju(e,t)}function wE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.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 Ju(e,t)}function Ju(e,t){e.insertionMode=M.IN_BODY,Wu(e,t)}function nR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.FRAMESET:{e._insertElement(t,ce.HTML);break}case m.FRAME:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{Gn(e,t);break}}}function rR(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function iR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Gn(e,t);break}}}function oR(e,t){t.tagID===m.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function sR(e,t){t.tagID===m.HTML?Kt(e,t):Zu(e,t)}function Zu(e,t){e.insertionMode=M.IN_BODY,Wu(e,t)}function aR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Gn(e,t);break}}}function uR(e,t){t.chars=ft,e._insertCharacters(t)}function lR(e,t){e._insertCharacters(t),e.framesetOk=!1}function _E(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ce.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function cR(e,t){if(SO(t))_E(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?nE(t):r===ce.SVG&&(AO(t),rE(t)),Tf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function dR(e,t){if(t.tagID===m.P||t.tagID===m.BR){_E(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)===ce.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const fR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,hR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),vE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function SE(e,t){const n=_R(e),r=F1("type",{handlers:{root:pR,element:mR,text:gR,comment:CE,doctype:ER,raw:bR},unknown:TR}),o={parser:n?new sE(vE):sE.getFragmentParser(void 0,vE),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Co(o,lr());const a=n?o.parser.document:o.parser.getFragment(),u=pN(a,{file:o.options.file});return o.stitches&&ju(u,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const g=h.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function AE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function pR(e,t){AE(e.children,t)}function mR(e,t){xR(e,t),AE(e.children,t),wR(e,t)}function gR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ve.CHARACTER,chars:e.value,location:ta(e)};Co(t,lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ER(e,t){const n={type:Ve.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ta(e)};Co(t,lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function yR(e,t){t.stitches=!0;const n=vR(e);if("children"in e&&"children"in n){const r=SE({type:"root",children:e.children},t.options);n.children=r.children}CE({type:"comment",value:{stitch:n}},t)}function CE(e,t){const n=e.value,r={type:Ve.COMMENT,data:n,location:ta(e)};Co(t,lr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function bR(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,kE(t,lr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(fR,"<$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 TR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))yR(n,t);else{let r="";throw hR.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 Co(e,t){kE(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=wt.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 kE(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 xR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wt.PLAINTEXT)return;Co(t,lr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ri.html;o===Ri.html&&n==="svg"&&(o=Ri.svg);const a=NN(ae(B({},e),{children:[]}),{space:o===Ri.svg?"svg":"html"}),u={type:Ve.START_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ta(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function wR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&FN.includes(n)||t.parser.tokenizer.state===wt.PLAINTEXT)return;Co(t,Iu(e));const r={type:Ve.END_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ta(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wt.RCDATA||t.parser.tokenizer.state===wt.RAWTEXT||t.parser.tokenizer.state===wt.SCRIPT_DATA)&&(t.parser.tokenizer.state=wt.DATA)}function _R(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ta(e){const t=lr(e)||{line:void 0,column:void 0,offset:void 0},n=Iu(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 vR(e){return"children"in e?Ii(ae(B({},e),{children:[]})):Ii(e)}function NE(e){return function(t,n){return SE(t,ae(B({},e),{file:n}))}}const Mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],OE={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Mi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Mi],h2:[["className","sr-only"]],img:[...Mi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Mi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Mi],table:[...Mi],ul:[...Mi,["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"]},Qr={}.hasOwnProperty;function SR(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},OE),t):OE,stack:[]},o=IE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function IE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return AR(e,n);case"doctype":return CR(e,n);case"element":return kR(e,n);case"root":return NR(e,n);case"text":return OR(e,n)}}}function AR(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 na(a,t),a}}function CR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return na(n,t),n}}function kR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=RE(e,t.children),o=IR(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&&Qr.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return na(u,t),u}function NR(e,t){const r={type:"root",children:RE(e,t.children)};return na(r,t),r}function OR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return na(r,t),r}function RE(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=IE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function IR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Qr.call(r,n)?r[n]:void 0,u=r&&Qr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Qr.call(c,h)){const p=c[h];let g=PE(e,DE(a,h),h,p);g==null&&(g=PE(e,DE(u,h),h,p)),g!=null&&(d[h]=g)}if(o&&Qr.call(o,n)){const p=o[n];for(h in p)Qr.call(p,h)&&!Qr.call(d,h)&&(d[h]=p[h])}return d}function PE(e,t,n,r){return t?Array.isArray(r)?RR(e,t,n,r):LE(e,t,n,r):void 0}function RR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=LE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function LE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&PR(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function PR(e,t,n){const r=e.schema.protocols&&Qr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let h=-1;for(;++h<r.length;){const p=r[h];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function na(e,t){const n=gg(t);t.data&&(e.data=Ii(t.data)),n&&(e.position=n)}function DE(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function LR(e){return function(t){return SR(t,e)}}const ME=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",ae(B(B({className:$(e,`${D}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},DR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=At();return!e&&!t?null:w.jsx("div",{className:$(n,`${D}-disclaimer`),children:t?w.jsx(E1,{rehypePlugins:[NE,LR],components:{ul:({children:r})=>w.jsx("ul",{className:$(n,`${D}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:$(n,`${D}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:$(n,`${D}-li`),children:r}),a:({href:r,title:o,children:a})=>w.jsx(ME,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>w.jsx("img",{className:$(n,`${D}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>w.jsx("p",{className:$(n,`${D}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:$(n,`${D}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:$(n,`${D}-disclaimer-text`),children:e})})},Cf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o,sessionExpired:a}=Yn(),{globalClassName:u,searchConfig:c}=At(),d=J.useRef(null),h=t||!o&&!a,p=T=>{var x;T.preventDefault();const y=(((x=d.current)==null?void 0:x.value)||"").trim();y&&(d.current.value="",r(y))},g=()=>{r("Can you connect me to a human?")};return w.jsxs("div",{className:$(u,e,`cim-${n}-component`,`${D}-search-bar-wrapper`),children:[w.jsxs("form",{className:$(u,e,`cim-${n}-component`,`${D}-search-bar`),name:`${D}-search-form`,onSubmit:p,children:[w.jsx("input",{className:$(u,e,`cim-${n}-component`,`${D}-search-input`),type:"text",ref:d,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${D}-user-input`,disabled:h}),w.jsx(rA,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:h}),w.jsx(ur,{className:$(u,`${D}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:g,icon:w.jsx(YS,{})})]}),w.jsx(DR,{})]})};function MR(e){return mt({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 FE=J.createContext({isOpen:!1}),kf=J.createContext(null),BE=J.createContext(null),ra=()=>{var n,r;const e=J.useContext(kf),t=J.useContext(BE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},UE=({onClearChat:e,componentType:t})=>{const n=ra(),r=()=>{e(),n()};return w.jsxs("button",{className:$(`${D}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(MR,{}),"Clear chat"]})};function FR(e){return e==null?[]:Array.isArray(e)?e:[e]}var BR=(e,...t)=>e.concat(t),UR=(e,...t)=>e.filter(n=>!t.includes(n)),HR=e=>Array.from(new Set(e));function HE(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function zR(e,t,n={}){const{step:r=1,loop:o=!0}=n;return HE(e,t,{step:-r,loop:o})}var jR=e=>Array.isArray(e),zE=e=>e!=null&&typeof e=="object",$R=e=>zE(e)&&!jR(e),el=e=>typeof e=="string",ko=e=>typeof e=="function",VR=e=>e==null,qR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),YR=e=>Object.prototype.toString.call(e),jE=Function.prototype.toString,WR=jE.call(Object),GR=e=>{if(!zE(e)||YR(e)!="[object Object]"||XR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=qR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&jE.call(n)==WR},KR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,QR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,XR=e=>KR(e)||QR(e),JR=e=>e(),ZR=()=>{},Nf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function eP(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:tP,max:nP}=Math,rP=e=>Number.isNaN(e),iP=e=>rP(e)?0:e,$E=(e,t,n)=>tP(nP(iP(e),t),n);function Of(e){if(!GR(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Of(o))}return n}function If(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function oP(e,t){if(e==null)throw new Error(t())}function sP(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var aP=Object.defineProperty,uP=(e,t,n)=>t in e?aP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rf=(e,t,n)=>uP(e,typeof t!="symbol"?t+"":t,n),VE=()=>{},tl=e=>typeof e=="object"&&e!==null,No=e=>e?"":void 0,qE=e=>e?"true":void 0,lP=1,cP=9,dP=11,Ft=e=>tl(e)&&e.nodeType===lP&&typeof e.nodeName=="string",nl=e=>tl(e)&&e.nodeType===cP,fP=e=>tl(e)&&e===e.window,YE=e=>Ft(e)?e.localName||"":"#document";function hP(e){return["html","body","#document"].includes(YE(e))}var pP=e=>tl(e)&&e.nodeType!==void 0,Fi=e=>pP(e)&&e.nodeType===dP&&"host"in e,mP=e=>Ft(e)&&e.localName==="input",gP=e=>Ft(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ia(e){if(!e)return!1;const t=e.getRootNode();return Ro(t)===e}var EP=/(textarea|select)/;function yP(e){if(e==null||!Ft(e))return!1;try{return mP(e)&&e.selectionStart!=null||EP.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Oo(e,t){var r;if(!e||!t||!Ft(e)||!Ft(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Fi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function fr(e){var t;return nl(e)?e:fP(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function bP(e){return fr(e).documentElement}function Io(e){var t,n,r;return Fi(e)?Io(e.host):nl(e)?(t=e.defaultView)!=null?t:window:Ft(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ro(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 TP(e){if(YE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fi(e)&&e.host||bP(e);return Fi(t)?t.host:t}function Pf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),nl(t)||Fi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Lf=new WeakMap;function Po(e){return Lf.has(e)||Lf.set(e,Io(e).getComputedStyle(e)),Lf.get(e)}var Df=new Set(["menu","listbox","dialog","grid","tree","region"]),xP=e=>Df.has(e),WE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function GE(e,t){const n=new Set,r=Pf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=WE(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const p=r.getElementById(h);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(g&&xP(g)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function KE(e,t){const n=Pf(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=WE(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const p=n.getElementById(h);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";g&&Df.has(g)&&!T&&(t(p),o(p))}}}};o(e)}function wP(e){const t=new Set;return KE(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function _P(e){const t=e.getAttribute("role");return!!(t&&Df.has(t))}function vP(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function SP(e){var t;return vP(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function AP(e){if(!e.id)return!1;const t=Pf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&_P(e))}var Mf=()=>typeof document!="undefined";function CP(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Ff=e=>Mf()&&e.test(CP()),kP=e=>Mf()&&e.test(navigator.vendor),QE=()=>Mf()&&!!navigator.maxTouchPoints,NP=()=>Ff(/^iPhone/i),OP=()=>Ff(/^iPad/i)||Bf()&&navigator.maxTouchPoints>1,rl=()=>NP()||OP(),IP=()=>Bf()||rl(),Bf=()=>Ff(/^Mac/i),RP=()=>IP()&&kP(/apple/i);function PP(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Kn(e){var n;const t=PP(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var XE=e=>e.button===0,LP=e=>e.button===2||Bf()&&e.ctrlKey&&e.button===0,DP=e=>"touches"in e&&e.touches.length>0,MP={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},JE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function FP(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=MP[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in JE&&(o=JE[o]),o}function ZE(e,t="client"){const n=DP(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Bt=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},ey=e=>Ft(e)&&e.tagName==="IFRAME",BP=/^(audio|video|details)$/;function ty(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var UP=e=>!Number.isNaN(ty(e)),HP=e=>ty(e)<0;function zP(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 ny(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=zP(d,t);if(h){const p=Array.from(h.querySelectorAll(il)).filter(n),g=u.get(d);if(g!==void 0){const T=g+1;r.splice(T,0,...p),p.forEach((y,x)=>{u.set(y,T+x)});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,x)=>{u.set(y,T+x)})}o.push(...p)}}return r}var il="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",ry=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(il));(n==!0||n=="if-empty"&&o.length===0)&&Ft(e)&&hr(e)&&o.unshift(e);const u=[];for(const c of o)if(hr(c)){if(ey(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...ry(d,{getShadowRoot:r}));continue}u.push(c)}return r?ny(u,r,hr):u};function hr(e){return!Ft(e)||e.closest("[inert]")?!1:e.matches(il)&&gP(e)}function Lo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(il));n&&Bi(e)&&o.unshift(e);const a=[];for(const u of o)if(Bi(u)){if(ey(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Lo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=ny(a,r,Bi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Bi(e){return Ft(e)&&e.tabIndex>0?!0:hr(e)&&!HP(e)}function jP(e,t={}){const n=Lo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function $P(e,t={}){const{current:n,getShadowRoot:r}=t,o=Lo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ro(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function oa(e){return e.tabIndex<0&&(BP.test(e.localName)||yP(e))&&!UP(e)?0:e.tabIndex}function iy(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)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=Lo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var VP=class o2{constructor(){Rf(this,"id",null),Rf(this,"fn_cleanup"),Rf(this,"cleanup",()=>{this.cancel()})}static create(){return new o2}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 Ot(e){const t=VP.create();return t.request(e),t.cleanup}function oy(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Uf(e){const t=TP(e);return hP(t)?fr(t).body:Ft(t)&&WP(t)?t:Uf(t)}var qP=/auto|scroll|overlay|hidden|clip/,YP=new Set(["inline","contents"]);function WP(e){const t=Io(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return qP.test(n+o+r)&&!YP.has(a)}var Do="default",Hf="",ol=new WeakMap;function GP(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return rl()?(Do==="default"&&(Hf=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Do="disabled"):t&&(ol.set(t,t.style.userSelect),t.style.userSelect="none"),()=>KP({target:t,doc:r})}function KP(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(rl()){if(Do!=="disabled")return;Do="restoring",setTimeout(()=>{oy(()=>{Do==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Hf||""),Hf="",Do="default")})},300)}else if(t&&ol.has(t)){const a=ol.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),ol.delete(t)}}function QP(e={}){const u=e,{defer:t,target:n}=u,r=sn(u,["defer","target"]),o=t?Ot:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(GP(ae(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function XP(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=ZE(c),h=Math.sqrt(ru(d.x,2)+ru(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(h<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=ZE(c);r({point:d,event:c})},u=[Bt(e,"pointermove",o,!1),Bt(e,"pointerup",a,!1),Bt(e,"pointercancel",a,!1),Bt(e,"contextmenu",a,!1),QP({doc:e})];return()=>{u.forEach(c=>c())}}function JP(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(h){if(h.key!=="Tab")return;let p=null;const[g,T]=jP(e,{includeContainer:!0,getShadowRoot:a}),y=$P(c,{current:n,getShadowRoot:a}),x=!g&&!T;h.shiftKey&&ia(y)?(o==null||o(),p=T):h.shiftKey&&(ia(g)||x)?p=n:!h.shiftKey&&ia(n)?(o==null||o(),p=g):!h.shiftKey&&(ia(T)||x)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Bt(u,"keydown",d,!0)}function ZP(e,t){const c=t,{defer:n,triggerElement:r}=c,o=sn(c,["defer","triggerElement"]),a=n?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(JP(d,B({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function e6(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function sl(e,t){if(!e)return VE;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function t6(e,t,n){if(!e)return VE;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 n6(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function r6(e,t){const{timeout:n,rootNode:r}=t,o=Io(r),a=fr(r),u=new o.AbortController;return n6(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(h.disconnect(),c(p))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var i6=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),o6=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,sy=e=>{const t={};let n;for(;n=o6.exec(e);)t[n[1]]=n[2];return t},s6=(e,t)=>{if(el(e)){if(el(t))return`${e};${t}`;e=sy(e)}else el(t)&&(t=sy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function It(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Nf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=i6(t[o],n[o]);continue}if(o==="style"){t[o]=s6(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function PF(e){return e}var Mo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Mo||{}),zf="__init__";function a6(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>fr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Ro(t()),a=u=>t().getElementById(u);return ae(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ia,getById:a})}function u6(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Fo=()=>e=>Array.from(new Set(e)),ay=typeof globalThis.document!="undefined"?J.useLayoutEffect:J.useEffect;function al(e){var g,T;const t=(g=e().value)!=null?g:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=J.useState(t),[o,a]=J.useState(r),u=e().value!==void 0,c=J.useRef(o);c.current=u?e().value:o;const d=J.useRef(c.current);ay(()=>{d.current=c.current},[o,e().value]);const h=y=>{var S,A;const x=d.current,v=ko(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:x}),u||a(v),n(v,x)||(A=(S=e()).onChange)==null||A.call(S,v,x)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Is.flushSync:JR)(()=>h(y))},invoke(y,x){var v,S;(S=(v=e()).onChange)==null||S.call(v,y,x)},hash(y){var x,v,S;return(S=(v=(x=e()).hash)==null?void 0:v.call(x,y))!=null?S:String(y)}}}al.cleanup=e=>{J.useEffect(()=>e,[])},al.ref=e=>{const t=J.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function l6(e){const t=J.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var c6=(e,t)=>{const n=J.useRef(!1),r=J.useRef(!1);J.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),J.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ul(e,t={}){var ue,he,ee,re,te,Te;const n=J.useMemo(()=>{const{id:oe,ids:X,getRootNode:se}=t;return a6({id:oe,ids:X,getRootNode:se})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(he=(ue=e.props)==null?void 0:ue.call(e,{props:Of(t),scope:n}))!=null?he:t,a=d6(o),u=(ee=e.context)==null?void 0:ee.call(e,{prop:a,bindable:al,scope:n,flush:ly,getContext(){return d},getComputed(){return W},getRefs(){return v},getEvent(){return y()}}),c=uy(u),d={get(oe){var X;return(X=c.current)==null?void 0:X[oe].ref.current},set(oe,X){var se;(se=c.current)==null||se[oe].set(X)},initial(oe){var X;return(X=c.current)==null?void 0:X[oe].initial},hash(oe){var se,C;const X=(se=c.current)==null?void 0:se[oe].get();return(C=c.current)==null?void 0:C[oe].hash(X)}},h=J.useRef(new Map),p=J.useRef(null),g=J.useRef(null),T=J.useRef({type:""}),y=()=>ae(B({},T.current),{current(){return T.current},previous(){return g.current}}),x=()=>ae(B({},F),{matches(...oe){return oe.includes(F.ref.current)},hasTag(oe){var X,se;return!!((se=(X=e.states[F.ref.current])==null?void 0:X.tags)!=null&&se.includes(oe))}}),v=l6((te=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?te:{}),S=()=>({state:x(),context:d,event:y(),prop:a,send:z,action:A,guard:O,track:c6,refs:v,computed:W,flush:ly,scope:n,choose:H}),A=oe=>{const X=ko(oe)?oe(S()):oe;if(!X)return;const se=X.map(C=>{var G,N;const I=(N=(G=e.implementations)==null?void 0:G.actions)==null?void 0:N[C];return I||If(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),I});for(const C of se)C==null||C(S())},O=oe=>{var X,se;return ko(oe)?oe(S()):(se=(X=e.implementations)==null?void 0:X.guards)==null?void 0:se[oe](S())},R=oe=>{const X=ko(oe)?oe(S()):oe;if(!X)return;const se=X.map(I=>{var N,xe;const G=(xe=(N=e.implementations)==null?void 0:N.effects)==null?void 0:xe[I];return G||If(`[zag-js] No implementation found for effect "${JSON.stringify(I)}"`),G}),C=[];for(const I of se){const G=I==null?void 0:I(S());G&&C.push(G)}return()=>C.forEach(I=>I==null?void 0:I())},H=oe=>FR(oe).find(X=>{let se=!X.guard;return el(X.guard)?se=!!O(X.guard):ko(X.guard)&&(se=X.guard(S())),se}),W=oe=>{oP(e.computed,()=>"[zag-js] No computed object found on machine");const X=e.computed[oe];return X({context:d,event:y(),prop:a,refs:v,scope:n,computed:W})},F=al(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,X){var C,I,G,N;if(X){const xe=h.current.get(X);xe==null||xe(),h.current.delete(X)}X&&A((C=e.states[X])==null?void 0:C.exit),A((I=p.current)==null?void 0:I.actions);const se=R((G=e.states[oe])==null?void 0:G.effects);if(se&&h.current.set(oe,se),X===zf){A(e.entry);const xe=R(e.effects);xe&&h.current.set(zf,xe)}A((N=e.states[oe])==null?void 0:N.entry)}})),K=J.useRef(void 0),de=J.useRef(Mo.NotStarted);ay(()=>{queueMicrotask(()=>{var I;const se=de.current===Mo.Started;de.current=Mo.Started,r(se?"rehydrating...":"initializing...");const C=(I=K.current)!=null?I:F.initial;F.invoke(C,se?F.get():zf)});const oe=h.current,X=F.ref.current;return()=>{r("unmounting..."),K.current=X,de.current=Mo.Stopped,oe.forEach(se=>se==null?void 0:se()),h.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const ge=()=>"ref"in F?F.ref.current:F.get(),z=oe=>{queueMicrotask(()=>{var N,xe,Oe,Re,He;if(de.current!==Mo.Started)return;g.current=T.current,T.current=oe;let X=ge();const se=(Oe=(N=e.states[X].on)==null?void 0:N[oe.type])!=null?Oe:(xe=e.on)==null?void 0:xe[oe.type],C=H(se);if(!C)return;p.current=C;const I=(Re=C.target)!=null?Re:X;r("transition",oe.type,C.target||X,`(${C.actions})`);const G=I!==X;G?Is.flushSync(()=>F.set(I)):C.reenter&&!G?F.invoke(X,X):A((He=C.actions)!=null?He:[])})};return(Te=e.watch)==null||Te.call(e,S()),{state:x(),send:z,context:d,prop:a,scope:n,refs:v,computed:W,event:y(),getStatus:()=>de.current}}function uy(e){const t=J.useRef(e);return t.current=e,t}function d6(e){const t=uy(e);return function(r){return t.current[r]}}function ly(e){queueMicrotask(()=>{Is.flushSync(()=>e())})}var jf=u6(e=>e);function ll(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function f6(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $f=e=>{const t=J.memo(J.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=sn(h,["asChild","children"]);if(!o)return J.createElement(e,ae(B({},u),{ref:r}),a);if(!J.isValidElement(a))return null;const c=J.Children.only(a),d=f6(c);return J.cloneElement(c,ae(B({},It(u,c.props)),{ref:r?ll(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Qt=(()=>{const e=new Map;return new Proxy($f,{apply(t,n,r){return $f(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,$f(r)),e.get(r)}})})();function h6(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ui(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=J.createContext(u);c.displayName=t;function d(){var p;const h=J.useContext(c);if(!h&&n){const g=new Error(a!=null?a:h6(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return h}return[c.Provider,d,c]}const[p6,Vf]=Ui({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[cy,sa]=Ui({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),dy=J.forwardRef((e,t)=>{const n=Vf(),r=sa(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Qt.div,ae(B({},o),{ref:ll(r.ref,t)}))});dy.displayName="PopoverContent";const fy=J.forwardRef((e,t)=>{const n=Vf(),r=sa(),o=It(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(Qt.div,ae(B({},o),{ref:t}))});fy.displayName="PopoverPositioner";const aa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),hy=e=>aa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function m6(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var g6={props({props:e}){return ae(B({},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",Po(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Ot(()=>{var c,d;const u=cl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.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})=>{Ot(()=>{e.set("prevAnimationName",cl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,T;((T=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?T:d.target)===o&&e.set("prevAnimationName",cl(t.get("styles")))},u=d=>{const h=cl(t.get("styles"));Kn(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=sl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),oy(()=>c())}}}}};function cl(e){return(e==null?void 0:e.animationName)||"none"}Fo()(["onExitComplete","present","immediate"]);function E6(e,t={}){const{sync:n=!1}=t,r=y6(e);return J.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function y6(e){const t=J.useRef(e);return t.current=e,t}const qf=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=sn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=J.useRef(!1),c=ae(B({},a),{present:r,onExitComplete:E6(e.onExitComplete)}),d=ul(g6,c),h=m6(d);h.present&&(u.current=!0);const p=!h.present&&!u.current&&t||n&&!h.present&&u.current,g=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:g,present:h.present,unmounted:p}};var Hi=(e,t=[])=>({parts:(...n)=>{if(b6(t))return Hi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Hi(e,[...t,...n]),omit:(...n)=>Hi(e,t.filter(r=>!n.includes(r))),rename:n=>Hi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Bo(e)}"][data-part="${Bo(r)}"]`,`& [data-scope="${Bo(e)}"][data-part="${Bo(r)}"]`].join(", "),attrs:{"data-scope":Bo(e),"data-part":Bo(r)}}}),{})}),Bo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),b6=e=>e.length===0;const T6=["top","right","bottom","left"],Xr=Math.min,_n=Math.max,dl=Math.round,fl=Math.floor,pr=e=>({x:e,y:e}),x6={left:"right",right:"left",bottom:"top",top:"bottom"},w6={start:"end",end:"start"};function Yf(e,t,n){return _n(e,Xr(t,n))}function kr(e,t){return typeof e=="function"?e(t):e}function Nr(e){return e.split("-")[0]}function Uo(e){return e.split("-")[1]}function Wf(e){return e==="x"?"y":"x"}function Gf(e){return e==="y"?"height":"width"}const _6=new Set(["top","bottom"]);function mr(e){return _6.has(Nr(e))?"y":"x"}function Kf(e){return Wf(mr(e))}function v6(e,t,n){n===void 0&&(n=!1);const r=Uo(e),o=Kf(e),a=Gf(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=hl(u)),[u,hl(u)]}function S6(e){const t=hl(e);return[Qf(e),t,Qf(t)]}function Qf(e){return e.replace(/start|end/g,t=>w6[t])}const py=["left","right"],my=["right","left"],A6=["top","bottom"],C6=["bottom","top"];function k6(e,t,n){switch(e){case"top":case"bottom":return n?t?my:py:t?py:my;case"left":case"right":return t?A6:C6;default:return[]}}function N6(e,t,n,r){const o=Uo(e);let a=k6(Nr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Qf)))),a}function hl(e){return e.replace(/left|right|bottom|top/g,t=>x6[t])}function O6(e){return B({top:0,right:0,bottom:0,left:0},e)}function gy(e){return typeof e!="number"?O6(e):{top:e,right:e,bottom:e,left:e}}function pl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ey(e,t,n){let{reference:r,floating:o}=e;const a=mr(t),u=Kf(t),c=Gf(u),d=Nr(t),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Uo(t)){case"start":y[u]-=T*(n&&h?-1:1);break;case"end":y[u]+=T*(n&&h?-1:1);break}return y}const I6=(e,t,n)=>$e(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:g}=Ey(h,r,d),T=r,y={},x=0;for(let v=0;v<c.length;v++){const{name:S,fn:A}=c[v],{x:O,y:R,data:H,reset:W}=yield A({x:p,y:g,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=O!=null?O:p,g=R!=null?R:g,y=ae(B({},y),{[S]:B(B({},y[S]),H)}),W&&x<=50&&(x++,typeof W=="object"&&(W.placement&&(T=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:p,y:g}=Ey(h,T,d)),v=-1)}return{x:p,y:g,placement:T,strategy:o,middlewareData:y}});function ua(e,t){return $e(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:T=!1,padding:y=0}=kr(t,e),x=gy(y),S=c[T?g==="floating"?"reference":"floating":g],A=pl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(S))==null||n?S:S.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),O=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},W=pl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:R,strategy:d}):O);return{top:(A.top-W.top+x.top)/H.y,bottom:(W.bottom-A.bottom+x.bottom)/H.y,left:(A.left-W.left+x.left)/H.x,right:(W.right-A.right+x.right)/H.x}})}const R6=e=>({name:"arrow",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:g=0}=kr(e,n)||{};if(p==null)return{};const T=gy(g),y={x:r,y:o},x=Kf(a),v=Gf(x),S=yield c.getDimensions(p),A=x==="y",O=A?"top":"left",R=A?"bottom":"right",H=A?"clientHeight":"clientWidth",W=u.reference[v]+u.reference[x]-y[x]-u.floating[v],F=y[x]-u.reference[x],K=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let de=K?K[H]:0;(!de||!(yield c.isElement==null?void 0:c.isElement(K)))&&(de=d.floating[H]||u.floating[v]);const ge=W/2-F/2,z=de/2-S[v]/2-1,ue=Xr(T[O],z),he=Xr(T[R],z),ee=ue,re=de-S[v]-he,te=de/2-S[v]/2+ge,Te=Yf(ee,te,re),oe=!h.arrow&&Uo(a)!=null&&te!==Te&&u.reference[v]/2-(te<ee?ue:he)-S[v]/2<0,X=oe?te<ee?te-ee:te-re:0;return{[x]:y[x]+X,data:B({[x]:Te,centerOffset:te-Te-X},oe&&{alignmentOffset:X}),reset:oe}})}}),P6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,te=kr(e,n),{mainAxis:g=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0}=te,A=sn(te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const O=Nr(a),R=mr(d),H=Nr(d)===d,W=yield h.isRTL==null?void 0:h.isRTL(p.floating),F=y||(H||!S?[hl(d)]:S6(d)),K=v!=="none";!y&&K&&F.push(...N6(d,S,v,W));const de=[d,...F],ge=yield ua(n,A),z=[];let ue=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&z.push(ge[O]),T){const Te=v6(a,c,W);z.push(ge[Te[0]],ge[Te[1]])}if(ue=[...ue,{placement:a,overflows:z}],!z.every(Te=>Te<=0)){var he,ee;const Te=(((he=u.flip)==null?void 0:he.index)||0)+1,oe=de[Te];if(oe&&(!(T==="alignment"?R!==mr(oe):!1)||ue.every(C=>mr(C.placement)===R?C.overflows[0]>0:!0)))return{data:{index:Te,overflows:ue},reset:{placement:oe}};let X=(ee=ue.filter(se=>se.overflows[0]<=0).sort((se,C)=>se.overflows[1]-C.overflows[1])[0])==null?void 0:ee.placement;if(!X)switch(x){case"bestFit":{var re;const se=(re=ue.filter(C=>{if(K){const I=mr(C.placement);return I===R||I==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(I=>I>0).reduce((I,G)=>I+G,0)]).sort((C,I)=>C[1]-I[1])[0])==null?void 0:re[0];se&&(X=se);break}case"initialPlacement":X=d;break}if(a!==X)return{reset:{placement:X}}}return{}})}}};function yy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function by(e){return T6.some(t=>e[t]>=0)}const L6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return $e(this,null,function*(){const{rects:r}=n,u=kr(e,n),{strategy:o="referenceHidden"}=u,a=sn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield ua(n,ae(B({},a),{elementContext:"reference"})),d=yy(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:by(d)}}}case"escaped":{const c=yield ua(n,ae(B({},a),{altBoundary:!0})),d=yy(c,r.floating);return{data:{escapedOffsets:d,escaped:by(d)}}}default:return{}}})}}},Ty=new Set(["left","top"]);function D6(e,t){return $e(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Nr(n),c=Uo(n),d=mr(n)==="y",h=Ty.has(u)?-1:1,p=a&&d?-1:1,g=kr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:T*h}:{x:T*h,y:y*p}})}const M6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return $e(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield D6(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:ae(B({},h),{placement:c})}})}}},F6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a}=n,A=kr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:O=>{let{x:R,y:H}=O;return{x:R,y:H}}}}=A,h=sn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield ua(n,h),T=mr(Nr(a)),y=Wf(T);let x=p[y],v=p[T];if(u){const O=y==="y"?"top":"left",R=y==="y"?"bottom":"right",H=x+g[O],W=x-g[R];x=Yf(H,x,W)}if(c){const O=T==="y"?"top":"left",R=T==="y"?"bottom":"right",H=v+g[O],W=v-g[R];v=Yf(H,v,W)}const S=d.fn(ae(B({},n),{[y]:x,[T]:v}));return ae(B({},S),{data:{x:S.x-r,y:S.y-o,enabled:{[y]:u,[T]:c}}})})}}},B6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=kr(e,t),p={x:n,y:r},g=mr(o),T=Wf(g);let y=p[T],x=p[g];const v=kr(c,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:B({mainAxis:0,crossAxis:0},v);if(d){const R=T==="y"?"height":"width",H=a.reference[T]-a.floating[R]+S.mainAxis,W=a.reference[T]+a.reference[R]-S.mainAxis;y<H?y=H:y>W&&(y=W)}if(h){var A,O;const R=T==="y"?"width":"height",H=Ty.has(Nr(o)),W=a.reference[g]-a.floating[R]+(H&&((A=u.offset)==null?void 0:A[g])||0)+(H?0:S.crossAxis),F=a.reference[g]+a.reference[R]+(H?0:((O=u.offset)==null?void 0:O[g])||0)-(H?S.crossAxis:0);x<W?x=W:x>F&&(x=F)}return{[T]:y,[g]:x}}}},U6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ue=kr(e,n),{apply:h=()=>{}}=ue,p=sn(ue,["apply"]),g=yield ua(n,p),T=Nr(a),y=Uo(a),x=mr(a)==="y",{width:v,height:S}=u.floating;let A,O;T==="top"||T==="bottom"?(A=T,O=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(O=T,A=y==="end"?"top":"bottom");const R=S-g.top-g.bottom,H=v-g.left-g.right,W=Xr(S-g[A],R),F=Xr(v-g[O],H),K=!n.middlewareData.shift;let de=W,ge=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ge=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(de=R),K&&!y){const he=_n(g.left,0),ee=_n(g.right,0),re=_n(g.top,0),te=_n(g.bottom,0);x?ge=v-2*(he!==0||ee!==0?he+ee:_n(g.left,g.right)):de=S-2*(re!==0||te!==0?re+te:_n(g.top,g.bottom))}yield h(ae(B({},n),{availableWidth:ge,availableHeight:de}));const z=yield c.getDimensions(d.floating);return v!==z.width||S!==z.height?{reset:{rects:!0}}:{}})}}};function ml(){return typeof window!="undefined"}function Ho(e){return xy(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){var t;return(t=(xy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xy(e){return ml()?e instanceof Node||e instanceof vn(e).Node:!1}function Qn(e){return ml()?e instanceof Element||e instanceof vn(e).Element:!1}function Er(e){return ml()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function wy(e){return!ml()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}const H6=new Set(["inline","contents"]);function la(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!H6.has(o)}const z6=new Set(["table","td","th"]);function j6(e){return z6.has(Ho(e))}const $6=[":popover-open",":modal"];function gl(e){return $6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const V6=["transform","translate","scale","rotate","perspective"],q6=["transform","translate","scale","rotate","perspective","filter"],Y6=["paint","layout","strict","content"];function Xf(e){const t=Jf(),n=Qn(e)?Xn(e):e;return V6.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||q6.some(r=>(n.willChange||"").includes(r))||Y6.some(r=>(n.contain||"").includes(r))}function W6(e){let t=Jr(e);for(;Er(t)&&!zo(t);){if(Xf(t))return t;if(gl(t))return null;t=Jr(t)}return null}function Jf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const G6=new Set(["html","body","#document"]);function zo(e){return G6.has(Ho(e))}function Xn(e){return vn(e).getComputedStyle(e)}function El(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jr(e){if(Ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wy(e)&&e.host||gr(e);return wy(t)?t.host:t}function _y(e){const t=Jr(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Er(t)&&la(t)?t:_y(t)}function ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_y(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=vn(o);if(a){const c=Zf(u);return t.concat(u,u.visualViewport||[],la(o)?o:[],c&&n?ca(c):[])}return t.concat(o,ca(o,[],n))}function Zf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vy(e){const t=Xn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Er(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=dl(n)!==a||dl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function eh(e){return Qn(e)?e:e.contextElement}function jo(e){const t=eh(e);if(!Er(t))return pr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=vy(t);let u=(a?dl(n.width):n.width)/r,c=(a?dl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const K6=pr(0);function Sy(e){const t=vn(e);return!Jf()||!t.visualViewport?K6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=eh(e);let u=pr(1);t&&(r?Qn(r)&&(u=jo(r)):u=jo(e));const c=Q6(a,n,r)?Sy(a):pr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const T=vn(a),y=r&&Qn(r)?vn(r):r;let x=T,v=Zf(x);for(;v&&r&&y!==x;){const S=jo(v),A=v.getBoundingClientRect(),O=Xn(v),R=A.left+(v.clientLeft+parseFloat(O.paddingLeft))*S.x,H=A.top+(v.clientTop+parseFloat(O.paddingTop))*S.y;d*=S.x,h*=S.y,p*=S.x,g*=S.y,d+=R,h+=H,x=vn(v),v=Zf(x)}}return pl({width:p,height:g,x:d,y:h})}function yl(e,t){const n=El(e).scrollLeft;return t?t.left+n:zi(gr(e)).left+n}function Ay(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-yl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function X6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=gr(r),c=t?gl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=pr(1);const p=pr(0),g=Er(r);if((g||!g&&!a)&&((Ho(r)!=="body"||la(u))&&(d=El(r)),Er(r))){const y=zi(r);h=jo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!g&&!a?Ay(u,d):pr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+T.x,y:n.y*h.y-d.scrollTop*h.y+p.y+T.y}}function J6(e){return Array.from(e.getClientRects())}function Z6(e){const t=gr(e),n=El(e),r=e.ownerDocument.body,o=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+yl(e);const c=-n.scrollTop;return Xn(r).direction==="rtl"&&(u+=_n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const Cy=25;function e4(e,t){const n=vn(e),r=gr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=Jf();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=yl(r);if(h<=0){const p=r.ownerDocument,g=p.body,T=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-g.clientWidth-y);x<=Cy&&(a-=x)}else h<=Cy&&(a+=h);return{width:a,height:u,x:c,y:d}}const t4=new Set(["absolute","fixed"]);function n4(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Er(e)?jo(e):pr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function ky(e,t,n){let r;if(t==="viewport")r=e4(e,n);else if(t==="document")r=Z6(gr(e));else if(Qn(t))r=n4(t,n);else{const o=Sy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pl(r)}function Ny(e,t){const n=Jr(e);return n===t||!Qn(n)||zo(n)?!1:Xn(n).position==="fixed"||Ny(n,t)}function r4(e,t){const n=t.get(e);if(n)return n;let r=ca(e,[],!1).filter(c=>Qn(c)&&Ho(c)!=="body"),o=null;const a=Xn(e).position==="fixed";let u=a?Jr(e):e;for(;Qn(u)&&!zo(u);){const c=Xn(u),d=Xf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&t4.has(o.position)||la(u)&&!d&&Ny(e,u))?r=r.filter(p=>p!==u):o=c,u=Jr(u)}return t.set(e,r),r}function i4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?gl(t)?[]:r4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const g=ky(t,p,o);return h.top=_n(g.top,h.top),h.right=Xr(g.right,h.right),h.bottom=Xr(g.bottom,h.bottom),h.left=_n(g.left,h.left),h},ky(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function o4(e){const{width:t,height:n}=vy(e);return{width:t,height:n}}function s4(e,t,n){const r=Er(t),o=gr(t),a=n==="fixed",u=zi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=pr(0);function h(){d.x=yl(o)}if(r||!r&&!a)if((Ho(t)!=="body"||la(o))&&(c=El(t)),r){const y=zi(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?Ay(o,c):pr(0),g=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:g,y:T,width:u.width,height:u.height}}function th(e){return Xn(e).position==="static"}function Oy(e,t){if(!Er(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gr(e)===n&&(n=n.ownerDocument.body),n}function Iy(e,t){const n=vn(e);if(gl(e))return n;if(!Er(e)){let o=Jr(e);for(;o&&!zo(o);){if(Qn(o)&&!th(o))return o;o=Jr(o)}return n}let r=Oy(e,t);for(;r&&j6(r)&&th(r);)r=Oy(r,t);return r&&zo(r)&&th(r)&&!Xf(r)?n:r||W6(e)||n}const a4=function(e){return $e(this,null,function*(){const t=this.getOffsetParent||Iy,n=this.getDimensions,r=yield n(e.floating);return{reference:s4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function u4(e){return Xn(e).direction==="rtl"}const l4={convertOffsetParentRelativeRectToViewportRelativeRect:X6,getDocumentElement:gr,getClippingRect:i4,getOffsetParent:Iy,getElementRects:a4,getClientRects:J6,getDimensions:o4,getScale:jo,isElement:Qn,isRTL:u4};function Ry(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function c4(e,t){let n=null,r;const o=gr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:p,top:g,width:T,height:y}=h;if(c||t(),!T||!y)return;const x=fl(g),v=fl(o.clientWidth-(p+T)),S=fl(o.clientHeight-(g+y)),A=fl(p),R={rootMargin:-x+"px "+-v+"px "+-S+"px "+-A+"px",threshold:_n(0,Xr(1,d))||1};let H=!0;function W(F){const K=F[0].intersectionRatio;if(K!==d){if(!H)return u();K?u(!1,K):r=setTimeout(()=>{u(!1,1e-7)},1e3)}K===1&&!Ry(h,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(W,ae(B({},R),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(W,R)}n.observe(e)}return u(!0),a}function d4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=eh(e),p=o||a?[...h?ca(h):[],...ca(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const g=h&&c?c4(h,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[O]=A;O&&O.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let x,v=d?zi(e):null;d&&S();function S(){const A=zi(e);v&&!Ry(v,A)&&n(),v=A,x=requestAnimationFrame(S)}return n(),()=>{var A;p.forEach(O=>{o&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),g==null||g(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const f4=M6,h4=F6,p4=P6,m4=U6,g4=L6,E4=R6,y4=B6,b4=(e,t,n)=>{const r=new Map,o=B({platform:l4},n),a=ae(B({},o.platform),{_c:r});return I6(e,t,ae(B({},o),{platform:a}))};function Py(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ae(B({},o),{toJSON:()=>o})}function T4(e){if(!e)return Py();const{x:t,y:n,width:r,height:o}=e;return Py(t,n,r,o)}function x4(e,t){return{contextElement:Ft(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?T4(r):n.getBoundingClientRect()}}}var da=e=>({variable:e,reference:`var(${e})`}),Or={arrowSize:da("--arrow-size"),arrowSizeHalf:da("--arrow-size-half"),arrowBg:da("--arrow-background"),transformOrigin:da("--transform-origin"),arrowOffset:da("--arrow-offset")},w4=e=>e==="top"||e==="bottom"?"y":"x";function _4(e,t){return{name:"transformOrigin",fn(n){var ge,z,ue,he,ee;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=w4(d),p=((ge=o.arrow)==null?void 0:ge.x)||0,g=((z=o.arrow)==null?void 0:z.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,v=g+y/2,S=Math.abs(((ue=o.shift)==null?void 0:ue.y)||0),A=u.reference.height/2,O=y/2,R=(ee=(he=e.offset)==null?void 0:he.mainAxis)!=null?ee:e.gutter,H=typeof R=="number"?R+O:R!=null?R:O,W=S>H,F={top:`${x}px calc(100% + ${H}px)`,bottom:`${x}px ${-H}px`,left:`calc(100% + ${H}px) ${v}px`,right:`${-H}px ${v}px`}[d],K=`${x}px ${u.reference.y+A-c}px`,de=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Or.transformOrigin.variable,de?K:F),{data:{transformOrigin:de?K:F}}}}}var v4={name:"rects",fn({rects:e}){return{data:e}}},S4=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Or.arrowOffset.reference})`}),{}}}};function A4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var C4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Ly(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function nh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function k4(e,t,n){const r=e||t.createElement("div");return E4({element:r,padding:n.arrowPadding})}function N4(e,t){var n;if(!VR((n=t.offset)!=null?n:t.gutter))return f4(({placement:r})=>{var p,g,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=A4(r),d=c?void 0:t.shift,h=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Of({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function O4(e){if(!e.flip)return;const t=nh(e.boundary);return p4(ae(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function I4(e){if(!e.slide&&!e.overlap)return;const t=nh(e.boundary);return h4(ae(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:y4()}))}function R4(e){return m4({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function P4(e){var t;if(e.hideWhenDetached)return g4({strategy:"referenceHidden",boundary:(t=nh(e.boundary))!=null?t:"clippingAncestors"})}function L4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function D4(e,t,n={}){const r=x4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},C4,n),a=t.querySelector("[data-part=arrow]"),u=[N4(a,o),O4(o),I4(o),k4(a,t.ownerDocument,o),S4(a),_4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),R4(o),P4(o),v4],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,g=()=>$e(null,null,function*(){var H;if(!r||!t)return;const v=yield b4(r,t,{placement:c,middleware:u,strategy:d});h==null||h(v),p==null||p({placed:!0});const S=Io(t),A=Ly(S,v.x),O=Ly(S,v.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${O}px`),o.hideWhenDetached&&(((H=v.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const W=Po(R);t.style.setProperty("--z-index",W.zIndex)}}),T=()=>$e(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=L4(o.listeners),x=o.listeners?d4(r,t,T,y):ZR;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function Dy(e,t,n={}){const c=n,{defer:r}=c,o=sn(c,["defer"]),a=r?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(D4(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var M4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function F4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Or.arrowSize.reference,height:Or.arrowSize.reference,[Or.arrowSizeHalf.variable]:`calc(${Or.arrowSize.reference} / 2)`,[Or.arrowOffset.variable]:`calc(${Or.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?M4[t.split("-")[0]]:void 0,background:Or.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,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 $o=new WeakMap,bl=new WeakMap,Tl={},rh=0,My=e=>e&&(e.host||My(e.parentNode)),B4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=My(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),U4=new Set(["script","output","status","next-route-announcer"]),H4=e=>U4.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),z4=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=B4(n,Array.isArray(e)?e:[e]);Tl[r]||(Tl[r]=new WeakMap);const c=Tl[r],d=[],h=new Set,p=new Set(u),g=y=>{!y||h.has(y)||(h.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Ft(y)&&KE(y,x=>{g(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(h.has(x))T(x);else try{if(H4(x))return;const S=x.getAttribute(o)==="true",A=($o.get(x)||0)+1,O=(c.get(x)||0)+1;$o.set(x,A),c.set(x,O),d.push(x),A===1&&S&&bl.set(x,!0),O===1&&x.setAttribute(r,""),S||x.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",x,v)}})};return T(n),h.clear(),rh++,()=>{d.forEach(y=>{const x=$o.get(y)-1,v=c.get(y)-1;$o.set(y,x),c.set(y,v),x||(bl.has(y)||y.removeAttribute(o),bl.delete(y)),v||y.removeAttribute(r)}),rh--,rh||($o=new WeakMap,$o=new WeakMap,bl=new WeakMap,Tl={})}},j4=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,$4=(e,t=j4(e),n="data-aria-hidden",r=!0)=>{if(t)return z4(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},V4=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Fy(e,t={}){const{defer:n=!0}=t,r=n?V4:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push($4(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function q4(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function Y4(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var By="pointerdown.outside",Uy="focus.outside";function W4(e){for(const t of e)if(Ft(t)&&hr(t))return!0;return!1}var Hy=e=>"clientY"in e;function G4(e,t){if(!Hy(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 K4(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function zy(e,t){if(!t||!Hy(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return K4(u,c)?r||a:!1}function Q4(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=fr(e),h=Io(e),p=q4(h),g=Y4(h);function T(R,H){if(!Ft(H)||!H.isConnected||Oo(e,H)||G4(e,R)||c&&GE(e,H))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const K=Uf(W);if(zy(R,K))return!1}const F=Uf(e);return zy(R,F)?!1:!(n!=null&&n(H))}const y=new Set,x=Fi(e==null?void 0:e.getRootNode());function v(R){function H(W){var ge,z;const F=u&&!QE()?Ot:ue=>ue(),K=W!=null?W:R,de=(z=(ge=K==null?void 0:K.composedPath)==null?void 0:ge.call(K))!=null?z:[K==null?void 0:K.target];F(()=>{const ue=x?de[0]:Kn(R);if(!(!e||!T(R,ue))){if(o||a){const he=Nf(o,a);e.addEventListener(By,he,{once:!0})}jy(e,By,{bubbles:!1,cancelable:!0,detail:{originalEvent:K,contextmenu:LP(K),focusable:W4(de),target:ue}})}})}R.pointerType==="touch"?(y.forEach(W=>W()),y.add(Bt(d,"click",H,{once:!0})),y.add(g.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const S=new Set,A=setTimeout(()=>{S.add(Bt(d,"pointerdown",v,!0)),S.add(g.addEventListener("pointerdown",v,!0)),S.add(p.addEventListener("pointerdown",v,!0))},0);function O(R){(u?Ot:W=>W())(()=>{var K,de;const W=(de=(K=R==null?void 0:R.composedPath)==null?void 0:K.call(R))!=null?de:[R==null?void 0:R.target],F=x?W[0]:Kn(R);if(!(!e||!T(R,F))){if(r||a){const ge=Nf(r,a);e.addEventListener(Uy,ge,{once:!0})}jy(e,Uy,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:hr(F),target:F}})}})}return QE()||(S.add(Bt(d,"focusin",O,!0)),S.add(g.addEventListener("focusin",O,!0)),S.add(p.addEventListener("focusin",O,!0))),()=>{clearTimeout(A),y.forEach(R=>R()),S.forEach(R=>R())}}function X4(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(Q4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function jy(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function J4(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Bt(fr(e),"keydown",n,{capture:!0})}var $y="layer:request-dismiss",Dn={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=>Oo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Oo(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=>Dn.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];eL(e,$y,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),Z4(e,$y,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Z4(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function eL(e,t,n){e.addEventListener(t,n,{once:!0})}var Vy;function qy(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function tL(e){e.style.pointerEvents=""}function nL(e,t){const n=fr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Vy=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=r6(()=>{const c=o();return Ft(c)?c:null},{timeout:1e3});a.then(c=>r.push(sl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Vy,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function rL(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){If("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Dn.add(h),qy();function p(v){var A,O;const S=Kn(v.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(S)||((A=t.onPointerDownOutside)==null||A.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(c&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function g(v){var A,O;const S=Kn(v.detail.originalEvent);Dn.isInBranch(S)||((A=t.onFocusOutside)==null||A.call(t,v),(O=t.onInteractOutside)==null||O.call(t,v),!v.defaultPrevented&&(c&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var S;Dn.isTopMost(e)&&((S=t.onEscapeKeyDown)==null||S.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var R;if(!e)return!1;const S=typeof u=="function"?u():u,A=Array.isArray(S)?S:[S],O=(R=t.persistentElements)==null?void 0:R.map(H=>H()).filter(Ft);return O&&A.push(...O),A.some(H=>Oo(H,v))||Dn.isInNestedLayer(e,v)}const x=[a?nL(e,t.persistentElements):void 0,J4(e,T),X4(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Dn.remove(e),qy(),tL(e),x.forEach(v=>v==null?void 0:v())}}function Yy(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=ko(e)?e():e;o.push(rL(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var iL=Object.defineProperty,oL=(e,t,n)=>t in e?iL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>oL(e,typeof t!="symbol"?t+"":t,n),Wy={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()}},sL=[],aL=class{constructor(e,t){ht(this,"trapStack"),ht(this,"config"),ht(this,"doc"),ht(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ht(this,"portalContainers",new Set),ht(this,"listenerCleanups",[]),ht(this,"handleFocus",r=>{const o=Kn(r),a=this.findContainerIndex(o,r)>=0;if(a||nl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(oa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const p=h.findIndex(g=>g===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<h.length&&(u=h[p+1],c=!1):p-1>=0&&(u=h[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>oa(h)>0))||(c=!1);else c=!1;c&&(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}),ht(this,"handlePointerDown",r=>{const o=Kn(r);if(!(this.findContainerIndex(o,r)>=0)){if(ha(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ha(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=Kn(r);this.findContainerIndex(o,r)>=0||ha(this.config.clickOutsideDeactivates,r)||ha(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),ht(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;fa(r)&&r.preventDefault(),this.tryFocus(a)}}),ht(this,"handleEscapeKey",r=>{uL(r)&&ha(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),ht(this,"_mutationObserver"),ht(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const h=d;return SP(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?AP(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ht(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),ht(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!hr(r)){const o=Ro(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;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}),ht(this,"tryFocus",r=>{if(r!==!1&&r!==Ro(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,lL(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({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(),Wy.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{Gy(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(h,h),this}return h(),this}),ht(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),ht(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),ht(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ht(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),ht(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),ht(this,"getNodeForOption",(r,{hasFallback:o=!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 c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),ht(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Kn(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||hr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[g];c=oa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else fa(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||hr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[g];c=oa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else fa(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||sL;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return fa(r)&&!r.shiftKey},isKeyBackward(r){return fa(r)&&r.shiftKey}},t);this.doc=n.document||fr(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=>{wP(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:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?GE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Lo(e,{getShadowRoot:this.config.getShadowRoot}),n=ry(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(oa(t[h])>0){c=!0;break}function d(h,p=!0){const g=t.indexOf(h);if(g>=0)return t[g+(p?1:-1)];const T=n.indexOf(h);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(Bi(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Bi(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,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 Wy.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Gy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Bt(this.doc,"focusin",this.handleFocus,!0),Bt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Bt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Bt(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=Ro(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},fa=e=>e.key==="Tab",ha=(e,...t)=>typeof e=="function"?e(...t):e,uL=e=>!e.isComposing&&e.key==="Escape",Gy=e=>setTimeout(e,0),lL=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Ky(e,t={}){let n;const r=Ot(()=>{const o=typeof e=="function"?e():e;if(o){n=new aL(o,ae(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:fr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var ih="data-scroll-lock";function cL(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Qy(e){const t=Po(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Xy(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(ih))return;const u=Qy(r)||Qy(o),c=n.innerWidth-r.clientWidth;o.setAttribute(ih,"");const d=()=>t6(r,"--scrollbar-width",`${c}px`),h=cL(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[h]=`${c}px`),sl(o,x)},g=()=>{var W,F;const{scrollX:x,scrollY:v,visualViewport:S}=n,A=(W=S==null?void 0:S.offsetLeft)!=null?W:0,O=(F=S==null?void 0:S.offsetTop)!=null?F:0,R={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(O))}px`,left:`${-(x-Math.floor(A))}px`,right:"0"};!u&&c>0&&(R[h]=`${c}px`);const H=sl(o,R);return()=>{H==null||H(),n.scrollTo({left:x,top:v,behavior:"instant"})}},T=[d(),rl()?g():p()];return()=>{T.forEach(x=>x==null?void 0:x()),o.removeAttribute(ih)}}var dL=Hi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),yr=dL.build(),Jy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Zy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},oh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},fL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},sh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},ah=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},hL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},tb=e=>e.getById(Jy(e)),Vo=e=>e.getById(Zy(e)),qo=e=>e.getById(oh(e)),nb=e=>e.getById(eb(e)),pL=e=>e.getById(sh(e)),mL=e=>e.getById(ah(e));function gL(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),p=a("currentPortalled"),g=r.get("renderedElements"),T=F4(ae(B({},u("positioning")),{placement:h}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ae(B({id:fL(c)},yr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ae(B({},yr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ae(B({},yr.anchor.attrs),{dir:u("dir"),id:Jy(c)}))},getTriggerProps(){return t.button(ae(B({},yr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:Zy(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":oh(c),onPointerDown(y){XE(y)&&RP()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ae(B({},yr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(B({id:eb(c)},yr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ae(B({},yr.content.attrs),{dir:u("dir"),id:oh(c),tabIndex:-1,role:"dialog","aria-modal":qE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":No(d),"aria-labelledby":g.title?sh(c):void 0,"aria-describedby":g.description?ah(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ae(B({},yr.title.attrs),{id:sh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ae(B({},yr.description.attrs),{id:ah(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ae(B({},yr.closeTrigger.attrs),{dir:u("dir"),id:hL(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var EL={props({props:e}){return ae(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({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=tb(n))!=null?a:Vo(n);return Dy(r,()=>nb(n),ae(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>qo(n);let o=!0;return Yy(r,{type:"popover",pointerBlocking:t("modal"),exclude:Vo(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&&(o=!(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:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:ZP(()=>qo(t),{triggerElement:Vo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Fy(()=>[qo(t),Vo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Xy(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Ky(()=>qo(t),{initialFocus:()=>iy({root:qo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=tb(n))!=null?u:Vo(n);Dy(o,()=>nb(n),ae(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Ot(()=>{Object.assign(e.get("renderedElements"),{title:!!pL(t),description:!!mL(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ot(()=>{const n=iy({root:qo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Ot(()=>{const a=Vo(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})}}}};Fo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[DF,xl]=Ui({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[MF,uh]=Ui({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),yL=e=>{const t=J.useId(),{getRootNode:n}=xl(),{dir:r}=uh(),o=B({id:t,dir:r,getRootNode:n},e),a=ul(EL,o);return gL(a,jf)},bL=e=>{const[t,u]=hy(e),c=u,{children:n}=c,r=sn(c,["children"]),o=yL(r),a=qf(It({present:o.open},t));return w.jsx(p6,{value:o,children:w.jsx(cy,{value:a,children:n})})},rb=J.forwardRef((e,t)=>{const n=Vf(),r=sa(),o=It(ae(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(Qt.button,ae(B({},o),{ref:t}))});rb.displayName="PopoverTrigger";function TL(e){return mt({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 xL(e){return mt({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 ib(e){return mt({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 ob(e){return mt({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 sb(e){return mt({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 wL=({className:e,componentType:t,children:n})=>{const[r,o]=J.useState(!1),{globalClassName:a}=At(),u=h=>{o(h.open)},c=J.useCallback(()=>{o(!1)},[]),d=J.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(bL,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(rb,{"aria-label":`Overflow menu for ${t}`,className:$(`${D}-overflow-menu-button-trigger`,`${D}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(sb,{})}),w.jsx(fy,{children:w.jsx(dy,{className:$(`${D}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(BE.Provider,{value:d,children:n})})})]})};function ab(e){return mt({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 ub(e){return mt({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[_L,ji]=Ui({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),lh=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getControlProps(),e);return w.jsx(Qt.div,ae(B(B({},r),e),{ref:t}))});lh.displayName="CarouselControl";const ch=J.forwardRef((e,t)=>{const[n,r]=aa()(e,["readOnly","index"]),o=ji(),a=It(o.getIndicatorProps(n),r);return w.jsx(Qt.button,ae(B({},a),{ref:t}))});ch.displayName="CarouselIndicator";const dh=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getIndicatorGroupProps(),e);return w.jsx(Qt.div,ae(B({},r),{ref:t}))});dh.displayName="CarouselIndicatorGroup";const fh=J.forwardRef((e,t)=>{const[n,r]=aa()(e,["index","snapAlign"]),o=ji(),a=It(o.getItemProps(n),r);return w.jsx(Qt.div,ae(B({},a),{ref:t}))});fh.displayName="CarouselItem";const hh=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getItemGroupProps(),e);return w.jsx(Qt.div,ae(B({},r),{ref:t}))});hh.displayName="CarouselItemGroup";const ph=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getNextTriggerProps(),e);return w.jsx(Qt.button,ae(B({},r),{ref:t}))});ph.displayName="CarouselNextTrigger";const mh=J.forwardRef((e,t)=>{const n=ji(),r=It(n.getPrevTriggerProps(),e);return w.jsx(Qt.button,ae(B({},r),{ref:t}))});mh.displayName="CarouselPrevTrigger";function vL(e){const t=Po(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=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 c(T,y){let x=parseFloat(T);return/%/.test(T)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=c(r,n.width),h=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:h,after:g}}}function SL(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 lb(e){let t=[];for(const n of e.children)t=t.concat(n,lb(n));return t}function cb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?lb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",h=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!SL(n,g,u))continue;const T=Po(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const v=a==="x"?x:y,S=g[c]-n[c]+e[h];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:S});break;case"center":r[a].center.push({node:p,position:S+g[d]/2});break;case"end":r[a].end.push({node:p,position:S+g[d]});break}}}return r}function db(e){const t=e.getBoundingClientRect(),n=vL(e),r=cb(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:fb([...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(hb(0,o.x))),y:fb([...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(hb(0,o.y)))}}function AL(e,t,n){const r=cb(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var fb=e=>[...new Set(e)],hb=(e,t)=>n=>Math.max(e,Math.min(t,n)),CL=Hi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Ir=CL.build(),kL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},NL=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},wl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},OL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},IL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},RL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},pb=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},hn=e=>e.getById(wl(e)),mb=e=>e6(hn(e),"[data-part=item]"),PL=(e,t)=>e.getById(pb(e,t)),gb=e=>{const t=hn(e);if(!t)return;const n=Lo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function LL(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),v=c("slidesPerPage"),S=c("padding"),A=c("translations");return{isPlaying:d,isDragging:h,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return x/y.length},scrollToIndex(O,R){a({type:"INDEX.SET",index:O,instant:R})},scrollTo(O,R){a({type:"PAGE.SET",index:O,instant:R})},scrollNext(O){a({type:"PAGE.NEXT",instant:O})},scrollPrev(O){a({type:"PAGE.PREV",instant:O})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(O){return Array.from(r.get("slidesInView")).includes(O)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ae(B({},Ir.root.attrs),{id:kL(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":v,"--slide-spacing":c("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(ae(B({},Ir.itemGroup.attrs),{id:wl(u),"data-orientation":c("orientation"),"data-dragging":No(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(O){Oo(O.currentTarget,Kn(O))&&a({type:"VIEWPORT.FOCUS"})},onBlur(O){Oo(O.currentTarget,O.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(O){if(O.defaultPrevented||!c("allowMouseDrag")||!XE(O))return;const R=Kn(O);hr(R)&&R!==O.currentTarget||(O.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:eP(O=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";O[R]<0&&!o("canScrollPrev")||O[R]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:S,[T?"paddingInline":"paddingBlock"]:S,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(O){const R=r.get("slidesInView").includes(O.index);return t.element(ae(B({},Ir.item.attrs),{id:NL(u,O.index),dir:c("dir"),role:"group","data-index":O.index,"data-inview":No(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(O.index,c("slideCount")),"aria-hidden":qE(!R),style:{scrollSnapAlign:(()=>{var de;const H=(de=O.snapAlign)!=null?de:"start",W=c("slidesPerMove"),F=W==="auto"?Math.floor(c("slidesPerPage")):W;return(O.index+F)%F===0?H:void 0})()}}))},getControlProps(){return t.element(ae(B({},Ir.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ae(B({},Ir.prevTrigger.attrs),{id:IL(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":wl(u),onClick(O){O.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ae(B({},Ir.nextTrigger.attrs),{dir:c("dir"),id:OL(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":wl(u),disabled:!p,onClick(O){O.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ae(B({},Ir.indicatorGroup.attrs),{dir:c("dir"),id:RL(u),"data-orientation":c("orientation"),onKeyDown(O){if(O.defaultPrevented)return;const R="indicator",H={ArrowDown(K){T||(a({type:"PAGE.NEXT",src:R}),K.preventDefault())},ArrowUp(K){T||(a({type:"PAGE.PREV",src:R}),K.preventDefault())},ArrowRight(K){T&&(a({type:"PAGE.NEXT",src:R}),K.preventDefault())},ArrowLeft(K){T&&(a({type:"PAGE.PREV",src:R}),K.preventDefault())},Home(K){a({type:"PAGE.SET",index:0,src:R}),K.preventDefault()},End(K){a({type:"PAGE.SET",index:y.length-1,src:R}),K.preventDefault()}},W=FP(O,{dir:c("dir"),orientation:c("orientation")}),F=H[W];F==null||F(O)}}))},getIndicatorProps(O){return t.button(ae(B({},Ir.indicator.attrs),{dir:c("dir"),id:pb(u,O.index),type:"button","data-orientation":c("orientation"),"data-index":O.index,"data-readonly":No(O.readOnly),"data-current":No(O.index===x),"aria-label":A.indicator(O.index),onClick(R){R.defaultPrevented||O.readOnly||a({type:"PAGE.SET",index:O.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ae(B({},Ir.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":No(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(O){O.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var DL={props({props:e}){return sP(e,["slideCount"],"carousel"),ae(B({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:B({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:ML(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 $R(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({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(hn(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=hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),gb(e)});return gb(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Ot(()=>{o(),Ot(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return mb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var T;const p=h.target,g=Number((T=p.dataset.index)!=null?T:"-1");return g==null||Number.isNaN(g)||g===-1?d:h.isIntersecting?BR(d,g):UR(d,g)},n.get("slidesInView"));n.set("slidesInView",HR(c))},{root:r,threshold:t("inViewThreshold")});return mb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Bt(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 Bt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return XP(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 Bt(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:o}){var h;const a=t.instant?"instant":"smooth",u=$E((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=hn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=hn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=HE(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=zR(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=hn(r);if(!o)return;const a=AL(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-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=$E(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=hn(n);if(!r)return;const o=db(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=hn(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=hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=db(r),c=u.x.reduce((h,p)=>Math.abs(p-o)<Math.abs(h-o)?p:h,u.x[0]),d=u.y.reduce((h,p)=>Math.abs(p-a)<Math.abs(h-a)?p:h,u.y[0]);Ot(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));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=PL(n,e.get("page"));r&&Ot(()=>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 ML(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Fo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Fo()(["index","readOnly"]),Fo()(["index","snapAlign"]);const FL=e=>{const t=J.useId(),{getRootNode:n}=xl(),{dir:r}=uh(),o=B({id:t,dir:r,getRootNode:n},e),a=ul(DL,o);return LL(a,jf)},gh=J.forwardRef((e,t)=>{const[n,r]=aa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=FL(n),a=It(o.getRootProps(),r);return w.jsx(_L,{value:o,children:w.jsx(Qt.div,ae(B({},a),{ref:t}))})});gh.displayName="CarouselRoot";const BL=180,UL=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},HL=({globalClassName:e,className:t,itemMinWidth:n=BL,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:p})=>{const g=Array.from(p),T=g.length,y=J.useRef(null),[x,v]=J.useState(0),{width:S}=_S();J.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[S,T]);const A=UL(r),O=n+A,R=x>0?(x+A)/O:1,H=Math.max(1,Math.floor(R));if(T===0)return null;const W=T>H,F=Math.ceil(T/H),K=W?Math.max(1,R):H;return w.jsxs(gh,{ref:y,className:$(e,t,`${D}-carousel`),slidesPerPage:K,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":h,children:[w.jsx(hh,{className:$(e,`${D}-carousel__item-group`,{"carousel-row-container":!W}),children:g.map((de,ge)=>w.jsx(fh,{index:ge,className:$(e,`${D}-carousel__item`),children:de},ge))}),c&&W&&w.jsxs(lh,{className:$(e,`${D}-carousel__control`),children:[w.jsx(mh,{className:$(e,`${D}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(ib,{size:"16px"})}),w.jsx(ph,{className:$(e,`${D}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(ob,{size:"16px"})})]}),u&&W&&w.jsx(dh,{className:$(e,`${D}-carousel__indicator-group`),children:Array.from({length:F},(de,ge)=>w.jsx(ch,{index:ge,className:$(e,`${D}-carousel__indicator`),"aria-label":`Go to slide group ${ge+1}`},ge))})]})},zL=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:$(e,`${D}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[jL,$L]=Ui({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),VL=e=>aa()(e,["lazyMount","unmountOnExit"]),[qL,pa]=Ui({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Eb=J.forwardRef((e,t)=>{const n=pa(),r=$L(),o=qf(ae(B({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:w.jsx(Qt.div,ae(B({},a),{ref:ll(o.ref,t)}))});Eb.displayName="DialogBackdrop";const Eh=J.forwardRef((e,t)=>{const n=pa(),r=sa(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Qt.div,ae(B({},o),{ref:ll(r.ref,t)}))});Eh.displayName="DialogContent";const yh=J.forwardRef((e,t)=>{const n=pa(),r=It(n.getDescriptionProps(),e);return w.jsx(Qt.div,ae(B({},r),{ref:t}))});yh.displayName="DialogDescription";const bh=J.forwardRef((e,t)=>{const n=pa(),r=It(n.getPositionerProps(),e);return sa().unmounted?null:w.jsx(Qt.div,ae(B({},r),{ref:t}))});bh.displayName="DialogPositioner";var YL=Hi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$i=YL.build(),yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},bb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},wh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},_l=e=>e.getById(Th(e)),WL=e=>e.getById(yb(e)),GL=e=>e.getById(bb(e)),KL=e=>e.getById(Tb(e)),QL=e=>e.getById(xh(e)),XL=e=>e.getById(wh(e)),JL=e=>e.getById(xb(e));function ZL(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ae(B({},$i.trigger.attrs),{dir:a("dir"),id:Tb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Th(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ae(B({},$i.backdrop.attrs),{dir:a("dir"),hidden:!d,id:bb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ae(B({},$i.positioner.attrs),{dir:a("dir"),id:yb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ae(B({},$i.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Th(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:xh(u),"aria-describedby":h.description?wh(u):void 0}))},getTitleProps(){return t.element(ae(B({},$i.title.attrs),{dir:a("dir"),id:xh(u)}))},getDescriptionProps(){return t.element(ae(B({},$i.description.attrs),{dir:a("dir"),id:wh(u)}))},getCloseTriggerProps(){return t.button(ae(B({},$i.closeTrigger.attrs),{dir:a("dir"),id:xb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var eD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>JL(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,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 Yy(()=>_l(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[KL(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return Xy(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Ky(()=>_l(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?Fy(()=>[_l(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ot(()=>{e.set("rendered",{title:!!QL(t),description:!!XL(t)})})},syncZIndex({scope:e}){Ot(()=>{const t=_l(e);if(!t)return;const n=Po(t);[WL(e),GL(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.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})}}}};Fo()(["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 tD=e=>{const t=J.useId(),{getRootNode:n}=xl(),{dir:r}=uh(),o=B({id:t,getRootNode:n,dir:r},e),a=ul(eD,o);return ZL(a,jf)},wb=e=>{const[t,c]=hy(e),d=c,{children:n}=d,r=sn(d,["children"]),[o]=VL(t),a=tD(r),u=qf(It({present:a.open},t));return w.jsx(qL,{value:a,children:w.jsx(jL,{value:o,children:w.jsx(cy,{value:u,children:n})})})},_b=J.forwardRef((e,t)=>{const n=pa(),r=It(n.getTitleProps(),e);return w.jsx(Qt.h2,ae(B({},r),{ref:t}))});_b.displayName="DialogTitle";const nD=({children:e})=>{const[t,n]=J.useState(!1),r=J.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=J.useMemo(()=>({isOpen:t}),[t]);return w.jsx(kf.Provider,{value:r,children:w.jsx(FE.Provider,{value:o,children:e})})},vb=()=>J.useContext(FE),Sb=()=>{const e=J.useContext(kf);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},rD=`${D}-overflow-menu-button-trigger`,iD=({componentType:e,children:t})=>{const{isOpen:n}=vb(),{closeMenu:r}=Sb(),{globalClassName:o}=At(),a=J.useRef(null);return J.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${rD}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:$(`${D}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},oD=({componentType:e,className:t})=>{const{toggleMenu:n}=Sb(),{isOpen:r}=vb(),{globalClassName:o}=At();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:$(`${D}-overflow-menu-button-trigger`,`${D}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:w.jsx(sb,{})})},sD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{previousComponentType:r}=ki(),o=ra(),a=()=>{Au(r||"dialog"),o()};return t?w.jsx(ur,{className:$(n,`${D}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(ab,{})}):w.jsxs("button",{className:$(n,`${D}-overflow-menu-button`,`${D}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(ab,{}),"Show ",r||"dialog"]})},aD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{isModalFullscreen:r}=ki(),o=ra(),a=()=>{_d(!r),o()},u=r?eA:tA,c="Toggle Fullscreen";return t?w.jsx(ur,{ariaLabel:c,title:c,className:$(n,`${D}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:$(n,`${D}-overflow-menu-button`,`${D}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),c]})},uD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{dialogPosition:r}=ki(),o=ra(),a=r==="bottom-left",u=()=>{vd(a?"bottom-right":"bottom-left"),o()},c=a?xL:TL,d=a?"Move right":"Move left";return t?w.jsx(ur,{className:$(n,`${D}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:$(n,`${D}-overflow-menu-button`,`${D}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},Ab=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=At(),{mode:a}=ki(),u=a==="standalone",c=e==="modal",d=c?sD:kb,h=c?aD:uD,p=J.useMemo(()=>r?WS(r):{},[r]);return w.jsx(nD,{children:w.jsxs("div",{className:$(o,`${D}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:$(o,`${D}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:$(o,`${D}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),w.jsx(_b,{className:$(o,`${D}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),w.jsxs("div",{className:$(o,`${D}-${e}-controls`),children:[w.jsx(d,{componentType:e,isIcon:!0}),w.jsx(oD,{componentType:e}),w.jsx(zL,{className:$(o,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(iD,{componentType:e,children:[w.jsx(h,{componentType:e}),w.jsx(dD,{componentType:e}),w.jsx(UE,{componentType:e,onClearChat:t})]})]})})},Cb="USD",ma=(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}`}},lD=({retailPrice:e,discountPrice:t,currencyCode:n=Cb})=>{const r=n||Cb,o=typeof t=="number"&&typeof e=="number"&&t<e,a=o?t:e||t||null,u=o?e:null;return{price:ma(a,r),comparePrice:ma(u,r),hasDiscount:o}},_h=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:o,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=lD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const h=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:$(o,a,`${D}-price`),style:h,children:[w.jsx("span",{className:$(o,`${D}-price__amount`),children:u}),d&&c&&w.jsx("span",{className:$(o,`${D}-price__compare`),children:c})]})},cD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return w.jsx("div",{className:$(t,`${D}-suggestion-container ${u}`,e),children:n.map(d=>o?w.jsx(Nu,{disabled:r,className:$(t,`${D}-suggestion-button standalone`),onClick:c(d),children:d},d):w.jsx("button",{disabled:r,className:$(t,`${D}-suggestion-button embedded`),onClick:c(d),children:d},d))})},dD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=At();if(!r)return null;const o=()=>{Ci(!1),Su(!0)};return t?w.jsx(ur,{className:$(n,`${D}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:w.jsx(W0,{})}):w.jsxs("button",{className:$(n,`${D}-overflow-menu-button`,`${D}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(W0,{}),"Minimize"]})},kb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),r=ra(),o=()=>{Au("modal"),r()};return t?w.jsx(ur,{className:$(n,`${D}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:w.jsx(ub,{})}):w.jsxs("button",{className:$(n,`${D}-overflow-menu-button`,`${D}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(ub,{}),"Show modal"]})},fD=["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"],hD=3e3,pD=400,mD=({globalClassName:e,isWidgetStandalone:t,messages:n=fD})=>{const[r,o]=J.useState(0),[a,u]=J.useState(!0);return J.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},pD)},hD);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),w.jsxs("div",{className:$(e,`${D}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${D}-connecting-pulse-wrapper`,children:[w.jsx("div",{className:`${D}-connecting-pulse`}),w.jsx("div",{className:`${D}-connecting-ring`})]}),w.jsx("span",{className:$(`${D}-connecting-text`,a&&`${D}-connecting-text--visible`),children:n[r]})]})},gD=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${D}-processing-text`,children:t}):null,ED=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${D}-processing-shimmer-bar`}),w.jsx("div",{className:`${D}-processing-shimmer-bar`}),w.jsx("div",{className:`${D}-processing-shimmer-bar`})]}):null,vh=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:$(e,`${D}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(gD,{shouldShow:!!n,loadingText:n}),w.jsx(ED,{shouldShow:!n})]});function Nb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function yD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bD(e,t,n){const o=Hu((n||{}).ignore||[]),a=TD(t);let u=-1;for(;++u<a.length;)s1(e,"text",c);function c(h,p){let g=-1,T;for(;++g<p.length;){const y=p[g],x=T?T.children:void 0;if(o(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(h,p)}function d(h,p){const g=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const S=g.children.indexOf(h);let A=!1,O=[];T.lastIndex=0;let R=T.exec(h.value);for(;R;){const H=R.index,W={index:R.index,input:R.input,stack:[...p,h]};let F=y(...R,W);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?T.lastIndex=H+1:(x!==H&&O.push({type:"text",value:h.value.slice(x,H)}),Array.isArray(F)?O.push(...F):F&&O.push(F),x=H+R[0].length,A=!0),!T.global)break;R=T.exec(h.value)}return A?(x<h.value.length&&O.push({type:"text",value:h.value.slice(x)}),g.children.splice(S,1,...O)):O=[h],S+O.length}}function TD(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 o=n[r];t.push([xD(o[0]),wD(o[1])])}return t}function xD(e){return typeof e=="string"?new RegExp(yD(e),"g"):e}function wD(e){return typeof e=="function"?e:function(){return e}}const Sh="phrasing",Ah=["autolink","link","image","label"];function _D(){return{transforms:[OD],enter:{literalAutolink:SD,literalAutolinkEmail:Ch,literalAutolinkHttp:Ch,literalAutolinkWww:Ch},exit:{literalAutolink:ND,literalAutolinkEmail:kD,literalAutolinkHttp:AD,literalAutolinkWww:CD}}}function vD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sh,notInConstruct:Ah},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sh,notInConstruct:Ah},{character:":",before:"[ps]",after:"\\/",inConstruct:Sh,notInConstruct:Ah}]}}function SD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ch(e){this.config.enter.autolinkProtocol.call(this,e)}function AD(e){this.config.exit.autolinkProtocol.call(this,e)}function CD(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 kD(e){this.config.exit.autolinkEmail.call(this,e)}function ND(e){this.exit(e)}function OD(e){bD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ID],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),RD]],{ignore:["link","linkReference"]})}function ID(e,t,n,r,o){let a="";if(!Ob(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!PD(n)))return!1;const u=LD(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function RD(e,t,n,r){return!Ob(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PD(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 LD(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 o=Nb(e,"(");let a=Nb(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ob(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Oi(n)||Pu(n))&&(!t||n!==47)}Ib.peek=$D;function DD(){this.buffer()}function MD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function FD(){this.buffer()}function BD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function UD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function HD(e){this.exit(e)}function zD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jD(e){this.exit(e)}function $D(){return"["}function Ib(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function VD(){return{enter:{gfmFootnoteCallString:DD,gfmFootnoteCall:MD,gfmFootnoteDefinitionLabelString:FD,gfmFootnoteDefinition:BD},exit:{gfmFootnoteCallString:UD,gfmFootnoteCall:HD,gfmFootnoteDefinitionLabelString:zD,gfmFootnoteDefinition:jD}}}function qD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ib},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
38
|
-
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?
|
|
39
|
-
`)}function
|
|
40
|
-
`&&
|
|
41
|
-
`}function
|
|
35
|
+
`}),n}function d1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function f1(e,t){const n=N3(e,t),r=n.one(e,void 0),o=b3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
36
|
+
`},o),a}function L3(e,t){return e&&"run"in e?function(n,r){return $e(this,null,function*(){const o=f1(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return f1(n,B({file:r},e||t))}}function h1(e){if(e)throw e}var ef,p1;function D3(){if(p1)return ef;p1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!g)return!1;var T;for(T in h);return typeof T=="undefined"||e.call(h,T)},u=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return ef=function d(){var h,p,g,T,y,w,v=arguments[0],A=1,C=arguments.length,k=!1;for(typeof v=="boolean"&&(k=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<C;++A)if(h=arguments[A],h!=null)for(p in h)g=c(v,p),T=c(h,p),v!==T&&(k&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=g&&o(g)?g:[]):w=g&&a(g)?g:{},u(v,{name:p,newValue:d(k,w,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},ef}var M3=D3();const tf=We(M3);function nf(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 F3(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...h){const p=e[++a];let g=-1;if(d){u(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,p?B3(p,c)(...h):u(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function B3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const dr={basename:U3,dirname:H3,extname:z3,join:j3,sep:"/"};function U3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');qs(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function H3(e){if(qs(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 z3(e){qs(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function j3(...e){let t=-1,n;for(;++t<e.length;)qs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$3(n)}function $3(e){qs(e);const t=e.codePointAt(0)===47;let n=V3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function V3(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==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("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function qs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const q3={cwd:Y3};function Y3(){return"/"}function rf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function W3(e){if(typeof e=="string")e=new URL(e);else if(!rf(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 G3(e)}function G3(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const of=["history","path","basename","stem","extname","dirname"];class m1{constructor(t){let n;t?rf(t)?n={path:t}:typeof t=="string"||K3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":q3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<of.length;){const a=of[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)of.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?dr.basename(this.path):void 0}set basename(t){af(t,"basename"),sf(t,"basename"),this.path=dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dr.dirname(this.path):void 0}set dirname(t){g1(this.basename,"dirname"),this.path=dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dr.extname(this.path):void 0}set extname(t){if(sf(t,"extname"),g1(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=dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rf(t)&&(t=W3(t)),af(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dr.basename(this.path,this.extname):void 0}set stem(t){af(t,"stem"),sf(t,"stem"),this.path=dr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Wt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sf(e,t){if(e&&e.includes(dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dr.sep+"`")}function af(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function g1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function K3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Q3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),X3={}.hasOwnProperty;class uf extends Q3{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=F3()}copy(){const t=new uf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(tf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(df("data",this.frozen),this.namespace[t]=n,this):X3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(df("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=qu(t),r=this.parser||this.Parser;return lf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lf("process",this.parser||this.Parser),cf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=qu(t),d=r.parse(c);r.run(d,c,function(p,g,T){if(p||!g||!T)return h(p);const y=g,w=r.stringify(y,T);eN(w)?T.value=w:T.result=w,h(p,T)});function h(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),lf("processSync",this.parser||this.Parser),cf("processSync",this.compiler||this.Compiler),this.process(t,o),y1("processSync","process",n),r;function o(a,u){n=!0,h1(a),r=u}}run(t,n,r){E1(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=qu(n);o.run(t,d,h);function h(p,g,T){const y=g||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),y1("runSync","run",r),o;function a(u,c){h1(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=qu(n),o=this.compiler||this.Compiler;return cf("stringify",o),E1(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(df("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...g]=h;d(p,g)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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");c(h.plugins),h.settings&&(o.settings=tf(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const g=h[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let g=-1,T=-1;for(;++g<r.length;)if(r[g][0]===h){T=g;break}if(T===-1)r.push([h,...p]);else if(p.length>0){let[y,...w]=p;const v=r[T][1];nf(v)&&nf(y)&&(y=tf(!0,v,y)),r[T]=[h,y,...w]}}}}const J3=new uf().freeze();function lf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function df(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 E1(e){if(!nf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function y1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qu(e){return Z3(e)?e:new m1(e)}function Z3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eN(e){return typeof e=="string"||tN(e)}function tN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b1=[],T1={allowDangerousHtml:!0},rN=/^(https?|ircs?|mailto|xmpp)$/i,iN=[{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 x1(e){const t=oN(e),n=sN(e);return aN(t.runSync(t.parse(n),n),e)}function oN(e){const t=e.rehypePlugins||b1,n=e.remarkPlugins||b1,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),T1):T1;return J3().use(Hk).use(n).use(L3,r).use(t)}function sN(e){const t=e.children||"",n=new m1;return typeof t=="string"&&(n.value=t),n}function aN(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||uN;for(const p of iN)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+nN+p.id,void 0);return Vu(e,h),RA(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(p,g,T){if(p.type==="raw"&&T&&typeof g=="number")return u?T.children.splice(g,1):T.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Hd)if(Object.hasOwn(Hd,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=Hd[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,T)),y&&T&&typeof g=="number")return c&&p.children?T.children.splice(g,1,...p.children):T.children.splice(g,1),g}}}function uN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||rN.test(e.slice(0,t))?e:""}const w1=/[#.]/g;function lN(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){w1.lastIndex=o;const c=w1.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function _1(e,t,n){const r=n?hN(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const h=u;c.unshift(h)}else{d=lN(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,cN(u))c.unshift(u);else for(const[g,T]of Object.entries(u))dN(e,d.properties,g,T)}for(const h of c)ff(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function cN(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 o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function dN(e,t,n,r){const o=Ld(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"?o.spaceSeparated?a=hg(r):o.commaSeparated?a=eg(r):o.commaOrSpaceSeparated?a=hg(eg(r).join(" ")):a=v1(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?fN(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(v1(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function ff(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)ff(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ff(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function v1(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ds(n)===Ds(t)))return!0}return n}function fN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function hN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const pN=["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"],mN=_1(Ru,"div"),gN=_1(yo,"g",pN);function EN(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=S1(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(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 c=n[n.length-1],d=S1(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function S1(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 Pi={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/"},A1={}.hasOwnProperty,yN=Object.prototype;function bN(e,t){const n=t||{};return hf({file:n.file||void 0,location:!1,schema:n.space==="svg"?yo:Ru,verbose:n.verbose||!1},e)}function hf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Yu(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:C1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=EN(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Yu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Yu(e,r,n),n}default:return n=TN(e,t),n}}function C1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=hf(e,t[n]);r.push(o)}return r}function TN(e,t){const n=e.schema;e.schema=t.namespaceURI===Pi.svg?yo:Ru;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;A1.call(yN,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?gN:mN)(t.tagName,o,C1(e,t.childNodes));if(Yu(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&_o(d.startTag),p=d&&d.endTag&&_o(d.endTag),g=hf(e,c.content);h&&p&&e.file&&(g.position={start:h.end,end:p.start}),u.content=g}return e.schema=n,u}function Yu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=xN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function xN(e,t,n){const r=_o(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)A1.call(n.attrs,u)&&(a[Ld(e.schema,u).property]=_o(n.attrs[u]));n.startTag;const c=_o(n.startTag),d=n.endTag?_o(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function _o(e){const t=k1({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=k1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function k1(e){return e.line&&e.column?e:void 0}class Ys{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ys.prototype.property={},Ys.prototype.normal={},Ys.prototype.space=null;function N1(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ys(n,r,t)}function pf(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let wN=0;const ze=Li(),kt=Li(),O1=Li(),Ee=Li(),st=Li(),vo=Li(),wn=Li();function Li(){return ou(2,++wN)}const mf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:kt,commaOrSpaceSeparated:wn,commaSeparated:vo,number:Ee,overloadedBoolean:O1,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),gf=Object.keys(mf);class Ef extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),I1(this,"space",o),typeof r=="number")for(;++a<gf.length;){const u=gf[a];I1(this,gf[a],(r&mf[u])===mf[u])}}}Ef.prototype.defined=!0;function I1(e,t,n){n&&(e[t]=n)}const _N={}.hasOwnProperty;function So(e){const t={},n={};let r;for(r in e.properties)if(_N.call(e.properties,r)){const o=e.properties[r],a=new Ef(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[pf(r)]=r,n[pf(a.attribute)]=r}return new Ys(t,n,e.space)}const R1=So({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),P1=So({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function L1(e,t){return t in e?e[t]:t}function D1(e,t){return L1(e,t.toLowerCase())}const M1=So({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:D1,properties:{xmlns:null,xmlnsXLink:null}}),F1=So({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:st,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:Ee,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:st,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:kt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),vN=So({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:D1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vo,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:Ee,colSpan:null,content:null,contentEditable:kt,controls:ze,controlsList:st,coords:Ee|vo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:O1,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:Ee,hidden:ze,high:Ee,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:Ee,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:Ee,rowSpan:Ee,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:kt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),SN=So({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:L1,properties:{about:wn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:st,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:vo,g2:vo,glyphName:vo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),AN=/^data[-\w.:]+$/i,B1=/-[a-z]/g,CN=/[A-Z]/g;function kN(e,t){const n=pf(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&AN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(B1,ON);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!B1.test(a)){let u=a.replace(CN,NN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Ef}return new o(r,t)}function NN(e){return"-"+e.toLowerCase()}function ON(e){return e.charAt(1).toUpperCase()}const IN=N1([P1,R1,M1,F1,vN],"html"),U1=N1([P1,R1,M1,F1,SN],"svg"),H1={}.hasOwnProperty;function z1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&H1.call(o,e)){const d=String(o[e]);u=H1.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const RN={},PN={}.hasOwnProperty,j1=z1("type",{handlers:{root:DN,element:HN,text:BN,comment:UN,doctype:FN}});function LN(e,t){const r=(t||RN).space;return j1(e,r==="svg"?U1:IN)}function DN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yf(e.children,n,t),Ao(e,n),n}function MN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yf(e.children,n,t),Ao(e,n),n}function FN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ao(e,t),t}function BN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ao(e,t),t}function UN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ao(e,t),t}function HN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=U1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&PN.call(e.properties,a)){const d=zN(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Pi[u],childNodes:[],parentNode:null};return c.childNodes=yf(e.children,c,r),Ao(e,c),e.tagName==="template"&&e.content&&(c.content=MN(e.content,r)),c}function zN(e,t,n){const r=kN(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?tg(n):pg(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=Pi[r.space]}return o}function yf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=j1(e[r],n);a.parentNode=t,o.push(a)}return o}function Ao(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 jN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$N=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]),ht="�";var N;(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"})(N||(N={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function $1(e){return e>=55296&&e<=57343}function VN(e){return e>=56320&&e<=57343}function qN(e,t){return(e-55296)*1024+9216+t}function V1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function q1(e){return e>=64976&&e<=65007||$N.has(e)}var ne;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ne||(ne={}));const YN=65536;class WN{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=YN,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_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(VN(n))return this.pos++,this._addGap(),qN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,$1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){V1(t)?this._err(ne.controlCharacterInInputStream):q1(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ve;(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"})(Ve||(Ve={}));function Y1(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 GN=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))),KN=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 QN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=KN.get(e))!==null&&t!==void 0?t:e}var Dt;(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"})(Dt||(Dt={}));const XN=32;var Gr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Gr||(Gr={}));function bf(e){return e>=Dt.ZERO&&e<=Dt.NINE}function JN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_F||e>=Dt.LOWER_A&&e<=Dt.LOWER_F}function ZN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_Z||e>=Dt.LOWER_A&&e<=Dt.LOWER_Z||bf(e)}function eO(e){return e===Dt.EQUALS||ZN(e)}var Mt;(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"})(Mt||(Mt={}));var kr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(kr||(kr={}));class tO{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=kr.Strict}startEntity(t){this.decodeMode=t,this.state=Mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Mt.EntityStart:return t.charCodeAt(n)===Dt.NUM?(this.state=Mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Mt.NamedEntity,this.stateNamedEntity(t,n));case Mt.NumericStart:return this.stateNumericStart(t,n);case Mt.NumericDecimal:return this.stateNumericDecimal(t,n);case Mt.NumericHex:return this.stateNumericHex(t,n);case Mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|XN)===Dt.LOWER_X?(this.state=Mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bf(o)||JN(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(bf(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Dt.SEMI)this.consumed+=1;else if(this.decodeMode===kr.Strict)return 0;return this.emitCodePoint(QN(this.result),this.consumed),this.errors&&(t!==Dt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Gr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=nO(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===kr.Attribute&&(a===0||eO(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Gr.VALUE_LENGTH)>>14,a!==0){if(u===Dt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==kr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Gr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Gr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Mt.NamedEntity:return this.result!==0&&(this.decodeMode!==kr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Mt.NumericDecimal:return this.emitNumericEntity(0,2);case Mt.NumericHex:return this.emitNumericEntity(0,3);case Mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Mt.EntityStart:return 0}}}function nO(e,t,n,r){const o=(t&Gr.BRANCH_LENGTH)>>7,a=t&Gr.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var le;(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/"})(le||(le={}));var Di;(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"})(Di||(Di={}));var Ln;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));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 m;(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"})(m||(m={}));const rO=new Map([[Q.A,m.A],[Q.ADDRESS,m.ADDRESS],[Q.ANNOTATION_XML,m.ANNOTATION_XML],[Q.APPLET,m.APPLET],[Q.AREA,m.AREA],[Q.ARTICLE,m.ARTICLE],[Q.ASIDE,m.ASIDE],[Q.B,m.B],[Q.BASE,m.BASE],[Q.BASEFONT,m.BASEFONT],[Q.BGSOUND,m.BGSOUND],[Q.BIG,m.BIG],[Q.BLOCKQUOTE,m.BLOCKQUOTE],[Q.BODY,m.BODY],[Q.BR,m.BR],[Q.BUTTON,m.BUTTON],[Q.CAPTION,m.CAPTION],[Q.CENTER,m.CENTER],[Q.CODE,m.CODE],[Q.COL,m.COL],[Q.COLGROUP,m.COLGROUP],[Q.DD,m.DD],[Q.DESC,m.DESC],[Q.DETAILS,m.DETAILS],[Q.DIALOG,m.DIALOG],[Q.DIR,m.DIR],[Q.DIV,m.DIV],[Q.DL,m.DL],[Q.DT,m.DT],[Q.EM,m.EM],[Q.EMBED,m.EMBED],[Q.FIELDSET,m.FIELDSET],[Q.FIGCAPTION,m.FIGCAPTION],[Q.FIGURE,m.FIGURE],[Q.FONT,m.FONT],[Q.FOOTER,m.FOOTER],[Q.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Q.FORM,m.FORM],[Q.FRAME,m.FRAME],[Q.FRAMESET,m.FRAMESET],[Q.H1,m.H1],[Q.H2,m.H2],[Q.H3,m.H3],[Q.H4,m.H4],[Q.H5,m.H5],[Q.H6,m.H6],[Q.HEAD,m.HEAD],[Q.HEADER,m.HEADER],[Q.HGROUP,m.HGROUP],[Q.HR,m.HR],[Q.HTML,m.HTML],[Q.I,m.I],[Q.IMG,m.IMG],[Q.IMAGE,m.IMAGE],[Q.INPUT,m.INPUT],[Q.IFRAME,m.IFRAME],[Q.KEYGEN,m.KEYGEN],[Q.LABEL,m.LABEL],[Q.LI,m.LI],[Q.LINK,m.LINK],[Q.LISTING,m.LISTING],[Q.MAIN,m.MAIN],[Q.MALIGNMARK,m.MALIGNMARK],[Q.MARQUEE,m.MARQUEE],[Q.MATH,m.MATH],[Q.MENU,m.MENU],[Q.META,m.META],[Q.MGLYPH,m.MGLYPH],[Q.MI,m.MI],[Q.MO,m.MO],[Q.MN,m.MN],[Q.MS,m.MS],[Q.MTEXT,m.MTEXT],[Q.NAV,m.NAV],[Q.NOBR,m.NOBR],[Q.NOFRAMES,m.NOFRAMES],[Q.NOEMBED,m.NOEMBED],[Q.NOSCRIPT,m.NOSCRIPT],[Q.OBJECT,m.OBJECT],[Q.OL,m.OL],[Q.OPTGROUP,m.OPTGROUP],[Q.OPTION,m.OPTION],[Q.P,m.P],[Q.PARAM,m.PARAM],[Q.PLAINTEXT,m.PLAINTEXT],[Q.PRE,m.PRE],[Q.RB,m.RB],[Q.RP,m.RP],[Q.RT,m.RT],[Q.RTC,m.RTC],[Q.RUBY,m.RUBY],[Q.S,m.S],[Q.SCRIPT,m.SCRIPT],[Q.SEARCH,m.SEARCH],[Q.SECTION,m.SECTION],[Q.SELECT,m.SELECT],[Q.SOURCE,m.SOURCE],[Q.SMALL,m.SMALL],[Q.SPAN,m.SPAN],[Q.STRIKE,m.STRIKE],[Q.STRONG,m.STRONG],[Q.STYLE,m.STYLE],[Q.SUB,m.SUB],[Q.SUMMARY,m.SUMMARY],[Q.SUP,m.SUP],[Q.TABLE,m.TABLE],[Q.TBODY,m.TBODY],[Q.TEMPLATE,m.TEMPLATE],[Q.TEXTAREA,m.TEXTAREA],[Q.TFOOT,m.TFOOT],[Q.TD,m.TD],[Q.TH,m.TH],[Q.THEAD,m.THEAD],[Q.TITLE,m.TITLE],[Q.TR,m.TR],[Q.TRACK,m.TRACK],[Q.TT,m.TT],[Q.U,m.U],[Q.UL,m.UL],[Q.SVG,m.SVG],[Q.VAR,m.VAR],[Q.WBR,m.WBR],[Q.XMP,m.XMP]]);function Co(e){var t;return(t=rO.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const pe=m,iO={[le.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[le.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[le.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},Tf=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var P;(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"})(P||(P={}));const wt={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function oO(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ws(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function sO(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Kr(e){return sO(e)||Ws(e)}function W1(e){return Kr(e)||oO(e)}function Wu(e){return e+32}function G1(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function K1(e){return G1(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function aO(e){return e===N.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:$1(e)?ne.surrogateCharacterReference:q1(e)?ne.noncharacterCharacterReference:V1(e)||e===N.CARRIAGE_RETURN?ne.controlCharacterReference:null}class uO{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=P.DATA,this.returnState=P.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new WN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new tO(GN,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=aO(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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:Ve.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ve.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ve.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ve.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(Y1(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Co(t.tagName),t.type===Ve.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ve.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ve.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ve.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:Ve.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=G1(t)?Ve.WHITESPACE_CHARACTER:t===N.NULL?Ve.NULL_CHARACTER:Ve.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ve.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=P.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?kr.Attribute:kr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case P.DATA:{this._stateData(t);break}case P.RCDATA:{this._stateRcdata(t);break}case P.RAWTEXT:{this._stateRawtext(t);break}case P.SCRIPT_DATA:{this._stateScriptData(t);break}case P.PLAINTEXT:{this._statePlaintext(t);break}case P.TAG_OPEN:{this._stateTagOpen(t);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case P.TAG_NAME:{this._stateTagName(t);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case P.BOGUS_COMMENT:{this._stateBogusComment(t);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case P.COMMENT_START:{this._stateCommentStart(t);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case P.COMMENT:{this._stateComment(t);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case P.COMMENT_END:{this._stateCommentEnd(t);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case P.DOCTYPE:{this._stateDoctype(t);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case P.CDATA_SECTION:{this._stateCdataSection(t);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=P.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Kr(t))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Kr(t))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=ht;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ws(t)?Wu(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=P.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Kr(t)?(this.state=P.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=P.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=P.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=P.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=P.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=P.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Kr(t)?(this.state=P.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=P.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=P.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=P.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Kr(t)?(this.state=P.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Kr(t)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Kr(t)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&K1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&K1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=P.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=ht;break}default:this.currentAttr.name+=String.fromCodePoint(Ws(t)?Wu(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=P.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=P.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=P.DATA,this.emitCurrentTagToken();break}default:this.state=P.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=P.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=P.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ht;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fn.DASH_DASH,!0)?(this._createCommentToken(fn.DASH_DASH.length+1),this.state=P.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=P.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=P.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=P.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=P.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=P.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=P.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ht;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=P.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=P.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=P.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(ne.nestedComment),this.state=P.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=P.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=P.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=P.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=P.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ws(t))this._createDoctypeToken(String.fromCharCode(Wu(t))),this.state=P.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(ht),this.state=P.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=P.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=ht;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ws(t)?Wu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=P.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=P.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.NULL:{this._err(ne.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=P.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=P.CDATA_SECTION_END:(this._emitChars("]"),this.state=P.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=P.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=P.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(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&W1(this.preprocessor.peek(1))?P.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){W1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Q1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),X1=new Set([...Q1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Gu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),lO=new Set([...Gu,m.OL,m.UL]),cO=new Set([...Gu,m.BUTTON]),J1=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Z1=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),dO=new Set([m.TR,m.TEMPLATE,m.HTML]),fO=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),hO=new Set([m.TABLE,m.TEMPLATE,m.HTML]),pO=new Set([m.TD,m.TH]);class mO{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=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==le.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(Tf,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pO,le.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(hO,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fO,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(dO,le.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]===m.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]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(Z1.has(o))return!1;break}case le.MATHML:{if(J1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Gu)}hasInListItemScope(t){return this.hasInDynamicScope(t,lO)}hasInButtonScope(t){return this.hasInDynamicScope(t,cO)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(Tf.has(n))return!0;if(Gu.has(n))return!1;break}case le.SVG:{if(Z1.has(n))return!1;break}case le.MATHML:{if(J1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Q1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&X1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&X1.has(this.currentTagId);)this.pop()}}const xf=3;var fr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(fr||(fr={}));const eE={type:fr.Marker};class gO{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===fr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const p=this.treeAdapter.getAttrList(h);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xf)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=xf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(eE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:fr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:fr.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(eE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===fr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===fr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===fr.Element&&n.element===t)}}const Qr={createDocument(){return{nodeName:"#document",mode:Ln.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Qr.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(Qr.isTextNode(n)){n.value+=t;return}}Qr.appendChild(e,Qr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Qr.isTextNode(r)?r.value+=t:Qr.insertBefore(e,Qr.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=B(B({},e.sourceCodeLocation),t)}},tE="html",EO="about:legacy-compat",yO="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",nE=["+//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//"],bO=[...nE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],TO=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),rE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],xO=[...rE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function iE(e,t){return t.some(n=>e.startsWith(n))}function wO(e){return e.name===tE&&e.publicId===null&&(e.systemId===null||e.systemId===EO)}function _O(e){if(e.name!==tE)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===yO)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),TO.has(n))return Ln.QUIRKS;let r=t===null?bO:nE;if(iE(n,r))return Ln.QUIRKS;if(r=t===null?rE:xO,iE(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const oE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},vO="definitionurl",SO="definitionURL",AO=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])),CO=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),kO=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])),NO=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function OO(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Di.COLOR||r===Di.SIZE||r===Di.FACE)||NO.has(t)}function sE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===vO){e.attrs[t].name=SO;break}}function aE(e){for(let t=0;t<e.attrs.length;t++){const n=AO.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function wf(e){for(let t=0;t<e.attrs.length;t++){const n=CO.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 IO(e){const t=kO.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Co(e.tagName))}function RO(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function PO(e,t,n){if(t===le.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Di.ENCODING){const o=n[r].value.toLowerCase();return o===oE.TEXT_HTML||o===oE.APPLICATION_XML}}return t===le.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function LO(e,t,n,r){return(!r||r===le.HTML)&&PO(e,t,n)||(!r||r===le.MATHML)&&RO(e,t)}const DO="hidden",MO=8,FO=3;var M;(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"})(M||(M={}));const BO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},uE=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),lE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Qr,onParseError:null};class cE{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.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=B(B({},lE),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 uO(this.options,this),this.activeFormattingElements=new gO(this.treeAdapter),this.fragmentContextID=r?Co(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new mO(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=B(B({},lE),n);t!=null||(t=r.treeAdapter.createElement(Q.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:BO,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 o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.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)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=wt.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)!==le.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=wt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=wt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=wt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=wt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ie(B({},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,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.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,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,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,o=this.treeAdapter.getTagName(t),a=n.type===Ve.END_TAG&&o===n.tagName?{endTag:B({},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===m.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Ve.CHARACTER:{this.onCharacter(t);break}case Ve.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ve.COMMENT:{this.onComment(t);break}case Ve.DOCTYPE:{this.onDoctype(t);break}case Ve.START_TAG:{this._processStartTag(t);break}case Ve.END_TAG:{this.onEndTag(t);break}case Ve.EOF:{this.onEof(t);break}case Ve.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return LO(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===fr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];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=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=M.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=M.IN_TABLE;return}case m.BODY:{this.insertionMode=M.IN_BODY;return}case m.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return uE.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.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 iO[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{Ks(this,t);break}case M.BEFORE_HEAD:{Qs(this,t);break}case M.IN_HEAD:{Xs(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Js(this,t);break}case M.AFTER_HEAD:{Zs(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{fE(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Af(this,t);break}case M.IN_TABLE_TEXT:{TE(this,t);break}case M.IN_COLUMN_GROUP:{Xu(this,t);break}case M.AFTER_BODY:{el(this,t);break}case M.AFTER_AFTER_BODY:{tl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{Ks(this,t);break}case M.BEFORE_HEAD:{Qs(this,t);break}case M.IN_HEAD:{Xs(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Js(this,t);break}case M.AFTER_HEAD:{Zs(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Af(this,t);break}case M.IN_COLUMN_GROUP:{Xu(this,t);break}case M.AFTER_BODY:{el(this,t);break}case M.AFTER_AFTER_BODY:{tl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){vf(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{vf(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.AFTER_BODY:{qO(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{YO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{WO(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case M.IN_TABLE_TEXT:{na(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?mR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{GO(this,t);break}case M.BEFORE_HEAD:{QO(this,t);break}case M.IN_HEAD:{Gn(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ZO(this,t);break}case M.AFTER_HEAD:{tI(this,t);break}case M.IN_BODY:{Kt(this,t);break}case M.IN_TABLE:{ko(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.IN_CAPTION:{XI(this,t);break}case M.IN_COLUMN_GROUP:{Cf(this,t);break}case M.IN_TABLE_BODY:{Ju(this,t);break}case M.IN_ROW:{Zu(this,t);break}case M.IN_CELL:{eR(this,t);break}case M.IN_SELECT:{_E(this,t);break}case M.IN_SELECT_IN_TABLE:{nR(this,t);break}case M.IN_TEMPLATE:{iR(this,t);break}case M.AFTER_BODY:{sR(this,t);break}case M.IN_FRAMESET:{aR(this,t);break}case M.AFTER_FRAMESET:{lR(this,t);break}case M.AFTER_AFTER_BODY:{dR(this,t);break}case M.AFTER_AFTER_FRAMESET:{fR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?gR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{KO(this,t);break}case M.BEFORE_HEAD:{XO(this,t);break}case M.IN_HEAD:{JO(this,t);break}case M.IN_HEAD_NO_SCRIPT:{eI(this,t);break}case M.AFTER_HEAD:{nI(this,t);break}case M.IN_BODY:{Qu(this,t);break}case M.TEXT:{zI(this,t);break}case M.IN_TABLE:{ea(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.IN_CAPTION:{JI(this,t);break}case M.IN_COLUMN_GROUP:{ZI(this,t);break}case M.IN_TABLE_BODY:{kf(this,t);break}case M.IN_ROW:{wE(this,t);break}case M.IN_CELL:{tR(this,t);break}case M.IN_SELECT:{vE(this,t);break}case M.IN_SELECT_IN_TABLE:{rR(this,t);break}case M.IN_TEMPLATE:{oR(this,t);break}case M.AFTER_BODY:{AE(this,t);break}case M.IN_FRAMESET:{uR(this,t);break}case M.AFTER_FRAMESET:{cR(this,t);break}case M.AFTER_AFTER_BODY:{tl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{Ks(this,t);break}case M.BEFORE_HEAD:{Qs(this,t);break}case M.IN_HEAD:{Xs(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Js(this,t);break}case M.AFTER_HEAD:{Zs(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{yE(this,t);break}case M.TEXT:{jI(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.IN_TEMPLATE:{SE(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Sf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.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 M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{dE(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Af(this,t);break}case M.IN_TABLE_TEXT:{bE(this,t);break}}}}function UO(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):EE(e,t),n}function HO(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function zO(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=FO;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=jO(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function jO(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 $O(e,t,n){const r=e.treeAdapter.getTagName(t),o=Co(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function VO(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function _f(e,t){for(let n=0;n<MO;n++){const r=UO(e,t);if(!r)break;const o=HO(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=zO(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&$O(e,u,a),VO(e,o,r)}}function vf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function YO(e,t){e._appendCommentNode(t,e.document)}function Sf(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.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 WO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:_O(t);wO(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Gs(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function GO(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ks(e,t)}function KO(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ks(e,t)}function Ks(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function QO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Qs(e,t)}}function XO(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Qs(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Qs(e,t){e._insertFakeElement(Q.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Gn(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,wt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,wt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,wt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,wt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Xs(e,t)}}function JO(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Xs(e,t);break}case m.TEMPLATE:{Mi(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Mi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Xs(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function ZO(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Gn(e,t);break}case m.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:Js(e,t)}}function eI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case m.BR:{Js(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Js(e,t){const n=t.type===Ve.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function tI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Gn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Zs(e,t)}}function nI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Zs(e,t);break}case m.TEMPLATE:{Mi(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Zs(e,t){e._insertFakeElement(Q.BODY,m.BODY),e.insertionMode=M.IN_BODY,Ku(e,t)}function Ku(e,t){switch(t.type){case Ve.CHARACTER:{fE(e,t);break}case Ve.WHITESPACE_CHARACTER:{dE(e,t);break}case Ve.COMMENT:{vf(e,t);break}case Ve.START_TAG:{Kt(e,t);break}case Ve.END_TAG:{Qu(e,t);break}case Ve.EOF:{yE(e,t);break}}}function dE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function fE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function iI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function oI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function sI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function aI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Tf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function uI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function cI(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function dI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=wt.PLAINTEXT}function fI(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function hI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(_f(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(_f(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function EI(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ln.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function hE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function pE(e){const t=Y1(e,Di.TYPE);return t!=null&&t.toLowerCase()===DO}function yI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),pE(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function bI(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function TI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xI(e,t){t.tagName=Q.IMG,t.tagID=m.IMG,hE(e,t)}function wI(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function _I(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function vI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function mE(e,t){e._switchToTextParsing(t,wt.RAWTEXT)}function SI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function AI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function CI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function kI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function NI(e,t){e._reconstructActiveFormattingElements(),sE(t),wf(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function OI(e,t){e._reconstructActiveFormattingElements(),aE(t),wf(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function gE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function Kt(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{pI(e,t);break}case m.A:{hI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{aI(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{sI(e,t);break}case m.LI:case m.DD:case m.DT:{cI(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{hE(e,t);break}case m.HR:{TI(e,t);break}case m.RB:case m.RTC:{CI(e,t);break}case m.RT:case m.RP:{kI(e,t);break}case m.PRE:case m.LISTING:{uI(e,t);break}case m.XMP:{_I(e,t);break}case m.SVG:{OI(e,t);break}case m.HTML:{rI(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Gn(e,t);break}case m.BODY:{iI(e,t);break}case m.FORM:{lI(e,t);break}case m.NOBR:{mI(e,t);break}case m.MATH:{NI(e,t);break}case m.TABLE:{EI(e,t);break}case m.INPUT:{yI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{bI(e,t);break}case m.IMAGE:{xI(e,t);break}case m.BUTTON:{fI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{gI(e,t);break}case m.IFRAME:{vI(e,t);break}case m.SELECT:{SI(e,t);break}case m.OPTION:case m.OPTGROUP:{AI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{mE(e,t);break}case m.FRAMESET:{oI(e,t);break}case m.TEXTAREA:{wI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?mE(e,t):gE(e,t);break}case m.PLAINTEXT:{dI(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:gE(e,t)}}function II(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function RI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,AE(e,t))}function PI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function LI(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function DI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(Q.P,m.P),e._closePElement()}function MI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function FI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function BI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function UI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function HI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function EE(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Qu(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{_f(e,t);break}case m.P:{DI(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{PI(e,t);break}case m.LI:{MI(e);break}case m.DD:case m.DT:{FI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{BI(e);break}case m.BR:{HI(e);break}case m.BODY:{II(e,t);break}case m.HTML:{RI(e,t);break}case m.FORM:{LI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{UI(e,t);break}case m.TEMPLATE:{Mi(e,t);break}default:EE(e,t)}}function yE(e,t){e.tmplInsertionModeStack.length>0?SE(e,t):Sf(e,t)}function zI(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function jI(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Af(e,t){if(e.openElements.currentTagId!==void 0&&uE.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Ve.CHARACTER:{TE(e,t);break}case Ve.WHITESPACE_CHARACTER:{bE(e,t);break}}else ta(e,t)}function $I(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function VI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function qI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,m.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Cf(e,t)}function YI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function WI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,m.TBODY),e.insertionMode=M.IN_TABLE_BODY,Ju(e,t)}function GI(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function KI(e,t){pE(t)?e._appendElement(t,le.HTML):ta(e,t),t.ackSelfClosing=!0}function QI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ko(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{WI(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Gn(e,t);break}case m.COL:{qI(e,t);break}case m.FORM:{QI(e,t);break}case m.TABLE:{GI(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{YI(e,t);break}case m.INPUT:{KI(e,t);break}case m.CAPTION:{$I(e,t);break}case m.COLGROUP:{VI(e,t);break}default:ta(e,t)}}function ea(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Mi(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:ta(e,t)}}function ta(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ku(e,t),e.fosterParentingEnabled=n}function bE(e,t){e.pendingCharacterTokens.push(t)}function TE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function na(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ta(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const xE=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function XI(e,t){const n=t.tagID;xE.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,ko(e,t)):Kt(e,t)}function JI(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===m.TABLE&&ea(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Qu(e,t)}}function Cf(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Gn(e,t);break}default:Xu(e,t)}}function ZI(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TEMPLATE:{Mi(e,t);break}case m.COL:break;default:Xu(e,t)}}function Xu(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Ju(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,m.TR),e.insertionMode=M.IN_ROW,Zu(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,ko(e,t));break}default:ko(e,t)}}function kf(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,ea(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:ea(e,t)}}function Zu(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Ju(e,t));break}default:ko(e,t)}}function wE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,kf(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,kf(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:ea(e,t)}}function eR(e,t){const n=t.tagID;xE.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Zu(e,t)):Kt(e,t)}function tR(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),wE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Qu(e,t)}}function _E(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{Gn(e,t);break}}}function vE(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Mi(e,t);break}}}function nR(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_E(e,t)}function rR(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):vE(e,t)}function iR(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Gn(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,ko(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Cf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Ju(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Zu(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,Kt(e,t)}}function oR(e,t){t.tagID===m.TEMPLATE&&Mi(e,t)}function SE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Sf(e,t)}function sR(e,t){t.tagID===m.HTML?Kt(e,t):el(e,t)}function AE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.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 el(e,t)}function el(e,t){e.insertionMode=M.IN_BODY,Ku(e,t)}function aR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.FRAMESET:{e._insertElement(t,le.HTML);break}case m.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{Gn(e,t);break}}}function uR(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function lR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Gn(e,t);break}}}function cR(e,t){t.tagID===m.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function dR(e,t){t.tagID===m.HTML?Kt(e,t):tl(e,t)}function tl(e,t){e.insertionMode=M.IN_BODY,Ku(e,t)}function fR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Gn(e,t);break}}}function hR(e,t){t.chars=ht,e._insertCharacters(t)}function pR(e,t){e._insertCharacters(t),e.framesetOk=!1}function CE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function mR(e,t){if(OO(t))CE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?sE(t):r===le.SVG&&(IO(t),aE(t)),wf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gR(e,t){if(t.tagID===m.P||t.tagID===m.BR){CE(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)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,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 ER=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,yR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),kE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function NE(e,t){const n=kR(e),r=z1("type",{handlers:{root:bR,element:TR,text:xR,comment:IE,doctype:wR,raw:vR},unknown:SR}),o={parser:n?new cE(kE):cE.getFragmentParser(void 0,kE),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),No(o,cr());const a=n?o.parser.document:o.parser.getFragment(),u=bN(a,{file:o.options.file});return o.stitches&&Vu(u,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const g=h.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function OE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function bR(e,t){OE(e.children,t)}function TR(e,t){AR(e,t),OE(e.children,t),CR(e,t)}function xR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ve.CHARACTER,chars:e.value,location:ra(e)};No(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wR(e,t){const n={type:Ve.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ra(e)};No(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _R(e,t){t.stitches=!0;const n=NR(e);if("children"in e&&"children"in n){const r=NE({type:"root",children:e.children},t.options);n.children=r.children}IE({type:"comment",value:{stitch:n}},t)}function IE(e,t){const n=e.value,r={type:Ve.COMMENT,data:n,location:ra(e)};No(t,cr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function vR(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,RE(t,cr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ER,"<$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 SR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))_R(n,t);else{let r="";throw yR.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 No(e,t){RE(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=wt.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 RE(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 AR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wt.PLAINTEXT)return;No(t,cr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Pi.html;o===Pi.html&&n==="svg"&&(o=Pi.svg);const a=LN(ie(B({},e),{children:[]}),{space:o===Pi.svg?"svg":"html"}),u={type:Ve.START_TAG,tagName:n,tagID:Co(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ra(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function CR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&jN.includes(n)||t.parser.tokenizer.state===wt.PLAINTEXT)return;No(t,Pu(e));const r={type:Ve.END_TAG,tagName:n,tagID:Co(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ra(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wt.RCDATA||t.parser.tokenizer.state===wt.RAWTEXT||t.parser.tokenizer.state===wt.SCRIPT_DATA)&&(t.parser.tokenizer.state=wt.DATA)}function kR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ra(e){const t=cr(e)||{line:void 0,column:void 0,offset:void 0},n=Pu(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 NR(e){return"children"in e?Ri(ie(B({},e),{children:[]})):Ri(e)}function PE(e){return function(t,n){return NE(t,ie(B({},e),{file:n}))}}const Fi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],LE={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Fi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Fi],h2:[["className","sr-only"]],img:[...Fi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Fi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Fi],table:[...Fi],ul:[...Fi,["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"]},Xr={}.hasOwnProperty;function OR(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},LE),t):LE,stack:[]},o=DE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function DE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return IR(e,n);case"doctype":return RR(e,n);case"element":return PR(e,n);case"root":return LR(e,n);case"text":return DR(e,n)}}}function IR(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return ia(a,t),a}}function RR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ia(n,t),n}}function PR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ME(e,t.children),o=MR(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&&Xr.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return ia(u,t),u}function LR(e,t){const r={type:"root",children:ME(e,t.children)};return ia(r,t),r}function DR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ia(r,t),r}function ME(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=DE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function MR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Xr.call(r,n)?r[n]:void 0,u=r&&Xr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Xr.call(c,h)){const p=c[h];let g=FE(e,UE(a,h),h,p);g==null&&(g=FE(e,UE(u,h),h,p)),g!=null&&(d[h]=g)}if(o&&Xr.call(o,n)){const p=o[n];for(h in p)Xr.call(p,h)&&!Xr.call(d,h)&&(d[h]=p[h])}return d}function FE(e,t,n,r){return t?Array.isArray(r)?FR(e,t,n,r):BE(e,t,n,r):void 0}function FR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=BE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function BE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&BR(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function BR(e,t,n){const r=e.schema.protocols&&Xr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let h=-1;for(;++h<r.length;){const p=r[h];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function ia(e,t){const n=Tg(t);t.data&&(e.data=Ri(t.data)),n&&(e.position=n)}function UE(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function UR(e){return function(t){return OR(t,e)}}const HE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",ie(B(B({className:j(e,`${D}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},HR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=At();return!e&&!t?null:x.jsx("div",{className:j(n,`${D}-disclaimer`),children:t?x.jsx(x1,{rehypePlugins:[PE,UR],components:{ul:({children:r})=>x.jsx("ul",{className:j(n,`${D}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:j(n,`${D}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:j(n,`${D}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(HE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:j(n,`${D}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:j(n,`${D}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:j(n,`${D}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:j(n,`${D}-disclaimer-text`),children:e})})},Nf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o,sessionExpired:a}=Yn(),{globalClassName:u,searchConfig:c}=At(),d=Z.useRef(null),h=t||!o&&!a,p=T=>{var w;T.preventDefault();const y=(((w=d.current)==null?void 0:w.value)||"").trim();y&&(d.current.value="",r(y))},g=()=>{r("Can you connect me to a human?")};return x.jsxs("div",{className:j(u,e,`cim-${n}-component`,`${D}-search-bar-wrapper`),children:[x.jsxs("form",{className:j(u,e,`cim-${n}-component`,`${D}-search-bar`),name:`${D}-search-form`,onSubmit:p,children:[x.jsx("input",{className:j(u,e,`cim-${n}-component`,`${D}-search-input`),type:"text",ref:d,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${D}-user-input`,disabled:h}),x.jsx(uA,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:h}),x.jsx(lr,{className:j(u,`${D}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:g,icon:x.jsx(QS,{})})]}),x.jsx(HR,{})]})};function zR(e){return ft({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const zE=Z.createContext({isOpen:!1}),Of=Z.createContext(null),jE=Z.createContext(null),oa=()=>{var n,r;const e=Z.useContext(Of),t=Z.useContext(jE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},$E=({onClearChat:e,componentType:t})=>{const n=oa(),r=()=>{e(),n()};return x.jsxs("button",{className:j(`${D}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(zR,{}),"Clear chat"]})};function jR(e){return e==null?[]:Array.isArray(e)?e:[e]}var $R=(e,...t)=>e.concat(t),VR=(e,...t)=>e.filter(n=>!t.includes(n)),qR=e=>Array.from(new Set(e));function VE(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function YR(e,t,n={}){const{step:r=1,loop:o=!0}=n;return VE(e,t,{step:-r,loop:o})}var WR=e=>Array.isArray(e),qE=e=>e!=null&&typeof e=="object",GR=e=>qE(e)&&!WR(e),nl=e=>typeof e=="string",Oo=e=>typeof e=="function",KR=e=>e==null,QR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),XR=e=>Object.prototype.toString.call(e),YE=Function.prototype.toString,JR=YE.call(Object),ZR=e=>{if(!qE(e)||XR(e)!="[object Object]"||nP(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=QR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&YE.call(n)==JR},eP=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,tP=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,nP=e=>eP(e)||tP(e),rP=e=>e(),iP=()=>{},If=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function oP(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:sP,max:aP}=Math,uP=e=>Number.isNaN(e),lP=e=>uP(e)?0:e,WE=(e,t,n)=>sP(aP(lP(e),t),n);function Rf(e){if(!ZR(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Rf(o))}return n}function Pf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function cP(e,t){if(e==null)throw new Error(t())}function dP(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var fP=Object.defineProperty,hP=(e,t,n)=>t in e?fP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lf=(e,t,n)=>hP(e,typeof t!="symbol"?t+"":t,n),GE=()=>{},rl=e=>typeof e=="object"&&e!==null,Io=e=>e?"":void 0,KE=e=>e?"true":void 0,pP=1,mP=9,gP=11,Ft=e=>rl(e)&&e.nodeType===pP&&typeof e.nodeName=="string",il=e=>rl(e)&&e.nodeType===mP,EP=e=>rl(e)&&e===e.window,QE=e=>Ft(e)?e.localName||"":"#document";function yP(e){return["html","body","#document"].includes(QE(e))}var bP=e=>rl(e)&&e.nodeType!==void 0,Bi=e=>bP(e)&&e.nodeType===gP&&"host"in e,TP=e=>Ft(e)&&e.localName==="input",xP=e=>Ft(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function sa(e){if(!e)return!1;const t=e.getRootNode();return Lo(t)===e}var wP=/(textarea|select)/;function _P(e){if(e==null||!Ft(e))return!1;try{return TP(e)&&e.selectionStart!=null||wP.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ro(e,t){var r;if(!e||!t||!Ft(e)||!Ft(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Bi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function hr(e){var t;return il(e)?e:EP(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function vP(e){return hr(e).documentElement}function Po(e){var t,n,r;return Bi(e)?Po(e.host):il(e)?(t=e.defaultView)!=null?t:window:Ft(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Lo(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 SP(e){if(QE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||vP(e);return Bi(t)?t.host:t}function Df(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),il(t)||Bi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Mf=new WeakMap;function Do(e){return Mf.has(e)||Mf.set(e,Po(e).getComputedStyle(e)),Mf.get(e)}var Ff=new Set(["menu","listbox","dialog","grid","tree","region"]),AP=e=>Ff.has(e),XE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function JE(e,t){const n=new Set,r=Df(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=XE(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const p=r.getElementById(h);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(g&&AP(g)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function ZE(e,t){const n=Df(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=XE(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const p=n.getElementById(h);if(p){const g=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";g&&Ff.has(g)&&!T&&(t(p),o(p))}}}};o(e)}function CP(e){const t=new Set;return ZE(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function kP(e){const t=e.getAttribute("role");return!!(t&&Ff.has(t))}function NP(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function OP(e){var t;return NP(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function IP(e){if(!e.id)return!1;const t=Df(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&kP(e))}var Bf=()=>typeof document!="undefined";function RP(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Uf=e=>Bf()&&e.test(RP()),PP=e=>Bf()&&e.test(navigator.vendor),ey=()=>Bf()&&!!navigator.maxTouchPoints,LP=()=>Uf(/^iPhone/i),DP=()=>Uf(/^iPad/i)||Hf()&&navigator.maxTouchPoints>1,ol=()=>LP()||DP(),MP=()=>Hf()||ol(),Hf=()=>Uf(/^Mac/i),FP=()=>MP()&&PP(/apple/i);function BP(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Kn(e){var n;const t=BP(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var ty=e=>e.button===0,UP=e=>e.button===2||Hf()&&e.ctrlKey&&e.button===0,HP=e=>"touches"in e&&e.touches.length>0,zP={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ny={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function jP(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=zP[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in ny&&(o=ny[o]),o}function ry(e,t="client"){const n=HP(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Bt=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},iy=e=>Ft(e)&&e.tagName==="IFRAME",$P=/^(audio|video|details)$/;function oy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var VP=e=>!Number.isNaN(oy(e)),qP=e=>oy(e)<0;function YP(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 sy(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=YP(d,t);if(h){const p=Array.from(h.querySelectorAll(sl)).filter(n),g=u.get(d);if(g!==void 0){const T=g+1;r.splice(T,0,...p),p.forEach((y,w)=>{u.set(y,T+w)});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,w)=>{u.set(y,T+w)})}o.push(...p)}}return r}var sl="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",ay=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(sl));(n==!0||n=="if-empty"&&o.length===0)&&Ft(e)&&pr(e)&&o.unshift(e);const u=[];for(const c of o)if(pr(c)){if(iy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...ay(d,{getShadowRoot:r}));continue}u.push(c)}return r?sy(u,r,pr):u};function pr(e){return!Ft(e)||e.closest("[inert]")?!1:e.matches(sl)&&xP(e)}function Mo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(sl));n&&Ui(e)&&o.unshift(e);const a=[];for(const u of o)if(Ui(u)){if(iy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Mo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=sy(a,r,Ui);return!u.length&&n?o:u}return!a.length&&n?o:a}function Ui(e){return Ft(e)&&e.tabIndex>0?!0:pr(e)&&!qP(e)}function WP(e,t={}){const n=Mo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function GP(e,t={}){const{current:n,getShadowRoot:r}=t,o=Mo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Lo(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function aa(e){return e.tabIndex<0&&($P.test(e.localName)||_P(e))&&!VP(e)?0:e.tabIndex}function uy(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)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=Mo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var KP=class l2{constructor(){Lf(this,"id",null),Lf(this,"fn_cleanup"),Lf(this,"cleanup",()=>{this.cancel()})}static create(){return new l2}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 Ot(e){const t=KP.create();return t.request(e),t.cleanup}function ly(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function zf(e){const t=SP(e);return yP(t)?hr(t).body:Ft(t)&&JP(t)?t:zf(t)}var QP=/auto|scroll|overlay|hidden|clip/,XP=new Set(["inline","contents"]);function JP(e){const t=Po(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return QP.test(n+o+r)&&!XP.has(a)}var Fo="default",jf="",al=new WeakMap;function ZP(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return ol()?(Fo==="default"&&(jf=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Fo="disabled"):t&&(al.set(t,t.style.userSelect),t.style.userSelect="none"),()=>e6({target:t,doc:r})}function e6(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(ol()){if(Fo!=="disabled")return;Fo="restoring",setTimeout(()=>{ly(()=>{Fo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=jf||""),jf="",Fo="default")})},300)}else if(t&&al.has(t)){const a=al.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),al.delete(t)}}function t6(e={}){const u=e,{defer:t,target:n}=u,r=sn(u,["defer","target"]),o=t?Ot:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(ZP(ie(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function n6(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=ry(c),h=Math.sqrt(ou(d.x,2)+ou(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(h<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=ry(c);r({point:d,event:c})},u=[Bt(e,"pointermove",o,!1),Bt(e,"pointerup",a,!1),Bt(e,"pointercancel",a,!1),Bt(e,"contextmenu",a,!1),t6({doc:e})];return()=>{u.forEach(c=>c())}}function r6(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(h){if(h.key!=="Tab")return;let p=null;const[g,T]=WP(e,{includeContainer:!0,getShadowRoot:a}),y=GP(c,{current:n,getShadowRoot:a}),w=!g&&!T;h.shiftKey&&sa(y)?(o==null||o(),p=T):h.shiftKey&&(sa(g)||w)?p=n:!h.shiftKey&&sa(n)?(o==null||o(),p=g):!h.shiftKey&&(sa(T)||w)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Bt(u,"keydown",d,!0)}function i6(e,t){const c=t,{defer:n,triggerElement:r}=c,o=sn(c,["defer","triggerElement"]),a=n?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(r6(d,B({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function o6(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function ul(e,t){if(!e)return GE;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function s6(e,t,n){if(!e)return GE;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 a6(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function u6(e,t){const{timeout:n,rootNode:r}=t,o=Po(r),a=hr(r),u=new o.AbortController;return a6(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(h.disconnect(),c(p))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var l6=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),c6=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,cy=e=>{const t={};let n;for(;n=c6.exec(e);)t[n[1]]=n[2];return t},d6=(e,t)=>{if(nl(e)){if(nl(t))return`${e};${t}`;e=cy(e)}else nl(t)&&(t=cy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function It(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=If(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=l6(t[o],n[o]);continue}if(o==="style"){t[o]=d6(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function HF(e){return e}var Bo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Bo||{}),$f="__init__";function f6(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>hr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Lo(t()),a=u=>t().getElementById(u);return ie(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:sa,getById:a})}function h6(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Uo=()=>e=>Array.from(new Set(e)),dy=typeof globalThis.document!="undefined"?Z.useLayoutEffect:Z.useEffect;function ll(e){var g,T;const t=(g=e().value)!=null?g:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=Z.useState(t),[o,a]=Z.useState(r),u=e().value!==void 0,c=Z.useRef(o);c.current=u?e().value:o;const d=Z.useRef(c.current);dy(()=>{d.current=c.current},[o,e().value]);const h=y=>{var A,C;const w=d.current,v=Oo(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(C=(A=e()).onChange)==null||C.call(A,v,w)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Ps.flushSync:rP)(()=>h(y))},invoke(y,w){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,w)},hash(y){var w,v,A;return(A=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?A:String(y)}}}ll.cleanup=e=>{Z.useEffect(()=>e,[])},ll.ref=e=>{const t=Z.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function p6(e){const t=Z.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var m6=(e,t)=>{const n=Z.useRef(!1),r=Z.useRef(!1);Z.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),Z.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function cl(e,t={}){var oe,he,ae,se,Te,Ce;const n=Z.useMemo(()=>{const{id:ee,ids:V,getRootNode:q}=t;return f6({id:ee,ids:V,getRootNode:q})},[t]),r=(...ee)=>{e.debug&&console.log(...ee)},o=(he=(oe=e.props)==null?void 0:oe.call(e,{props:Rf(t),scope:n}))!=null?he:t,a=g6(o),u=(ae=e.context)==null?void 0:ae.call(e,{prop:a,bindable:ll,scope:n,flush:hy,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),c=fy(u),d={get(ee){var V;return(V=c.current)==null?void 0:V[ee].ref.current},set(ee,V){var q;(q=c.current)==null||q[ee].set(V)},initial(ee){var V;return(V=c.current)==null?void 0:V[ee].initial},hash(ee){var q,S;const V=(q=c.current)==null?void 0:q[ee].get();return(S=c.current)==null?void 0:S[ee].hash(V)}},h=Z.useRef(new Map),p=Z.useRef(null),g=Z.useRef(null),T=Z.useRef({type:""}),y=()=>ie(B({},T.current),{current(){return T.current},previous(){return g.current}}),w=()=>ie(B({},F),{matches(...ee){return ee.includes(F.ref.current)},hasTag(ee){var V,q;return!!((q=(V=e.states[F.ref.current])==null?void 0:V.tags)!=null&&q.includes(ee))}}),v=p6((Te=(se=e.refs)==null?void 0:se.call(e,{prop:a,context:d}))!=null?Te:{}),A=()=>({state:w(),context:d,event:y(),prop:a,send:z,action:C,guard:k,track:m6,refs:v,computed:Y,flush:hy,scope:n,choose:U}),C=ee=>{const V=Oo(ee)?ee(A()):ee;if(!V)return;const q=V.map(S=>{var W,O;const I=(O=(W=e.implementations)==null?void 0:W.actions)==null?void 0:O[S];return I||Pf(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),I});for(const S of q)S==null||S(A())},k=ee=>{var V,q;return Oo(ee)?ee(A()):(q=(V=e.implementations)==null?void 0:V.guards)==null?void 0:q[ee](A())},R=ee=>{const V=Oo(ee)?ee(A()):ee;if(!V)return;const q=V.map(I=>{var O,be;const W=(be=(O=e.implementations)==null?void 0:O.effects)==null?void 0:be[I];return W||Pf(`[zag-js] No implementation found for effect "${JSON.stringify(I)}"`),W}),S=[];for(const I of q){const W=I==null?void 0:I(A());W&&S.push(W)}return()=>S.forEach(I=>I==null?void 0:I())},U=ee=>jR(ee).find(V=>{let q=!V.guard;return nl(V.guard)?q=!!k(V.guard):Oo(V.guard)&&(q=V.guard(A())),q}),Y=ee=>{cP(e.computed,()=>"[zag-js] No computed object found on machine");const V=e.computed[ee];return V({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},F=ll(()=>({defaultValue:e.initialState({prop:a}),onChange(ee,V){var S,I,W,O;if(V){const be=h.current.get(V);be==null||be(),h.current.delete(V)}V&&C((S=e.states[V])==null?void 0:S.exit),C((I=p.current)==null?void 0:I.actions);const q=R((W=e.states[ee])==null?void 0:W.effects);if(q&&h.current.set(ee,q),V===$f){C(e.entry);const be=R(e.effects);be&&h.current.set($f,be)}C((O=e.states[ee])==null?void 0:O.entry)}})),X=Z.useRef(void 0),ce=Z.useRef(Bo.NotStarted);dy(()=>{queueMicrotask(()=>{var I;const q=ce.current===Bo.Started;ce.current=Bo.Started,r(q?"rehydrating...":"initializing...");const S=(I=X.current)!=null?I:F.initial;F.invoke(S,q?F.get():$f)});const ee=h.current,V=F.ref.current;return()=>{r("unmounting..."),X.current=V,ce.current=Bo.Stopped,ee.forEach(q=>q==null?void 0:q()),h.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const de=()=>"ref"in F?F.ref.current:F.get(),z=ee=>{queueMicrotask(()=>{var O,be,Oe,Re,He;if(ce.current!==Bo.Started)return;g.current=T.current,T.current=ee;let V=de();const q=(Oe=(O=e.states[V].on)==null?void 0:O[ee.type])!=null?Oe:(be=e.on)==null?void 0:be[ee.type],S=U(q);if(!S)return;p.current=S;const I=(Re=S.target)!=null?Re:V;r("transition",ee.type,S.target||V,`(${S.actions})`);const W=I!==V;W?Ps.flushSync(()=>F.set(I)):S.reenter&&!W?F.invoke(V,V):C((He=S.actions)!=null?He:[])})};return(Ce=e.watch)==null||Ce.call(e,A()),{state:w(),send:z,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>ce.current}}function fy(e){const t=Z.useRef(e);return t.current=e,t}function g6(e){const t=fy(e);return function(r){return t.current[r]}}function hy(e){queueMicrotask(()=>{Ps.flushSync(()=>e())})}var Vf=h6(e=>e);function dl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function E6(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const qf=e=>{const t=Z.memo(Z.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=sn(h,["asChild","children"]);if(!o)return Z.createElement(e,ie(B({},u),{ref:r}),a);if(!Z.isValidElement(a))return null;const c=Z.Children.only(a),d=E6(c);return Z.cloneElement(c,ie(B({},It(u,c.props)),{ref:r?dl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Qt=(()=>{const e=new Map;return new Proxy(qf,{apply(t,n,r){return qf(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,qf(r)),e.get(r)}})})();function y6(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Hi(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=Z.createContext(u);c.displayName=t;function d(){var p;const h=Z.useContext(c);if(!h&&n){const g=new Error(a!=null?a:y6(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return h}return[c.Provider,d,c]}const[b6,Yf]=Hi({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[py,ua]=Hi({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),my=Z.forwardRef((e,t)=>{const n=Yf(),r=ua(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Qt.div,ie(B({},o),{ref:dl(r.ref,t)}))});my.displayName="PopoverContent";const gy=Z.forwardRef((e,t)=>{const n=Yf(),r=ua(),o=It(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Qt.div,ie(B({},o),{ref:t}))});gy.displayName="PopoverPositioner";const la=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),Ey=e=>la()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function T6(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var x6={props({props:e}){return ie(B({},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",Do(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Ot(()=>{var c,d;const u=fl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.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})=>{Ot(()=>{e.set("prevAnimationName",fl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,T;((T=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?T:d.target)===o&&e.set("prevAnimationName",fl(t.get("styles")))},u=d=>{const h=fl(t.get("styles"));Kn(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=ul(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),ly(()=>c())}}}}};function fl(e){return(e==null?void 0:e.animationName)||"none"}Uo()(["onExitComplete","present","immediate"]);function w6(e,t={}){const{sync:n=!1}=t,r=_6(e);return Z.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function _6(e){const t=Z.useRef(e);return t.current=e,t}const Wf=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=sn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=Z.useRef(!1),c=ie(B({},a),{present:r,onExitComplete:w6(e.onExitComplete)}),d=cl(x6,c),h=T6(d);h.present&&(u.current=!0);const p=!h.present&&!u.current&&t||n&&!h.present&&u.current,g=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:g,present:h.present,unmounted:p}};var zi=(e,t=[])=>({parts:(...n)=>{if(v6(t))return zi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>zi(e,[...t,...n]),omit:(...n)=>zi(e,t.filter(r=>!n.includes(r))),rename:n=>zi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ho(e)}"][data-part="${Ho(r)}"]`,`& [data-scope="${Ho(e)}"][data-part="${Ho(r)}"]`].join(", "),attrs:{"data-scope":Ho(e),"data-part":Ho(r)}}}),{})}),Ho=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),v6=e=>e.length===0;const S6=["top","right","bottom","left"],Jr=Math.min,_n=Math.max,hl=Math.round,pl=Math.floor,mr=e=>({x:e,y:e}),A6={left:"right",right:"left",bottom:"top",top:"bottom"},C6={start:"end",end:"start"};function Gf(e,t,n){return _n(e,Jr(t,n))}function Nr(e,t){return typeof e=="function"?e(t):e}function Or(e){return e.split("-")[0]}function zo(e){return e.split("-")[1]}function Kf(e){return e==="x"?"y":"x"}function Qf(e){return e==="y"?"height":"width"}const k6=new Set(["top","bottom"]);function gr(e){return k6.has(Or(e))?"y":"x"}function Xf(e){return Kf(gr(e))}function N6(e,t,n){n===void 0&&(n=!1);const r=zo(e),o=Xf(e),a=Qf(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ml(u)),[u,ml(u)]}function O6(e){const t=ml(e);return[Jf(e),t,Jf(t)]}function Jf(e){return e.replace(/start|end/g,t=>C6[t])}const yy=["left","right"],by=["right","left"],I6=["top","bottom"],R6=["bottom","top"];function P6(e,t,n){switch(e){case"top":case"bottom":return n?t?by:yy:t?yy:by;case"left":case"right":return t?I6:R6;default:return[]}}function L6(e,t,n,r){const o=zo(e);let a=P6(Or(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Jf)))),a}function ml(e){return e.replace(/left|right|bottom|top/g,t=>A6[t])}function D6(e){return B({top:0,right:0,bottom:0,left:0},e)}function Ty(e){return typeof e!="number"?D6(e):{top:e,right:e,bottom:e,left:e}}function gl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function xy(e,t,n){let{reference:r,floating:o}=e;const a=gr(t),u=Xf(t),c=Qf(u),d=Or(t),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(zo(t)){case"start":y[u]-=T*(n&&h?-1:1);break;case"end":y[u]+=T*(n&&h?-1:1);break}return y}const M6=(e,t,n)=>$e(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:g}=xy(h,r,d),T=r,y={},w=0;for(let v=0;v<c.length;v++){const{name:A,fn:C}=c[v],{x:k,y:R,data:U,reset:Y}=yield C({x:p,y:g,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=k!=null?k:p,g=R!=null?R:g,y=ie(B({},y),{[A]:B(B({},y[A]),U)}),Y&&w<=50&&(w++,typeof Y=="object"&&(Y.placement&&(T=Y.placement),Y.rects&&(h=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:g}=xy(h,T,d)),v=-1)}return{x:p,y:g,placement:T,strategy:o,middlewareData:y}});function ca(e,t){return $e(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:T=!1,padding:y=0}=Nr(t,e),w=Ty(y),A=c[T?g==="floating"?"reference":"floating":g],C=gl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),k=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),U=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},Y=gl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:R,strategy:d}):k);return{top:(C.top-Y.top+w.top)/U.y,bottom:(Y.bottom-C.bottom+w.bottom)/U.y,left:(C.left-Y.left+w.left)/U.x,right:(Y.right-C.right+w.right)/U.x}})}const F6=e=>({name:"arrow",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:g=0}=Nr(e,n)||{};if(p==null)return{};const T=Ty(g),y={x:r,y:o},w=Xf(a),v=Qf(w),A=yield c.getDimensions(p),C=w==="y",k=C?"top":"left",R=C?"bottom":"right",U=C?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[w]-y[w]-u.floating[v],F=y[w]-u.reference[w],X=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ce=X?X[U]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(X)))&&(ce=d.floating[U]||u.floating[v]);const de=Y/2-F/2,z=ce/2-A[v]/2-1,oe=Jr(T[k],z),he=Jr(T[R],z),ae=oe,se=ce-A[v]-he,Te=ce/2-A[v]/2+de,Ce=Gf(ae,Te,se),ee=!h.arrow&&zo(a)!=null&&Te!==Ce&&u.reference[v]/2-(Te<ae?oe:he)-A[v]/2<0,V=ee?Te<ae?Te-ae:Te-se:0;return{[w]:y[w]+V,data:B({[w]:Ce,centerOffset:Te-Ce-V},ee&&{alignmentOffset:V}),reset:ee}})}}),B6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,Te=Nr(e,n),{mainAxis:g=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=Te,C=sn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=Or(a),R=gr(d),U=Or(d)===d,Y=yield h.isRTL==null?void 0:h.isRTL(p.floating),F=y||(U||!A?[ml(d)]:O6(d)),X=v!=="none";!y&&X&&F.push(...L6(d,A,v,Y));const ce=[d,...F],de=yield ca(n,C),z=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&z.push(de[k]),T){const Ce=N6(a,c,Y);z.push(de[Ce[0]],de[Ce[1]])}if(oe=[...oe,{placement:a,overflows:z}],!z.every(Ce=>Ce<=0)){var he,ae;const Ce=(((he=u.flip)==null?void 0:he.index)||0)+1,ee=ce[Ce];if(ee&&(!(T==="alignment"?R!==gr(ee):!1)||oe.every(S=>gr(S.placement)===R?S.overflows[0]>0:!0)))return{data:{index:Ce,overflows:oe},reset:{placement:ee}};let V=(ae=oe.filter(q=>q.overflows[0]<=0).sort((q,S)=>q.overflows[1]-S.overflows[1])[0])==null?void 0:ae.placement;if(!V)switch(w){case"bestFit":{var se;const q=(se=oe.filter(S=>{if(X){const I=gr(S.placement);return I===R||I==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(I=>I>0).reduce((I,W)=>I+W,0)]).sort((S,I)=>S[1]-I[1])[0])==null?void 0:se[0];q&&(V=q);break}case"initialPlacement":V=d;break}if(a!==V)return{reset:{placement:V}}}return{}})}}};function wy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _y(e){return S6.some(t=>e[t]>=0)}const U6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return $e(this,null,function*(){const{rects:r}=n,u=Nr(e,n),{strategy:o="referenceHidden"}=u,a=sn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield ca(n,ie(B({},a),{elementContext:"reference"})),d=wy(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:_y(d)}}}case"escaped":{const c=yield ca(n,ie(B({},a),{altBoundary:!0})),d=wy(c,r.floating);return{data:{escapedOffsets:d,escaped:_y(d)}}}default:return{}}})}}},vy=new Set(["left","top"]);function H6(e,t){return $e(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Or(n),c=zo(n),d=gr(n)==="y",h=vy.has(u)?-1:1,p=a&&d?-1:1,g=Nr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),d?{x:y*p,y:T*h}:{x:T*h,y:y*p}})}const z6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return $e(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield H6(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:ie(B({},h),{placement:c})}})}}},j6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a}=n,C=Nr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:k=>{let{x:R,y:U}=k;return{x:R,y:U}}}}=C,h=sn(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield ca(n,h),T=gr(Or(a)),y=Kf(T);let w=p[y],v=p[T];if(u){const k=y==="y"?"top":"left",R=y==="y"?"bottom":"right",U=w+g[k],Y=w-g[R];w=Gf(U,w,Y)}if(c){const k=T==="y"?"top":"left",R=T==="y"?"bottom":"right",U=v+g[k],Y=v-g[R];v=Gf(U,v,Y)}const A=d.fn(ie(B({},n),{[y]:w,[T]:v}));return ie(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[T]:c}}})})}}},$6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Nr(e,t),p={x:n,y:r},g=gr(o),T=Kf(g);let y=p[T],w=p[g];const v=Nr(c,t),A=typeof v=="number"?{mainAxis:v,crossAxis:0}:B({mainAxis:0,crossAxis:0},v);if(d){const R=T==="y"?"height":"width",U=a.reference[T]-a.floating[R]+A.mainAxis,Y=a.reference[T]+a.reference[R]-A.mainAxis;y<U?y=U:y>Y&&(y=Y)}if(h){var C,k;const R=T==="y"?"width":"height",U=vy.has(Or(o)),Y=a.reference[g]-a.floating[R]+(U&&((C=u.offset)==null?void 0:C[g])||0)+(U?0:A.crossAxis),F=a.reference[g]+a.reference[R]+(U?0:((k=u.offset)==null?void 0:k[g])||0)-(U?A.crossAxis:0);w<Y?w=Y:w>F&&(w=F)}return{[T]:y,[g]:w}}}},V6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=Nr(e,n),{apply:h=()=>{}}=oe,p=sn(oe,["apply"]),g=yield ca(n,p),T=Or(a),y=zo(a),w=gr(a)==="y",{width:v,height:A}=u.floating;let C,k;T==="top"||T==="bottom"?(C=T,k=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(k=T,C=y==="end"?"top":"bottom");const R=A-g.top-g.bottom,U=v-g.left-g.right,Y=Jr(A-g[C],R),F=Jr(v-g[k],U),X=!n.middlewareData.shift;let ce=Y,de=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(de=U),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=R),X&&!y){const he=_n(g.left,0),ae=_n(g.right,0),se=_n(g.top,0),Te=_n(g.bottom,0);w?de=v-2*(he!==0||ae!==0?he+ae:_n(g.left,g.right)):ce=A-2*(se!==0||Te!==0?se+Te:_n(g.top,g.bottom))}yield h(ie(B({},n),{availableWidth:de,availableHeight:ce}));const z=yield c.getDimensions(d.floating);return v!==z.width||A!==z.height?{reset:{rects:!0}}:{}})}}};function El(){return typeof window!="undefined"}function jo(e){return Sy(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Er(e){var t;return(t=(Sy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sy(e){return El()?e instanceof Node||e instanceof vn(e).Node:!1}function Qn(e){return El()?e instanceof Element||e instanceof vn(e).Element:!1}function yr(e){return El()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function Ay(e){return!El()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}const q6=new Set(["inline","contents"]);function da(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!q6.has(o)}const Y6=new Set(["table","td","th"]);function W6(e){return Y6.has(jo(e))}const G6=[":popover-open",":modal"];function yl(e){return G6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const K6=["transform","translate","scale","rotate","perspective"],Q6=["transform","translate","scale","rotate","perspective","filter"],X6=["paint","layout","strict","content"];function Zf(e){const t=eh(),n=Qn(e)?Xn(e):e;return K6.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Q6.some(r=>(n.willChange||"").includes(r))||X6.some(r=>(n.contain||"").includes(r))}function J6(e){let t=Zr(e);for(;yr(t)&&!$o(t);){if(Zf(t))return t;if(yl(t))return null;t=Zr(t)}return null}function eh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Z6=new Set(["html","body","#document"]);function $o(e){return Z6.has(jo(e))}function Xn(e){return vn(e).getComputedStyle(e)}function bl(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zr(e){if(jo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ay(e)&&e.host||Er(e);return Ay(t)?t.host:t}function Cy(e){const t=Zr(e);return $o(t)?e.ownerDocument?e.ownerDocument.body:e.body:yr(t)&&da(t)?t:Cy(t)}function fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Cy(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=vn(o);if(a){const c=th(u);return t.concat(u,u.visualViewport||[],da(o)?o:[],c&&n?fa(c):[])}return t.concat(o,fa(o,[],n))}function th(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ky(e){const t=Xn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=hl(n)!==a||hl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function nh(e){return Qn(e)?e:e.contextElement}function Vo(e){const t=nh(e);if(!yr(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ky(t);let u=(a?hl(n.width):n.width)/r,c=(a?hl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const e4=mr(0);function Ny(e){const t=vn(e);return!eh()||!t.visualViewport?e4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function ji(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=nh(e);let u=mr(1);t&&(r?Qn(r)&&(u=Vo(r)):u=Vo(e));const c=t4(a,n,r)?Ny(a):mr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const T=vn(a),y=r&&Qn(r)?vn(r):r;let w=T,v=th(w);for(;v&&r&&y!==w;){const A=Vo(v),C=v.getBoundingClientRect(),k=Xn(v),R=C.left+(v.clientLeft+parseFloat(k.paddingLeft))*A.x,U=C.top+(v.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,g*=A.y,d+=R,h+=U,w=vn(v),v=th(w)}}return gl({width:p,height:g,x:d,y:h})}function Tl(e,t){const n=bl(e).scrollLeft;return t?t.left+n:ji(Er(e)).left+n}function Oy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Tl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function n4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Er(r),c=t?yl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=mr(1);const p=mr(0),g=yr(r);if((g||!g&&!a)&&((jo(r)!=="body"||da(u))&&(d=bl(r)),yr(r))){const y=ji(r);h=Vo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!g&&!a?Oy(u,d):mr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+T.x,y:n.y*h.y-d.scrollTop*h.y+p.y+T.y}}function r4(e){return Array.from(e.getClientRects())}function i4(e){const t=Er(e),n=bl(e),r=e.ownerDocument.body,o=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Tl(e);const c=-n.scrollTop;return Xn(r).direction==="rtl"&&(u+=_n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const Iy=25;function o4(e,t){const n=vn(e),r=Er(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=eh();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=Tl(r);if(h<=0){const p=r.ownerDocument,g=p.body,T=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,w=Math.abs(r.clientWidth-g.clientWidth-y);w<=Iy&&(a-=w)}else h<=Iy&&(a+=h);return{width:a,height:u,x:c,y:d}}const s4=new Set(["absolute","fixed"]);function a4(e,t){const n=ji(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=yr(e)?Vo(e):mr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function Ry(e,t,n){let r;if(t==="viewport")r=o4(e,n);else if(t==="document")r=i4(Er(e));else if(Qn(t))r=a4(t,n);else{const o=Ny(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return gl(r)}function Py(e,t){const n=Zr(e);return n===t||!Qn(n)||$o(n)?!1:Xn(n).position==="fixed"||Py(n,t)}function u4(e,t){const n=t.get(e);if(n)return n;let r=fa(e,[],!1).filter(c=>Qn(c)&&jo(c)!=="body"),o=null;const a=Xn(e).position==="fixed";let u=a?Zr(e):e;for(;Qn(u)&&!$o(u);){const c=Xn(u),d=Zf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&s4.has(o.position)||da(u)&&!d&&Py(e,u))?r=r.filter(p=>p!==u):o=c,u=Zr(u)}return t.set(e,r),r}function l4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?yl(t)?[]:u4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const g=Ry(t,p,o);return h.top=_n(g.top,h.top),h.right=Jr(g.right,h.right),h.bottom=Jr(g.bottom,h.bottom),h.left=_n(g.left,h.left),h},Ry(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c4(e){const{width:t,height:n}=ky(e);return{width:t,height:n}}function d4(e,t,n){const r=yr(t),o=Er(t),a=n==="fixed",u=ji(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=mr(0);function h(){d.x=Tl(o)}if(r||!r&&!a)if((jo(t)!=="body"||da(o))&&(c=bl(t)),r){const y=ji(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?Oy(o,c):mr(0),g=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:g,y:T,width:u.width,height:u.height}}function rh(e){return Xn(e).position==="static"}function Ly(e,t){if(!yr(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Er(e)===n&&(n=n.ownerDocument.body),n}function Dy(e,t){const n=vn(e);if(yl(e))return n;if(!yr(e)){let o=Zr(e);for(;o&&!$o(o);){if(Qn(o)&&!rh(o))return o;o=Zr(o)}return n}let r=Ly(e,t);for(;r&&W6(r)&&rh(r);)r=Ly(r,t);return r&&$o(r)&&rh(r)&&!Zf(r)?n:r||J6(e)||n}const f4=function(e){return $e(this,null,function*(){const t=this.getOffsetParent||Dy,n=this.getDimensions,r=yield n(e.floating);return{reference:d4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function h4(e){return Xn(e).direction==="rtl"}const p4={convertOffsetParentRelativeRectToViewportRelativeRect:n4,getDocumentElement:Er,getClippingRect:l4,getOffsetParent:Dy,getElementRects:f4,getClientRects:r4,getDimensions:c4,getScale:Vo,isElement:Qn,isRTL:h4};function My(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m4(e,t){let n=null,r;const o=Er(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:p,top:g,width:T,height:y}=h;if(c||t(),!T||!y)return;const w=pl(g),v=pl(o.clientWidth-(p+T)),A=pl(o.clientHeight-(g+y)),C=pl(p),R={rootMargin:-w+"px "+-v+"px "+-A+"px "+-C+"px",threshold:_n(0,Jr(1,d))||1};let U=!0;function Y(F){const X=F[0].intersectionRatio;if(X!==d){if(!U)return u();X?u(!1,X):r=setTimeout(()=>{u(!1,1e-7)},1e3)}X===1&&!My(h,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(Y,ie(B({},R),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(Y,R)}n.observe(e)}return u(!0),a}function g4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=nh(e),p=o||a?[...h?fa(h):[],...fa(t)]:[];p.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const g=h&&c?m4(h,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(C=>{let[k]=C;k&&k.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let w,v=d?ji(e):null;d&&A();function A(){const C=ji(e);v&&!My(v,C)&&n(),v=C,w=requestAnimationFrame(A)}return n(),()=>{var C;p.forEach(k=>{o&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),g==null||g(),(C=y)==null||C.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const E4=z6,y4=j6,b4=B6,T4=V6,x4=U6,w4=F6,_4=$6,v4=(e,t,n)=>{const r=new Map,o=B({platform:p4},n),a=ie(B({},o.platform),{_c:r});return M6(e,t,ie(B({},o),{platform:a}))};function Fy(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ie(B({},o),{toJSON:()=>o})}function S4(e){if(!e)return Fy();const{x:t,y:n,width:r,height:o}=e;return Fy(t,n,r,o)}function A4(e,t){return{contextElement:Ft(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?S4(r):n.getBoundingClientRect()}}}var ha=e=>({variable:e,reference:`var(${e})`}),Ir={arrowSize:ha("--arrow-size"),arrowSizeHalf:ha("--arrow-size-half"),arrowBg:ha("--arrow-background"),transformOrigin:ha("--transform-origin"),arrowOffset:ha("--arrow-offset")},C4=e=>e==="top"||e==="bottom"?"y":"x";function k4(e,t){return{name:"transformOrigin",fn(n){var de,z,oe,he,ae;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=C4(d),p=((de=o.arrow)==null?void 0:de.x)||0,g=((z=o.arrow)==null?void 0:z.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,w=p+T/2,v=g+y/2,A=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),C=u.reference.height/2,k=y/2,R=(ae=(he=e.offset)==null?void 0:he.mainAxis)!=null?ae:e.gutter,U=typeof R=="number"?R+k:R!=null?R:k,Y=A>U,F={top:`${w}px calc(100% + ${U}px)`,bottom:`${w}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],X=`${w}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&Y;return r.floating.style.setProperty(Ir.transformOrigin.variable,ce?X:F),{data:{transformOrigin:ce?X:F}}}}}var N4={name:"rects",fn({rects:e}){return{data:e}}},O4=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Ir.arrowOffset.reference})`}),{}}}};function I4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var R4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function By(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ih(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function P4(e,t,n){const r=e||t.createElement("div");return w4({element:r,padding:n.arrowPadding})}function L4(e,t){var n;if(!KR((n=t.offset)!=null?n:t.gutter))return E4(({placement:r})=>{var p,g,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=I4(r),d=c?void 0:t.shift,h=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Rf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function D4(e){if(!e.flip)return;const t=ih(e.boundary);return b4(ie(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function M4(e){if(!e.slide&&!e.overlap)return;const t=ih(e.boundary);return y4(ie(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_4()}))}function F4(e){return T4({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function B4(e){var t;if(e.hideWhenDetached)return x4({strategy:"referenceHidden",boundary:(t=ih(e.boundary))!=null?t:"clippingAncestors"})}function U4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function H4(e,t,n={}){const r=A4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},R4,n),a=t.querySelector("[data-part=arrow]"),u=[L4(a,o),D4(o),M4(o),P4(a,t.ownerDocument,o),O4(a),k4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),F4(o),B4(o),N4],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,g=()=>$e(null,null,function*(){var U;if(!r||!t)return;const v=yield v4(r,t,{placement:c,middleware:u,strategy:d});h==null||h(v),p==null||p({placed:!0});const A=Po(t),C=By(A,v.x),k=By(A,v.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${k}px`),o.hideWhenDetached&&(((U=v.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const Y=Do(R);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>$e(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=U4(o.listeners),w=o.listeners?g4(r,t,T,y):iP;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function Uy(e,t,n={}){const c=n,{defer:r}=c,o=sn(c,["defer"]),a=r?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(H4(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var z4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function j4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Ir.arrowSize.reference,height:Ir.arrowSize.reference,[Ir.arrowSizeHalf.variable]:`calc(${Ir.arrowSize.reference} / 2)`,[Ir.arrowOffset.variable]:`calc(${Ir.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z4[t.split("-")[0]]:void 0,background:Ir.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,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 qo=new WeakMap,xl=new WeakMap,wl={},oh=0,Hy=e=>e&&(e.host||Hy(e.parentNode)),$4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Hy(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),V4=new Set(["script","output","status","next-route-announcer"]),q4=e=>V4.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Y4=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=$4(n,Array.isArray(e)?e:[e]);wl[r]||(wl[r]=new WeakMap);const c=wl[r],d=[],h=new Set,p=new Set(u),g=y=>{!y||h.has(y)||(h.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Ft(y)&&ZE(y,w=>{g(w)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,w=>{if(h.has(w))T(w);else try{if(q4(w))return;const A=w.getAttribute(o)==="true",C=(qo.get(w)||0)+1,k=(c.get(w)||0)+1;qo.set(w,C),c.set(w,k),d.push(w),C===1&&A&&xl.set(w,!0),k===1&&w.setAttribute(r,""),A||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),h.clear(),oh++,()=>{d.forEach(y=>{const w=qo.get(y)-1,v=c.get(y)-1;qo.set(y,w),c.set(y,v),w||(xl.has(y)||y.removeAttribute(o),xl.delete(y)),v||y.removeAttribute(r)}),oh--,oh||(qo=new WeakMap,qo=new WeakMap,xl=new WeakMap,wl={})}},W4=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,G4=(e,t=W4(e),n="data-aria-hidden",r=!0)=>{if(t)return Y4(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},K4=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function zy(e,t={}){const{defer:n=!0}=t,r=n?K4:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(G4(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function Q4(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function X4(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var jy="pointerdown.outside",$y="focus.outside";function J4(e){for(const t of e)if(Ft(t)&&pr(t))return!0;return!1}var Vy=e=>"clientY"in e;function Z4(e,t){if(!Vy(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 eL(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function qy(e,t){if(!t||!Vy(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return eL(u,c)?r||a:!1}function tL(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=hr(e),h=Po(e),p=Q4(h),g=X4(h);function T(R,U){if(!Ft(U)||!U.isConnected||Ro(e,U)||Z4(e,R)||c&&JE(e,U))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const X=zf(Y);if(qy(R,X))return!1}const F=zf(e);return qy(R,F)?!1:!(n!=null&&n(U))}const y=new Set,w=Bi(e==null?void 0:e.getRootNode());function v(R){function U(Y){var de,z;const F=u&&!ey()?Ot:oe=>oe(),X=Y!=null?Y:R,ce=(z=(de=X==null?void 0:X.composedPath)==null?void 0:de.call(X))!=null?z:[X==null?void 0:X.target];F(()=>{const oe=w?ce[0]:Kn(R);if(!(!e||!T(R,oe))){if(o||a){const he=If(o,a);e.addEventListener(jy,he,{once:!0})}Yy(e,jy,{bubbles:!1,cancelable:!0,detail:{originalEvent:X,contextmenu:UP(X),focusable:J4(ce),target:oe}})}})}R.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Bt(d,"click",U,{once:!0})),y.add(g.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const A=new Set,C=setTimeout(()=>{A.add(Bt(d,"pointerdown",v,!0)),A.add(g.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function k(R){(u?Ot:Y=>Y())(()=>{var X,ce;const Y=(ce=(X=R==null?void 0:R.composedPath)==null?void 0:X.call(R))!=null?ce:[R==null?void 0:R.target],F=w?Y[0]:Kn(R);if(!(!e||!T(R,F))){if(r||a){const de=If(r,a);e.addEventListener($y,de,{once:!0})}Yy(e,$y,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:pr(F),target:F}})}})}return ey()||(A.add(Bt(d,"focusin",k,!0)),A.add(g.addEventListener("focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(C),y.forEach(R=>R()),A.forEach(R=>R())}}function nL(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(tL(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function Yy(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function rL(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Bt(hr(e),"keydown",n,{capture:!0})}var Wy="layer:request-dismiss",Dn={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=>Ro(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ro(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=>Dn.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];oL(e,Wy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),iL(e,Wy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iL(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function oL(e,t,n){e.addEventListener(t,n,{once:!0})}var Gy;function Ky(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function sL(e){e.style.pointerEvents=""}function aL(e,t){const n=hr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Gy=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=u6(()=>{const c=o();return Ft(c)?c:null},{timeout:1e3});a.then(c=>r.push(ul(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Gy,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function uL(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Pf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Dn.add(h),Ky();function p(v){var C,k;const A=Kn(v.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(c&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function g(v){var C,k;const A=Kn(v.detail.originalEvent);Dn.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(c&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var A;Dn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var R;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],k=(R=t.persistentElements)==null?void 0:R.map(U=>U()).filter(Ft);return k&&C.push(...k),C.some(U=>Ro(U,v))||Dn.isInNestedLayer(e,v)}const w=[a?aL(e,t.persistentElements):void 0,rL(e,T),nL(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Dn.remove(e),Ky(),sL(e),w.forEach(v=>v==null?void 0:v())}}function Qy(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=Oo(e)?e():e;o.push(uL(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var lL=Object.defineProperty,cL=(e,t,n)=>t in e?lL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pt=(e,t,n)=>cL(e,typeof t!="symbol"?t+"":t,n),Xy={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()}},dL=[],fL=class{constructor(e,t){pt(this,"trapStack"),pt(this,"config"),pt(this,"doc"),pt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),pt(this,"portalContainers",new Set),pt(this,"listenerCleanups",[]),pt(this,"handleFocus",r=>{const o=Kn(r),a=this.findContainerIndex(o,r)>=0;if(a||il(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(aa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const p=h.findIndex(g=>g===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<h.length&&(u=h[p+1],c=!1):p-1>=0&&(u=h[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>aa(h)>0))||(c=!1);else c=!1;c&&(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}),pt(this,"handlePointerDown",r=>{const o=Kn(r);if(!(this.findContainerIndex(o,r)>=0)){if(ma(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ma(this.config.allowOutsideClick,r)||r.preventDefault()}}),pt(this,"handleClick",r=>{const o=Kn(r);this.findContainerIndex(o,r)>=0||ma(this.config.clickOutsideDeactivates,r)||ma(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),pt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;pa(r)&&r.preventDefault(),this.tryFocus(a)}}),pt(this,"handleEscapeKey",r=>{hL(r)&&ma(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),pt(this,"_mutationObserver"),pt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const h=d;return OP(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?IP(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),pt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),pt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!pr(r)){const o=Lo(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;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}),pt(this,"tryFocus",r=>{if(r!==!1&&r!==Lo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,pL(r)&&r.select()}}),pt(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({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(),Xy.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{Jy(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(h,h),this}return h(),this}),pt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),pt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),pt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),pt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),pt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),pt(this,"getNodeForOption",(r,{hasFallback:o=!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 c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),pt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Kn(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||pr(u)&&!Ui(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[g];c=aa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else pa(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||pr(u)&&!Ui(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[g];c=aa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else pa(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||dL;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return pa(r)&&!r.shiftKey},isKeyBackward(r){return pa(r)&&r.shiftKey}},t);this.doc=n.document||hr(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=>{CP(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:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?JE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Mo(e,{getShadowRoot:this.config.getShadowRoot}),n=ay(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(aa(t[h])>0){c=!0;break}function d(h,p=!0){const g=t.indexOf(h);if(g>=0)return t[g+(p?1:-1)];const T=n.indexOf(h);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(Ui(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Ui(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,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 Xy.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Jy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Bt(this.doc,"focusin",this.handleFocus,!0),Bt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Bt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Bt(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=Lo(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},pa=e=>e.key==="Tab",ma=(e,...t)=>typeof e=="function"?e(...t):e,hL=e=>!e.isComposing&&e.key==="Escape",Jy=e=>setTimeout(e,0),pL=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Zy(e,t={}){let n;const r=Ot(()=>{const o=typeof e=="function"?e():e;if(o){n=new fL(o,ie(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:hr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var sh="data-scroll-lock";function mL(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function eb(e){const t=Do(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function tb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(sh))return;const u=eb(r)||eb(o),c=n.innerWidth-r.clientWidth;o.setAttribute(sh,"");const d=()=>s6(r,"--scrollbar-width",`${c}px`),h=mL(r),p=()=>{const w={overflow:"hidden"};return!u&&c>0&&(w[h]=`${c}px`),ul(o,w)},g=()=>{var Y,F;const{scrollX:w,scrollY:v,visualViewport:A}=n,C=(Y=A==null?void 0:A.offsetLeft)!=null?Y:0,k=(F=A==null?void 0:A.offsetTop)!=null?F:0,R={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(k))}px`,left:`${-(w-Math.floor(C))}px`,right:"0"};!u&&c>0&&(R[h]=`${c}px`);const U=ul(o,R);return()=>{U==null||U(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),ol()?g():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(sh)}}var gL=zi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),br=gL.build(),nb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},rb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ah=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},ib=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},EL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},yL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ob=e=>e.getById(nb(e)),Yo=e=>e.getById(rb(e)),Wo=e=>e.getById(ah(e)),sb=e=>e.getById(ib(e)),bL=e=>e.getById(uh(e)),TL=e=>e.getById(lh(e));function xL(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),p=a("currentPortalled"),g=r.get("renderedElements"),T=j4(ie(B({},u("positioning")),{placement:h}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ie(B({id:EL(c)},br.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ie(B({},br.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ie(B({},br.anchor.attrs),{dir:u("dir"),id:nb(c)}))},getTriggerProps(){return t.button(ie(B({},br.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:rb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ah(c),onPointerDown(y){ty(y)&&FP()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ie(B({},br.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ie(B({id:ib(c)},br.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ie(B({},br.content.attrs),{dir:u("dir"),id:ah(c),tabIndex:-1,role:"dialog","aria-modal":KE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Io(d),"aria-labelledby":g.title?uh(c):void 0,"aria-describedby":g.description?lh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ie(B({},br.title.attrs),{id:uh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ie(B({},br.description.attrs),{id:lh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ie(B({},br.closeTrigger.attrs),{dir:u("dir"),id:yL(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var wL={props({props:e}){return ie(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({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=ob(n))!=null?a:Yo(n);return Uy(r,()=>sb(n),ie(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Wo(n);let o=!0;return Qy(r,{type:"popover",pointerBlocking:t("modal"),exclude:Yo(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&&(o=!(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:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:i6(()=>Wo(t),{triggerElement:Yo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?zy(()=>[Wo(t),Yo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return tb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Zy(()=>Wo(t),{initialFocus:()=>uy({root:Wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=ob(n))!=null?u:Yo(n);Uy(o,()=>sb(n),ie(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Ot(()=>{Object.assign(e.get("renderedElements"),{title:!!bL(t),description:!!TL(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ot(()=>{const n=uy({root:Wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Ot(()=>{const a=Yo(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})}}}};Uo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[jF,_l]=Hi({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[$F,ch]=Hi({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),_L=e=>{const t=Z.useId(),{getRootNode:n}=_l(),{dir:r}=ch(),o=B({id:t,dir:r,getRootNode:n},e),a=cl(wL,o);return xL(a,Vf)},vL=e=>{const[t,u]=Ey(e),c=u,{children:n}=c,r=sn(c,["children"]),o=_L(r),a=Wf(It({present:o.open},t));return x.jsx(b6,{value:o,children:x.jsx(py,{value:a,children:n})})},ab=Z.forwardRef((e,t)=>{const n=Yf(),r=ua(),o=It(ie(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Qt.button,ie(B({},o),{ref:t}))});ab.displayName="PopoverTrigger";function SL(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function AL(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function ub(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function lb(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function cb(e){return ft({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const CL=({className:e,componentType:t,children:n})=>{const[r,o]=Z.useState(!1),{globalClassName:a}=At(),u=h=>{o(h.open)},c=Z.useCallback(()=>{o(!1)},[]),d=Z.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(vL,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(ab,{"aria-label":`Overflow menu for ${t}`,className:j(`${D}-overflow-menu-button-trigger`,`${D}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(cb,{})}),x.jsx(gy,{children:x.jsx(my,{className:j(`${D}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(jE.Provider,{value:d,children:n})})})]})};function db(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function fb(e){return ft({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[kL,$i]=Hi({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),dh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getControlProps(),e);return x.jsx(Qt.div,ie(B(B({},r),e),{ref:t}))});dh.displayName="CarouselControl";const fh=Z.forwardRef((e,t)=>{const[n,r]=la()(e,["readOnly","index"]),o=$i(),a=It(o.getIndicatorProps(n),r);return x.jsx(Qt.button,ie(B({},a),{ref:t}))});fh.displayName="CarouselIndicator";const hh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getIndicatorGroupProps(),e);return x.jsx(Qt.div,ie(B({},r),{ref:t}))});hh.displayName="CarouselIndicatorGroup";const ph=Z.forwardRef((e,t)=>{const[n,r]=la()(e,["index","snapAlign"]),o=$i(),a=It(o.getItemProps(n),r);return x.jsx(Qt.div,ie(B({},a),{ref:t}))});ph.displayName="CarouselItem";const mh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getItemGroupProps(),e);return x.jsx(Qt.div,ie(B({},r),{ref:t}))});mh.displayName="CarouselItemGroup";const gh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getNextTriggerProps(),e);return x.jsx(Qt.button,ie(B({},r),{ref:t}))});gh.displayName="CarouselNextTrigger";const Eh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getPrevTriggerProps(),e);return x.jsx(Qt.button,ie(B({},r),{ref:t}))});Eh.displayName="CarouselPrevTrigger";function NL(e){const t=Do(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=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 c(T,y){let w=parseFloat(T);return/%/.test(T)&&(w/=100,w*=y),Number.isNaN(w)?0:w}let d=c(r,n.width),h=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:h,after:g}}}function OL(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 hb(e){let t=[];for(const n of e.children)t=t.concat(n,hb(n));return t}function pb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?hb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",h=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!OL(n,g,u))continue;const T=Do(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w:y,A=g[c]-n[c]+e[h];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+g[d]/2});break;case"end":r[a].end.push({node:p,position:A+g[d]});break}}}return r}function mb(e){const t=e.getBoundingClientRect(),n=NL(e),r=pb(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:gb([...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(Eb(0,o.x))),y:gb([...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(Eb(0,o.y)))}}function IL(e,t,n){const r=pb(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var gb=e=>[...new Set(e)],Eb=(e,t)=>n=>Math.max(e,Math.min(t,n)),RL=zi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Rr=RL.build(),PL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},LL=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},vl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},DL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},ML=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},FL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},yb=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},hn=e=>e.getById(vl(e)),bb=e=>o6(hn(e),"[data-part=item]"),BL=(e,t)=>e.getById(yb(e,t)),Tb=e=>{const t=hn(e);if(!t)return;const n=Mo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function UL(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),w=r.get("page"),v=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:h,page:w,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return w/y.length},scrollToIndex(k,R){a({type:"INDEX.SET",index:k,instant:R})},scrollTo(k,R){a({type:"PAGE.SET",index:k,instant:R})},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(ie(B({},Rr.root.attrs),{id:PL(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":v,"--slide-spacing":c("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(ie(B({},Rr.itemGroup.attrs),{id:vl(u),"data-orientation":c("orientation"),"data-dragging":Io(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){Ro(k.currentTarget,Kn(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Ro(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!ty(k))return;const R=Kn(k);pr(R)&&R!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:oP(k=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";k[R]<0&&!o("canScrollPrev")||k[R]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const R=r.get("slidesInView").includes(k.index);return t.element(ie(B({},Rr.item.attrs),{id:LL(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":Io(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(k.index,c("slideCount")),"aria-hidden":KE(!R),style:{scrollSnapAlign:(()=>{var ce;const U=(ce=k.snapAlign)!=null?ce:"start",Y=c("slidesPerMove"),F=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(k.index+F)%F===0?U:void 0})()}}))},getControlProps(){return t.element(ie(B({},Rr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ie(B({},Rr.prevTrigger.attrs),{id:ML(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":vl(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ie(B({},Rr.nextTrigger.attrs),{dir:c("dir"),id:DL(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":vl(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ie(B({},Rr.indicatorGroup.attrs),{dir:c("dir"),id:FL(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const R="indicator",U={ArrowDown(X){T||(a({type:"PAGE.NEXT",src:R}),X.preventDefault())},ArrowUp(X){T||(a({type:"PAGE.PREV",src:R}),X.preventDefault())},ArrowRight(X){T&&(a({type:"PAGE.NEXT",src:R}),X.preventDefault())},ArrowLeft(X){T&&(a({type:"PAGE.PREV",src:R}),X.preventDefault())},Home(X){a({type:"PAGE.SET",index:0,src:R}),X.preventDefault()},End(X){a({type:"PAGE.SET",index:y.length-1,src:R}),X.preventDefault()}},Y=jP(k,{dir:c("dir"),orientation:c("orientation")}),F=U[Y];F==null||F(k)}}))},getIndicatorProps(k){return t.button(ie(B({},Rr.indicator.attrs),{dir:c("dir"),id:yb(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":Io(k.readOnly),"data-current":Io(k.index===w),"aria-label":C.indicator(k.index),onClick(R){R.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ie(B({},Rr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":Io(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var HL={props({props:e}){return dP(e,["slideCount"],"carousel"),ie(B({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:B({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:zL(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 GR(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({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(hn(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=hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Tb(e)});return Tb(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Ot(()=>{o(),Ot(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return bb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var T;const p=h.target,g=Number((T=p.dataset.index)!=null?T:"-1");return g==null||Number.isNaN(g)||g===-1?d:h.isIntersecting?$R(d,g):VR(d,g)},n.get("slidesInView"));n.set("slidesInView",qR(c))},{root:r,threshold:t("inViewThreshold")});return bb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Bt(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 Bt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return n6(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 Bt(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:o}){var h;const a=t.instant?"instant":"smooth",u=WE((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=hn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=hn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=VE(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=YR(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=hn(r);if(!o)return;const a=IL(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-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=WE(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=hn(n);if(!r)return;const o=mb(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=hn(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=hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=mb(r),c=u.x.reduce((h,p)=>Math.abs(p-o)<Math.abs(h-o)?p:h,u.x[0]),d=u.y.reduce((h,p)=>Math.abs(p-a)<Math.abs(h-a)?p:h,u.y[0]);Ot(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));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=BL(n,e.get("page"));r&&Ot(()=>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 zL(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Uo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Uo()(["index","readOnly"]),Uo()(["index","snapAlign"]);const jL=e=>{const t=Z.useId(),{getRootNode:n}=_l(),{dir:r}=ch(),o=B({id:t,dir:r,getRootNode:n},e),a=cl(HL,o);return UL(a,Vf)},yh=Z.forwardRef((e,t)=>{const[n,r]=la()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=jL(n),a=It(o.getRootProps(),r);return x.jsx(kL,{value:o,children:x.jsx(Qt.div,ie(B({},a),{ref:t}))})});yh.displayName="CarouselRoot";const $L=180,VL=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},qL=({globalClassName:e,className:t,itemMinWidth:n=$L,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:p})=>{const g=Array.from(p),T=g.length,y=Z.useRef(null),[w,v]=Z.useState(0),{width:A}=CS();Z.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,T]);const C=VL(r),k=n+C,R=w>0?(w+C)/k:1,U=Math.max(1,Math.floor(R));if(T===0)return null;const Y=T>U,F=Math.ceil(T/U),X=Y?Math.max(1,R):U;return x.jsxs(yh,{ref:y,className:j(e,t,`${D}-carousel`),slidesPerPage:X,slidesPerMove:U,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":h,children:[x.jsx(mh,{className:j(e,`${D}-carousel__item-group`,{"carousel-row-container":!Y}),children:g.map((ce,de)=>x.jsx(ph,{index:de,className:j(e,`${D}-carousel__item`),children:ce},de))}),c&&Y&&x.jsxs(dh,{className:j(e,`${D}-carousel__control`),children:[x.jsx(Eh,{className:j(e,`${D}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(ub,{size:"16px"})}),x.jsx(gh,{className:j(e,`${D}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(lb,{size:"16px"})})]}),u&&Y&&x.jsx(hh,{className:j(e,`${D}-carousel__indicator-group`),children:Array.from({length:F},(ce,de)=>x.jsx(fh,{index:de,className:j(e,`${D}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},YL=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:j(e,`${D}-close-button`),disabled:r,onClick:n,children:x.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:x.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"})})}),[WL,GL]=Hi({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),KL=e=>la()(e,["lazyMount","unmountOnExit"]),[QL,ga]=Hi({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),xb=Z.forwardRef((e,t)=>{const n=ga(),r=GL(),o=Wf(ie(B({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Qt.div,ie(B({},a),{ref:dl(o.ref,t)}))});xb.displayName="DialogBackdrop";const bh=Z.forwardRef((e,t)=>{const n=ga(),r=ua(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Qt.div,ie(B({},o),{ref:dl(r.ref,t)}))});bh.displayName="DialogContent";const Th=Z.forwardRef((e,t)=>{const n=ga(),r=It(n.getDescriptionProps(),e);return x.jsx(Qt.div,ie(B({},r),{ref:t}))});Th.displayName="DialogDescription";const xh=Z.forwardRef((e,t)=>{const n=ga(),r=It(n.getPositionerProps(),e);return ua().unmounted?null:x.jsx(Qt.div,ie(B({},r),{ref:t}))});xh.displayName="DialogPositioner";var XL=zi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Vi=XL.build(),wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},_b=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},wh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},vb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},_h=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},vh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Sb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Sl=e=>e.getById(wh(e)),JL=e=>e.getById(wb(e)),ZL=e=>e.getById(_b(e)),eD=e=>e.getById(vb(e)),tD=e=>e.getById(_h(e)),nD=e=>e.getById(vh(e)),rD=e=>e.getById(Sb(e));function iD(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ie(B({},Vi.trigger.attrs),{dir:a("dir"),id:vb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":wh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ie(B({},Vi.backdrop.attrs),{dir:a("dir"),hidden:!d,id:_b(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ie(B({},Vi.positioner.attrs),{dir:a("dir"),id:wb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ie(B({},Vi.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:wh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:_h(u),"aria-describedby":h.description?vh(u):void 0}))},getTitleProps(){return t.element(ie(B({},Vi.title.attrs),{dir:a("dir"),id:_h(u)}))},getDescriptionProps(){return t.element(ie(B({},Vi.description.attrs),{dir:a("dir"),id:vh(u)}))},getCloseTriggerProps(){return t.button(ie(B({},Vi.closeTrigger.attrs),{dir:a("dir"),id:Sb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var oD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>rD(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,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 Qy(()=>Sl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[eD(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return tb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Zy(()=>Sl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?zy(()=>[Sl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ot(()=>{e.set("rendered",{title:!!tD(t),description:!!nD(t)})})},syncZIndex({scope:e}){Ot(()=>{const t=Sl(e);if(!t)return;const n=Do(t);[JL(e),ZL(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.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})}}}};Uo()(["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 sD=e=>{const t=Z.useId(),{getRootNode:n}=_l(),{dir:r}=ch(),o=B({id:t,getRootNode:n,dir:r},e),a=cl(oD,o);return iD(a,Vf)},Ab=e=>{const[t,c]=Ey(e),d=c,{children:n}=d,r=sn(d,["children"]),[o]=KL(t),a=sD(r),u=Wf(It({present:a.open},t));return x.jsx(QL,{value:a,children:x.jsx(WL,{value:o,children:x.jsx(py,{value:u,children:n})})})},Cb=Z.forwardRef((e,t)=>{const n=ga(),r=It(n.getTitleProps(),e);return x.jsx(Qt.h2,ie(B({},r),{ref:t}))});Cb.displayName="DialogTitle";const aD=({children:e})=>{const[t,n]=Z.useState(!1),r=Z.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=Z.useMemo(()=>({isOpen:t}),[t]);return x.jsx(Of.Provider,{value:r,children:x.jsx(zE.Provider,{value:o,children:e})})},kb=()=>Z.useContext(zE),Nb=()=>{const e=Z.useContext(Of);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},uD=`${D}-overflow-menu-button-trigger`,lD=({componentType:e,children:t})=>{const{isOpen:n}=kb(),{closeMenu:r}=Nb(),{globalClassName:o}=At(),a=Z.useRef(null);return Z.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${uD}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:j(`${D}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},cD=({componentType:e,className:t})=>{const{toggleMenu:n}=Nb(),{isOpen:r}=kb(),{globalClassName:o}=At();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:j(`${D}-overflow-menu-button-trigger`,`${D}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:x.jsx(cb,{})})},dD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{previousComponentType:r}=Ni(),o=oa(),a=()=>{ku(r||"dialog"),o()};return t?x.jsx(lr,{className:j(n,`${D}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(db,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(db,{}),"Show ",r||"dialog"]})},fD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{isModalFullscreen:r}=Ni(),o=oa(),a=()=>{Sd(!r),o()},u=r?iA:oA,c="Toggle Fullscreen";return t?x.jsx(lr,{ariaLabel:c,title:c,className:j(n,`${D}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},hD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{dialogPosition:r}=Ni(),o=oa(),a=r==="bottom-left",u=()=>{Ad(a?"bottom-right":"bottom-left"),o()},c=a?AL:SL,d=a?"Move right":"Move left";return t?x.jsx(lr,{className:j(n,`${D}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},Ob=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=At(),{mode:a}=Ni(),u=a==="standalone",c=e==="modal",d=c?dD:Rb,h=c?fD:hD,p=Z.useMemo(()=>r?XS(r):{},[r]);return x.jsx(aD,{children:x.jsxs("div",{className:j(o,`${D}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:j(o,`${D}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:j(o,`${D}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),x.jsx(Cb,{className:j(o,`${D}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),x.jsxs("div",{className:j(o,`${D}-${e}-controls`),children:[x.jsx(d,{componentType:e,isIcon:!0}),x.jsx(cD,{componentType:e}),x.jsx(YL,{className:j(o,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(lD,{componentType:e,children:[x.jsx(h,{componentType:e}),x.jsx(gD,{componentType:e}),x.jsx($E,{componentType:e,onClearChat:t})]})]})})},Ib="USD",Ea=(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}`}},pD=({retailPrice:e,discountPrice:t,currencyCode:n=Ib})=>{const r=n||Ib,o=typeof t=="number"&&typeof e=="number"&&t<e,a=o?t:e||t||null,u=o?e:null;return{price:Ea(a,r),comparePrice:Ea(u,r),hasDiscount:o}},Sh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:o,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=pD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const h=typeof r=="string"?{fontSize:r}:{};return x.jsxs("div",{className:j(o,a,`${D}-price`),style:h,children:[x.jsx("span",{className:j(o,`${D}-price__amount`),children:u}),d&&c&&x.jsx("span",{className:j(o,`${D}-price__compare`),children:c})]})},mD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return x.jsx("div",{className:j(t,`${D}-suggestion-container ${u}`,e),children:n.map(d=>o?x.jsx(Iu,{disabled:r,className:j(t,`${D}-suggestion-button standalone`),onClick:c(d),children:d},d):x.jsx("button",{disabled:r,className:j(t,`${D}-suggestion-button embedded`),onClick:c(d),children:d},d))})},gD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=At();if(!r)return null;const o=()=>{ki(!1),Cu(!0)};return t?x.jsx(lr,{className:j(n,`${D}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:x.jsx(X0,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(X0,{}),"Minimize"]})},Rb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),r=oa(),o=()=>{ku("modal"),r()};return t?x.jsx(lr,{className:j(n,`${D}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(fb,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(fb,{}),"Show modal"]})},ED=["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"],yD=3e3,bD=400,TD=({globalClassName:e,isWidgetStandalone:t,messages:n=ED})=>{const[r,o]=Z.useState(0),[a,u]=Z.useState(!0);return Z.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},bD)},yD);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),x.jsxs("div",{className:j(e,`${D}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[x.jsxs("div",{className:`${D}-connecting-pulse-wrapper`,children:[x.jsx("div",{className:`${D}-connecting-pulse`}),x.jsx("div",{className:`${D}-connecting-ring`})]}),x.jsx("span",{className:j(`${D}-connecting-text`,a&&`${D}-connecting-text--visible`),children:n[r]})]})},xD=({shouldShow:e,loadingText:t})=>e?x.jsx("span",{className:`${D}-processing-text`,children:t}):null,wD=({shouldShow:e})=>e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:`${D}-processing-shimmer-bar`}),x.jsx("div",{className:`${D}-processing-shimmer-bar`}),x.jsx("div",{className:`${D}-processing-shimmer-bar`})]}):null,Ah=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>x.jsxs("div",{className:j(e,`${D}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[x.jsx(xD,{shouldShow:!!n,loadingText:n}),x.jsx(wD,{shouldShow:!n})]});function Pb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function _D(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vD(e,t,n){const o=ju((n||{}).ignore||[]),a=SD(t);let u=-1;for(;++u<a.length;)c1(e,"text",c);function c(h,p){let g=-1,T;for(;++g<p.length;){const y=p[g],w=T?T.children:void 0;if(o(y,w?w.indexOf(y):void 0,T))return;T=y}if(T)return d(h,p)}function d(h,p){const g=p[p.length-1],T=a[u][0],y=a[u][1];let w=0;const A=g.children.indexOf(h);let C=!1,k=[];T.lastIndex=0;let R=T.exec(h.value);for(;R;){const U=R.index,Y={index:R.index,input:R.input,stack:[...p,h]};let F=y(...R,Y);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?T.lastIndex=U+1:(w!==U&&k.push({type:"text",value:h.value.slice(w,U)}),Array.isArray(F)?k.push(...F):F&&k.push(F),w=U+R[0].length,C=!0),!T.global)break;R=T.exec(h.value)}return C?(w<h.value.length&&k.push({type:"text",value:h.value.slice(w)}),g.children.splice(A,1,...k)):k=[h],A+k.length}}function SD(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 o=n[r];t.push([AD(o[0]),CD(o[1])])}return t}function AD(e){return typeof e=="string"?new RegExp(_D(e),"g"):e}function CD(e){return typeof e=="function"?e:function(){return e}}const Ch="phrasing",kh=["autolink","link","image","label"];function kD(){return{transforms:[DD],enter:{literalAutolink:OD,literalAutolinkEmail:Nh,literalAutolinkHttp:Nh,literalAutolinkWww:Nh},exit:{literalAutolink:LD,literalAutolinkEmail:PD,literalAutolinkHttp:ID,literalAutolinkWww:RD}}}function ND(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:kh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:kh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ch,notInConstruct:kh}]}}function OD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Nh(e){this.config.enter.autolinkProtocol.call(this,e)}function ID(e){this.config.exit.autolinkProtocol.call(this,e)}function RD(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 PD(e){this.config.exit.autolinkEmail.call(this,e)}function LD(e){this.exit(e)}function DD(e){vD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FD]],{ignore:["link","linkReference"]})}function MD(e,t,n,r,o){let a="";if(!Lb(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!BD(n)))return!1;const u=UD(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function FD(e,t,n,r){return!Lb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BD(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 UD(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 o=Pb(e,"(");let a=Pb(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Lb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ii(n)||Du(n))&&(!t||n!==47)}Db.peek=GD;function HD(){this.buffer()}function zD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jD(){this.buffer()}function $D(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qD(e){this.exit(e)}function YD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WD(e){this.exit(e)}function GD(){return"["}function Db(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function KD(){return{enter:{gfmFootnoteCallString:HD,gfmFootnoteCall:zD,gfmFootnoteDefinitionLabelString:jD,gfmFootnoteDefinition:$D},exit:{gfmFootnoteCallString:VD,gfmFootnoteCall:qD,gfmFootnoteDefinitionLabelString:YD,gfmFootnoteDefinition:WD}}}function QD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Db},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
38
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?Mb:XD))),h(),d}}function XD(e,t,n){return t===0?e:Mb(e,t,n)}function Mb(e,t,n){return(n?"":" ")+e}const JD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Fb.peek=r5;function ZD(){return{canContainEols:["delete"],enter:{strikethrough:t5},exit:{strikethrough:n5}}}function e5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JD}],handlers:{delete:Fb}}}function t5(e){this.enter({type:"delete",children:[]},e)}function n5(e){this.exit(e)}function Fb(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ie(B({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function r5(){return"~"}function i5(e){return e.length}function o5(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||i5,a=[],u=[],c=[],d=[];let h=0,p=-1;for(;++p<e.length;){const v=[],A=[];let C=-1;for(e[p].length>h&&(h=e[p].length);++C<e[p].length;){const k=s5(e[p][C]);if(n.alignDelimiters!==!1){const R=o(k);A[C]=R,(d[C]===void 0||R>d[C])&&(d[C]=R)}v.push(k)}u[p]=v,c[p]=A}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)a[g]=Bb(r[g]);else{const v=Bb(r);for(;++g<h;)a[g]=v}g=-1;const T=[],y=[];for(;++g<h;){const v=a[g];let A="",C="";v===99?(A=":",C=":"):v===108?A=":":v===114&&(C=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[g]-A.length-C.length);const R=A+"-".repeat(k)+C;n.alignDelimiters!==!1&&(k=A.length+k+C.length,k>d[g]&&(d[g]=k),y[g]=k),T[g]=R}u.splice(1,0,T),c.splice(1,0,y),p=-1;const w=[];for(;++p<u.length;){const v=u[p],A=c[p];g=-1;const C=[];for(;++g<h;){const k=v[g]||"";let R="",U="";if(n.alignDelimiters!==!1){const Y=d[g]-(A[g]||0),F=a[g];F===114?R=" ".repeat(Y):F===99?Y%2?(R=" ".repeat(Y/2+.5),U=" ".repeat(Y/2-.5)):(R=" ".repeat(Y/2),U=R):U=" ".repeat(Y)}n.delimiterStart!==!1&&!g&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||g)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(k),n.alignDelimiters!==!1&&C.push(U),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&C.push("|")}w.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return w.join(`
|
|
39
|
+
`)}function s5(e){return e==null?"":String(e)}function Bb(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 a5(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),u5);return o(),u}function u5(e,t,n){return">"+(n?"":" ")+e}function l5(e,t){return Ub(e,t.inConstruct,!0)&&!Ub(e,t.notInConstruct,!1)}function Ub(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 Hb(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
40
|
+
`&&l5(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
41
|
+
`}function c5(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function d5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function f5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function h5(e,t,n,r){const o=f5(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(d5(e,n)){const g=n.enter("codeIndented"),T=n.indentLines(a,p5);return g(),T}const c=n.createTracker(r),d=o.repeat(Math.max(c5(a,o)+1,3)),h=n.enter("codeFenced");let p=c.move(d);if(e.lang){const g=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,B({before:p,after:" ",encode:["`"]},c.current()))),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,B({before:p,after:`
|
|
42
42
|
`,encode:["`"]},c.current()))),g()}return p+=c.move(`
|
|
43
43
|
`),a&&(p+=c.move(a+`
|
|
44
|
-
`)),p+=c.move(d),h(),p}function
|
|
45
|
-
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),u(),h}function
|
|
44
|
+
`)),p+=c.move(d),h(),p}function p5(e,t,n){return(n?"":" ")+e}function Oh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function m5(e,t,n,r){const o=Oh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),B({before:h,after:"]"},d.current()))),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,B({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,B({before:h,after:e.title?" ":`
|
|
45
|
+
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),u(),h}function g5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ya(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Al(e,t,n){const r=xo(e),o=xo(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}zb.peek=E5;function zb(e,t,n,r){const o=g5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,B({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=Al(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=ya(h)+d.slice(1));const g=d.charCodeAt(d.length-1),T=Al(r.after.charCodeAt(0),g,o);T.inside&&(d=d.slice(0,-1)+ya(g));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function E5(e,t,n){return n.options.emphasis||"*"}function y5(e,t){let n=!1;return Vu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Jd}),!!((!e.depth||e.depth<3)&&zd(e)&&(t.options.setext||n))}function b5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(y5(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),T=n.containerPhrasing(e,ie(B({},a.current()),{before:`
|
|
46
46
|
`,after:`
|
|
47
47
|
`}));return g(),p(),T+`
|
|
48
48
|
`+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
|
|
49
49
|
`))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let h=n.containerPhrasing(e,B({before:"# ",after:`
|
|
50
|
-
`},a.current()));return/^[\t ]/.test(h)&&(h=
|
|
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:c}};function u(y,
|
|
52
|
-
`))}function d(y,x,v,S){const A=v.enter("tableCell"),O=v.enter("phrasing"),R=v.containerPhrasing(y,ae(B({},S),{before:a,after:a}));return O(),A(),R}function h(y,x){return e5(y,{align:x,alignDelimiters:r,padding:n,stringLength:o})}function p(y,x,v){const S=y.children;let A=-1;const O=[],R=x.enter("table");for(;++A<S.length;)O[A]=g(S[A],x,v);return R(),O}function g(y,x,v){const S=y.children;let A=-1;const O=[],R=x.enter("tableRow");for(;++A<S.length;)O[A]=d(S[A],y,x,v);return R(),O}function T(y,x,v){let S=Wb.inlineCode(y,x,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function z5(){return{exit:{taskListCheckValueChecked:Kb,taskListCheckValueUnchecked:Kb,paragraph:$5}}}function j5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:V5}}}function Kb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $5(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 o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;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 V5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Wb.listItem(e,t,n,B(B({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(p){return p+u}}function q5(){return[_D(),VD(),GD(),L5(),z5()]}function Y5(e){return{extensions:[vD(),qD(e),KD(),H5(e),j5()]}}const W5={tokenize:Z5,partial:!0},Qb={tokenize:e8,partial:!0},Xb={tokenize:t8,partial:!0},Jb={tokenize:n8,partial:!0},G5={tokenize:r8,partial:!0},Zb={name:"wwwAutolink",tokenize:X5,previous:tT},eT={name:"protocolAutolink",tokenize:J5,previous:nT},Rr={name:"emailAutolink",tokenize:Q5,previous:rT},br={};function K5(){return{text:br}}let Vi=48;for(;Vi<123;)br[Vi]=Rr,Vi++,Vi===58?Vi=65:Vi===91&&(Vi=97);br[43]=Rr,br[45]=Rr,br[46]=Rr,br[95]=Rr,br[72]=[Rr,eT],br[104]=[Rr,eT],br[87]=[Rr,Zb],br[119]=[Rr,Zb];function Q5(e,t,n){const r=this;let o,a;return u;function u(g){return!Ih(g)||!rT.call(r,r.previous)||Rh(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return Ih(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(G5,p,h)(g):g===45||g===95||Gt(g)?(a=!0,e.consume(g),d):p(g)}function h(g){return e.consume(g),o=!0,d}function p(g){return a&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function X5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!tT.call(r,r.previous)||Rh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(W5,e.attempt(Qb,e.attempt(Xb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function J5(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&nT.call(r,r.previous)&&!Rh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(nn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?h:(a=!0,d)):n(g)}function h(g){return g===null||Ru(g)||it(g)||Oi(g)||Pu(g)?n(g):e.attempt(Qb,e.attempt(Xb,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function Z5(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function e8(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(Jb,d,c)(h):h===null||it(h)||Oi(h)||h!==45&&Pu(h)?d(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function d(h){return o||r||!a?n(h):t(h)}}function t8(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):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(Jb,t,a)(u):u===null||it(u)||Oi(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function n8(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||it(c)||Oi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||Oi(c)?t(c):r(c)}function a(c){return nn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):nn(c)?(e.consume(c),u):n(c)}}function r8(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Gt(a)?n(a):t(a)}}function tT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function nT(e){return!nn(e)}function rT(e){return!(e===47||Ih(e))}function Ih(e){return e===43||e===45||e===46||e===95||Gt(e)}function Rh(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 i8={tokenize:f8,partial:!0};function o8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:l8,continuation:{tokenize:c8},exit:d8}},text:{91:{name:"gfmFootnoteCall",tokenize:u8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:s8,resolveTo:a8}}}}function s8(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][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 c;function c(d){if(!u||!u._balanced)return n(d);const h=Wn(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function a8(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.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)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,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,...c),e}function u8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(a>999||g===93&&!u||g===null||g===91||it(g))return n(g);if(g===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(Wn(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return it(g)||(u=!0),a++,e.consume(g),g===92?p:h}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}}function l8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!c||x===null||x===91||it(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=Wn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return it(x)||(c=!0),u++,e.consume(x),x===92?g:p}function g(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function T(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),o.includes(a)||o.push(a),Qe(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function c8(e,t,n){return e.check(Bs,t,e.attempt(i8,t,n))}function d8(e){e.exit("gfmFootnoteDefinition")}function f8(e,t,n){const r=this;return Qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(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 h8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},g={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&xn(T,T.length,0,Lu(y,u.slice(h+1,d),c)),xn(T,T.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),xn(u,h-1,d-h+3,T),d=h+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,c,d){const h=this.previous,p=this.events;let g=0;return T;function T(x){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const v=bo(h);if(x===126)return g>1?d(x):(u.consume(x),g++,y);if(g<2&&!n)return d(x);const S=u.exit("strikethroughSequenceTemporary"),A=bo(x);return S._open=!A||A===2&&!!v,S._close=!v||v===2&&!!A,c(x)}}}class p8{constructor(){this.map=[]}add(t,n,r){m8(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 o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function m8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function g8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function E8(){return{flow:{null:{name:"table",tokenize:y8,resolveAll:b8}}}}function y8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(z){let ue=r.events.length-1;for(;ue>-1;){const re=r.events[ue][1].type;if(re==="lineEnding"||re==="linePrefix")ue--;else break}const he=ue>-1?r.events[ue][1].type:null,ee=he==="tableHead"||he==="tableRow"?F:d;return ee===F&&r.parser.lazy[r.now().line]?n(z):ee(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):Le(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):Ge(z)?Qe(e,p,"whitespace")(z):(a+=1,u&&(u=!1,o+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(z)))}function g(z){return z===null||z===124||it(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?T:g)}function T(z){return z===92||z===124?(e.consume(z),g):g(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,Ge(z)?Qe(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):x(z))}function x(z){return z===45||z===58?S(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),v):W(z)}function v(z){return Ge(z)?Qe(e,S,"whitespace")(z):S(z)}function S(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),A):z===45?(a+=1,A(z)):z===null||Le(z)?H(z):W(z)}function A(z){return z===45?(e.enter("tableDelimiterFiller"),O(z)):W(z)}function O(z){return z===45?(e.consume(z),O):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(z))}function R(z){return Ge(z)?Qe(e,H,"whitespace")(z):H(z)}function H(z){return z===124?x(z):z===null||Le(z)?!u||o!==a?W(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):W(z)}function W(z){return n(z)}function F(z){return e.enter("tableRow"),K(z)}function K(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),K):z===null||Le(z)?(e.exit("tableRow"),t(z)):Ge(z)?Qe(e,K,"whitespace")(z):(e.enter("data"),de(z))}function de(z){return z===null||z===124||it(z)?(e.exit("data"),K(z)):(e.consume(z),z===92?ge:de)}function ge(z){return z===92||z===124?(e.consume(z),de):de(z)}}function b8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h,p,g;const T=new p8;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(iT(T,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",h,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,g=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),o=x.type==="tableDelimiterRow"?2:p?3:1):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],g=Sl(T,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=Sl(T,t,a,o,void 0,g)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],g=Sl(T,t,a,o,n,g)):u[1]!==0&&(g=Sl(T,t,u,o,n,g)),o=0):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&iT(T,t,d,h,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=g8(t.events,n))}return e}function Sl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Yo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Yo(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 h=Yo(t.events,n[2]),p=Yo(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,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 x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},Yo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function iT(e,t,n,r,o){const a=[],u=Yo(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Yo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const T8={name:"tasklistCheck",tokenize:w8};function x8(){return{text:{91:T8}}}function w8(e,t,n){const r=this;return o;function o(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 it(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"),c):n(d)}function c(d){return Le(d)?t(d):Ge(d)?e.check({tokenize:_8},t,n)(d):n(d)}}function _8(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function v8(e){return Cg([K5(),o8(),h8(e),E8(),x8()])}const S8={};function A8(e){const t=this,n=e||S8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(v8(n)),a.push(q5()),u.push(Y5(n))}const C8=()=>w.jsx("span",{className:`${D}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Ph=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(E1,{remarkPlugins:[A8],rehypePlugins:[NE],components:{h1:({children:o})=>w.jsx("h1",{className:$(e,`${D}-header h1`),children:o}),h2:({children:o})=>w.jsx("h2",{className:$(e,`${D}-header h2`),children:o}),h3:({children:o})=>w.jsx("h3",{className:$(e,`${D}-header h3`),children:o}),ul:({children:o})=>w.jsx("ul",{className:$(e,`${D}-ul`),children:o}),ol:({children:o})=>w.jsx("ol",{className:$(e,`${D}-ol`),children:o}),li:({children:o})=>w.jsx("li",{className:$(e,`${D}-li`),children:o}),a:({href:o,children:a})=>w.jsx(ME,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>w.jsx("div",{className:$(e,`${D}-table-container`),children:w.jsx("table",{className:$(e,`${D}-table`),children:o})}),thead:({children:o})=>w.jsx("thead",{className:$(e,`${D}-thead`),children:o}),tbody:({children:o})=>w.jsx("tbody",{className:$(e,`${D}-tbody`),children:o}),tr:({children:o})=>w.jsx("tr",{className:$(e,`${D}-tr`),children:o}),th:({children:o})=>w.jsx("th",{className:$(e,`${D}-th`),children:o}),td:({children:o})=>w.jsx("td",{className:$(e,`${D}-td`),children:o}),span:({className:o,children:a})=>o===`${D}-blinking-cursor`?w.jsx(C8,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${D}-blinking-cursor'></span>`:"")}),oT=({product:e,globalClassName:t,isFullWidth:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{sendMessage:a,loading:u}=Yn(),{id:c,name:d,imageUrl:h,productPageUrl:p,price:g,discountPrice:T,compareAtPrice:y,currencyCode:x}=e,v=typeof T=="number"&&typeof g=="number"&&T<g,S=v?g:y!=null?y:g,A=v?T:g,O=()=>{if(u)return;const H=d||"this product",W=c?` [SKU: ${c}]`:"";a(`Show me details for ${H}${W}`)},R=o?`View details for ${d}`:`Go to product page for ${d}`;return w.jsxs("div",{className:$(t,`${D}-msg-product-card`,{"card-full-width":n}),children:[w.jsx("div",{className:$(t,`${D}-msg-product-card__image-wrapper`),children:h&&(o?w.jsx("button",{type:"button",className:$(t,`${D}-msg-product-card__image-button`),onClick:O,disabled:u,"aria-label":R,children:w.jsx("img",{className:$(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):p?w.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener","aria-label":R,children:w.jsx("img",{className:$(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):w.jsx("img",{className:$(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"}))}),w.jsxs("div",{className:$(t,`${D}-msg-product-card__content`),children:[o?w.jsx("button",{type:"button",disabled:u,onClick:O,className:$(t,`${D}-msg-product-card__title-link`),"aria-label":R,children:d}):p?w.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener",className:$(t,`${D}-msg-product-card__title-link`),"aria-label":R,children:d}):w.jsx("p",{className:$(t,`${D}-msg-product-card__title`),children:d}),w.jsx("div",{className:$(t,`${D}-msg-product-card__price-row`),children:w.jsx(_h,{globalClassName:t,retailPrice:S,discountPrice:A,currencyCode:x})})]})]})},sT=e=>({id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,currencyCode:e.data.currencyCode}),k8=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a=!1})=>{if(t.length===1){const u=t[0];return w.jsxs("div",{children:[e&&w.jsx("p",{className:$(n,`${D}-product-carousel-title`),children:e}),w.jsx(oT,{product:sT(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a,isFullWidth:!o})]})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:$(n,`${D}-product-carousel-title`),children:e}),w.jsx(HL,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(u=>w.jsx(oT,{product:sT(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a},u.id))})]})},aT=({code:e,globalClassName:t})=>w.jsxs("span",{className:$(t,`${D}-cart-chip`),children:[w.jsx(K0,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),qi=({label:e,badge:t,value:n,currencyCode:r,globalClassName:o,emphasized:a,isDiscount:u,fallback:c})=>{let d;if(typeof n=="number")n===0&&!u?d="Free":d=ma(u?-n:n,r);else if(c)d=c;else return null;return w.jsxs("div",{className:$(o,`${D}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:$(o,`${D}-cart-total-label`),children:[e,t&&w.jsx("span",{className:$(o,`${D}-cart-total-badge`),children:t})]}),w.jsx("span",{className:$(o,`${D}-cart-total-value`),children:d})]})},N8=({item:e,currencyCode:t,loading:n,globalClassName:r,onRemove:o})=>{var u,c,d;const a=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return w.jsxs("li",{className:$(r,`${D}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:$(r,`${D}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:$(r,`${D}-cart-item-details`),children:[w.jsx("p",{className:$(r,`${D}-cart-item-name`),children:e.name}),w.jsxs("div",{className:$(r,`${D}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(h=>w.jsxs("p",{className:$(r,`${D}-cart-item-attr`),children:[h.lbl,": ",h.value]},`${h.type}-${h.value}`)),((c=e.promotions)!=null?c:[]).map(h=>w.jsxs("p",{className:$(r,`${D}-cart-item-attr`),children:["Promotion: ",h]},h))]}),((d=e.coupons)!=null?d:[]).length>0&&w.jsx("div",{className:$(r,`${D}-cart-chips`),children:e.coupons.map(h=>w.jsx(aT,{code:h,globalClassName:r},h))}),w.jsxs("span",{className:$(r,`${D}-cart-item-price`),children:[a&&w.jsx("span",{className:$(r,`${D}-cart-item-original-price`),children:ma(e.originalSubtotal,t)}),w.jsx("span",{className:$(r,`${D}-cart-item-final-price`),children:ma(e.itemSubtotal,t)})]}),w.jsxs("div",{className:$(r,`${D}-cart-item-footer`),children:[w.jsxs("span",{className:$(r,`${D}-cart-item-qty`),children:["Qty: ",e.quantity]}),w.jsx("button",{type:"button",className:$(r,`${D}-cart-item-remove`),disabled:n,onClick:()=>o(e),children:"Remove"})]})]})]})},O8=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Yn(),[a,u]=J.useState(!0),[c,d]=J.useState(""),{items:h=[],currencyCode:p="USD",subtotal:g,total:T,taxes:y,shippingCost:x,shippingDiscount:v,shippingPromotions:S=[],promotionsDiscount:A,promotions:O=[],couponsDiscount:R,couponsApplied:H=[],bodyMessage:W,footerMessage:F,checkoutButtonUrl:K}=e,de=z=>{o||r(`Remove ${z.name} from my cart`)},ge=()=>{const z=c.trim();!z||o||(r(`Apply coupon code ${z}`),d(""))};return w.jsxs("div",{className:$(t,`${D}-cart`),children:[w.jsxs("div",{className:$(t,`${D}-cart-box`),children:[W&&w.jsxs("button",{type:"button",className:$(t,`${D}-cart-summary`),"aria-expanded":a,onClick:()=>u(z=>!z),children:[w.jsx("span",{className:$(t,`${D}-cart-summary-text`),children:w.jsx(Ph,{text:W,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),w.jsx("span",{className:$(t,`${D}-cart-summary-toggle`),"aria-hidden":"true",children:a?w.jsx(JS,{}):w.jsx(ZS,{})})]}),a&&w.jsxs("div",{className:$(t,`${D}-cart-expanded`),children:[w.jsx("ul",{className:$(t,`${D}-cart-items`),children:h.map(z=>w.jsx(N8,{item:z,currencyCode:p,loading:o,globalClassName:t,onRemove:de},z.itemId))}),H.length>0&&w.jsx("div",{className:$(t,`${D}-cart-chips`,`${D}-cart-applied-coupons`),children:H.map(z=>w.jsx(aT,{code:z,globalClassName:t},z))}),w.jsxs("div",{className:$(t,`${D}-cart-totals`),children:[w.jsx(qi,{label:"Subtotal",value:g,currencyCode:p,globalClassName:t}),w.jsx(qi,{label:"Coupon",value:R,currencyCode:p,globalClassName:t,isDiscount:!0}),w.jsx(qi,{label:"Promotions",badge:O[0],value:A,currencyCode:p,globalClassName:t,isDiscount:!0}),w.jsx(qi,{label:"Shipping",value:x,currencyCode:p,globalClassName:t,fallback:"TBD"}),w.jsx(qi,{label:"Shipping Discount",badge:S[0],value:v,currencyCode:p,globalClassName:t,isDiscount:!0}),w.jsx(qi,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),w.jsx(qi,{label:"Total",value:T,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),w.jsxs("div",{className:$(t,`${D}-cart-coupon`),children:[w.jsxs("div",{className:$(t,`${D}-cart-coupon-field`),children:[w.jsx("span",{className:$(t,`${D}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(K0,{})}),w.jsx("input",{type:"text",className:$(t,`${D}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:o,onChange:z=>d(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),ge())}})]}),w.jsx("button",{type:"button",className:$(t,`${D}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:o||!c.trim(),onClick:ge,children:w.jsx(XS,{"aria-hidden":"true"})})]}),K&&w.jsxs("a",{className:$(t,`${D}-cart-checkout-button`),href:K,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(KS,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]}),w.jsx("p",{className:$(t,`${D}-cart-footer`),children:F||"Shipping and taxes calculated at checkout."})]})},I8=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(gh,{className:$(n,`${D}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(hh,{className:$(n,`${D}-pdp-gallery__item-group`),children:e.map((o,a)=>w.jsx(fh,{index:a,className:$(n,`${D}-pdp-gallery__item`),children:w.jsx("img",{className:$(n,`${D}-pdp-gallery__image`),src:o,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,loading:"lazy"})},o))}),r&&w.jsxs(lh,{className:$(n,`${D}-pdp-gallery__control`),children:[w.jsx(mh,{className:$(n,`${D}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(ib,{size:"16px"})}),w.jsx(ph,{className:$(n,`${D}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(ob,{size:"16px"})})]}),r&&w.jsx(dh,{className:$(n,`${D}-pdp-gallery__indicator-group`),children:e.map((o,a)=>w.jsx(ch,{index:a,className:$(n,`${D}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ea="color",Lh=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,uT=e=>e.replace(/(^|\/)large\//,"$1medium/"),lT=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ea&&n.vals.includes(t)),R8=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>lT(h,t)),o=n.find(h=>h.vattr===null),a=r||o||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(h=>Lh(e.baseUrl,uT(h.url)));return u.length>0?u:e.imageUrl?[Lh(e.baseUrl,uT(e.imageUrl))]:[]},P8=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&lT(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Lh(e.baseUrl,r):""},Al=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(o=>{var a;return((a=o.vars)==null?void 0:a[t])!==n||o.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=o.vars)==null?void 0:d[u])===c})}),L8=(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(o=>{var a;return((a=r.vars)==null?void 0:a[o])===t[o]}))},D8=(e,t,n,r,o)=>{if(!e||e.length===0)return ae(B({},o),{[n]:r});const a=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(o).every(([h,p])=>{var g;return h===n||((g=c.vars)==null?void 0:g[h])===p})});if(a)return B({},a.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?B({},u.vars):ae(B({},o),{[n]:r})},M8=(e,t)=>{var o,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(o=e.id)!=null?o: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(([h,p])=>{var g;return((g=d.vars)==null?void 0:g[h])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},F8=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([o,a])=>{var u;return((u=r.vars)==null?void 0:u[o])===a}));return n!=null&&n.pr?n.pr:e.pr},B8=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const o=r.opts.find(u=>Al(e.vmat,r.id,u.val)),a=o!=null?o:r.opts[0];a&&(t[r.id]=a.val)}return t},U8=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var re,te,Te,oe,X,se,C;const{addToCart:o,loading:a}=Yn(),u=e.data,c=(re=u.vattr)!=null?re:[],[d,h]=J.useState(()=>B8(u)),p=L8(u.vmat,d),g=(Te=(te=u.quantity)==null?void 0:te.minQuantity)!=null?Te:1,T=(X=(oe=u.quantity)==null?void 0:oe.maxQuantity)!=null?X:Number.POSITIVE_INFINITY,y=(C=(se=u.quantity)==null?void 0:se.increment)!=null?C:1,[x,v]=J.useState(g),S=d[Ea],A=J.useMemo(()=>R8(u,S),[u,S]),O=J.useMemo(()=>F8(u,d),[u,d]),R=c.find(I=>I.id===Ea),H=c.filter(I=>I.id!==Ea),W=(I,G)=>()=>{h(N=>{const xe=!Al(u.vmat,I,G,N);return I===Ea||xe?D8(u.vmat,c,I,G,N):ae(B({},N),{[I]:G})})},F=()=>{if(a)return;const I=M8(u,d);if(!I)return;const G=c.map(N=>{const xe=N.opts.find(Oe=>Oe.val===d[N.id]);return xe?{label:N.lbl||N.id,value:xe.name||xe.val}:null}).filter(N=>N!==null);o({productName:u.name,sku:I,quantity:x,variants:G})},K=!p||x-y<g,de=!p||x+y>T,ge=I=>{var N;const G=d[I.id];return(N=I.opts.find(xe=>xe.val===G))==null?void 0:N.name},z=()=>v(I=>Math.max(g,I-y)),ue=()=>v(I=>Math.min(T,I+y)),he=I=>w.jsxs("div",{className:$(t,`${D}-msg-pdp__variant`),children:[w.jsxs("div",{className:$(t,`${D}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${I.id}`,className:$(t,`${D}-msg-pdp__variant-name`),children:I.lbl||I.id}),ge(I)&&w.jsx("span",{className:$(t,`${D}-msg-pdp__variant-value`),children:ge(I)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${I.id}`,className:$(t,`${D}-msg-pdp__chips`),children:I.opts.map(G=>{const N=Al(u.vmat,I.id,G.val,d),xe=d[I.id]===G.val;return w.jsxs("label",{className:$(`${D}-msg-pdp__chip`,{selected:xe,unavailable:!N}),children:[w.jsx("input",{type:"radio",name:`variant-${I.id}`,value:G.val,checked:xe,"aria-description":N?void 0:"unavailable",onChange:W(I.id,G.val),className:`${D}-msg-pdp__radio-input`}),w.jsx("span",{children:G.name||G.val})]},G.val)})})]},I.id),ee=I=>w.jsxs("div",{className:$(t,`${D}-msg-pdp__variant`),children:[w.jsxs("div",{className:$(t,`${D}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${I.id}`,className:$(t,`${D}-msg-pdp__variant-name`),children:I.lbl||"Color"}),ge(I)&&w.jsx("span",{className:$(t,`${D}-msg-pdp__variant-value`),children:ge(I)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${I.id}`,className:$(t,`${D}-msg-pdp__swatches`),children:I.opts.map(G=>{const N=Al(u.vmat,I.id,G.val,d),xe=d[I.id]===G.val,Oe=P8(u,G.val);return Oe?w.jsxs("label",{className:$(`${D}-msg-pdp__swatch`,{selected:xe,unavailable:!N}),children:[w.jsx("input",{type:"radio",name:`variant-${I.id}`,value:G.val,checked:xe,"aria-label":G.name||G.val,"aria-description":N?void 0:"unavailable",onChange:W(I.id,G.val),className:`${D}-msg-pdp__radio-input`}),w.jsx("img",{className:$(t,`${D}-msg-pdp__swatch-image`),src:Oe,alt:G.name||G.val,loading:"lazy"})]},G.val):w.jsxs("label",{className:$(`${D}-msg-pdp__chip`,{selected:xe,unavailable:!N}),children:[w.jsx("input",{type:"radio",name:`variant-${I.id}`,value:G.val,checked:xe,"aria-description":N?void 0:"unavailable",onChange:W(I.id,G.val),className:`${D}-msg-pdp__radio-input`}),w.jsx("span",{children:G.name||G.val})]},G.val)})})]});return w.jsx("div",{className:$(t,`${D}-msg-pdp`),children:w.jsxs("div",{className:$(t,`${D}-msg-pdp__card`),children:[w.jsx("div",{className:$(t,`${D}-msg-pdp__gallery`),children:w.jsx(I8,{images:A,altText:u.name,globalClassName:t})}),w.jsxs("div",{className:$(t,`${D}-msg-pdp__content`),children:[u.slugUrl?w.jsx("a",{href:u.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:$(t,`${D}-msg-pdp__title-link`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):w.jsx("p",{className:$(t,`${D}-msg-pdp__title`),children:u.name}),w.jsx(_h,{globalClassName:t,className:`${D}-msg-pdp__price`,retailPrice:O==null?void 0:O.orig,discountPrice:(O==null?void 0:O.cur)||(O==null?void 0:O.prom),currencyCode:u.ccy,fontSize:"14px"}),u.dscr&&w.jsx("p",{className:$(t,`${D}-msg-pdp__description`),children:u.dscr}),R&&ee(R),H.map(he),w.jsxs("div",{className:$(t,`${D}-msg-pdp__variant`),children:[w.jsxs("div",{className:$(t,`${D}-msg-pdp__variant-label`),children:[w.jsx("span",{className:$(t,`${D}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:$(t,`${D}-msg-pdp__variant-value`),children:x})]}),w.jsxs("div",{className:$(t,`${D}-msg-pdp__stepper`),children:[w.jsx(ur,{className:`${D}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(HS,{}),disabled:K,onClick:z}),w.jsx("span",{className:$(t,`${D}-msg-pdp__quantity`),children:x}),w.jsx(ur,{className:`${D}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(zS,{}),disabled:de,onClick:ue})]})]}),r&&w.jsx("div",{className:$(t,`${D}-msg-pdp__actions`),children:w.jsx(Nu,{className:`${D}-msg-pdp__add-to-cart`,disabled:!p||a,onClick:F,children:a?"Adding...":"Add to cart"})})]})]})})},H8=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},z8=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{addToCart:a,loading:u}=Yn();if(!e.length)return null;const c=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,h=p=>()=>{u||a({productName:p.name,sku:p.id})};return w.jsx("div",{className:$(n,`${D}-product-comparison`),children:w.jsxs("div",{className:`${D}-product-comparison__grid`,style:{gridTemplateColumns:c,minWidth:d},children:[w.jsxs("div",{className:`${D}-product-comparison__header`,children:[w.jsx("div",{className:`${D}-product-comparison__header-spacer`}),e.map(p=>{var T,y,x,v;const g=H8(p);return w.jsxs("div",{className:$(n,`${D}-product-comparison__product-col`),children:[g&&w.jsx("img",{className:$(n,`${D}-product-comparison__image`),src:g,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?w.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:$(n,`${D}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):w.jsx("span",{className:$(n,`${D}-product-comparison__name`),children:p.name}),w.jsx(_h,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),w.jsx("div",{className:`${D}-product-comparison__table`,children:t.map(p=>w.jsxs("div",{className:`${D}-product-comparison__row`,children:[w.jsx("div",{className:$(n,`${D}-product-comparison__row-label`),children:p.row_name}),p.values.map((g,T)=>w.jsx("div",{className:$(n,`${D}-product-comparison__row-value`),children:g},`${p.row_name}-${T}`))]},p.row_name))}),o&&w.jsxs("div",{className:`${D}-product-comparison__footer`,children:[w.jsx("div",{className:`${D}-product-comparison__footer-spacer`}),e.map(p=>w.jsx("div",{className:$(n,`${D}-product-comparison__footer-cell`),children:w.jsxs(Nu,{className:`${D}-product-comparison__add-to-cart`,disabled:u,onClick:h(p),children:[w.jsx(GS,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},cT=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Yn(),{isCartMgmtSupported:u}=At();return w.jsx(w.Fragment,{children:e.response.map((c,d)=>{var h,p,g,T,y,x,v,S,A,O,R,H,W,F,K,de,ge,z,ue,he,ee;switch(c.type){case"markdown":return w.jsx(Ph,{text:(p=(h=c.data)==null?void 0:h.content)!=null?p:"",globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${c.type}-${(g=c.index)!=null?g:d}`);case"product_carousel":return w.jsx(k8,{title:(y=(T=c.data)==null?void 0:T.title)!=null?y:"",products:(v=(x=c.data)==null?void 0:x.products)!=null?v:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(S=c.index)!=null?S:d}`);case"product_tile":return w.jsx(U8,{product:c.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(A=c.index)!=null?A:d}`);case"product_comparison":return w.jsx(z8,{products:(R=(O=c.data)==null?void 0:O.products)!=null?R:[],table:(W=(H=c.data)==null?void 0:H.table)!=null?W:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(F=c.index)!=null?F:d}`);case"cart":{const re=(ge=(de=(K=c.data)==null?void 0:K.cart)==null?void 0:de.cartSummary)==null?void 0:ge.cartDetails;return re?w.jsx(O8,{cart:re,productsToHighlight:c.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${c.type}-${(z=c.index)!=null?z:d}`):null}case"suggestions":return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(cD,{disabled:a,suggestions:(he=(ue=c.data)==null?void 0:ue.display_text)!=null?he:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${c.type}-${(ee=c.index)!=null?ee:d}`);default:return null}})})},j8=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=At(),a=J.useMemo(()=>{try{const c=JSON.parse(e.content);return Array.isArray(c==null?void 0:c.response)?c:null}catch(c){return null}},[e.content]),u=J.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return o==null||o.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const h=JSON.parse(d);if(typeof h=="object"&&h!==null)return o==null||o.debug("Detected JSON object instead of array of responses in message content",e.content),h.text||h.message||c}catch(h){if(d.startsWith("{")||d.startsWith("["))return o==null||o.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[o,e.content]);switch(e.role){case"user":return w.jsx("div",{className:$(t,`${D}-message`,r?"standalone":"embedded"),children:w.jsx("div",{className:$(t,`${D}-user-message`,r?"standalone":"embedded"),children:w.jsxs("div",{className:$(t,`${D}-user-message-row`,r?"standalone":"embedded"),children:[w.jsx("span",{className:$(t,`${D}-message-icon user-message-icon`,r?"standalone":"embedded"),children:w.jsx(QS,{})}),w.jsx("p",{className:$(t,`${D}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return w.jsx("div",{className:$(t,`${D}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${D}-message-group-child`,children:a?w.jsx(cT,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):w.jsx(Ph,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:$(t,`${D}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:$(t,`${D}-reset-message`),children:e.content})})}},Dh=({isWidgetStandalone:e})=>{const{globalClassName:t,openLinksInNewTab:n}=At(),{messages:r,streamingBlocks:o,isAgentTyping:a,loading:u,progressMessage:c,connectionStatus:d}=Yn(),h=J.useRef(null),p=r.length>0,g=o.length>0,T=p&&(u||a)&&!g,y=d==="reconnecting"&&!T;return J.useEffect(()=>{var x;(x=h.current)==null||x.scrollIntoView({behavior:"smooth"})},[r,o]),w.jsxs(w.Fragment,{children:[u&&!p&&w.jsx(mD,{globalClassName:t,isWidgetStandalone:e}),r.map(x=>w.jsx(j8,{message:x,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},x.id)),g&&w.jsxs("div",{className:$(t,`${D}-message-group`,e?"standalone":"embedded"),children:[w.jsx(cT,{content:{response:o},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(u||a)&&w.jsx(vh,{globalClassName:t,isWidgetStandalone:e})]}),T&&w.jsx(vh,{globalClassName:t,isWidgetStandalone:e,loadingText:c}),y&&w.jsx(vh,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),w.jsx("div",{ref:h})]})},$8=()=>w.jsxs("svg",{className:`${D}-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"})]}),V8=()=>w.jsx("svg",{className:`${D}-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"})}),Mh=({steps:e,globalClassName:t})=>e.length===0?null:w.jsx("div",{className:$(t,`${D}-progress-steps-panel`),children:w.jsxs("div",{className:`${D}-progress-steps`,children:[w.jsxs("span",{className:`${D}-progress-steps-header`,children:["Loading Step ",e.length]}),w.jsx("ul",{className:`${D}-progress-steps-list`,children:e.map((n,r)=>{const o=r<e.length-1,a=r===e.length-1;return w.jsxs("li",{className:$(`${D}-progress-step`,a&&"active"),children:[a&&w.jsx("span",{className:`${D}-progress-step-arc`}),w.jsx("span",{className:`${D}-progress-step-text`,children:n}),w.jsx("span",{className:$(`${D}-progress-step-icon`,o?"done":"active"),children:o?w.jsx($8,{}):w.jsx(V8,{})})]},`${r}-${n}`)})})]})}),dT=()=>{const{globalClassName:e,themeVariables:t}=At(),{isAgentTyping:n,sendMessage:r,resetConversation:o,progressSteps:a}=Yn(),u=n;return w.jsxs("div",{className:$(e,`${D}-container`,`${D}-embedded-chat`),style:t,children:[w.jsx("div",{className:$(e,`${D}-message-container`,"embedded"),children:w.jsx(Dh,{isWidgetStandalone:!1})}),w.jsx(Mh,{steps:a,globalClassName:e}),w.jsx(Cf,{componentType:"chat",className:"embedded-chat",isLoading:u,onSubmit:c=>r(c)}),w.jsx("div",{className:$(`${D}-embedded-chat-menu`),children:w.jsxs(wL,{componentType:"chat",children:[w.jsx(kb,{componentType:"chat"}),w.jsx(UE,{componentType:"chat",onClearChat:o})]})})]})},fT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=J.useState((d=e.container)==null?void 0:d.current),a=J.useSyncExternalStore(Y8,()=>!1,()=>!0),{getRootNode:u}=xl();if(J.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const c=r!=null?r:q8(u);return w.jsx(w.Fragment,{children:J.Children.map(t,h=>Is.createPortal(h,c))})},q8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Fi(n)?n:fr(t).body},Y8=()=>()=>{},hT=()=>{const{globalClassName:e,themeVariables:t}=At(),{mode:n,status:r,dialogPosition:o,isDialogFullHeight:a,dialogWidth:u}=ki(),{loading:c,isAgentTyping:d,sendMessage:h,resetConversation:p,progressSteps:g}=Yn(),{isOpen:T}=r||{},y=!!r.isOpen,x=n==="standalone",v=d||c,S=()=>{Ci(!1)};return w.jsx(wb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:w.jsx(fT,{children:w.jsx(bh,{className:$(e,`${D}-container`,`${D}-dialog`,o,a&&"full-height"),style:B(B({},t),u&&{width:u}),children:w.jsxs(Eh,{className:$(e,`${D}-dialog-content`,{standalone:x,embedded:!x}),children:[w.jsx(Ab,{componentType:"dialog",onClearChat:p,onClose:S}),w.jsx(yh,{className:$(e,`${D}-message-container`,{standalone:x,embedded:!x}),children:w.jsx(Dh,{isWidgetStandalone:x,isOpen:T})}),w.jsx(Mh,{steps:g,globalClassName:e}),w.jsx(Cf,{componentType:"dialog",isLoading:v,onSubmit:A=>h(A)})]})})})})},pT=()=>{const{globalClassName:e,themeVariables:t}=At(),{mode:n,status:r,isModalFullscreen:o}=ki(),{isAgentTyping:a,sendMessage:u,resetConversation:c,progressSteps:d}=Yn(),{isOpen:h}=r||{},p=!!r.isOpen,g=n==="standalone",T=a,y=({open:v})=>{Ci(v)},x=()=>{Ci(!1)};return p?w.jsx(wb,{lazyMount:!0,unmountOnExit:!0,open:p,onOpenChange:y,children:w.jsx(fT,{children:w.jsxs("div",{className:$(e,`${D}-modal-container`),style:t,children:[w.jsx(Eb,{className:$(e,`${D}-modal-backdrop`)}),w.jsx(bh,{className:$(e,`${D}-container`,`${D}-modal`,{fullscreen:o,standalone:g,embedded:!g}),children:w.jsxs(Eh,{className:$(e,`${D}-modal-content`,{standalone:g,embedded:!g}),children:[w.jsx(Ab,{componentType:"modal",onClearChat:c,onClose:x}),w.jsx(yh,{className:$(e,`${D}-message-container`,{standalone:g,embedded:!g}),children:w.jsx(Dh,{isWidgetStandalone:g,isOpen:h})}),w.jsx(Mh,{steps:d,globalClassName:e}),w.jsx(Cf,{componentType:"modal",isLoading:T,onSubmit:v=>u(v)})]})})]})})}):null},W8=()=>{const e=ki(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(qS,{}):t==="dialog"?w.jsx(hT,{}):t==="modal"?w.jsx(pT,{}):w.jsx(dT,{})},Fh=e=>w.jsx(M0,ae(B({},e),{children:w.jsx(W8,{})}));var Cl={},mT;function G8(){if(mT)return Cl;mT=1;var e=z0();return Cl.createRoot=e.createRoot,Cl.hydrateRoot=e.hydrateRoot,Cl}var gT=G8();const K8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=sn(o,["elementId","timeout"]);let a;const u=(d,h)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const T of g.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ai(!0,"log","Target element found, rendering Messaging Widget"),h.disconnect(),clearTimeout(a),(p=gT.createRoot(T))==null||p.render(w.jsx(Fh,ae(B({},n),{mode:"messaging"}))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ai(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},Q8=r=>{var o=r,{timeout:e,elementId:t}=o,n=sn(o,["timeout","elementId"]);if(!n.messagingConfig){Ai(!0,"error","Messaging Widget requires messagingConfig");return}if(!n.messagingConfig.scrt2Url||!n.messagingConfig.orgId||!n.messagingConfig.esDeveloperName){Ai(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const a=document.getElementById(t);if(!a){Ai(!0,"warn","Container element not found for id:",t),Ai(!0,"warn","Beginning observation for element"),K8(B({elementId:t,timeout:e},n));return}gT.createRoot(a).render(w.jsx(Fh,ae(B({},n),{mode:"messaging"})))},X8={components:{setEntryType:L0,toggleWidgetOpen:Ci,toggleWidgetMinimized:Su,toggleModalFullscreen:_d,setWidgetType:Au,setWidgetDialogPosition:vd}};Ie.AgentForceWidget=Fh,Ie.AgentforceWidgetProvider=M0,Ie.CIMULATE_WIDGET_READY_EVENT=R0,Ie.MessagingDialog=hT,Ie.MessagingEmbed=dT,Ie.MessagingModal=pT,Ie.MessagingProvider=P0,Ie.eventHandlers=X8,Ie.injectMessagingWidget=Q8,Ie.useMessaging=Yn,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));
|
|
50
|
+
`},a.current()));return/^[\t ]/.test(h)&&(h=ya(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),d(),c(),h}jb.peek=T5;function jb(e){return e.value||""}function T5(){return"<"}$b.peek=x5;function $b(e,t,n,r){const o=Oh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,B({before:h,after:"]"},d.current()))),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,B({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,B({before:h,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),h+=d.move(")"),u(),h}function x5(){return"!"}Vb.peek=w5;function Vb(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,B({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function w5(){return"!"}qb.peek=_5;function qb(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";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],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return o+r+o}function _5(){return"`"}function Yb(e,t){const n=zd(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))}Wb.peek=v5;function Wb(e,t,n,r){const o=Oh(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(Yb(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let g=u.move("<");return g+=u.move(n.containerPhrasing(e,B({before:g,after:">"},u.current()))),g+=u.move(">"),c(),n.stack=p,g}c=n.enter("link"),d=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,B({before:h,after:"]("},u.current()))),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,B({before:h,after:">"},u.current()))),h+=u.move(">")):(d=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,B({before:h,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),h+=u.move(" "+o),h+=u.move(n.safe(e.title,B({before:h,after:o},u.current()))),h+=u.move(o),d()),h+=u.move(")"),c(),h}function v5(e,t,n){return Yb(e,n)?"<":"["}Gb.peek=S5;function Gb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,B({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function S5(){return"["}function Ih(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 A5(e){const t=Ih(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 C5(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 Kb(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 k5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?C5(n):Ih(n);const c=e.ordered?u==="."?")":".":A5(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),Kb(n)===u&&p){let g=-1;for(;++g<e.children.length;){const T=e.children[g];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const h=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),h}function N5(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 O5(e,t,n,r){const o=N5(n);let a=n.bulletCurrent||Ih(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;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return d(),h;function p(g,T,y){return T?(y?"":" ".repeat(u))+g:(y?a:a+" ".repeat(u-a.length))+g}}function I5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const R5=ju(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function P5(e,t,n,r){return(e.children.some(function(u){return R5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function L5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qb.peek=D5;function Qb(e,t,n,r){const o=L5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,B({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=Al(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=ya(h)+d.slice(1));const g=d.charCodeAt(d.length-1),T=Al(r.after.charCodeAt(0),g,o);T.inside&&(d=d.slice(0,-1)+ya(g));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function D5(e,t,n){return n.options.strong||"*"}function M5(e,t,n,r){return n.safe(e.value,r)}function F5(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 B5(e,t,n){const r=(Kb(n)+(n.options.ruleSpaces?" ":"")).repeat(F5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Xb={blockquote:a5,break:Hb,code:h5,definition:m5,emphasis:zb,hardBreak:Hb,heading:b5,html:jb,image:$b,imageReference:Vb,inlineCode:qb,link:Wb,linkReference:Gb,list:k5,listItem:O5,paragraph:I5,root:P5,strong:Qb,text:M5,thematicBreak:B5};function U5(){return{enter:{table:H5,tableData:Jb,tableHeader:Jb,tableRow:j5},exit:{codeText:$5,table:z5,tableData:Rh,tableHeader:Rh,tableRow:Rh}}}function H5(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 z5(e){this.exit(e),this.data.inTable=void 0}function j5(e){this.enter({type:"tableRow",children:[]},e)}function Rh(e){this.exit(e)}function Jb(e){this.enter({type:"tableCell",children:[]},e)}function $5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,V5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function V5(e,t){return t==="|"?t:e}function q5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
51
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(y,w,v,A){return h(p(y,v,A),y.align)}function c(y,w,v,A){const C=g(y,v,A),k=h([C]);return k.slice(0,k.indexOf(`
|
|
52
|
+
`))}function d(y,w,v,A){const C=v.enter("tableCell"),k=v.enter("phrasing"),R=v.containerPhrasing(y,ie(B({},A),{before:a,after:a}));return k(),C(),R}function h(y,w){return o5(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const A=y.children;let C=-1;const k=[],R=w.enter("table");for(;++C<A.length;)k[C]=g(A[C],w,v);return R(),k}function g(y,w,v){const A=y.children;let C=-1;const k=[],R=w.enter("tableRow");for(;++C<A.length;)k[C]=d(A[C],y,w,v);return R(),k}function T(y,w,v){let A=Xb.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function Y5(){return{exit:{taskListCheckValueChecked:Zb,taskListCheckValueUnchecked:Zb,paragraph:G5}}}function W5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K5}}}function Zb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function G5(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 o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;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 K5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Xb.listItem(e,t,n,B(B({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(p){return p+u}}function Q5(){return[kD(),KD(),ZD(),U5(),Y5()]}function X5(e){return{extensions:[ND(),QD(e),e5(),q5(e),W5()]}}const J5={tokenize:i8,partial:!0},eT={tokenize:o8,partial:!0},tT={tokenize:s8,partial:!0},nT={tokenize:a8,partial:!0},Z5={tokenize:u8,partial:!0},rT={name:"wwwAutolink",tokenize:n8,previous:oT},iT={name:"protocolAutolink",tokenize:r8,previous:sT},Pr={name:"emailAutolink",tokenize:t8,previous:aT},Tr={};function e8(){return{text:Tr}}let qi=48;for(;qi<123;)Tr[qi]=Pr,qi++,qi===58?qi=65:qi===91&&(qi=97);Tr[43]=Pr,Tr[45]=Pr,Tr[46]=Pr,Tr[95]=Pr,Tr[72]=[Pr,iT],Tr[104]=[Pr,iT],Tr[87]=[Pr,rT],Tr[119]=[Pr,rT];function t8(e,t,n){const r=this;let o,a;return u;function u(g){return!Ph(g)||!aT.call(r,r.previous)||Lh(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return Ph(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(Z5,p,h)(g):g===45||g===95||Gt(g)?(a=!0,e.consume(g),d):p(g)}function h(g){return e.consume(g),o=!0,d}function p(g){return a&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function n8(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!oT.call(r,r.previous)||Lh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(J5,e.attempt(eT,e.attempt(tT,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function r8(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&sT.call(r,r.previous)&&!Lh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(nn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?h:(a=!0,d)):n(g)}function h(g){return g===null||Lu(g)||it(g)||Ii(g)||Du(g)?n(g):e.attempt(eT,e.attempt(tT,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function i8(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function o8(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(nT,d,c)(h):h===null||it(h)||Ii(h)||h!==45&&Du(h)?d(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function d(h){return o||r||!a?n(h):t(h)}}function s8(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):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(nT,t,a)(u):u===null||it(u)||Ii(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function a8(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||it(c)||Ii(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||Ii(c)?t(c):r(c)}function a(c){return nn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):nn(c)?(e.consume(c),u):n(c)}}function u8(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Gt(a)?n(a):t(a)}}function oT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function sT(e){return!nn(e)}function aT(e){return!(e===47||Ph(e))}function Ph(e){return e===43||e===45||e===46||e===95||Gt(e)}function Lh(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 l8={tokenize:E8,partial:!0};function c8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p8,continuation:{tokenize:m8},exit:g8}},text:{91:{name:"gfmFootnoteCall",tokenize:h8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:d8,resolveTo:f8}}}}function d8(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][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 c;function c(d){if(!u||!u._balanced)return n(d);const h=Wn(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function f8(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.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)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,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,...c),e}function h8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(a>999||g===93&&!u||g===null||g===91||it(g))return n(g);if(g===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(Wn(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return it(g)||(u=!0),a++,e.consume(g),g===92?p:h}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}}function p8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(u>999||w===93&&!c||w===null||w===91||it(w))return n(w);if(w===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=Wn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return it(w)||(c=!0),u++,e.consume(w),w===92?g:p}function g(w){return w===91||w===92||w===93?(e.consume(w),u++,p):p(w)}function T(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),Qe(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function m8(e,t,n){return e.check(Hs,t,e.attempt(l8,t,n))}function g8(e){e.exit("gfmFootnoteDefinition")}function E8(e,t,n){const r=this;return Qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(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 y8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},g={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&xn(T,T.length,0,Mu(y,u.slice(h+1,d),c)),xn(T,T.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),xn(u,h-1,d-h+3,T),d=h+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,c,d){const h=this.previous,p=this.events;let g=0;return T;function T(w){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const v=xo(h);if(w===126)return g>1?d(w):(u.consume(w),g++,y);if(g<2&&!n)return d(w);const A=u.exit("strikethroughSequenceTemporary"),C=xo(w);return A._open=!C||C===2&&!!v,A._close=!v||v===2&&!!C,c(w)}}}class b8{constructor(){this.map=[]}add(t,n,r){T8(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 o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function T8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function x8(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function w8(){return{flow:{null:{name:"table",tokenize:_8,resolveAll:v8}}}}function _8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(z){let oe=r.events.length-1;for(;oe>-1;){const se=r.events[oe][1].type;if(se==="lineEnding"||se==="linePrefix")oe--;else break}const he=oe>-1?r.events[oe][1].type:null,ae=he==="tableHead"||he==="tableRow"?F:d;return ae===F&&r.parser.lazy[r.now().line]?n(z):ae(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):Le(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):Ge(z)?Qe(e,p,"whitespace")(z):(a+=1,u&&(u=!1,o+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(z)))}function g(z){return z===null||z===124||it(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?T:g)}function T(z){return z===92||z===124?(e.consume(z),g):g(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,Ge(z)?Qe(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):w(z))}function w(z){return z===45||z===58?A(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),v):Y(z)}function v(z){return Ge(z)?Qe(e,A,"whitespace")(z):A(z)}function A(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(a+=1,C(z)):z===null||Le(z)?U(z):Y(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),k(z)):Y(z)}function k(z){return z===45?(e.consume(z),k):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(z))}function R(z){return Ge(z)?Qe(e,U,"whitespace")(z):U(z)}function U(z){return z===124?w(z):z===null||Le(z)?!u||o!==a?Y(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):Y(z)}function Y(z){return n(z)}function F(z){return e.enter("tableRow"),X(z)}function X(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),X):z===null||Le(z)?(e.exit("tableRow"),t(z)):Ge(z)?Qe(e,X,"whitespace")(z):(e.enter("data"),ce(z))}function ce(z){return z===null||z===124||it(z)?(e.exit("data"),X(z)):(e.consume(z),z===92?de:ce)}function de(z){return z===92||z===124?(e.consume(z),ce):ce(z)}}function v8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h,p,g;const T=new b8;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(c=!1,d!==0&&(uT(T,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",h,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,g=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",p,t]])),o=w.type==="tableDelimiterRow"?2:p?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],g=Cl(T,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=Cl(T,t,a,o,void 0,g)),a=u,u=[a[1],n,0,0])):w.type==="tableHead"?(c=!0,d=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],g=Cl(T,t,a,o,n,g)):u[1]!==0&&(g=Cl(T,t,u,o,n,g)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&uT(T,t,d,h,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=x8(t.events,n))}return e}function Cl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Go(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Go(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const h=Go(t.events,n[2]),p=Go(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,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 w=n[2]+1,v=n[3]-n[2]-1;e.add(w,v,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},Go(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function uT(e,t,n,r,o){const a=[],u=Go(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Go(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const S8={name:"tasklistCheck",tokenize:C8};function A8(){return{text:{91:S8}}}function C8(e,t,n){const r=this;return o;function o(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 it(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"),c):n(d)}function c(d){return Le(d)?t(d):Ge(d)?e.check({tokenize:k8},t,n)(d):n(d)}}function k8(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function N8(e){return Ig([e8(),c8(),y8(e),w8(),A8()])}const O8={};function I8(e){const t=this,n=e||O8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(N8(n)),a.push(Q5()),u.push(X5(n))}const R8=()=>x.jsx("span",{className:`${D}-blinking-cursor`,children:x.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Dh=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(x1,{remarkPlugins:[I8],rehypePlugins:[PE],components:{h1:({children:o})=>x.jsx("h1",{className:j(e,`${D}-header h1`),children:o}),h2:({children:o})=>x.jsx("h2",{className:j(e,`${D}-header h2`),children:o}),h3:({children:o})=>x.jsx("h3",{className:j(e,`${D}-header h3`),children:o}),ul:({children:o})=>x.jsx("ul",{className:j(e,`${D}-ul`),children:o}),ol:({children:o})=>x.jsx("ol",{className:j(e,`${D}-ol`),children:o}),li:({children:o})=>x.jsx("li",{className:j(e,`${D}-li`),children:o}),a:({href:o,children:a})=>x.jsx(HE,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>x.jsx("div",{className:j(e,`${D}-table-container`),children:x.jsx("table",{className:j(e,`${D}-table`),children:o})}),thead:({children:o})=>x.jsx("thead",{className:j(e,`${D}-thead`),children:o}),tbody:({children:o})=>x.jsx("tbody",{className:j(e,`${D}-tbody`),children:o}),tr:({children:o})=>x.jsx("tr",{className:j(e,`${D}-tr`),children:o}),th:({children:o})=>x.jsx("th",{className:j(e,`${D}-th`),children:o}),td:({children:o})=>x.jsx("td",{className:j(e,`${D}-td`),children:o}),span:({className:o,children:a})=>o===`${D}-blinking-cursor`?x.jsx(R8,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${D}-blinking-cursor'></span>`:"")}),lT=({product:e,globalClassName:t,isFullWidth:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{sendMessage:a,loading:u}=Yn(),{id:c,name:d,imageUrl:h,productPageUrl:p,price:g,discountPrice:T,compareAtPrice:y,currencyCode:w}=e,v=typeof T=="number"&&typeof g=="number"&&T<g,A=v?g:y!=null?y:g,C=v?T:g,k=()=>{if(u)return;const U=d||"this product",Y=c?` [SKU: ${c}]`:"";a(`Show me details for ${U}${Y}`)},R=o?`View details for ${d}`:`Go to product page for ${d}`;return x.jsxs("div",{className:j(t,`${D}-msg-product-card`,{"card-full-width":n}),children:[x.jsx("div",{className:j(t,`${D}-msg-product-card__image-wrapper`),children:h&&(o?x.jsx("button",{type:"button",className:j(t,`${D}-msg-product-card__image-button`),onClick:k,disabled:u,"aria-label":R,children:x.jsx("img",{className:j(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):p?x.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener","aria-label":R,children:x.jsx("img",{className:j(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):x.jsx("img",{className:j(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"}))}),x.jsxs("div",{className:j(t,`${D}-msg-product-card__content`),children:[o?x.jsx("button",{type:"button",disabled:u,onClick:k,className:j(t,`${D}-msg-product-card__title-link`),"aria-label":R,children:d}):p?x.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener",className:j(t,`${D}-msg-product-card__title-link`),"aria-label":R,children:d}):x.jsx("p",{className:j(t,`${D}-msg-product-card__title`),children:d}),x.jsx("div",{className:j(t,`${D}-msg-product-card__price-row`),children:x.jsx(Sh,{globalClassName:t,retailPrice:A,discountPrice:C,currencyCode:w})})]})]})},cT=e=>({id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,currencyCode:e.data.currencyCode}),P8=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a=!1})=>{if(t.length===1){const u=t[0];return x.jsxs("div",{children:[e&&x.jsx("p",{className:j(n,`${D}-product-carousel-title`),children:e}),x.jsx(lT,{product:cT(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a,isFullWidth:!o})]})}return x.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&x.jsx("p",{className:j(n,`${D}-product-carousel-title`),children:e}),x.jsx(qL,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(u=>x.jsx(lT,{product:cT(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a},u.id))})]})},dT=({code:e,globalClassName:t})=>x.jsxs("span",{className:j(t,`${D}-cart-chip`),children:[x.jsx(Z0,{"aria-hidden":"true"}),x.jsx("span",{children:e})]}),Yi=({label:e,badge:t,value:n,currencyCode:r,globalClassName:o,emphasized:a,isDiscount:u,fallback:c})=>{let d;if(typeof n=="number")n===0&&!u?d="Free":d=Ea(u?-n:n,r);else if(c)d=c;else return null;return x.jsxs("div",{className:j(o,`${D}-cart-total-row`,{emphasized:a}),children:[x.jsxs("span",{className:j(o,`${D}-cart-total-label`),children:[e,t&&x.jsx("span",{className:j(o,`${D}-cart-total-badge`),children:t})]}),x.jsx("span",{className:j(o,`${D}-cart-total-value`),children:d})]})},L8=({item:e,currencyCode:t,loading:n,globalClassName:r,onRemove:o})=>{var u,c,d;const a=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return x.jsxs("li",{className:j(r,`${D}-cart-item`),children:[e.imageUrl&&x.jsx("div",{className:j(r,`${D}-cart-item-image`),children:x.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),x.jsxs("div",{className:j(r,`${D}-cart-item-details`),children:[x.jsx("p",{className:j(r,`${D}-cart-item-name`),children:e.name}),x.jsxs("div",{className:j(r,`${D}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(h=>x.jsxs("p",{className:j(r,`${D}-cart-item-attr`),children:[h.lbl,": ",h.value]},`${h.type}-${h.value}`)),((c=e.promotions)!=null?c:[]).map(h=>x.jsxs("p",{className:j(r,`${D}-cart-item-attr`),children:["Promotion: ",h]},h))]}),((d=e.coupons)!=null?d:[]).length>0&&x.jsx("div",{className:j(r,`${D}-cart-chips`),children:e.coupons.map(h=>x.jsx(dT,{code:h,globalClassName:r},h))}),x.jsxs("span",{className:j(r,`${D}-cart-item-price`),children:[a&&x.jsx("span",{className:j(r,`${D}-cart-item-original-price`),children:Ea(e.originalSubtotal,t)}),x.jsx("span",{className:j(r,`${D}-cart-item-final-price`),children:Ea(e.itemSubtotal,t)})]}),x.jsxs("div",{className:j(r,`${D}-cart-item-footer`),children:[x.jsxs("span",{className:j(r,`${D}-cart-item-qty`),children:["Qty: ",e.quantity]}),x.jsx("button",{type:"button",className:j(r,`${D}-cart-item-remove`),disabled:n,onClick:()=>o(e),children:"Remove"})]})]})]})},D8=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Yn(),[a,u]=Z.useState(!0),[c,d]=Z.useState(""),{items:h=[],currencyCode:p="USD",subtotal:g,total:T,taxes:y,shippingCost:w,shippingDiscount:v,shippingPromotions:A=[],promotionsDiscount:C,promotions:k=[],couponsDiscount:R,couponsApplied:U=[],bodyMessage:Y,footerMessage:F,checkoutButtonUrl:X}=e,ce=z=>{o||r(`Remove ${z.name} from my cart`)},de=()=>{const z=c.trim();!z||o||(r(`Apply coupon code ${z}`),d(""))};return x.jsxs("div",{className:j(t,`${D}-cart`),children:[x.jsxs("div",{className:j(t,`${D}-cart-box`),children:[Y&&x.jsxs("button",{type:"button",className:j(t,`${D}-cart-summary`),"aria-expanded":a,onClick:()=>u(z=>!z),children:[x.jsx("span",{className:j(t,`${D}-cart-summary-text`),children:x.jsx(Dh,{text:Y,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),x.jsx("span",{className:j(t,`${D}-cart-summary-toggle`),"aria-hidden":"true",children:a?x.jsx(nA,{}):x.jsx(rA,{})})]}),a&&x.jsxs("div",{className:j(t,`${D}-cart-expanded`),children:[x.jsx("ul",{className:j(t,`${D}-cart-items`),children:h.map(z=>x.jsx(L8,{item:z,currencyCode:p,loading:o,globalClassName:t,onRemove:ce},z.itemId))}),U.length>0&&x.jsx("div",{className:j(t,`${D}-cart-chips`,`${D}-cart-applied-coupons`),children:U.map(z=>x.jsx(dT,{code:z,globalClassName:t},z))}),x.jsxs("div",{className:j(t,`${D}-cart-totals`),children:[x.jsx(Yi,{label:"Subtotal",value:g,currencyCode:p,globalClassName:t}),x.jsx(Yi,{label:"Coupon",value:R,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(Yi,{label:"Promotions",badge:k[0],value:C,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(Yi,{label:"Shipping",value:w,currencyCode:p,globalClassName:t,fallback:"TBD"}),x.jsx(Yi,{label:"Shipping Discount",badge:A[0],value:v,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(Yi,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),x.jsx(Yi,{label:"Total",value:T,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),x.jsxs("div",{className:j(t,`${D}-cart-coupon`),children:[x.jsxs("div",{className:j(t,`${D}-cart-coupon-field`),children:[x.jsx("span",{className:j(t,`${D}-cart-coupon-icon`),"aria-hidden":"true",children:x.jsx(Z0,{})}),x.jsx("input",{type:"text",className:j(t,`${D}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:o,onChange:z=>d(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),de())}})]}),x.jsx("button",{type:"button",className:j(t,`${D}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:o||!c.trim(),onClick:de,children:x.jsx(tA,{"aria-hidden":"true"})})]}),X&&x.jsxs("a",{className:j(t,`${D}-cart-checkout-button`),href:X,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[x.jsx(ZS,{"aria-hidden":"true"}),x.jsx("span",{children:"Checkout"})]}),x.jsx("p",{className:j(t,`${D}-cart-footer`),children:F||"Shipping and taxes calculated at checkout."})]})},M8=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return x.jsxs(yh,{className:j(n,`${D}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[x.jsx(mh,{className:j(n,`${D}-pdp-gallery__item-group`),children:e.map((o,a)=>x.jsx(ph,{index:a,className:j(n,`${D}-pdp-gallery__item`),children:x.jsx("img",{className:j(n,`${D}-pdp-gallery__image`),src:o,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,loading:"lazy"})},o))}),r&&x.jsxs(dh,{className:j(n,`${D}-pdp-gallery__control`),children:[x.jsx(Eh,{className:j(n,`${D}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:x.jsx(ub,{size:"16px"})}),x.jsx(gh,{className:j(n,`${D}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:x.jsx(lb,{size:"16px"})})]}),r&&x.jsx(hh,{className:j(n,`${D}-pdp-gallery__indicator-group`),children:e.map((o,a)=>x.jsx(fh,{index:a,className:j(n,`${D}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},ba="color",Mh=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,fT=e=>e.replace(/(^|\/)large\//,"$1medium/"),hT=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===ba&&n.vals.includes(t)),F8=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>hT(h,t)),o=n.find(h=>h.vattr===null),a=r||o||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(h=>Mh(e.baseUrl,fT(h.url)));return u.length>0?u:e.imageUrl?[Mh(e.baseUrl,fT(e.imageUrl))]:[]},B8=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&hT(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Mh(e.baseUrl,r):""},kl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(o=>{var a;return((a=o.vars)==null?void 0:a[t])!==n||o.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=o.vars)==null?void 0:d[u])===c})}),U8=(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(o=>{var a;return((a=r.vars)==null?void 0:a[o])===t[o]}))},H8=(e,t,n,r,o)=>{if(!e||e.length===0)return ie(B({},o),{[n]:r});const a=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(o).every(([h,p])=>{var g;return h===n||((g=c.vars)==null?void 0:g[h])===p})});if(a)return B({},a.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?B({},u.vars):ie(B({},o),{[n]:r})},z8=(e,t)=>{var o,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(o=e.id)!=null?o: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(([h,p])=>{var g;return((g=d.vars)==null?void 0:g[h])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},j8=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([o,a])=>{var u;return((u=r.vars)==null?void 0:u[o])===a}));return n!=null&&n.pr?n.pr:e.pr},$8=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const o=r.opts.find(u=>kl(e.vmat,r.id,u.val)),a=o!=null?o:r.opts[0];a&&(t[r.id]=a.val)}return t},V8=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var se,Te,Ce,ee,V,q,S;const{addToCart:o,loading:a}=Yn(),u=e.data,c=(se=u.vattr)!=null?se:[],[d,h]=Z.useState(()=>$8(u)),p=U8(u.vmat,d),g=(Ce=(Te=u.quantity)==null?void 0:Te.minQuantity)!=null?Ce:1,T=(V=(ee=u.quantity)==null?void 0:ee.maxQuantity)!=null?V:Number.POSITIVE_INFINITY,y=(S=(q=u.quantity)==null?void 0:q.increment)!=null?S:1,[w,v]=Z.useState(g),A=d[ba],C=Z.useMemo(()=>F8(u,A),[u,A]),k=Z.useMemo(()=>j8(u,d),[u,d]),R=c.find(I=>I.id===ba),U=c.filter(I=>I.id!==ba),Y=(I,W)=>()=>{h(O=>{const be=!kl(u.vmat,I,W,O);return I===ba||be?H8(u.vmat,c,I,W,O):ie(B({},O),{[I]:W})})},F=()=>{if(a)return;const I=z8(u,d);if(!I)return;const W=c.map(O=>{const be=O.opts.find(Oe=>Oe.val===d[O.id]);return be?{label:O.lbl||O.id,value:be.name||be.val}:null}).filter(O=>O!==null);o({productName:u.name,sku:I,quantity:w,variants:W})},X=!p||w-y<g,ce=!p||w+y>T,de=I=>{var O;const W=d[I.id];return(O=I.opts.find(be=>be.val===W))==null?void 0:O.name},z=()=>v(I=>Math.max(g,I-y)),oe=()=>v(I=>Math.min(T,I+y)),he=I=>x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant`),children:[x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__variant-name`),children:I.lbl||I.id}),de(I)&&x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-value`),children:de(I)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__chips`),children:I.opts.map(W=>{const O=kl(u.vmat,I.id,W.val,d),be=d[I.id]===W.val;return x.jsxs("label",{className:j(`${D}-msg-pdp__chip`,{selected:be,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${I.id}`,value:W.val,checked:be,"aria-description":O?void 0:"unavailable",onChange:Y(I.id,W.val),className:`${D}-msg-pdp__radio-input`}),x.jsx("span",{children:W.name||W.val})]},W.val)})})]},I.id),ae=I=>x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant`),children:[x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__variant-name`),children:I.lbl||"Color"}),de(I)&&x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-value`),children:de(I)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__swatches`),children:I.opts.map(W=>{const O=kl(u.vmat,I.id,W.val,d),be=d[I.id]===W.val,Oe=B8(u,W.val);return Oe?x.jsxs("label",{className:j(`${D}-msg-pdp__swatch`,{selected:be,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${I.id}`,value:W.val,checked:be,"aria-label":W.name||W.val,"aria-description":O?void 0:"unavailable",onChange:Y(I.id,W.val),className:`${D}-msg-pdp__radio-input`}),x.jsx("img",{className:j(t,`${D}-msg-pdp__swatch-image`),src:Oe,alt:W.name||W.val,loading:"lazy"})]},W.val):x.jsxs("label",{className:j(`${D}-msg-pdp__chip`,{selected:be,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${I.id}`,value:W.val,checked:be,"aria-description":O?void 0:"unavailable",onChange:Y(I.id,W.val),className:`${D}-msg-pdp__radio-input`}),x.jsx("span",{children:W.name||W.val})]},W.val)})})]});return x.jsx("div",{className:j(t,`${D}-msg-pdp`),children:x.jsxs("div",{className:j(t,`${D}-msg-pdp__card`),children:[x.jsx("div",{className:j(t,`${D}-msg-pdp__gallery`),children:x.jsx(M8,{images:C,altText:u.name,globalClassName:t})}),x.jsxs("div",{className:j(t,`${D}-msg-pdp__content`),children:[u.slugUrl?x.jsx("a",{href:u.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:j(t,`${D}-msg-pdp__title-link`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):x.jsx("p",{className:j(t,`${D}-msg-pdp__title`),children:u.name}),x.jsx(Sh,{globalClassName:t,className:`${D}-msg-pdp__price`,retailPrice:k==null?void 0:k.orig,discountPrice:(k==null?void 0:k.cur)||(k==null?void 0:k.prom),currencyCode:u.ccy,fontSize:"14px"}),u.dscr&&x.jsx("p",{className:j(t,`${D}-msg-pdp__description`),children:u.dscr}),R&&ae(R),U.map(he),x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant`),children:[x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant-label`),children:[x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-name`),children:"Quantity"}),x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-value`),children:w})]}),x.jsxs("div",{className:j(t,`${D}-msg-pdp__stepper`),children:[x.jsx(lr,{className:`${D}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:x.jsx(VS,{}),disabled:X,onClick:z}),x.jsx("span",{className:j(t,`${D}-msg-pdp__quantity`),children:w}),x.jsx(lr,{className:`${D}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:x.jsx(qS,{}),disabled:ce,onClick:oe})]})]}),r&&x.jsx("div",{className:j(t,`${D}-msg-pdp__actions`),children:x.jsx(Iu,{className:`${D}-msg-pdp__add-to-cart`,disabled:!p||a,onClick:F,children:a?"Adding...":"Add to cart"})})]})]})})},q8=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},Y8=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{addToCart:a,loading:u}=Yn();if(!e.length)return null;const c=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,h=p=>()=>{u||a({productName:p.name,sku:p.id})};return x.jsx("div",{className:j(n,`${D}-product-comparison`),children:x.jsxs("div",{className:`${D}-product-comparison__grid`,style:{gridTemplateColumns:c,minWidth:d},children:[x.jsxs("div",{className:`${D}-product-comparison__header`,children:[x.jsx("div",{className:`${D}-product-comparison__header-spacer`}),e.map(p=>{var T,y,w,v;const g=q8(p);return x.jsxs("div",{className:j(n,`${D}-product-comparison__product-col`),children:[g&&x.jsx("img",{className:j(n,`${D}-product-comparison__image`),src:g,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?x.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:j(n,`${D}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):x.jsx("span",{className:j(n,`${D}-product-comparison__name`),children:p.name}),x.jsx(Sh,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(w=p.pr)==null?void 0:w.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),x.jsx("div",{className:`${D}-product-comparison__table`,children:t.map(p=>x.jsxs("div",{className:`${D}-product-comparison__row`,children:[x.jsx("div",{className:j(n,`${D}-product-comparison__row-label`),children:p.row_name}),p.values.map((g,T)=>x.jsx("div",{className:j(n,`${D}-product-comparison__row-value`),children:g},`${p.row_name}-${T}`))]},p.row_name))}),o&&x.jsxs("div",{className:`${D}-product-comparison__footer`,children:[x.jsx("div",{className:`${D}-product-comparison__footer-spacer`}),e.map(p=>x.jsx("div",{className:j(n,`${D}-product-comparison__footer-cell`),children:x.jsxs(Iu,{className:`${D}-product-comparison__add-to-cart`,disabled:u,onClick:h(p),children:[x.jsx(JS,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},pT=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Yn(),{isCartMgmtSupported:u}=At();return x.jsx(x.Fragment,{children:e.response.map((c,d)=>{var h,p,g,T,y,w,v,A,C,k,R,U,Y,F,X,ce,de,z,oe,he,ae;switch(c.type){case"markdown":return x.jsx(Dh,{text:(p=(h=c.data)==null?void 0:h.content)!=null?p:"",globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${c.type}-${(g=c.index)!=null?g:d}`);case"product_carousel":return x.jsx(P8,{title:(y=(T=c.data)==null?void 0:T.title)!=null?y:"",products:(v=(w=c.data)==null?void 0:w.products)!=null?v:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(A=c.index)!=null?A:d}`);case"product_tile":return x.jsx(V8,{product:c.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(C=c.index)!=null?C:d}`);case"product_comparison":return x.jsx(Y8,{products:(R=(k=c.data)==null?void 0:k.products)!=null?R:[],table:(Y=(U=c.data)==null?void 0:U.table)!=null?Y:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(F=c.index)!=null?F:d}`);case"cart":{const se=(de=(ce=(X=c.data)==null?void 0:X.cart)==null?void 0:ce.cartSummary)==null?void 0:de.cartDetails;return se?x.jsx(D8,{cart:se,productsToHighlight:c.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${c.type}-${(z=c.index)!=null?z:d}`):null}case"suggestions":return x.jsx("div",{style:{marginTop:"0.5rem"},children:x.jsx(mD,{disabled:a,suggestions:(he=(oe=c.data)==null?void 0:oe.display_text)!=null?he:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${c.type}-${(ae=c.index)!=null?ae:d}`);default:return null}})})},W8=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=At(),a=Z.useMemo(()=>{try{const c=JSON.parse(e.content);return Array.isArray(c==null?void 0:c.response)?c:null}catch(c){return null}},[e.content]),u=Z.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return o==null||o.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const h=JSON.parse(d);if(typeof h=="object"&&h!==null)return o==null||o.debug("Detected JSON object instead of array of responses in message content",e.content),h.text||h.message||c}catch(h){if(d.startsWith("{")||d.startsWith("["))return o==null||o.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[o,e.content]);switch(e.role){case"user":return x.jsx("div",{className:j(t,`${D}-message`,r?"standalone":"embedded"),children:x.jsx("div",{className:j(t,`${D}-user-message`,r?"standalone":"embedded"),children:x.jsxs("div",{className:j(t,`${D}-user-message-row`,r?"standalone":"embedded"),children:[x.jsx("span",{className:j(t,`${D}-message-icon user-message-icon`,r?"standalone":"embedded"),children:x.jsx(eA,{})}),x.jsx("p",{className:j(t,`${D}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return x.jsx("div",{className:j(t,`${D}-message-group`,r?"standalone":"embedded"),children:x.jsx("div",{className:`${D}-message-group-child`,children:a?x.jsx(pT,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):x.jsx(Dh,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return x.jsx("div",{className:j(t,`${D}-message`,r?"standalone":"embedded"),children:x.jsx("p",{className:j(t,`${D}-reset-message`),children:e.content})})}},G8=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>x.jsxs("div",{className:j(n,`${D}-send-error`,r?"standalone":"embedded"),role:"alert",children:[x.jsx("span",{className:j(n,`${D}-send-error-text`),children:e}),x.jsxs("button",{type:"button",className:j(n,`${D}-retry-button`),onClick:t,children:[x.jsx(sA,{"aria-hidden":"true"})," Retry"]})]}),K8="You are offline or we couldn't reach the assistant. Check connection and try again.",Fh=({isWidgetStandalone:e})=>{var X,ce;const{globalClassName:t,openLinksInNewTab:n,logger:r}=At(),{messages:o,streamingBlocks:a,isAgentTyping:u,loading:c,progressMessage:d,connectionStatus:h,error:p,sendError:g,retryLastMessage:T,retryConnection:y}=Yn(),w=Z.useRef(null),v=o.length>0,A=a.length>0,C=v&&(c||u)&&!A,k=h==="reconnecting"&&!C,R=h==="error";let U=null;R?U={message:p!=null?p:K8,kind:"connection",onRetry:y}:g&&(U={message:g.message,kind:"send",onRetry:T}),Z.useEffect(()=>{var de;(de=w.current)==null||de.scrollIntoView({behavior:"smooth"})},[o,a,g,p]);const Y=(X=U==null?void 0:U.message)!=null?X:null,F=(ce=U==null?void 0:U.kind)!=null?ce:null;return Z.useEffect(()=>{Y&&(r==null||r.error("Error message shown to user",{message:Y,kind:F}))},[Y,F,r]),x.jsxs(x.Fragment,{children:[c&&!v&&x.jsx(TD,{globalClassName:t,isWidgetStandalone:e}),o.map(de=>x.jsx(W8,{message:de,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},de.id)),U&&x.jsx(G8,{message:U.message,onRetry:U.onRetry,globalClassName:t,isWidgetStandalone:e}),A&&x.jsxs("div",{className:j(t,`${D}-message-group`,e?"standalone":"embedded"),children:[x.jsx(pT,{content:{response:a},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(c||u)&&x.jsx(Ah,{globalClassName:t,isWidgetStandalone:e})]}),C&&x.jsx(Ah,{globalClassName:t,isWidgetStandalone:e,loadingText:d}),k&&x.jsx(Ah,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),x.jsx("div",{ref:w})]})},Q8=()=>x.jsxs("svg",{className:`${D}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),X8=()=>x.jsx("svg",{className:`${D}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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"})}),Bh=({steps:e,globalClassName:t})=>e.length===0?null:x.jsx("div",{className:j(t,`${D}-progress-steps-panel`),children:x.jsxs("div",{className:`${D}-progress-steps`,children:[x.jsxs("span",{className:`${D}-progress-steps-header`,children:["Loading Step ",e.length]}),x.jsx("ul",{className:`${D}-progress-steps-list`,children:e.map((n,r)=>{const o=r<e.length-1,a=r===e.length-1;return x.jsxs("li",{className:j(`${D}-progress-step`,a&&"active"),children:[a&&x.jsx("span",{className:`${D}-progress-step-arc`}),x.jsx("span",{className:`${D}-progress-step-text`,children:n}),x.jsx("span",{className:j(`${D}-progress-step-icon`,o?"done":"active"),children:o?x.jsx(Q8,{}):x.jsx(X8,{})})]},`${r}-${n}`)})})]})}),mT=()=>{const{globalClassName:e,themeVariables:t}=At(),{isAgentTyping:n,sendMessage:r,resetConversation:o,progressSteps:a}=Yn(),u=n;return x.jsxs("div",{className:j(e,`${D}-container`,`${D}-embedded-chat`),style:t,children:[x.jsx("div",{className:j(e,`${D}-message-container`,"embedded"),children:x.jsx(Fh,{isWidgetStandalone:!1})}),x.jsx(Bh,{steps:a,globalClassName:e}),x.jsx(Nf,{componentType:"chat",className:"embedded-chat",isLoading:u,onSubmit:c=>r(c)}),x.jsx("div",{className:j(`${D}-embedded-chat-menu`),children:x.jsxs(CL,{componentType:"chat",children:[x.jsx(Rb,{componentType:"chat"}),x.jsx($E,{componentType:"chat",onClearChat:o})]})})]})},gT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=Z.useState((d=e.container)==null?void 0:d.current),a=Z.useSyncExternalStore(Z8,()=>!1,()=>!0),{getRootNode:u}=_l();if(Z.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const c=r!=null?r:J8(u);return x.jsx(x.Fragment,{children:Z.Children.map(t,h=>Ps.createPortal(h,c))})},J8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Bi(n)?n:hr(t).body},Z8=()=>()=>{},ET=()=>{const{globalClassName:e,themeVariables:t}=At(),{mode:n,status:r,dialogPosition:o,isDialogFullHeight:a,dialogWidth:u}=Ni(),{loading:c,isAgentTyping:d,sendMessage:h,resetConversation:p,progressSteps:g}=Yn(),{isOpen:T}=r||{},y=!!r.isOpen,w=n==="standalone",v=d||c,A=()=>{ki(!1)};return x.jsx(Ab,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:x.jsx(gT,{children:x.jsx(xh,{className:j(e,`${D}-container`,`${D}-dialog`,o,a&&"full-height"),style:B(B({},t),u&&{width:u}),children:x.jsxs(bh,{className:j(e,`${D}-dialog-content`,{standalone:w,embedded:!w}),children:[x.jsx(Ob,{componentType:"dialog",onClearChat:p,onClose:A}),x.jsx(Th,{className:j(e,`${D}-message-container`,{standalone:w,embedded:!w}),children:x.jsx(Fh,{isWidgetStandalone:w,isOpen:T})}),x.jsx(Bh,{steps:g,globalClassName:e}),x.jsx(Nf,{componentType:"dialog",isLoading:v,onSubmit:C=>h(C)})]})})})})},yT=()=>{const{globalClassName:e,themeVariables:t}=At(),{mode:n,status:r,isModalFullscreen:o}=Ni(),{isAgentTyping:a,sendMessage:u,resetConversation:c,progressSteps:d}=Yn(),{isOpen:h}=r||{},p=!!r.isOpen,g=n==="standalone",T=a,y=({open:v})=>{ki(v)},w=()=>{ki(!1)};return p?x.jsx(Ab,{lazyMount:!0,unmountOnExit:!0,open:p,onOpenChange:y,children:x.jsx(gT,{children:x.jsxs("div",{className:j(e,`${D}-modal-container`),style:t,children:[x.jsx(xb,{className:j(e,`${D}-modal-backdrop`)}),x.jsx(xh,{className:j(e,`${D}-container`,`${D}-modal`,{fullscreen:o,standalone:g,embedded:!g}),children:x.jsxs(bh,{className:j(e,`${D}-modal-content`,{standalone:g,embedded:!g}),children:[x.jsx(Ob,{componentType:"modal",onClearChat:c,onClose:w}),x.jsx(Th,{className:j(e,`${D}-message-container`,{standalone:g,embedded:!g}),children:x.jsx(Fh,{isWidgetStandalone:g,isOpen:h})}),x.jsx(Bh,{steps:d,globalClassName:e}),x.jsx(Nf,{componentType:"modal",isLoading:T,onSubmit:v=>u(v)})]})})]})})}):null},eM=()=>{const e=Ni(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(KS,{}):t==="dialog"?x.jsx(ET,{}):t==="modal"?x.jsx(yT,{}):x.jsx(mT,{})},Uh=e=>x.jsx(H0,ie(B({},e),{children:x.jsx(eM,{})}));var Nl={},bT;function tM(){if(bT)return Nl;bT=1;var e=q0();return Nl.createRoot=e.createRoot,Nl.hydrateRoot=e.hydrateRoot,Nl}var TT=tM();const nM=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=sn(o,["elementId","timeout"]);let a;const u=(d,h)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const T of g.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ci(!0,"log","Target element found, rendering Messaging Widget"),h.disconnect(),clearTimeout(a),(p=TT.createRoot(T))==null||p.render(x.jsx(Uh,ie(B({},n),{mode:"messaging"}))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ci(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},rM=r=>{var o=r,{timeout:e,elementId:t}=o,n=sn(o,["timeout","elementId"]);if(!n.messagingConfig){Ci(!0,"error","Messaging Widget requires messagingConfig");return}if(!n.messagingConfig.scrt2Url||!n.messagingConfig.orgId||!n.messagingConfig.esDeveloperName){Ci(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const a=document.getElementById(t);if(!a){Ci(!0,"warn","Container element not found for id:",t),Ci(!0,"warn","Beginning observation for element"),nM(B({elementId:t,timeout:e},n));return}TT.createRoot(a).render(x.jsx(Uh,ie(B({},n),{mode:"messaging"})))},iM={components:{setEntryType:B0,toggleWidgetOpen:ki,toggleWidgetMinimized:Cu,toggleModalFullscreen:Sd,setWidgetType:ku,setWidgetDialogPosition:Ad}};Ie.AgentForceWidget=Uh,Ie.AgentforceWidgetProvider=H0,Ie.CIMULATE_WIDGET_READY_EVENT=L0,Ie.MessagingDialog=ET,Ie.MessagingEmbed=mT,Ie.MessagingModal=yT,Ie.MessagingProvider=F0,Ie.eventHandlers=iM,Ie.injectMessagingWidget=rM,Ie.useMessaging=Yn,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));
|