@cimulate/copilot-widget 1.30.2 → 1.30.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,52 @@
1
- (function(Me,ze){typeof exports=="object"&&typeof module!="undefined"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(Me=typeof globalThis!="undefined"?globalThis:Me||self,ze(Me.CimulateMessaging={}))})(this,(function(Me){"use strict";var N7=Object.defineProperty,C7=Object.defineProperties;var O7=Object.getOwnPropertyDescriptors;var dd=Object.getOwnPropertySymbols;var h2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable;var $o=(Me,ze)=>(ze=Symbol[Me])?ze:Symbol.for("Symbol."+Me),I7=Me=>{throw TypeError(Me)},fd=Math.pow,i0=(Me,ze,Je)=>ze in Me?N7(Me,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Me[ze]=Je,H=(Me,ze)=>{for(var Je in ze||(ze={}))h2.call(ze,Je)&&i0(Me,Je,ze[Je]);if(dd)for(var Je of dd(ze))p2.call(ze,Je)&&i0(Me,Je,ze[Je]);return Me},le=(Me,ze)=>C7(Me,O7(ze));var yn=(Me,ze)=>{var Je={};for(var ct in Me)h2.call(Me,ct)&&ze.indexOf(ct)<0&&(Je[ct]=Me[ct]);if(Me!=null&&dd)for(var ct of dd(Me))ze.indexOf(ct)<0&&p2.call(Me,ct)&&(Je[ct]=Me[ct]);return Je};var Ye=(Me,ze,Je)=>i0(Me,typeof ze!="symbol"?ze+"":ze,Je);var Ue=(Me,ze,Je)=>new Promise((ct,At)=>{var gt=Et=>{try{Gt(Je.next(Et))}catch(pn){At(pn)}},Fe=Et=>{try{Gt(Je.throw(Et))}catch(pn){At(pn)}},Gt=Et=>Et.done?ct(Et.value):Promise.resolve(Et.value).then(gt,Fe);Gt((Je=Je.apply(Me,ze)).next())}),As=function(Me,ze){this[0]=Me,this[1]=ze},s0=(Me,ze,Je)=>{var ct=(Gt,Et,pn,er)=>{try{var Di=Je[Gt](Et),ks=(Et=Di.value)instanceof As,Ns=Di.done;Promise.resolve(ks?Et[0]:Et).then(Tn=>ks?ct(Gt==="return"?Gt:"next",Et[1]?{done:Tn.done,value:Tn.value}:Tn,pn,er):pn({value:Tn,done:Ns})).catch(Tn=>ct("throw",Tn,pn,er))}catch(Tn){er(Tn)}},At=(Gt,Et,pn,er)=>Fe[Gt]=Di=>(Et=new Promise((ks,Ns,Tn)=>(Tn=()=>ct(Gt,Di,ks,Ns),gt?gt.then(Tn):Tn())),er=()=>gt===pn&&(gt=0),gt=pn=Et.then(er,er),Et),gt,Fe={};return Je=Je.apply(Me,ze),Fe[$o("asyncIterator")]=()=>Fe,At("next"),At("throw"),At("return"),Fe},o0=Me=>{var ze=Me[$o("asyncIterator")],Je=!1,ct,At={};return ze==null?(ze=Me[$o("iterator")](),ct=gt=>At[gt]=Fe=>ze[gt](Fe)):(ze=ze.call(Me),ct=gt=>At[gt]=Fe=>{if(Je){if(Je=!1,gt==="throw")throw Fe;return Fe}return Je=!0,{done:!1,value:new As(new Promise(Gt=>{var Et=ze[gt](Fe);Et instanceof Object||I7("Object expected"),Gt(Et)}),1)}}),At[$o("iterator")]=()=>At,ct("next"),"throw"in ze?ct("throw"):At.throw=gt=>{throw gt},"return"in ze&&ct("return"),At},m2=(Me,ze,Je)=>(ze=Me[$o("asyncIterator")])?ze.call(Me):(Me=Me[$o("iterator")](),ze={},Je=(ct,At)=>(At=Me[ct])&&(ze[ct]=gt=>new Promise((Fe,Gt,Et)=>(gt=At.call(Me,gt),Et=gt.done,Promise.resolve(gt.value).then(pn=>Fe({value:pn,done:Et}),Gt)))),Je("next"),Je("return"),ze);var ze=document.createElement("style");ze.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:1rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-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-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-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{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
- /*$vite$:1*/`,document.head.appendChild(ze);function Je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},At={},gt={exports:{}},Fe={};var Gt;function Et(){if(Gt)return Fe;Gt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,A={};function v(D,Z,P){this.props=D,this.context=Z,this.refs=A,this.updater=P||y}v.prototype.isReactComponent={},v.prototype.setState=function(D,Z){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,Z,"setState")},v.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=v.prototype;function N(D,Z,P){this.props=D,this.context=Z,this.refs=A,this.updater=P||y}var C=N.prototype=new w;C.constructor=N,x(C,v.prototype),C.isPureReactComponent=!0;var j=Array.isArray,X=Object.prototype.hasOwnProperty,L={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function ne(D,Z,P){var ke,Ce={},ge=null,Le=null;if(Z!=null)for(ke in Z.ref!==void 0&&(Le=Z.ref),Z.key!==void 0&&(ge=""+Z.key),Z)X.call(Z,ke)&&!G.hasOwnProperty(ke)&&(Ce[ke]=Z[ke]);var Be=arguments.length-2;if(Be===1)Ce.children=P;else if(1<Be){for(var Ge=Array(Be),dt=0;dt<Be;dt++)Ge[dt]=arguments[dt+2];Ce.children=Ge}if(D&&D.defaultProps)for(ke in Be=D.defaultProps,Be)Ce[ke]===void 0&&(Ce[ke]=Be[ke]);return{$$typeof:e,type:D,key:ge,ref:Le,props:Ce,_owner:L.current}}function de(D,Z){return{$$typeof:e,type:D.type,key:Z,ref:D.ref,props:D.props,_owner:D._owner}}function z(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function ae(D){var Z={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(P){return Z[P]})}var oe=/\/+/g;function pe(D,Z){return typeof D=="object"&&D!==null&&D.key!=null?ae(""+D.key):Z.toString(36)}function ce(D,Z,P,ke,Ce){var ge=typeof D;(ge==="undefined"||ge==="boolean")&&(D=null);var Le=!1;if(D===null)Le=!0;else switch(ge){case"string":case"number":Le=!0;break;case"object":switch(D.$$typeof){case e:case t:Le=!0}}if(Le)return Le=D,Ce=Ce(Le),D=ke===""?"."+pe(Le,0):ke,j(Ce)?(P="",D!=null&&(P=D.replace(oe,"$&/")+"/"),ce(Ce,Z,P,"",function(dt){return dt})):Ce!=null&&(z(Ce)&&(Ce=de(Ce,P+(!Ce.key||Le&&Le.key===Ce.key?"":(""+Ce.key).replace(oe,"$&/")+"/")+D)),Z.push(Ce)),1;if(Le=0,ke=ke===""?".":ke+":",j(D))for(var Be=0;Be<D.length;Be++){ge=D[Be];var Ge=ke+pe(ge,Be);Le+=ce(ge,Z,P,Ge,Ce)}else if(Ge=b(D),typeof Ge=="function")for(D=Ge.call(D),Be=0;!(ge=D.next()).done;)ge=ge.value,Ge=ke+pe(ge,Be++),Le+=ce(ge,Z,P,Ge,Ce);else if(ge==="object")throw Z=String(D),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Le}function se(D,Z,P){if(D==null)return D;var ke=[],Ce=0;return ce(D,ke,"","",function(ge){return Z.call(P,ge,Ce++)}),ke}function Ae(D){if(D._status===-1){var Z=D._result;Z=Z(),Z.then(function(P){(D._status===0||D._status===-1)&&(D._status=1,D._result=P)},function(P){(D._status===0||D._status===-1)&&(D._status=2,D._result=P)}),D._status===-1&&(D._status=0,D._result=Z)}if(D._status===1)return D._result.default;throw D._result}var re={current:null},Y={transition:null},ie={ReactCurrentDispatcher:re,ReactCurrentBatchConfig:Y,ReactCurrentOwner:L};function k(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:se,forEach:function(D,Z,P){se(D,function(){Z.apply(this,arguments)},P)},count:function(D){var Z=0;return se(D,function(){Z++}),Z},toArray:function(D){return se(D,function(Z){return Z})||[]},only:function(D){if(!z(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Fe.Component=v,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=N,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Fe.act=k,Fe.cloneElement=function(D,Z,P){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var ke=x({},D.props),Ce=D.key,ge=D.ref,Le=D._owner;if(Z!=null){if(Z.ref!==void 0&&(ge=Z.ref,Le=L.current),Z.key!==void 0&&(Ce=""+Z.key),D.type&&D.type.defaultProps)var Be=D.type.defaultProps;for(Ge in Z)X.call(Z,Ge)&&!G.hasOwnProperty(Ge)&&(ke[Ge]=Z[Ge]===void 0&&Be!==void 0?Be[Ge]:Z[Ge])}var Ge=arguments.length-2;if(Ge===1)ke.children=P;else if(1<Ge){Be=Array(Ge);for(var dt=0;dt<Ge;dt++)Be[dt]=arguments[dt+2];ke.children=Be}return{$$typeof:e,type:D.type,key:Ce,ref:ge,props:ke,_owner:Le}},Fe.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Fe.createElement=ne,Fe.createFactory=function(D){var Z=ne.bind(null,D);return Z.type=D,Z},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(D){return{$$typeof:c,render:D}},Fe.isValidElement=z,Fe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:Ae}},Fe.memo=function(D,Z){return{$$typeof:f,type:D,compare:Z===void 0?null:Z}},Fe.startTransition=function(D){var Z=Y.transition;Y.transition={};try{D()}finally{Y.transition=Z}},Fe.unstable_act=k,Fe.useCallback=function(D,Z){return re.current.useCallback(D,Z)},Fe.useContext=function(D){return re.current.useContext(D)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(D){return re.current.useDeferredValue(D)},Fe.useEffect=function(D,Z){return re.current.useEffect(D,Z)},Fe.useId=function(){return re.current.useId()},Fe.useImperativeHandle=function(D,Z,P){return re.current.useImperativeHandle(D,Z,P)},Fe.useInsertionEffect=function(D,Z){return re.current.useInsertionEffect(D,Z)},Fe.useLayoutEffect=function(D,Z){return re.current.useLayoutEffect(D,Z)},Fe.useMemo=function(D,Z){return re.current.useMemo(D,Z)},Fe.useReducer=function(D,Z,P){return re.current.useReducer(D,Z,P)},Fe.useRef=function(D){return re.current.useRef(D)},Fe.useState=function(D){return re.current.useState(D)},Fe.useSyncExternalStore=function(D,Z,P){return re.current.useSyncExternalStore(D,Z,P)},Fe.useTransition=function(){return re.current.useTransition()},Fe.version="18.3.1",Fe}var pn;function er(){return pn||(pn=1,gt.exports=Et()),gt.exports}var Di;function ks(){if(Di)return At;Di=1;var e=er(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:m,_owner:s.current}}return At.Fragment=n,At.jsx=u,At.jsxs=u,At}var Ns;function Tn(){return Ns||(Ns=1,ct.exports=ks()),ct.exports}var _=Tn(),B=er();const Mi=Je(B),Er=Object.create(null);Er.open="0",Er.close="1",Er.ping="2",Er.pong="3",Er.message="4",Er.upgrade="5",Er.noop="6";const xu=Object.create(null);Object.keys(Er).forEach(e=>{xu[Er[e]]=e});const hd={type:"error",data:"parser error"},a0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",u0=typeof ArrayBuffer=="function",l0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pd=({type:e,data:t},n,r)=>a0&&t instanceof Blob?n?r(t):c0(t,r):u0&&(t instanceof ArrayBuffer||l0(t))?n?r(t):c0(new Blob([t]),r):r(Er[e]+(t||"")),c0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function d0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let md;function T2(e,t){if(a0&&e.data instanceof Blob)return e.data.arrayBuffer().then(d0).then(t);if(u0&&(e.data instanceof ArrayBuffer||l0(e.data)))return t(d0(e.data));pd(e,!1,n=>{md||(md=new TextEncoder),t(md.encode(n))})}const f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<f0.length;e++)zo[f0.charCodeAt(e)]=e;const b2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=zo[e.charCodeAt(r)],u=zo[e.charCodeAt(r+1)],c=zo[e.charCodeAt(r+2)],d=zo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},x2=typeof ArrayBuffer=="function",gd=(e,t)=>{if(typeof e!="string")return{type:"message",data:h0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:_2(e.substring(1),t)}:xu[n]?e.length>1?{type:xu[n],data:e.substring(1)}:{type:xu[n]}:hd},_2=(e,t)=>{if(x2){const n=b2(e);return h0(n,t)}else return{base64:!0,data:e}},h0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,p0="",w2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{pd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(p0))})})},S2=(e,t)=>{const n=e.split(p0),r=[];for(let s=0;s<n.length;s++){const a=gd(n[s],t);if(r.push(a),a.type==="error")break}return r};function v2(){return new TransformStream({transform(e,t){T2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Ed;function _u(e){return e.reduce((t,n)=>t+n.length,0)}function wu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function A2(e,t){Ed||(Ed=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(_u(n)<1)break;const d=wu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(_u(n)<2)break;const d=wu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(_u(n)<8)break;const d=wu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(hd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(_u(n)<s)break;const d=wu(n,s);c.enqueue(gd(a?d:Ed.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(hd);break}}}})}const m0=4;function Pt(e){if(e)return k2(e)}function k2(e){for(var t in Pt.prototype)e[t]=Pt.prototype[t];return e}Pt.prototype.on=Pt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Pt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Pt.prototype.off=Pt.prototype.removeListener=Pt.prototype.removeAllListeners=Pt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Pt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Pt.prototype.emitReserved=Pt.prototype.emit,Pt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Pt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Su=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),zn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),N2="arraybuffer";function P7(){}function g0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const C2=zn.setTimeout,O2=zn.clearTimeout;function vu(e,t){t.useNativeTimers?(e.setTimeoutFn=C2.bind(zn),e.clearTimeoutFn=O2.bind(zn)):(e.setTimeoutFn=zn.setTimeout.bind(zn),e.clearTimeoutFn=zn.clearTimeout.bind(zn))}const I2=1.33;function P2(e){return typeof e=="string"?R2(e):Math.ceil((e.byteLength||e.size)*I2)}function R2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function E0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function L2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function D2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class M2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class yd extends Pt{constructor(t){super(),this.writable=!1,vu(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 M2(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=gd(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=L2(t);return n.length?"?"+n:""}}class F2 extends yd{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)};S2(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,w2(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]=E0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let y0=!1;try{y0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const B2=y0;function U2(){}class H2 extends F2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class yr extends Pt{constructor(t,n,r){super(),this.createRequest=t,vu(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=g0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=yr.requestsCount++,yr.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=U2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete yr.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(yr.requestsCount=0,yr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",T0);else if(typeof addEventListener=="function"){const e="onpagehide"in zn?"pagehide":"unload";addEventListener(e,T0,!1)}}function T0(){for(let e in yr.requests)yr.requests.hasOwnProperty(e)&&yr.requests[e].abort()}const j2=(function(){const e=b0({xdomain:!1});return e&&e.responseType!==null})();class $2 extends H2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=j2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new yr(b0,this.uri(),t)}}function b0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||B2))return new XMLHttpRequest}catch(n){}if(!t)try{return new zn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const x0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class z2 extends yd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=x0?{}:g0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;pd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Su(()=>{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]=E0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Td=zn.WebSocket||zn.MozWebSocket;class V2 extends z2{createSocket(t,n,r){return x0?new Td(t,n,r):n?new Td(t,n):new Td(t)}doWrite(t,n){this.ws.send(n)}}class q2 extends yd{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=A2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=v2();s.readable.pipeTo(t.writable),this._writer=s.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],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Su(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Y2={websocket:V2,webtransport:q2,polling:$2},W2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,G2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function bd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=W2.exec(e||""),a={},u=14;for(;u--;)a[G2[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=X2(a,a.path),a.queryKey=Q2(a,a.query),a}function X2(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 Q2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const xd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Au=[];xd&&addEventListener("offline",()=>{Au.forEach(e=>e())},!1);class ti extends Pt{constructor(t,n){if(super(),this.binaryType=N2,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=bd(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=bd(n.host).host);vu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=D2(this.opts.query)),xd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Au.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=m0,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&&ti.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",ti.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=P2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Su(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ti.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Au.indexOf(this._offlineEventListener);r!==-1&&Au.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ti.protocol=m0;class K2 extends ti{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;ti.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ti.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let J2=class extends K2{constructor(t,n={}){const r=typeof t=="object",s=r?H({},t):H({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>Y2[a]).filter(a=>!!a)),super(r?s:t,s)}};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=bd(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 eS=typeof ArrayBuffer=="function",tS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_0=Object.prototype.toString,nS=typeof Blob=="function"||typeof Blob!="undefined"&&_0.call(Blob)==="[object BlobConstructor]",rS=typeof File=="function"||typeof File!="undefined"&&_0.call(File)==="[object FileConstructor]";function _d(e){return eS&&(e instanceof ArrayBuffer||tS(e))||nS&&e instanceof Blob||rS&&e instanceof File}function ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ku(e[n]))return!0;return!1}if(_d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ku(e[n]))return!0;return!1}function iS(e){const t=[],n=e.data,r=e;return r.data=Nu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Nu(e,t,n){if(!e)return e;if(_d(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Nu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Nu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Nu(e[s],t));return r}return e}function sS(e,t){return e.data=wd(e.data,t),delete e.attachments,e}function wd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=wd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=wd(e[n],t));return e}const oS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(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"})(et||(et={}));class aS{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&ku(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.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=iS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Sd extends Pt{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===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new uS(n)):super.emitReserved("decoded",n)}else if(_d(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.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(!lS(c)||c<1)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 s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Sd.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 et.CONNECT:return w0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||w0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oS.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uS{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=sS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function w0(e){return Object.prototype.toString.call(e)==="[object Object]"}const cS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sd,Encoder:aS,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function tr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const dS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class S0 extends Pt{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=[tr(t,"open",this.onopen.bind(this)),tr(t,"packet",this.onpacket.bind(this)),tr(t,"error",this.onerror.bind(this)),tr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(dS.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:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let 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"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(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((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:et.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 et.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 et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.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 Cs(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}Cs.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},Cs.prototype.reset=function(){this.attempts=0},Cs.prototype.setMin=function(e){this.ms=e},Cs.prototype.setMax=function(e){this.max=e},Cs.prototype.setJitter=function(e){this.jitter=e};class vd extends Pt{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,vu(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 Cs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||cS;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new J2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=tr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=tr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(tr(t,"ping",this.onping.bind(this)),tr(t,"data",this.ondata.bind(this)),tr(t,"error",this.onerror.bind(this)),tr(t,"close",this.onclose.bind(this)),tr(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){Su(()=>{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 S0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Vo={};function Ad(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Z2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Vo[s]&&a in Vo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new vd(r,t):(Vo[s]||(Vo[s]=new vd(r,t)),d=Vo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ad,{Manager:vd,Socket:S0,io:Ad,connect:Ad});const v0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&v0.call(Blob),typeof File=="function"||typeof File!="undefined"&&v0.call(File);var A0;(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"})(A0||(A0={}));const kd="cimulate",Nd=`${kd}:pdp-update`,Cd=`${kd}:ui-state-update`,Od=`${kd}:prompts-state-update`,fS=e=>{window.addEventListener(Nd,e)},hS=e=>{window.removeEventListener(Nd,e)},pS=(e,t,n)=>{const r=new CustomEvent(Nd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class mS{constructor(){Ye(this,"initialParams",{productId:"",productName:"",pdpLink:""});Ye(this,"proxy");Ye(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ye(this,"_fullSet",(t,n,r)=>(pS(n,r),Reflect.set(t,n,r)));Ye(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const qo=new mS,k0=["ask_cim","search","browse","pdp"],N0=e=>k0.includes(e),C0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(C0)),new Map(Object.entries(C0).map(([e,t])=>[t,e]));const yt=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class gS{constructor(t=!1){Ye(this,"isDevelopment");Ye(this,"_log",(t,n,...r)=>{yt(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 ES=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!N0(e.type)){yt(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&yt(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){yt(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}qo.updateProxy(e.params);return}yt(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};let yS=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const a of r)try{a(...n)}catch(u){}const s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class TS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return Ue(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:le(H({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return Ue(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
1
+ (function(Me,Ye){typeof exports=="object"&&typeof module!="undefined"?Ye(exports):typeof define=="function"&&define.amd?define(["exports"],Ye):(Me=typeof globalThis!="undefined"?globalThis:Me||self,Ye(Me.CimulateMessaging={}))})(this,(function(Me){"use strict";var I7=Object.defineProperty,P7=Object.defineProperties;var R7=Object.getOwnPropertyDescriptors;var dd=Object.getOwnPropertySymbols;var h2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable;var zo=(Me,Ye)=>(Ye=Symbol[Me])?Ye:Symbol.for("Symbol."+Me),L7=Me=>{throw TypeError(Me)},fd=Math.pow,s0=(Me,Ye,tt)=>Ye in Me?I7(Me,Ye,{enumerable:!0,configurable:!0,writable:!0,value:tt}):Me[Ye]=tt,j=(Me,Ye)=>{for(var tt in Ye||(Ye={}))h2.call(Ye,tt)&&s0(Me,tt,Ye[tt]);if(dd)for(var tt of dd(Ye))p2.call(Ye,tt)&&s0(Me,tt,Ye[tt]);return Me},ue=(Me,Ye)=>P7(Me,R7(Ye));var _n=(Me,Ye)=>{var tt={};for(var ht in Me)h2.call(Me,ht)&&Ye.indexOf(ht)<0&&(tt[ht]=Me[ht]);if(Me!=null&&dd)for(var ht of dd(Me))Ye.indexOf(ht)<0&&p2.call(Me,ht)&&(tt[ht]=Me[ht]);return tt};var Xe=(Me,Ye,tt)=>s0(Me,typeof Ye!="symbol"?Ye+"":Ye,tt);var Fe=(Me,Ye,tt)=>new Promise((ht,Ct)=>{var Tt=bt=>{try{Jt(tt.next(bt))}catch(gn){Ct(gn)}},Ue=bt=>{try{Jt(tt.throw(bt))}catch(gn){Ct(gn)}},Jt=bt=>bt.done?ht(bt.value):Promise.resolve(bt.value).then(Tt,Ue);Jt((tt=tt.apply(Me,Ye)).next())}),Ns=function(Me,Ye){this[0]=Me,this[1]=Ye},o0=(Me,Ye,tt)=>{var ht=(Jt,bt,gn,rr)=>{try{var Ui=tt[Jt](bt),ks=(bt=Ui.value)instanceof Ns,Cs=Ui.done;Promise.resolve(ks?bt[0]:bt).then(wn=>ks?ht(Jt==="return"?Jt:"next",bt[1]?{done:wn.done,value:wn.value}:wn,gn,rr):gn({value:wn,done:Cs})).catch(wn=>ht("throw",wn,gn,rr))}catch(wn){rr(wn)}},Ct=(Jt,bt,gn,rr)=>Ue[Jt]=Ui=>(bt=new Promise((ks,Cs,wn)=>(wn=()=>ht(Jt,Ui,ks,Cs),Tt?Tt.then(wn):wn())),rr=()=>Tt===gn&&(Tt=0),Tt=gn=bt.then(rr,rr),bt),Tt,Ue={};return tt=tt.apply(Me,Ye),Ue[zo("asyncIterator")]=()=>Ue,Ct("next"),Ct("throw"),Ct("return"),Ue},a0=Me=>{var Ye=Me[zo("asyncIterator")],tt=!1,ht,Ct={};return Ye==null?(Ye=Me[zo("iterator")](),ht=Tt=>Ct[Tt]=Ue=>Ye[Tt](Ue)):(Ye=Ye.call(Me),ht=Tt=>Ct[Tt]=Ue=>{if(tt){if(tt=!1,Tt==="throw")throw Ue;return Ue}return tt=!0,{done:!1,value:new Ns(new Promise(Jt=>{var bt=Ye[Tt](Ue);bt instanceof Object||L7("Object expected"),Jt(bt)}),1)}}),Ct[zo("iterator")]=()=>Ct,ht("next"),"throw"in Ye?ht("throw"):Ct.throw=Tt=>{throw Tt},"return"in Ye&&ht("return"),Ct},m2=(Me,Ye,tt)=>(Ye=Me[zo("asyncIterator")])?Ye.call(Me):(Me=Me[zo("iterator")](),Ye={},tt=(ht,Ct)=>(Ct=Me[ht])&&(Ye[ht]=Tt=>new Promise((Ue,Jt,bt)=>(Tt=Ct.call(Me,Tt),bt=Tt.done,Promise.resolve(Tt.value).then(gn=>Ue({value:gn,done:bt}),Jt)))),tt("next"),tt("return"),Ye);var Ye=document.createElement("style");Ye.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:1rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-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-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-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{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
+ /*$vite$:1*/`,document.head.appendChild(Ye);function tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ht={exports:{}},Ct={},Tt={exports:{}},Ue={};var Jt;function bt(){if(Jt)return Ue;Jt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function A(M,J,P){this.props=M,this.context=J,this.refs=v,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,J){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,J,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function w(){}w.prototype=A.prototype;function k(M,J,P){this.props=M,this.context=J,this.refs=v,this.updater=P||y}var I=k.prototype=new w;I.constructor=k,b(I,A.prototype),I.isPureReactComponent=!0;var U=Array.isArray,G=Object.prototype.hasOwnProperty,L={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function ie(M,J,P){var Ae,Ce={},ge=null,Le=null;if(J!=null)for(Ae in J.ref!==void 0&&(Le=J.ref),J.key!==void 0&&(ge=""+J.key),J)G.call(J,Ae)&&!V.hasOwnProperty(Ae)&&(Ce[Ae]=J[Ae]);var je=arguments.length-2;if(je===1)Ce.children=P;else if(1<je){for(var Ke=Array(je),pt=0;pt<je;pt++)Ke[pt]=arguments[pt+2];Ce.children=Ke}if(M&&M.defaultProps)for(Ae in je=M.defaultProps,je)Ce[Ae]===void 0&&(Ce[Ae]=je[Ae]);return{$$typeof:e,type:M,key:ge,ref:Le,props:Ce,_owner:L.current}}function le(M,J){return{$$typeof:e,type:M.type,key:J,ref:M.ref,props:M.props,_owner:M._owner}}function z(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function oe(M){var J={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(P){return J[P]})}var te=/\/+/g;function fe(M,J){return typeof M=="object"&&M!==null&&M.key!=null?oe(""+M.key):J.toString(36)}function he(M,J,P,Ae,Ce){var ge=typeof M;(ge==="undefined"||ge==="boolean")&&(M=null);var Le=!1;if(M===null)Le=!0;else switch(ge){case"string":case"number":Le=!0;break;case"object":switch(M.$$typeof){case e:case t:Le=!0}}if(Le)return Le=M,Ce=Ce(Le),M=Ae===""?"."+fe(Le,0):Ae,U(Ce)?(P="",M!=null&&(P=M.replace(te,"$&/")+"/"),he(Ce,J,P,"",function(pt){return pt})):Ce!=null&&(z(Ce)&&(Ce=le(Ce,P+(!Ce.key||Le&&Le.key===Ce.key?"":(""+Ce.key).replace(te,"$&/")+"/")+M)),J.push(Ce)),1;if(Le=0,Ae=Ae===""?".":Ae+":",U(M))for(var je=0;je<M.length;je++){ge=M[je];var Ke=Ae+fe(ge,je);Le+=he(ge,J,P,Ke,Ce)}else if(Ke=x(M),typeof Ke=="function")for(M=Ke.call(M),je=0;!(ge=M.next()).done;)ge=ge.value,Ke=Ae+fe(ge,je++),Le+=he(ge,J,P,Ke,Ce);else if(ge==="object")throw J=String(M),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Le}function de(M,J,P){if(M==null)return M;var Ae=[],Ce=0;return he(M,Ae,"","",function(ge){return J.call(P,ge,Ce++)}),Ae}function we(M){if(M._status===-1){var J=M._result;J=J(),J.then(function(P){(M._status===0||M._status===-1)&&(M._status=1,M._result=P)},function(P){(M._status===0||M._status===-1)&&(M._status=2,M._result=P)}),M._status===-1&&(M._status=0,M._result=J)}if(M._status===1)return M._result.default;throw M._result}var ce={current:null},W={transition:null},re={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:W,ReactCurrentOwner:L};function N(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:de,forEach:function(M,J,P){de(M,function(){J.apply(this,arguments)},P)},count:function(M){var J=0;return de(M,function(){J++}),J},toArray:function(M){return de(M,function(J){return J})||[]},only:function(M){if(!z(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Ue.Component=A,Ue.Fragment=n,Ue.Profiler=s,Ue.PureComponent=k,Ue.StrictMode=r,Ue.Suspense=d,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Ue.act=N,Ue.cloneElement=function(M,J,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var Ae=b({},M.props),Ce=M.key,ge=M.ref,Le=M._owner;if(J!=null){if(J.ref!==void 0&&(ge=J.ref,Le=L.current),J.key!==void 0&&(Ce=""+J.key),M.type&&M.type.defaultProps)var je=M.type.defaultProps;for(Ke in J)G.call(J,Ke)&&!V.hasOwnProperty(Ke)&&(Ae[Ke]=J[Ke]===void 0&&je!==void 0?je[Ke]:J[Ke])}var Ke=arguments.length-2;if(Ke===1)Ae.children=P;else if(1<Ke){je=Array(Ke);for(var pt=0;pt<Ke;pt++)je[pt]=arguments[pt+2];Ae.children=je}return{$$typeof:e,type:M.type,key:Ce,ref:ge,props:Ae,_owner:Le}},Ue.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},Ue.createElement=ie,Ue.createFactory=function(M){var J=ie.bind(null,M);return J.type=M,J},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(M){return{$$typeof:l,render:M}},Ue.isValidElement=z,Ue.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:we}},Ue.memo=function(M,J){return{$$typeof:f,type:M,compare:J===void 0?null:J}},Ue.startTransition=function(M){var J=W.transition;W.transition={};try{M()}finally{W.transition=J}},Ue.unstable_act=N,Ue.useCallback=function(M,J){return ce.current.useCallback(M,J)},Ue.useContext=function(M){return ce.current.useContext(M)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(M){return ce.current.useDeferredValue(M)},Ue.useEffect=function(M,J){return ce.current.useEffect(M,J)},Ue.useId=function(){return ce.current.useId()},Ue.useImperativeHandle=function(M,J,P){return ce.current.useImperativeHandle(M,J,P)},Ue.useInsertionEffect=function(M,J){return ce.current.useInsertionEffect(M,J)},Ue.useLayoutEffect=function(M,J){return ce.current.useLayoutEffect(M,J)},Ue.useMemo=function(M,J){return ce.current.useMemo(M,J)},Ue.useReducer=function(M,J,P){return ce.current.useReducer(M,J,P)},Ue.useRef=function(M){return ce.current.useRef(M)},Ue.useState=function(M){return ce.current.useState(M)},Ue.useSyncExternalStore=function(M,J,P){return ce.current.useSyncExternalStore(M,J,P)},Ue.useTransition=function(){return ce.current.useTransition()},Ue.version="18.3.1",Ue}var gn;function rr(){return gn||(gn=1,Tt.exports=bt()),Tt.exports}var Ui;function ks(){if(Ui)return Ct;Ui=1;var e=rr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},x=null,y=null;f!==void 0&&(x=""+f),d.key!==void 0&&(x=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:x,ref:y,props:m,_owner:s.current}}return Ct.Fragment=n,Ct.jsx=u,Ct.jsxs=u,Ct}var Cs;function wn(){return Cs||(Cs=1,ht.exports=ks()),ht.exports}var _=wn(),D=rr();const Hi=tt(D),br=Object.create(null);br.open="0",br.close="1",br.ping="2",br.pong="3",br.message="4",br.upgrade="5",br.noop="6";const _u=Object.create(null);Object.keys(br).forEach(e=>{_u[br[e]]=e});const hd={type:"error",data:"parser error"},u0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",l0=typeof ArrayBuffer=="function",c0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pd=({type:e,data:t},n,r)=>u0&&t instanceof Blob?n?r(t):d0(t,r):l0&&(t instanceof ArrayBuffer||c0(t))?n?r(t):d0(new Blob([t]),r):r(br[e]+(t||"")),d0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function f0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let md;function T2(e,t){if(u0&&e.data instanceof Blob)return e.data.arrayBuffer().then(f0).then(t);if(l0&&(e.data instanceof ArrayBuffer||c0(e.data)))return t(f0(e.data));pd(e,!1,n=>{md||(md=new TextEncoder),t(md.encode(n))})}const h0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<h0.length;e++)Vo[h0.charCodeAt(e)]=e;const b2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Vo[e.charCodeAt(r)],u=Vo[e.charCodeAt(r+1)],l=Vo[e.charCodeAt(r+2)],d=Vo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|l>>2,p[s++]=(l&3)<<6|d&63;return f},x2=typeof ArrayBuffer=="function",gd=(e,t)=>{if(typeof e!="string")return{type:"message",data:p0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:_2(e.substring(1),t)}:_u[n]?e.length>1?{type:_u[n],data:e.substring(1)}:{type:_u[n]}:hd},_2=(e,t)=>{if(x2){const n=b2(e);return p0(n,t)}else return{base64:!0,data:e}},p0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,m0="",w2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{pd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(m0))})})},S2=(e,t)=>{const n=e.split(m0),r=[];for(let s=0;s<n.length;s++){const a=gd(n[s],t);if(r.push(a),a.type==="error")break}return r};function v2(){return new TransformStream({transform(e,t){T2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Ed;function wu(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 s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function A2(e,t){Ed||(Ed=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(wu(n)<1)break;const d=Su(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(wu(n)<2)break;const d=Su(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(wu(n)<8)break;const d=Su(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(hd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(wu(n)<s)break;const d=Su(n,s);l.enqueue(gd(a?d:Ed.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(hd);break}}}})}const g0=4;function Ft(e){if(e)return N2(e)}function N2(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Yn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),k2="arraybuffer";function D7(){}function E0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const C2=Yn.setTimeout,O2=Yn.clearTimeout;function Au(e,t){t.useNativeTimers?(e.setTimeoutFn=C2.bind(Yn),e.clearTimeoutFn=O2.bind(Yn)):(e.setTimeoutFn=Yn.setTimeout.bind(Yn),e.clearTimeoutFn=Yn.clearTimeout.bind(Yn))}const I2=1.33;function P2(e){return typeof e=="string"?R2(e):Math.ceil((e.byteLength||e.size)*I2)}function R2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function y0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function L2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function D2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class M2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class yd extends Ft{constructor(t){super(),this.writable=!1,Au(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 M2(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=gd(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=L2(t);return n.length?"?"+n:""}}class F2 extends yd{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)};S2(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,w2(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]=y0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let T0=!1;try{T0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const B2=T0;function U2(){}class H2 extends F2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class xr extends Ft{constructor(t,n,r){super(),this.createRequest=t,Au(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=E0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=xr.requestsCount++,xr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=U2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete xr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(xr.requestsCount=0,xr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",b0);else if(typeof addEventListener=="function"){const e="onpagehide"in Yn?"pagehide":"unload";addEventListener(e,b0,!1)}}function b0(){for(let e in xr.requests)xr.requests.hasOwnProperty(e)&&xr.requests[e].abort()}const j2=(function(){const e=x0({xdomain:!1});return e&&e.responseType!==null})();class $2 extends H2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=j2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xr(x0,this.uri(),t)}}function x0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||B2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Yn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const _0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class z2 extends yd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=_0?{}:E0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;pd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&vu(()=>{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]=y0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Td=Yn.WebSocket||Yn.MozWebSocket;class V2 extends z2{createSocket(t,n,r){return _0?new Td(t,n,r):n?new Td(t,n):new Td(t)}doWrite(t,n){this.ws.send(n)}}class q2 extends yd{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=A2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=v2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Y2={websocket:V2,webtransport:q2,polling:$2},W2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,G2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function bd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=W2.exec(e||""),a={},u=14;for(;u--;)a[G2[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=X2(a,a.path),a.queryKey=Q2(a,a.query),a}function X2(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 Q2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const xd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nu=[];xd&&addEventListener("offline",()=>{Nu.forEach(e=>e())},!1);class ii extends Ft{constructor(t,n){if(super(),this.binaryType=k2,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=bd(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=bd(n.host).host);Au(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=D2(this.opts.query)),xd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=g0,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&&ii.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",ii.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=P2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ii.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nu.indexOf(this._offlineEventListener);r!==-1&&Nu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ii.protocol=g0;class K2 extends ii{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;ii.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ii.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 x=new Error("probe error");x.transport=n.name,this.emitReserved("upgradeError",x)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const x=new Error("probe error: "+m);x.transport=n.name,a(),this.emitReserved("upgradeError",x)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let J2=class extends K2{constructor(t,n={}){const r=typeof t=="object",s=r?j({},t):j({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>Y2[a]).filter(a=>!!a)),super(r?s:t,s)}};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=bd(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 eS=typeof ArrayBuffer=="function",tS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,w0=Object.prototype.toString,nS=typeof Blob=="function"||typeof Blob!="undefined"&&w0.call(Blob)==="[object BlobConstructor]",rS=typeof File=="function"||typeof File!="undefined"&&w0.call(File)==="[object FileConstructor]";function _d(e){return eS&&(e instanceof ArrayBuffer||tS(e))||nS&&e instanceof Blob||rS&&e instanceof File}function ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ku(e[n]))return!0;return!1}if(_d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ku(e[n]))return!0;return!1}function iS(e){const t=[],n=e.data,r=e;return r.data=Cu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Cu(e,t,n){if(!e)return e;if(_d(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Cu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Cu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Cu(e[s],t));return r}return e}function sS(e,t){return e.data=wd(e.data,t),delete e.attachments,e}function wd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=wd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=wd(e[n],t));return e}const oS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var rt;(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"})(rt||(rt={}));class aS{constructor(t){this.replacer=t}encode(t){return(t.type===rt.EVENT||t.type===rt.ACK)&&ku(t)?this.encodeAsBinary({type:t.type===rt.EVENT?rt.BINARY_EVENT:rt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===rt.BINARY_EVENT||t.type===rt.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=iS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Sd extends Ft{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===rt.BINARY_EVENT;r||n.type===rt.BINARY_ACK?(n.type=r?rt.EVENT:rt.ACK,this.reconstructor=new uS(n)):super.emitReserved("decoded",n)}else if(_d(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(rt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===rt.BINARY_EVENT||r.type===rt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!lS(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Sd.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 rt.CONNECT:return S0(n);case rt.DISCONNECT:return n===void 0;case rt.CONNECT_ERROR:return typeof n=="string"||S0(n);case rt.EVENT:case rt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oS.indexOf(n[0])===-1);case rt.ACK:case rt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uS{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=sS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function S0(e){return Object.prototype.toString.call(e)==="[object Object]"}const cS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sd,Encoder:aS,get PacketType(){return rt}},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const dS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class v0 extends Ft{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=[ir(t,"open",this.onopen.bind(this)),ir(t,"packet",this.onpacket.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(dS.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:rt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},s),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,l)=>u?s(u):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:rt.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 rt.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 rt.EVENT:case rt.BINARY_EVENT:this.onevent(t);break;case rt.ACK:case rt.BINARY_ACK:this.onack(t);break;case rt.DISCONNECT:this.ondisconnect();break;case rt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:rt.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:rt.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 Os(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}Os.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},Os.prototype.reset=function(){this.attempts=0},Os.prototype.setMin=function(e){this.ms=e},Os.prototype.setMax=function(e){this.max=e},Os.prototype.setJitter=function(e){this.jitter=e};class vd extends Ft{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,Au(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 Os({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||cS;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new J2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=ir(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=ir(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ir(t,"ping",this.onping.bind(this)),ir(t,"data",this.ondata.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this)),ir(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){vu(()=>{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 v0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const qo={};function Ad(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Z2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=qo[s]&&a in qo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new vd(r,t):(qo[s]||(qo[s]=new vd(r,t)),d=qo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ad,{Manager:vd,Socket:v0,io:Ad,connect:Ad});const A0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&A0.call(Blob),typeof File=="function"||typeof File!="undefined"&&A0.call(File);var N0;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(N0||(N0={}));const Nd="cimulate",kd=`${Nd}:pdp-update`,Cd=`${Nd}:ui-state-update`,Od=`${Nd}:prompts-state-update`,fS=e=>{window.addEventListener(kd,e)},hS=e=>{window.removeEventListener(kd,e)},pS=(e,t,n)=>{const r=new CustomEvent(kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class mS{constructor(){Xe(this,"initialParams",{productId:"",productName:"",pdpLink:""});Xe(this,"proxy");Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>(pS(n,r),Reflect.set(t,n,r)));Xe(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Yo=new mS,k0=["ask_cim","search","browse","pdp"],C0=e=>k0.includes(e),O0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(O0)),new Map(Object.entries(O0).map(([e,t])=>[t,e]));const xt=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class gS{constructor(t=!1){Xe(this,"isDevelopment");Xe(this,"_log",(t,n,...r)=>{xt(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 ES=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!C0(e.type)){xt(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&xt(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){xt(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Yo.updateProxy(e.params);return}xt(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};let yS=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const a of r)try{a(...n)}catch(u){}const s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class TS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return Fe(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:ue(j({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return Fe(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let l;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
3
3
  `).replace(/\r/g,`
4
- `);(c=s.indexOf(`
4
+ `);(l=s.indexOf(`
5
5
 
6
- `))>=0;){const d=s.slice(0,c);s=s.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(`
6
+ `))>=0;){const d=s.slice(0,l);s=s.slice(l+2),this.parseFrame(d)}}}catch(a){return a instanceof DOMException&&a.name==="AbortError"?void this.logger.debug("SSE stream aborted (intentional disconnect)"):(this.logger.error("SSE stream error:",a),this.reading=!1,void this.onClose(a instanceof Error?a.message:"Unknown stream error"))}finally{n.releaseLock()}this.reading=!1,this.logger.info("SSE stream ended"),this.onClose("stream_ended")})}parseFrame(t){let n="message";const r=[];for(const a of t.split(`
7
7
  `))if(a.startsWith("event:"))n=a.slice(6).trim();else if(a.startsWith("data:")){const u=a.slice(5);r.push(u.startsWith(" ")?u.slice(1):u)}else a.startsWith(":");if(r.length===0)return;const s=r.join(`
8
- `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Fr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let bS=class extends Fr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class O0 extends Fr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Id=class extends Fr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class xS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}const _S="0Mw";let wS=class extends yS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,c,d,f,p,m,b;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(c=s.timeout)!=null?c:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(b=s.capabilitiesVersion)!=null?b:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new xS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return Ue(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return Ue(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return Ue(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Fr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return Ue(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return Ue(this,null,function*(){var u,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(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);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 Ue(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return Ue(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Fr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Fr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Ue(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return Ue(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new TS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>Ue(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var 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 s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s,messagingSessionId:this.extractMessagingSessionId(n)})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),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 f=this.getNestedString(c,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(c,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",H(H(H({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,c,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var v,w,N;const b=p.participant,y=p.displayName||(b==null?void 0:b.displayName)||((v=t.conversationEntry)==null?void 0:v.senderDisplayName)||"Agent",x=(b==null?void 0:b.role)||((N=(w=t.conversationEntry)==null?void 0:w.sender)==null?void 0:N.role)||"",A=p.operation||p.event||"";this.emit("participant_changed",H({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(A)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((c=n.participant)==null?void 0:c.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",H({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return Ue(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new Id("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return Ue(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=H({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!m.ok){const b=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new 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 bS(`Request ${t} ${n} failed (${m.status}): ${b}`,m.status,b)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(c),d instanceof Fr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new O0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new O0(`Network error: ${d.message}`,u,{cause:d})}throw new Fr(`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 Fr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}extractMessagingSessionId(t){var n;return(n=t.relatedRecords)==null?void 0:n.find(r=>r.startsWith(_S))}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}};const I0="onCimulateWidgetReady",O="cim-widget",Rn=`--${O}`,ni={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},SS=(e=ni)=>({[`${Rn}-primary-color`]:e.primaryColor||ni.primaryColor,[`${Rn}-secondary-color`]:e.secondaryColor||ni.secondaryColor,[`${Rn}-font-color`]:e.fontColor||ni.fontColor,[`${Rn}-font-family`]:e.fontFamily||ni.fontFamily,[`${Rn}-background-color`]:e.backgroundColor||ni.backgroundColor,[`${Rn}-border-color`]:e.borderColor||ni.borderColor,[`${Rn}-border-radius`]:e.borderRadius||ni.borderRadius});class vS{constructor(){Ye(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}});Ye(this,"connectedProxy");Ye(this,"modeProxy");Ye(this,"entryTypeProxy");Ye(this,"statusProxy");Ye(this,"dialogProxy");Ye(this,"modalProxy",{isFullscreen:!1});Ye(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ye(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return NS(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 it=new vS,AS=e=>{window.addEventListener(Cd,e)},kS=e=>{window.removeEventListener(Cd,e)},NS=(e,t)=>{const n=new CustomEvent(Cd,{detail:{property:e,value:t}});window.dispatchEvent(n)},CS=e=>{it.connectedProxy.connected=e},P0=e=>{if(!N0(e)){const t=k0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}it.entryTypeProxy.entryType=e},Br=e=>{const t=it.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;it.statusProxy.isOpen=n,n&&(it.statusProxy.isMinimized=!1)},Cu=e=>{const t=it.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;it.statusProxy.isMinimized=n,n&&(it.statusProxy.isOpen=!1)},Pd=e=>{it.modalProxy.isFullscreen=e},Ou=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);it.statusProxy.type=e,e==="dialog"||e==="chat"?it.modeProxy.mode="embedded":it.modeProxy.mode="standalone"},Rd=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(", ")}.`);it.dialogProxy.position=e},OS=e=>{const t=it.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;it.dialogProxy.isFullHeight=n};function R0(e,t){return function(){return e.apply(t,arguments)}}const{toString:IS}=Object.prototype,{getPrototypeOf:Os}=Object,{iterator:Yo,toStringTag:L0}=Symbol,Iu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wo=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Iu(n,t))return!0;n=Os(n)}return!1},PS=(e,t)=>e!=null&&Wo(e,t)?e[t]:void 0,Ld=(e=>t=>{const n=IS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nr=e=>(e=e.toLowerCase(),t=>Ld(t)===e),Pu=e=>t=>typeof t===e,{isArray:Fi}=Array,Is=Pu("undefined");function Ps(e){return e!==null&&!Is(e)&&e.constructor!==null&&!Is(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const D0=nr("ArrayBuffer");function RS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&D0(e.buffer),t}const LS=Pu("string"),bn=Pu("function"),M0=Pu("number"),Rs=e=>e!==null&&typeof e=="object",DS=e=>e===!0||e===!1,Ru=e=>{if(!Rs(e))return!1;const t=Os(e);return(t===null||t===Object.prototype||Os(t)===null)&&!Wo(e,L0)&&!Wo(e,Yo)},MS=e=>{if(!Rs(e)||Ps(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},FS=nr("Date"),BS=nr("File"),US=e=>!!(e&&typeof e.uri!="undefined"),HS=e=>e&&typeof e.getParts!="undefined",jS=nr("Blob"),$S=nr("FileList"),zS=e=>Rs(e)&&bn(e.pipe);function VS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const F0=VS(),B0=typeof F0.FormData!="undefined"?F0.FormData:void 0,qS=e=>{if(!e)return!1;if(B0&&e instanceof B0)return!0;const t=Os(e);if(!t||t===Object.prototype||!bn(e.append))return!1;const n=Ld(e);return n==="formdata"||n==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"},YS=nr("URLSearchParams"),[WS,GS,XS,QS]=["ReadableStream","Request","Response","Headers"].map(nr),KS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Go(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Ps(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 U0(e,t){if(Ps(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,H0=e=>!Is(e)&&e!==Bi;function Dd(...e){const{caseless:t,skipUndefined:n}=H0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&U0(r,u)||u,d=Iu(r,c)?r[c]:void 0;Ru(d)&&Ru(a)?r[c]=Dd(d,a):Ru(a)?r[c]=Dd({},a):Fi(a)?r[c]=a.slice():(!n||!Is(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Ps(c)||(Go(c,s),typeof c!="object"||Fi(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];lv.call(c,p)&&s(c[p],p)}}return r}const JS=(e,t,n,{allOwnKeys:r}={})=>(Go(t,(s,a)=>{n&&bn(s)?Object.defineProperty(e,a,{__proto__:null,value:R0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ZS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ev=(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)},tv=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&Os(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nv=(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},rv=e=>{if(!e)return null;if(Fi(e))return e;let t=e.length;if(!M0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},iv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Os(Uint8Array)),sv=(e,t)=>{const r=(e&&e[Yo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},ov=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},av=nr("HTMLFormElement"),uv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:lv}=Object.prototype,cv=nr("RegExp"),j0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Go(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},dv=e=>{j0(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(bn(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+"'")})}})},fv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fi(e)?r(e):r(String(e).split(t)),n},hv=()=>{},pv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mv(e){return!!(e&&bn(e.append)&&e[L0]==="FormData"&&e[Yo])}const gv=e=>{const t=new WeakSet,n=r=>{if(Rs(r)){if(t.has(r))return;if(Ps(r))return r;if(!("toJSON"in r)){t.add(r);const s=Fi(r)?[]:{};return Go(r,(a,u)=>{const c=n(a);!Is(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},Ev=nr("AsyncFunction"),yv=e=>e&&(Rs(e)||bn(e))&&bn(e.then)&&bn(e.catch),$0=((e,t)=>e?setImmediate:t?((n,r)=>(Bi.addEventListener("message",({source:s,data:a})=>{s===Bi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(Bi.postMessage)),Tv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bi):typeof process!="undefined"&&process.nextTick||$0,z0=e=>e!=null&&bn(e[Yo]),q={isArray:Fi,isArrayBuffer:D0,isBuffer:Ps,isFormData:qS,isArrayBufferView:RS,isString:LS,isNumber:M0,isBoolean:DS,isObject:Rs,isPlainObject:Ru,isEmptyObject:MS,isReadableStream:WS,isRequest:GS,isResponse:XS,isHeaders:QS,isUndefined:Is,isDate:FS,isFile:BS,isReactNativeBlob:US,isReactNative:HS,isBlob:jS,isRegExp:cv,isFunction:bn,isStream:zS,isURLSearchParams:YS,isTypedArray:iv,isFileList:$S,forEach:Go,merge:Dd,extend:JS,trim:KS,stripBOM:ZS,inherits:ev,toFlatObject:tv,kindOf:Ld,kindOfTest:nr,endsWith:nv,toArray:rv,forEachEntry:sv,matchAll:ov,isHTMLForm:av,hasOwnProperty:Iu,hasOwnProp:Iu,hasOwnInPrototypeChain:Wo,getSafeProp:PS,reduceDescriptors:j0,freezeMethods:dv,toObjectSet:fv,toCamelCase:uv,noop:hv,toFiniteNumber:pv,findKey:U0,global:Bi,isContextDefined:H0,isSpecCompliantForm:mv,toJSONObject:gv,isAsyncFn:Ev,isThenable:yv,setImmediate:$0,asap:Tv,isIterable:z0,isSafeIterable:e=>e!=null&&Wo(e,Yo)&&z0(e)},bv=q.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"]),xv=e=>{const t={};let n,r,s;return e&&e.split(`
9
- `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&bv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function _v(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 wv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Sv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Md(e,t){return q.isArray(e)?e.map(n=>Md(n,t)):_v(String(e).replace(t,""))}const vv=e=>Md(e,wv),Av=e=>Md(e,Sv);function V0(e){const t=Object.create(null);return q.forEach(e.toJSON(),(n,r)=>{t[r]=Av(n)}),t}const q0=Symbol("internals");function Xo(e){return e&&String(e).trim().toLowerCase()}function Lu(e){return e===!1||e==null?e:q.isArray(e)?e.map(Lu):vv(String(e))}function kv(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 Nv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fd(e,t,n,r,s){if(q.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function Cv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ov(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let nn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=Xo(d);if(!p)return;const m=q.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=Lu(c))}const u=(c,d)=>q.forEach(c,(f,p)=>a(f,p,d));if(q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(q.isString(t)&&(t=t.trim())&&!Nv(t))u(xv(t),n);else if(q.isObject(t)&&q.isSafeIterable(t)){let c=Object.create(null),d,f;for(const p of t){if(!q.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],q.hasOwnProp(c,f)?(d=c[f],c[f]=q.isArray(d)?[...d,p[1]]:[d,p[1]]):c[f]=p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Xo(t),t){const r=q.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return kv(s);if(q.isFunction(n))return n.call(this,s,r);if(q.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Xo(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=Xo(u),u){const c=q.findKey(r,u);c&&(!n||Fd(r,r[c],c,n))&&(delete r[c],s=!0)}}return q.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||Fd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return q.forEach(this,(s,a)=>{const u=q.findKey(r,a);if(u){n[u]=Lu(s),delete n[a];return}const c=t?Cv(a):String(a).trim();c!==a&&delete n[a],n[c]=Lu(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
10
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[q0]=this[q0]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=Xo(u);r[c]||(Ov(s,u),r[c]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};nn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(nn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(nn);const Iv="[REDACTED ****]";function Pv(e){if(q.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Rv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||q.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof nn&&(a=a.toJSON()),r.push(a);let u;if(q.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);q.isUndefined(f)||(u[d]=f)});else{if(!q.isPlainObject(a)&&Pv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?Iv:s(d);q.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let Ne=class g2 extends Error{static from(t,n,r,s,a,u){const c=new g2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&q.hasOwnProp(t,"redact")?t.redact:void 0,r=q.isArray(n)&&n.length>0?Rv(t,n):q.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Lv=null,Y0=100;function Bd(e){return q.isPlainObject(e)||q.isArray(e)}function W0(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Ud(e,t,n){return e?e.concat(t).map(function(s,a){return s=W0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Dv(e){return q.isArray(e)&&!e.some(Bd)}const Mv=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Du(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,C){return!q.isUndefined(C[N])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?Y0:n.maxDepth,f=c&&q.isSpecCompliantForm(t),p=[];if(!q.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if(q.isDate(w))return w.toISOString();if(q.isBoolean(w))return w.toString();if(!f&&q.isBlob(w))throw new Ne("Blob is not supported. Use a Buffer instead.");if(q.isArrayBuffer(w)||q.isTypedArray(w)){if(f&&typeof c=="function")return new c([w]);if(typeof Buffer!="undefined")return Buffer.from(w);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return w}function b(w){if(w>d)throw new Ne("Object is too deeply nested ("+w+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,N){if(d===1/0)return JSON.stringify(w);const C=[];return JSON.stringify(w,function(X,L){if(!q.isObject(L))return L;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(L),b(N+C.length-1),L})}function x(w,N,C){let j=w;if(q.isReactNative(t)&&q.isReactNativeBlob(w))return t.append(Ud(C,N,a),m(w)),!1;if(w&&!C&&typeof w=="object"){if(q.endsWith(N,"{}"))N=r?N:N.slice(0,-2),w=y(w,1);else if(q.isArray(w)&&Dv(w)||(q.isFileList(w)||q.endsWith(N,"[]"))&&(j=q.toArray(w)))return N=W0(N),j.forEach(function(L,G){!(q.isUndefined(L)||L===null)&&t.append(u===!0?Ud([N],G,a):u===null?N:N+"[]",m(L))}),!1}return Bd(w)?!0:(t.append(Ud(C,N,a),m(w)),!1)}const A=Object.assign(Mv,{defaultVisitor:x,convertValue:m,isVisitable:Bd});function v(w,N,C=0){if(!q.isUndefined(w)){if(b(C),p.indexOf(w)!==-1)throw new Error("Circular reference detected in "+N.join("."));p.push(w),q.forEach(w,function(X,L){(!(q.isUndefined(X)||X===null)&&s.call(t,X,q.isString(L)?L.trim():L,N,A))===!0&&v(X,N?N.concat(L):[L],C+1)}),p.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return v(e),t}function G0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Hd(e,t){this._pairs=[],e&&Du(e,this,t)}const X0=Hd.prototype;X0.append=function(t,n){this._pairs.push([t,n])},X0.toString=function(t){const n=t?r=>t.call(this,r,G0):G0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Fv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Q0(e,t,n){if(!t)return e;e=e||"";const r=q.isFunction(n)?{serialize:n}:n,s=q.getSafeProp(r,"encode")||Fv,a=q.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=q.isURLSearchParams(t)?t.toString():new Hd(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class K0{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){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Bv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Hd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},$d=typeof window!="undefined"&&typeof document!="undefined",zd=typeof navigator=="object"&&navigator||void 0,Uv=$d&&(!zd||["ReactNative","NativeScript","NS"].indexOf(zd.product)<0),Hv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jv=$d&&window.location.href||"http://localhost",Xt=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$d,hasStandardBrowserEnv:Uv,hasStandardBrowserWebWorkerEnv:Hv,navigator:zd,origin:jv},Symbol.toStringTag,{value:"Module"}))),Bv);function $v(e,t){return Du(e,new Xt.classes.URLSearchParams,H({visitor:function(n,r,s,a){return Xt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const J0=Y0;function Z0(e){if(e>J0)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+J0,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function zv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Vv(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function eg(e){function t(n,r,s,a){Z0(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&q.isArray(s)?s.length:u,d?(q.hasOwnProp(s,u)?s[u]=q.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!q.hasOwnProp(s,u)||!q.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&q.isArray(s[u])&&(s[u]=Vv(s[u])),!c)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,s)=>{t(zv(r),s,n,0)}),n}return null}const Ls=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function qv(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qo={transitional:jd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=q.isObject(t);if(a&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return s?JSON.stringify(eg(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Ls(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return $v(t,d).toString();if((c=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Ls(this,"env"),p=f&&f.FormData;return Du(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),qv(t)):t}],transformResponse:[function(t){const n=Ls(this,"transitional")||Qo.transitional,r=n&&n.forcedJSONParsing,s=Ls(this,"responseType"),a=s==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Ls(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Ls(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xt.classes.FormData,Blob:Xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch","query"],e=>{Qo.headers[e]={}});function Vd(e,t){const n=this||Qo,r=t||n,s=nn.from(r.headers);let a=r.data;return q.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function tg(e){return!!(e&&e.__CANCEL__)}let Ko=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ng(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function Yv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Wv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function Gv(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const Mu=(e,t,n=3)=>{let r=0;const s=Wv(50,250);return Gv(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,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},rg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ig=e=>(...t)=>q.asap(()=>e(...t)),Xv=Xt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Xt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Xt.origin),Xt.navigator&&/(msie|trident)/i.test(Xt.navigator.userAgent)):()=>!0,Qv=Xt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&c.push(`path=${r}`),q.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),q.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+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Kv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Zv=/^https?:(?!\/\/)/i,eA=/[\t\n\r]/g;function tA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function nA(e){return tA(e).replace(eA,"")}function sg(e,t){if(typeof e=="string"&&Zv.test(nA(e)))throw new Ne('Invalid URL: missing "//" after protocol',Ne.ERR_INVALID_URL,t)}function og(e,t,n,r){sg(t,r);let s=!Kv(t);return e&&(s||n===!1)?(sg(e,r),Jv(e,t)):t}const ag=e=>e instanceof nn?H({},e):e;function Ui(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,b,y){return q.isPlainObject(p)&&q.isPlainObject(m)?q.merge.call({caseless:y},p,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function s(p,m,b,y){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!q.isUndefined(m))return r(void 0,m)}function u(p,m){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=q.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!q.isUndefined(m))if(q.isPlainObject(m)){if(q.hasOwnProp(m,p))return m[p]}else return;const b=q.hasOwnProp(e,"transitional")?e.transitional:void 0;if(q.isPlainObject(b)&&q.hasOwnProp(b,p))return b[p]}function d(p,m,b){if(q.hasOwnProp(t,b))return r(p,m);if(q.hasOwnProp(e,b))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,b)=>s(ag(p),ag(m),b,!0)};return q.forEach(Object.keys(H(H({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=q.hasOwnProp(f,m)?f[m]:s,y=q.hasOwnProp(e,m)?e[m]:void 0,x=q.hasOwnProp(t,m)?t[m]:void 0,A=b(y,x,m);q.isUndefined(A)&&b!==d||(n[m]=A)}),q.hasOwnProp(t,"validateStatus")&&q.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(q.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const rA=["content-type","content-length"];function iA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{rA.includes(r.toLowerCase())&&e.set(r,s)})}const sA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function ug(e){const t=Ui({},e),n=b=>q.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=nn.from(c),t.url=Q0(og(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=q.getSafeProp(d,"username")||"",y=q.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(b+":"+(y?sA(y):"")))}catch(x){throw Ne.from(x,Ne.ERR_BAD_OPTION_VALUE,e)}}if(q.isFormData(r)&&(Xt.hasStandardBrowserEnv||Xt.hasStandardBrowserWebWorkerEnv||q.isReactNative(r)?c.setContentType(void 0):q.isFunction(r.getHeaders)&&iA(c,r.getHeaders(),n("formDataHeaderPolicy"))),Xt.hasStandardBrowserEnv&&(q.isFunction(s)&&(s=s(t)),s===!0||s==null&&Xv(t.url))){const y=a&&u&&Qv.read(u);y&&c.set(a,y)}return t}const oA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=ug(e);let a=s.data;const u=nn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,x;function A(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function w(){if(!v)return;const C=nn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};ng(function(G){n(G),A()},function(G){r(G),A()},X),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(w)},v.onabort=function(){v&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,v)),A(),v=null)},v.onerror=function(j){const X=j&&j.message?j.message:"Network Error",L=new Ne(X,Ne.ERR_NETWORK,e,v);L.event=j||null,r(L),A(),v=null},v.ontimeout=function(){let j=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const X=s.transitional||jd;s.timeoutErrorMessage&&(j=s.timeoutErrorMessage),r(new Ne(j,X.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,v)),A(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&q.forEach(V0(u),function(j,X){v.setRequestHeader(X,j)}),q.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([b,x]=Mu(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([m,y]=Mu(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new Ko(null,e,v):C),v.abort(),A(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const N=Yv(s.url);if(N&&!Xt.protocols.includes(N)){r(new Ne("Unsupported protocol "+N+":",Ne.ERR_BAD_REQUEST,e)),A();return}v.send(a||null)})},aA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new Ko(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>q.asap(u),c},uA=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},lA=function(e,t){return s0(this,null,function*(){try{for(var n=m2(cA(e)),r,s,a;r=!(s=yield new As(n.next())).done;r=!1){const u=s.value;yield*o0(uA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new As(s.call(n)))}finally{if(a)throw a[0]}}})},cA=function(e){return s0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*o0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new As(t.read());if(n)break;yield r}}finally{yield new As(t.cancel())}})},lg=(e,t,n,r)=>{const s=lA(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ue(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},Fu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,dA=(e,t,n)=>t+2<n&&Fu(e.charCodeAt(t+1))&&Fu(e.charCodeAt(t+2));function fA(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),A=r.charCodeAt(y+2);Fu(x)&&Fu(A)&&(u-=2,y+=2)}let d=0,f=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);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&dA(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const qd="1.18.1",cg=64*1024,{isFunction:Bu}=q,hA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),dg=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},fg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},pA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},mA=e=>{const t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?Bu(s):typeof fetch=="function",d=Bu(a),f=Bu(u);if(!c)return!1;const p=c&&Bu(n),m=c&&(typeof r=="function"?(w=>N=>w.encode(N))(new r):w=>Ue(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),b=d&&p&&fg(()=>{let w=!1;const N=new a(Xt.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),C=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),w&&!C}),y=f&&p&&fg(()=>q.isReadableStream(new u("").body)),x={stream:y&&(w=>w.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!x[w]&&(x[w]=(N,C)=>{let j=N&&N[w];if(j)return j.call(N);throw new Ne(`Response type '${w}' is not supported`,Ne.ERR_NOT_SUPPORT,C)})});const A=w=>Ue(null,null,function*(){if(w==null)return 0;if(q.isBlob(w))return w.size;if(q.isSpecCompliantForm(w))return(yield new a(Xt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(q.isArrayBufferView(w)||q.isArrayBuffer(w))return w.byteLength;if(q.isURLSearchParams(w)&&(w=w+""),q.isString(w))return(yield m(w)).byteLength}),v=(w,N)=>Ue(null,null,function*(){const C=q.toFiniteNumber(w.getContentLength());return C==null?A(N):C});return w=>Ue(null,null,function*(){let{url:N,method:C,data:j,signal:X,cancelToken:L,timeout:G,onDownloadProgress:ne,onUploadProgress:de,responseType:z,headers:ae,withCredentials:oe="same-origin",fetchOptions:pe,maxContentLength:ce,maxBodyLength:se}=ug(w);const Ae=q.isNumber(ce)&&ce>-1,re=q.isNumber(se)&&se>-1,Y=ge=>q.hasOwnProp(w,ge)?w[ge]:void 0;let ie=s||fetch;z=z?(z+"").toLowerCase():"text";let k=aA([X,L&&L.toAbortSignal()],G),D=null;const Z=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let P,ke=null;const Ce=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,w,D);try{let ge;const Le=Y("auth");if(Le){const he=q.getSafeProp(Le,"username")||"",W=q.getSafeProp(Le,"password")||"";ge={username:he,password:W}}if(pA(N)){const he=new URL(N,Xt.origin);if(!ge&&(he.username||he.password)){const W=dg(he.username),fe=dg(he.password);ge={username:W,password:fe}}(he.username||he.password)&&(he.username="",he.password="",N=he.href)}if(ge&&(ae.delete("authorization"),ae.set("Authorization","Basic "+btoa(hA((ge.username||"")+":"+(ge.password||""))))),Ae&&typeof N=="string"&&N.startsWith("data:")&&fA(N)>ce)throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,w,D);if(re&&C!=="get"&&C!=="head"){const he=yield A(j);if(typeof he=="number"&&isFinite(he)&&(P=he,he>se))throw Ce()}const Be=re&&(q.isReadableStream(j)||q.isStream(j)),Ge=(he,W,fe)=>lg(he,cg,_e=>{if(re&&_e>se)throw ke=Ce();W&&W(_e)},fe);if(b&&C!=="get"&&C!=="head"&&(de||Be)){if(P=P==null?yield v(ae,j):P,P!==0||Be){let he=new a(N,{method:"POST",body:j,duplex:"half"}),W;if(q.isFormData(j)&&(W=he.headers.get("content-type"))&&ae.setContentType(W),he.body){const[fe,_e]=de&&rg(P,Mu(ig(de)))||[];j=Ge(he.body,fe,_e)}}}else if(Be&&!d&&p&&C!=="get"&&C!=="head")j=Ge(j);else if(Be&&d&&!b&&C!=="get"&&C!=="head")throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,w,D);q.isString(oe)||(oe=oe?"include":"omit");const dt=d&&"credentials"in a.prototype;if(q.isFormData(j)){const he=ae.getContentType();he&&/^multipart\/form-data/i.test(he)&&!/boundary=/i.test(he)&&ae.delete("content-type")}ae.set("User-Agent","axios/"+qd,!1);const Vt=le(H({},pe),{signal:k,method:C.toUpperCase(),headers:V0(ae.normalize()),body:j,duplex:"half",credentials:dt?oe:void 0});D=d&&new a(N,Vt);let Lt=yield d?ie(D,pe):ie(N,Vt);const Qt=nn.from(Lt.headers);if(Ae){const he=q.toFiniteNumber(Qt.getContentLength());if(he!=null&&he>ce)throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,w,D)}const kn=y&&(z==="stream"||z==="response");if(y&&Lt.body&&(ne||Ae||kn&&Z)){const he={};["status","statusText","headers"].forEach(Kt=>{he[Kt]=Lt[Kt]});const W=q.toFiniteNumber(Qt.getContentLength()),[fe,_e]=ne&&rg(W,Mu(ig(ne),!0))||[];let Xe=0;const ut=Kt=>{if(Ae&&(Xe=Kt,Xe>ce))throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,w,D);fe&&fe(Kt)};Lt=new u(lg(Lt.body,cg,ut,()=>{_e&&_e(),Z&&Z()}),he)}z=z||"text";let me=yield x[q.findKey(x,z)||"text"](Lt,w);if(Ae&&!y&&!kn){let he;if(me!=null&&(typeof me.byteLength=="number"?he=me.byteLength:typeof me.size=="number"?he=me.size:typeof me=="string"&&(he=typeof r=="function"?new r().encode(me).byteLength:me.length)),typeof he=="number"&&he>ce)throw new Ne("maxContentLength size of "+ce+" exceeded",Ne.ERR_BAD_RESPONSE,w,D)}return!kn&&Z&&Z(),yield new Promise((he,W)=>{ng(he,W,{data:me,headers:nn.from(Lt.headers),status:Lt.status,statusText:Lt.statusText,config:w,request:D})})}catch(ge){if(Z&&Z(),k&&k.aborted&&k.reason instanceof Ne){const Le=k.reason;throw Le.config=w,D&&(Le.request=D),ge!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:ge,writable:!0,enumerable:!1,configurable:!0}),Le}if(ke)throw D&&!ke.request&&(ke.request=D),ke;if(ge instanceof Ne)throw D&&!ge.request&&(ge.request=D),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){const Le=new Ne("Network Error",Ne.ERR_NETWORK,w,D,ge&&ge.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:ge.cause||ge,writable:!0,enumerable:!1,configurable:!0}),Le}throw Ne.from(ge,ge&&ge.code,w,D,ge&&ge.response)}})},gA=new Map,hg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=gA;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:mA(t)),p=f;return f};hg();const Yd={http:Lv,xhr:oA,fetch:{get:hg}};q.forEach(Yd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const pg=e=>`- ${e}`,EA=e=>q.isFunction(e)||e===null||e===!1;function yA(e,t){e=q.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!EA(r)&&(s=Yd[(c=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${c}'`);if(s&&(q.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
11
- `+u.map(pg).join(`
12
- `):" "+pg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+c,Ne.ERR_NOT_SUPPORT)}return s}const mg={getAdapter:yA,adapters:Yd};function Wd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ko(null,e)}function gg(e){return Wd(e),e.headers=nn.from(e.headers),e.data=Vd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),mg.getAdapter(e.adapter||Qo.adapter,e)(e).then(function(r){Wd(e),e.response=r;try{r.data=Vd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=nn.from(r.headers),r},function(r){if(!tg(r)&&(Wd(e),r&&r.response)){e.response=r.response;try{r.response.data=Vd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=nn.from(r.response.headers)}return Promise.reject(r)})}const Uu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Uu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Eg={};Uu.transitional=function(t,n,r){function s(a,u){return"[Axios v"+qd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Eg[u]&&(Eg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},Uu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function TA(e,t,n){if(typeof e!="object"||e===null)throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const Hu={assertOptions:TA,validators:Uu},rn=Hu.validators;let Hi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new K0,response:new K0}}request(t,n){return Ue(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
8
+ `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Hr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let bS=class extends Hr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class I0 extends Hr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Id=class extends Hr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class xS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}const _S="0Mw";let wS=class extends yS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,p,m,x;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(l=s.timeout)!=null?l:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(x=s.capabilitiesVersion)!=null?x:"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 xS(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 Fe(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 Fe(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 Fe(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Hr("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 Fe(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 Fe(this,null,function*(){var u,l,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(l=a.openConversationsFound)!=null?l:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return Fe(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return Fe(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Hr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Hr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Fe(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 Fe(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 TS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>Fe(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var l;const n=t.conversationEntry;if(!n)return;const r=((l=n.sender)==null?void 0:l.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s,messagingSessionId:this.extractMessagingSessionId(n)})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),l=this.getNestedValue(u,"streamingToken");a=this.getNestedString(l,"token","text")||this.getNestedString(l,"token","content")||"";const d=this.getNestedValue(l,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(l,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(l,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",j(j(j({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,l,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var A,w,k;const x=p.participant,y=p.displayName||(x==null?void 0:x.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",b=(x==null?void 0:x.role)||((k=(w=t.conversationEntry)==null?void 0:w.sender)==null?void 0:k.role)||"",v=p.operation||p.event||"";this.emit("participant_changed",j({conversationId:this._conversationId||"",participant:{role:b,name:y},action:this.normalizeParticipantAction(v)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",j({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return Fe(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,s){return Fe(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let l;try{const d=new AbortController;l=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=j({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(l),!m.ok){const x=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new 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 bS(`Request ${t} ${n} failed (${m.status}): ${x}`,m.status,x)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(x=>x?JSON.parse(x):null)}catch(d){if(clearTimeout(l),d instanceof Hr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new I0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new I0(`Network error: ${d.message}`,u,{cause:d})}throw new Hr(`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 Hr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}extractMessagingSessionId(t){var n;return(n=t.relatedRecords)==null?void 0:n.find(r=>r.startsWith(_S))}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}};const P0="onCimulateWidgetReady",C="cim-widget",Mn=`--${C}`,si={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},SS=(e=si)=>({[`${Mn}-primary-color`]:e.primaryColor||si.primaryColor,[`${Mn}-secondary-color`]:e.secondaryColor||si.secondaryColor,[`${Mn}-font-color`]:e.fontColor||si.fontColor,[`${Mn}-font-family`]:e.fontFamily||si.fontFamily,[`${Mn}-background-color`]:e.backgroundColor||si.backgroundColor,[`${Mn}-border-color`]:e.borderColor||si.borderColor,[`${Mn}-border-radius`]:e.borderRadius||si.borderRadius});class vS{constructor(){Xe(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}});Xe(this,"connectedProxy");Xe(this,"modeProxy");Xe(this,"entryTypeProxy");Xe(this,"statusProxy");Xe(this,"dialogProxy");Xe(this,"modalProxy",{isFullscreen:!1});Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return kS(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 at=new vS,AS=e=>{window.addEventListener(Cd,e)},NS=e=>{window.removeEventListener(Cd,e)},kS=(e,t)=>{const n=new CustomEvent(Cd,{detail:{property:e,value:t}});window.dispatchEvent(n)},CS=e=>{at.connectedProxy.connected=e},R0=e=>{if(!C0(e)){const t=k0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}at.entryTypeProxy.entryType=e},jr=e=>{const t=at.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;at.statusProxy.isOpen=n,n&&(at.statusProxy.isMinimized=!1)},Ou=e=>{const t=at.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;at.statusProxy.isMinimized=n,n&&(at.statusProxy.isOpen=!1)},Pd=e=>{at.modalProxy.isFullscreen=e},Iu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);at.statusProxy.type=e,e==="dialog"||e==="chat"?at.modeProxy.mode="embedded":at.modeProxy.mode="standalone"},Rd=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(", ")}.`);at.dialogProxy.position=e},OS=e=>{const t=at.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;at.dialogProxy.isFullHeight=n};function L0(e,t){return function(){return e.apply(t,arguments)}}const{toString:IS}=Object.prototype,{getPrototypeOf:Is}=Object,{iterator:Wo,toStringTag:D0}=Symbol,Pu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Go=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Pu(n,t))return!0;n=Is(n)}return!1},PS=(e,t)=>e!=null&&Go(e,t)?e[t]:void 0,Ld=(e=>t=>{const n=IS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>Ld(t)===e),Ru=e=>t=>typeof t===e,{isArray:ji}=Array,Ps=Ru("undefined");function Rs(e){return e!==null&&!Ps(e)&&e.constructor!==null&&!Ps(e.constructor)&&Sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const M0=sr("ArrayBuffer");function RS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&M0(e.buffer),t}const LS=Ru("string"),Sn=Ru("function"),F0=Ru("number"),Ls=e=>e!==null&&typeof e=="object",DS=e=>e===!0||e===!1,Lu=e=>{if(!Ls(e))return!1;const t=Is(e);return(t===null||t===Object.prototype||Is(t)===null)&&!Go(e,D0)&&!Go(e,Wo)},MS=e=>{if(!Ls(e)||Rs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},FS=sr("Date"),BS=sr("File"),US=e=>!!(e&&typeof e.uri!="undefined"),HS=e=>e&&typeof e.getParts!="undefined",jS=sr("Blob"),$S=sr("FileList"),zS=e=>Ls(e)&&Sn(e.pipe);function VS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const B0=VS(),U0=typeof B0.FormData!="undefined"?B0.FormData:void 0,qS=e=>{if(!e)return!1;if(U0&&e instanceof U0)return!0;const t=Is(e);if(!t||t===Object.prototype||!Sn(e.append))return!1;const n=Ld(e);return n==="formdata"||n==="object"&&Sn(e.toString)&&e.toString()==="[object FormData]"},YS=sr("URLSearchParams"),[WS,GS,XS,QS]=["ReadableStream","Request","Response","Headers"].map(sr),KS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),ji(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Rs(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function H0(e,t){if(Rs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const $i=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,j0=e=>!Ps(e)&&e!==$i;function Dd(...e){const{caseless:t,skipUndefined:n}=j0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&H0(r,u)||u,d=Pu(r,l)?r[l]:void 0;Lu(d)&&Lu(a)?r[l]=Dd(d,a):Lu(a)?r[l]=Dd({},a):ji(a)?r[l]=a.slice():(!n||!Ps(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Rs(l)||(Xo(l,s),typeof l!="object"||ji(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];lv.call(l,p)&&s(l[p],p)}}return r}const JS=(e,t,n,{allOwnKeys:r}={})=>(Xo(t,(s,a)=>{n&&Sn(s)?Object.defineProperty(e,a,{__proto__:null,value:L0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ZS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ev=(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)},tv=(e,t,n,r)=>{let s,a,u;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&Is(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nv=(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},rv=e=>{if(!e)return null;if(ji(e))return e;let t=e.length;if(!F0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},iv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Is(Uint8Array)),sv=(e,t)=>{const r=(e&&e[Wo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},ov=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},av=sr("HTMLFormElement"),uv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:lv}=Object.prototype,cv=sr("RegExp"),$0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},dv=e=>{$0(e,(t,n)=>{if(Sn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Sn(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+"'")})}})},fv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return ji(e)?r(e):r(String(e).split(t)),n},hv=()=>{},pv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mv(e){return!!(e&&Sn(e.append)&&e[D0]==="FormData"&&e[Wo])}const gv=e=>{const t=new WeakSet,n=r=>{if(Ls(r)){if(t.has(r))return;if(Rs(r))return r;if(!("toJSON"in r)){t.add(r);const s=ji(r)?[]:{};return Xo(r,(a,u)=>{const l=n(a);!Ps(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},Ev=sr("AsyncFunction"),yv=e=>e&&(Ls(e)||Sn(e))&&Sn(e.then)&&Sn(e.catch),z0=((e,t)=>e?setImmediate:t?((n,r)=>($i.addEventListener("message",({source:s,data:a})=>{s===$i&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),$i.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Sn($i.postMessage)),Tv=typeof queueMicrotask!="undefined"?queueMicrotask.bind($i):typeof process!="undefined"&&process.nextTick||z0,V0=e=>e!=null&&Sn(e[Wo]),Y={isArray:ji,isArrayBuffer:M0,isBuffer:Rs,isFormData:qS,isArrayBufferView:RS,isString:LS,isNumber:F0,isBoolean:DS,isObject:Ls,isPlainObject:Lu,isEmptyObject:MS,isReadableStream:WS,isRequest:GS,isResponse:XS,isHeaders:QS,isUndefined:Ps,isDate:FS,isFile:BS,isReactNativeBlob:US,isReactNative:HS,isBlob:jS,isRegExp:cv,isFunction:Sn,isStream:zS,isURLSearchParams:YS,isTypedArray:iv,isFileList:$S,forEach:Xo,merge:Dd,extend:JS,trim:KS,stripBOM:ZS,inherits:ev,toFlatObject:tv,kindOf:Ld,kindOfTest:sr,endsWith:nv,toArray:rv,forEachEntry:sv,matchAll:ov,isHTMLForm:av,hasOwnProperty:Pu,hasOwnProp:Pu,hasOwnInPrototypeChain:Go,getSafeProp:PS,reduceDescriptors:$0,freezeMethods:dv,toObjectSet:fv,toCamelCase:uv,noop:hv,toFiniteNumber:pv,findKey:H0,global:$i,isContextDefined:j0,isSpecCompliantForm:mv,toJSONObject:gv,isAsyncFn:Ev,isThenable:yv,setImmediate:z0,asap:Tv,isIterable:V0,isSafeIterable:e=>e!=null&&Go(e,Wo)&&V0(e)},bv=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xv=e=>{const t={};let n,r,s;return e&&e.split(`
9
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&bv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function _v(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 wv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Sv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Md(e,t){return Y.isArray(e)?e.map(n=>Md(n,t)):_v(String(e).replace(t,""))}const vv=e=>Md(e,wv),Av=e=>Md(e,Sv);function q0(e){const t=Object.create(null);return Y.forEach(e.toJSON(),(n,r)=>{t[r]=Av(n)}),t}const Y0=Symbol("internals");function Qo(e){return e&&String(e).trim().toLowerCase()}function Du(e){return e===!1||e==null?e:Y.isArray(e)?e.map(Du):vv(String(e))}function Nv(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 kv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fd(e,t,n,r,s){if(Y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function Cv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ov(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let sn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const p=Qo(d);if(!p)return;const m=Y.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=Du(l))}const u=(l,d)=>Y.forEach(l,(f,p)=>a(f,p,d));if(Y.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Y.isString(t)&&(t=t.trim())&&!kv(t))u(xv(t),n);else if(Y.isObject(t)&&Y.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!Y.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],Y.hasOwnProp(l,f)?(d=l[f],l[f]=Y.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Qo(t),t){const r=Y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Nv(s);if(Y.isFunction(n))return n.call(this,s,r);if(Y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Qo(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=Qo(u),u){const l=Y.findKey(r,u);l&&(!n||Fd(r,r[l],l,n))&&(delete r[l],s=!0)}}return Y.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||Fd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return Y.forEach(this,(s,a)=>{const u=Y.findKey(r,a);if(u){n[u]=Du(s),delete n[a];return}const l=t?Cv(a):String(a).trim();l!==a&&delete n[a],n[l]=Du(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
10
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Y0]=this[Y0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=Qo(u);r[l]||(Ov(s,u),r[l]=!0)}return Y.isArray(t)?t.forEach(a):a(t),this}};sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Y.freezeMethods(sn);const Iv="[REDACTED ****]";function Pv(e){if(Y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Rv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||Y.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof sn&&(a=a.toJSON()),r.push(a);let u;if(Y.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);Y.isUndefined(f)||(u[d]=f)});else{if(!Y.isPlainObject(a)&&Pv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?Iv:s(d);Y.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ne=class g2 extends Error{static from(t,n,r,s,a,u){const l=new g2(t.message,n||t.code,r,s,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),u&&Object.assign(l,u),l}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&Y.hasOwnProp(t,"redact")?t.redact:void 0,r=Y.isArray(n)&&n.length>0?Rv(t,n):Y.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Lv=null,W0=100;function Bd(e){return Y.isPlainObject(e)||Y.isArray(e)}function G0(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function Ud(e,t,n){return e?e.concat(t).map(function(s,a){return s=G0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Dv(e){return Y.isArray(e)&&!e.some(Bd)}const Mv=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function Mu(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,I){return!Y.isUndefined(I[k])});const r=n.metaTokens,s=n.visitor||b,a=n.dots,u=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?W0:n.maxDepth,f=l&&Y.isSpecCompliantForm(t),p=[];if(!Y.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if(Y.isDate(w))return w.toISOString();if(Y.isBoolean(w))return w.toString();if(!f&&Y.isBlob(w))throw new Ne("Blob is not supported. Use a Buffer instead.");if(Y.isArrayBuffer(w)||Y.isTypedArray(w)){if(f&&typeof l=="function")return new l([w]);if(typeof Buffer!="undefined")return Buffer.from(w);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return w}function x(w){if(w>d)throw new Ne("Object is too deeply nested ("+w+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,k){if(d===1/0)return JSON.stringify(w);const I=[];return JSON.stringify(w,function(G,L){if(!Y.isObject(L))return L;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(L),x(k+I.length-1),L})}function b(w,k,I){let U=w;if(Y.isReactNative(t)&&Y.isReactNativeBlob(w))return t.append(Ud(I,k,a),m(w)),!1;if(w&&!I&&typeof w=="object"){if(Y.endsWith(k,"{}"))k=r?k:k.slice(0,-2),w=y(w,1);else if(Y.isArray(w)&&Dv(w)||(Y.isFileList(w)||Y.endsWith(k,"[]"))&&(U=Y.toArray(w)))return k=G0(k),U.forEach(function(L,V){!(Y.isUndefined(L)||L===null)&&t.append(u===!0?Ud([k],V,a):u===null?k:k+"[]",m(L))}),!1}return Bd(w)?!0:(t.append(Ud(I,k,a),m(w)),!1)}const v=Object.assign(Mv,{defaultVisitor:b,convertValue:m,isVisitable:Bd});function A(w,k,I=0){if(!Y.isUndefined(w)){if(x(I),p.indexOf(w)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(w),Y.forEach(w,function(G,L){(!(Y.isUndefined(G)||G===null)&&s.call(t,G,Y.isString(L)?L.trim():L,k,v))===!0&&A(G,k?k.concat(L):[L],I+1)}),p.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return A(e),t}function X0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Hd(e,t){this._pairs=[],e&&Mu(e,this,t)}const Q0=Hd.prototype;Q0.append=function(t,n){this._pairs.push([t,n])},Q0.toString=function(t){const n=t?r=>t.call(this,r,X0):X0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Fv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function K0(e,t,n){if(!t)return e;e=e||"";const r=Y.isFunction(n)?{serialize:n}:n,s=Y.getSafeProp(r,"encode")||Fv,a=Y.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=Y.isURLSearchParams(t)?t.toString():new Hd(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class J0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Bv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Hd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},$d=typeof window!="undefined"&&typeof document!="undefined",zd=typeof navigator=="object"&&navigator||void 0,Uv=$d&&(!zd||["ReactNative","NativeScript","NS"].indexOf(zd.product)<0),Hv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jv=$d&&window.location.href||"http://localhost",Zt=j(j({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$d,hasStandardBrowserEnv:Uv,hasStandardBrowserWebWorkerEnv:Hv,navigator:zd,origin:jv},Symbol.toStringTag,{value:"Module"}))),Bv);function $v(e,t){return Mu(e,new Zt.classes.URLSearchParams,j({visitor:function(n,r,s,a){return Zt.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const Z0=W0;function eg(e){if(e>Z0)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+Z0,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function zv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)eg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Vv(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function tg(e){function t(n,r,s,a){eg(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&Y.isArray(s)?s.length:u,d?(Y.hasOwnProp(s,u)?s[u]=Y.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!Y.hasOwnProp(s,u)||!Y.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&Y.isArray(s[u])&&(s[u]=Vv(s[u])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,s)=>{t(zv(r),s,n,0)}),n}return null}const Ds=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function qv(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ko={transitional:jd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=Y.isObject(t);if(a&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return s?JSON.stringify(tg(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Ds(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return $v(t,d).toString();if((l=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Ds(this,"env"),p=f&&f.FormData;return Mu(l?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),qv(t)):t}],transformResponse:[function(t){const n=Ds(this,"transitional")||Ko.transitional,r=n&&n.forcedJSONParsing,s=Ds(this,"responseType"),a=s==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Ds(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Ds(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zt.classes.FormData,Blob:Zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch","query"],e=>{Ko.headers[e]={}});function Vd(e,t){const n=this||Ko,r=t||n,s=sn.from(r.headers);let a=r.data;return Y.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function ng(e){return!!(e&&e.__CANCEL__)}let Jo=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function rg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function Yv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Wv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,x=0;for(;m!==s;)x+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(x*1e3/y):void 0}}function Gv(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const Fu=(e,t,n=3)=>{let r=0;const s=Wv(50,250);return Gv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=l!=null?Math.min(u,l):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},ig=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sg=e=>(...t)=>Y.asap(()=>e(...t)),Xv=Zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Zt.origin),Zt.navigator&&/(msie|trident)/i.test(Zt.navigator.userAgent)):()=>!0,Qv=Zt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&l.push(`path=${r}`),Y.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),Y.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Kv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Zv=/^https?:(?!\/\/)/i,eA=/[\t\n\r]/g;function tA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function nA(e){return tA(e).replace(eA,"")}function og(e,t){if(typeof e=="string"&&Zv.test(nA(e)))throw new Ne('Invalid URL: missing "//" after protocol',Ne.ERR_INVALID_URL,t)}function ag(e,t,n,r){og(t,r);let s=!Kv(t);return e&&(s||n===!1)?(og(e,r),Jv(e,t)):t}const ug=e=>e instanceof sn?j({},e):e;function zi(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,x,y){return Y.isPlainObject(p)&&Y.isPlainObject(m)?Y.merge.call({caseless:y},p,m):Y.isPlainObject(m)?Y.merge({},m):Y.isArray(m)?m.slice():m}function s(p,m,x,y){if(Y.isUndefined(m)){if(!Y.isUndefined(p))return r(void 0,p,x,y)}else return r(p,m,x,y)}function a(p,m){if(!Y.isUndefined(m))return r(void 0,m)}function u(p,m){if(Y.isUndefined(m)){if(!Y.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=Y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Y.isUndefined(m))if(Y.isPlainObject(m)){if(Y.hasOwnProp(m,p))return m[p]}else return;const x=Y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Y.isPlainObject(x)&&Y.hasOwnProp(x,p))return x[p]}function d(p,m,x){if(Y.hasOwnProp(t,x))return r(p,m);if(Y.hasOwnProp(e,x))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,x)=>s(ug(p),ug(m),x,!0)};return Y.forEach(Object.keys(j(j({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const x=Y.hasOwnProp(f,m)?f[m]:s,y=Y.hasOwnProp(e,m)?e[m]:void 0,b=Y.hasOwnProp(t,m)?t[m]:void 0,v=x(y,b,m);Y.isUndefined(v)&&x!==d||(n[m]=v)}),Y.hasOwnProp(t,"validateStatus")&&Y.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const rA=["content-type","content-length"];function iA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{rA.includes(r.toLowerCase())&&e.set(r,s)})}const sA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function lg(e){const t=zi({},e),n=x=>Y.hasOwnProp(t,x)?t[x]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=sn.from(l),t.url=K0(ag(f,m,p,t),n("params"),n("paramsSerializer")),d){const x=Y.getSafeProp(d,"username")||"",y=Y.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(x+":"+(y?sA(y):"")))}catch(b){throw Ne.from(b,Ne.ERR_BAD_OPTION_VALUE,e)}}if(Y.isFormData(r)&&(Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv||Y.isReactNative(r)?l.setContentType(void 0):Y.isFunction(r.getHeaders)&&iA(l,r.getHeaders(),n("formDataHeaderPolicy"))),Zt.hasStandardBrowserEnv&&(Y.isFunction(s)&&(s=s(t)),s===!0||s==null&&Xv(t.url))){const y=a&&u&&Qv.read(u);y&&l.set(a,y)}return t}const oA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=lg(e);let a=s.data;const u=sn.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,p,m,x,y,b;function v(){y&&y(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function w(){if(!A)return;const I=sn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),G={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};rg(function(V){n(V),v()},function(V){r(V),v()},G),A=null}"onloadend"in A?A.onloadend=w:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(w)},A.onabort=function(){A&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(U){const G=U&&U.message?U.message:"Network Error",L=new Ne(G,Ne.ERR_NETWORK,e,A);L.event=U||null,r(L),v(),A=null},A.ontimeout=function(){let U=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const G=s.transitional||jd;s.timeoutErrorMessage&&(U=s.timeoutErrorMessage),r(new Ne(U,G.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(q0(u),function(U,G){A.setRequestHeader(G,U)}),Y.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([x,b]=Fu(f,!0),A.addEventListener("progress",x)),d&&A.upload&&([m,y]=Fu(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{A&&(r(!I||I.type?new Jo(null,e,A):I),A.abort(),v(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=Yv(s.url);if(k&&!Zt.protocols.includes(k)){r(new Ne("Unsupported protocol "+k+":",Ne.ERR_BAD_REQUEST,e)),v();return}A.send(a||null)})},aA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new Jo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>Y.asap(u),l},uA=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},lA=function(e,t){return o0(this,null,function*(){try{for(var n=m2(cA(e)),r,s,a;r=!(s=yield new Ns(n.next())).done;r=!1){const u=s.value;yield*a0(uA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Ns(s.call(n)))}finally{if(a)throw a[0]}}})},cA=function(e){return o0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*a0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Ns(t.read());if(n)break;yield r}}finally{yield new Ns(t.cancel())}})},cg=(e,t,n,r)=>{const s=lA(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Fe(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){l(),f.close();return}let x=m.byteLength;if(n){let y=a+=x;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},Bu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,dA=(e,t,n)=>t+2<n&&Bu(e.charCodeAt(t+1))&&Bu(e.charCodeAt(t+2));function fA(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const l=r.length;for(let y=0;y<l;y++)if(r.charCodeAt(y)===37&&y+2<l){const b=r.charCodeAt(y+1),v=r.charCodeAt(y+2);Bu(b)&&Bu(v)&&(u-=2,y+=2)}let d=0,f=l-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const x=Math.floor(u/4)*3-(d||0);return x>0?x:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&dA(r,u,l))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<l){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const qd="1.18.1",dg=64*1024,{isFunction:Uu}=Y,hA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),fg=e=>{if(!Y.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},hg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},pA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},mA=e=>{const t=Y.global!==void 0&&Y.global!==null?Y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?Uu(s):typeof fetch=="function",d=Uu(a),f=Uu(u);if(!l)return!1;const p=l&&Uu(n),m=l&&(typeof r=="function"?(w=>k=>w.encode(k))(new r):w=>Fe(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),x=d&&p&&hg(()=>{let w=!1;const k=new a(Zt.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),I=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),w&&!I}),y=f&&p&&hg(()=>Y.isReadableStream(new u("").body)),b={stream:y&&(w=>w.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!b[w]&&(b[w]=(k,I)=>{let U=k&&k[w];if(U)return U.call(k);throw new Ne(`Response type '${w}' is not supported`,Ne.ERR_NOT_SUPPORT,I)})});const v=w=>Fe(null,null,function*(){if(w==null)return 0;if(Y.isBlob(w))return w.size;if(Y.isSpecCompliantForm(w))return(yield new a(Zt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(w)||Y.isArrayBuffer(w))return w.byteLength;if(Y.isURLSearchParams(w)&&(w=w+""),Y.isString(w))return(yield m(w)).byteLength}),A=(w,k)=>Fe(null,null,function*(){const I=Y.toFiniteNumber(w.getContentLength());return I==null?v(k):I});return w=>Fe(null,null,function*(){let{url:k,method:I,data:U,signal:G,cancelToken:L,timeout:V,onDownloadProgress:ie,onUploadProgress:le,responseType:z,headers:oe,withCredentials:te="same-origin",fetchOptions:fe,maxContentLength:he,maxBodyLength:de}=lg(w);const we=Y.isNumber(he)&&he>-1,ce=Y.isNumber(de)&&de>-1,W=ge=>Y.hasOwnProp(w,ge)?w[ge]:void 0;let re=s||fetch;z=z?(z+"").toLowerCase():"text";let N=aA([G,L&&L.toAbortSignal()],V),M=null;const J=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let P,Ae=null;const Ce=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,w,M);try{let ge;const Le=W("auth");if(Le){const Be=Y.getSafeProp(Le,"username")||"",ke=Y.getSafeProp(Le,"password")||"";ge={username:Be,password:ke}}if(pA(k)){const Be=new URL(k,Zt.origin);if(!ge&&(Be.username||Be.password)){const ke=fg(Be.username),We=fg(Be.password);ge={username:ke,password:We}}(Be.username||Be.password)&&(Be.username="",Be.password="",k=Be.href)}if(ge&&(oe.delete("authorization"),oe.set("Authorization","Basic "+btoa(hA((ge.username||"")+":"+(ge.password||""))))),we&&typeof k=="string"&&k.startsWith("data:")&&fA(k)>he)throw new Ne("maxContentLength size of "+he+" exceeded",Ne.ERR_BAD_RESPONSE,w,M);if(ce&&I!=="get"&&I!=="head"){const Be=yield v(U);if(typeof Be=="number"&&isFinite(Be)&&(P=Be,Be>de))throw Ce()}const je=ce&&(Y.isReadableStream(U)||Y.isStream(U)),Ke=(Be,ke,We)=>cg(Be,dg,et=>{if(ce&&et>de)throw Ae=Ce();ke&&ke(et)},We);if(x&&I!=="get"&&I!=="head"&&(le||je)){if(P=P==null?yield A(oe,U):P,P!==0||je){let Be=new a(k,{method:"POST",body:U,duplex:"half"}),ke;if(Y.isFormData(U)&&(ke=Be.headers.get("content-type"))&&oe.setContentType(ke),Be.body){const[We,et]=le&&ig(P,Fu(sg(le)))||[];U=Ke(Be.body,We,et)}}}else if(je&&!d&&p&&I!=="get"&&I!=="head")U=Ke(U);else if(je&&d&&!x&&I!=="get"&&I!=="head")throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,w,M);Y.isString(te)||(te=te?"include":"omit");const pt=d&&"credentials"in a.prototype;if(Y.isFormData(U)){const Be=oe.getContentType();Be&&/^multipart\/form-data/i.test(Be)&&!/boundary=/i.test(Be)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+qd,!1);const Ot=ue(j({},fe),{signal:N,method:I.toUpperCase(),headers:q0(oe.normalize()),body:U,duplex:"half",credentials:pt?te:void 0});M=d&&new a(k,Ot);let Ut=yield d?re(M,fe):re(k,Ot);const yn=sn.from(Ut.headers);if(we){const Be=Y.toFiniteNumber(yn.getContentLength());if(Be!=null&&Be>he)throw new Ne("maxContentLength size of "+he+" exceeded",Ne.ERR_BAD_RESPONSE,w,M)}const Tn=y&&(z==="stream"||z==="response");if(y&&Ut.body&&(ie||we||Tn&&J)){const Be={};["status","statusText","headers"].forEach(ae=>{Be[ae]=Ut[ae]});const ke=Y.toFiniteNumber(yn.getContentLength()),[We,et]=ie&&ig(ke,Fu(sg(ie),!0))||[];let se=0;const Se=ae=>{if(we&&(se=ae,se>he))throw new Ne("maxContentLength size of "+he+" exceeded",Ne.ERR_BAD_RESPONSE,w,M);We&&We(ae)};Ut=new u(cg(Ut.body,dg,Se,()=>{et&&et(),J&&J()}),Be)}z=z||"text";let Lt=yield b[Y.findKey(b,z)||"text"](Ut,w);if(we&&!y&&!Tn){let Be;if(Lt!=null&&(typeof Lt.byteLength=="number"?Be=Lt.byteLength:typeof Lt.size=="number"?Be=Lt.size:typeof Lt=="string"&&(Be=typeof r=="function"?new r().encode(Lt).byteLength:Lt.length)),typeof Be=="number"&&Be>he)throw new Ne("maxContentLength size of "+he+" exceeded",Ne.ERR_BAD_RESPONSE,w,M)}return!Tn&&J&&J(),yield new Promise((Be,ke)=>{rg(Be,ke,{data:Lt,headers:sn.from(Ut.headers),status:Ut.status,statusText:Ut.statusText,config:w,request:M})})}catch(ge){if(J&&J(),N&&N.aborted&&N.reason instanceof Ne){const Le=N.reason;throw Le.config=w,M&&(Le.request=M),ge!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:ge,writable:!0,enumerable:!1,configurable:!0}),Le}if(Ae)throw M&&!Ae.request&&(Ae.request=M),Ae;if(ge instanceof Ne)throw M&&!ge.request&&(ge.request=M),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){const Le=new Ne("Network Error",Ne.ERR_NETWORK,w,M,ge&&ge.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:ge.cause||ge,writable:!0,enumerable:!1,configurable:!0}),Le}throw Ne.from(ge,ge&&ge.code,w,M,ge&&ge.response)}})},gA=new Map,pg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,l=u,d,f,p=gA;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:mA(t)),p=f;return f};pg();const Yd={http:Lv,xhr:oA,fetch:{get:pg}};Y.forEach(Yd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const mg=e=>`- ${e}`,EA=e=>Y.isFunction(e)||e===null||e===!1;function yA(e,t){e=Y.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(s=r,!EA(r)&&(s=Yd[(l=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${l}'`);if(s&&(Y.isFunction(s)||(s=s.get(t))))break;a[l||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?u.length>1?`since :
11
+ `+u.map(mg).join(`
12
+ `):" "+mg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+l,Ne.ERR_NOT_SUPPORT)}return s}const gg={getAdapter:yA,adapters:Yd};function Wd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jo(null,e)}function Eg(e){return Wd(e),e.headers=sn.from(e.headers),e.data=Vd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gg.getAdapter(e.adapter||Ko.adapter,e)(e).then(function(r){Wd(e),e.response=r;try{r.data=Vd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=sn.from(r.headers),r},function(r){if(!ng(r)&&(Wd(e),r&&r.response)){e.response=r.response;try{r.response.data=Vd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=sn.from(r.response.headers)}return Promise.reject(r)})}const Hu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Hu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yg={};Hu.transitional=function(t,n,r){function s(a,u){return"[Axios v"+qd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!yg[u]&&(yg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},Hu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function TA(e,t,n){if(typeof e!="object"||e===null)throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const ju={assertOptions:TA,validators:Hu},on=ju.validators;let Vi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new J0,response:new J0}}request(t,n){return Fe(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
13
13
  `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
14
- `),c=u===-1?-1:a.indexOf(`
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=Ui(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Hu.assertOptions(r,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean),legacyInterceptorReqResOrdering:rn.transitional(rn.boolean),advertiseZstdAcceptEncoding:rn.transitional(rn.boolean),validateStatusUndefinedResolves:rn.transitional(rn.boolean)},!1),s!=null&&(q.isFunction(s)?n.paramsSerializer={serialize:s}:Hu.assertOptions(s,{encode:rn.function,serialize:rn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Hu.assertOptions(n,{baseUrl:rn.spelling("baseURL"),withXsrfToken:rn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&q.merge(a.common,a[n.method]);a&&q.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=nn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||jd;v&&v.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,b;if(!d){const x=[gg.bind(this),void 0];for(x.unshift(...c),x.push(...f),b=x.length,p=Promise.resolve(n);m<b;)p=p.then(x[m++],x[m++]);return p}b=c.length;let y=n;for(;m<b;){const x=c[m++],A=c[m++];try{y=x(y)}catch(v){A.call(this,v);break}}try{p=gg.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Ui(this.defaults,t);const n=og(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Q0(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:r&&q.hasOwnProp(r,"data")?r.data:void 0}))}}),q.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(Ui(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Hi.prototype[t]=n(),t!=="query"&&(Hi.prototype[t+"Form"]=n(!0))});let bA=class E2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new Ko(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 E2(function(s){t=s}),cancel:t}}};function xA(e){return function(n){return e.apply(null,n)}}function _A(e){return q.isObject(e)&&e.isAxiosError===!0}const Gd={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(Gd).forEach(([e,t])=>{Gd[t]=e});function yg(e){const t=new Hi(e),n=R0(Hi.prototype.request,t);return q.extend(n,Hi.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return yg(Ui(e,s))},n}const Nt=yg(Qo);Nt.Axios=Hi,Nt.CanceledError=Ko,Nt.CancelToken=bA,Nt.isCancel=tg,Nt.VERSION=qd,Nt.toFormData=Du,Nt.AxiosError=Ne,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=xA,Nt.isAxiosError=_A,Nt.mergeConfig=Ui,Nt.AxiosHeaders=nn,Nt.formToJSON=e=>eg(q.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=mg.getAdapter,Nt.HttpStatusCode=Gd,Nt.default=Nt;const{Axios:U7,AxiosError:H7,CanceledError:j7,isCancel:$7,CancelToken:z7,VERSION:V7,all:q7,Cancel:Y7,isAxiosError:W7,spread:G7,toFormData:X7,AxiosHeaders:Q7,HttpStatusCode:K7,formToJSON:J7,getAdapter:Z7,mergeConfig:eU,create:tU}=Nt;class wA{constructor(t,n,r,s=!1,a,u){Ye(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ye(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ye(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ye(this,"baseApiUrl");Ye(this,"headers",{});Ye(this,"fetchConfig",()=>Ue(this,null,function*(){try{const t=yield Nt.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}}));Ye(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class SA{constructor(t,n,r,s=!1,a,u){Ye(this,"apiService");Ye(this,"config",null);Ye(this,"getConfig",()=>Ue(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Ye(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ye(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ye(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ye(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ye(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ye(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ye(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ye(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ye(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ye(this,"getProductField",t=>this.config?this.config[t]:"");Ye(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new wA(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const vA={copilot:"Your Search Assistant",messaging:"Commerce Client"},Tg=B.createContext(null),AA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:w=!0,showProductDescription:N=!1,componentConfig:C,conversationHistory:j,resetConversationMessage:X="",apiKey:L,apiToken:G,baseUrl:ne,customerId:de,tenantId:z,theme:ae,isDevelopment:oe,__features:pe,routingAttributes:ce,enableDownloadTranscript:se=!0,enableEscalationToAgent:Ae=!1,showProductCaptions:re=!1,children:Y})=>{const ie=e==="messaging",k=B.useMemo(()=>{const Le=ce==null?void 0:ce.isCartMgmtSupported;return Le===!0||Le==="true"},[ce]),D=B.useMemo(()=>ie?{config:null}:new SA(ne,L,G,oe,de,z),[ie,ne,L,G,oe,de,z]),Z=B.useMemo(()=>new gS(oe),[oe]);B.useEffect(()=>{ie||!D||D.config||D.getConfig()},[D,ie]);const P=B.useMemo(()=>SS(ae),[ae]),ke=B.useMemo(()=>{const Le=(y==null?void 0:y.placeholder)||m,Be=(y==null?void 0:y.buttonLabel)||b;let Ge="icon";return y!=null&&y.buttonType?Ge=y.buttonType:b&&(Ge="text"),le(H({},y||{}),{placeholder:Le,buttonLabel:Be,buttonType:Ge})},[y,m,b]),Ce=B.useMemo(()=>le(H({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||vA[e!=null?e:"copilot"]}),[r,t,n,e]),ge=B.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Ce,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:Z,searchConfig:ke,suggestionButtonConfig:x,progressStepsLimit:A,messageAlignment:v,autoScroll:w,showProductDescription:!!N,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:se,enableEscalationToAgent:Ae,showProductCaptions:!!re,resetConversationMessage:X,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:1,limit:j==null?void 0:j.limit},features:pe,isCartMgmtSupported:k}),[D,e,Ce,a,s,f,p,c,d,u,ke,x,v,w,N,C,se,Ae,re,X,Z,P,j,pe,k]);return _.jsx(Tg.Provider,{value:ge,children:Y})},at=()=>{const e=B.useContext(Tg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},bg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ji=-1;function xg(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 bg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:ji,data:{content:e}}}function _g(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!bg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return le(H({},n),{type:n.type,index:r})}function ju(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function kA(e,t){var n,r;return(r=(n=ju(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function wg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function NA(e){return e.type==="markdown"&&e.index===ji?!wg(e.data.content):!0}function CA(e){var s;const t=(s=ju(e))==null?void 0:s.response;if(!t)return null;const n=t.find(a=>a.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(a=>a.id)};const r=t.find(a=>a.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function OA(e,t){if(t.index===ji){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ji&&t.type==="markdown"){const a={type:"markdown",index:ji,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function Sg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const vg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,cartUpdating:!1};function IA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return H(le(H({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return le(H({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return le(H({},e),{conversationId:t.id});case"ADD_MESSAGE":return Sg(e.messages,t.message)?e:le(H({},e),{messages:[...e.messages,le(H({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=xg(t.token);return n?le(H({},e),{streamingBlocks:OA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Sg(e.messages,t.message))return H(H({},e),n);const r=le(H({},t.message),{type:"FLUSH_STREAMING"}),s=t.replaceMessageId?e.messages.findIndex(a=>a.id===t.replaceMessageId):-1;if(s>=0){const a=[...e.messages];return a[s]=le(H({},r),{id:e.messages[s].id}),H(le(H({},e),{messages:a}),n)}return H(le(H({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return le(H({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return H(le(H({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:le(H({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return le(H({},e),{routingResult:t.result});case"SET_ERROR":return le(H({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return le(H({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return le(H({},e),{sendError:null});case"LOAD_HISTORY":return le(H({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return le(H({},e),{sessionExpired:t.expired});case"SET_CART_UPDATING":return le(H({},e),{cartUpdating:t.isUpdating});case"RESET":return le(H({},vg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const Ag=B.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,cartUpdating:!1,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>Ue(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Ue(null,null,function*(){})}),PA=4320*60*1e3;function Xd(e,t){return`cim_af_conv_${e}_${t}`}function Qd(e,t){return Date.now()-e>t}function RA(e,t,n){try{const r=Xd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Qd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function $u(e,t,n){try{const r=Xd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Kd(e,t){try{const n=Xd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Jd(e,t){return`cim_af_ct_${e}_${t}`}function LA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(MA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function DA(e){const t=LA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function MA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function kg(e,t){try{const n=Jd(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:DA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function FA(e,t,n,r){try{const s=Jd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function BA(e,t){try{const n=Jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function UA(e,t){return`cim_af_conv_${e}_${t}`}function HA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=UA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function jA(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(s),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function $A(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function zA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function VA(e){if(e)try{e.close()}catch(t){}}function qA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function YA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Ng(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 WA(e){if(e.entryType!=="Message")return null;const n=YA(e.entryPayload).abstractMessage;if(!n)return null;const r=Ng(n,"staticContent","text")||Ng(n,"content","text")||"";if(!r)return null;const s=qA(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function GA(e){const t=[];for(const n of e){const r=WA(n);r&&t.push(r)}return t}const XA=5e3;function zu(e={}){const{routingAttributes:t,timeoutMs:n=XA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=H({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},c={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(I0,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function QA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=B.useRef(null),u=B.useRef(null),c=B.useRef(null),d=s.sinceHours*60*60*1e3,f=PA,p=B.useCallback(()=>(c.current||(c.current=jA(a.current)),c.current),[]);B.useEffect(()=>{const w=HA(t,n);a.current=w,c.current=null;const N=$A(w,()=>{const C=u.current;if(!C)return null;const j=kg(t,n);return{conversationId:C,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{Kd(t,n),u.current=null});return()=>{N(),VA(w),a.current=null}},[t,n]);const m=B.useCallback((w,N)=>Ue(null,null,function*(){var X;const C=(X=N==null?void 0:N.createIfMissing)!=null?X:!0;let j=RA(t,n,f);if(!j){const L=yield p();L&&!Qd(L.storedAt,f)&&(j=L)}if(!j){if(!C)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const L=yield w.createConversation(yield zu({routingAttributes:r}));return $u(t,n,L),u.current=L,{conversationId:L,restoredMessages:[],resumed:!1,outcome:"created"}}try{const G=(yield w.listConversations({conversationId:j.conversationId,startTimestamp:Date.now()-f})).conversations.find(de=>de.conversationId===j.conversationId&&!de.isConversationClosed);if(!G){if(Kd(t,n),!C)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const de=yield w.createConversation(yield zu({routingAttributes:r}));return $u(t,n,de),u.current=de,{conversationId:de,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}w.resumeConversation(G.conversationId),u.current=G.conversationId,$u(t,n,G.conversationId);let ne=[];try{const de=yield w.listConversationEntries(G.conversationId,{limit:s.limit,startTimestamp:Date.now()-d,direction:"FromStart"});ne=GA(de.conversationEntries)}catch(de){}return{conversationId:G.conversationId,restoredMessages:ne,resumed:!0,outcome:"resumed"}}catch(L){return{conversationId:j.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:L}}}),[t,n,r,s,d,f,p]),b=B.useCallback(w=>{$u(t,n,w),u.current=w},[t,n]),y=B.useCallback(()=>{Kd(t,n),BA(t,n),zA(a.current),u.current=null},[t,n]),x=B.useCallback(()=>{const w=kg(t,n);return w?{continuationToken:w.accessToken,lastEventId:w.lastEventId}:null},[t,n]),A=B.useCallback(()=>Ue(null,null,function*(){const w=yield p();return!(w!=null&&w.continuationToken)||Qd(w.storedAt,f)?null:{continuationToken:w.continuationToken,lastEventId:w.lastEventId}}),[f,p]),v=B.useCallback(w=>Ue(null,null,function*(){try{const{accessToken:N,lastEventId:C}=yield w.generateContinuationToken();FA(t,n,N,C)}catch(N){}}),[t,n]);return{initializeConversation:m,persistConversationId:b,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:A,persistContinuationToken:v}}const Tr={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 KA(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 $i(e){const{type:t,statusCode:n}=KA(e);if(t==="api"&&typeof n=="number")return n===429?Tr.rateLimit:n>=500?Tr.server:Tr.default;switch(t){case"network":return Tr.network;case"sse":return Tr.interrupted;case"auth":return Tr.connect;default:return Tr.default}}function Cg(e){switch(e.code){case"MAX_RECONNECT":return Tr.lost;case"ROUTING_FAILED":return Tr.routing;default:return Tr.connect}}const JA="Your session ended due to inactivity. Starting a new session…",ZA=300*1e3,ek=2e3,tk=1e4;function Jo(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function nk(e){const t=!e.timedOut,n=!!e.options.silent,r=!!e.options.reconcileMessageId;return t&&n&&r}function Og(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function Ig(e){if(Og(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function rk(e){var b;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((b=e.variants)!=null?b:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",c=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:p,display:m}}const Pg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,onProductResult:f,children:p})=>{const{logger:m,conversationHistory:b}=at(),[y,x]=B.useReducer(IA,vg),A=B.useRef(y);A.current=y;const v=QA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:b}),w=B.useRef(null),N=B.useRef(c),C=B.useRef(d),j=B.useRef(u),X=B.useRef(f),L=B.useRef(!1),G=B.useRef(!1),ne=B.useRef(!1),de=B.useRef(0),z=B.useRef(0),ae=B.useRef(0),oe=B.useRef(null),pe=B.useRef(null),ce=B.useRef([]),se=B.useRef(null),Ae=B.useCallback(()=>{x({type:"SET_CART_UPDATING",isUpdating:ce.current.some(nk)})},[]),re=B.useCallback((me,he)=>{he.outcome==="timeout"?(me.timedOut=!0,ce.current=ce.current.filter(W=>W===me||!W.timedOut)):ce.current=ce.current.filter(W=>W!==me),clearTimeout(me.timeoutId),Ae(),me.resolve(he)},[Ae]);N.current=c,C.current=d,j.current=u,X.current=f,B.useEffect(()=>{const me=new wS({baseURL:e,orgId:t,esDeveloperName:n,options:H({enableLogging:a},s?{capabilitiesVersion:s}:{})});w.current=me,me.on("connected",()=>{var W;x({type:"SET_CONNECTION_STATUS",status:"connected"}),(W=j.current)==null||W.call(j)}),me.on("disconnected",()=>{x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),me.on("reconnecting",()=>{x({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),me.on("message",W=>{var cs,ds;const fe=le(H({id:W.messageId||crypto.randomUUID()},W.messageId?{serverId:W.messageId}:{}),{role:"agent",content:W.content,timestamp:W.timestamp,sender:W.sender,raw:W});m==null||m.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:fe.id,tokensBeforeFlush:de.current,streamedFinalOnly:de.current===0}),de.current=0;const _e=Jo(ce.current),Xe=_e==null?void 0:_e.options.reconcileMessageId;x({type:"FLUSH_STREAMING",message:fe,replaceMessageId:Xe}),(cs=N.current)==null||cs.call(N,fe),_e&&re(_e,{outcome:"success"});const{messagingSessionId:ut}=W,Kt=ut?CA(W.content):null;ut&&Kt&&((ds=X.current)==null||ds.call(X,{agentSessionId:ut,kind:Kt.kind,productIds:Kt.productIds}))}),me.on("streaming_token",W=>{var fe;if(!((fe=Jo(ce.current))!=null&&fe.options.silent)){if(de.current+=1,m!=null&&m.isDevelopment){const _e=xg(W.token);_e?_e.index===ji?m.debug("🦜 streaming_token fragment (reassembled downstream)",{token:W.token}):m.debug("🦜 streaming_token parsed",{type:_e.type,index:_e.index,outputName:_e.type==="tool_results"?_e.output_name:void 0}):m.debug("🦜 streaming_token empty",{token:W.token})}x({type:"APPEND_STREAMING_TOKEN",token:W.token})}}),me.on("typing_started",()=>{var W;(W=Jo(ce.current))!=null&&W.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!0})}),me.on("typing_stopped",()=>{var W;(W=Jo(ce.current))!=null&&W.options.silent||x({type:"SET_AGENT_TYPING",isTyping:!1})}),me.on("progress_indicator",W=>{var fe;(fe=Jo(ce.current))!=null&&fe.options.silent||x({type:"ADD_PROGRESS_STEP",message:W.message})}),me.on("routing_result",W=>{var fe;if(x({type:"SET_ROUTING_RESULT",result:W}),!W.isSuccessful){const _e=`Routing failed: ${W.failureType||"unknown"}`;x({type:"SET_ERROR",error:Cg({code:"ROUTING_FAILED"})}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(fe=C.current)==null||fe.call(C,_e)}}),me.on("participant_changed",W=>{if(W.participant.name==="Automated Process")return;const fe=le(H({id:crypto.randomUUID()},W.entryId?{serverId:W.entryId}:{}),{role:"system",content:W.action==="add"?`${W.participant.name||"Agent"} joined the conversation`:`${W.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});m==null||m.log("🦜 MessagingProvider participant_changed event received",{event:W}),x({type:"ADD_MESSAGE",message:fe})}),me.on("conversation_closed",()=>{const W={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};x({type:"ADD_MESSAGE",message:W}),x({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),me.on("error",W=>{var fe;if(m==null||m.log("🦜 MessagingProvider ERROR event received",{event:W}),W.code==="SESSION_EXPIRED"){ne.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}),x({type:"SET_LOADING",isLoading:!1});return}x({type:"SET_ERROR",error:Cg(W)}),W.recoverable||x({type:"SET_CONNECTION_STATUS",status:"error"}),(fe=C.current)==null||fe.call(C,W.message)}),x({type:"SET_CONNECTION_STATUS",status:"connecting"});const he=()=>Ue(null,null,function*(){let W=v.getStoredConnectOptions(),fe=!1;W||(W=yield v.getPeerConnectOptions(),fe=!!W);try{yield me.connect(W!=null?W:void 0)}catch(Xe){if(W&&Ig(Xe))m==null||m.log("Stored token expired on connect — falling back to fresh connect"),fe||v.clearPersistedConversation(),yield me.connect();else throw Xe}yield v.persistContinuationToken(me);const _e=yield v.initializeConversation(me);if(m==null||m.log("🦜 initial connect complete",{conversationId:_e.conversationId,resumed:_e.resumed,outcome:_e.outcome,restoredMessages:_e.restoredMessages.length}),_e.outcome==="unverified-error"){_e.conversationId&&(me.resumeConversation(_e.conversationId),x({type:"SET_CONVERSATION_ID",id:_e.conversationId}));return}x({type:"SET_CONVERSATION_ID",id:_e.conversationId}),_e.resumed&&_e.restoredMessages.length>0&&x({type:"LOAD_HISTORY",messages:_e.restoredMessages})});return pe.current=he,he().catch(W=>{var fe;x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:$i(W)}),(fe=C.current)==null||fe.call(C,W.message)}),()=>{me.disconnect(),me.off(),w.current=null,pe.current=null}},[e,t,n,s,re]);const Y=B.useCallback(()=>Ue(null,null,function*(){const me=w.current;if(!me)return!1;const he=v.getStoredConnectOptions();if(!he)return m==null||m.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;m==null||m.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{me.disconnect(),yield me.connect(he)}catch(fe){if(Ig(fe))return m==null||m.log("🦜 attemptResume: token expired (401) — will start fresh",{error:fe instanceof Error?fe.message:String(fe)}),!1;throw m==null||m.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:fe instanceof Error?fe.message:String(fe)}),fe}yield v.persistContinuationToken(me);const W=yield v.initializeConversation(me,{createIfMissing:!1});return W.outcome==="not-found-or-closed"||!W.conversationId?(m==null||m.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(W.outcome==="unverified-error"&&(m==null||m.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:W.conversationId}),me.resumeConversation(W.conversationId)),m==null||m.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:W.conversationId}),x({type:"SET_CONVERSATION_ID",id:W.conversationId}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(W.conversationId),ne.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[v,m]),ie=B.useCallback(me=>Ue(null,null,function*(){var W;const he=w.current;if(he){me.options.silent||(x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield he.sendMessage(me.text)}catch(fe){const _e=$i(fe);x({type:"SET_SEND_ERROR",error:{text:me.text,displayContent:me.displayContent,options:me.options,message:_e}}),(W=C.current)==null||W.call(C,fe instanceof Error?fe.message:String(fe)),re(me,{outcome:"failure",message:_e})}}}),[re]),k=B.useCallback(me=>Ue(null,null,function*(){var W;const he=w.current;if(!(!he||L.current)){L.current=!0,G.current=!0;try{if(yield Y()){me&&(yield ie(me));return}m==null||m.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ne.current=!1,x({type:"SET_SESSION_EXPIRED",expired:!1}),x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:JA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),he.disconnect(),yield he.connect(),yield v.persistContinuationToken(he);const fe=yield he.createConversation(yield zu({routingAttributes:r}));m==null||m.log("🦜 recoverExpiredSession: new conversation created",{conversationId:fe}),x({type:"SET_CONVERSATION_ID",id:fe}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(fe),me&&(yield ie(me))}catch(fe){const _e=fe instanceof Error?fe.message:String(fe);x({type:"SET_ERROR",error:$i(fe)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(W=C.current)==null||W.call(C,_e),me&&re(me,{outcome:"failure",message:$i(fe)})}finally{L.current=!1,G.current=!1}}}),[r,v,Y,ie,m,re]),D=B.useRef(k);D.current=k;const Z=B.useCallback(()=>Ue(null,null,function*(){const me=w.current;if(!me||L.current)return;if(!A.current.conversationId&&!ne.current){me.reconnect();return}L.current=!0;const he=Ue(null,null,function*(){try{(yield Y())||(ne.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(W){ne.current=!0,x({type:"SET_SESSION_EXPIRED",expired:!0}),x({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{L.current=!1,oe.current=null}});oe.current=he,yield he}),[Y]),P=B.useRef(Z);P.current=Z,B.useEffect(()=>{const me=()=>{const ut=Date.now();ut-ae.current<ek||(ae.current=ut,P.current())},he=()=>{if(document.visibilityState==="hidden"){z.current=Date.now();return}const ut=w.current;if(!ut)return;const Kt=z.current?Date.now()-z.current:0;z.current=0,(ne.current||!ut.isConnected||Kt>ZA)&&me()},W=ut=>{ut.persisted&&me()},fe=()=>{z.current=Date.now()},_e=()=>me(),Xe=()=>me();return document.addEventListener("visibilitychange",he),window.addEventListener("pageshow",W),window.addEventListener("pagehide",fe),document.addEventListener("resume",_e),window.addEventListener("online",Xe),()=>{document.removeEventListener("visibilitychange",he),window.removeEventListener("pageshow",W),window.removeEventListener("pagehide",fe),document.removeEventListener("resume",_e),window.removeEventListener("online",Xe)}},[]);const ke=B.useCallback((me,he)=>Ue(null,null,function*(){var fe;const W=w.current;if(!W){re(me,{outcome:"failure",message:"Messaging is unavailable"});return}if(ne.current){yield D.current(me);return}try{yield W.sendMessage(me.text)}catch(_e){if(Og(_e)){yield D.current(me);return}const Xe=$i(_e);x({type:"SET_SEND_ERROR",error:he(Xe)}),(fe=C.current)==null||fe.call(C,_e instanceof Error?_e.message:String(_e)),re(me,{outcome:"failure",message:Xe})}}),[re]),Ce=B.useCallback(me=>Ue(null,null,function*(){const he=oe.current;he&&(yield he),yield me()}),[]),ge=B.useCallback((me,he,W={})=>new Promise(fe=>{if(!w.current){fe({outcome:"failure",message:"Messaging is unavailable"});return}const Xe={};Object.assign(Xe,{text:me,displayContent:he,options:W,resolve:fe,timeoutId:setTimeout(()=>{x({type:"SET_LOADING",isLoading:!1}),re(Xe,{outcome:"timeout"})},tk)}),ce.current.push(Xe),Ae(),x({type:"CLEAR_SEND_ERROR"}),W.silent||(x({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:he!=null?he:me,timestamp:new Date().toISOString()}}),x({type:"SET_LOADING",isLoading:!0}),x({type:"SET_PROGRESS_MESSAGE",message:""})),Ce(()=>ke(Xe,ut=>({text:me,displayContent:he,options:W,message:ut})))}),[ke,Ce,re,Ae]),Le=B.useCallback((me,he)=>{if(!me.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const W=()=>ge(me,he==null?void 0:he.displayContent,he),fe=se.current?se.current.then(W):W(),_e=fe.then(()=>{});return se.current=_e,_e.finally(()=>{se.current===_e&&(se.current=null)}),fe},[ge]),Be=B.useCallback(me=>{if(!w.current)return;const{prompt:he,display:W}=rk(me);ge(he,W)},[ge]),Ge=B.useCallback(()=>{const me=w.current,he=A.current.sendError;if(!me||!he)return;const W=()=>G.current?Promise.resolve({outcome:"failure",message:he.message}):ge(he.text,he.displayContent,he.options),fe=se.current?se.current.then(W):W(),_e=fe.then(()=>{});return se.current=_e,_e.finally(()=>{se.current===_e&&(se.current=null)}),fe},[ge]),dt=B.useCallback(()=>{const me=w.current,he=pe.current;!me||!he||(ne.current=!1,me.disconnect(),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),he().catch(W=>{var fe;x({type:"SET_CONNECTION_STATUS",status:"error"}),x({type:"SET_ERROR",error:$i(W)}),(fe=C.current)==null||fe.call(C,W.message)}))},[]),Vt=B.useCallback(()=>{const me=w.current;me&&(ne.current=!1,v.clearPersistedConversation(),x({type:"RESET"}),x({type:"SET_CONNECTION_STATUS",status:"connecting"}),me.endConversation().then(()=>(me.disconnect(),me.connect())).then(()=>Ue(null,null,function*(){return yield v.persistContinuationToken(me),me.createConversation(yield zu({routingAttributes:r}))})).then(he=>{x({type:"SET_CONVERSATION_ID",id:he}),x({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(he)}).catch(he=>{var W;x({type:"SET_ERROR",error:$i(he)}),x({type:"SET_CONNECTION_STATUS",status:"error"}),(W=C.current)==null||W.call(C,he.message)}))},[r,v]),Lt=B.useCallback(()=>Ue(null,null,function*(){var fe;const me=w.current;if(!me)return;const he=yield me.retrieveConversationTranscript(),W=URL.createObjectURL(he);try{const _e=document.createElement("a");_e.href=W,_e.download=`transcript-${(fe=me.conversationId)!=null?fe:"conversation"}.pdf`,document.body.appendChild(_e),_e.click(),_e.remove()}finally{URL.revokeObjectURL(W)}}),[]),Qt=y.connectionStatus==="connected"&&y.conversationId!==null;B.useEffect(()=>{CS(Qt)},[Qt]);const kn=B.useMemo(()=>({connectionStatus:y.connectionStatus,isConnected:Qt,isAgentTyping:y.isAgentTyping,conversationId:y.conversationId,messages:y.messages,streamingBlocks:y.streamingBlocks,progressMessage:y.progressMessage,progressSteps:y.progressSteps,error:y.error,sendError:y.sendError,loading:y.loading,sessionExpired:y.sessionExpired,cartUpdating:y.cartUpdating,sendMessage:Le,addToCart:Be,resetConversation:Vt,retryLastMessage:Ge,retryConnection:dt,downloadTranscript:Lt}),[y,Qt,Le,Be,Vt,Ge,dt,Lt]);return _.jsx(Ag.Provider,{value:kn,children:p})};var Rg=Symbol.for("immer-nothing"),Lg=Symbol.for("immer-draftable"),Ln=Symbol.for("immer-state");function rr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ds=Object.getPrototypeOf;function Ms(e){return!!e&&!!e[Ln]}function zi(e){var t;return e?Dg(e)||Array.isArray(e)||!!e[Lg]||!!((t=e.constructor)!=null&&t[Lg])||Zo(e)||Yu(e):!1}var ik=Object.prototype.constructor.toString();function Dg(e){if(!e||typeof e!="object")return!1;const t=Ds(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===ik}function Vu(e,t){qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function qu(e){const t=e[Ln];return t?t.type_:Array.isArray(e)?1:Zo(e)?2:Yu(e)?3:0}function Zd(e,t){return qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Mg(e,t,n){const r=qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function sk(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zo(e){return e instanceof Map}function Yu(e){return e instanceof Set}function Vi(e){return e.copy_||e.base_}function ef(e,t){if(Zo(e))return new Map(e);if(Yu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Dg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ln];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Ds(e),r)}else{const r=Ds(e);if(r!==null&&n)return H({},e);const s=Object.create(r);return Object.assign(s,e)}}function tf(e,t=!1){return Gu(e)||Ms(e)||!zi(e)||(qu(e)>1&&Object.defineProperties(e,{set:{value:Wu},add:{value:Wu},clear:{value:Wu},delete:{value:Wu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>tf(n,!0))),e}function Wu(){rr(2)}function Gu(e){return Object.isFrozen(e)}var ok={};function qi(e){const t=ok[e];return t||rr(0,e),t}var ea;function Fg(){return ea}function ak(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Bg(e,t){t&&(qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function nf(e){rf(e),e.drafts_.forEach(uk),e.drafts_=null}function rf(e){e===ea&&(ea=e.parent_)}function Ug(e){return ea=ak(ea,e)}function uk(e){const t=e[Ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Hg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ln].modified_&&(nf(t),rr(4)),zi(e)&&(e=Xu(t,e),t.parent_||Qu(t,e)),t.patches_&&qi("Patches").generateReplacementPatches_(n[Ln].base_,e,t.patches_,t.inversePatches_)):e=Xu(t,n,[]),nf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Rg?e:void 0}function Xu(e,t,n){if(Gu(t))return t;const r=t[Ln];if(!r)return Vu(t,(s,a)=>jg(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Qu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),Vu(a,(c,d)=>jg(e,r,s,c,d,n,u)),Qu(e,s,!1),n&&e.patches_&&qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function jg(e,t,n,r,s,a,u){if(Ms(s)){const c=a&&t&&t.type_!==3&&!Zd(t.assigned_,r)?a.concat(r):void 0,d=Xu(e,s,c);if(Mg(n,r,d),Ms(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(zi(s)&&!Gu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Xu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Zo(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Qu(e,s)}}function Qu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tf(t,n)}function lk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=sf;n&&(s=[r],a=ta);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var sf={get(e,t){if(t===Ln)return e;const n=Vi(e);if(!Zd(n,t))return ck(e,n,t);const r=n[t];return e.finalized_||!zi(r)?r:r===of(e.base_,t)?(uf(e),e.copy_[t]=lf(r,e)):r},has(e,t){return t in Vi(e)},ownKeys(e){return Reflect.ownKeys(Vi(e))},set(e,t,n){const r=$g(Vi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=of(Vi(e),t),a=s==null?void 0:s[Ln];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(sk(n,s)&&(n!==void 0||Zd(e.base_,t)))return!0;uf(e),af(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return of(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,uf(e),af(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){rr(11)},getPrototypeOf(e){return Ds(e.base_)},setPrototypeOf(){rr(12)}},ta={};Vu(sf,(e,t)=>{ta[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ta.deleteProperty=function(e,t){return ta.set.call(this,e,t,void 0)},ta.set=function(e,t,n){return sf.set.call(this,e[0],t,n,e[0])};function of(e,t){const n=e[Ln];return(n?Vi(n):e)[t]}function ck(e,t,n){var s;const r=$g(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function $g(e,t){if(!(t in e))return;let n=Ds(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ds(n)}}function af(e){e.modified_||(e.modified_=!0,e.parent_&&af(e.parent_))}function uf(e){e.copy_||(e.copy_=ef(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var dk=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&rr(6),r!==void 0&&typeof r!="function"&&rr(7);let s;if(zi(t)){const a=Ug(this),u=lf(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?nf(a):rf(a)}return Bg(a,r),Hg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Rg&&(s=void 0),this.autoFreeze_&&tf(s,!0),r){const a=[],u=[];qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else rr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){zi(e)||rr(8),Ms(e)&&(e=fk(e));const t=Ug(this),n=lf(e,void 0);return n[Ln].isManual_=!0,rf(t),n}finishDraft(e,t){const n=e&&e[Ln];(!n||!n.isManual_)&&rr(9);const{scope_:r}=n;return Bg(r,t),Hg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=qi("Patches").applyPatches_;return Ms(e)?r(e,t):this.produce(e,s=>r(s,t))}};function lf(e,t){const n=Zo(e)?qi("MapSet").proxyMap_(e,t):Yu(e)?qi("MapSet").proxySet_(e,t):lk(e,t);return(t?t.scope_:Fg()).drafts_.push(n),n}function fk(e){return Ms(e)||rr(10,e),zg(e)}function zg(e){if(!zi(e)||Gu(e))return e;const t=e[Ln];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ef(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ef(e,!0);return Vu(n,(r,s)=>{Mg(n,r,zg(s))}),t&&(t.finalized_=!1),n}var hk=new dk,pk=hk.produce;function mk(e,t,n){var r=B.useMemo(function(){return pk(e)},[e]);return B.useReducer(r,t,n)}const pt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Vg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},gk=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),qg=B.createContext(null),Yg=B.createContext(null),Ek=({children:e,dispatch:t})=>{const n=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),c=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=B.useCallback(x=>{t({type:pt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,c,d,f,p,m,b]);return _.jsx(Yg.Provider,{value:y,children:e})},yk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case pt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case pt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case pt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case pt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case pt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case pt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case pt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case pt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case pt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case pt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case pt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case pt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case pt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case pt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case pt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Tk=({promptsConfig:e,children:t})=>{const[n,r]=mk(yk,le(H(H({},Vg),e||{}),{staticQuestions:gk((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(qg.Provider,{value:n,children:_.jsx(Ek,{dispatch:r,children:t})})};function bk(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function xk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function _k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var cf=typeof window!="undefined",Ku=function(e){B.useEffect(e,[])},wk=function(e){var t=B.useRef(e);t.current=e,Ku(function(){return function(){return t.current()}})},Sk=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],s=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return wk(function(){cancelAnimationFrame(t.current)}),[r,a]},vk=function(e,t){return e===t};function Ak(e,t){t===void 0&&(t=vk);var n=B.useRef(),r=B.useRef(e),s=bk();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var kk=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=Sk({width:cf?window.innerWidth:r,height:cf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(cf){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return xk(window,"resize",p),function(){_k(window,"resize",p)}}},[]),d};const Wg=B.createContext({mode:it.modeProxy.mode,entryType:it.entryType,status:it.statusProxy,dialogPosition:it.dialogProxy.position,isDialogFullHeight:it.dialogProxy.isFullHeight,dialogWidth:it.dialogProxy.width,isModalFullscreen:it.modalProxy.isFullscreen,previousComponentType:it.statusProxy.type}),Nk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=B.useState(e!=null?e:it.entryTypeProxy.entryType),[u,c]=B.useState(it.modeProxy.mode),[d,f]=B.useState({type:n||it.statusProxy.type,isOpen:it.statusProxy.isOpen,isMinimized:it.statusProxy.isMinimized}),[p,m]=B.useState(it.dialogProxy.position),[b,y]=B.useState(it.dialogProxy.isFullHeight),[x,A]=B.useState(it.dialogProxy.width),[v,w]=B.useState(it.modalProxy.isFullscreen),N=Ak(d.type);B.useEffect(()=>{const j=X=>{const{property:L,value:G}=X.detail||{};if(!(!L||G===void 0)){if(L==="mode"){c(G);return}if(L==="entryType"){a(G);return}if(L==="isMinimized"){f(ne=>le(H({},ne),{isMinimized:G}));return}if(L==="isOpen"){f(ne=>le(H({},ne),{isOpen:G}));return}if(L==="type"){f(ne=>le(H({},ne),{type:G}));return}if(L==="position"){m(G);return}if(L==="isFullHeight"){y(G);return}if(L==="width"){A(G);return}if(L==="isFullscreen"){w(G);return}}};return AS(j),()=>{kS(j)}},[]),Ku(()=>{e&&P0(e)}),Ku(()=>{const j=n||(t==null?void 0:t.type);j&&Ou(j),t&&"isOpen"in t&&Br(!!t.isOpen),t&&"isMinimized"in t&&Cu(!!t.isMinimized)}),Ku(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:j}=t.options;j&&Rd(j),"dialogFullHeight"in t.options&&OS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&A(t.options.dialogWidth),"isModalFullscreen"in t.options&&Pd(!!t.options.isModalFullscreen)});const C=B.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:N||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:x,isModalFullscreen:v}),[u,s,d,N,p,b,x,v]);return _.jsx(Wg.Provider,{value:C,children:r})},Ck={productId:qo.productId,pdpLink:qo.pdpLink},Gg=B.createContext(Ck),Ok=({children:e})=>{const[t,n]=B.useState(qo.productId),[r,s]=B.useState(qo.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return fS(u),()=>{hS(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(Gg.Provider,{value:a,children:e})},Ik=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){yt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){yt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(c)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(yt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(yt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),yt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const c=setTimeout(()=>{a||(a=!0,yt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Xg=B.createContext({overrides:{},isInitialized:!1}),Pk=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=B.useState({}),[a,u]=B.useState(!1);B.useEffect(()=>{Ue(null,null,function*(){let f={};e?(yt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield Ik(e)):t&&typeof t=="object"?(yt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(yt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const c=B.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(Xg.Provider,{value:c,children:n})},Qg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:b,entryType:y,initialEntry:x,entryMessage:A,disclaimerText:v,disclaimerMarkdown:w,clientContext:N,searchPlaceholder:C,searchButtonLabel:j,searchConfig:X,suggestionButtonConfig:L,messageAlignment:G,autoScroll:ne,promptsConfig:de,showProductDescription:z,resetConversationMessage:ae,conversationHistory:oe,messagingConfig:pe,overrides:ce,overridesUrl:se,inlineOverrides:Ae,__features:re,children:Y})=>{const ie=B.useRef(!1);return ie.current||(ie.current=!0,ES({initialEntry:x,entryType:y,isDevelopment:p})),_.jsx(AA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:A,theme:c,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:C,searchButtonLabel:j,searchConfig:X,suggestionButtonConfig:L,messageAlignment:G,autoScroll:ne,showProductDescription:z,componentConfig:b,clientContext:N,disclaimerMarkdown:w,disclaimerText:v,resetConversationMessage:ae,conversationHistory:oe,isDevelopment:p,__features:re,progressStepsLimit:pe==null?void 0:pe.progressStepsLimit,routingAttributes:pe==null?void 0:pe.routingAttributes,enableDownloadTranscript:pe==null?void 0:pe.enableDownloadTranscript,enableEscalationToAgent:pe==null?void 0:pe.enableEscalationToAgent,showProductCaptions:pe==null?void 0:pe.showProductCaptions,children:_.jsx(Nk,{entryType:y!=null?y:x==null?void 0:x.type,componentConfig:b,componentType:m,children:_.jsx(Ok,{children:_.jsx(Tk,{promptsConfig:de,children:_.jsx(Pk,{overridesUrl:se,inlineOverrides:Ae||ce,children:_.jsx(Pg,{scrt2Url:(pe==null?void 0:pe.scrt2Url)||"",orgId:(pe==null?void 0:pe.orgId)||"",esDeveloperName:(pe==null?void 0:pe.esDeveloperName)||"",routingAttributes:(pe==null?void 0:pe.routingAttributes)||{},capabilitiesVersion:pe==null?void 0:pe.capabilitiesVersion,enableLogging:p,onProductResult:pe==null?void 0:pe.onProductResult,children:Y})})})})})})},ri=()=>{const e=B.useContext(Wg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var df={exports:{}},xn={},ff={exports:{}},hf={};var Kg;function Rk(){return Kg||(Kg=1,(function(e){function t(Y,ie){var k=Y.length;Y.push(ie);e:for(;0<k;){var D=k-1>>>1,Z=Y[D];if(0<s(Z,ie))Y[D]=ie,Y[k]=Z,k=D;else break e}}function n(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var ie=Y[0],k=Y.pop();if(k!==ie){Y[0]=k;e:for(var D=0,Z=Y.length,P=Z>>>1;D<P;){var ke=2*(D+1)-1,Ce=Y[ke],ge=ke+1,Le=Y[ge];if(0>s(Ce,k))ge<Z&&0>s(Le,Ce)?(Y[D]=Le,Y[ge]=k,D=ge):(Y[D]=Ce,Y[ke]=k,D=ke);else if(ge<Z&&0>s(Le,k))Y[D]=Le,Y[ge]=k,D=ge;else break e}}return ie}function s(Y,ie){var k=Y.sortIndex-ie.sortIndex;return k!==0?k:Y.id-ie.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=[],f=[],p=1,m=null,b=3,y=!1,x=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Y){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Y)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function j(Y){if(A=!1,C(Y),!x)if(n(d)!==null)x=!0,Ae(X);else{var ie=n(f);ie!==null&&re(j,ie.startTime-Y)}}function X(Y,ie){x=!1,A&&(A=!1,w(ne),ne=-1),y=!0;var k=b;try{for(C(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Y&&!ae());){var D=m.callback;if(typeof D=="function"){m.callback=null,b=m.priorityLevel;var Z=D(m.expirationTime<=ie);ie=e.unstable_now(),typeof Z=="function"?m.callback=Z:m===n(d)&&r(d),C(ie)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var ke=n(f);ke!==null&&re(j,ke.startTime-ie),P=!1}return P}finally{m=null,b=k,y=!1}}var L=!1,G=null,ne=-1,de=5,z=-1;function ae(){return!(e.unstable_now()-z<de)}function oe(){if(G!==null){var Y=e.unstable_now();z=Y;var ie=!0;try{ie=G(!0,Y)}finally{ie?pe():(L=!1,G=null)}}else L=!1}var pe;if(typeof N=="function")pe=function(){N(oe)};else if(typeof MessageChannel!="undefined"){var ce=new MessageChannel,se=ce.port2;ce.port1.onmessage=oe,pe=function(){se.postMessage(null)}}else pe=function(){v(oe,0)};function Ae(Y){G=Y,L||(L=!0,pe())}function re(Y,ie){ne=v(function(){Y(e.unstable_now())},ie)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,Ae(X))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Y){switch(b){case 1:case 2:case 3:var ie=3;break;default:ie=b}var k=b;b=ie;try{return Y()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,ie){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var k=b;b=Y;try{return ie()}finally{b=k}},e.unstable_scheduleCallback=function(Y,ie,k){var D=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?D+k:D):k=D,Y){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=k+Z,Y={id:p++,callback:ie,priorityLevel:Y,startTime:k,expirationTime:Z,sortIndex:-1},k>D?(Y.sortIndex=k,t(f,Y),n(d)===null&&Y===n(f)&&(A?(w(ne),ne=-1):A=!0,re(j,k-D))):(Y.sortIndex=Z,t(d,Y),x||y||(x=!0,Ae(X))),Y},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(Y){var ie=b;return function(){var k=b;b=ie;try{return Y.apply(this,arguments)}finally{b=k}}}})(hf)),hf}var Jg;function Lk(){return Jg||(Jg=1,ff.exports=Rk()),ff.exports}var Zg;function Dk(){if(Zg)return xn;Zg=1;var e=er(),t=Lk();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function A(i,o,l,h,E,T,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=S}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function N(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,l,E,h)&&(l=null),h||E===null?b(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),L=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),ae=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),re=Symbol.for("react.offscreen"),Y=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,D;function Z(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
17
- `+D+i}var P=!1;function ke(i,o){if(!i||P)return"";P=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(ee){var h=ee}Reflect.construct(i,[],o)}else{try{o.call()}catch(ee){h=ee}i.call(o.prototype)}else{try{throw Error()}catch(ee){h=ee}i()}}catch(ee){if(ee&&h&&typeof ee.stack=="string"){for(var E=ee.stack.split(`
14
+ `),l=u===-1?-1:a.indexOf(`
15
+ `,u+1),d=l===-1?"":a.slice(l+1);String(r.stack).endsWith(d)||(r.stack+=`
16
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=zi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ju.assertOptions(r,{silentJSONParsing:on.transitional(on.boolean),forcedJSONParsing:on.transitional(on.boolean),clarifyTimeoutError:on.transitional(on.boolean),legacyInterceptorReqResOrdering:on.transitional(on.boolean),advertiseZstdAcceptEncoding:on.transitional(on.boolean),validateStatusUndefinedResolves:on.transitional(on.boolean)},!1),s!=null&&(Y.isFunction(s)?n.paramsSerializer={serialize:s}:ju.assertOptions(s,{encode:on.function,serialize:on.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ju.assertOptions(n,{baseUrl:on.spelling("baseURL"),withXsrfToken:on.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete a[b]}),n.headers=sn.concat(u,a);const l=[];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||jd;A&&A.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,x;if(!d){const b=[Eg.bind(this),void 0];for(b.unshift(...l),b.push(...f),x=b.length,p=Promise.resolve(n);m<x;)p=p.then(b[m++],b[m++]);return p}x=l.length;let y=n;for(;m<x;){const b=l[m++],v=l[m++];try{y=b(y)}catch(A){v.call(this,A);break}}try{p=Eg.call(this,y)}catch(b){return Promise.reject(b)}for(m=0,x=f.length;m<x;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=zi(this.defaults,t);const n=ag(t.baseURL,t.url,t.allowAbsoluteUrls,t);return K0(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Vi.prototype[t]=function(n,r){return this.request(zi(r||{},{method:t,url:n,data:r&&Y.hasOwnProp(r,"data")?r.data:void 0}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(zi(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Vi.prototype[t]=n(),t!=="query"&&(Vi.prototype[t+"Form"]=n(!0))});let bA=class E2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(l=>{r.subscribe(l),a=l}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new Jo(a,u,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new E2(function(s){t=s}),cancel:t}}};function xA(e){return function(n){return e.apply(null,n)}}function _A(e){return Y.isObject(e)&&e.isAxiosError===!0}const Gd={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(Gd).forEach(([e,t])=>{Gd[t]=e});function Tg(e){const t=new Vi(e),n=L0(Vi.prototype.request,t);return Y.extend(n,Vi.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Tg(zi(e,s))},n}const Pt=Tg(Ko);Pt.Axios=Vi,Pt.CanceledError=Jo,Pt.CancelToken=bA,Pt.isCancel=ng,Pt.VERSION=qd,Pt.toFormData=Mu,Pt.AxiosError=Ne,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=xA,Pt.isAxiosError=_A,Pt.mergeConfig=zi,Pt.AxiosHeaders=sn,Pt.formToJSON=e=>tg(Y.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=gg.getAdapter,Pt.HttpStatusCode=Gd,Pt.default=Pt;const{Axios:$7,AxiosError:z7,CanceledError:V7,isCancel:q7,CancelToken:Y7,VERSION:W7,all:G7,Cancel:X7,isAxiosError:Q7,spread:K7,toFormData:J7,AxiosHeaders:Z7,HttpStatusCode:eU,formToJSON:tU,getAdapter:nU,mergeConfig:rU,create:iU}=Pt;class wA{constructor(t,n,r,s=!1,a,u){Xe(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Xe(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Xe(this,"CIMULATE_SEARCH_API_PATH","api/v1");Xe(this,"baseApiUrl");Xe(this,"headers",{});Xe(this,"fetchConfig",()=>Fe(this,null,function*(){try{const t=yield Pt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Xe(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class SA{constructor(t,n,r,s=!1,a,u){Xe(this,"apiService");Xe(this,"config",null);Xe(this,"getConfig",()=>Fe(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Xe(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Xe(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Xe(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Xe(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Xe(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Xe(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Xe(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Xe(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Xe(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Xe(this,"getProductField",t=>this.config?this.config[t]:"");Xe(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new wA(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const vA={copilot:"Your Search Assistant",messaging:"Commerce Client"},bg=D.createContext(null),AA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:x,searchConfig:y,suggestionButtonConfig:b,progressStepsLimit:v=3,messageAlignment:A="start",autoScroll:w=!0,showProductDescription:k=!1,componentConfig:I,conversationHistory:U,resetConversationMessage:G="",apiKey:L,apiToken:V,baseUrl:ie,customerId:le,tenantId:z,theme:oe,isDevelopment:te,__features:fe,routingAttributes:he,enableDownloadTranscript:de=!0,enableEscalationToAgent:we=!1,showProductCaptions:ce=!1,children:W})=>{const re=e==="messaging",N=D.useMemo(()=>{const Le=he==null?void 0:he.isCartMgmtSupported;return Le===!0||Le==="true"},[he]),M=D.useMemo(()=>re?{config:null}:new SA(ie,L,V,te,le,z),[re,ie,L,V,te,le,z]),J=D.useMemo(()=>new gS(te),[te]);D.useEffect(()=>{re||!M||M.config||M.getConfig()},[M,re]);const P=D.useMemo(()=>SS(oe),[oe]),Ae=D.useMemo(()=>{const Le=(y==null?void 0:y.placeholder)||m,je=(y==null?void 0:y.buttonLabel)||x;let Ke="icon";return y!=null&&y.buttonType?Ke=y.buttonType:x&&(Ke="text"),ue(j({},y||{}),{placeholder:Le,buttonLabel:je,buttonType:Ke})},[y,m,x]),Ce=D.useMemo(()=>ue(j({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||vA[e!=null?e:"copilot"]}),[r,t,n,e]),ge=D.useMemo(()=>({configModule:M,mode:e!=null?e:"copilot",headerConfig:Ce,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:J,searchConfig:Ae,suggestionButtonConfig:b,progressStepsLimit:v,messageAlignment:A,autoScroll:w,showProductDescription:!!k,enableMinimize:!!(I!=null&&I.enableMinimize),enableDownloadTranscript:de,enableEscalationToAgent:we,showProductCaptions:!!ce,resetConversationMessage:G,conversationHistory:{sinceHours:typeof(U==null?void 0:U.sinceHours)=="number"?U.sinceHours:1,limit:U==null?void 0:U.limit},features:fe,isCartMgmtSupported:N}),[M,e,Ce,a,s,f,p,l,d,u,Ae,b,A,w,k,I,de,we,ce,G,J,P,U,fe,N]);return _.jsx(bg.Provider,{value:ge,children:W})},ct=()=>{const e=D.useContext(bg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},xg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],qi=-1;function _g(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 xg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:qi,data:{content:e}}}function wg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!xg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ue(j({},n),{type:n.type,index:r})}function $u(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function NA(e,t){var n,r;return(r=(n=$u(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function Sg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function kA(e){return e.type==="markdown"&&e.index===qi?!Sg(e.data.content):!0}function CA(e){var s;const t=(s=$u(e))==null?void 0:s.response;if(!t)return null;const n=t.find(a=>a.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(a=>a.id)};const r=t.find(a=>a.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function OA(e,t){if(t.index===qi){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===qi&&t.type==="markdown"){const a={type:"markdown",index:qi,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function vg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const Ag={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,cartUpdating:!1};function IA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return j(ue(j({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ue(j({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ue(j({},e),{conversationId:t.id});case"ADD_MESSAGE":return vg(e.messages,t.message)?e:ue(j({},e),{messages:[...e.messages,ue(j({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=_g(t.token);return n?ue(j({},e),{streamingBlocks:OA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(vg(e.messages,t.message))return j(j({},e),n);const r=ue(j({},t.message),{type:"FLUSH_STREAMING"}),s=t.replaceMessageId?e.messages.findIndex(a=>a.id===t.replaceMessageId):-1;if(s>=0){const a=[...e.messages];return a[s]=ue(j({},r),{id:e.messages[s].id}),j(ue(j({},e),{messages:a}),n)}return j(ue(j({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ue(j({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return j(ue(j({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ue(j({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ue(j({},e),{routingResult:t.result});case"SET_ERROR":return ue(j({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ue(j({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ue(j({},e),{sendError:null});case"LOAD_HISTORY":return ue(j({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ue(j({},e),{sessionExpired:t.expired});case"SET_CART_UPDATING":return ue(j({},e),{cartUpdating:t.isUpdating});case"RESET":return ue(j({},Ag),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const Ng=D.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,cartUpdating:!1,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>Fe(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Fe(null,null,function*(){})}),PA=4320*60*1e3;function Xd(e,t){return`cim_af_conv_${e}_${t}`}function Qd(e,t){return Date.now()-e>t}function RA(e,t,n){try{const r=Xd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Qd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function zu(e,t,n){try{const r=Xd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Kd(e,t){try{const n=Xd(e,t);sessionStorage.removeItem(n)}catch(n){}}function Jd(e,t){return`cim_af_ct_${e}_${t}`}function LA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(MA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function DA(e){const t=LA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function MA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function kg(e,t){try{const n=Jd(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:DA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function FA(e,t,n,r){try{const s=Jd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function BA(e,t){try{const n=Jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function UA(e,t){return`cim_af_conv_${e}_${t}`}function HA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=UA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function jA(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var l;r||((l=u.data)==null?void 0:l.type)==="conversation_response"&&(r=!0,clearTimeout(s),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function $A(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(l){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function zA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function VA(e){if(e)try{e.close()}catch(t){}}function qA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function YA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Cg(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 WA(e){if(e.entryType!=="Message")return null;const n=YA(e.entryPayload).abstractMessage;if(!n)return null;const r=Cg(n,"staticContent","text")||Cg(n,"content","text")||"";if(!r)return null;const s=qA(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function GA(e){const t=[];for(const n of e){const r=WA(n);r&&t.push(r)}return t}const XA=5e3;function Vu(e={}){const{routingAttributes:t,timeoutMs:n=XA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=j({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},l={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(P0,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function QA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=D.useRef(null),u=D.useRef(null),l=D.useRef(null),d=s.sinceHours*60*60*1e3,f=PA,p=D.useCallback(()=>(l.current||(l.current=jA(a.current)),l.current),[]);D.useEffect(()=>{const w=HA(t,n);a.current=w,l.current=null;const k=$A(w,()=>{const I=u.current;if(!I)return null;const U=kg(t,n);return{conversationId:I,continuationToken:U==null?void 0:U.accessToken,lastEventId:U==null?void 0:U.lastEventId}},()=>{Kd(t,n),u.current=null});return()=>{k(),VA(w),a.current=null}},[t,n]);const m=D.useCallback((w,k)=>Fe(null,null,function*(){var G;const I=(G=k==null?void 0:k.createIfMissing)!=null?G:!0;let U=RA(t,n,f);if(!U){const L=yield p();L&&!Qd(L.storedAt,f)&&(U=L)}if(!U){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const L=yield w.createConversation(yield Vu({routingAttributes:r}));return zu(t,n,L),u.current=L,{conversationId:L,restoredMessages:[],resumed:!1,outcome:"created"}}try{const V=(yield w.listConversations({conversationId:U.conversationId,startTimestamp:Date.now()-f})).conversations.find(le=>le.conversationId===U.conversationId&&!le.isConversationClosed);if(!V){if(Kd(t,n),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const le=yield w.createConversation(yield Vu({routingAttributes:r}));return zu(t,n,le),u.current=le,{conversationId:le,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}w.resumeConversation(V.conversationId),u.current=V.conversationId,zu(t,n,V.conversationId);let ie=[];try{const le=yield w.listConversationEntries(V.conversationId,{limit:s.limit,startTimestamp:Date.now()-d,direction:"FromStart"});ie=GA(le.conversationEntries)}catch(le){}return{conversationId:V.conversationId,restoredMessages:ie,resumed:!0,outcome:"resumed"}}catch(L){return{conversationId:U.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:L}}}),[t,n,r,s,d,f,p]),x=D.useCallback(w=>{zu(t,n,w),u.current=w},[t,n]),y=D.useCallback(()=>{Kd(t,n),BA(t,n),zA(a.current),u.current=null},[t,n]),b=D.useCallback(()=>{const w=kg(t,n);return w?{continuationToken:w.accessToken,lastEventId:w.lastEventId}:null},[t,n]),v=D.useCallback(()=>Fe(null,null,function*(){const w=yield p();return!(w!=null&&w.continuationToken)||Qd(w.storedAt,f)?null:{continuationToken:w.continuationToken,lastEventId:w.lastEventId}}),[f,p]),A=D.useCallback(w=>Fe(null,null,function*(){try{const{accessToken:k,lastEventId:I}=yield w.generateContinuationToken();FA(t,n,k,I)}catch(k){}}),[t,n]);return{initializeConversation:m,persistConversationId:x,clearPersistedConversation:y,getStoredConnectOptions:b,getPeerConnectOptions:v,persistContinuationToken:A}}const KA="Your session ended due to inactivity. Starting a new session…",JA=300*1e3,ZA=2e3,eN=1e4,tN=15e3,nN=2;function Zo(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function rN(e){const t=!e.timedOut,n=!!e.options.silent,r=!!e.options.reconcileMessageId;return t&&n&&r}function Og(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function Zd(e){if(Og(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function iN(e){var x;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((x=e.variants)!=null?x:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",l=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:p,display:m}}function sN({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=tN,logger:f,isRecoveryInFlight:p}){const m=D.useRef(u);m.current=u;const x=D.useRef(l);x.current=l;const y=D.useRef(f);y.current=f;const b=D.useRef(p);b.current=p;const v=D.useRef(0),A=D.useRef(!1),w=D.useRef(0),[k,I]=D.useState(0);D.useEffect(()=>{if(!t||n){v.current=0,A.current=!1,w.current=0;return}const U=a||v.current>0;if(!(s&&U&&e==="connected"&&!r&&!A.current))return;const L=setTimeout(()=>{Fe(null,null,function*(){var z,oe;if((z=b.current)!=null&&z.call(b)){if(w.current+=1,w.current>nN){A.current=!0,x.current();return}I(te=>te+1);return}const V=v.current,ie=m.current;if(V>=ie.length){A.current=!0,x.current();return}w.current=0,(oe=y.current)==null||oe.warn("🦜 connect bootstrap stalled",{attempt:V});let le;try{yield Promise.race([Promise.resolve(ie[V]()),new Promise((te,fe)=>{le=setTimeout(()=>{fe(new Error("connect bootstrap step timed out"))},d)})])}catch(te){}finally{le!==void 0&&clearTimeout(le),v.current=V+1,I(te=>te+1)}})},d);return()=>{clearTimeout(L)}},[e,t,n,r,s,a,d,k])}const _r={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function oN(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 oi(e){const{type:t,statusCode:n}=oN(e);if(t==="api"&&typeof n=="number")return n===429?_r.rateLimit:n>=500?_r.server:_r.default;switch(t){case"network":return _r.network;case"sse":return _r.interrupted;case"auth":return _r.connect;default:return _r.default}}function Ig(e){switch(e.code){case"MAX_RECONNECT":return _r.lost;case"ROUTING_FAILED":return _r.routing;default:return _r.connect}}const Pg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,children:p})=>{const{logger:m,conversationHistory:x}=ct(),[y,b]=D.useReducer(IA,Ag),[v,A]=D.useState(!1),[w,k]=D.useState(!1),I=D.useRef(y);I.current=y;const U=QA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:x}),G=D.useRef(null),L=D.useRef(l),V=D.useRef(d),ie=D.useRef(u),le=D.useRef(f),z=D.useRef(!1),oe=D.useRef(!1),te=D.useRef(!1),fe=D.useRef(0),he=D.useRef(0),de=D.useRef(0),we=D.useRef(null),ce=D.useRef(null),W=D.useRef([]),re=D.useRef(null),N=D.useCallback(()=>{b({type:"SET_CART_UPDATING",isUpdating:W.current.some(rN)})},[]),M=D.useCallback((se,Se)=>{Se.outcome==="timeout"?(se.timedOut=!0,W.current=W.current.filter(ae=>ae===se||!ae.timedOut)):W.current=W.current.filter(ae=>ae!==se),clearTimeout(se.timeoutId),N(),se.resolve(Se)},[N]);L.current=l,V.current=d,ie.current=u,le.current=f,D.useEffect(()=>{const se=new wS({baseURL:e,orgId:t,esDeveloperName:n,options:j({enableLogging:a},s?{capabilitiesVersion:s}:{})});G.current=se,se.on("connected",()=>{var ae;b({type:"SET_CONNECTION_STATUS",status:"connected"}),(ae=ie.current)==null||ae.call(ie)}),se.on("disconnected",()=>{b({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),se.on("reconnecting",()=>{b({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),se.on("message",ae=>{var qe,Je;const ve=ue(j({id:ae.messageId||crypto.randomUUID()},ae.messageId?{serverId:ae.messageId}:{}),{role:"agent",content:ae.content,timestamp:ae.timestamp,sender:ae.sender,raw:ae});m==null||m.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:ve.id,tokensBeforeFlush:fe.current,streamedFinalOnly:fe.current===0}),fe.current=0;const $e=Zo(W.current),dt=$e==null?void 0:$e.options.reconcileMessageId;b({type:"FLUSH_STREAMING",message:ve,replaceMessageId:dt}),(qe=L.current)==null||qe.call(L,ve),$e&&M($e,{outcome:"success"});const{messagingSessionId:ee}=ae,xe=ee?CA(ae.content):null;ee&&xe&&((Je=le.current)==null||Je.call(le,{agentSessionId:ee,kind:xe.kind,productIds:xe.productIds}))}),se.on("streaming_token",ae=>{var ve;if(!((ve=Zo(W.current))!=null&&ve.options.silent)){if(fe.current+=1,m!=null&&m.isDevelopment){const $e=_g(ae.token);$e?$e.index===qi?m.debug("🦜 streaming_token fragment (reassembled downstream)",{token:ae.token}):m.debug("🦜 streaming_token parsed",{type:$e.type,index:$e.index,outputName:$e.type==="tool_results"?$e.output_name:void 0}):m.debug("🦜 streaming_token empty",{token:ae.token})}b({type:"APPEND_STREAMING_TOKEN",token:ae.token})}}),se.on("typing_started",()=>{var ae;(ae=Zo(W.current))!=null&&ae.options.silent||b({type:"SET_AGENT_TYPING",isTyping:!0})}),se.on("typing_stopped",()=>{var ae;(ae=Zo(W.current))!=null&&ae.options.silent||b({type:"SET_AGENT_TYPING",isTyping:!1})}),se.on("progress_indicator",ae=>{var ve;(ve=Zo(W.current))!=null&&ve.options.silent||b({type:"ADD_PROGRESS_STEP",message:ae.message})}),se.on("routing_result",ae=>{var ve;if(b({type:"SET_ROUTING_RESULT",result:ae}),!ae.isSuccessful){const $e=`Routing failed: ${ae.failureType||"unknown"}`;b({type:"SET_ERROR",error:Ig({code:"ROUTING_FAILED"})}),b({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=V.current)==null||ve.call(V,$e)}}),se.on("participant_changed",ae=>{if(ae.participant.name==="Automated Process")return;const ve=ue(j({id:crypto.randomUUID()},ae.entryId?{serverId:ae.entryId}:{}),{role:"system",content:ae.action==="add"?`${ae.participant.name||"Agent"} joined the conversation`:`${ae.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});m==null||m.log("🦜 MessagingProvider participant_changed event received",{event:ae}),b({type:"ADD_MESSAGE",message:ve})}),se.on("conversation_closed",()=>{const ae={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};b({type:"ADD_MESSAGE",message:ae}),b({type:"SET_CONVERSATION_ID",id:null}),U.clearPersistedConversation()}),se.on("error",ae=>{var ve;if(m==null||m.log("🦜 MessagingProvider ERROR event received",{event:ae}),ae.code==="SESSION_EXPIRED"){te.current=!0,b({type:"SET_SESSION_EXPIRED",expired:!0}),b({type:"SET_CONNECTION_STATUS",status:"disconnected"}),b({type:"SET_LOADING",isLoading:!1});return}b({type:"SET_ERROR",error:Ig(ae)}),ae.recoverable||b({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=V.current)==null||ve.call(V,ae.message)}),b({type:"SET_CONNECTION_STATUS",status:"connecting"});const Se=()=>Fe(null,null,function*(){A(!1);let ae=U.getStoredConnectOptions(),ve=!1;ae||(ae=yield U.getPeerConnectOptions(),ve=!!ae);let $e=!1;try{yield se.connect(ae!=null?ae:void 0),$e=!!(ae!=null&&ae.lastEventId)}catch(ee){if(ae&&Zd(ee))m==null||m.log("Stored token expired on connect — falling back to fresh connect"),ve||U.clearPersistedConversation(),yield se.connect(),$e=!1;else throw ee}k($e),yield U.persistContinuationToken(se);const dt=yield U.initializeConversation(se);if(m==null||m.log("🦜 initial connect complete",{conversationId:dt.conversationId,resumed:dt.resumed,outcome:dt.outcome,restoredMessages:dt.restoredMessages.length}),dt.outcome==="unverified-error"){dt.conversationId&&(se.resumeConversation(dt.conversationId),b({type:"SET_CONVERSATION_ID",id:dt.conversationId})),A(!0);return}b({type:"SET_CONVERSATION_ID",id:dt.conversationId}),dt.resumed&&b({type:"LOAD_HISTORY",messages:dt.restoredMessages}),A(!0)});return ce.current=Se,Se().catch(ae=>{var ve;b({type:"SET_CONNECTION_STATUS",status:"error"}),b({type:"SET_ERROR",error:oi(ae)}),(ve=V.current)==null||ve.call(V,ae.message)}),()=>{se.disconnect(),se.off(),G.current=null,ce.current=null}},[e,t,n,s,M]);const J=D.useCallback(()=>Fe(null,null,function*(){const se=G.current;if(!se)return!1;const Se=U.getStoredConnectOptions();if(!Se)return m==null||m.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;m==null||m.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{se.disconnect(),yield se.connect(Se)}catch(ve){if(Zd(ve))return m==null||m.log("🦜 attemptResume: token expired (401) — will start fresh",{error:ve instanceof Error?ve.message:String(ve)}),!1;throw m==null||m.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:ve instanceof Error?ve.message:String(ve)}),ve}yield U.persistContinuationToken(se);const ae=yield U.initializeConversation(se,{createIfMissing:!1});return ae.outcome==="not-found-or-closed"||!ae.conversationId?(m==null||m.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(ae.outcome==="unverified-error"&&(m==null||m.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:ae.conversationId}),se.resumeConversation(ae.conversationId)),m==null||m.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:ae.conversationId}),b({type:"SET_CONVERSATION_ID",id:ae.conversationId}),b({type:"SET_CONNECTION_STATUS",status:"connected"}),U.persistConversationId(ae.conversationId),te.current=!1,b({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[U,m]),P=D.useCallback(se=>Fe(null,null,function*(){var ae;const Se=G.current;if(Se){se.options.silent||(b({type:"SET_LOADING",isLoading:!0}),b({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield Se.sendMessage(se.text)}catch(ve){const $e=oi(ve);b({type:"SET_SEND_ERROR",error:{text:se.text,displayContent:se.displayContent,options:se.options,message:$e}}),(ae=V.current)==null||ae.call(V,ve instanceof Error?ve.message:String(ve)),M(se,{outcome:"failure",message:$e})}}}),[M]),Ae=D.useCallback(se=>Fe(null,null,function*(){var ae;const Se=G.current;if(!(!Se||z.current)){z.current=!0,oe.current=!0;try{if(yield J()){se&&(yield P(se));return}m==null||m.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),te.current=!1,b({type:"SET_SESSION_EXPIRED",expired:!1}),b({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:KA,timestamp:new Date().toISOString()}}),U.clearPersistedConversation(),b({type:"SET_CONNECTION_STATUS",status:"connecting"}),Se.disconnect(),yield Se.connect(),yield U.persistContinuationToken(Se);const ve=yield Se.createConversation(yield Vu({routingAttributes:r}));m==null||m.log("🦜 recoverExpiredSession: new conversation created",{conversationId:ve}),b({type:"SET_CONVERSATION_ID",id:ve}),b({type:"SET_CONNECTION_STATUS",status:"connected"}),U.persistConversationId(ve),se&&(yield P(se))}catch(ve){const $e=ve instanceof Error?ve.message:String(ve);b({type:"SET_ERROR",error:oi(ve)}),b({type:"SET_CONNECTION_STATUS",status:"error"}),(ae=V.current)==null||ae.call(V,$e),se&&M(se,{outcome:"failure",message:oi(ve)})}finally{z.current=!1,oe.current=!1}}}),[r,U,J,P,m,M]),Ce=D.useRef(Ae);Ce.current=Ae;const ge=D.useCallback(()=>Fe(null,null,function*(){const se=G.current;if(!se||z.current)return;if(!I.current.conversationId&&!te.current){se.reconnect();return}z.current=!0;const Se=Fe(null,null,function*(){try{(yield J())||(te.current=!0,b({type:"SET_SESSION_EXPIRED",expired:!0}),b({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(ae){te.current=!0,b({type:"SET_SESSION_EXPIRED",expired:!0}),b({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{z.current=!1,we.current=null}});we.current=Se,yield Se}),[J]),Le=D.useRef(ge);Le.current=ge;const je=D.useCallback(()=>Fe(null,null,function*(){const se=G.current;if(!se||z.current)return;const Se=U.getStoredConnectOptions(),ae=Se==null?void 0:Se.continuationToken;if(ae){z.current=!0;try{se.disconnect(),yield se.connect({continuationToken:ae}),yield U.persistContinuationToken(se);const ve=I.current.conversationId;ve&&se.resumeConversation(ve)}catch(ve){if(Zd(ve)){te.current=!0,b({type:"SET_SESSION_EXPIRED",expired:!0}),b({type:"SET_CONNECTION_STATUS",status:"disconnected"}),b({type:"SET_LOADING",isLoading:!1});return}m==null||m.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:ve instanceof Error?ve.message:String(ve)})}finally{z.current=!1}}}),[U,m]);D.useEffect(()=>{const se=()=>{const ee=Date.now();ee-de.current<ZA||(de.current=ee,Le.current())},Se=()=>{if(document.visibilityState==="hidden"){he.current=Date.now();return}const ee=G.current;if(!ee)return;const xe=he.current?Date.now()-he.current:0;he.current=0,(te.current||!ee.isConnected||xe>JA)&&se()},ae=ee=>{ee.persisted&&se()},ve=()=>{he.current=Date.now()},$e=()=>se(),dt=()=>se();return document.addEventListener("visibilitychange",Se),window.addEventListener("pageshow",ae),window.addEventListener("pagehide",ve),document.addEventListener("resume",$e),window.addEventListener("online",dt),()=>{document.removeEventListener("visibilitychange",Se),window.removeEventListener("pageshow",ae),window.removeEventListener("pagehide",ve),document.removeEventListener("resume",$e),window.removeEventListener("online",dt)}},[]);const Ke=D.useCallback((se,Se)=>Fe(null,null,function*(){var ve;const ae=G.current;if(!ae){M(se,{outcome:"failure",message:"Messaging is unavailable"});return}if(te.current){yield Ce.current(se);return}try{yield ae.sendMessage(se.text)}catch($e){if(Og($e)){yield Ce.current(se);return}const dt=oi($e);b({type:"SET_SEND_ERROR",error:Se(dt)}),(ve=V.current)==null||ve.call(V,$e instanceof Error?$e.message:String($e)),M(se,{outcome:"failure",message:dt})}}),[M]),pt=D.useCallback(se=>Fe(null,null,function*(){const Se=we.current;Se&&(yield Se),yield se()}),[]),Ot=D.useCallback((se,Se,ae={})=>new Promise(ve=>{if(!G.current){ve({outcome:"failure",message:"Messaging is unavailable"});return}const dt={};Object.assign(dt,{text:se,displayContent:Se,options:ae,resolve:ve,timeoutId:setTimeout(()=>{b({type:"SET_LOADING",isLoading:!1}),M(dt,{outcome:"timeout"})},eN)}),W.current.push(dt),N(),b({type:"CLEAR_SEND_ERROR"}),ae.silent||(b({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:Se!=null?Se:se,timestamp:new Date().toISOString()}}),b({type:"SET_LOADING",isLoading:!0}),b({type:"SET_PROGRESS_MESSAGE",message:""})),pt(()=>Ke(dt,ee=>({text:se,displayContent:Se,options:ae,message:ee})))}),[Ke,pt,M,N]),Ut=D.useCallback((se,Se)=>{if(!se.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const ae=()=>Ot(se,Se==null?void 0:Se.displayContent,Se),ve=re.current?re.current.then(ae):ae(),$e=ve.then(()=>{});return re.current=$e,$e.finally(()=>{re.current===$e&&(re.current=null)}),ve},[Ot]),yn=D.useCallback(se=>{if(!G.current)return;const{prompt:Se,display:ae}=iN(se);Ot(Se,ae)},[Ot]),Tn=D.useCallback(()=>{const se=G.current,Se=I.current.sendError;if(!se||!Se)return;const ae=()=>oe.current?Promise.resolve({outcome:"failure",message:Se.message}):Ot(Se.text,Se.displayContent,Se.options),ve=re.current?re.current.then(ae):ae(),$e=ve.then(()=>{});return re.current=$e,$e.finally(()=>{re.current===$e&&(re.current=null)}),ve},[Ot]),Lt=D.useCallback(()=>{const se=G.current,Se=ce.current;!se||!Se||(te.current=!1,se.disconnect(),b({type:"SET_CONNECTION_STATUS",status:"connecting"}),Se().catch(ae=>{var ve;b({type:"SET_CONNECTION_STATUS",status:"error"}),b({type:"SET_ERROR",error:oi(ae)}),(ve=V.current)==null||ve.call(V,ae.message)}))},[]),Be=D.useCallback(()=>{const se=G.current;if(se)return te.current=!1,k(!1),U.clearPersistedConversation(),b({type:"RESET"}),b({type:"SET_CONNECTION_STATUS",status:"connecting"}),se.endConversation().then(()=>(se.disconnect(),se.connect())).then(()=>Fe(null,null,function*(){return yield U.persistContinuationToken(se),se.createConversation(yield Vu({routingAttributes:r}))})).then(Se=>{b({type:"SET_CONVERSATION_ID",id:Se}),b({type:"SET_CONNECTION_STATUS",status:"connected"}),U.persistConversationId(Se)}).catch(Se=>{var ae;b({type:"SET_ERROR",error:oi(Se)}),b({type:"SET_CONNECTION_STATUS",status:"error"}),(ae=V.current)==null||ae.call(V,Se.message)})},[r,U]);sN({connectionStatus:y.connectionStatus,loading:y.loading,hasMessages:y.messages.length>0,sessionExpired:y.sessionExpired,bootstrapSettled:v,resumeUsedLastEventId:w,recoverySteps:[je,Be],onExhausted:()=>{var Se;const se=oi({type:"network"});b({type:"SET_ERROR",error:se}),b({type:"SET_CONNECTION_STATUS",status:"error"}),(Se=V.current)==null||Se.call(V,se)},logger:m,isRecoveryInFlight:()=>z.current||we.current!==null});const ke=D.useCallback(()=>Fe(null,null,function*(){var ve;const se=G.current;if(!se)return;const Se=yield se.retrieveConversationTranscript(),ae=URL.createObjectURL(Se);try{const $e=document.createElement("a");$e.href=ae,$e.download=`transcript-${(ve=se.conversationId)!=null?ve:"conversation"}.pdf`,document.body.appendChild($e),$e.click(),$e.remove()}finally{URL.revokeObjectURL(ae)}}),[]),We=y.connectionStatus==="connected"&&y.conversationId!==null;D.useEffect(()=>{CS(We)},[We]);const et=D.useMemo(()=>({connectionStatus:y.connectionStatus,isConnected:We,isAgentTyping:y.isAgentTyping,conversationId:y.conversationId,messages:y.messages,streamingBlocks:y.streamingBlocks,progressMessage:y.progressMessage,progressSteps:y.progressSteps,error:y.error,sendError:y.sendError,loading:y.loading,sessionExpired:y.sessionExpired,cartUpdating:y.cartUpdating,sendMessage:Ut,addToCart:yn,resetConversation:Be,retryLastMessage:Tn,retryConnection:Lt,downloadTranscript:ke}),[y,We,Ut,yn,Be,Tn,Lt,ke]);return _.jsx(Ng.Provider,{value:et,children:p})};var Rg=Symbol.for("immer-nothing"),Lg=Symbol.for("immer-draftable"),Fn=Symbol.for("immer-state");function or(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ms=Object.getPrototypeOf;function Fs(e){return!!e&&!!e[Fn]}function Yi(e){var t;return e?Dg(e)||Array.isArray(e)||!!e[Lg]||!!((t=e.constructor)!=null&&t[Lg])||ea(e)||Wu(e):!1}var aN=Object.prototype.constructor.toString();function Dg(e){if(!e||typeof e!="object")return!1;const t=Ms(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===aN}function qu(e,t){Yu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Yu(e){const t=e[Fn];return t?t.type_:Array.isArray(e)?1:ea(e)?2:Wu(e)?3:0}function ef(e,t){return Yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Mg(e,t,n){const r=Yu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function uN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ea(e){return e instanceof Map}function Wu(e){return e instanceof Set}function Wi(e){return e.copy_||e.base_}function tf(e,t){if(ea(e))return new Map(e);if(Wu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Dg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Fn];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Ms(e),r)}else{const r=Ms(e);if(r!==null&&n)return j({},e);const s=Object.create(r);return Object.assign(s,e)}}function nf(e,t=!1){return Xu(e)||Fs(e)||!Yi(e)||(Yu(e)>1&&Object.defineProperties(e,{set:{value:Gu},add:{value:Gu},clear:{value:Gu},delete:{value:Gu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>nf(n,!0))),e}function Gu(){or(2)}function Xu(e){return Object.isFrozen(e)}var lN={};function Gi(e){const t=lN[e];return t||or(0,e),t}var ta;function Fg(){return ta}function cN(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Bg(e,t){t&&(Gi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rf(e){sf(e),e.drafts_.forEach(dN),e.drafts_=null}function sf(e){e===ta&&(ta=e.parent_)}function Ug(e){return ta=cN(ta,e)}function dN(e){const t=e[Fn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Hg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Fn].modified_&&(rf(t),or(4)),Yi(e)&&(e=Qu(t,e),t.parent_||Ku(t,e)),t.patches_&&Gi("Patches").generateReplacementPatches_(n[Fn].base_,e,t.patches_,t.inversePatches_)):e=Qu(t,n,[]),rf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Rg?e:void 0}function Qu(e,t,n){if(Xu(t))return t;const r=t[Fn];if(!r)return qu(t,(s,a)=>jg(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ku(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),qu(a,(l,d)=>jg(e,r,s,l,d,n,u)),Ku(e,s,!1),n&&e.patches_&&Gi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function jg(e,t,n,r,s,a,u){if(Fs(s)){const l=a&&t&&t.type_!==3&&!ef(t.assigned_,r)?a.concat(r):void 0,d=Qu(e,s,l);if(Mg(n,r,d),Fs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Yi(s)&&!Xu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Qu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ea(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Ku(e,s)}}function Ku(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nf(t,n)}function fN(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=of;n&&(s=[r],a=na);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var of={get(e,t){if(t===Fn)return e;const n=Wi(e);if(!ef(n,t))return hN(e,n,t);const r=n[t];return e.finalized_||!Yi(r)?r:r===af(e.base_,t)?(lf(e),e.copy_[t]=cf(r,e)):r},has(e,t){return t in Wi(e)},ownKeys(e){return Reflect.ownKeys(Wi(e))},set(e,t,n){const r=$g(Wi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=af(Wi(e),t),a=s==null?void 0:s[Fn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(uN(n,s)&&(n!==void 0||ef(e.base_,t)))return!0;lf(e),uf(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return af(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,lf(e),uf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){or(11)},getPrototypeOf(e){return Ms(e.base_)},setPrototypeOf(){or(12)}},na={};qu(of,(e,t)=>{na[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),na.deleteProperty=function(e,t){return na.set.call(this,e,t,void 0)},na.set=function(e,t,n){return of.set.call(this,e[0],t,n,e[0])};function af(e,t){const n=e[Fn];return(n?Wi(n):e)[t]}function hN(e,t,n){var s;const r=$g(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function $g(e,t){if(!(t in e))return;let n=Ms(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ms(n)}}function uf(e){e.modified_||(e.modified_=!0,e.parent_&&uf(e.parent_))}function lf(e){e.copy_||(e.copy_=tf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pN=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&or(6),r!==void 0&&typeof r!="function"&&or(7);let s;if(Yi(t)){const a=Ug(this),u=cf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?rf(a):sf(a)}return Bg(a,r),Hg(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Rg&&(s=void 0),this.autoFreeze_&&nf(s,!0),r){const a=[],u=[];Gi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else or(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,s;return[this.produce(t,n,(u,l)=>{r=u,s=l}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Yi(e)||or(8),Fs(e)&&(e=mN(e));const t=Ug(this),n=cf(e,void 0);return n[Fn].isManual_=!0,sf(t),n}finishDraft(e,t){const n=e&&e[Fn];(!n||!n.isManual_)&&or(9);const{scope_:r}=n;return Bg(r,t),Hg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Gi("Patches").applyPatches_;return Fs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function cf(e,t){const n=ea(e)?Gi("MapSet").proxyMap_(e,t):Wu(e)?Gi("MapSet").proxySet_(e,t):fN(e,t);return(t?t.scope_:Fg()).drafts_.push(n),n}function mN(e){return Fs(e)||or(10,e),zg(e)}function zg(e){if(!Yi(e)||Xu(e))return e;const t=e[Fn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=tf(e,!0);return qu(n,(r,s)=>{Mg(n,r,zg(s))}),t&&(t.finalized_=!1),n}var gN=new pN,EN=gN.produce;function yN(e,t,n){var r=D.useMemo(function(){return EN(e)},[e]);return D.useReducer(r,t,n)}const Et={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Vg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1},TN=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),qg=D.createContext(null),Yg=D.createContext(null),bN=({children:e,dispatch:t})=>{const n=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_INITIALIZED,payload:b})},[t]),r=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_OPEN,payload:b})},[t]),s=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_INLINE,payload:b})},[t]),a=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:b})},[t]),u=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:b})},[t]),l=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:b})},[t]),d=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:b})},[t]),f=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_PARAMS,payload:b})},[t]),p=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:b})},[t]),m=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:b})},[t]),x=D.useCallback(b=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:b})},[t]),y=D.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:x}),[n,r,s,a,u,l,d,f,p,m,x]);return _.jsx(Yg.Provider,{value:y,children:e})},xN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Et.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Et.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Et.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Et.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Et.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Et.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Et.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Et.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},_N=({promptsConfig:e,children:t})=>{const[n,r]=yN(xN,ue(j(j({},Vg),e||{}),{staticQuestions:TN((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(qg.Provider,{value:n,children:_.jsx(bN,{dispatch:r,children:t})})};function wN(){var e=D.useRef(!0);return e.current?(e.current=!1,!0):e.current}function SN(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function vN(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var df=typeof window!="undefined",Ju=function(e){D.useEffect(e,[])},AN=function(e){var t=D.useRef(e);t.current=e,Ju(function(){return function(){return t.current()}})},NN=function(e){var t=D.useRef(0),n=D.useState(e),r=n[0],s=n[1],a=D.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return AN(function(){cancelAnimationFrame(t.current)}),[r,a]},kN=function(e,t){return e===t};function CN(e,t){t===void 0&&(t=kN);var n=D.useRef(),r=D.useRef(e),s=wN();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var ON=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,l=NN({width:df?window.innerWidth:r,height:df?window.innerHeight:a}),d=l[0],f=l[1];return D.useEffect(function(){if(df){var p=function(){var m=window.innerWidth,x=window.innerHeight;f({width:m,height:x}),u&&u(m,x)};return SN(window,"resize",p),function(){vN(window,"resize",p)}}},[]),d};const Wg=D.createContext({mode:at.modeProxy.mode,entryType:at.entryType,status:at.statusProxy,dialogPosition:at.dialogProxy.position,isDialogFullHeight:at.dialogProxy.isFullHeight,dialogWidth:at.dialogProxy.width,isModalFullscreen:at.modalProxy.isFullscreen,previousComponentType:at.statusProxy.type}),IN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=D.useState(e!=null?e:at.entryTypeProxy.entryType),[u,l]=D.useState(at.modeProxy.mode),[d,f]=D.useState({type:n||at.statusProxy.type,isOpen:at.statusProxy.isOpen,isMinimized:at.statusProxy.isMinimized}),[p,m]=D.useState(at.dialogProxy.position),[x,y]=D.useState(at.dialogProxy.isFullHeight),[b,v]=D.useState(at.dialogProxy.width),[A,w]=D.useState(at.modalProxy.isFullscreen),k=CN(d.type);D.useEffect(()=>{const U=G=>{const{property:L,value:V}=G.detail||{};if(!(!L||V===void 0)){if(L==="mode"){l(V);return}if(L==="entryType"){a(V);return}if(L==="isMinimized"){f(ie=>ue(j({},ie),{isMinimized:V}));return}if(L==="isOpen"){f(ie=>ue(j({},ie),{isOpen:V}));return}if(L==="type"){f(ie=>ue(j({},ie),{type:V}));return}if(L==="position"){m(V);return}if(L==="isFullHeight"){y(V);return}if(L==="width"){v(V);return}if(L==="isFullscreen"){w(V);return}}};return AS(U),()=>{NS(U)}},[]),Ju(()=>{e&&R0(e)}),Ju(()=>{const U=n||(t==null?void 0:t.type);U&&Iu(U),t&&"isOpen"in t&&jr(!!t.isOpen),t&&"isMinimized"in t&&Ou(!!t.isMinimized)}),Ju(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&Rd(U),"dialogFullHeight"in t.options&&OS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&Pd(!!t.options.isModalFullscreen)});const I=D.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:x,dialogWidth:b,isModalFullscreen:A}),[u,s,d,k,p,x,b,A]);return _.jsx(Wg.Provider,{value:I,children:r})},PN={productId:Yo.productId,pdpLink:Yo.pdpLink},Gg=D.createContext(PN),RN=({children:e})=>{const[t,n]=D.useState(Yo.productId),[r,s]=D.useState(Yo.pdpLink);D.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),s(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&s(l.value)};return fS(u),()=>{hS(u)}},[]);const a=D.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(Gg.Provider,{value:a,children:e})},LN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){xt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){xt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(l)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(xt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(xt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),xt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,xt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Xg=D.createContext({overrides:{},isInitialized:!1}),DN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=D.useState({}),[a,u]=D.useState(!1);D.useEffect(()=>{Fe(null,null,function*(){let f={};e?(xt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield LN(e)):t&&typeof t=="object"?(xt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(xt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=D.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(Xg.Provider,{value:l,children:n})},Qg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:x,entryType:y,initialEntry:b,entryMessage:v,disclaimerText:A,disclaimerMarkdown:w,clientContext:k,searchPlaceholder:I,searchButtonLabel:U,searchConfig:G,suggestionButtonConfig:L,messageAlignment:V,autoScroll:ie,promptsConfig:le,showProductDescription:z,resetConversationMessage:oe,conversationHistory:te,messagingConfig:fe,overrides:he,overridesUrl:de,inlineOverrides:we,__features:ce,children:W})=>{const re=D.useRef(!1);return re.current||(re.current=!0,ES({initialEntry:b,entryType:y,isDevelopment:p})),_.jsx(AA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:v,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:I,searchButtonLabel:U,searchConfig:G,suggestionButtonConfig:L,messageAlignment:V,autoScroll:ie,showProductDescription:z,componentConfig:x,clientContext:k,disclaimerMarkdown:w,disclaimerText:A,resetConversationMessage:oe,conversationHistory:te,isDevelopment:p,__features:ce,progressStepsLimit:fe==null?void 0:fe.progressStepsLimit,routingAttributes:fe==null?void 0:fe.routingAttributes,enableDownloadTranscript:fe==null?void 0:fe.enableDownloadTranscript,enableEscalationToAgent:fe==null?void 0:fe.enableEscalationToAgent,showProductCaptions:fe==null?void 0:fe.showProductCaptions,children:_.jsx(IN,{entryType:y!=null?y:b==null?void 0:b.type,componentConfig:x,componentType:m,children:_.jsx(RN,{children:_.jsx(_N,{promptsConfig:le,children:_.jsx(DN,{overridesUrl:de,inlineOverrides:we||he,children:_.jsx(Pg,{scrt2Url:(fe==null?void 0:fe.scrt2Url)||"",orgId:(fe==null?void 0:fe.orgId)||"",esDeveloperName:(fe==null?void 0:fe.esDeveloperName)||"",routingAttributes:(fe==null?void 0:fe.routingAttributes)||{},capabilitiesVersion:fe==null?void 0:fe.capabilitiesVersion,enableLogging:p,onProductResult:fe==null?void 0:fe.onProductResult,children:W})})})})})})},ai=()=>{const e=D.useContext(Wg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var ff={exports:{}},vn={},hf={exports:{}},pf={};var Kg;function MN(){return Kg||(Kg=1,(function(e){function t(W,re){var N=W.length;W.push(re);e:for(;0<N;){var M=N-1>>>1,J=W[M];if(0<s(J,re))W[M]=re,W[N]=J,N=M;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var re=W[0],N=W.pop();if(N!==re){W[0]=N;e:for(var M=0,J=W.length,P=J>>>1;M<P;){var Ae=2*(M+1)-1,Ce=W[Ae],ge=Ae+1,Le=W[ge];if(0>s(Ce,N))ge<J&&0>s(Le,Ce)?(W[M]=Le,W[ge]=N,M=ge):(W[M]=Ce,W[Ae]=N,M=Ae);else if(ge<J&&0>s(Le,N))W[M]=Le,W[ge]=N,M=ge;else break e}}return re}function s(W,re){var N=W.sortIndex-re.sortIndex;return N!==0?N:W.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,x=3,y=!1,b=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(W){for(var re=n(f);re!==null;){if(re.callback===null)r(f);else if(re.startTime<=W)r(f),re.sortIndex=re.expirationTime,t(d,re);else break;re=n(f)}}function U(W){if(v=!1,I(W),!b)if(n(d)!==null)b=!0,we(G);else{var re=n(f);re!==null&&ce(U,re.startTime-W)}}function G(W,re){b=!1,v&&(v=!1,w(ie),ie=-1),y=!0;var N=x;try{for(I(re),m=n(d);m!==null&&(!(m.expirationTime>re)||W&&!oe());){var M=m.callback;if(typeof M=="function"){m.callback=null,x=m.priorityLevel;var J=M(m.expirationTime<=re);re=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(d)&&r(d),I(re)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var Ae=n(f);Ae!==null&&ce(U,Ae.startTime-re),P=!1}return P}finally{m=null,x=N,y=!1}}var L=!1,V=null,ie=-1,le=5,z=-1;function oe(){return!(e.unstable_now()-z<le)}function te(){if(V!==null){var W=e.unstable_now();z=W;var re=!0;try{re=V(!0,W)}finally{re?fe():(L=!1,V=null)}}else L=!1}var fe;if(typeof k=="function")fe=function(){k(te)};else if(typeof MessageChannel!="undefined"){var he=new MessageChannel,de=he.port2;he.port1.onmessage=te,fe=function(){de.postMessage(null)}}else fe=function(){A(te,0)};function we(W){V=W,L||(L=!0,fe())}function ce(W,re){ie=A(function(){W(e.unstable_now())},re)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){b||y||(b=!0,we(G))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(W){switch(x){case 1:case 2:case 3:var re=3;break;default:re=x}var N=x;x=re;try{return W()}finally{x=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,re){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var N=x;x=W;try{return re()}finally{x=N}},e.unstable_scheduleCallback=function(W,re,N){var M=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?M+N:M):N=M,W){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=N+J,W={id:p++,callback:re,priorityLevel:W,startTime:N,expirationTime:J,sortIndex:-1},N>M?(W.sortIndex=N,t(f,W),n(d)===null&&W===n(f)&&(v?(w(ie),ie=-1):v=!0,ce(U,N-M))):(W.sortIndex=J,t(d,W),b||y||(b=!0,we(G))),W},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(W){var re=x;return function(){var N=x;x=re;try{return W.apply(this,arguments)}finally{x=N}}}})(pf)),pf}var Jg;function FN(){return Jg||(Jg=1,hf.exports=MN()),hf.exports}var Zg;function BN(){if(Zg)return vn;Zg=1;var e=rr(),t=FN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function x(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function b(i,o,c,h){if(o===null||typeof o=="undefined"||y(i,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function v(i,o,c,h,E,T,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=S}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 o=i[0];A[o]=new v(o,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 w=/[\-:]([a-z])/g;function k(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(w,k);A[o]=new v(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(w,k);A[o]=new v(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(w,k);A[o]=new v(o,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 I(i,o,c,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(b(o,c,E,h)&&(c=null),h||E===null?x(o)&&(c===null?i.removeAttribute(o):i.setAttribute(o,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(o=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,o,c):i.setAttribute(o,c))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),L=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),oe=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),de=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),W=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=W&&i[W]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,M;function J(i){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
17
+ `+M+i}var P=!1;function Ae(i,o){if(!i||P)return"";P=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
18
18
  `),T=h.stack.split(`
19
- `),S=E.length-1,F=T.length-1;1<=S&&0<=F&&E[S]!==T[F];)F--;for(;1<=S&&0<=F;S--,F--)if(E[S]!==T[F]){if(S!==1||F!==1)do if(S--,F--,0>F||E[S]!==T[F]){var $=`
20
- `+E[S].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=S&&0<=F);break}}}finally{P=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Z(i):""}function Ce(i){switch(i.tag){case 5:return Z(i.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return i=ke(i.type,!1),i;case 11:return i=ke(i.type.render,!1),i;case 1:return i=ke(i.type,!0),i;default:return""}}function ge(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 G:return"Fragment";case L:return"Portal";case de:return"Profiler";case ne:return"StrictMode";case pe:return"Suspense";case ce:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ae:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case oe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case se:return o=i.displayName||null,o!==null?o:ge(i.type)||"Memo";case Ae:o=i._payload,i=i._init;try{return ge(i(o))}catch(l){}}return null}function Le(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(o);case 8:return o===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Be(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ge(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function dt(i){var o=Ge(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,T.call(this,S)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Vt(i){i._valueTracker||(i._valueTracker=dt(i))}function Lt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ge(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function Qt(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function kn(i,o){var l=o.checked;return k({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function me(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Be(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function he(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function W(i,o){he(i,o);var l=Be(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?_e(i,o.type,l):o.hasOwnProperty("defaultValue")&&_e(i,o.type,Be(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function fe(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function _e(i,o,l){(o!=="number"||Qt(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Xe=Array.isArray;function ut(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Be(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Kt(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function cs(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Xe(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Be(l)}}function ds(i,o){var l=Be(o.value),h=Be(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function rc(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ue(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 ve(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ue(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ve,Ke=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ve=Ve||document.createElement("div"),Ve.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ve.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function nt(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}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},Yr=["Webkit","ms","Moz","O"];Object.keys(Jt).forEach(function(i){Yr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Jt[o]=Jt[i]})});function Wn(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||Jt.hasOwnProperty(i)&&Jt[i]?(""+o).trim():o+"px"}function mi(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Wn(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var fs=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zt(i,o){if(o){if(fs[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Ir(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bn=null;function Tp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var bp=null,yo=null,To=null;function Ox(i){if(i=ou(i)){if(typeof bp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Ac(o),bp(i.stateNode,i.type,o))}}function Ix(i){yo?To?To.push(i):To=[i]:yo=i}function Px(){if(yo){var i=yo,o=To;if(To=yo=null,Ox(i),o)for(i=0;i<o.length;i++)Ox(o[i])}}function Rx(i,o){return i(o)}function Lx(){}var xp=!1;function Dx(i,o,l){if(xp)return i(o,l);xp=!0;try{return Rx(i,o,l)}finally{xp=!1,(yo!==null||To!==null)&&(Lx(),Px())}}function Ua(i,o){var l=i.stateNode;if(l===null)return null;var h=Ac(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var _p=!1;if(c)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){_p=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch(i){_p=!1}function LF(i,o,l,h,E,T,S,F,$){var ee=Array.prototype.slice.call(arguments,3);try{o.apply(l,ee)}catch(Te){this.onError(Te)}}var ja=!1,ic=null,sc=!1,wp=null,DF={onError:function(i){ja=!0,ic=i}};function MF(i,o,l,h,E,T,S,F,$){ja=!1,ic=null,LF.apply(DF,arguments)}function FF(i,o,l,h,E,T,S,F,$){if(MF.apply(this,arguments),ja){if(ja){var ee=ic;ja=!1,ic=null}else throw Error(n(198));sc||(sc=!0,wp=ee)}}function hs(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function Mx(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function Fx(i){if(hs(i)!==i)throw Error(n(188))}function BF(i){var o=i.alternate;if(!o){if(o=hs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return Fx(E),i;if(T===h)return Fx(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var S=!1,F=E.child;F;){if(F===l){S=!0,l=E,h=T;break}if(F===h){S=!0,h=E,l=T;break}F=F.sibling}if(!S){for(F=T.child;F;){if(F===l){S=!0,l=T,h=E;break}if(F===h){S=!0,h=T,l=E;break}F=F.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function Bx(i){return i=BF(i),i!==null?Ux(i):null}function Ux(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Ux(i);if(o!==null)return o;i=i.sibling}return null}var Hx=t.unstable_scheduleCallback,jx=t.unstable_cancelCallback,UF=t.unstable_shouldYield,HF=t.unstable_requestPaint,Ot=t.unstable_now,jF=t.unstable_getCurrentPriorityLevel,Sp=t.unstable_ImmediatePriority,$x=t.unstable_UserBlockingPriority,oc=t.unstable_NormalPriority,$F=t.unstable_LowPriority,zx=t.unstable_IdlePriority,ac=null,Pr=null;function zF(i){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(ac,i,void 0,(i.current.flags&128)===128)}catch(o){}}var cr=Math.clz32?Math.clz32:YF,VF=Math.log,qF=Math.LN2;function YF(i){return i>>>=0,i===0?32:31-(VF(i)/qF|0)|0}var uc=64,lc=4194304;function $a(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 cc(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,S=l&268435455;if(S!==0){var F=S&~E;F!==0?h=$a(F):(T&=S,T!==0&&(h=$a(T)))}else S=l&~E,S!==0?h=$a(S):T!==0&&(h=$a(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-cr(o),E=1<<l,h|=i[l],o&=~E;return h}function WF(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function GF(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-cr(T),F=1<<S,$=E[S];$===-1?((F&l)===0||(F&h)!==0)&&(E[S]=WF(F,o)):$<=o&&(i.expiredLanes|=F),T&=~F}}function vp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Vx(){var i=uc;return uc<<=1,(uc&4194240)===0&&(uc=64),i}function Ap(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function za(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-cr(o),i[o]=l}function XF(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-cr(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function kp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-cr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var lt=0;function qx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Yx,Np,Wx,Gx,Xx,Cp=!1,dc=[],gi=null,Ei=null,yi=null,Va=new Map,qa=new Map,Ti=[],QF="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 Qx(i,o){switch(i){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Va.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":qa.delete(o.pointerId)}}function Ya(i,o,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=ou(o),o!==null&&Np(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function KF(i,o,l,h,E){switch(o){case"focusin":return gi=Ya(gi,i,o,l,h,E),!0;case"dragenter":return Ei=Ya(Ei,i,o,l,h,E),!0;case"mouseover":return yi=Ya(yi,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return Va.set(T,Ya(Va.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,qa.set(T,Ya(qa.get(T)||null,i,o,l,h,E)),!0}return!1}function Kx(i){var o=ps(i.target);if(o!==null){var l=hs(o);if(l!==null){if(o=l.tag,o===13){if(o=Mx(l),o!==null){i.blockedOn=o,Xx(i.priority,function(){Wx(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Ip(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Bn=h,l.target.dispatchEvent(h),Bn=null}else return o=ou(l),o!==null&&Np(o),i.blockedOn=l,!1;o.shift()}return!0}function Jx(i,o,l){fc(i)&&l.delete(o)}function JF(){Cp=!1,gi!==null&&fc(gi)&&(gi=null),Ei!==null&&fc(Ei)&&(Ei=null),yi!==null&&fc(yi)&&(yi=null),Va.forEach(Jx),qa.forEach(Jx)}function Wa(i,o){i.blockedOn===o&&(i.blockedOn=null,Cp||(Cp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,JF)))}function Ga(i){function o(E){return Wa(E,i)}if(0<dc.length){Wa(dc[0],i);for(var l=1;l<dc.length;l++){var h=dc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(gi!==null&&Wa(gi,i),Ei!==null&&Wa(Ei,i),yi!==null&&Wa(yi,i),Va.forEach(o),qa.forEach(o),l=0;l<Ti.length;l++)h=Ti[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ti.length&&(l=Ti[0],l.blockedOn===null);)Kx(l),l.blockedOn===null&&Ti.shift()}var bo=j.ReactCurrentBatchConfig,hc=!0;function ZF(i,o,l,h){var E=lt,T=bo.transition;bo.transition=null;try{lt=1,Op(i,o,l,h)}finally{lt=E,bo.transition=T}}function eB(i,o,l,h){var E=lt,T=bo.transition;bo.transition=null;try{lt=4,Op(i,o,l,h)}finally{lt=E,bo.transition=T}}function Op(i,o,l,h){if(hc){var E=Ip(i,o,l,h);if(E===null)Gp(i,o,h,pc,l),Qx(i,h);else if(KF(E,i,o,l,h))h.stopPropagation();else if(Qx(i,h),o&4&&-1<QF.indexOf(i)){for(;E!==null;){var T=ou(E);if(T!==null&&Yx(T),T=Ip(i,o,l,h),T===null&&Gp(i,o,h,pc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else Gp(i,o,h,null,l)}}var pc=null;function Ip(i,o,l,h){if(pc=null,i=Tp(h),i=ps(i),i!==null)if(o=hs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=Mx(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return pc=i,null}function Zx(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jF()){case Sp:return 1;case $x:return 4;case oc:case $F:return 16;case zx:return 536870912;default:return 16}default:return 16}}var bi=null,Pp=null,mc=null;function e_(){if(mc)return mc;var i,o=Pp,l=o.length,h,E="value"in bi?bi.value:bi.textContent,T=E.length;for(i=0;i<l&&o[i]===E[i];i++);var S=l-i;for(h=1;h<=S&&o[l-h]===E[T-h];h++);return mc=E.slice(i,1<h?1-h:void 0)}function gc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Ec(){return!0}function t_(){return!1}function Un(i){function o(l,h,E,T,S){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=S,this.currentTarget=null;for(var F in i)i.hasOwnProperty(F)&&(l=i[F],this[F]=l?l(T):T[F]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Ec:t_,this.isPropagationStopped=t_,this}return k(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ec)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ec)},persist:function(){},isPersistent:Ec}),o}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rp=Un(xo),Xa=k({},xo,{view:0,detail:0}),tB=Un(Xa),Lp,Dp,Qa,yc=k({},Xa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fp,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!==Qa&&(Qa&&i.type==="mousemove"?(Lp=i.screenX-Qa.screenX,Dp=i.screenY-Qa.screenY):Dp=Lp=0,Qa=i),Lp)},movementY:function(i){return"movementY"in i?i.movementY:Dp}}),n_=Un(yc),nB=k({},yc,{dataTransfer:0}),rB=Un(nB),iB=k({},Xa,{relatedTarget:0}),Mp=Un(iB),sB=k({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),oB=Un(sB),aB=k({},xo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),uB=Un(aB),lB=k({},xo,{data:0}),r_=Un(lB),cB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dB={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"},fB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=fB[i])?!!o[i]:!1}function Fp(){return hB}var pB=k({},Xa,{key:function(i){if(i.key){var o=cB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=gc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?dB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fp,charCode:function(i){return i.type==="keypress"?gc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?gc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),mB=Un(pB),gB=k({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),i_=Un(gB),EB=k({},Xa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fp}),yB=Un(EB),TB=k({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),bB=Un(TB),xB=k({},yc,{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}),_B=Un(xB),wB=[9,13,27,32],Bp=c&&"CompositionEvent"in window,Ka=null;c&&"documentMode"in document&&(Ka=document.documentMode);var SB=c&&"TextEvent"in window&&!Ka,s_=c&&(!Bp||Ka&&8<Ka&&11>=Ka),o_=" ",a_=!1;function u_(i,o){switch(i){case"keyup":return wB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function l_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var _o=!1;function vB(i,o){switch(i){case"compositionend":return l_(o);case"keypress":return o.which!==32?null:(a_=!0,o_);case"textInput":return i=o.data,i===o_&&a_?null:i;default:return null}}function AB(i,o){if(_o)return i==="compositionend"||!Bp&&u_(i,o)?(i=e_(),mc=Pp=bi=null,_o=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return s_&&o.locale!=="ko"?null:o.data;default:return null}}var kB={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 c_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!kB[i.type]:o==="textarea"}function d_(i,o,l,h){Ix(h),o=wc(o,"onChange"),0<o.length&&(l=new Rp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var Ja=null,Za=null;function NB(i){C_(i,0)}function Tc(i){var o=ko(i);if(Lt(o))return i}function CB(i,o){if(i==="change")return o}var f_=!1;if(c){var Up;if(c){var Hp="oninput"in document;if(!Hp){var h_=document.createElement("div");h_.setAttribute("oninput","return;"),Hp=typeof h_.oninput=="function"}Up=Hp}else Up=!1;f_=Up&&(!document.documentMode||9<document.documentMode)}function p_(){Ja&&(Ja.detachEvent("onpropertychange",m_),Za=Ja=null)}function m_(i){if(i.propertyName==="value"&&Tc(Za)){var o=[];d_(o,Za,i,Tp(i)),Dx(NB,o)}}function OB(i,o,l){i==="focusin"?(p_(),Ja=o,Za=l,Ja.attachEvent("onpropertychange",m_)):i==="focusout"&&p_()}function IB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Tc(Za)}function PB(i,o){if(i==="click")return Tc(o)}function RB(i,o){if(i==="input"||i==="change")return Tc(o)}function LB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var dr=typeof Object.is=="function"?Object.is:LB;function eu(i,o){if(dr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!dr(i[E],o[E]))return!1}return!0}function g_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function E_(i,o){var l=g_(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=g_(l)}}function y_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?y_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function T_(){for(var i=window,o=Qt();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=Qt(i.document)}return o}function jp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function DB(i){var o=T_(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&y_(l.ownerDocument.documentElement,l)){if(h!==null&&jp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=E_(l,T);var S=E_(l,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var MB=c&&"documentMode"in document&&11>=document.documentMode,wo=null,$p=null,tu=null,zp=!1;function b_(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;zp||wo==null||wo!==Qt(h)||(h=wo,"selectionStart"in h&&jp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),tu&&eu(tu,h)||(tu=h,h=wc($p,"onSelect"),0<h.length&&(o=new Rp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=wo)))}function bc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var So={animationend:bc("Animation","AnimationEnd"),animationiteration:bc("Animation","AnimationIteration"),animationstart:bc("Animation","AnimationStart"),transitionend:bc("Transition","TransitionEnd")},Vp={},x_={};c&&(x_=document.createElement("div").style,"AnimationEvent"in window||(delete So.animationend.animation,delete So.animationiteration.animation,delete So.animationstart.animation),"TransitionEvent"in window||delete So.transitionend.transition);function xc(i){if(Vp[i])return Vp[i];if(!So[i])return i;var o=So[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in x_)return Vp[i]=o[l];return i}var __=xc("animationend"),w_=xc("animationiteration"),S_=xc("animationstart"),v_=xc("transitionend"),A_=new Map,k_="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 xi(i,o){A_.set(i,o),a(o,[i])}for(var qp=0;qp<k_.length;qp++){var Yp=k_[qp],FB=Yp.toLowerCase(),BB=Yp[0].toUpperCase()+Yp.slice(1);xi(FB,"on"+BB)}xi(__,"onAnimationEnd"),xi(w_,"onAnimationIteration"),xi(S_,"onAnimationStart"),xi("dblclick","onDoubleClick"),xi("focusin","onFocus"),xi("focusout","onBlur"),xi(v_,"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 nu="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(" "),UB=new Set("cancel close invalid load scroll toggle".split(" ").concat(nu));function N_(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,FF(h,o,void 0,i),i.currentTarget=null}function C_(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var S=h.length-1;0<=S;S--){var F=h[S],$=F.instance,ee=F.currentTarget;if(F=F.listener,$!==T&&E.isPropagationStopped())break e;N_(E,F,ee),T=$}else for(S=0;S<h.length;S++){if(F=h[S],$=F.instance,ee=F.currentTarget,F=F.listener,$!==T&&E.isPropagationStopped())break e;N_(E,F,ee),T=$}}}if(sc)throw i=wp,sc=!1,wp=null,i}function Tt(i,o){var l=o[em];l===void 0&&(l=o[em]=new Set);var h=i+"__bubble";l.has(h)||(O_(o,i,2,!1),l.add(h))}function Wp(i,o,l){var h=0;o&&(h|=4),O_(l,i,h,o)}var _c="_reactListening"+Math.random().toString(36).slice(2);function ru(i){if(!i[_c]){i[_c]=!0,r.forEach(function(l){l!=="selectionchange"&&(UB.has(l)||Wp(l,!1,i),Wp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[_c]||(o[_c]=!0,Wp("selectionchange",!1,o))}}function O_(i,o,l,h){switch(Zx(o)){case 1:var E=ZF;break;case 4:E=eB;break;default:E=Op}l=E.bind(null,o,l,i),E=void 0,!_p||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Gp(i,o,l,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var F=h.stateNode.containerInfo;if(F===E||F.nodeType===8&&F.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var $=S.tag;if(($===3||$===4)&&($=S.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;S=S.return}for(;F!==null;){if(S=ps(F),S===null)return;if($=S.tag,$===5||$===6){h=T=S;continue e}F=F.parentNode}}h=h.return}Dx(function(){var ee=T,Te=Tp(l),xe=[];e:{var Ee=A_.get(i);if(Ee!==void 0){var Oe=Rp,Pe=i;switch(i){case"keypress":if(gc(l)===0)break e;case"keydown":case"keyup":Oe=mB;break;case"focusin":Pe="focus",Oe=Mp;break;case"focusout":Pe="blur",Oe=Mp;break;case"beforeblur":case"afterblur":Oe=Mp;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":Oe=n_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=rB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=yB;break;case __:case w_:case S_:Oe=oB;break;case v_:Oe=bB;break;case"scroll":Oe=tB;break;case"wheel":Oe=_B;break;case"copy":case"cut":case"paste":Oe=uB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=i_}var Re=(o&4)!==0,It=!Re&&i==="scroll",Q=Re?Ee!==null?Ee+"Capture":null:Ee;Re=[];for(var V=ee,J;V!==null;){J=V;var Se=J.stateNode;if(J.tag===5&&Se!==null&&(J=Se,Q!==null&&(Se=Ua(V,Q),Se!=null&&Re.push(iu(V,Se,J)))),It)break;V=V.return}0<Re.length&&(Ee=new Oe(Ee,Pe,null,l,Te),xe.push({event:Ee,listeners:Re}))}}if((o&7)===0){e:{if(Ee=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",Ee&&l!==Bn&&(Pe=l.relatedTarget||l.fromElement)&&(ps(Pe)||Pe[Wr]))break e;if((Oe||Ee)&&(Ee=Te.window===Te?Te:(Ee=Te.ownerDocument)?Ee.defaultView||Ee.parentWindow:window,Oe?(Pe=l.relatedTarget||l.toElement,Oe=ee,Pe=Pe?ps(Pe):null,Pe!==null&&(It=hs(Pe),Pe!==It||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(Oe=null,Pe=ee),Oe!==Pe)){if(Re=n_,Se="onMouseLeave",Q="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Re=i_,Se="onPointerLeave",Q="onPointerEnter",V="pointer"),It=Oe==null?Ee:ko(Oe),J=Pe==null?Ee:ko(Pe),Ee=new Re(Se,V+"leave",Oe,l,Te),Ee.target=It,Ee.relatedTarget=J,Se=null,ps(Te)===ee&&(Re=new Re(Q,V+"enter",Pe,l,Te),Re.target=J,Re.relatedTarget=It,Se=Re),It=Se,Oe&&Pe)t:{for(Re=Oe,Q=Pe,V=0,J=Re;J;J=vo(J))V++;for(J=0,Se=Q;Se;Se=vo(Se))J++;for(;0<V-J;)Re=vo(Re),V--;for(;0<J-V;)Q=vo(Q),J--;for(;V--;){if(Re===Q||Q!==null&&Re===Q.alternate)break t;Re=vo(Re),Q=vo(Q)}Re=null}else Re=null;Oe!==null&&I_(xe,Ee,Oe,Re,!1),Pe!==null&&It!==null&&I_(xe,It,Pe,Re,!0)}}e:{if(Ee=ee?ko(ee):window,Oe=Ee.nodeName&&Ee.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&Ee.type==="file")var De=CB;else if(c_(Ee))if(f_)De=RB;else{De=IB;var je=OB}else(Oe=Ee.nodeName)&&Oe.toLowerCase()==="input"&&(Ee.type==="checkbox"||Ee.type==="radio")&&(De=PB);if(De&&(De=De(i,ee))){d_(xe,De,l,Te);break e}je&&je(i,Ee,ee),i==="focusout"&&(je=Ee._wrapperState)&&je.controlled&&Ee.type==="number"&&_e(Ee,"number",Ee.value)}switch(je=ee?ko(ee):window,i){case"focusin":(c_(je)||je.contentEditable==="true")&&(wo=je,$p=ee,tu=null);break;case"focusout":tu=$p=wo=null;break;case"mousedown":zp=!0;break;case"contextmenu":case"mouseup":case"dragend":zp=!1,b_(xe,l,Te);break;case"selectionchange":if(MB)break;case"keydown":case"keyup":b_(xe,l,Te)}var $e;if(Bp)e:{switch(i){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else _o?u_(i,l)&&(qe="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(qe="onCompositionStart");qe&&(s_&&l.locale!=="ko"&&(_o||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&_o&&($e=e_()):(bi=Te,Pp="value"in bi?bi.value:bi.textContent,_o=!0)),je=wc(ee,qe),0<je.length&&(qe=new r_(qe,i,null,l,Te),xe.push({event:qe,listeners:je}),$e?qe.data=$e:($e=l_(l),$e!==null&&(qe.data=$e)))),($e=SB?vB(i,l):AB(i,l))&&(ee=wc(ee,"onBeforeInput"),0<ee.length&&(Te=new r_("onBeforeInput","beforeinput",null,l,Te),xe.push({event:Te,listeners:ee}),Te.data=$e))}C_(xe,o)})}function iu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function wc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Ua(i,l),T!=null&&h.unshift(iu(i,T,E)),T=Ua(i,o),T!=null&&h.push(iu(i,T,E))),i=i.return}return h}function vo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function I_(i,o,l,h,E){for(var T=o._reactName,S=[];l!==null&&l!==h;){var F=l,$=F.alternate,ee=F.stateNode;if($!==null&&$===h)break;F.tag===5&&ee!==null&&(F=ee,E?($=Ua(l,T),$!=null&&S.unshift(iu(l,$,F))):E||($=Ua(l,T),$!=null&&S.push(iu(l,$,F)))),l=l.return}S.length!==0&&i.push({event:o,listeners:S})}var HB=/\r\n?/g,jB=/\u0000|\uFFFD/g;function P_(i){return(typeof i=="string"?i:""+i).replace(HB,`
21
- `).replace(jB,"")}function Sc(i,o,l){if(o=P_(o),P_(i)!==o&&l)throw Error(n(425))}function vc(){}var Xp=null,Qp=null;function Kp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Jp=typeof setTimeout=="function"?setTimeout:void 0,$B=typeof clearTimeout=="function"?clearTimeout:void 0,R_=typeof Promise=="function"?Promise:void 0,zB=typeof queueMicrotask=="function"?queueMicrotask:typeof R_!="undefined"?function(i){return R_.resolve(null).then(i).catch(VB)}:Jp;function VB(i){setTimeout(function(){throw i})}function Zp(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),Ga(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);Ga(o)}function _i(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function L_(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var Ao=Math.random().toString(36).slice(2),Rr="__reactFiber$"+Ao,su="__reactProps$"+Ao,Wr="__reactContainer$"+Ao,em="__reactEvents$"+Ao,qB="__reactListeners$"+Ao,YB="__reactHandles$"+Ao;function ps(i){var o=i[Rr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[Wr]||l[Rr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=L_(i);i!==null;){if(l=i[Rr])return l;i=L_(i)}return o}i=l,l=i.parentNode}return null}function ou(i){return i=i[Rr]||i[Wr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ko(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Ac(i){return i[su]||null}var tm=[],No=-1;function wi(i){return{current:i}}function bt(i){0>No||(i.current=tm[No],tm[No]=null,No--)}function mt(i,o){No++,tm[No]=i.current,i.current=o}var Si={},cn=wi(Si),Nn=wi(!1),ms=Si;function Co(i,o){var l=i.type.contextTypes;if(!l)return Si;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Cn(i){return i=i.childContextTypes,i!=null}function kc(){bt(Nn),bt(cn)}function D_(i,o,l){if(cn.current!==Si)throw Error(n(168));mt(cn,o),mt(Nn,l)}function M_(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return k({},l,h)}function Nc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Si,ms=cn.current,mt(cn,i),mt(Nn,Nn.current),!0}function F_(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=M_(i,o,ms),h.__reactInternalMemoizedMergedChildContext=i,bt(Nn),bt(cn),mt(cn,i)):bt(Nn),mt(Nn,l)}var Gr=null,Cc=!1,nm=!1;function B_(i){Gr===null?Gr=[i]:Gr.push(i)}function WB(i){Cc=!0,B_(i)}function vi(){if(!nm&&Gr!==null){nm=!0;var i=0,o=lt;try{var l=Gr;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}Gr=null,Cc=!1}catch(E){throw Gr!==null&&(Gr=Gr.slice(i+1)),Hx(Sp,vi),E}finally{lt=o,nm=!1}}return null}var Oo=[],Io=0,Oc=null,Ic=0,Gn=[],Xn=0,gs=null,Xr=1,Qr="";function Es(i,o){Oo[Io++]=Ic,Oo[Io++]=Oc,Oc=i,Ic=o}function U_(i,o,l){Gn[Xn++]=Xr,Gn[Xn++]=Qr,Gn[Xn++]=gs,gs=i;var h=Xr;i=Qr;var E=32-cr(h)-1;h&=~(1<<E),l+=1;var T=32-cr(o)+E;if(30<T){var S=E-E%5;T=(h&(1<<S)-1).toString(32),h>>=S,E-=S,Xr=1<<32-cr(o)+E|l<<E|h,Qr=T+i}else Xr=1<<T|l<<E|h,Qr=i}function rm(i){i.return!==null&&(Es(i,1),U_(i,1,0))}function im(i){for(;i===Oc;)Oc=Oo[--Io],Oo[Io]=null,Ic=Oo[--Io],Oo[Io]=null;for(;i===gs;)gs=Gn[--Xn],Gn[Xn]=null,Qr=Gn[--Xn],Gn[Xn]=null,Xr=Gn[--Xn],Gn[Xn]=null}var Hn=null,jn=null,wt=!1,fr=null;function H_(i,o){var l=Zn(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function j_(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Hn=i,jn=_i(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Hn=i,jn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=gs!==null?{id:Xr,overflow:Qr}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=Zn(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Hn=i,jn=null,!0):!1;default:return!1}}function sm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function om(i){if(wt){var o=jn;if(o){var l=o;if(!j_(i,o)){if(sm(i))throw Error(n(418));o=_i(l.nextSibling);var h=Hn;o&&j_(i,o)?H_(h,l):(i.flags=i.flags&-4097|2,wt=!1,Hn=i)}}else{if(sm(i))throw Error(n(418));i.flags=i.flags&-4097|2,wt=!1,Hn=i}}}function $_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Hn=i}function Pc(i){if(i!==Hn)return!1;if(!wt)return $_(i),wt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Kp(i.type,i.memoizedProps)),o&&(o=jn)){if(sm(i))throw z_(),Error(n(418));for(;o;)H_(i,o),o=_i(o.nextSibling)}if($_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){jn=_i(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}jn=null}}else jn=Hn?_i(i.stateNode.nextSibling):null;return!0}function z_(){for(var i=jn;i;)i=_i(i.nextSibling)}function Po(){jn=Hn=null,wt=!1}function am(i){fr===null?fr=[i]:fr.push(i)}var GB=j.ReactCurrentBatchConfig;function au(i,o,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 h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(S){var F=E.refs;S===null?delete F[T]:F[T]=S},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Rc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function V_(i){var o=i._init;return o(i._payload)}function q_(i){function o(Q,V){if(i){var J=Q.deletions;J===null?(Q.deletions=[V],Q.flags|=16):J.push(V)}}function l(Q,V){if(!i)return null;for(;V!==null;)o(Q,V),V=V.sibling;return null}function h(Q,V){for(Q=new Map;V!==null;)V.key!==null?Q.set(V.key,V):Q.set(V.index,V),V=V.sibling;return Q}function E(Q,V){return Q=Ri(Q,V),Q.index=0,Q.sibling=null,Q}function T(Q,V,J){return Q.index=J,i?(J=Q.alternate,J!==null?(J=J.index,J<V?(Q.flags|=2,V):J):(Q.flags|=2,V)):(Q.flags|=1048576,V)}function S(Q){return i&&Q.alternate===null&&(Q.flags|=2),Q}function F(Q,V,J,Se){return V===null||V.tag!==6?(V=Jm(J,Q.mode,Se),V.return=Q,V):(V=E(V,J),V.return=Q,V)}function $(Q,V,J,Se){var De=J.type;return De===G?Te(Q,V,J.props.children,Se,J.key):V!==null&&(V.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&V_(De)===V.type)?(Se=E(V,J.props),Se.ref=au(Q,V,J),Se.return=Q,Se):(Se=rd(J.type,J.key,J.props,null,Q.mode,Se),Se.ref=au(Q,V,J),Se.return=Q,Se)}function ee(Q,V,J,Se){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=Zm(J,Q.mode,Se),V.return=Q,V):(V=E(V,J.children||[]),V.return=Q,V)}function Te(Q,V,J,Se,De){return V===null||V.tag!==7?(V=vs(J,Q.mode,Se,De),V.return=Q,V):(V=E(V,J),V.return=Q,V)}function xe(Q,V,J){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Jm(""+V,Q.mode,J),V.return=Q,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return J=rd(V.type,V.key,V.props,null,Q.mode,J),J.ref=au(Q,null,V),J.return=Q,J;case L:return V=Zm(V,Q.mode,J),V.return=Q,V;case Ae:var Se=V._init;return xe(Q,Se(V._payload),J)}if(Xe(V)||ie(V))return V=vs(V,Q.mode,J,null),V.return=Q,V;Rc(Q,V)}return null}function Ee(Q,V,J,Se){var De=V!==null?V.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return De!==null?null:F(Q,V,""+J,Se);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case X:return J.key===De?$(Q,V,J,Se):null;case L:return J.key===De?ee(Q,V,J,Se):null;case Ae:return De=J._init,Ee(Q,V,De(J._payload),Se)}if(Xe(J)||ie(J))return De!==null?null:Te(Q,V,J,Se,null);Rc(Q,J)}return null}function Oe(Q,V,J,Se,De){if(typeof Se=="string"&&Se!==""||typeof Se=="number")return Q=Q.get(J)||null,F(V,Q,""+Se,De);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case X:return Q=Q.get(Se.key===null?J:Se.key)||null,$(V,Q,Se,De);case L:return Q=Q.get(Se.key===null?J:Se.key)||null,ee(V,Q,Se,De);case Ae:var je=Se._init;return Oe(Q,V,J,je(Se._payload),De)}if(Xe(Se)||ie(Se))return Q=Q.get(J)||null,Te(V,Q,Se,De,null);Rc(V,Se)}return null}function Pe(Q,V,J,Se){for(var De=null,je=null,$e=V,qe=V=0,Wt=null;$e!==null&&qe<J.length;qe++){$e.index>qe?(Wt=$e,$e=null):Wt=$e.sibling;var st=Ee(Q,$e,J[qe],Se);if(st===null){$e===null&&($e=Wt);break}i&&$e&&st.alternate===null&&o(Q,$e),V=T(st,V,qe),je===null?De=st:je.sibling=st,je=st,$e=Wt}if(qe===J.length)return l(Q,$e),wt&&Es(Q,qe),De;if($e===null){for(;qe<J.length;qe++)$e=xe(Q,J[qe],Se),$e!==null&&(V=T($e,V,qe),je===null?De=$e:je.sibling=$e,je=$e);return wt&&Es(Q,qe),De}for($e=h(Q,$e);qe<J.length;qe++)Wt=Oe($e,Q,qe,J[qe],Se),Wt!==null&&(i&&Wt.alternate!==null&&$e.delete(Wt.key===null?qe:Wt.key),V=T(Wt,V,qe),je===null?De=Wt:je.sibling=Wt,je=Wt);return i&&$e.forEach(function(Li){return o(Q,Li)}),wt&&Es(Q,qe),De}function Re(Q,V,J,Se){var De=ie(J);if(typeof De!="function")throw Error(n(150));if(J=De.call(J),J==null)throw Error(n(151));for(var je=De=null,$e=V,qe=V=0,Wt=null,st=J.next();$e!==null&&!st.done;qe++,st=J.next()){$e.index>qe?(Wt=$e,$e=null):Wt=$e.sibling;var Li=Ee(Q,$e,st.value,Se);if(Li===null){$e===null&&($e=Wt);break}i&&$e&&Li.alternate===null&&o(Q,$e),V=T(Li,V,qe),je===null?De=Li:je.sibling=Li,je=Li,$e=Wt}if(st.done)return l(Q,$e),wt&&Es(Q,qe),De;if($e===null){for(;!st.done;qe++,st=J.next())st=xe(Q,st.value,Se),st!==null&&(V=T(st,V,qe),je===null?De=st:je.sibling=st,je=st);return wt&&Es(Q,qe),De}for($e=h(Q,$e);!st.done;qe++,st=J.next())st=Oe($e,Q,qe,st.value,Se),st!==null&&(i&&st.alternate!==null&&$e.delete(st.key===null?qe:st.key),V=T(st,V,qe),je===null?De=st:je.sibling=st,je=st);return i&&$e.forEach(function(k7){return o(Q,k7)}),wt&&Es(Q,qe),De}function It(Q,V,J,Se){if(typeof J=="object"&&J!==null&&J.type===G&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case X:e:{for(var De=J.key,je=V;je!==null;){if(je.key===De){if(De=J.type,De===G){if(je.tag===7){l(Q,je.sibling),V=E(je,J.props.children),V.return=Q,Q=V;break e}}else if(je.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&V_(De)===je.type){l(Q,je.sibling),V=E(je,J.props),V.ref=au(Q,je,J),V.return=Q,Q=V;break e}l(Q,je);break}else o(Q,je);je=je.sibling}J.type===G?(V=vs(J.props.children,Q.mode,Se,J.key),V.return=Q,Q=V):(Se=rd(J.type,J.key,J.props,null,Q.mode,Se),Se.ref=au(Q,V,J),Se.return=Q,Q=Se)}return S(Q);case L:e:{for(je=J.key;V!==null;){if(V.key===je)if(V.tag===4&&V.stateNode.containerInfo===J.containerInfo&&V.stateNode.implementation===J.implementation){l(Q,V.sibling),V=E(V,J.children||[]),V.return=Q,Q=V;break e}else{l(Q,V);break}else o(Q,V);V=V.sibling}V=Zm(J,Q.mode,Se),V.return=Q,Q=V}return S(Q);case Ae:return je=J._init,It(Q,V,je(J._payload),Se)}if(Xe(J))return Pe(Q,V,J,Se);if(ie(J))return Re(Q,V,J,Se);Rc(Q,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,V!==null&&V.tag===6?(l(Q,V.sibling),V=E(V,J),V.return=Q,Q=V):(l(Q,V),V=Jm(J,Q.mode,Se),V.return=Q,Q=V),S(Q)):l(Q,V)}return It}var Ro=q_(!0),Y_=q_(!1),Lc=wi(null),Dc=null,Lo=null,um=null;function lm(){um=Lo=Dc=null}function cm(i){var o=Lc.current;bt(Lc),i._currentValue=o}function dm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function Do(i,o){Dc=i,um=Lo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(On=!0),i.firstContext=null)}function Qn(i){var o=i._currentValue;if(um!==i)if(i={context:i,memoizedValue:o,next:null},Lo===null){if(Dc===null)throw Error(n(308));Lo=i,Dc.dependencies={lanes:0,firstContext:i}}else Lo=Lo.next=i;return o}var ys=null;function fm(i){ys===null?ys=[i]:ys.push(i)}function W_(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,fm(o)):(l.next=E.next,E.next=l),o.interleaved=l,Kr(i,h)}function Kr(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Ai=!1;function hm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function G_(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Jr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function ki(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(rt&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,Kr(i,l)}return E=h.interleaved,E===null?(o.next=o,fm(h)):(o.next=E.next,E.next=o),h.interleaved=o,Kr(i,l)}function Mc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,kp(i,l)}}function X_(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=S:T=T.next=S,l=l.next}while(l!==null);T===null?E=T=o:T=T.next=o}else E=T=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Fc(i,o,l,h){var E=i.updateQueue;Ai=!1;var T=E.firstBaseUpdate,S=E.lastBaseUpdate,F=E.shared.pending;if(F!==null){E.shared.pending=null;var $=F,ee=$.next;$.next=null,S===null?T=ee:S.next=ee,S=$;var Te=i.alternate;Te!==null&&(Te=Te.updateQueue,F=Te.lastBaseUpdate,F!==S&&(F===null?Te.firstBaseUpdate=ee:F.next=ee,Te.lastBaseUpdate=$))}if(T!==null){var xe=E.baseState;S=0,Te=ee=$=null,F=T;do{var Ee=F.lane,Oe=F.eventTime;if((h&Ee)===Ee){Te!==null&&(Te=Te.next={eventTime:Oe,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var Pe=i,Re=F;switch(Ee=o,Oe=l,Re.tag){case 1:if(Pe=Re.payload,typeof Pe=="function"){xe=Pe.call(Oe,xe,Ee);break e}xe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Re.payload,Ee=typeof Pe=="function"?Pe.call(Oe,xe,Ee):Pe,Ee==null)break e;xe=k({},xe,Ee);break e;case 2:Ai=!0}}F.callback!==null&&F.lane!==0&&(i.flags|=64,Ee=E.effects,Ee===null?E.effects=[F]:Ee.push(F))}else Oe={eventTime:Oe,lane:Ee,tag:F.tag,payload:F.payload,callback:F.callback,next:null},Te===null?(ee=Te=Oe,$=xe):Te=Te.next=Oe,S|=Ee;if(F=F.next,F===null){if(F=E.shared.pending,F===null)break;Ee=F,F=Ee.next,Ee.next=null,E.lastBaseUpdate=Ee,E.shared.pending=null}}while(!0);if(Te===null&&($=xe),E.baseState=$,E.firstBaseUpdate=ee,E.lastBaseUpdate=Te,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);xs|=S,i.lanes=S,i.memoizedState=xe}}function Q_(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var uu={},Lr=wi(uu),lu=wi(uu),cu=wi(uu);function Ts(i){if(i===uu)throw Error(n(174));return i}function pm(i,o){switch(mt(cu,o),mt(lu,i),mt(Lr,uu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ve(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ve(o,i)}bt(Lr),mt(Lr,o)}function Mo(){bt(Lr),bt(lu),bt(cu)}function K_(i){Ts(cu.current);var o=Ts(Lr.current),l=ve(o,i.type);o!==l&&(mt(lu,i),mt(Lr,l))}function mm(i){lu.current===i&&(bt(Lr),bt(lu))}var St=wi(0);function Bc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var gm=[];function Em(){for(var i=0;i<gm.length;i++)gm[i]._workInProgressVersionPrimary=null;gm.length=0}var Uc=j.ReactCurrentDispatcher,ym=j.ReactCurrentBatchConfig,bs=0,vt=null,Bt=null,qt=null,Hc=!1,du=!1,fu=0,XB=0;function dn(){throw Error(n(321))}function Tm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!dr(i[l],o[l]))return!1;return!0}function bm(i,o,l,h,E,T){if(bs=T,vt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Uc.current=i===null||i.memoizedState===null?ZB:e7,i=l(h,E),du){T=0;do{if(du=!1,fu=0,25<=T)throw Error(n(301));T+=1,qt=Bt=null,o.updateQueue=null,Uc.current=t7,i=l(h,E)}while(du)}if(Uc.current=zc,o=Bt!==null&&Bt.next!==null,bs=0,qt=Bt=vt=null,Hc=!1,o)throw Error(n(300));return i}function xm(){var i=fu!==0;return fu=0,i}function Dr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?vt.memoizedState=qt=i:qt=qt.next=i,qt}function Kn(){if(Bt===null){var i=vt.alternate;i=i!==null?i.memoizedState:null}else i=Bt.next;var o=qt===null?vt.memoizedState:qt.next;if(o!==null)qt=o,Bt=i;else{if(i===null)throw Error(n(310));Bt=i,i={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},qt===null?vt.memoizedState=qt=i:qt=qt.next=i}return qt}function hu(i,o){return typeof o=="function"?o(i):o}function _m(i){var o=Kn(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Bt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var F=S=null,$=null,ee=T;do{var Te=ee.lane;if((bs&Te)===Te)$!==null&&($=$.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),h=ee.hasEagerState?ee.eagerState:i(h,ee.action);else{var xe={lane:Te,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};$===null?(F=$=xe,S=h):$=$.next=xe,vt.lanes|=Te,xs|=Te}ee=ee.next}while(ee!==null&&ee!==T);$===null?S=h:$.next=F,dr(h,o.memoizedState)||(On=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=$,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,vt.lanes|=T,xs|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function wm(i){var o=Kn(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=o.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do T=i(T,S.action),S=S.next;while(S!==E);dr(T,o.memoizedState)||(On=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function J_(){}function Z_(i,o){var l=vt,h=Kn(),E=o(),T=!dr(h.memoizedState,E);if(T&&(h.memoizedState=E,On=!0),h=h.queue,Sm(nw.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||qt!==null&&qt.memoizedState.tag&1){if(l.flags|=2048,pu(9,tw.bind(null,l,h,E,o),void 0,null),Yt===null)throw Error(n(349));(bs&30)!==0||ew(l,o,E)}return E}function ew(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=vt.updateQueue,o===null?(o={lastEffect:null,stores:null},vt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function tw(i,o,l,h){o.value=l,o.getSnapshot=h,rw(o)&&iw(i)}function nw(i,o,l){return l(function(){rw(o)&&iw(i)})}function rw(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!dr(i,l)}catch(h){return!0}}function iw(i){var o=Kr(i,1);o!==null&&gr(o,i,1,-1)}function sw(i){var o=Dr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hu,lastRenderedState:i},o.queue=i,i=i.dispatch=JB.bind(null,vt,i),[o.memoizedState,i]}function pu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=vt.updateQueue,o===null?(o={lastEffect:null,stores:null},vt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function ow(){return Kn().memoizedState}function jc(i,o,l,h){var E=Dr();vt.flags|=i,E.memoizedState=pu(1|o,l,void 0,h===void 0?null:h)}function $c(i,o,l,h){var E=Kn();h=h===void 0?null:h;var T=void 0;if(Bt!==null){var S=Bt.memoizedState;if(T=S.destroy,h!==null&&Tm(h,S.deps)){E.memoizedState=pu(o,l,T,h);return}}vt.flags|=i,E.memoizedState=pu(1|o,l,T,h)}function aw(i,o){return jc(8390656,8,i,o)}function Sm(i,o){return $c(2048,8,i,o)}function uw(i,o){return $c(4,2,i,o)}function lw(i,o){return $c(4,4,i,o)}function cw(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function dw(i,o,l){return l=l!=null?l.concat([i]):null,$c(4,4,cw.bind(null,o,i),l)}function vm(){}function fw(i,o){var l=Kn();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&Tm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function hw(i,o){var l=Kn();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&Tm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function pw(i,o,l){return(bs&21)===0?(i.baseState&&(i.baseState=!1,On=!0),i.memoizedState=l):(dr(l,o)||(l=Vx(),vt.lanes|=l,xs|=l,i.baseState=!0),o)}function QB(i,o){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=ym.transition;ym.transition={};try{i(!1),o()}finally{lt=l,ym.transition=h}}function mw(){return Kn().memoizedState}function KB(i,o,l){var h=Ii(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},gw(i))Ew(o,l);else if(l=W_(i,o,l,h),l!==null){var E=En();gr(l,i,h,E),yw(l,o,h)}}function JB(i,o,l){var h=Ii(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(gw(i))Ew(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var S=o.lastRenderedState,F=T(S,l);if(E.hasEagerState=!0,E.eagerState=F,dr(F,S)){var $=o.interleaved;$===null?(E.next=E,fm(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(ee){}l=W_(i,o,E,h),l!==null&&(E=En(),gr(l,i,h,E),yw(l,o,h))}}function gw(i){var o=i.alternate;return i===vt||o!==null&&o===vt}function Ew(i,o){du=Hc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function yw(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,kp(i,l)}}var zc={readContext:Qn,useCallback:dn,useContext:dn,useEffect:dn,useImperativeHandle:dn,useInsertionEffect:dn,useLayoutEffect:dn,useMemo:dn,useReducer:dn,useRef:dn,useState:dn,useDebugValue:dn,useDeferredValue:dn,useTransition:dn,useMutableSource:dn,useSyncExternalStore:dn,useId:dn,unstable_isNewReconciler:!1},ZB={readContext:Qn,useCallback:function(i,o){return Dr().memoizedState=[i,o===void 0?null:o],i},useContext:Qn,useEffect:aw,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,jc(4194308,4,cw.bind(null,o,i),l)},useLayoutEffect:function(i,o){return jc(4194308,4,i,o)},useInsertionEffect:function(i,o){return jc(4,2,i,o)},useMemo:function(i,o){var l=Dr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Dr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=KB.bind(null,vt,i),[h.memoizedState,i]},useRef:function(i){var o=Dr();return i={current:i},o.memoizedState=i},useState:sw,useDebugValue:vm,useDeferredValue:function(i){return Dr().memoizedState=i},useTransition:function(){var i=sw(!1),o=i[0];return i=QB.bind(null,i[1]),Dr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=vt,E=Dr();if(wt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),Yt===null)throw Error(n(349));(bs&30)!==0||ew(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,aw(nw.bind(null,h,T,i),[i]),h.flags|=2048,pu(9,tw.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=Dr(),o=Yt.identifierPrefix;if(wt){var l=Qr,h=Xr;l=(h&~(1<<32-cr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=fu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=XB++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},e7={readContext:Qn,useCallback:fw,useContext:Qn,useEffect:Sm,useImperativeHandle:dw,useInsertionEffect:uw,useLayoutEffect:lw,useMemo:hw,useReducer:_m,useRef:ow,useState:function(){return _m(hu)},useDebugValue:vm,useDeferredValue:function(i){var o=Kn();return pw(o,Bt.memoizedState,i)},useTransition:function(){var i=_m(hu)[0],o=Kn().memoizedState;return[i,o]},useMutableSource:J_,useSyncExternalStore:Z_,useId:mw,unstable_isNewReconciler:!1},t7={readContext:Qn,useCallback:fw,useContext:Qn,useEffect:Sm,useImperativeHandle:dw,useInsertionEffect:uw,useLayoutEffect:lw,useMemo:hw,useReducer:wm,useRef:ow,useState:function(){return wm(hu)},useDebugValue:vm,useDeferredValue:function(i){var o=Kn();return Bt===null?o.memoizedState=i:pw(o,Bt.memoizedState,i)},useTransition:function(){var i=wm(hu)[0],o=Kn().memoizedState;return[i,o]},useMutableSource:J_,useSyncExternalStore:Z_,useId:mw,unstable_isNewReconciler:!1};function hr(i,o){if(i&&i.defaultProps){o=k({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Am(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:k({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Vc={isMounted:function(i){return(i=i._reactInternals)?hs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=En(),E=Ii(i),T=Jr(h,E);T.payload=o,l!=null&&(T.callback=l),o=ki(i,T,E),o!==null&&(gr(o,i,E,h),Mc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=En(),E=Ii(i),T=Jr(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=ki(i,T,E),o!==null&&(gr(o,i,E,h),Mc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=En(),h=Ii(i),E=Jr(l,h);E.tag=2,o!=null&&(E.callback=o),o=ki(i,E,h),o!==null&&(gr(o,i,h,l),Mc(o,i,h))}};function Tw(i,o,l,h,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,S):o.prototype&&o.prototype.isPureReactComponent?!eu(l,h)||!eu(E,T):!0}function bw(i,o,l){var h=!1,E=Si,T=o.contextType;return typeof T=="object"&&T!==null?T=Qn(T):(E=Cn(o)?ms:cn.current,h=o.contextTypes,T=(h=h!=null)?Co(i,E):Si),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Vc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function xw(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&Vc.enqueueReplaceState(o,o.state,null)}function km(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},hm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=Qn(T):(T=Cn(o)?ms:cn.current,E.context=Co(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Am(i,o,T,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&Vc.enqueueReplaceState(E,E.state,null),Fc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Fo(i,o){try{var l="",h=o;do l+=Ce(h),h=h.return;while(h);var E=l}catch(T){E=`
19
+ `),S=E.length-1,B=T.length-1;1<=S&&0<=B&&E[S]!==T[B];)B--;for(;1<=S&&0<=B;S--,B--)if(E[S]!==T[B]){if(S!==1||B!==1)do if(S--,B--,0>B||E[S]!==T[B]){var $=`
20
+ `+E[S].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=S&&0<=B);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?J(i):""}function Ce(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=Ae(i.type,!1),i;case 11:return i=Ae(i.type.render,!1),i;case 1:return i=Ae(i.type,!0),i;default:return""}}function ge(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case V:return"Fragment";case L:return"Portal";case le:return"Profiler";case ie:return"StrictMode";case fe:return"Suspense";case he: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 te:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case de:return o=i.displayName||null,o!==null?o:ge(i.type)||"Memo";case we:o=i._payload,i=i._init;try{return ge(i(o))}catch(c){}}return null}function Le(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(o);case 8:return o===ie?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function je(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ke(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function pt(i){var o=Ke(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,T=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,T.call(this,S)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ot(i){i._valueTracker||(i._valueTracker=pt(i))}function Ut(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=Ke(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function yn(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function Tn(i,o){var c=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Lt(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=je(o.value!=null?o.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Be(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function ke(i,o){Be(i,o);var c=je(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?et(i,o.type,c):o.hasOwnProperty("defaultValue")&&et(i,o.type,je(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function We(i,o,c){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,c||o===i.value||(i.value=o),i.defaultValue=o}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function et(i,o,c){(o!=="number"||yn(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var se=Array.isArray;function Se(i,o,c,h){if(i=i.options,o){o={};for(var E=0;E<c.length;E++)o["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=o.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+je(c),o=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function ae(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function ve(i,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(se(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:je(c)}}function $e(i,o){var c=je(o.value),h=je(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function dt(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ee(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var qe,Je=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(qe=qe||document.createElement("div"),qe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=qe.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function st(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var en={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},Xr=["Webkit","ms","Moz","O"];Object.keys(en).forEach(function(i){Xr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),en[o]=en[i]})});function Qn(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||en.hasOwnProperty(i)&&en[i]?(""+o).trim():o+"px"}function Ti(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Qn(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var hs=N({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 tn(i,o){if(o){if(hs[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Lr(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jn=null;function bp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xp=null,To=null,bo=null;function Ox(i){if(i=au(i)){if(typeof xp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Ac(o),xp(i.stateNode,i.type,o))}}function Ix(i){To?bo?bo.push(i):bo=[i]:To=i}function Px(){if(To){var i=To,o=bo;if(bo=To=null,Ox(i),o)for(i=0;i<o.length;i++)Ox(o[i])}}function Rx(i,o){return i(o)}function Lx(){}var _p=!1;function Dx(i,o,c){if(_p)return i(o,c);_p=!0;try{return Rx(i,o,c)}finally{_p=!1,(To!==null||bo!==null)&&(Lx(),Px())}}function Ha(i,o){var c=i.stateNode;if(c===null)return null;var h=Ac(c);if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var wp=!1;if(l)try{var ja={};Object.defineProperty(ja,"passive",{get:function(){wp=!0}}),window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch(i){wp=!1}function FF(i,o,c,h,E,T,S,B,$){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(Ee){this.onError(Ee)}}var $a=!1,ic=null,sc=!1,Sp=null,BF={onError:function(i){$a=!0,ic=i}};function UF(i,o,c,h,E,T,S,B,$){$a=!1,ic=null,FF.apply(BF,arguments)}function HF(i,o,c,h,E,T,S,B,$){if(UF.apply(this,arguments),$a){if($a){var Z=ic;$a=!1,ic=null}else throw Error(n(198));sc||(sc=!0,Sp=Z)}}function ps(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function Mx(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function Fx(i){if(ps(i)!==i)throw Error(n(188))}function jF(i){var o=i.alternate;if(!o){if(o=ps(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,h=o;;){var E=c.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return Fx(E),i;if(T===h)return Fx(E),o;T=T.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=T;else{for(var S=!1,B=E.child;B;){if(B===c){S=!0,c=E,h=T;break}if(B===h){S=!0,h=E,c=T;break}B=B.sibling}if(!S){for(B=T.child;B;){if(B===c){S=!0,c=T,h=E;break}if(B===h){S=!0,h=T,c=E;break}B=B.sibling}if(!S)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function Bx(i){return i=jF(i),i!==null?Ux(i):null}function Ux(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Ux(i);if(o!==null)return o;i=i.sibling}return null}var Hx=t.unstable_scheduleCallback,jx=t.unstable_cancelCallback,$F=t.unstable_shouldYield,zF=t.unstable_requestPaint,Dt=t.unstable_now,VF=t.unstable_getCurrentPriorityLevel,vp=t.unstable_ImmediatePriority,$x=t.unstable_UserBlockingPriority,oc=t.unstable_NormalPriority,qF=t.unstable_LowPriority,zx=t.unstable_IdlePriority,ac=null,Dr=null;function YF(i){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(ac,i,void 0,(i.current.flags&128)===128)}catch(o){}}var hr=Math.clz32?Math.clz32:XF,WF=Math.log,GF=Math.LN2;function XF(i){return i>>>=0,i===0?32:31-(WF(i)/GF|0)|0}var uc=64,lc=4194304;function za(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 cc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,S=c&268435455;if(S!==0){var B=S&~E;B!==0?h=za(B):(T&=S,T!==0&&(h=za(T)))}else S=c&~E,S!==0?h=za(S):T!==0&&(h=za(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-hr(o),E=1<<c,h|=i[c],o&=~E;return h}function QF(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function KF(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-hr(T),B=1<<S,$=E[S];$===-1?((B&c)===0||(B&h)!==0)&&(E[S]=QF(B,o)):$<=o&&(i.expiredLanes|=B),T&=~B}}function Ap(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Vx(){var i=uc;return uc<<=1,(uc&4194240)===0&&(uc=64),i}function Np(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Va(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-hr(o),i[o]=c}function JF(i,o){var c=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-hr(c),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~T}}function kp(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-hr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var ft=0;function qx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Yx,Cp,Wx,Gx,Xx,Op=!1,dc=[],bi=null,xi=null,_i=null,qa=new Map,Ya=new Map,wi=[],ZF="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 Qx(i,o){switch(i){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":qa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ya.delete(o.pointerId)}}function Wa(i,o,c,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=au(o),o!==null&&Cp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function eB(i,o,c,h,E){switch(o){case"focusin":return bi=Wa(bi,i,o,c,h,E),!0;case"dragenter":return xi=Wa(xi,i,o,c,h,E),!0;case"mouseover":return _i=Wa(_i,i,o,c,h,E),!0;case"pointerover":var T=E.pointerId;return qa.set(T,Wa(qa.get(T)||null,i,o,c,h,E)),!0;case"gotpointercapture":return T=E.pointerId,Ya.set(T,Wa(Ya.get(T)||null,i,o,c,h,E)),!0}return!1}function Kx(i){var o=ms(i.target);if(o!==null){var c=ps(o);if(c!==null){if(o=c.tag,o===13){if(o=Mx(c),o!==null){i.blockedOn=o,Xx(i.priority,function(){Wx(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Pp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);jn=h,c.target.dispatchEvent(h),jn=null}else return o=au(c),o!==null&&Cp(o),i.blockedOn=c,!1;o.shift()}return!0}function Jx(i,o,c){fc(i)&&c.delete(o)}function tB(){Op=!1,bi!==null&&fc(bi)&&(bi=null),xi!==null&&fc(xi)&&(xi=null),_i!==null&&fc(_i)&&(_i=null),qa.forEach(Jx),Ya.forEach(Jx)}function Ga(i,o){i.blockedOn===o&&(i.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,tB)))}function Xa(i){function o(E){return Ga(E,i)}if(0<dc.length){Ga(dc[0],i);for(var c=1;c<dc.length;c++){var h=dc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(bi!==null&&Ga(bi,i),xi!==null&&Ga(xi,i),_i!==null&&Ga(_i,i),qa.forEach(o),Ya.forEach(o),c=0;c<wi.length;c++)h=wi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<wi.length&&(c=wi[0],c.blockedOn===null);)Kx(c),c.blockedOn===null&&wi.shift()}var xo=U.ReactCurrentBatchConfig,hc=!0;function nB(i,o,c,h){var E=ft,T=xo.transition;xo.transition=null;try{ft=1,Ip(i,o,c,h)}finally{ft=E,xo.transition=T}}function rB(i,o,c,h){var E=ft,T=xo.transition;xo.transition=null;try{ft=4,Ip(i,o,c,h)}finally{ft=E,xo.transition=T}}function Ip(i,o,c,h){if(hc){var E=Pp(i,o,c,h);if(E===null)Xp(i,o,h,pc,c),Qx(i,h);else if(eB(E,i,o,c,h))h.stopPropagation();else if(Qx(i,h),o&4&&-1<ZF.indexOf(i)){for(;E!==null;){var T=au(E);if(T!==null&&Yx(T),T=Pp(i,o,c,h),T===null&&Xp(i,o,h,pc,c),T===E)break;E=T}E!==null&&h.stopPropagation()}else Xp(i,o,h,null,c)}}var pc=null;function Pp(i,o,c,h){if(pc=null,i=bp(h),i=ms(i),i!==null)if(o=ps(i),o===null)i=null;else if(c=o.tag,c===13){if(i=Mx(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return pc=i,null}function Zx(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(VF()){case vp:return 1;case $x:return 4;case oc:case qF:return 16;case zx:return 536870912;default:return 16}default:return 16}}var Si=null,Rp=null,mc=null;function e_(){if(mc)return mc;var i,o=Rp,c=o.length,h,E="value"in Si?Si.value:Si.textContent,T=E.length;for(i=0;i<c&&o[i]===E[i];i++);var S=c-i;for(h=1;h<=S&&o[c-h]===E[T-h];h++);return mc=E.slice(i,1<h?1-h:void 0)}function gc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Ec(){return!0}function t_(){return!1}function $n(i){function o(c,h,E,T,S){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=S,this.currentTarget=null;for(var B in i)i.hasOwnProperty(B)&&(c=i[B],this[B]=c?c(T):T[B]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Ec:t_,this.isPropagationStopped=t_,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Ec)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Ec)},persist:function(){},isPersistent:Ec}),o}var _o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lp=$n(_o),Qa=N({},_o,{view:0,detail:0}),iB=$n(Qa),Dp,Mp,Ka,yc=N({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bp,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!==Ka&&(Ka&&i.type==="mousemove"?(Dp=i.screenX-Ka.screenX,Mp=i.screenY-Ka.screenY):Mp=Dp=0,Ka=i),Dp)},movementY:function(i){return"movementY"in i?i.movementY:Mp}}),n_=$n(yc),sB=N({},yc,{dataTransfer:0}),oB=$n(sB),aB=N({},Qa,{relatedTarget:0}),Fp=$n(aB),uB=N({},_o,{animationName:0,elapsedTime:0,pseudoElement:0}),lB=$n(uB),cB=N({},_o,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),dB=$n(cB),fB=N({},_o,{data:0}),r_=$n(fB),hB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pB={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"},mB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=mB[i])?!!o[i]:!1}function Bp(){return gB}var EB=N({},Qa,{key:function(i){if(i.key){var o=hB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=gc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?pB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bp,charCode:function(i){return i.type==="keypress"?gc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?gc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),yB=$n(EB),TB=N({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),i_=$n(TB),bB=N({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bp}),xB=$n(bB),_B=N({},_o,{propertyName:0,elapsedTime:0,pseudoElement:0}),wB=$n(_B),SB=N({},yc,{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}),vB=$n(SB),AB=[9,13,27,32],Up=l&&"CompositionEvent"in window,Ja=null;l&&"documentMode"in document&&(Ja=document.documentMode);var NB=l&&"TextEvent"in window&&!Ja,s_=l&&(!Up||Ja&&8<Ja&&11>=Ja),o_=" ",a_=!1;function u_(i,o){switch(i){case"keyup":return AB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function l_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var wo=!1;function kB(i,o){switch(i){case"compositionend":return l_(o);case"keypress":return o.which!==32?null:(a_=!0,o_);case"textInput":return i=o.data,i===o_&&a_?null:i;default:return null}}function CB(i,o){if(wo)return i==="compositionend"||!Up&&u_(i,o)?(i=e_(),mc=Rp=Si=null,wo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return s_&&o.locale!=="ko"?null:o.data;default:return null}}var OB={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 c_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!OB[i.type]:o==="textarea"}function d_(i,o,c,h){Ix(h),o=wc(o,"onChange"),0<o.length&&(c=new Lp("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var Za=null,eu=null;function IB(i){C_(i,0)}function Tc(i){var o=ko(i);if(Ut(o))return i}function PB(i,o){if(i==="change")return o}var f_=!1;if(l){var Hp;if(l){var jp="oninput"in document;if(!jp){var h_=document.createElement("div");h_.setAttribute("oninput","return;"),jp=typeof h_.oninput=="function"}Hp=jp}else Hp=!1;f_=Hp&&(!document.documentMode||9<document.documentMode)}function p_(){Za&&(Za.detachEvent("onpropertychange",m_),eu=Za=null)}function m_(i){if(i.propertyName==="value"&&Tc(eu)){var o=[];d_(o,eu,i,bp(i)),Dx(IB,o)}}function RB(i,o,c){i==="focusin"?(p_(),Za=o,eu=c,Za.attachEvent("onpropertychange",m_)):i==="focusout"&&p_()}function LB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Tc(eu)}function DB(i,o){if(i==="click")return Tc(o)}function MB(i,o){if(i==="input"||i==="change")return Tc(o)}function FB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var pr=typeof Object.is=="function"?Object.is:FB;function tu(i,o){if(pr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(o,E)||!pr(i[E],o[E]))return!1}return!0}function g_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function E_(i,o){var c=g_(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=o&&h>=o)return{node:c,offset:o-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=g_(c)}}function y_(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?y_(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function T_(){for(var i=window,o=yn();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=o.contentWindow;else break;o=yn(i.document)}return o}function $p(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function BB(i){var o=T_(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&y_(c.ownerDocument.documentElement,c)){if(h!==null&&$p(c)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(i,c.value.length);else if(i=(o=c.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=E_(c,T);var S=E_(c,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),i.addRange(o)))}}for(o=[],i=c;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)i=o[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var UB=l&&"documentMode"in document&&11>=document.documentMode,So=null,zp=null,nu=null,Vp=!1;function b_(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Vp||So==null||So!==yn(h)||(h=So,"selectionStart"in h&&$p(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),nu&&tu(nu,h)||(nu=h,h=wc(zp,"onSelect"),0<h.length&&(o=new Lp("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=So)))}function bc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var vo={animationend:bc("Animation","AnimationEnd"),animationiteration:bc("Animation","AnimationIteration"),animationstart:bc("Animation","AnimationStart"),transitionend:bc("Transition","TransitionEnd")},qp={},x_={};l&&(x_=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function xc(i){if(qp[i])return qp[i];if(!vo[i])return i;var o=vo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in x_)return qp[i]=o[c];return i}var __=xc("animationend"),w_=xc("animationiteration"),S_=xc("animationstart"),v_=xc("transitionend"),A_=new Map,N_="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 vi(i,o){A_.set(i,o),a(o,[i])}for(var Yp=0;Yp<N_.length;Yp++){var Wp=N_[Yp],HB=Wp.toLowerCase(),jB=Wp[0].toUpperCase()+Wp.slice(1);vi(HB,"on"+jB)}vi(__,"onAnimationEnd"),vi(w_,"onAnimationIteration"),vi(S_,"onAnimationStart"),vi("dblclick","onDoubleClick"),vi("focusin","onFocus"),vi("focusout","onBlur"),vi(v_,"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 ru="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(" "),$B=new Set("cancel close invalid load scroll toggle".split(" ").concat(ru));function k_(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,HF(h,o,void 0,i),i.currentTarget=null}function C_(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var S=h.length-1;0<=S;S--){var B=h[S],$=B.instance,Z=B.currentTarget;if(B=B.listener,$!==T&&E.isPropagationStopped())break e;k_(E,B,Z),T=$}else for(S=0;S<h.length;S++){if(B=h[S],$=B.instance,Z=B.currentTarget,B=B.listener,$!==T&&E.isPropagationStopped())break e;k_(E,B,Z),T=$}}}if(sc)throw i=Sp,sc=!1,Sp=null,i}function _t(i,o){var c=o[tm];c===void 0&&(c=o[tm]=new Set);var h=i+"__bubble";c.has(h)||(O_(o,i,2,!1),c.add(h))}function Gp(i,o,c){var h=0;o&&(h|=4),O_(c,i,h,o)}var _c="_reactListening"+Math.random().toString(36).slice(2);function iu(i){if(!i[_c]){i[_c]=!0,r.forEach(function(c){c!=="selectionchange"&&($B.has(c)||Gp(c,!1,i),Gp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[_c]||(o[_c]=!0,Gp("selectionchange",!1,o))}}function O_(i,o,c,h){switch(Zx(o)){case 1:var E=nB;break;case 4:E=rB;break;default:E=Ip}c=E.bind(null,o,c,i),E=void 0,!wp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,c,{capture:!0,passive:E}):i.addEventListener(o,c,!0):E!==void 0?i.addEventListener(o,c,{passive:E}):i.addEventListener(o,c,!1)}function Xp(i,o,c,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var B=h.stateNode.containerInfo;if(B===E||B.nodeType===8&&B.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var $=S.tag;if(($===3||$===4)&&($=S.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;S=S.return}for(;B!==null;){if(S=ms(B),S===null)return;if($=S.tag,$===5||$===6){h=T=S;continue e}B=B.parentNode}}h=h.return}Dx(function(){var Z=T,Ee=bp(c),Te=[];e:{var pe=A_.get(i);if(pe!==void 0){var Oe=Lp,Pe=i;switch(i){case"keypress":if(gc(c)===0)break e;case"keydown":case"keyup":Oe=yB;break;case"focusin":Pe="focus",Oe=Fp;break;case"focusout":Pe="blur",Oe=Fp;break;case"beforeblur":case"afterblur":Oe=Fp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=n_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=oB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=xB;break;case __:case w_:case S_:Oe=lB;break;case v_:Oe=wB;break;case"scroll":Oe=iB;break;case"wheel":Oe=vB;break;case"copy":case"cut":case"paste":Oe=dB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=i_}var Re=(o&4)!==0,Mt=!Re&&i==="scroll",X=Re?pe!==null?pe+"Capture":null:pe;Re=[];for(var q=Z,K;q!==null;){K=q;var _e=K.stateNode;if(K.tag===5&&_e!==null&&(K=_e,X!==null&&(_e=Ha(q,X),_e!=null&&Re.push(su(q,_e,K)))),Mt)break;q=q.return}0<Re.length&&(pe=new Oe(pe,Pe,null,c,Ee),Te.push({event:pe,listeners:Re}))}}if((o&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",pe&&c!==jn&&(Pe=c.relatedTarget||c.fromElement)&&(ms(Pe)||Pe[Qr]))break e;if((Oe||pe)&&(pe=Ee.window===Ee?Ee:(pe=Ee.ownerDocument)?pe.defaultView||pe.parentWindow:window,Oe?(Pe=c.relatedTarget||c.toElement,Oe=Z,Pe=Pe?ms(Pe):null,Pe!==null&&(Mt=ps(Pe),Pe!==Mt||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(Oe=null,Pe=Z),Oe!==Pe)){if(Re=n_,_e="onMouseLeave",X="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Re=i_,_e="onPointerLeave",X="onPointerEnter",q="pointer"),Mt=Oe==null?pe:ko(Oe),K=Pe==null?pe:ko(Pe),pe=new Re(_e,q+"leave",Oe,c,Ee),pe.target=Mt,pe.relatedTarget=K,_e=null,ms(Ee)===Z&&(Re=new Re(X,q+"enter",Pe,c,Ee),Re.target=K,Re.relatedTarget=Mt,_e=Re),Mt=_e,Oe&&Pe)t:{for(Re=Oe,X=Pe,q=0,K=Re;K;K=Ao(K))q++;for(K=0,_e=X;_e;_e=Ao(_e))K++;for(;0<q-K;)Re=Ao(Re),q--;for(;0<K-q;)X=Ao(X),K--;for(;q--;){if(Re===X||X!==null&&Re===X.alternate)break t;Re=Ao(Re),X=Ao(X)}Re=null}else Re=null;Oe!==null&&I_(Te,pe,Oe,Re,!1),Pe!==null&&Mt!==null&&I_(Te,Mt,Pe,Re,!0)}}e:{if(pe=Z?ko(Z):window,Oe=pe.nodeName&&pe.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&pe.type==="file")var De=PB;else if(c_(pe))if(f_)De=MB;else{De=LB;var ze=RB}else(Oe=pe.nodeName)&&Oe.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(De=DB);if(De&&(De=De(i,Z))){d_(Te,De,c,Ee);break e}ze&&ze(i,pe,Z),i==="focusout"&&(ze=pe._wrapperState)&&ze.controlled&&pe.type==="number"&&et(pe,"number",pe.value)}switch(ze=Z?ko(Z):window,i){case"focusin":(c_(ze)||ze.contentEditable==="true")&&(So=ze,zp=Z,nu=null);break;case"focusout":nu=zp=So=null;break;case"mousedown":Vp=!0;break;case"contextmenu":case"mouseup":case"dragend":Vp=!1,b_(Te,c,Ee);break;case"selectionchange":if(UB)break;case"keydown":case"keyup":b_(Te,c,Ee)}var Ve;if(Up)e:{switch(i){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else wo?u_(i,c)&&(Ge="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ge="onCompositionStart");Ge&&(s_&&c.locale!=="ko"&&(wo||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&wo&&(Ve=e_()):(Si=Ee,Rp="value"in Si?Si.value:Si.textContent,wo=!0)),ze=wc(Z,Ge),0<ze.length&&(Ge=new r_(Ge,i,null,c,Ee),Te.push({event:Ge,listeners:ze}),Ve?Ge.data=Ve:(Ve=l_(c),Ve!==null&&(Ge.data=Ve)))),(Ve=NB?kB(i,c):CB(i,c))&&(Z=wc(Z,"onBeforeInput"),0<Z.length&&(Ee=new r_("onBeforeInput","beforeinput",null,c,Ee),Te.push({event:Ee,listeners:Z}),Ee.data=Ve))}C_(Te,o)})}function su(i,o,c){return{instance:i,listener:o,currentTarget:c}}function wc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Ha(i,c),T!=null&&h.unshift(su(i,T,E)),T=Ha(i,o),T!=null&&h.push(su(i,T,E))),i=i.return}return h}function Ao(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function I_(i,o,c,h,E){for(var T=o._reactName,S=[];c!==null&&c!==h;){var B=c,$=B.alternate,Z=B.stateNode;if($!==null&&$===h)break;B.tag===5&&Z!==null&&(B=Z,E?($=Ha(c,T),$!=null&&S.unshift(su(c,$,B))):E||($=Ha(c,T),$!=null&&S.push(su(c,$,B)))),c=c.return}S.length!==0&&i.push({event:o,listeners:S})}var zB=/\r\n?/g,VB=/\u0000|\uFFFD/g;function P_(i){return(typeof i=="string"?i:""+i).replace(zB,`
21
+ `).replace(VB,"")}function Sc(i,o,c){if(o=P_(o),P_(i)!==o&&c)throw Error(n(425))}function vc(){}var Qp=null,Kp=null;function Jp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Zp=typeof setTimeout=="function"?setTimeout:void 0,qB=typeof clearTimeout=="function"?clearTimeout:void 0,R_=typeof Promise=="function"?Promise:void 0,YB=typeof queueMicrotask=="function"?queueMicrotask:typeof R_!="undefined"?function(i){return R_.resolve(null).then(i).catch(WB)}:Zp;function WB(i){setTimeout(function(){throw i})}function em(i,o){var c=o,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),Xa(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);Xa(o)}function Ai(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function L_(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}var No=Math.random().toString(36).slice(2),Mr="__reactFiber$"+No,ou="__reactProps$"+No,Qr="__reactContainer$"+No,tm="__reactEvents$"+No,GB="__reactListeners$"+No,XB="__reactHandles$"+No;function ms(i){var o=i[Mr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Qr]||c[Mr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=L_(i);i!==null;){if(c=i[Mr])return c;i=L_(i)}return o}i=c,c=i.parentNode}return null}function au(i){return i=i[Mr]||i[Qr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ko(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Ac(i){return i[ou]||null}var nm=[],Co=-1;function Ni(i){return{current:i}}function wt(i){0>Co||(i.current=nm[Co],nm[Co]=null,Co--)}function yt(i,o){Co++,nm[Co]=i.current,i.current=o}var ki={},fn=Ni(ki),In=Ni(!1),gs=ki;function Oo(i,o){var c=i.type.contextTypes;if(!c)return ki;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in c)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Pn(i){return i=i.childContextTypes,i!=null}function Nc(){wt(In),wt(fn)}function D_(i,o,c){if(fn.current!==ki)throw Error(n(168));yt(fn,o),yt(In,c)}function M_(i,o,c){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return N({},c,h)}function kc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ki,gs=fn.current,yt(fn,i),yt(In,In.current),!0}function F_(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=M_(i,o,gs),h.__reactInternalMemoizedMergedChildContext=i,wt(In),wt(fn),yt(fn,i)):wt(In),yt(In,c)}var Kr=null,Cc=!1,rm=!1;function B_(i){Kr===null?Kr=[i]:Kr.push(i)}function QB(i){Cc=!0,B_(i)}function Ci(){if(!rm&&Kr!==null){rm=!0;var i=0,o=ft;try{var c=Kr;for(ft=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Kr=null,Cc=!1}catch(E){throw Kr!==null&&(Kr=Kr.slice(i+1)),Hx(vp,Ci),E}finally{ft=o,rm=!1}}return null}var Io=[],Po=0,Oc=null,Ic=0,Kn=[],Jn=0,Es=null,Jr=1,Zr="";function ys(i,o){Io[Po++]=Ic,Io[Po++]=Oc,Oc=i,Ic=o}function U_(i,o,c){Kn[Jn++]=Jr,Kn[Jn++]=Zr,Kn[Jn++]=Es,Es=i;var h=Jr;i=Zr;var E=32-hr(h)-1;h&=~(1<<E),c+=1;var T=32-hr(o)+E;if(30<T){var S=E-E%5;T=(h&(1<<S)-1).toString(32),h>>=S,E-=S,Jr=1<<32-hr(o)+E|c<<E|h,Zr=T+i}else Jr=1<<T|c<<E|h,Zr=i}function im(i){i.return!==null&&(ys(i,1),U_(i,1,0))}function sm(i){for(;i===Oc;)Oc=Io[--Po],Io[Po]=null,Ic=Io[--Po],Io[Po]=null;for(;i===Es;)Es=Kn[--Jn],Kn[Jn]=null,Zr=Kn[--Jn],Kn[Jn]=null,Jr=Kn[--Jn],Kn[Jn]=null}var zn=null,Vn=null,At=!1,mr=null;function H_(i,o){var c=nr(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=i,o=i.deletions,o===null?(i.deletions=[c],i.flags|=16):o.push(c)}function j_(i,o){switch(i.tag){case 5:var c=i.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,zn=i,Vn=Ai(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,zn=i,Vn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=Es!==null?{id:Jr,overflow:Zr}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=nr(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,zn=i,Vn=null,!0):!1;default:return!1}}function om(i){return(i.mode&1)!==0&&(i.flags&128)===0}function am(i){if(At){var o=Vn;if(o){var c=o;if(!j_(i,o)){if(om(i))throw Error(n(418));o=Ai(c.nextSibling);var h=zn;o&&j_(i,o)?H_(h,c):(i.flags=i.flags&-4097|2,At=!1,zn=i)}}else{if(om(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,zn=i}}}function $_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;zn=i}function Pc(i){if(i!==zn)return!1;if(!At)return $_(i),At=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Jp(i.type,i.memoizedProps)),o&&(o=Vn)){if(om(i))throw z_(),Error(n(418));for(;o;)H_(i,o),o=Ai(o.nextSibling)}if($_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(o===0){Vn=Ai(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Vn=null}}else Vn=zn?Ai(i.stateNode.nextSibling):null;return!0}function z_(){for(var i=Vn;i;)i=Ai(i.nextSibling)}function Ro(){Vn=zn=null,At=!1}function um(i){mr===null?mr=[i]:mr.push(i)}var KB=U.ReactCurrentBatchConfig;function uu(i,o,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(S){var B=E.refs;S===null?delete B[T]:B[T]=S},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Rc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function V_(i){var o=i._init;return o(i._payload)}function q_(i){function o(X,q){if(i){var K=X.deletions;K===null?(X.deletions=[q],X.flags|=16):K.push(q)}}function c(X,q){if(!i)return null;for(;q!==null;)o(X,q),q=q.sibling;return null}function h(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function E(X,q){return X=Fi(X,q),X.index=0,X.sibling=null,X}function T(X,q,K){return X.index=K,i?(K=X.alternate,K!==null?(K=K.index,K<q?(X.flags|=2,q):K):(X.flags|=2,q)):(X.flags|=1048576,q)}function S(X){return i&&X.alternate===null&&(X.flags|=2),X}function B(X,q,K,_e){return q===null||q.tag!==6?(q=Zm(K,X.mode,_e),q.return=X,q):(q=E(q,K),q.return=X,q)}function $(X,q,K,_e){var De=K.type;return De===V?Ee(X,q,K.props.children,_e,K.key):q!==null&&(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===we&&V_(De)===q.type)?(_e=E(q,K.props),_e.ref=uu(X,q,K),_e.return=X,_e):(_e=rd(K.type,K.key,K.props,null,X.mode,_e),_e.ref=uu(X,q,K),_e.return=X,_e)}function Z(X,q,K,_e){return q===null||q.tag!==4||q.stateNode.containerInfo!==K.containerInfo||q.stateNode.implementation!==K.implementation?(q=e0(K,X.mode,_e),q.return=X,q):(q=E(q,K.children||[]),q.return=X,q)}function Ee(X,q,K,_e,De){return q===null||q.tag!==7?(q=As(K,X.mode,_e,De),q.return=X,q):(q=E(q,K),q.return=X,q)}function Te(X,q,K){if(typeof q=="string"&&q!==""||typeof q=="number")return q=Zm(""+q,X.mode,K),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case G:return K=rd(q.type,q.key,q.props,null,X.mode,K),K.ref=uu(X,null,q),K.return=X,K;case L:return q=e0(q,X.mode,K),q.return=X,q;case we:var _e=q._init;return Te(X,_e(q._payload),K)}if(se(q)||re(q))return q=As(q,X.mode,K,null),q.return=X,q;Rc(X,q)}return null}function pe(X,q,K,_e){var De=q!==null?q.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return De!==null?null:B(X,q,""+K,_e);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case G:return K.key===De?$(X,q,K,_e):null;case L:return K.key===De?Z(X,q,K,_e):null;case we:return De=K._init,pe(X,q,De(K._payload),_e)}if(se(K)||re(K))return De!==null?null:Ee(X,q,K,_e,null);Rc(X,K)}return null}function Oe(X,q,K,_e,De){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return X=X.get(K)||null,B(q,X,""+_e,De);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case G:return X=X.get(_e.key===null?K:_e.key)||null,$(q,X,_e,De);case L:return X=X.get(_e.key===null?K:_e.key)||null,Z(q,X,_e,De);case we:var ze=_e._init;return Oe(X,q,K,ze(_e._payload),De)}if(se(_e)||re(_e))return X=X.get(K)||null,Ee(q,X,_e,De,null);Rc(q,_e)}return null}function Pe(X,q,K,_e){for(var De=null,ze=null,Ve=q,Ge=q=0,Kt=null;Ve!==null&&Ge<K.length;Ge++){Ve.index>Ge?(Kt=Ve,Ve=null):Kt=Ve.sibling;var ut=pe(X,Ve,K[Ge],_e);if(ut===null){Ve===null&&(Ve=Kt);break}i&&Ve&&ut.alternate===null&&o(X,Ve),q=T(ut,q,Ge),ze===null?De=ut:ze.sibling=ut,ze=ut,Ve=Kt}if(Ge===K.length)return c(X,Ve),At&&ys(X,Ge),De;if(Ve===null){for(;Ge<K.length;Ge++)Ve=Te(X,K[Ge],_e),Ve!==null&&(q=T(Ve,q,Ge),ze===null?De=Ve:ze.sibling=Ve,ze=Ve);return At&&ys(X,Ge),De}for(Ve=h(X,Ve);Ge<K.length;Ge++)Kt=Oe(Ve,X,Ge,K[Ge],_e),Kt!==null&&(i&&Kt.alternate!==null&&Ve.delete(Kt.key===null?Ge:Kt.key),q=T(Kt,q,Ge),ze===null?De=Kt:ze.sibling=Kt,ze=Kt);return i&&Ve.forEach(function(Bi){return o(X,Bi)}),At&&ys(X,Ge),De}function Re(X,q,K,_e){var De=re(K);if(typeof De!="function")throw Error(n(150));if(K=De.call(K),K==null)throw Error(n(151));for(var ze=De=null,Ve=q,Ge=q=0,Kt=null,ut=K.next();Ve!==null&&!ut.done;Ge++,ut=K.next()){Ve.index>Ge?(Kt=Ve,Ve=null):Kt=Ve.sibling;var Bi=pe(X,Ve,ut.value,_e);if(Bi===null){Ve===null&&(Ve=Kt);break}i&&Ve&&Bi.alternate===null&&o(X,Ve),q=T(Bi,q,Ge),ze===null?De=Bi:ze.sibling=Bi,ze=Bi,Ve=Kt}if(ut.done)return c(X,Ve),At&&ys(X,Ge),De;if(Ve===null){for(;!ut.done;Ge++,ut=K.next())ut=Te(X,ut.value,_e),ut!==null&&(q=T(ut,q,Ge),ze===null?De=ut:ze.sibling=ut,ze=ut);return At&&ys(X,Ge),De}for(Ve=h(X,Ve);!ut.done;Ge++,ut=K.next())ut=Oe(Ve,X,Ge,ut.value,_e),ut!==null&&(i&&ut.alternate!==null&&Ve.delete(ut.key===null?Ge:ut.key),q=T(ut,q,Ge),ze===null?De=ut:ze.sibling=ut,ze=ut);return i&&Ve.forEach(function(O7){return o(X,O7)}),At&&ys(X,Ge),De}function Mt(X,q,K,_e){if(typeof K=="object"&&K!==null&&K.type===V&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case G:e:{for(var De=K.key,ze=q;ze!==null;){if(ze.key===De){if(De=K.type,De===V){if(ze.tag===7){c(X,ze.sibling),q=E(ze,K.props.children),q.return=X,X=q;break e}}else if(ze.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===we&&V_(De)===ze.type){c(X,ze.sibling),q=E(ze,K.props),q.ref=uu(X,ze,K),q.return=X,X=q;break e}c(X,ze);break}else o(X,ze);ze=ze.sibling}K.type===V?(q=As(K.props.children,X.mode,_e,K.key),q.return=X,X=q):(_e=rd(K.type,K.key,K.props,null,X.mode,_e),_e.ref=uu(X,q,K),_e.return=X,X=_e)}return S(X);case L:e:{for(ze=K.key;q!==null;){if(q.key===ze)if(q.tag===4&&q.stateNode.containerInfo===K.containerInfo&&q.stateNode.implementation===K.implementation){c(X,q.sibling),q=E(q,K.children||[]),q.return=X,X=q;break e}else{c(X,q);break}else o(X,q);q=q.sibling}q=e0(K,X.mode,_e),q.return=X,X=q}return S(X);case we:return ze=K._init,Mt(X,q,ze(K._payload),_e)}if(se(K))return Pe(X,q,K,_e);if(re(K))return Re(X,q,K,_e);Rc(X,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,q!==null&&q.tag===6?(c(X,q.sibling),q=E(q,K),q.return=X,X=q):(c(X,q),q=Zm(K,X.mode,_e),q.return=X,X=q),S(X)):c(X,q)}return Mt}var Lo=q_(!0),Y_=q_(!1),Lc=Ni(null),Dc=null,Do=null,lm=null;function cm(){lm=Do=Dc=null}function dm(i){var o=Lc.current;wt(Lc),i._currentValue=o}function fm(i,o,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===c)break;i=i.return}}function Mo(i,o){Dc=i,lm=Do=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Rn=!0),i.firstContext=null)}function Zn(i){var o=i._currentValue;if(lm!==i)if(i={context:i,memoizedValue:o,next:null},Do===null){if(Dc===null)throw Error(n(308));Do=i,Dc.dependencies={lanes:0,firstContext:i}}else Do=Do.next=i;return o}var Ts=null;function hm(i){Ts===null?Ts=[i]:Ts.push(i)}function W_(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,hm(o)):(c.next=E.next,E.next=c),o.interleaved=c,ei(i,h)}function ei(i,o){i.lanes|=o;var c=i.alternate;for(c!==null&&(c.lanes|=o),c=i,i=i.return;i!==null;)i.childLanes|=o,c=i.alternate,c!==null&&(c.childLanes|=o),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Oi=!1;function pm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function G_(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function ti(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ii(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ot&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,ei(i,c)}return E=h.interleaved,E===null?(o.next=o,hm(h)):(o.next=E.next,E.next=o),h.interleaved=o,ei(i,c)}function Mc(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,kp(i,c)}}function X_(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var S={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};T===null?E=T=S:T=T.next=S,c=c.next}while(c!==null);T===null?E=T=o:T=T.next=o}else E=T=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Fc(i,o,c,h){var E=i.updateQueue;Oi=!1;var T=E.firstBaseUpdate,S=E.lastBaseUpdate,B=E.shared.pending;if(B!==null){E.shared.pending=null;var $=B,Z=$.next;$.next=null,S===null?T=Z:S.next=Z,S=$;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,B=Ee.lastBaseUpdate,B!==S&&(B===null?Ee.firstBaseUpdate=Z:B.next=Z,Ee.lastBaseUpdate=$))}if(T!==null){var Te=E.baseState;S=0,Ee=Z=$=null,B=T;do{var pe=B.lane,Oe=B.eventTime;if((h&pe)===pe){Ee!==null&&(Ee=Ee.next={eventTime:Oe,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var Pe=i,Re=B;switch(pe=o,Oe=c,Re.tag){case 1:if(Pe=Re.payload,typeof Pe=="function"){Te=Pe.call(Oe,Te,pe);break e}Te=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Re.payload,pe=typeof Pe=="function"?Pe.call(Oe,Te,pe):Pe,pe==null)break e;Te=N({},Te,pe);break e;case 2:Oi=!0}}B.callback!==null&&B.lane!==0&&(i.flags|=64,pe=E.effects,pe===null?E.effects=[B]:pe.push(B))}else Oe={eventTime:Oe,lane:pe,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Ee===null?(Z=Ee=Oe,$=Te):Ee=Ee.next=Oe,S|=pe;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;pe=B,B=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);if(Ee===null&&($=Te),E.baseState=$,E.firstBaseUpdate=Z,E.lastBaseUpdate=Ee,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);_s|=S,i.lanes=S,i.memoizedState=Te}}function Q_(i,o,c){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var lu={},Fr=Ni(lu),cu=Ni(lu),du=Ni(lu);function bs(i){if(i===lu)throw Error(n(174));return i}function mm(i,o){switch(yt(du,o),yt(cu,i),yt(Fr,lu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}wt(Fr),yt(Fr,o)}function Fo(){wt(Fr),wt(cu),wt(du)}function K_(i){bs(du.current);var o=bs(Fr.current),c=xe(o,i.type);o!==c&&(yt(cu,i),yt(Fr,c))}function gm(i){cu.current===i&&(wt(Fr),wt(cu))}var Nt=Ni(0);function Bc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Em=[];function ym(){for(var i=0;i<Em.length;i++)Em[i]._workInProgressVersionPrimary=null;Em.length=0}var Uc=U.ReactCurrentDispatcher,Tm=U.ReactCurrentBatchConfig,xs=0,kt=null,zt=null,Xt=null,Hc=!1,fu=!1,hu=0,JB=0;function hn(){throw Error(n(321))}function bm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!pr(i[c],o[c]))return!1;return!0}function xm(i,o,c,h,E,T){if(xs=T,kt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Uc.current=i===null||i.memoizedState===null?n7:r7,i=c(h,E),fu){T=0;do{if(fu=!1,hu=0,25<=T)throw Error(n(301));T+=1,Xt=zt=null,o.updateQueue=null,Uc.current=i7,i=c(h,E)}while(fu)}if(Uc.current=zc,o=zt!==null&&zt.next!==null,xs=0,Xt=zt=kt=null,Hc=!1,o)throw Error(n(300));return i}function _m(){var i=hu!==0;return hu=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?kt.memoizedState=Xt=i:Xt=Xt.next=i,Xt}function er(){if(zt===null){var i=kt.alternate;i=i!==null?i.memoizedState:null}else i=zt.next;var o=Xt===null?kt.memoizedState:Xt.next;if(o!==null)Xt=o,zt=i;else{if(i===null)throw Error(n(310));zt=i,i={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Xt===null?kt.memoizedState=Xt=i:Xt=Xt.next=i}return Xt}function pu(i,o){return typeof o=="function"?o(i):o}function wm(i){var o=er(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=zt,E=h.baseQueue,T=c.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}h.baseQueue=E=T,c.pending=null}if(E!==null){T=E.next,h=h.baseState;var B=S=null,$=null,Z=T;do{var Ee=Z.lane;if((xs&Ee)===Ee)$!==null&&($=$.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var Te={lane:Ee,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};$===null?(B=$=Te,S=h):$=$.next=Te,kt.lanes|=Ee,_s|=Ee}Z=Z.next}while(Z!==null&&Z!==T);$===null?S=h:$.next=B,pr(h,o.memoizedState)||(Rn=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do T=E.lane,kt.lanes|=T,_s|=T,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Sm(i){var o=er(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,T=o.memoizedState;if(E!==null){c.pending=null;var S=E=E.next;do T=i(T,S.action),S=S.next;while(S!==E);pr(T,o.memoizedState)||(Rn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),c.lastRenderedState=T}return[T,h]}function J_(){}function Z_(i,o){var c=kt,h=er(),E=o(),T=!pr(h.memoizedState,E);if(T&&(h.memoizedState=E,Rn=!0),h=h.queue,vm(nw.bind(null,c,h,i),[i]),h.getSnapshot!==o||T||Xt!==null&&Xt.memoizedState.tag&1){if(c.flags|=2048,mu(9,tw.bind(null,c,h,E,o),void 0,null),Qt===null)throw Error(n(349));(xs&30)!==0||ew(c,o,E)}return E}function ew(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=kt.updateQueue,o===null?(o={lastEffect:null,stores:null},kt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function tw(i,o,c,h){o.value=c,o.getSnapshot=h,rw(o)&&iw(i)}function nw(i,o,c){return c(function(){rw(o)&&iw(i)})}function rw(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!pr(i,c)}catch(h){return!0}}function iw(i){var o=ei(i,1);o!==null&&Tr(o,i,1,-1)}function sw(i){var o=Br();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pu,lastRenderedState:i},o.queue=i,i=i.dispatch=t7.bind(null,kt,i),[o.memoizedState,i]}function mu(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=kt.updateQueue,o===null?(o={lastEffect:null,stores:null},kt.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,o.lastEffect=i)),i}function ow(){return er().memoizedState}function jc(i,o,c,h){var E=Br();kt.flags|=i,E.memoizedState=mu(1|o,c,void 0,h===void 0?null:h)}function $c(i,o,c,h){var E=er();h=h===void 0?null:h;var T=void 0;if(zt!==null){var S=zt.memoizedState;if(T=S.destroy,h!==null&&bm(h,S.deps)){E.memoizedState=mu(o,c,T,h);return}}kt.flags|=i,E.memoizedState=mu(1|o,c,T,h)}function aw(i,o){return jc(8390656,8,i,o)}function vm(i,o){return $c(2048,8,i,o)}function uw(i,o){return $c(4,2,i,o)}function lw(i,o){return $c(4,4,i,o)}function cw(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function dw(i,o,c){return c=c!=null?c.concat([i]):null,$c(4,4,cw.bind(null,o,i),c)}function Am(){}function fw(i,o){var c=er();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&bm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function hw(i,o){var c=er();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&bm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function pw(i,o,c){return(xs&21)===0?(i.baseState&&(i.baseState=!1,Rn=!0),i.memoizedState=c):(pr(c,o)||(c=Vx(),kt.lanes|=c,_s|=c,i.baseState=!0),o)}function ZB(i,o){var c=ft;ft=c!==0&&4>c?c:4,i(!0);var h=Tm.transition;Tm.transition={};try{i(!1),o()}finally{ft=c,Tm.transition=h}}function mw(){return er().memoizedState}function e7(i,o,c){var h=Di(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},gw(i))Ew(o,c);else if(c=W_(i,o,c,h),c!==null){var E=xn();Tr(c,i,h,E),yw(c,o,h)}}function t7(i,o,c){var h=Di(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(gw(i))Ew(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var S=o.lastRenderedState,B=T(S,c);if(E.hasEagerState=!0,E.eagerState=B,pr(B,S)){var $=o.interleaved;$===null?(E.next=E,hm(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(Z){}c=W_(i,o,E,h),c!==null&&(E=xn(),Tr(c,i,h,E),yw(c,o,h))}}function gw(i){var o=i.alternate;return i===kt||o!==null&&o===kt}function Ew(i,o){fu=Hc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function yw(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,kp(i,c)}}var zc={readContext:Zn,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useInsertionEffect:hn,useLayoutEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useMutableSource:hn,useSyncExternalStore:hn,useId:hn,unstable_isNewReconciler:!1},n7={readContext:Zn,useCallback:function(i,o){return Br().memoizedState=[i,o===void 0?null:o],i},useContext:Zn,useEffect:aw,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,jc(4194308,4,cw.bind(null,o,i),c)},useLayoutEffect:function(i,o){return jc(4194308,4,i,o)},useInsertionEffect:function(i,o){return jc(4,2,i,o)},useMemo:function(i,o){var c=Br();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Br();return o=c!==void 0?c(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=e7.bind(null,kt,i),[h.memoizedState,i]},useRef:function(i){var o=Br();return i={current:i},o.memoizedState=i},useState:sw,useDebugValue:Am,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=sw(!1),o=i[0];return i=ZB.bind(null,i[1]),Br().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=kt,E=Br();if(At){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),Qt===null)throw Error(n(349));(xs&30)!==0||ew(h,o,c)}E.memoizedState=c;var T={value:c,getSnapshot:o};return E.queue=T,aw(nw.bind(null,h,T,i),[i]),h.flags|=2048,mu(9,tw.bind(null,h,T,c,o),void 0,null),c},useId:function(){var i=Br(),o=Qt.identifierPrefix;if(At){var c=Zr,h=Jr;c=(h&~(1<<32-hr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=hu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=JB++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},r7={readContext:Zn,useCallback:fw,useContext:Zn,useEffect:vm,useImperativeHandle:dw,useInsertionEffect:uw,useLayoutEffect:lw,useMemo:hw,useReducer:wm,useRef:ow,useState:function(){return wm(pu)},useDebugValue:Am,useDeferredValue:function(i){var o=er();return pw(o,zt.memoizedState,i)},useTransition:function(){var i=wm(pu)[0],o=er().memoizedState;return[i,o]},useMutableSource:J_,useSyncExternalStore:Z_,useId:mw,unstable_isNewReconciler:!1},i7={readContext:Zn,useCallback:fw,useContext:Zn,useEffect:vm,useImperativeHandle:dw,useInsertionEffect:uw,useLayoutEffect:lw,useMemo:hw,useReducer:Sm,useRef:ow,useState:function(){return Sm(pu)},useDebugValue:Am,useDeferredValue:function(i){var o=er();return zt===null?o.memoizedState=i:pw(o,zt.memoizedState,i)},useTransition:function(){var i=Sm(pu)[0],o=er().memoizedState;return[i,o]},useMutableSource:J_,useSyncExternalStore:Z_,useId:mw,unstable_isNewReconciler:!1};function gr(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Nm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:N({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Vc={isMounted:function(i){return(i=i._reactInternals)?ps(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=xn(),E=Di(i),T=ti(h,E);T.payload=o,c!=null&&(T.callback=c),o=Ii(i,T,E),o!==null&&(Tr(o,i,E,h),Mc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=xn(),E=Di(i),T=ti(h,E);T.tag=1,T.payload=o,c!=null&&(T.callback=c),o=Ii(i,T,E),o!==null&&(Tr(o,i,E,h),Mc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=xn(),h=Di(i),E=ti(c,h);E.tag=2,o!=null&&(E.callback=o),o=Ii(i,E,h),o!==null&&(Tr(o,i,h,c),Mc(o,i,h))}};function Tw(i,o,c,h,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,S):o.prototype&&o.prototype.isPureReactComponent?!tu(c,h)||!tu(E,T):!0}function bw(i,o,c){var h=!1,E=ki,T=o.contextType;return typeof T=="object"&&T!==null?T=Zn(T):(E=Pn(o)?gs:fn.current,h=o.contextTypes,T=(h=h!=null)?Oo(i,E):ki),o=new o(c,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Vc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function xw(i,o,c,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==i&&Vc.enqueueReplaceState(o,o.state,null)}function km(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},pm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=Zn(T):(T=Pn(o)?gs:fn.current,E.context=Oo(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Nm(i,o,T,c),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&Vc.enqueueReplaceState(E,E.state,null),Fc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Bo(i,o){try{var c="",h=o;do c+=Ce(h),h=h.return;while(h);var E=c}catch(T){E=`
22
22
  Error generating stack: `+T.message+`
23
- `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Nm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Cm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var n7=typeof WeakMap=="function"?WeakMap:Map;function _w(i,o,l){l=Jr(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){Kc||(Kc=!0,Vm=h),Cm(i,o)},l}function ww(i,o,l){l=Jr(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Cm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Cm(i,o),typeof h!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),l}function Sw(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new n7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=g7.bind(null,i,o,l),o.then(i,i))}function vw(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function Aw(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=Jr(-1,1),o.tag=2,ki(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var r7=j.ReactCurrentOwner,On=!1;function gn(i,o,l,h){o.child=i===null?Y_(o,null,l,h):Ro(o,i.child,l,h)}function kw(i,o,l,h,E){l=l.render;var T=o.ref;return Do(o,E),h=bm(i,o,l,h,T,E),l=xm(),i!==null&&!On?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(wt&&l&&rm(o),o.flags|=1,gn(i,o,h,E),o.child)}function Nw(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!Km(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,Cw(i,o,T,h,E)):(i=rd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var S=T.memoizedProps;if(l=l.compare,l=l!==null?l:eu,l(S,h)&&i.ref===o.ref)return Zr(i,o,E)}return o.flags|=1,i=Ri(T,h),i.ref=o.ref,i.return=o,o.child=i}function Cw(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(eu(T,h)&&i.ref===o.ref)if(On=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(On=!0);else return o.lanes=i.lanes,Zr(i,o,E)}return Om(i,o,l,h,E)}function Ow(i,o,l){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Uo,$n),$n|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,mt(Uo,$n),$n|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,mt(Uo,$n),$n|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,mt(Uo,$n),$n|=h;return gn(i,o,E,l),o.child}function Iw(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Om(i,o,l,h,E){var T=Cn(l)?ms:cn.current;return T=Co(o,T),Do(o,E),l=bm(i,o,l,h,T,E),h=xm(),i!==null&&!On?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(wt&&h&&rm(o),o.flags|=1,gn(i,o,l,E),o.child)}function Pw(i,o,l,h,E){if(Cn(l)){var T=!0;Nc(o)}else T=!1;if(Do(o,E),o.stateNode===null)Yc(i,o),bw(o,l,h),km(o,l,h,E),h=!0;else if(i===null){var S=o.stateNode,F=o.memoizedProps;S.props=F;var $=S.context,ee=l.contextType;typeof ee=="object"&&ee!==null?ee=Qn(ee):(ee=Cn(l)?ms:cn.current,ee=Co(o,ee));var Te=l.getDerivedStateFromProps,xe=typeof Te=="function"||typeof S.getSnapshotBeforeUpdate=="function";xe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(F!==h||$!==ee)&&xw(o,S,h,ee),Ai=!1;var Ee=o.memoizedState;S.state=Ee,Fc(o,h,S,E),$=o.memoizedState,F!==h||Ee!==$||Nn.current||Ai?(typeof Te=="function"&&(Am(o,l,Te,h),$=o.memoizedState),(F=Ai||Tw(o,l,F,h,Ee,$,ee))?(xe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),S.props=h,S.state=$,S.context=ee,h=F):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,G_(i,o),F=o.memoizedProps,ee=o.type===o.elementType?F:hr(o.type,F),S.props=ee,xe=o.pendingProps,Ee=S.context,$=l.contextType,typeof $=="object"&&$!==null?$=Qn($):($=Cn(l)?ms:cn.current,$=Co(o,$));var Oe=l.getDerivedStateFromProps;(Te=typeof Oe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(F!==xe||Ee!==$)&&xw(o,S,h,$),Ai=!1,Ee=o.memoizedState,S.state=Ee,Fc(o,h,S,E);var Pe=o.memoizedState;F!==xe||Ee!==Pe||Nn.current||Ai?(typeof Oe=="function"&&(Am(o,l,Oe,h),Pe=o.memoizedState),(ee=Ai||Tw(o,l,ee,h,Ee,Pe,$)||!1)?(Te||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Pe,$),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Pe,$)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||F===i.memoizedProps&&Ee===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&Ee===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Pe),S.props=h,S.state=Pe,S.context=$,h=ee):(typeof S.componentDidUpdate!="function"||F===i.memoizedProps&&Ee===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&Ee===i.memoizedState||(o.flags|=1024),h=!1)}return Im(i,o,l,h,T,E)}function Im(i,o,l,h,E,T){Iw(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&F_(o,l,!1),Zr(i,o,T);h=o.stateNode,r7.current=o;var F=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=Ro(o,i.child,null,T),o.child=Ro(o,null,F,T)):gn(i,o,F,T),o.memoizedState=h.state,E&&F_(o,l,!0),o.child}function Rw(i){var o=i.stateNode;o.pendingContext?D_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&D_(i,o.context,!1),pm(i,o.containerInfo)}function Lw(i,o,l,h,E){return Po(),am(E),o.flags|=256,gn(i,o,l,h),o.child}var Pm={dehydrated:null,treeContext:null,retryLane:0};function Rm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Dw(i,o,l){var h=o.pendingProps,E=St.current,T=!1,S=(o.flags&128)!==0,F;if((F=S)||(F=i!==null&&i.memoizedState===null?!1:(E&2)!==0),F?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),mt(St,E&1),i===null)return om(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(S=h.children,i=h.fallback,T?(h=o.mode,T=o.child,S={mode:"hidden",children:S},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=id(S,h,0,null),i=vs(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Rm(l),o.memoizedState=Pm,i):Lm(o,S));if(E=i.memoizedState,E!==null&&(F=E.dehydrated,F!==null))return i7(i,o,S,h,F,E,l);if(T){T=h.fallback,S=o.mode,E=i.child,F=E.sibling;var $={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=Ri(E,$),h.subtreeFlags=E.subtreeFlags&14680064),F!==null?T=Ri(F,T):(T=vs(T,S,l,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,S=i.child.memoizedState,S=S===null?Rm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~l,o.memoizedState=Pm,h}return T=i.child,i=T.sibling,h=Ri(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Lm(i,o){return o=id({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function qc(i,o,l,h){return h!==null&&am(h),Ro(o,i.child,null,l),i=Lm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function i7(i,o,l,h,E,T,S){if(l)return o.flags&256?(o.flags&=-257,h=Nm(Error(n(422))),qc(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=id({mode:"visible",children:h.children},E,0,null),T=vs(T,E,S,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Ro(o,i.child,null,S),o.child.memoizedState=Rm(S),o.memoizedState=Pm,T);if((o.mode&1)===0)return qc(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var F=h.dgst;return h=F,T=Error(n(419)),h=Nm(T,h,void 0),qc(i,o,S,h)}if(F=(S&i.childLanes)!==0,On||F){if(h=Yt,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,Kr(i,E),gr(h,i,E,-1))}return Qm(),h=Nm(Error(n(421))),qc(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=E7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,jn=_i(E.nextSibling),Hn=o,wt=!0,fr=null,i!==null&&(Gn[Xn++]=Xr,Gn[Xn++]=Qr,Gn[Xn++]=gs,Xr=i.id,Qr=i.overflow,gs=o),o=Lm(o,h.children),o.flags|=4096,o)}function Mw(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),dm(i.return,o,l)}function Dm(i,o,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function Fw(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(gn(i,o,h.children,l),h=St.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Mw(i,l,o);else if(i.tag===19)Mw(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(mt(St,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Bc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Dm(o,!1,E,l,T);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Bc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Dm(o,!0,l,null,T);break;case"together":Dm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Yc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Zr(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),xs|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Ri(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Ri(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function s7(i,o,l){switch(o.tag){case 3:Rw(o),Po();break;case 5:K_(o);break;case 1:Cn(o.type)&&Nc(o);break;case 4:pm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;mt(Lc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(mt(St,St.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?Dw(i,o,l):(mt(St,St.current&1),i=Zr(i,o,l),i!==null?i.sibling:null);mt(St,St.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Fw(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),mt(St,St.current),h)break;return null;case 22:case 23:return o.lanes=0,Ow(i,o,l)}return Zr(i,o,l)}var Bw,Mm,Uw,Hw;Bw=function(i,o){for(var l=o.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===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Mm=function(){},Uw=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ts(Lr.current);var T=null;switch(l){case"input":E=kn(i,E),h=kn(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=Kt(i,E),h=Kt(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=vc)}Zt(l,h);var S;l=null;for(ee in E)if(!h.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var F=E[ee];for(S in F)F.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(s.hasOwnProperty(ee)?T||(T=[]):(T=T||[]).push(ee,null));for(ee in h){var $=h[ee];if(F=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&$!==F&&($!=null||F!=null))if(ee==="style")if(F){for(S in F)!F.hasOwnProperty(S)||$&&$.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in $)$.hasOwnProperty(S)&&F[S]!==$[S]&&(l||(l={}),l[S]=$[S])}else l||(T||(T=[]),T.push(ee,l)),l=$;else ee==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,F=F?F.__html:void 0,$!=null&&F!==$&&(T=T||[]).push(ee,$)):ee==="children"?typeof $!="string"&&typeof $!="number"||(T=T||[]).push(ee,""+$):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(s.hasOwnProperty(ee)?($!=null&&ee==="onScroll"&&Tt("scroll",i),T||F===$||(T=[])):(T=T||[]).push(ee,$))}l&&(T=T||[]).push("style",l);var ee=T;(o.updateQueue=ee)&&(o.flags|=4)}},Hw=function(i,o,l,h){l!==h&&(o.flags|=4)};function mu(i,o){if(!wt)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function fn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function o7(i,o,l){var h=o.pendingProps;switch(im(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fn(o),null;case 1:return Cn(o.type)&&kc(),fn(o),null;case 3:return h=o.stateNode,Mo(),bt(Nn),bt(cn),Em(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Pc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,fr!==null&&(Wm(fr),fr=null))),Mm(i,o),fn(o),null;case 5:mm(o);var E=Ts(cu.current);if(l=o.type,i!==null&&o.stateNode!=null)Uw(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return fn(o),null}if(i=Ts(Lr.current),Pc(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Rr]=o,h[su]=T,i=(o.mode&1)!==0,l){case"dialog":Tt("cancel",h),Tt("close",h);break;case"iframe":case"object":case"embed":Tt("load",h);break;case"video":case"audio":for(E=0;E<nu.length;E++)Tt(nu[E],h);break;case"source":Tt("error",h);break;case"img":case"image":case"link":Tt("error",h),Tt("load",h);break;case"details":Tt("toggle",h);break;case"input":me(h,T),Tt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},Tt("invalid",h);break;case"textarea":cs(h,T),Tt("invalid",h)}Zt(l,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var F=T[S];S==="children"?typeof F=="string"?h.textContent!==F&&(T.suppressHydrationWarning!==!0&&Sc(h.textContent,F,i),E=["children",F]):typeof F=="number"&&h.textContent!==""+F&&(T.suppressHydrationWarning!==!0&&Sc(h.textContent,F,i),E=["children",""+F]):s.hasOwnProperty(S)&&F!=null&&S==="onScroll"&&Tt("scroll",h)}switch(l){case"input":Vt(h),fe(h,T,!0);break;case"textarea":Vt(h),rc(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=vc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ue(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[Rr]=o,i[su]=h,Bw(i,o,!1,!1),o.stateNode=i;e:{switch(S=Ir(l,h),l){case"dialog":Tt("cancel",i),Tt("close",i),E=h;break;case"iframe":case"object":case"embed":Tt("load",i),E=h;break;case"video":case"audio":for(E=0;E<nu.length;E++)Tt(nu[E],i);E=h;break;case"source":Tt("error",i),E=h;break;case"img":case"image":case"link":Tt("error",i),Tt("load",i),E=h;break;case"details":Tt("toggle",i),E=h;break;case"input":me(i,h),E=kn(i,h),Tt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),Tt("invalid",i);break;case"textarea":cs(i,h),E=Kt(i,h),Tt("invalid",i);break;default:E=h}Zt(l,E),F=E;for(T in F)if(F.hasOwnProperty(T)){var $=F[T];T==="style"?mi(i,$):T==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Ke(i,$)):T==="children"?typeof $=="string"?(l!=="textarea"||$!=="")&&nt(i,$):typeof $=="number"&&nt(i,""+$):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?$!=null&&T==="onScroll"&&Tt("scroll",i):$!=null&&C(i,T,$,S))}switch(l){case"input":Vt(i),fe(i,h,!1);break;case"textarea":Vt(i),rc(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Be(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?ut(i,!!h.multiple,T,!1):h.defaultValue!=null&&ut(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=vc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return fn(o),null;case 6:if(i&&o.stateNode!=null)Hw(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ts(cu.current),Ts(Lr.current),Pc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Rr]=o,(T=h.nodeValue!==l)&&(i=Hn,i!==null))switch(i.tag){case 3:Sc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Sc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Rr]=o,o.stateNode=h}return fn(o),null;case 13:if(bt(St),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(wt&&jn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)z_(),Po(),o.flags|=98560,T=!1;else if(T=Pc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Rr]=o}else Po(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;fn(o),T=!1}else fr!==null&&(Wm(fr),fr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(St.current&1)!==0?Ut===0&&(Ut=3):Qm())),o.updateQueue!==null&&(o.flags|=4),fn(o),null);case 4:return Mo(),Mm(i,o),i===null&&ru(o.stateNode.containerInfo),fn(o),null;case 10:return cm(o.type._context),fn(o),null;case 17:return Cn(o.type)&&kc(),fn(o),null;case 19:if(bt(St),T=o.memoizedState,T===null)return fn(o),null;if(h=(o.flags&128)!==0,S=T.rendering,S===null)if(h)mu(T,!1);else{if(Ut!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Bc(i),S!==null){for(o.flags|=128,mu(T,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)T=l,i=h,T.flags&=14680066,S=T.alternate,S===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=S.childLanes,T.lanes=S.lanes,T.child=S.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,T.type=S.type,i=S.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return mt(St,St.current&1|2),o.child}i=i.sibling}T.tail!==null&&Ot()>Ho&&(o.flags|=128,h=!0,mu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Bc(S),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),mu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!S.alternate&&!wt)return fn(o),null}else 2*Ot()-T.renderingStartTime>Ho&&l!==1073741824&&(o.flags|=128,h=!0,mu(T,!1),o.lanes=4194304);T.isBackwards?(S.sibling=o.child,o.child=S):(l=T.last,l!==null?l.sibling=S:o.child=S,T.last=S)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Ot(),o.sibling=null,l=St.current,mt(St,h?l&1|2:l&1),o):(fn(o),null);case 22:case 23:return Xm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?($n&1073741824)!==0&&(fn(o),o.subtreeFlags&6&&(o.flags|=8192)):fn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function a7(i,o){switch(im(o),o.tag){case 1:return Cn(o.type)&&kc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Mo(),bt(Nn),bt(cn),Em(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return mm(o),null;case 13:if(bt(St),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Po()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return bt(St),null;case 4:return Mo(),null;case 10:return cm(o.type._context),null;case 22:case 23:return Xm(),null;case 24:return null;default:return null}}var Wc=!1,hn=!1,u7=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Bo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){kt(i,o,h)}else l.current=null}function Fm(i,o,l){try{l()}catch(h){kt(i,o,h)}}var jw=!1;function l7(i,o){if(Xp=hc,i=T_(),jp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(Se){l=null;break e}var S=0,F=-1,$=-1,ee=0,Te=0,xe=i,Ee=null;t:for(;;){for(var Oe;xe!==l||E!==0&&xe.nodeType!==3||(F=S+E),xe!==T||h!==0&&xe.nodeType!==3||($=S+h),xe.nodeType===3&&(S+=xe.nodeValue.length),(Oe=xe.firstChild)!==null;)Ee=xe,xe=Oe;for(;;){if(xe===i)break t;if(Ee===l&&++ee===E&&(F=S),Ee===T&&++Te===h&&($=S),(Oe=xe.nextSibling)!==null)break;xe=Ee,Ee=xe.parentNode}xe=Oe}l=F===-1||$===-1?null:{start:F,end:$}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qp={focusedElem:i,selectionRange:l},hc=!1,Ie=o;Ie!==null;)if(o=Ie,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ie=i;else for(;Ie!==null;){o=Ie;try{var Pe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Re=Pe.memoizedProps,It=Pe.memoizedState,Q=o.stateNode,V=Q.getSnapshotBeforeUpdate(o.elementType===o.type?Re:hr(o.type,Re),It);Q.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var J=o.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(Se){kt(o,o.return,Se)}if(i=o.sibling,i!==null){i.return=o.return,Ie=i;break}Ie=o.return}return Pe=jw,jw=!1,Pe}function gu(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Fm(o,l,T)}E=E.next}while(E!==h)}}function Gc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Bm(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function $w(i){var o=i.alternate;o!==null&&(i.alternate=null,$w(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Rr],delete o[su],delete o[em],delete o[qB],delete o[YB])),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 zw(i){return i.tag===5||i.tag===3||i.tag===4}function Vw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||zw(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 Um(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=vc));else if(h!==4&&(i=i.child,i!==null))for(Um(i,o,l),i=i.sibling;i!==null;)Um(i,o,l),i=i.sibling}function Hm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Hm(i,o,l),i=i.sibling;i!==null;)Hm(i,o,l),i=i.sibling}var en=null,pr=!1;function Ni(i,o,l){for(l=l.child;l!==null;)qw(i,o,l),l=l.sibling}function qw(i,o,l){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(ac,l)}catch(F){}switch(l.tag){case 5:hn||Bo(l,o);case 6:var h=en,E=pr;en=null,Ni(i,o,l),en=h,pr=E,en!==null&&(pr?(i=en,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):en.removeChild(l.stateNode));break;case 18:en!==null&&(pr?(i=en,l=l.stateNode,i.nodeType===8?Zp(i.parentNode,l):i.nodeType===1&&Zp(i,l),Ga(i)):Zp(en,l.stateNode));break;case 4:h=en,E=pr,en=l.stateNode.containerInfo,pr=!0,Ni(i,o,l),en=h,pr=E;break;case 0:case 11:case 14:case 15:if(!hn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Fm(l,o,S),E=E.next}while(E!==h)}Ni(i,o,l);break;case 1:if(!hn&&(Bo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(F){kt(l,o,F)}Ni(i,o,l);break;case 21:Ni(i,o,l);break;case 22:l.mode&1?(hn=(h=hn)||l.memoizedState!==null,Ni(i,o,l),hn=h):Ni(i,o,l);break;default:Ni(i,o,l)}}function Yw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new u7),o.forEach(function(h){var E=y7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function mr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,S=o,F=S;e:for(;F!==null;){switch(F.tag){case 5:en=F.stateNode,pr=!1;break e;case 3:en=F.stateNode.containerInfo,pr=!0;break e;case 4:en=F.stateNode.containerInfo,pr=!0;break e}F=F.return}if(en===null)throw Error(n(160));qw(T,S,E),en=null,pr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(ee){kt(E,o,ee)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Ww(o,i),o=o.sibling}function Ww(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(mr(o,i),Mr(i),h&4){try{gu(3,i,i.return),Gc(3,i)}catch(Re){kt(i,i.return,Re)}try{gu(5,i,i.return)}catch(Re){kt(i,i.return,Re)}}break;case 1:mr(o,i),Mr(i),h&512&&l!==null&&Bo(l,l.return);break;case 5:if(mr(o,i),Mr(i),h&512&&l!==null&&Bo(l,l.return),i.flags&32){var E=i.stateNode;try{nt(E,"")}catch(Re){kt(i,i.return,Re)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=l!==null?l.memoizedProps:T,F=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{F==="input"&&T.type==="radio"&&T.name!=null&&he(E,T),Ir(F,S);var ee=Ir(F,T);for(S=0;S<$.length;S+=2){var Te=$[S],xe=$[S+1];Te==="style"?mi(E,xe):Te==="dangerouslySetInnerHTML"?Ke(E,xe):Te==="children"?nt(E,xe):C(E,Te,xe,ee)}switch(F){case"input":W(E,T);break;case"textarea":ds(E,T);break;case"select":var Ee=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Oe=T.value;Oe!=null?ut(E,!!T.multiple,Oe,!1):Ee!==!!T.multiple&&(T.defaultValue!=null?ut(E,!!T.multiple,T.defaultValue,!0):ut(E,!!T.multiple,T.multiple?[]:"",!1))}E[su]=T}catch(Re){kt(i,i.return,Re)}}break;case 6:if(mr(o,i),Mr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Re){kt(i,i.return,Re)}}break;case 3:if(mr(o,i),Mr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Ga(o.containerInfo)}catch(Re){kt(i,i.return,Re)}break;case 4:mr(o,i),Mr(i);break;case 13:mr(o,i),Mr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(zm=Ot())),h&4&&Yw(i);break;case 22:if(Te=l!==null&&l.memoizedState!==null,i.mode&1?(hn=(ee=hn)||Te,mr(o,i),hn=ee):mr(o,i),Mr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!Te&&(i.mode&1)!==0)for(Ie=i,Te=i.child;Te!==null;){for(xe=Ie=Te;Ie!==null;){switch(Ee=Ie,Oe=Ee.child,Ee.tag){case 0:case 11:case 14:case 15:gu(4,Ee,Ee.return);break;case 1:Bo(Ee,Ee.return);var Pe=Ee.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=Ee,l=Ee.return;try{o=h,Pe.props=o.memoizedProps,Pe.state=o.memoizedState,Pe.componentWillUnmount()}catch(Re){kt(h,l,Re)}}break;case 5:Bo(Ee,Ee.return);break;case 22:if(Ee.memoizedState!==null){Qw(xe);continue}}Oe!==null?(Oe.return=Ee,Ie=Oe):Qw(xe)}Te=Te.sibling}e:for(Te=null,xe=i;;){if(xe.tag===5){if(Te===null){Te=xe;try{E=xe.stateNode,ee?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(F=xe.stateNode,$=xe.memoizedProps.style,S=$!=null&&$.hasOwnProperty("display")?$.display:null,F.style.display=Wn("display",S))}catch(Re){kt(i,i.return,Re)}}}else if(xe.tag===6){if(Te===null)try{xe.stateNode.nodeValue=ee?"":xe.memoizedProps}catch(Re){kt(i,i.return,Re)}}else if((xe.tag!==22&&xe.tag!==23||xe.memoizedState===null||xe===i)&&xe.child!==null){xe.child.return=xe,xe=xe.child;continue}if(xe===i)break e;for(;xe.sibling===null;){if(xe.return===null||xe.return===i)break e;Te===xe&&(Te=null),xe=xe.return}Te===xe&&(Te=null),xe.sibling.return=xe.return,xe=xe.sibling}}break;case 19:mr(o,i),Mr(i),h&4&&Yw(i);break;case 21:break;default:mr(o,i),Mr(i)}}function Mr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(zw(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(nt(E,""),h.flags&=-33);var T=Vw(i);Hm(i,T,E);break;case 3:case 4:var S=h.stateNode.containerInfo,F=Vw(i);Um(i,F,S);break;default:throw Error(n(161))}}catch($){kt(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function c7(i,o,l){Ie=i,Gw(i)}function Gw(i,o,l){for(var h=(i.mode&1)!==0;Ie!==null;){var E=Ie,T=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||Wc;if(!S){var F=E.alternate,$=F!==null&&F.memoizedState!==null||hn;F=Wc;var ee=hn;if(Wc=S,(hn=$)&&!ee)for(Ie=E;Ie!==null;)S=Ie,$=S.child,S.tag===22&&S.memoizedState!==null?Kw(E):$!==null?($.return=S,Ie=$):Kw(E);for(;T!==null;)Ie=T,Gw(T),T=T.sibling;Ie=E,Wc=F,hn=ee}Xw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ie=T):Xw(i)}}function Xw(i){for(;Ie!==null;){var o=Ie;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:hn||Gc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!hn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:hr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&Q_(o,T,h);break;case 3:var S=o.updateQueue;if(S!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}Q_(o,S,l)}break;case 5:var F=o.stateNode;if(l===null&&o.flags&4){l=F;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&l.focus();break;case"img":$.src&&(l.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ee=o.alternate;if(ee!==null){var Te=ee.memoizedState;if(Te!==null){var xe=Te.dehydrated;xe!==null&&Ga(xe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}hn||o.flags&512&&Bm(o)}catch(Ee){kt(o,o.return,Ee)}}if(o===i){Ie=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ie=l;break}Ie=o.return}}function Qw(i){for(;Ie!==null;){var o=Ie;if(o===i){Ie=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ie=l;break}Ie=o.return}}function Kw(i){for(;Ie!==null;){var o=Ie;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{Gc(4,o)}catch($){kt(o,l,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){kt(o,E,$)}}var T=o.return;try{Bm(o)}catch($){kt(o,T,$)}break;case 5:var S=o.return;try{Bm(o)}catch($){kt(o,S,$)}}}catch($){kt(o,o.return,$)}if(o===i){Ie=null;break}var F=o.sibling;if(F!==null){F.return=o.return,Ie=F;break}Ie=o.return}}var d7=Math.ceil,Xc=j.ReactCurrentDispatcher,jm=j.ReactCurrentOwner,Jn=j.ReactCurrentBatchConfig,rt=0,Yt=null,Dt=null,tn=0,$n=0,Uo=wi(0),Ut=0,Eu=null,xs=0,Qc=0,$m=0,yu=null,In=null,zm=0,Ho=1/0,ei=null,Kc=!1,Vm=null,Ci=null,Jc=!1,Oi=null,Zc=0,Tu=0,qm=null,ed=-1,td=0;function En(){return(rt&6)!==0?Ot():ed!==-1?ed:ed=Ot()}function Ii(i){return(i.mode&1)===0?1:(rt&2)!==0&&tn!==0?tn&-tn:GB.transition!==null?(td===0&&(td=Vx()),td):(i=lt,i!==0||(i=window.event,i=i===void 0?16:Zx(i.type)),i)}function gr(i,o,l,h){if(50<Tu)throw Tu=0,qm=null,Error(n(185));za(i,l,h),((rt&2)===0||i!==Yt)&&(i===Yt&&((rt&2)===0&&(Qc|=l),Ut===4&&Pi(i,tn)),Pn(i,h),l===1&&rt===0&&(o.mode&1)===0&&(Ho=Ot()+500,Cc&&vi()))}function Pn(i,o){var l=i.callbackNode;GF(i,o);var h=cc(i,i===Yt?tn:0);if(h===0)l!==null&&jx(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&jx(l),o===1)i.tag===0?WB(Zw.bind(null,i)):B_(Zw.bind(null,i)),zB(function(){(rt&6)===0&&vi()}),l=null;else{switch(qx(h)){case 1:l=Sp;break;case 4:l=$x;break;case 16:l=oc;break;case 536870912:l=zx;break;default:l=oc}l=a2(l,Jw.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function Jw(i,o){if(ed=-1,td=0,(rt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(jo()&&i.callbackNode!==l)return null;var h=cc(i,i===Yt?tn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=nd(i,h);else{o=h;var E=rt;rt|=2;var T=t2();(Yt!==i||tn!==o)&&(ei=null,Ho=Ot()+500,ws(i,o));do try{p7();break}catch(F){e2(i,F)}while(!0);lm(),Xc.current=T,rt=E,Dt!==null?o=0:(Yt=null,tn=0,o=Ut)}if(o!==0){if(o===2&&(E=vp(i),E!==0&&(h=E,o=Ym(i,E))),o===1)throw l=Eu,ws(i,0),Pi(i,h),Pn(i,Ot()),l;if(o===6)Pi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!f7(E)&&(o=nd(i,h),o===2&&(T=vp(i),T!==0&&(h=T,o=Ym(i,T))),o===1))throw l=Eu,ws(i,0),Pi(i,h),Pn(i,Ot()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ss(i,In,ei);break;case 3:if(Pi(i,h),(h&130023424)===h&&(o=zm+500-Ot(),10<o)){if(cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){En(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Jp(Ss.bind(null,i,In,ei),o);break}Ss(i,In,ei);break;case 4:if(Pi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-cr(h);T=1<<S,S=o[S],S>E&&(E=S),h&=~T}if(h=E,h=Ot()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*d7(h/1960))-h,10<h){i.timeoutHandle=Jp(Ss.bind(null,i,In,ei),h);break}Ss(i,In,ei);break;case 5:Ss(i,In,ei);break;default:throw Error(n(329))}}}return Pn(i,Ot()),i.callbackNode===l?Jw.bind(null,i):null}function Ym(i,o){var l=yu;return i.current.memoizedState.isDehydrated&&(ws(i,o).flags|=256),i=nd(i,o),i!==2&&(o=In,In=l,o!==null&&Wm(o)),i}function Wm(i){In===null?In=i:In.push.apply(In,i)}function f7(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!dr(T(),E))return!1}catch(S){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Pi(i,o){for(o&=~$m,o&=~Qc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-cr(o),h=1<<l;i[l]=-1,o&=~h}}function Zw(i){if((rt&6)!==0)throw Error(n(327));jo();var o=cc(i,0);if((o&1)===0)return Pn(i,Ot()),null;var l=nd(i,o);if(i.tag!==0&&l===2){var h=vp(i);h!==0&&(o=h,l=Ym(i,h))}if(l===1)throw l=Eu,ws(i,0),Pi(i,o),Pn(i,Ot()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Ss(i,In,ei),Pn(i,Ot()),null}function Gm(i,o){var l=rt;rt|=1;try{return i(o)}finally{rt=l,rt===0&&(Ho=Ot()+500,Cc&&vi())}}function _s(i){Oi!==null&&Oi.tag===0&&(rt&6)===0&&jo();var o=rt;rt|=1;var l=Jn.transition,h=lt;try{if(Jn.transition=null,lt=1,i)return i()}finally{lt=h,Jn.transition=l,rt=o,(rt&6)===0&&vi()}}function Xm(){$n=Uo.current,bt(Uo)}function ws(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,$B(l)),Dt!==null)for(l=Dt.return;l!==null;){var h=l;switch(im(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&kc();break;case 3:Mo(),bt(Nn),bt(cn),Em();break;case 5:mm(h);break;case 4:Mo();break;case 13:bt(St);break;case 19:bt(St);break;case 10:cm(h.type._context);break;case 22:case 23:Xm()}l=l.return}if(Yt=i,Dt=i=Ri(i.current,null),tn=$n=o,Ut=0,Eu=null,$m=Qc=xs=0,In=yu=null,ys!==null){for(o=0;o<ys.length;o++)if(l=ys[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var S=T.next;T.next=E,h.next=S}l.pending=h}ys=null}return i}function e2(i,o){do{var l=Dt;try{if(lm(),Uc.current=zc,Hc){for(var h=vt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Hc=!1}if(bs=0,qt=Bt=vt=null,du=!1,fu=0,jm.current=null,l===null||l.return===null){Ut=1,Eu=o,Dt=null;break}e:{var T=i,S=l.return,F=l,$=o;if(o=tn,F.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var ee=$,Te=F,xe=Te.tag;if((Te.mode&1)===0&&(xe===0||xe===11||xe===15)){var Ee=Te.alternate;Ee?(Te.updateQueue=Ee.updateQueue,Te.memoizedState=Ee.memoizedState,Te.lanes=Ee.lanes):(Te.updateQueue=null,Te.memoizedState=null)}var Oe=vw(S);if(Oe!==null){Oe.flags&=-257,Aw(Oe,S,F,T,o),Oe.mode&1&&Sw(T,ee,o),o=Oe,$=ee;var Pe=o.updateQueue;if(Pe===null){var Re=new Set;Re.add($),o.updateQueue=Re}else Pe.add($);break e}else{if((o&1)===0){Sw(T,ee,o),Qm();break e}$=Error(n(426))}}else if(wt&&F.mode&1){var It=vw(S);if(It!==null){(It.flags&65536)===0&&(It.flags|=256),Aw(It,S,F,T,o),am(Fo($,F));break e}}T=$=Fo($,F),Ut!==4&&(Ut=2),yu===null?yu=[T]:yu.push(T),T=S;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var Q=_w(T,$,o);X_(T,Q);break e;case 1:F=$;var V=T.type,J=T.stateNode;if((T.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Ci===null||!Ci.has(J)))){T.flags|=65536,o&=-o,T.lanes|=o;var Se=ww(T,F,o);X_(T,Se);break e}}T=T.return}while(T!==null)}r2(l)}catch(De){o=De,Dt===l&&l!==null&&(Dt=l=l.return);continue}break}while(!0)}function t2(){var i=Xc.current;return Xc.current=zc,i===null?zc:i}function Qm(){(Ut===0||Ut===3||Ut===2)&&(Ut=4),Yt===null||(xs&268435455)===0&&(Qc&268435455)===0||Pi(Yt,tn)}function nd(i,o){var l=rt;rt|=2;var h=t2();(Yt!==i||tn!==o)&&(ei=null,ws(i,o));do try{h7();break}catch(E){e2(i,E)}while(!0);if(lm(),rt=l,Xc.current=h,Dt!==null)throw Error(n(261));return Yt=null,tn=0,Ut}function h7(){for(;Dt!==null;)n2(Dt)}function p7(){for(;Dt!==null&&!UF();)n2(Dt)}function n2(i){var o=o2(i.alternate,i,$n);i.memoizedProps=i.pendingProps,o===null?r2(i):Dt=o,jm.current=null}function r2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=o7(l,o,$n),l!==null){Dt=l;return}}else{if(l=a7(l,o),l!==null){l.flags&=32767,Dt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ut=6,Dt=null;return}}if(o=o.sibling,o!==null){Dt=o;return}Dt=o=i}while(o!==null);Ut===0&&(Ut=5)}function Ss(i,o,l){var h=lt,E=Jn.transition;try{Jn.transition=null,lt=1,m7(i,o,l,h)}finally{Jn.transition=E,lt=h}return null}function m7(i,o,l,h){do jo();while(Oi!==null);if((rt&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 T=l.lanes|l.childLanes;if(XF(i,T),i===Yt&&(Dt=Yt=null,tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Jc||(Jc=!0,a2(oc,function(){return jo(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=Jn.transition,Jn.transition=null;var S=lt;lt=1;var F=rt;rt|=4,jm.current=null,l7(i,l),Ww(l,i),DB(Qp),hc=!!Xp,Qp=Xp=null,i.current=l,c7(l),HF(),rt=F,lt=S,Jn.transition=T}else i.current=l;if(Jc&&(Jc=!1,Oi=i,Zc=E),T=i.pendingLanes,T===0&&(Ci=null),zF(l.stateNode),Pn(i,Ot()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(Kc)throw Kc=!1,i=Vm,Vm=null,i;return(Zc&1)!==0&&i.tag!==0&&jo(),T=i.pendingLanes,(T&1)!==0?i===qm?Tu++:(Tu=0,qm=i):Tu=0,vi(),null}function jo(){if(Oi!==null){var i=qx(Zc),o=Jn.transition,l=lt;try{if(Jn.transition=null,lt=16>i?16:i,Oi===null)var h=!1;else{if(i=Oi,Oi=null,Zc=0,(rt&6)!==0)throw Error(n(331));var E=rt;for(rt|=4,Ie=i.current;Ie!==null;){var T=Ie,S=T.child;if((Ie.flags&16)!==0){var F=T.deletions;if(F!==null){for(var $=0;$<F.length;$++){var ee=F[$];for(Ie=ee;Ie!==null;){var Te=Ie;switch(Te.tag){case 0:case 11:case 15:gu(8,Te,T)}var xe=Te.child;if(xe!==null)xe.return=Te,Ie=xe;else for(;Ie!==null;){Te=Ie;var Ee=Te.sibling,Oe=Te.return;if($w(Te),Te===ee){Ie=null;break}if(Ee!==null){Ee.return=Oe,Ie=Ee;break}Ie=Oe}}}var Pe=T.alternate;if(Pe!==null){var Re=Pe.child;if(Re!==null){Pe.child=null;do{var It=Re.sibling;Re.sibling=null,Re=It}while(Re!==null)}}Ie=T}}if((T.subtreeFlags&2064)!==0&&S!==null)S.return=T,Ie=S;else e:for(;Ie!==null;){if(T=Ie,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:gu(9,T,T.return)}var Q=T.sibling;if(Q!==null){Q.return=T.return,Ie=Q;break e}Ie=T.return}}var V=i.current;for(Ie=V;Ie!==null;){S=Ie;var J=S.child;if((S.subtreeFlags&2064)!==0&&J!==null)J.return=S,Ie=J;else e:for(S=V;Ie!==null;){if(F=Ie,(F.flags&2048)!==0)try{switch(F.tag){case 0:case 11:case 15:Gc(9,F)}}catch(De){kt(F,F.return,De)}if(F===S){Ie=null;break e}var Se=F.sibling;if(Se!==null){Se.return=F.return,Ie=Se;break e}Ie=F.return}}if(rt=E,vi(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(ac,i)}catch(De){}h=!0}return h}finally{lt=l,Jn.transition=o}}return!1}function i2(i,o,l){o=Fo(l,o),o=_w(i,o,1),i=ki(i,o,1),o=En(),i!==null&&(za(i,1,o),Pn(i,o))}function kt(i,o,l){if(i.tag===3)i2(i,i,l);else for(;o!==null;){if(o.tag===3){i2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ci===null||!Ci.has(h))){i=Fo(l,i),i=ww(o,i,1),o=ki(o,i,1),i=En(),o!==null&&(za(o,1,i),Pn(o,i));break}}o=o.return}}function g7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=En(),i.pingedLanes|=i.suspendedLanes&l,Yt===i&&(tn&l)===l&&(Ut===4||Ut===3&&(tn&130023424)===tn&&500>Ot()-zm?ws(i,0):$m|=l),Pn(i,o)}function s2(i,o){o===0&&((i.mode&1)===0?o=1:(o=lc,lc<<=1,(lc&130023424)===0&&(lc=4194304)));var l=En();i=Kr(i,o),i!==null&&(za(i,o,l),Pn(i,l))}function E7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),s2(i,l)}function y7(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),s2(i,l)}var o2;o2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Nn.current)On=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return On=!1,s7(i,o,l);On=(i.flags&131072)!==0}else On=!1,wt&&(o.flags&1048576)!==0&&U_(o,Ic,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Yc(i,o),i=o.pendingProps;var E=Co(o,cn.current);Do(o,l),E=bm(null,o,h,i,E,l);var T=xm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Cn(h)?(T=!0,Nc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,hm(o),E.updater=Vc,o.stateNode=E,E._reactInternals=o,km(o,h,i,l),o=Im(null,o,h,!0,T,l)):(o.tag=0,wt&&T&&rm(o),gn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(Yc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=b7(h),i=hr(h,i),E){case 0:o=Om(null,o,h,i,l);break e;case 1:o=Pw(null,o,h,i,l);break e;case 11:o=kw(null,o,h,i,l);break e;case 14:o=Nw(null,o,h,hr(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),Om(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),Pw(i,o,h,E,l);case 3:e:{if(Rw(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,G_(i,o),Fc(o,h,null,l);var S=o.memoizedState;if(h=S.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Fo(Error(n(423)),o),o=Lw(i,o,h,l,E);break e}else if(h!==E){E=Fo(Error(n(424)),o),o=Lw(i,o,h,l,E);break e}else for(jn=_i(o.stateNode.containerInfo.firstChild),Hn=o,wt=!0,fr=null,l=Y_(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Po(),h===E){o=Zr(i,o,l);break e}gn(i,o,h,l)}o=o.child}return o;case 5:return K_(o),i===null&&om(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Kp(h,E)?S=null:T!==null&&Kp(h,T)&&(o.flags|=32),Iw(i,o),gn(i,o,S,l),o.child;case 6:return i===null&&om(o),null;case 13:return Dw(i,o,l);case 4:return pm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Ro(o,null,h,l):gn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),kw(i,o,h,E,l);case 7:return gn(i,o,o.pendingProps,l),o.child;case 8:return gn(i,o,o.pendingProps.children,l),o.child;case 12:return gn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,S=E.value,mt(Lc,h._currentValue),h._currentValue=S,T!==null)if(dr(T.value,S)){if(T.children===E.children&&!Nn.current){o=Zr(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var F=T.dependencies;if(F!==null){S=T.child;for(var $=F.firstContext;$!==null;){if($.context===h){if(T.tag===1){$=Jr(-1,l&-l),$.tag=2;var ee=T.updateQueue;if(ee!==null){ee=ee.shared;var Te=ee.pending;Te===null?$.next=$:($.next=Te.next,Te.next=$),ee.pending=$}}T.lanes|=l,$=T.alternate,$!==null&&($.lanes|=l),dm(T.return,l,o),F.lanes|=l;break}$=$.next}}else if(T.tag===10)S=T.type===o.type?null:T.child;else if(T.tag===18){if(S=T.return,S===null)throw Error(n(341));S.lanes|=l,F=S.alternate,F!==null&&(F.lanes|=l),dm(S,l,o),S=T.sibling}else S=T.child;if(S!==null)S.return=T;else for(S=T;S!==null;){if(S===o){S=null;break}if(T=S.sibling,T!==null){T.return=S.return,S=T;break}S=S.return}T=S}gn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Do(o,l),E=Qn(E),h=h(E),o.flags|=1,gn(i,o,h,l),o.child;case 14:return h=o.type,E=hr(h,o.pendingProps),E=hr(h.type,E),Nw(i,o,h,E,l);case 15:return Cw(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:hr(h,E),Yc(i,o),o.tag=1,Cn(h)?(i=!0,Nc(o)):i=!1,Do(o,l),bw(o,h,E),km(o,h,E,l),Im(null,o,h,!0,i,l);case 19:return Fw(i,o,l);case 22:return Ow(i,o,l)}throw Error(n(156,o.tag))};function a2(i,o){return Hx(i,o)}function T7(i,o,l,h){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=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(i,o,l,h){return new T7(i,o,l,h)}function Km(i){return i=i.prototype,!(!i||!i.isReactComponent)}function b7(i){if(typeof i=="function")return Km(i)?1:0;if(i!=null){if(i=i.$$typeof,i===oe)return 11;if(i===se)return 14}return 2}function Ri(i,o){var l=i.alternate;return l===null?(l=Zn(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,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,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function rd(i,o,l,h,E,T){var S=2;if(h=i,typeof i=="function")Km(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case G:return vs(l.children,E,T,o);case ne:S=8,E|=8;break;case de:return i=Zn(12,l,o,E|2),i.elementType=de,i.lanes=T,i;case pe:return i=Zn(13,l,o,E),i.elementType=pe,i.lanes=T,i;case ce:return i=Zn(19,l,o,E),i.elementType=ce,i.lanes=T,i;case re:return id(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:S=10;break e;case ae:S=9;break e;case oe:S=11;break e;case se:S=14;break e;case Ae:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=Zn(S,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function vs(i,o,l,h){return i=Zn(7,i,h,o),i.lanes=l,i}function id(i,o,l,h){return i=Zn(22,i,h,o),i.elementType=re,i.lanes=l,i.stateNode={isHidden:!1},i}function Jm(i,o,l){return i=Zn(6,i,null,o),i.lanes=l,i}function Zm(i,o,l){return o=Zn(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function x7(i,o,l,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ap(0),this.expirationTimes=Ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ap(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function e0(i,o,l,h,E,T,S,F,$){return i=new x7(i,o,l,F,$),o===1?(o=1,T===!0&&(o|=8)):o=0,T=Zn(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},hm(T),i}function _7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function u2(i){if(!i)return Si;i=i._reactInternals;e:{if(hs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Cn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Cn(l))return M_(i,l,o)}return o}function l2(i,o,l,h,E,T,S,F,$){return i=e0(l,h,!0,i,E,T,S,F,$),i.context=u2(null),l=i.current,h=En(),E=Ii(l),T=Jr(h,E),T.callback=o!=null?o:null,ki(l,T,E),i.current.lanes=E,za(i,E,h),Pn(i,h),i}function sd(i,o,l,h){var E=o.current,T=En(),S=Ii(E);return l=u2(l),o.context===null?o.context=l:o.pendingContext=l,o=Jr(T,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=ki(E,o,S),i!==null&&(gr(i,E,S,T),Mc(i,E,S)),S}function od(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function c2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function t0(i,o){c2(i,o),(i=i.alternate)&&c2(i,o)}function w7(){return null}var d2=typeof reportError=="function"?reportError:function(i){console.error(i)};function n0(i){this._internalRoot=i}ad.prototype.render=n0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));sd(i,o,null,null)},ad.prototype.unmount=n0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;_s(function(){sd(null,i,null,null)}),o[Wr]=null}};function ad(i){this._internalRoot=i}ad.prototype.unstable_scheduleHydration=function(i){if(i){var o=Gx();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Ti.length&&o!==0&&o<Ti[l].priority;l++);Ti.splice(l,0,i),l===0&&Kx(i)}};function r0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ud(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function f2(){}function S7(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var ee=od(S);T.call(ee)}}var S=l2(o,h,i,0,null,!1,!1,"",f2);return i._reactRootContainer=S,i[Wr]=S.current,ru(i.nodeType===8?i.parentNode:i),_s(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var F=h;h=function(){var ee=od($);F.call(ee)}}var $=e0(i,0,!1,null,null,!1,!1,"",f2);return i._reactRootContainer=$,i[Wr]=$.current,ru(i.nodeType===8?i.parentNode:i),_s(function(){sd(o,$,l,h)}),$}function ld(i,o,l,h,E){var T=l._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var F=E;E=function(){var $=od(S);F.call($)}}sd(o,S,i,E)}else S=S7(l,o,i,E,h);return od(S)}Yx=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=$a(o.pendingLanes);l!==0&&(kp(o,l|1),Pn(o,Ot()),(rt&6)===0&&(Ho=Ot()+500,vi()))}break;case 13:_s(function(){var h=Kr(i,1);if(h!==null){var E=En();gr(h,i,1,E)}}),t0(i,1)}},Np=function(i){if(i.tag===13){var o=Kr(i,134217728);if(o!==null){var l=En();gr(o,i,134217728,l)}t0(i,134217728)}},Wx=function(i){if(i.tag===13){var o=Ii(i),l=Kr(i,o);if(l!==null){var h=En();gr(l,i,o,h)}t0(i,o)}},Gx=function(){return lt},Xx=function(i,o){var l=lt;try{return lt=i,o()}finally{lt=l}},bp=function(i,o,l){switch(o){case"input":if(W(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Ac(h);if(!E)throw Error(n(90));Lt(h),W(h,E)}}}break;case"textarea":ds(i,l);break;case"select":o=l.value,o!=null&&ut(i,!!l.multiple,o,!1)}},Rx=Gm,Lx=_s;var v7={usingClientEntryPoint:!1,Events:[ou,ko,Ac,Ix,Px,Gm]},bu={findFiberByHostInstance:ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},A7={bundleType:bu.bundleType,version:bu.version,rendererPackageName:bu.rendererPackageName,rendererConfig:bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Bx(i),i===null?null:i.stateNode},findFiberByHostInstance:bu.findFiberByHostInstance||w7,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 cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cd.isDisabled&&cd.supportsFiber)try{ac=cd.inject(A7),Pr=cd}catch(i){}}return xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v7,xn.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r0(o))throw Error(n(200));return _7(i,o,null,l)},xn.createRoot=function(i,o){if(!r0(i))throw Error(n(299));var l=!1,h="",E=d2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=e0(i,1,!1,null,null,l,!1,h,E),i[Wr]=o.current,ru(i.nodeType===8?i.parentNode:i),new n0(o)},xn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Bx(o),i=i===null?null:i.stateNode,i},xn.flushSync=function(i){return _s(i)},xn.hydrate=function(i,o,l){if(!ud(o))throw Error(n(200));return ld(null,i,o,!0,l)},xn.hydrateRoot=function(i,o,l){if(!r0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",S=d2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),o=l2(o,null,i,1,l!=null?l:null,E,!1,T,S),i[Wr]=o.current,ru(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new ad(o)},xn.render=function(i,o,l){if(!ud(o))throw Error(n(200));return ld(null,i,o,!1,l)},xn.unmountComponentAtNode=function(i){if(!ud(i))throw Error(n(40));return i._reactRootContainer?(_s(function(){ld(null,null,i,!1,function(){i._reactRootContainer=null,i[Wr]=null})}),!0):!1},xn.unstable_batchedUpdates=Gm,xn.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!ud(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return ld(i,o,l,!1,h)},xn.version="18.3.1-next-f1338f8080-20240426",xn}var e1;function t1(){if(e1)return df.exports;e1=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(),df.exports=Dk(),df.exports}var Fs=t1();function n1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=n1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function M(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=n1(e))&&(r&&(r+=" "),r+=t);return r}var r1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i1=Mi.createContext&&Mi.createContext(r1),Mk=["attr","size","title"];function Fk(e,t){if(e==null)return{};var n=Bk(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bk(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 Ju(){return Ju=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},Ju.apply(this,arguments)}function s1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s1(Object(n),!0).forEach(function(r){Uk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uk(e,t,n){return t=Hk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hk(e){var t=jk(e,"string");return typeof t=="symbol"?t:t+""}function jk(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 o1(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,Zu({key:n},t.attr),o1(t.child)))}function ot(e){return t=>Mi.createElement($k,Ju({attr:Zu({},e.attr)},t),o1(e.child))}function $k(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=Fk(e,Mk),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Mi.createElement("svg",Ju({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Zu(Zu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Mi.createElement("title",null,a),e.children)};return i1!==void 0?Mi.createElement(i1.Consumer,null,n=>t(n)):t(r1)}function zk(e){return ot({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 Vk(e){return ot({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function qk(e){return ot({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 ir=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:_.jsx("button",{className:M(e,`${O}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?_.jsx("img",{className:M(`${O}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),Yk="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",Wk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=at(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(qk,{className:M(t,`${O}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||Yk,alt:"Copilot",className:M(t,`${O}-minimized-icon-img`)});return _.jsx(ir,{className:M(t,`${O}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},Gk=()=>{const{globalClassName:e,themeVariables:t}=at(),n=()=>{Cu(!1),Br(!0)};return Fs.createPortal(_.jsx("div",{className:M(e,`${O}-minimized-container`),style:t,children:_.jsx(Wk,{onClick:n})}),document.body)};function Xk(e){return ot({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 sn(){const e=B.useContext(Ag);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const Qk=e=>({[`${Rn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Rn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Rn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Rn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Rn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Rn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function Kk(e){return ot({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 Jk(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function a1(e){return ot({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 Zk(e){return ot({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 pf(e){return ot({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 eN(e){return ot({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 tN(e){return ot({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 nN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function u1(e){return ot({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 l1(e){return ot({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 rN(e){return ot({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 iN(e){return ot({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 sN(e){return ot({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 c1(e){return ot({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 el=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>_.jsx("button",{className:M(`${O}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),oN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:M(`${O}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(pf,{size:"16px"})},aN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(ir,{className:M(e,n,`cim-${r}-component`,`${O}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(pf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(el,{className:M(e,n,`cim-${r}-component`,`${O}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(oN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function nU(){}function rU(){}function d1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function f1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const uN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cN={};function h1(e,t){return(cN.jsx?lN:uN).test(e)}const dN=/[ \t\n\f\r]/g;function fN(e){return typeof e=="object"?e.type==="text"?p1(e.value):!1:p1(e)}function p1(e){return e.replace(dN,"")===""}class na{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}na.prototype.normal={},na.prototype.property={},na.prototype.space=void 0;function m1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new na(n,r,t)}function ra(e){return e.toLowerCase()}class _n{constructor(t,n){this.attribute=n,this.property=t}}_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let hN=0;const We=Wi(),Rt=Wi(),mf=Wi(),we=Wi(),ft=Wi(),Yi=Wi(),Dn=Wi();function Wi(){return fd(2,++hN)}const gf=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Rt,commaOrSpaceSeparated:Dn,commaSeparated:Yi,number:we,overloadedBoolean:mf,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Ef=Object.keys(gf);class yf extends _n{constructor(t,n,r,s){let a=-1;if(super(t,n),g1(this,"space",s),typeof r=="number")for(;++a<Ef.length;){const u=Ef[a];g1(this,Ef[a],(r&gf[u])===gf[u])}}}yf.prototype.defined=!0;function g1(e,t,n){n&&(e[t]=n)}function Bs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new yf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ra(r)]=r,n[ra(a.attribute)]=r}return new na(t,n,e.space)}const E1=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:ft,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:we,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:ft,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:Rt,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function y1(e,t){return t in e?e[t]:t}function T1(e,t){return y1(e,t.toLowerCase())}const pN=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yi,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:ft,autoFocus:We,autoPlay:We,blocking:ft,capture:null,charSet:null,checked:We,cite:null,className:ft,closedBy:null,colorSpace:null,cols:we,colSpan:we,command:null,commandFor:null,content:null,contentEditable:Rt,controls:We,controlsList:ft,coords:we|Yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:mf,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:ft,height:we,hidden:mf,high:we,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:ft,itemRef:ft,itemScope:We,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:we,pattern:null,ping:ft,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:ft,required:We,reversed:We,rows:we,rowSpan:we,sandbox:ft,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Rt,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:Yi,part:ft,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:T1}),mN=Bs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Dn,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Yi,g2:Yi,glyphName:Yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:Dn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:we,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dn,rev:Dn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dn,requiredFeatures:Dn,requiredFonts:Dn,requiredFormats:Dn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:Dn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dn,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:y1}),b1=Bs({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()}}),x1=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:T1}),_1=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gN={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"},EN=/[A-Z]/g,w1=/-[a-z]/g,yN=/^data[-\w.:]+$/i;function tl(e,t){const n=ra(t);let r=t,s=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(w1,bN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!w1.test(a)){let u=a.replace(EN,TN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=yf}return new s(r,t)}function TN(e){return"-"+e.toLowerCase()}function bN(e){return e.charAt(1).toUpperCase()}const ia=m1([E1,pN,b1,x1,_1],"html"),ii=m1([E1,mN,b1,x1,_1],"svg");function S1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function v1(e){return e.join(" ").trim()}var Us={},Tf,A1;function xN(){if(A1)return Tf;A1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
24
- `,f="/",p="*",m="",b="comment",y="declaration";function x(v,w){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];w=w||{};var N=1,C=1;function j(ce){var se=ce.match(t);se&&(N+=se.length);var Ae=ce.lastIndexOf(d);C=~Ae?ce.length-Ae:C+ce.length}function X(){var ce={line:N,column:C};return function(se){return se.position=new L(ce),de(),se}}function L(ce){this.start=ce,this.end={line:N,column:C},this.source=w.source}L.prototype.content=v;function G(ce){var se=new Error(w.source+":"+N+":"+C+": "+ce);if(se.reason=ce,se.filename=w.source,se.line=N,se.column=C,se.source=v,!w.silent)throw se}function ne(ce){var se=ce.exec(v);if(se){var Ae=se[0];return j(Ae),v=v.slice(Ae.length),se}}function de(){ne(n)}function z(ce){var se;for(ce=ce||[];se=ae();)se!==!1&&ce.push(se);return ce}function ae(){var ce=X();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var se=2;m!=v.charAt(se)&&(p!=v.charAt(se)||f!=v.charAt(se+1));)++se;if(se+=2,m===v.charAt(se-1))return G("End of comment missing");var Ae=v.slice(2,se-2);return C+=2,j(Ae),v=v.slice(se),C+=2,ce({type:b,comment:Ae})}}function oe(){var ce=X(),se=ne(r);if(se){if(ae(),!ne(s))return G("property missing ':'");var Ae=ne(a),re=ce({type:y,property:A(se[0].replace(e,m)),value:Ae?A(Ae[0].replace(e,m)):m});return ne(u),re}}function pe(){var ce=[];z(ce);for(var se;se=oe();)se!==!1&&(ce.push(se),z(ce));return ce}return de(),pe()}function A(v){return v?v.replace(c,m):m}return Tf=x,Tf}var k1;function _N(){if(k1)return Us;k1=1;var e=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0}),Us.default=n;const t=e(xN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Us}var sa={},N1;function wN(){if(N1)return sa;N1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return sa.camelCase=d,sa}var oa,C1;function SN(){if(C1)return oa;C1=1;var e=oa&&oa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(_N()),n=wN();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,oa=r,oa}var vN=SN();const AN=Je(vN),nl=O1("end"),br=O1("start");function O1(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 I1(e){const t=br(e),n=nl(e);if(t&&n)return{start:t,end:n}}function aa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?P1(e.position):"start"in e||"end"in e?P1(e):"line"in e||"column"in e?bf(e):""}function bf(e){return R1(e&&e.line)+":"+R1(e&&e.column)}function P1(e){return bf(e&&e.start)+"-"+bf(e&&e.end)}function R1(e){return e&&typeof e=="number"?e:1}class on extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=H({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const 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=s,this.line=c?c.line:void 0,this.name=aa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}on.prototype.file="",on.prototype.name="",on.prototype.reason="",on.prototype.message="",on.prototype.stack="",on.prototype.column=void 0,on.prototype.line=void 0,on.prototype.ancestors=void 0,on.prototype.cause=void 0,on.prototype.fatal=void 0,on.prototype.place=void 0,on.prototype.ruleId=void 0,on.prototype.source=void 0;const xf={}.hasOwnProperty,kN=new Map,NN=/[A-Z]/g,CN=new Set(["table","tbody","thead","tfoot","tr"]),ON=new Set(["td","th"]),L1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function IN(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=UN(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=BN(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ii:ia,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=D1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function D1(e,t,n){if(t.type==="element")return PN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return RN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return DN(e,t,n);if(t.type==="mdxjsEsm")return LN(e,t);if(t.type==="root")return MN(e,t,n);if(t.type==="text")return FN(e,t)}function PN(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=F1(e,t.tagName,!1),u=HN(e,t);let c=wf(e,t);return CN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!fN(d):!0})),M1(e,u,a,t),_f(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function RN(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)}ua(e,t.position)}function LN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ua(e,t.position)}function DN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:F1(e,t.name,!0),u=jN(e,t),c=wf(e,t);return M1(e,u,a,t),_f(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function MN(e,t,n){const r={};return _f(r,wf(e,t)),e.create(t,e.Fragment,r,n)}function FN(e,t){return t.value}function M1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _f(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function BN(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function UN(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=br(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function HN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&xf.call(t.properties,s)){const a=$N(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&ON.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 jN(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 ua(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else ua(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function wf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:kN;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=D1(e,a,u);c!==void 0&&n.push(c)}return n}function $N(e,t,n){const r=tl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?f1(n):v1(n)),r.property==="style"){let s=typeof n=="object"?n:zN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=VN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?gN[r.property]||r.property:r.attribute,n]}}function zN(e,t){try{return AN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new on("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=L1+"#cannot-parse-style-attribute",s}}function F1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=h1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=h1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return xf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ua(e)}function ua(e,t){const n=new on("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=L1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function VN(e){const t={};let n;for(n in e)xf.call(e,n)&&(t[qN(n)]=e[n]);return t}function qN(e){let t=e.replace(NN,YN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function YN(e){return"-"+e.toLowerCase()}const Sf={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"]},WN={};function vf(e,t){const n=WN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return B1(e,r,s)}function B1(e,t,n){if(GN(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 U1(e.children,t,n)}return Array.isArray(e)?U1(e,t,n):""}function U1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=B1(e[s],t,n);return r.join("")}function GN(e){return!!(e&&typeof e=="object")}const H1=document.createElement("i");function Af(e){const t="&"+e+";";H1.innerHTML=t;const n=H1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Mn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Vn(e,t){return e.length>0?(Mn(e,e.length,0,t),e):t}const j1={}.hasOwnProperty;function $1(e){const t={};let n=-1;for(;++n<e.length;)XN(t,e[n]);return t}function XN(e,t){let n;for(n in t){const s=(j1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){j1.call(s,u)||(s[u]=[]);const c=a[u];QN(s[u],Array.isArray(c)?c:c?[c]:[])}}}function QN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Mn(e,0,0,r)}function z1(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 sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mn=si(/[A-Za-z]/),an=si(/[\dA-Za-z]/),KN=si(/[#-'*+\--9=?A-Z^-~]/);function rl(e){return e!==null&&(e<32||e===127)}const kf=si(/\d/),JN=si(/[\dA-Fa-f]/),ZN=si(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const il=si(new RegExp("\\p{P}|\\p{S}","u")),Gi=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Hs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&an(e.charCodeAt(n+1))&&an(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function tt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const eC={tokenize:tC};function tC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),tt(e,t,"linePrefix")}function s(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 He(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const nC={tokenize:rC},V1={tokenize:iC};function rC(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const j=t.events.length;let X=j,L;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){L=t.events[X][1].end;break}w(r);let G=j;for(;G<t.events.length;)t.events[G][1].end=H({},L),G++;return Mn(t.events,X+1,0,t.events.slice(j)),t.events.length=G,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return x(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(V1,p,m)(C)}function p(C){return s&&N(),w(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(C)}function b(C){return t.containerState={},e.attempt(V1,y,x)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function x(C){if(C===null){s&&N(),w(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(C)}function A(C){if(C===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return He(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),A)}function v(C,j){const X=t.sliceStream(C);if(j&&X.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(X),t.parser.lazy[C.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<u&&(!s.events[L][1].end||s.events[L][1].end.offset>u))return;const G=t.events.length;let ne=G,de,z;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(de){z=t.events[ne][1].end;break}de=!0}for(w(r),L=G;L<t.events.length;)t.events[L][1].end=H({},z),L++;Mn(t.events,ne+1,0,t.events.slice(G)),t.events.length=L}}function w(C){let j=n.length;for(;j-- >C;){const X=n[j];t.containerState=X[1],X[0].exit.call(t,e)}n.length=C}function N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function iC(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function js(e){if(e===null||ht(e)||Gi(e))return 1;if(il(e))return 2}function sl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Nf={name:"attention",resolveAll:sC,tokenize:oC};function sC(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=H({},e[r][1].end),b=H({},e[n][1].start);q1(m,-d),q1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:H({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},c.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Vn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Vn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Vn(f,sl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Vn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Vn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Mn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function oC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=js(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 f=e.exit("attentionSequence"),p=js(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function q1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aC={name:"autolink",tokenize:uC};function uC(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return mn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||an(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||an(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||rl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):KN(y)?(e.consume(y),f):n(y)}function p(y){return an(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||an(y))&&r++<63){const x=y===45?b:m;return e.consume(y),x}return n(y)}}const la={partial:!0,tokenize:lC};function lC(e,t,n){return r;function r(a){return Ze(a)?tt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||He(a)?t(a):n(a)}}const Y1={continuation:{tokenize:dC},exit:fC,name:"blockQuote",tokenize:cC};function cC(e,t,n){const r=this;return s;function s(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 Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function dC(e,t,n){const r=this;return s;function s(u){return Ze(u)?tt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Y1,t,n)(u)}}function fC(e){e.exit("blockQuote")}const W1={name:"characterEscape",tokenize:hC};function hC(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return ZN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const G1={name:"characterReference",tokenize:pC};function pC(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=an,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=JN,p):(e.enter("characterReferenceValue"),a=7,u=kf,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===an&&!Af(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const X1={partial:!0,tokenize:gC},Q1={concrete:!0,name:"codeFenced",tokenize:mC};function mC(e,t,n){const r=this,s={partial:!0,tokenize:X};let a=0,u=0,c;return d;function d(L){return f(L)}function f(L){const G=r.events[r.events.length-1];return a=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,c=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===c?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),Ze(L)?tt(e,m,"whitespace")(L):m(L))}function m(L){return L===null||He(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(X1,A,j)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Ze(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,y,"whitespace")(L)):L===96&&L===c?n(L):(e.consume(L),b)}function y(L){return L===null||He(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(L))}function x(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===c?n(L):(e.consume(L),x)}function A(L){return e.attempt(s,j,v)(L)}function v(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w}function w(L){return a>0&&Ze(L)?tt(e,N,"linePrefix",a+1)(L):N(L)}function N(L){return L===null||He(L)?e.check(X1,A,j)(L):(e.enter("codeFlowValue"),C(L))}function C(L){return L===null||He(L)?(e.exit("codeFlowValue"),N(L)):(e.consume(L),C)}function j(L){return e.exit("codeFenced"),t(L)}function X(L,G,ne){let de=0;return z;function z(se){return L.enter("lineEnding"),L.consume(se),L.exit("lineEnding"),ae}function ae(se){return L.enter("codeFencedFence"),Ze(se)?tt(L,oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(se):oe(se)}function oe(se){return se===c?(L.enter("codeFencedFenceSequence"),pe(se)):ne(se)}function pe(se){return se===c?(de++,L.consume(se),pe):de>=u?(L.exit("codeFencedFenceSequence"),Ze(se)?tt(L,ce,"whitespace")(se):ce(se)):ne(se)}function ce(se){return se===null||He(se)?(L.exit("codeFencedFence"),G(se)):ne(se)}}}function gC(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Cf={name:"codeIndented",tokenize:yC},EC={partial:!0,tokenize:TC};function yC(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),tt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(EC,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function TC(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):tt(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):He(u)?s(u):n(u)}}const bC={name:"codeText",previous:_C,resolve:xC,tokenize:wC};function xC(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function _C(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wC(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class 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 s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&ca(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ca(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ca(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ca(this.left,n.reverse())}}}function ca(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function K1(e){const t={};let n=-1,r,s,a,u,c,d,f;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,vC(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=H({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Mn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function vC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,b=-1,y=n,x=0,A=0;const v=[A];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(A=b+1,v.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),b=v.length;b--;){const w=c.slice(v[b],v[b+1]),N=a.pop();d.push([N,N+w.length-1]),e.splice(N,2,w)}for(d.reverse(),b=-1;++b<d.length;)f[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return f}const AC={resolve:NC,tokenize:CC},kC={partial:!0,tokenize:OC};function NC(e){return K1(e),e}function CC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):He(c)?e.check(kC,u,a)(c):(e.consume(c),s)}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,s}}function OC(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),tt(e,a,"linePrefix")}function a(u){if(u===null||He(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 J1(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),b):w===null||w===32||w===41||rl(w)?n(w):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),A(w))}function b(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),b(w)):w===null||w===60||He(w)?n(w):(e.consume(w),w===92?x:y)}function x(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function A(w){return!p&&(w===null||w===41||ht(w))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,A):w===41?(e.consume(w),p--,A):w===null||w===32||w===40||rl(w)?n(w):(e.consume(w),w===92?v:A)}function v(w){return w===40||w===41||w===92?(e.consume(w),A):A(w)}}function Z1(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return 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(s),e.consume(y),e.exit(s),e.exit(r),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function eE(e,t,n,r,s,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):He(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),tt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||He(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function da(e,t){let n;return r;function r(s){return He(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?tt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const IC={name:"definition",tokenize:RC},PC={partial:!0,tokenize:LC};function RC(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return Z1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=sr(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 ht(y)?da(e,f)(y):f(y)}function f(y){return J1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(PC,m,m)(y)}function m(y){return Ze(y)?tt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function LC(e,t,n){return r;function r(c){return ht(c)?da(e,s)(c):n(c)}function s(c){return eE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?tt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||He(c)?t(c):n(c)}}const DC={name:"hardBreakEscape",tokenize:MC};function MC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const FC={name:"headingAtx",resolve:BC,tokenize:UC};function BC(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Mn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function UC(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ht(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):Ze(p)?tt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ht(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const HC=["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"],tE=["pre","script","style","textarea"],jC={concrete:!0,name:"htmlFlow",resolveTo:VC,tokenize:qC},$C={partial:!0,tokenize:WC},zC={partial:!0,tokenize:YC};function VC(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 qC(e,t,n){const r=this;let s,a,u,c,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),a=!0,A):P===63?(e.consume(P),s=3,r.interrupt?t:k):mn(P)?(e.consume(P),u=String.fromCharCode(P),v):n(P)}function b(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,c=0,x):mn(P)?(e.consume(P),s=4,r.interrupt?t:k):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:k):n(P)}function x(P){const ke="CDATA[";return P===ke.charCodeAt(c++)?(e.consume(P),c===ke.length?r.interrupt?t:oe:x):n(P)}function A(P){return mn(P)?(e.consume(P),u=String.fromCharCode(P),v):n(P)}function v(P){if(P===null||P===47||P===62||ht(P)){const ke=P===47,Ce=u.toLowerCase();return!ke&&!a&&tE.includes(Ce)?(s=1,r.interrupt?t(P):oe(P)):HC.includes(u.toLowerCase())?(s=6,ke?(e.consume(P),w):r.interrupt?t(P):oe(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?N(P):C(P))}return P===45||an(P)?(e.consume(P),u+=String.fromCharCode(P),v):n(P)}function w(P){return P===62?(e.consume(P),r.interrupt?t:oe):n(P)}function N(P){return Ze(P)?(e.consume(P),N):z(P)}function C(P){return P===47?(e.consume(P),z):P===58||P===95||mn(P)?(e.consume(P),j):Ze(P)?(e.consume(P),C):z(P)}function j(P){return P===45||P===46||P===58||P===95||an(P)?(e.consume(P),j):X(P)}function X(P){return P===61?(e.consume(P),L):Ze(P)?(e.consume(P),X):C(P)}function L(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,G):Ze(P)?(e.consume(P),L):ne(P)}function G(P){return P===d?(e.consume(P),d=null,de):P===null||He(P)?n(P):(e.consume(P),G)}function ne(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ht(P)?X(P):(e.consume(P),ne)}function de(P){return P===47||P===62||Ze(P)?C(P):n(P)}function z(P){return P===62?(e.consume(P),ae):n(P)}function ae(P){return P===null||He(P)?oe(P):Ze(P)?(e.consume(P),ae):n(P)}function oe(P){return P===45&&s===2?(e.consume(P),Ae):P===60&&s===1?(e.consume(P),re):P===62&&s===4?(e.consume(P),D):P===63&&s===3?(e.consume(P),k):P===93&&s===5?(e.consume(P),ie):He(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check($C,Z,pe)(P)):P===null||He(P)?(e.exit("htmlFlowData"),pe(P)):(e.consume(P),oe)}function pe(P){return e.check(zC,ce,Z)(P)}function ce(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),se}function se(P){return P===null||He(P)?pe(P):(e.enter("htmlFlowData"),oe(P))}function Ae(P){return P===45?(e.consume(P),k):oe(P)}function re(P){return P===47?(e.consume(P),u="",Y):oe(P)}function Y(P){if(P===62){const ke=u.toLowerCase();return tE.includes(ke)?(e.consume(P),D):oe(P)}return mn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),Y):oe(P)}function ie(P){return P===93?(e.consume(P),k):oe(P)}function k(P){return P===62?(e.consume(P),D):P===45&&s===2?(e.consume(P),k):oe(P)}function D(P){return P===null||He(P)?(e.exit("htmlFlowData"),Z(P)):(e.consume(P),D)}function Z(P){return e.exit("htmlFlow"),t(P)}}function YC(e,t,n){const r=this;return s;function s(u){return He(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 WC(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(la,t,n)}}const GC={name:"htmlText",tokenize:XC};function XC(e,t,n){const r=this;let s,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),X):k===63?(e.consume(k),C):mn(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,x):mn(k)?(e.consume(k),N):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),b):He(k)?(u=m,re(k)):(e.consume(k),m)}function b(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Ae(k):k===45?b(k):m(k)}function x(k){const D="CDATA[";return k===D.charCodeAt(a++)?(e.consume(k),a===D.length?A:x):n(k)}function A(k){return k===null?n(k):k===93?(e.consume(k),v):He(k)?(u=A,re(k)):(e.consume(k),A)}function v(k){return k===93?(e.consume(k),w):A(k)}function w(k){return k===62?Ae(k):k===93?(e.consume(k),w):A(k)}function N(k){return k===null||k===62?Ae(k):He(k)?(u=N,re(k)):(e.consume(k),N)}function C(k){return k===null?n(k):k===63?(e.consume(k),j):He(k)?(u=C,re(k)):(e.consume(k),C)}function j(k){return k===62?Ae(k):C(k)}function X(k){return mn(k)?(e.consume(k),L):n(k)}function L(k){return k===45||an(k)?(e.consume(k),L):G(k)}function G(k){return He(k)?(u=G,re(k)):Ze(k)?(e.consume(k),G):Ae(k)}function ne(k){return k===45||an(k)?(e.consume(k),ne):k===47||k===62||ht(k)?de(k):n(k)}function de(k){return k===47?(e.consume(k),Ae):k===58||k===95||mn(k)?(e.consume(k),z):He(k)?(u=de,re(k)):Ze(k)?(e.consume(k),de):Ae(k)}function z(k){return k===45||k===46||k===58||k===95||an(k)?(e.consume(k),z):ae(k)}function ae(k){return k===61?(e.consume(k),oe):He(k)?(u=ae,re(k)):Ze(k)?(e.consume(k),ae):de(k)}function oe(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,pe):He(k)?(u=oe,re(k)):Ze(k)?(e.consume(k),oe):(e.consume(k),ce)}function pe(k){return k===s?(e.consume(k),s=void 0,se):k===null?n(k):He(k)?(u=pe,re(k)):(e.consume(k),pe)}function ce(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ht(k)?de(k):(e.consume(k),ce)}function se(k){return k===47||k===62||ht(k)?de(k):n(k)}function Ae(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function re(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Y}function Y(k){return Ze(k)?tt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),u(k)}}const Of={name:"labelEnd",resolveAll:ZC,resolveTo:e3,tokenize:t3},QC={tokenize:n3},KC={tokenize:r3},JC={tokenize:i3};function ZC(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Mn(e,0,e.length,n),e}function e3(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},p={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=Vn(c,e.slice(a+1,a+r+3)),c=Vn(c,[["enter",p,t]]),c=Vn(c,sl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Vn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=Vn(c,e.slice(u+1)),c=Vn(c,[["exit",d,t]]),Mn(e,a,e.length,c),e}function t3(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(sr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(QC,p,u?p:m)(b):b===91?e.attempt(KC,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(JC,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function n3(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ht(m)?da(e,a)(m):a(m)}function a(m){return m===41?p(m):J1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?da(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?eE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?da(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function r3(e,t,n){const r=this;return s;function s(c){return Z1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function i3(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const s3={name:"labelStartImage",resolveAll:Of.resolveAll,tokenize:o3};function o3(e,t,n){const r=this;return s;function s(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 a3={name:"labelStartLink",resolveAll:Of.resolveAll,tokenize:u3};function u3(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const If={name:"lineEnding",tokenize:l3};function l3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const ol={name:"thematicBreak",tokenize:c3};function c3(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?tt(e,c,"whitespace")(f):c(f))}}const wn={continuation:{tokenize:p3},exit:g3,name:"list",tokenize:h3},d3={partial:!0,tokenize:E3},f3={partial:!0,tokenize:m3};function h3(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return 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:kf(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(ol,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return kf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(la,r.interrupt?n:p,e.attempt(d3,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function p3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(la,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(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(f3,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(wn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function m3(e,t,n){const r=this;return tt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function g3(e){e.exit(this.containerState.type)}function E3(e,t,n){const r=this;return tt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const nE={name:"setextUnderline",resolveTo:y3,tokenize:T3};function y3(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:H({},e[r][1].start),end:H({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function T3(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?tt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const b3={tokenize:x3};function x3(e){const t=this,n=e.attempt(la,r,e.attempt(this.parser.constructs.flowInitial,s,tt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(AC,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _3={resolveAll:iE()},w3=rE("string"),S3=rE("text");function rE(e){return{resolveAll:iE(e==="text"?v3:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(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 f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function iE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function v3(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={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:H({},r.end)};r.end=H({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const A3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:IC},disable:{null:[]},document:{42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:Y1},flow:{35:FC,42:ol,45:[nE,ol],60:jC,61:nE,95:ol,96:Q1,126:Q1},flowInitial:{[-2]:Cf,[-1]:Cf,32:Cf},insideSpan:{null:[Nf,_3]},string:{38:G1,92:W1},text:{[-5]:If,[-4]:If,[-3]:If,33:s3,38:G1,42:Nf,60:[aC,GC],91:a3,92:[DC,W1],93:Of,95:Nf,96:bC}},Symbol.toStringTag,{value:"Module"}));function k3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],c=[];const d={attempt:G(X),check:G(L),consume:N,enter:C,exit:j,interrupt:G(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ae){return u=Vn(u,ae),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=sl(a,f.events,f),f.events)}function b(ae,oe){return C3(y(ae),oe)}function y(ae){return N3(u,ae)}function x(){const{_bufferIndex:ae,_index:oe,line:pe,column:ce,offset:se}=r;return{_bufferIndex:ae,_index:oe,line:pe,column:ce,offset:se}}function A(ae){s[ae.line]=ae.column,z()}function v(){let ae;for(;r._index<u.length;){const oe=u[r._index];if(typeof oe=="string")for(ae=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ae&&r._bufferIndex<oe.length;)w(oe.charCodeAt(r._bufferIndex));else w(oe)}}function w(ae){p=p(ae)}function N(ae){He(ae)?(r.line++,r.column=1,r.offset+=ae===-3?2:1,z()):ae!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ae}function C(ae,oe){const pe=oe||{};return pe.type=ae,pe.start=x(),f.events.push(["enter",pe,f]),c.push(pe),pe}function j(ae){const oe=c.pop();return oe.end=x(),f.events.push(["exit",oe,f]),oe}function X(ae,oe){ne(ae,oe.from)}function L(ae,oe){oe.restore()}function G(ae,oe){return pe;function pe(ce,se,Ae){let re,Y,ie,k;return Array.isArray(ce)?Z(ce):"tokenize"in ce?Z([ce]):D(ce);function D(ge){return Le;function Le(Be){const Ge=Be!==null&&ge[Be],dt=Be!==null&&ge.null,Vt=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return Z(Vt)(Be)}}function Z(ge){return re=ge,Y=0,ge.length===0?Ae:P(ge[Y])}function P(ge){return Le;function Le(Be){return k=de(),ie=ge,ge.partial||(f.currentConstruct=ge),ge.name&&f.parser.constructs.disable.null.includes(ge.name)?Ce():ge.tokenize.call(oe?Object.assign(Object.create(f),oe):f,d,ke,Ce)(Be)}}function ke(ge){return ae(ie,k),se}function Ce(ge){return k.restore(),++Y<re.length?P(re[Y]):Ae}}}function ne(ae,oe){ae.resolveAll&&!a.includes(ae)&&a.push(ae),ae.resolve&&Mn(f.events,oe,f.events.length-oe,ae.resolve(f.events.slice(oe),f)),ae.resolveTo&&(f.events=ae.resolveTo(f.events,f))}function de(){const ae=x(),oe=f.previous,pe=f.currentConstruct,ce=f.events.length,se=Array.from(c);return{from:ce,restore:Ae};function Ae(){r=ae,f.previous=oe,f.currentConstruct=pe,f.events.length=ce,c=se,z()}}function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function N3(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function C3(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
23
+ `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Cm(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function Om(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var s7=typeof WeakMap=="function"?WeakMap:Map;function _w(i,o,c){c=ti(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Kc||(Kc=!0,qm=h),Om(i,o)},c}function ww(i,o,c){c=ti(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;c.payload=function(){return h(E)},c.callback=function(){Om(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(c.callback=function(){Om(i,o),typeof h!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),c}function Sw(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new s7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(c)||(E.add(c),i=T7.bind(null,i,o,c),o.then(i,i))}function vw(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function Aw(i,o,c,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=ti(-1,1),o.tag=2,Ii(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var o7=U.ReactCurrentOwner,Rn=!1;function bn(i,o,c,h){o.child=i===null?Y_(o,null,c,h):Lo(o,i.child,c,h)}function Nw(i,o,c,h,E){c=c.render;var T=o.ref;return Mo(o,E),h=xm(i,o,c,h,T,E),c=_m(),i!==null&&!Rn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ni(i,o,E)):(At&&c&&im(o),o.flags|=1,bn(i,o,h,E),o.child)}function kw(i,o,c,h,E){if(i===null){var T=c.type;return typeof T=="function"&&!Jm(T)&&T.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=T,Cw(i,o,T,h,E)):(i=rd(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var S=T.memoizedProps;if(c=c.compare,c=c!==null?c:tu,c(S,h)&&i.ref===o.ref)return ni(i,o,E)}return o.flags|=1,i=Fi(T,h),i.ref=o.ref,i.return=o,o.child=i}function Cw(i,o,c,h,E){if(i!==null){var T=i.memoizedProps;if(tu(T,h)&&i.ref===o.ref)if(Rn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Rn=!0);else return o.lanes=i.lanes,ni(i,o,E)}return Im(i,o,c,h,E)}function Ow(i,o,c){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Ho,qn),qn|=c;else{if((c&1073741824)===0)return i=T!==null?T.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,yt(Ho,qn),qn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:c,yt(Ho,qn),qn|=h}else T!==null?(h=T.baseLanes|c,o.memoizedState=null):h=c,yt(Ho,qn),qn|=h;return bn(i,o,E,c),o.child}function Iw(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Im(i,o,c,h,E){var T=Pn(c)?gs:fn.current;return T=Oo(o,T),Mo(o,E),c=xm(i,o,c,h,T,E),h=_m(),i!==null&&!Rn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,ni(i,o,E)):(At&&h&&im(o),o.flags|=1,bn(i,o,c,E),o.child)}function Pw(i,o,c,h,E){if(Pn(c)){var T=!0;kc(o)}else T=!1;if(Mo(o,E),o.stateNode===null)Yc(i,o),bw(o,c,h),km(o,c,h,E),h=!0;else if(i===null){var S=o.stateNode,B=o.memoizedProps;S.props=B;var $=S.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=Zn(Z):(Z=Pn(c)?gs:fn.current,Z=Oo(o,Z));var Ee=c.getDerivedStateFromProps,Te=typeof Ee=="function"||typeof S.getSnapshotBeforeUpdate=="function";Te||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(B!==h||$!==Z)&&xw(o,S,h,Z),Oi=!1;var pe=o.memoizedState;S.state=pe,Fc(o,h,S,E),$=o.memoizedState,B!==h||pe!==$||In.current||Oi?(typeof Ee=="function"&&(Nm(o,c,Ee,h),$=o.memoizedState),(B=Oi||Tw(o,c,B,h,pe,$,Z))?(Te||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),S.props=h,S.state=$,S.context=Z,h=B):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,G_(i,o),B=o.memoizedProps,Z=o.type===o.elementType?B:gr(o.type,B),S.props=Z,Te=o.pendingProps,pe=S.context,$=c.contextType,typeof $=="object"&&$!==null?$=Zn($):($=Pn(c)?gs:fn.current,$=Oo(o,$));var Oe=c.getDerivedStateFromProps;(Ee=typeof Oe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(B!==Te||pe!==$)&&xw(o,S,h,$),Oi=!1,pe=o.memoizedState,S.state=pe,Fc(o,h,S,E);var Pe=o.memoizedState;B!==Te||pe!==Pe||In.current||Oi?(typeof Oe=="function"&&(Nm(o,c,Oe,h),Pe=o.memoizedState),(Z=Oi||Tw(o,c,Z,h,pe,Pe,$)||!1)?(Ee||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Pe,$),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Pe,$)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Pe),S.props=h,S.state=Pe,S.context=$,h=Z):(typeof S.componentDidUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),h=!1)}return Pm(i,o,c,h,T,E)}function Pm(i,o,c,h,E,T){Iw(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&F_(o,c,!1),ni(i,o,T);h=o.stateNode,o7.current=o;var B=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=Lo(o,i.child,null,T),o.child=Lo(o,null,B,T)):bn(i,o,B,T),o.memoizedState=h.state,E&&F_(o,c,!0),o.child}function Rw(i){var o=i.stateNode;o.pendingContext?D_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&D_(i,o.context,!1),mm(i,o.containerInfo)}function Lw(i,o,c,h,E){return Ro(),um(E),o.flags|=256,bn(i,o,c,h),o.child}var Rm={dehydrated:null,treeContext:null,retryLane:0};function Lm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Dw(i,o,c){var h=o.pendingProps,E=Nt.current,T=!1,S=(o.flags&128)!==0,B;if((B=S)||(B=i!==null&&i.memoizedState===null?!1:(E&2)!==0),B?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),yt(Nt,E&1),i===null)return am(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(S=h.children,i=h.fallback,T?(h=o.mode,T=o.child,S={mode:"hidden",children:S},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=id(S,h,0,null),i=As(i,h,c,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Lm(c),o.memoizedState=Rm,i):Dm(o,S));if(E=i.memoizedState,E!==null&&(B=E.dehydrated,B!==null))return a7(i,o,S,h,B,E,c);if(T){T=h.fallback,S=o.mode,E=i.child,B=E.sibling;var $={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=Fi(E,$),h.subtreeFlags=E.subtreeFlags&14680064),B!==null?T=Fi(B,T):(T=As(T,S,c,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,S=i.child.memoizedState,S=S===null?Lm(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~c,o.memoizedState=Rm,h}return T=i.child,i=T.sibling,h=Fi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=h,o.memoizedState=null,h}function Dm(i,o){return o=id({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function qc(i,o,c,h){return h!==null&&um(h),Lo(o,i.child,null,c),i=Dm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function a7(i,o,c,h,E,T,S){if(c)return o.flags&256?(o.flags&=-257,h=Cm(Error(n(422))),qc(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=id({mode:"visible",children:h.children},E,0,null),T=As(T,E,S,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Lo(o,i.child,null,S),o.child.memoizedState=Lm(S),o.memoizedState=Rm,T);if((o.mode&1)===0)return qc(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var B=h.dgst;return h=B,T=Error(n(419)),h=Cm(T,h,void 0),qc(i,o,S,h)}if(B=(S&i.childLanes)!==0,Rn||B){if(h=Qt,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ei(i,E),Tr(h,i,E,-1))}return Km(),h=Cm(Error(n(421))),qc(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=b7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Vn=Ai(E.nextSibling),zn=o,At=!0,mr=null,i!==null&&(Kn[Jn++]=Jr,Kn[Jn++]=Zr,Kn[Jn++]=Es,Jr=i.id,Zr=i.overflow,Es=o),o=Dm(o,h.children),o.flags|=4096,o)}function Mw(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),fm(i.return,o,c)}function Mm(i,o,c,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=c,T.tailMode=E)}function Fw(i,o,c){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(bn(i,o,h.children,c),h=Nt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Mw(i,c,o);else if(i.tag===19)Mw(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(yt(Nt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(c=o.child,E=null;c!==null;)i=c.alternate,i!==null&&Bc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Mm(o,!1,E,c,T);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Bc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Mm(o,!0,c,null,T);break;case"together":Mm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Yc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function ni(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),_s|=o.lanes,(c&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,c=Fi(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Fi(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function u7(i,o,c){switch(o.tag){case 3:Rw(o),Ro();break;case 5:K_(o);break;case 1:Pn(o.type)&&kc(o);break;case 4:mm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;yt(Lc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(yt(Nt,Nt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?Dw(i,o,c):(yt(Nt,Nt.current&1),i=ni(i,o,c),i!==null?i.sibling:null);yt(Nt,Nt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Fw(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),yt(Nt,Nt.current),h)break;return null;case 22:case 23:return o.lanes=0,Ow(i,o,c)}return ni(i,o,c)}var Bw,Fm,Uw,Hw;Bw=function(i,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Fm=function(){},Uw=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,bs(Fr.current);var T=null;switch(c){case"input":E=Tn(i,E),h=Tn(i,h),T=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),T=[];break;case"textarea":E=ae(i,E),h=ae(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=vc)}tn(c,h);var S;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var B=E[Z];for(S in B)B.hasOwnProperty(S)&&(c||(c={}),c[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in h){var $=h[Z];if(B=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&$!==B&&($!=null||B!=null))if(Z==="style")if(B){for(S in B)!B.hasOwnProperty(S)||$&&$.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in $)$.hasOwnProperty(S)&&B[S]!==$[S]&&(c||(c={}),c[S]=$[S])}else c||(T||(T=[]),T.push(Z,c)),c=$;else Z==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,B=B?B.__html:void 0,$!=null&&B!==$&&(T=T||[]).push(Z,$)):Z==="children"?typeof $!="string"&&typeof $!="number"||(T=T||[]).push(Z,""+$):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?($!=null&&Z==="onScroll"&&_t("scroll",i),T||B===$||(T=[])):(T=T||[]).push(Z,$))}c&&(T=T||[]).push("style",c);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},Hw=function(i,o,c,h){c!==h&&(o.flags|=4)};function gu(i,o){if(!At)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function pn(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(o)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,o}function l7(i,o,c){var h=o.pendingProps;switch(sm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pn(o),null;case 1:return Pn(o.type)&&Nc(),pn(o),null;case 3:return h=o.stateNode,Fo(),wt(In),wt(fn),ym(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Pc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,mr!==null&&(Gm(mr),mr=null))),Fm(i,o),pn(o),null;case 5:gm(o);var E=bs(du.current);if(c=o.type,i!==null&&o.stateNode!=null)Uw(i,o,c,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return pn(o),null}if(i=bs(Fr.current),Pc(o)){h=o.stateNode,c=o.type;var T=o.memoizedProps;switch(h[Mr]=o,h[ou]=T,i=(o.mode&1)!==0,c){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<ru.length;E++)_t(ru[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Lt(h,T),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},_t("invalid",h);break;case"textarea":ve(h,T),_t("invalid",h)}tn(c,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var B=T[S];S==="children"?typeof B=="string"?h.textContent!==B&&(T.suppressHydrationWarning!==!0&&Sc(h.textContent,B,i),E=["children",B]):typeof B=="number"&&h.textContent!==""+B&&(T.suppressHydrationWarning!==!0&&Sc(h.textContent,B,i),E=["children",""+B]):s.hasOwnProperty(S)&&B!=null&&S==="onScroll"&&_t("scroll",h)}switch(c){case"input":Ot(h),We(h,T,!0);break;case"textarea":Ot(h),dt(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=vc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(c,{is:h.is}):(i=S.createElement(c),c==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,c),i[Mr]=o,i[ou]=h,Bw(i,o,!1,!1),o.stateNode=i;e:{switch(S=Lr(c,h),c){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<ru.length;E++)_t(ru[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Lt(i,h),E=Tn(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),_t("invalid",i);break;case"textarea":ve(i,h),E=ae(i,h),_t("invalid",i);break;default:E=h}tn(c,E),B=E;for(T in B)if(B.hasOwnProperty(T)){var $=B[T];T==="style"?Ti(i,$):T==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Je(i,$)):T==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&st(i,$):typeof $=="number"&&st(i,""+$):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?$!=null&&T==="onScroll"&&_t("scroll",i):$!=null&&I(i,T,$,S))}switch(c){case"input":Ot(i),We(i,h,!1);break;case"textarea":Ot(i),dt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+je(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?Se(i,!!h.multiple,T,!1):h.defaultValue!=null&&Se(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=vc)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return pn(o),null;case 6:if(i&&o.stateNode!=null)Hw(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=bs(du.current),bs(Fr.current),Pc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Mr]=o,(T=h.nodeValue!==c)&&(i=zn,i!==null))switch(i.tag){case 3:Sc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Sc(h.nodeValue,c,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Mr]=o,o.stateNode=h}return pn(o),null;case 13:if(wt(Nt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Vn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)z_(),Ro(),o.flags|=98560,T=!1;else if(T=Pc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Mr]=o}else Ro(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;pn(o),T=!1}else mr!==null&&(Gm(mr),mr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(Nt.current&1)!==0?Vt===0&&(Vt=3):Km())),o.updateQueue!==null&&(o.flags|=4),pn(o),null);case 4:return Fo(),Fm(i,o),i===null&&iu(o.stateNode.containerInfo),pn(o),null;case 10:return dm(o.type._context),pn(o),null;case 17:return Pn(o.type)&&Nc(),pn(o),null;case 19:if(wt(Nt),T=o.memoizedState,T===null)return pn(o),null;if(h=(o.flags&128)!==0,S=T.rendering,S===null)if(h)gu(T,!1);else{if(Vt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Bc(i),S!==null){for(o.flags|=128,gu(T,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)T=c,i=h,T.flags&=14680066,S=T.alternate,S===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=S.childLanes,T.lanes=S.lanes,T.child=S.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,T.type=S.type,i=S.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return yt(Nt,Nt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Dt()>jo&&(o.flags|=128,h=!0,gu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Bc(S),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),gu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!S.alternate&&!At)return pn(o),null}else 2*Dt()-T.renderingStartTime>jo&&c!==1073741824&&(o.flags|=128,h=!0,gu(T,!1),o.lanes=4194304);T.isBackwards?(S.sibling=o.child,o.child=S):(c=T.last,c!==null?c.sibling=S:o.child=S,T.last=S)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Dt(),o.sibling=null,c=Nt.current,yt(Nt,h?c&1|2:c&1),o):(pn(o),null);case 22:case 23:return Qm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(qn&1073741824)!==0&&(pn(o),o.subtreeFlags&6&&(o.flags|=8192)):pn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function c7(i,o){switch(sm(o),o.tag){case 1:return Pn(o.type)&&Nc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Fo(),wt(In),wt(fn),ym(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return gm(o),null;case 13:if(wt(Nt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ro()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return wt(Nt),null;case 4:return Fo(),null;case 10:return dm(o.type._context),null;case 22:case 23:return Qm(),null;case 24:return null;default:return null}}var Wc=!1,mn=!1,d7=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Uo(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){It(i,o,h)}else c.current=null}function Bm(i,o,c){try{c()}catch(h){It(i,o,h)}}var jw=!1;function f7(i,o){if(Qp=hc,i=T_(),$p(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{c.nodeType,T.nodeType}catch(_e){c=null;break e}var S=0,B=-1,$=-1,Z=0,Ee=0,Te=i,pe=null;t:for(;;){for(var Oe;Te!==c||E!==0&&Te.nodeType!==3||(B=S+E),Te!==T||h!==0&&Te.nodeType!==3||($=S+h),Te.nodeType===3&&(S+=Te.nodeValue.length),(Oe=Te.firstChild)!==null;)pe=Te,Te=Oe;for(;;){if(Te===i)break t;if(pe===c&&++Z===E&&(B=S),pe===T&&++Ee===h&&($=S),(Oe=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=Oe}c=B===-1||$===-1?null:{start:B,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(Kp={focusedElem:i,selectionRange:c},hc=!1,Ie=o;Ie!==null;)if(o=Ie,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ie=i;else for(;Ie!==null;){o=Ie;try{var Pe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Re=Pe.memoizedProps,Mt=Pe.memoizedState,X=o.stateNode,q=X.getSnapshotBeforeUpdate(o.elementType===o.type?Re:gr(o.type,Re),Mt);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(_e){It(o,o.return,_e)}if(i=o.sibling,i!==null){i.return=o.return,Ie=i;break}Ie=o.return}return Pe=jw,jw=!1,Pe}function Eu(i,o,c){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Bm(o,c,T)}E=E.next}while(E!==h)}}function Gc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function Um(i){var o=i.ref;if(o!==null){var c=i.stateNode;i.tag,i=c,typeof o=="function"?o(i):o.current=i}}function $w(i){var o=i.alternate;o!==null&&(i.alternate=null,$w(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Mr],delete o[ou],delete o[tm],delete o[GB],delete o[XB])),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 zw(i){return i.tag===5||i.tag===3||i.tag===4}function Vw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||zw(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 Hm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=vc));else if(h!==4&&(i=i.child,i!==null))for(Hm(i,o,c),i=i.sibling;i!==null;)Hm(i,o,c),i=i.sibling}function jm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(jm(i,o,c),i=i.sibling;i!==null;)jm(i,o,c),i=i.sibling}var nn=null,Er=!1;function Pi(i,o,c){for(c=c.child;c!==null;)qw(i,o,c),c=c.sibling}function qw(i,o,c){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(ac,c)}catch(B){}switch(c.tag){case 5:mn||Uo(c,o);case 6:var h=nn,E=Er;nn=null,Pi(i,o,c),nn=h,Er=E,nn!==null&&(Er?(i=nn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):nn.removeChild(c.stateNode));break;case 18:nn!==null&&(Er?(i=nn,c=c.stateNode,i.nodeType===8?em(i.parentNode,c):i.nodeType===1&&em(i,c),Xa(i)):em(nn,c.stateNode));break;case 4:h=nn,E=Er,nn=c.stateNode.containerInfo,Er=!0,Pi(i,o,c),nn=h,Er=E;break;case 0:case 11:case 14:case 15:if(!mn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Bm(c,o,S),E=E.next}while(E!==h)}Pi(i,o,c);break;case 1:if(!mn&&(Uo(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(B){It(c,o,B)}Pi(i,o,c);break;case 21:Pi(i,o,c);break;case 22:c.mode&1?(mn=(h=mn)||c.memoizedState!==null,Pi(i,o,c),mn=h):Pi(i,o,c);break;default:Pi(i,o,c)}}function Yw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new d7),o.forEach(function(h){var E=x7.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function yr(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var T=i,S=o,B=S;e:for(;B!==null;){switch(B.tag){case 5:nn=B.stateNode,Er=!1;break e;case 3:nn=B.stateNode.containerInfo,Er=!0;break e;case 4:nn=B.stateNode.containerInfo,Er=!0;break e}B=B.return}if(nn===null)throw Error(n(160));qw(T,S,E),nn=null,Er=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(Z){It(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Ww(o,i),o=o.sibling}function Ww(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(o,i),Ur(i),h&4){try{Eu(3,i,i.return),Gc(3,i)}catch(Re){It(i,i.return,Re)}try{Eu(5,i,i.return)}catch(Re){It(i,i.return,Re)}}break;case 1:yr(o,i),Ur(i),h&512&&c!==null&&Uo(c,c.return);break;case 5:if(yr(o,i),Ur(i),h&512&&c!==null&&Uo(c,c.return),i.flags&32){var E=i.stateNode;try{st(E,"")}catch(Re){It(i,i.return,Re)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=c!==null?c.memoizedProps:T,B=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{B==="input"&&T.type==="radio"&&T.name!=null&&Be(E,T),Lr(B,S);var Z=Lr(B,T);for(S=0;S<$.length;S+=2){var Ee=$[S],Te=$[S+1];Ee==="style"?Ti(E,Te):Ee==="dangerouslySetInnerHTML"?Je(E,Te):Ee==="children"?st(E,Te):I(E,Ee,Te,Z)}switch(B){case"input":ke(E,T);break;case"textarea":$e(E,T);break;case"select":var pe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Oe=T.value;Oe!=null?Se(E,!!T.multiple,Oe,!1):pe!==!!T.multiple&&(T.defaultValue!=null?Se(E,!!T.multiple,T.defaultValue,!0):Se(E,!!T.multiple,T.multiple?[]:"",!1))}E[ou]=T}catch(Re){It(i,i.return,Re)}}break;case 6:if(yr(o,i),Ur(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Re){It(i,i.return,Re)}}break;case 3:if(yr(o,i),Ur(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Xa(o.containerInfo)}catch(Re){It(i,i.return,Re)}break;case 4:yr(o,i),Ur(i);break;case 13:yr(o,i),Ur(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Vm=Dt())),h&4&&Yw(i);break;case 22:if(Ee=c!==null&&c.memoizedState!==null,i.mode&1?(mn=(Z=mn)||Ee,yr(o,i),mn=Z):yr(o,i),Ur(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!Ee&&(i.mode&1)!==0)for(Ie=i,Ee=i.child;Ee!==null;){for(Te=Ie=Ee;Ie!==null;){switch(pe=Ie,Oe=pe.child,pe.tag){case 0:case 11:case 14:case 15:Eu(4,pe,pe.return);break;case 1:Uo(pe,pe.return);var Pe=pe.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=pe,c=pe.return;try{o=h,Pe.props=o.memoizedProps,Pe.state=o.memoizedState,Pe.componentWillUnmount()}catch(Re){It(h,c,Re)}}break;case 5:Uo(pe,pe.return);break;case 22:if(pe.memoizedState!==null){Qw(Te);continue}}Oe!==null?(Oe.return=pe,Ie=Oe):Qw(Te)}Ee=Ee.sibling}e:for(Ee=null,Te=i;;){if(Te.tag===5){if(Ee===null){Ee=Te;try{E=Te.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(B=Te.stateNode,$=Te.memoizedProps.style,S=$!=null&&$.hasOwnProperty("display")?$.display:null,B.style.display=Qn("display",S))}catch(Re){It(i,i.return,Re)}}}else if(Te.tag===6){if(Ee===null)try{Te.stateNode.nodeValue=Z?"":Te.memoizedProps}catch(Re){It(i,i.return,Re)}}else if((Te.tag!==22&&Te.tag!==23||Te.memoizedState===null||Te===i)&&Te.child!==null){Te.child.return=Te,Te=Te.child;continue}if(Te===i)break e;for(;Te.sibling===null;){if(Te.return===null||Te.return===i)break e;Ee===Te&&(Ee=null),Te=Te.return}Ee===Te&&(Ee=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:yr(o,i),Ur(i),h&4&&Yw(i);break;case 21:break;default:yr(o,i),Ur(i)}}function Ur(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(zw(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(st(E,""),h.flags&=-33);var T=Vw(i);jm(i,T,E);break;case 3:case 4:var S=h.stateNode.containerInfo,B=Vw(i);Hm(i,B,S);break;default:throw Error(n(161))}}catch($){It(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function h7(i,o,c){Ie=i,Gw(i)}function Gw(i,o,c){for(var h=(i.mode&1)!==0;Ie!==null;){var E=Ie,T=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||Wc;if(!S){var B=E.alternate,$=B!==null&&B.memoizedState!==null||mn;B=Wc;var Z=mn;if(Wc=S,(mn=$)&&!Z)for(Ie=E;Ie!==null;)S=Ie,$=S.child,S.tag===22&&S.memoizedState!==null?Kw(E):$!==null?($.return=S,Ie=$):Kw(E);for(;T!==null;)Ie=T,Gw(T),T=T.sibling;Ie=E,Wc=B,mn=Z}Xw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ie=T):Xw(i)}}function Xw(i){for(;Ie!==null;){var o=Ie;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:mn||Gc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!mn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:gr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&Q_(o,T,h);break;case 3:var S=o.updateQueue;if(S!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Q_(o,S,c)}break;case 5:var B=o.stateNode;if(c===null&&o.flags&4){c=B;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var Ee=Z.memoizedState;if(Ee!==null){var Te=Ee.dehydrated;Te!==null&&Xa(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}mn||o.flags&512&&Um(o)}catch(pe){It(o,o.return,pe)}}if(o===i){Ie=null;break}if(c=o.sibling,c!==null){c.return=o.return,Ie=c;break}Ie=o.return}}function Qw(i){for(;Ie!==null;){var o=Ie;if(o===i){Ie=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Ie=c;break}Ie=o.return}}function Kw(i){for(;Ie!==null;){var o=Ie;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Gc(4,o)}catch($){It(o,c,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){It(o,E,$)}}var T=o.return;try{Um(o)}catch($){It(o,T,$)}break;case 5:var S=o.return;try{Um(o)}catch($){It(o,S,$)}}}catch($){It(o,o.return,$)}if(o===i){Ie=null;break}var B=o.sibling;if(B!==null){B.return=o.return,Ie=B;break}Ie=o.return}}var p7=Math.ceil,Xc=U.ReactCurrentDispatcher,$m=U.ReactCurrentOwner,tr=U.ReactCurrentBatchConfig,ot=0,Qt=null,Ht=null,rn=0,qn=0,Ho=Ni(0),Vt=0,yu=null,_s=0,Qc=0,zm=0,Tu=null,Ln=null,Vm=0,jo=1/0,ri=null,Kc=!1,qm=null,Ri=null,Jc=!1,Li=null,Zc=0,bu=0,Ym=null,ed=-1,td=0;function xn(){return(ot&6)!==0?Dt():ed!==-1?ed:ed=Dt()}function Di(i){return(i.mode&1)===0?1:(ot&2)!==0&&rn!==0?rn&-rn:KB.transition!==null?(td===0&&(td=Vx()),td):(i=ft,i!==0||(i=window.event,i=i===void 0?16:Zx(i.type)),i)}function Tr(i,o,c,h){if(50<bu)throw bu=0,Ym=null,Error(n(185));Va(i,c,h),((ot&2)===0||i!==Qt)&&(i===Qt&&((ot&2)===0&&(Qc|=c),Vt===4&&Mi(i,rn)),Dn(i,h),c===1&&ot===0&&(o.mode&1)===0&&(jo=Dt()+500,Cc&&Ci()))}function Dn(i,o){var c=i.callbackNode;KF(i,o);var h=cc(i,i===Qt?rn:0);if(h===0)c!==null&&jx(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&jx(c),o===1)i.tag===0?QB(Zw.bind(null,i)):B_(Zw.bind(null,i)),YB(function(){(ot&6)===0&&Ci()}),c=null;else{switch(qx(h)){case 1:c=vp;break;case 4:c=$x;break;case 16:c=oc;break;case 536870912:c=zx;break;default:c=oc}c=a2(c,Jw.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function Jw(i,o){if(ed=-1,td=0,(ot&6)!==0)throw Error(n(327));var c=i.callbackNode;if($o()&&i.callbackNode!==c)return null;var h=cc(i,i===Qt?rn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=nd(i,h);else{o=h;var E=ot;ot|=2;var T=t2();(Qt!==i||rn!==o)&&(ri=null,jo=Dt()+500,Ss(i,o));do try{E7();break}catch(B){e2(i,B)}while(!0);cm(),Xc.current=T,ot=E,Ht!==null?o=0:(Qt=null,rn=0,o=Vt)}if(o!==0){if(o===2&&(E=Ap(i),E!==0&&(h=E,o=Wm(i,E))),o===1)throw c=yu,Ss(i,0),Mi(i,h),Dn(i,Dt()),c;if(o===6)Mi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!m7(E)&&(o=nd(i,h),o===2&&(T=Ap(i),T!==0&&(h=T,o=Wm(i,T))),o===1))throw c=yu,Ss(i,0),Mi(i,h),Dn(i,Dt()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:vs(i,Ln,ri);break;case 3:if(Mi(i,h),(h&130023424)===h&&(o=Vm+500-Dt(),10<o)){if(cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){xn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Zp(vs.bind(null,i,Ln,ri),o);break}vs(i,Ln,ri);break;case 4:if(Mi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-hr(h);T=1<<S,S=o[S],S>E&&(E=S),h&=~T}if(h=E,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*p7(h/1960))-h,10<h){i.timeoutHandle=Zp(vs.bind(null,i,Ln,ri),h);break}vs(i,Ln,ri);break;case 5:vs(i,Ln,ri);break;default:throw Error(n(329))}}}return Dn(i,Dt()),i.callbackNode===c?Jw.bind(null,i):null}function Wm(i,o){var c=Tu;return i.current.memoizedState.isDehydrated&&(Ss(i,o).flags|=256),i=nd(i,o),i!==2&&(o=Ln,Ln=c,o!==null&&Gm(o)),i}function Gm(i){Ln===null?Ln=i:Ln.push.apply(Ln,i)}function m7(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],T=E.getSnapshot;E=E.value;try{if(!pr(T(),E))return!1}catch(S){return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Mi(i,o){for(o&=~zm,o&=~Qc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-hr(o),h=1<<c;i[c]=-1,o&=~h}}function Zw(i){if((ot&6)!==0)throw Error(n(327));$o();var o=cc(i,0);if((o&1)===0)return Dn(i,Dt()),null;var c=nd(i,o);if(i.tag!==0&&c===2){var h=Ap(i);h!==0&&(o=h,c=Wm(i,h))}if(c===1)throw c=yu,Ss(i,0),Mi(i,o),Dn(i,Dt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,vs(i,Ln,ri),Dn(i,Dt()),null}function Xm(i,o){var c=ot;ot|=1;try{return i(o)}finally{ot=c,ot===0&&(jo=Dt()+500,Cc&&Ci())}}function ws(i){Li!==null&&Li.tag===0&&(ot&6)===0&&$o();var o=ot;ot|=1;var c=tr.transition,h=ft;try{if(tr.transition=null,ft=1,i)return i()}finally{ft=h,tr.transition=c,ot=o,(ot&6)===0&&Ci()}}function Qm(){qn=Ho.current,wt(Ho)}function Ss(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,qB(c)),Ht!==null)for(c=Ht.return;c!==null;){var h=c;switch(sm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Nc();break;case 3:Fo(),wt(In),wt(fn),ym();break;case 5:gm(h);break;case 4:Fo();break;case 13:wt(Nt);break;case 19:wt(Nt);break;case 10:dm(h.type._context);break;case 22:case 23:Qm()}c=c.return}if(Qt=i,Ht=i=Fi(i.current,null),rn=qn=o,Vt=0,yu=null,zm=Qc=_s=0,Ln=Tu=null,Ts!==null){for(o=0;o<Ts.length;o++)if(c=Ts[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,T=c.pending;if(T!==null){var S=T.next;T.next=E,h.next=S}c.pending=h}Ts=null}return i}function e2(i,o){do{var c=Ht;try{if(cm(),Uc.current=zc,Hc){for(var h=kt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Hc=!1}if(xs=0,Xt=zt=kt=null,fu=!1,hu=0,$m.current=null,c===null||c.return===null){Vt=1,yu=o,Ht=null;break}e:{var T=i,S=c.return,B=c,$=o;if(o=rn,B.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var Z=$,Ee=B,Te=Ee.tag;if((Ee.mode&1)===0&&(Te===0||Te===11||Te===15)){var pe=Ee.alternate;pe?(Ee.updateQueue=pe.updateQueue,Ee.memoizedState=pe.memoizedState,Ee.lanes=pe.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Oe=vw(S);if(Oe!==null){Oe.flags&=-257,Aw(Oe,S,B,T,o),Oe.mode&1&&Sw(T,Z,o),o=Oe,$=Z;var Pe=o.updateQueue;if(Pe===null){var Re=new Set;Re.add($),o.updateQueue=Re}else Pe.add($);break e}else{if((o&1)===0){Sw(T,Z,o),Km();break e}$=Error(n(426))}}else if(At&&B.mode&1){var Mt=vw(S);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),Aw(Mt,S,B,T,o),um(Bo($,B));break e}}T=$=Bo($,B),Vt!==4&&(Vt=2),Tu===null?Tu=[T]:Tu.push(T),T=S;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var X=_w(T,$,o);X_(T,X);break e;case 1:B=$;var q=T.type,K=T.stateNode;if((T.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Ri===null||!Ri.has(K)))){T.flags|=65536,o&=-o,T.lanes|=o;var _e=ww(T,B,o);X_(T,_e);break e}}T=T.return}while(T!==null)}r2(c)}catch(De){o=De,Ht===c&&c!==null&&(Ht=c=c.return);continue}break}while(!0)}function t2(){var i=Xc.current;return Xc.current=zc,i===null?zc:i}function Km(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Qt===null||(_s&268435455)===0&&(Qc&268435455)===0||Mi(Qt,rn)}function nd(i,o){var c=ot;ot|=2;var h=t2();(Qt!==i||rn!==o)&&(ri=null,Ss(i,o));do try{g7();break}catch(E){e2(i,E)}while(!0);if(cm(),ot=c,Xc.current=h,Ht!==null)throw Error(n(261));return Qt=null,rn=0,Vt}function g7(){for(;Ht!==null;)n2(Ht)}function E7(){for(;Ht!==null&&!$F();)n2(Ht)}function n2(i){var o=o2(i.alternate,i,qn);i.memoizedProps=i.pendingProps,o===null?r2(i):Ht=o,$m.current=null}function r2(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=l7(c,o,qn),c!==null){Ht=c;return}}else{if(c=c7(c,o),c!==null){c.flags&=32767,Ht=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Vt=6,Ht=null;return}}if(o=o.sibling,o!==null){Ht=o;return}Ht=o=i}while(o!==null);Vt===0&&(Vt=5)}function vs(i,o,c){var h=ft,E=tr.transition;try{tr.transition=null,ft=1,y7(i,o,c,h)}finally{tr.transition=E,ft=h}return null}function y7(i,o,c,h){do $o();while(Li!==null);if((ot&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=c.lanes|c.childLanes;if(JF(i,T),i===Qt&&(Ht=Qt=null,rn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Jc||(Jc=!0,a2(oc,function(){return $o(),null})),T=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||T){T=tr.transition,tr.transition=null;var S=ft;ft=1;var B=ot;ot|=4,$m.current=null,f7(i,c),Ww(c,i),BB(Kp),hc=!!Qp,Kp=Qp=null,i.current=c,h7(c),zF(),ot=B,ft=S,tr.transition=T}else i.current=c;if(Jc&&(Jc=!1,Li=i,Zc=E),T=i.pendingLanes,T===0&&(Ri=null),YF(c.stateNode),Dn(i,Dt()),o!==null)for(h=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(Kc)throw Kc=!1,i=qm,qm=null,i;return(Zc&1)!==0&&i.tag!==0&&$o(),T=i.pendingLanes,(T&1)!==0?i===Ym?bu++:(bu=0,Ym=i):bu=0,Ci(),null}function $o(){if(Li!==null){var i=qx(Zc),o=tr.transition,c=ft;try{if(tr.transition=null,ft=16>i?16:i,Li===null)var h=!1;else{if(i=Li,Li=null,Zc=0,(ot&6)!==0)throw Error(n(331));var E=ot;for(ot|=4,Ie=i.current;Ie!==null;){var T=Ie,S=T.child;if((Ie.flags&16)!==0){var B=T.deletions;if(B!==null){for(var $=0;$<B.length;$++){var Z=B[$];for(Ie=Z;Ie!==null;){var Ee=Ie;switch(Ee.tag){case 0:case 11:case 15:Eu(8,Ee,T)}var Te=Ee.child;if(Te!==null)Te.return=Ee,Ie=Te;else for(;Ie!==null;){Ee=Ie;var pe=Ee.sibling,Oe=Ee.return;if($w(Ee),Ee===Z){Ie=null;break}if(pe!==null){pe.return=Oe,Ie=pe;break}Ie=Oe}}}var Pe=T.alternate;if(Pe!==null){var Re=Pe.child;if(Re!==null){Pe.child=null;do{var Mt=Re.sibling;Re.sibling=null,Re=Mt}while(Re!==null)}}Ie=T}}if((T.subtreeFlags&2064)!==0&&S!==null)S.return=T,Ie=S;else e:for(;Ie!==null;){if(T=Ie,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Eu(9,T,T.return)}var X=T.sibling;if(X!==null){X.return=T.return,Ie=X;break e}Ie=T.return}}var q=i.current;for(Ie=q;Ie!==null;){S=Ie;var K=S.child;if((S.subtreeFlags&2064)!==0&&K!==null)K.return=S,Ie=K;else e:for(S=q;Ie!==null;){if(B=Ie,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:Gc(9,B)}}catch(De){It(B,B.return,De)}if(B===S){Ie=null;break e}var _e=B.sibling;if(_e!==null){_e.return=B.return,Ie=_e;break e}Ie=B.return}}if(ot=E,Ci(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(ac,i)}catch(De){}h=!0}return h}finally{ft=c,tr.transition=o}}return!1}function i2(i,o,c){o=Bo(c,o),o=_w(i,o,1),i=Ii(i,o,1),o=xn(),i!==null&&(Va(i,1,o),Dn(i,o))}function It(i,o,c){if(i.tag===3)i2(i,i,c);else for(;o!==null;){if(o.tag===3){i2(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ri===null||!Ri.has(h))){i=Bo(c,i),i=ww(o,i,1),o=Ii(o,i,1),i=xn(),o!==null&&(Va(o,1,i),Dn(o,i));break}}o=o.return}}function T7(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=xn(),i.pingedLanes|=i.suspendedLanes&c,Qt===i&&(rn&c)===c&&(Vt===4||Vt===3&&(rn&130023424)===rn&&500>Dt()-Vm?Ss(i,0):zm|=c),Dn(i,o)}function s2(i,o){o===0&&((i.mode&1)===0?o=1:(o=lc,lc<<=1,(lc&130023424)===0&&(lc=4194304)));var c=xn();i=ei(i,o),i!==null&&(Va(i,o,c),Dn(i,c))}function b7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),s2(i,c)}function x7(i,o){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),s2(i,c)}var o2;o2=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||In.current)Rn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return Rn=!1,u7(i,o,c);Rn=(i.flags&131072)!==0}else Rn=!1,At&&(o.flags&1048576)!==0&&U_(o,Ic,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Yc(i,o),i=o.pendingProps;var E=Oo(o,fn.current);Mo(o,c),E=xm(null,o,h,i,E,c);var T=_m();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Pn(h)?(T=!0,kc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,pm(o),E.updater=Vc,o.stateNode=E,E._reactInternals=o,km(o,h,i,c),o=Pm(null,o,h,!0,T,c)):(o.tag=0,At&&T&&im(o),bn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(Yc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=w7(h),i=gr(h,i),E){case 0:o=Im(null,o,h,i,c);break e;case 1:o=Pw(null,o,h,i,c);break e;case 11:o=Nw(null,o,h,i,c);break e;case 14:o=kw(null,o,h,gr(h.type,i),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:gr(h,E),Im(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:gr(h,E),Pw(i,o,h,E,c);case 3:e:{if(Rw(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,G_(i,o),Fc(o,h,null,c);var S=o.memoizedState;if(h=S.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Bo(Error(n(423)),o),o=Lw(i,o,h,c,E);break e}else if(h!==E){E=Bo(Error(n(424)),o),o=Lw(i,o,h,c,E);break e}else for(Vn=Ai(o.stateNode.containerInfo.firstChild),zn=o,At=!0,mr=null,c=Y_(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ro(),h===E){o=ni(i,o,c);break e}bn(i,o,h,c)}o=o.child}return o;case 5:return K_(o),i===null&&am(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Jp(h,E)?S=null:T!==null&&Jp(h,T)&&(o.flags|=32),Iw(i,o),bn(i,o,S,c),o.child;case 6:return i===null&&am(o),null;case 13:return Dw(i,o,c);case 4:return mm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Lo(o,null,h,c):bn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:gr(h,E),Nw(i,o,h,E,c);case 7:return bn(i,o,o.pendingProps,c),o.child;case 8:return bn(i,o,o.pendingProps.children,c),o.child;case 12:return bn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,S=E.value,yt(Lc,h._currentValue),h._currentValue=S,T!==null)if(pr(T.value,S)){if(T.children===E.children&&!In.current){o=ni(i,o,c);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var B=T.dependencies;if(B!==null){S=T.child;for(var $=B.firstContext;$!==null;){if($.context===h){if(T.tag===1){$=ti(-1,c&-c),$.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var Ee=Z.pending;Ee===null?$.next=$:($.next=Ee.next,Ee.next=$),Z.pending=$}}T.lanes|=c,$=T.alternate,$!==null&&($.lanes|=c),fm(T.return,c,o),B.lanes|=c;break}$=$.next}}else if(T.tag===10)S=T.type===o.type?null:T.child;else if(T.tag===18){if(S=T.return,S===null)throw Error(n(341));S.lanes|=c,B=S.alternate,B!==null&&(B.lanes|=c),fm(S,c,o),S=T.sibling}else S=T.child;if(S!==null)S.return=T;else for(S=T;S!==null;){if(S===o){S=null;break}if(T=S.sibling,T!==null){T.return=S.return,S=T;break}S=S.return}T=S}bn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Mo(o,c),E=Zn(E),h=h(E),o.flags|=1,bn(i,o,h,c),o.child;case 14:return h=o.type,E=gr(h,o.pendingProps),E=gr(h.type,E),kw(i,o,h,E,c);case 15:return Cw(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:gr(h,E),Yc(i,o),o.tag=1,Pn(h)?(i=!0,kc(o)):i=!1,Mo(o,c),bw(o,h,E),km(o,h,E,c),Pm(null,o,h,!0,i,c);case 19:return Fw(i,o,c);case 22:return Ow(i,o,c)}throw Error(n(156,o.tag))};function a2(i,o){return Hx(i,o)}function _7(i,o,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,o,c,h){return new _7(i,o,c,h)}function Jm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function w7(i){if(typeof i=="function")return Jm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===te)return 11;if(i===de)return 14}return 2}function Fi(i,o){var c=i.alternate;return c===null?(c=nr(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function rd(i,o,c,h,E,T){var S=2;if(h=i,typeof i=="function")Jm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case V:return As(c.children,E,T,o);case ie:S=8,E|=8;break;case le:return i=nr(12,c,o,E|2),i.elementType=le,i.lanes=T,i;case fe:return i=nr(13,c,o,E),i.elementType=fe,i.lanes=T,i;case he:return i=nr(19,c,o,E),i.elementType=he,i.lanes=T,i;case ce:return id(c,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:S=10;break e;case oe:S=9;break e;case te:S=11;break e;case de:S=14;break e;case we:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=nr(S,c,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function As(i,o,c,h){return i=nr(7,i,h,o),i.lanes=c,i}function id(i,o,c,h){return i=nr(22,i,h,o),i.elementType=ce,i.lanes=c,i.stateNode={isHidden:!1},i}function Zm(i,o,c){return i=nr(6,i,null,o),i.lanes=c,i}function e0(i,o,c){return o=nr(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function S7(i,o,c,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Np(0),this.expirationTimes=Np(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Np(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function t0(i,o,c,h,E,T,S,B,$){return i=new S7(i,o,c,B,$),o===1?(o=1,T===!0&&(o|=8)):o=0,T=nr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},pm(T),i}function v7(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function u2(i){if(!i)return ki;i=i._reactInternals;e:{if(ps(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Pn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Pn(c))return M_(i,c,o)}return o}function l2(i,o,c,h,E,T,S,B,$){return i=t0(c,h,!0,i,E,T,S,B,$),i.context=u2(null),c=i.current,h=xn(),E=Di(c),T=ti(h,E),T.callback=o!=null?o:null,Ii(c,T,E),i.current.lanes=E,Va(i,E,h),Dn(i,h),i}function sd(i,o,c,h){var E=o.current,T=xn(),S=Di(E);return c=u2(c),o.context===null?o.context=c:o.pendingContext=c,o=ti(T,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Ii(E,o,S),i!==null&&(Tr(i,E,S,T),Mc(i,E,S)),S}function od(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function c2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function n0(i,o){c2(i,o),(i=i.alternate)&&c2(i,o)}function A7(){return null}var d2=typeof reportError=="function"?reportError:function(i){console.error(i)};function r0(i){this._internalRoot=i}ad.prototype.render=r0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));sd(i,o,null,null)},ad.prototype.unmount=r0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;ws(function(){sd(null,i,null,null)}),o[Qr]=null}};function ad(i){this._internalRoot=i}ad.prototype.unstable_scheduleHydration=function(i){if(i){var o=Gx();i={blockedOn:null,target:i,priority:o};for(var c=0;c<wi.length&&o!==0&&o<wi[c].priority;c++);wi.splice(c,0,i),c===0&&Kx(i)}};function i0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ud(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function f2(){}function N7(i,o,c,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Z=od(S);T.call(Z)}}var S=l2(o,h,i,0,null,!1,!1,"",f2);return i._reactRootContainer=S,i[Qr]=S.current,iu(i.nodeType===8?i.parentNode:i),ws(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var B=h;h=function(){var Z=od($);B.call(Z)}}var $=t0(i,0,!1,null,null,!1,!1,"",f2);return i._reactRootContainer=$,i[Qr]=$.current,iu(i.nodeType===8?i.parentNode:i),ws(function(){sd(o,$,c,h)}),$}function ld(i,o,c,h,E){var T=c._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var B=E;E=function(){var $=od(S);B.call($)}}sd(o,S,i,E)}else S=N7(c,o,i,E,h);return od(S)}Yx=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=za(o.pendingLanes);c!==0&&(kp(o,c|1),Dn(o,Dt()),(ot&6)===0&&(jo=Dt()+500,Ci()))}break;case 13:ws(function(){var h=ei(i,1);if(h!==null){var E=xn();Tr(h,i,1,E)}}),n0(i,1)}},Cp=function(i){if(i.tag===13){var o=ei(i,134217728);if(o!==null){var c=xn();Tr(o,i,134217728,c)}n0(i,134217728)}},Wx=function(i){if(i.tag===13){var o=Di(i),c=ei(i,o);if(c!==null){var h=xn();Tr(c,i,o,h)}n0(i,o)}},Gx=function(){return ft},Xx=function(i,o){var c=ft;try{return ft=i,o()}finally{ft=c}},xp=function(i,o,c){switch(o){case"input":if(ke(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==i&&h.form===i.form){var E=Ac(h);if(!E)throw Error(n(90));Ut(h),ke(h,E)}}}break;case"textarea":$e(i,c);break;case"select":o=c.value,o!=null&&Se(i,!!c.multiple,o,!1)}},Rx=Xm,Lx=ws;var k7={usingClientEntryPoint:!1,Events:[au,ko,Ac,Ix,Px,Xm]},xu={findFiberByHostInstance:ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},C7={bundleType:xu.bundleType,version:xu.version,rendererPackageName:xu.rendererPackageName,rendererConfig:xu.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=Bx(i),i===null?null:i.stateNode},findFiberByHostInstance:xu.findFiberByHostInstance||A7,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 cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cd.isDisabled&&cd.supportsFiber)try{ac=cd.inject(C7),Dr=cd}catch(i){}}return vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k7,vn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!i0(o))throw Error(n(200));return v7(i,o,null,c)},vn.createRoot=function(i,o){if(!i0(i))throw Error(n(299));var c=!1,h="",E=d2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=t0(i,1,!1,null,null,c,!1,h,E),i[Qr]=o.current,iu(i.nodeType===8?i.parentNode:i),new r0(o)},vn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Bx(o),i=i===null?null:i.stateNode,i},vn.flushSync=function(i){return ws(i)},vn.hydrate=function(i,o,c){if(!ud(o))throw Error(n(200));return ld(null,i,o,!0,c)},vn.hydrateRoot=function(i,o,c){if(!i0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,T="",S=d2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(T=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),o=l2(o,null,i,1,c!=null?c:null,E,!1,T,S),i[Qr]=o.current,iu(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new ad(o)},vn.render=function(i,o,c){if(!ud(o))throw Error(n(200));return ld(null,i,o,!1,c)},vn.unmountComponentAtNode=function(i){if(!ud(i))throw Error(n(40));return i._reactRootContainer?(ws(function(){ld(null,null,i,!1,function(){i._reactRootContainer=null,i[Qr]=null})}),!0):!1},vn.unstable_batchedUpdates=Xm,vn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!ud(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return ld(i,o,c,!1,h)},vn.version="18.3.1-next-f1338f8080-20240426",vn}var e1;function t1(){if(e1)return ff.exports;e1=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(),ff.exports=BN(),ff.exports}var Bs=t1();function n1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=n1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=n1(e))&&(r&&(r+=" "),r+=t);return r}var r1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i1=Hi.createContext&&Hi.createContext(r1),UN=["attr","size","title"];function HN(e,t){if(e==null)return{};var n=jN(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jN(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 Zu(){return Zu=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},Zu.apply(this,arguments)}function s1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function el(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s1(Object(n),!0).forEach(function(r){$N(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $N(e,t,n){return t=zN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zN(e){var t=VN(e,"string");return typeof t=="symbol"?t:t+""}function VN(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 o1(e){return e&&e.map((t,n)=>Hi.createElement(t.tag,el({key:n},t.attr),o1(t.child)))}function lt(e){return t=>Hi.createElement(qN,Zu({attr:el({},e.attr)},t),o1(e.child))}function qN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=HN(e,UN),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Hi.createElement("svg",Zu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:el(el({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Hi.createElement("title",null,a),e.children)};return i1!==void 0?Hi.createElement(i1.Consumer,null,n=>t(n)):t(r1)}function YN(e){return lt({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 WN(e){return lt({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 GN(e){return lt({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 ar=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:_.jsx("button",{className:F(e,`${C}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:F(`${C}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),XN="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",QN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ct(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(GN,{className:F(t,`${C}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||XN,alt:"Copilot",className:F(t,`${C}-minimized-icon-img`)});return _.jsx(ar,{className:F(t,`${C}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},KN=()=>{const{globalClassName:e,themeVariables:t}=ct(),n=()=>{Ou(!1),jr(!0)};return Bs.createPortal(_.jsx("div",{className:F(e,`${C}-minimized-container`),style:t,children:_.jsx(QN,{onClick:n})}),document.body)};function JN(e){return lt({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 an(){const e=D.useContext(Ng);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const ZN=e=>({[`${Mn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Mn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Mn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Mn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Mn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Mn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function ek(e){return lt({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 tk(e){return lt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function a1(e){return lt({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 nk(e){return lt({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 mf(e){return lt({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 rk(e){return lt({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 ik(e){return lt({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 sk(e){return lt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function u1(e){return lt({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 l1(e){return lt({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 ok(e){return lt({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 ak(e){return lt({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 uk(e){return lt({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 c1(e){return lt({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 tl=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>_.jsx("button",{className:F(`${C}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),lk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${C}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(mf,{size:"16px"})},ck=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(ar,{className:F(e,n,`cim-${r}-component`,`${C}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(mf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(tl,{className:F(e,n,`cim-${r}-component`,`${C}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(lk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function sU(){}function oU(){}function d1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function f1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const dk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hk={};function h1(e,t){return(hk.jsx?fk:dk).test(e)}const pk=/[ \t\n\f\r]/g;function mk(e){return typeof e=="object"?e.type==="text"?p1(e.value):!1:p1(e)}function p1(e){return e.replace(pk,"")===""}class ra{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ra.prototype.normal={},ra.prototype.property={},ra.prototype.space=void 0;function m1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ra(n,r,t)}function ia(e){return e.toLowerCase()}class An{constructor(t,n){this.attribute=n,this.property=t}}An.prototype.attribute="",An.prototype.booleanish=!1,An.prototype.boolean=!1,An.prototype.commaOrSpaceSeparated=!1,An.prototype.commaSeparated=!1,An.prototype.defined=!1,An.prototype.mustUseProperty=!1,An.prototype.number=!1,An.prototype.overloadedBoolean=!1,An.prototype.property="",An.prototype.spaceSeparated=!1,An.prototype.space=void 0;let gk=0;const Qe=Qi(),Bt=Qi(),gf=Qi(),be=Qi(),mt=Qi(),Xi=Qi(),Bn=Qi();function Qi(){return fd(2,++gk)}const Ef=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qe,booleanish:Bt,commaOrSpaceSeparated:Bn,commaSeparated:Xi,number:be,overloadedBoolean:gf,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),yf=Object.keys(Ef);class Tf extends An{constructor(t,n,r,s){let a=-1;if(super(t,n),g1(this,"space",s),typeof r=="number")for(;++a<yf.length;){const u=yf[a];g1(this,yf[a],(r&Ef[u])===Ef[u])}}}Tf.prototype.defined=!0;function g1(e,t,n){n&&(e[t]=n)}function Us(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Tf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ia(r)]=r,n[ia(a.attribute)]=r}return new ra(t,n,e.space)}const E1=Us({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:mt,ariaCurrent:null,ariaDescribedBy:mt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:mt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:mt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mt,ariaLevel:be,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:mt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:mt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Bt,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function y1(e,t){return t in e?e[t]:t}function T1(e,t){return y1(e,t.toLowerCase())}const Ek=Us({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xi,acceptCharset:mt,accessKey:mt,action:null,allow:null,allowFullScreen:Qe,allowPaymentRequest:Qe,allowUserMedia:Qe,alpha:Qe,alt:null,as:null,async:Qe,autoCapitalize:null,autoComplete:mt,autoFocus:Qe,autoPlay:Qe,blocking:mt,capture:null,charSet:null,checked:Qe,cite:null,className:mt,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:Bt,controls:Qe,controlsList:mt,coords:be|Xi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qe,defer:Qe,dir:null,dirName:null,disabled:Qe,download:gf,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qe,formTarget:null,headers:mt,height:be,hidden:gf,high:be,href:null,hrefLang:null,htmlFor:mt,httpEquiv:mt,id:null,imageSizes:null,imageSrcSet:null,inert:Qe,inputMode:null,integrity:null,is:null,isMap:Qe,itemId:null,itemProp:mt,itemRef:mt,itemScope:Qe,itemType:mt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qe,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Qe,muted:Qe,name:null,nonce:null,noModule:Qe,noValidate:Qe,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:Qe,optimum:be,pattern:null,ping:mt,placeholder:null,playsInline:Qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qe,referrerPolicy:null,rel:mt,required:Qe,reversed:Qe,rows:be,rowSpan:be,sandbox:mt,scope:null,scoped:Qe,seamless:Qe,selected:Qe,shadowRootClonable:Qe,shadowRootCustomElementRegistry:Qe,shadowRootDelegatesFocus:Qe,shadowRootMode:null,shadowRootSerializable:Qe,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Qe,useMap:null,value:Bt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qe,declare:Qe,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Qe,noHref:Qe,noShade:Qe,noWrap:Qe,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Qe,disablePictureInPicture:Qe,disableRemotePlayback:Qe,exportParts:Xi,part:mt,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:T1}),yk=Us({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Bn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:mt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Xi,g2:Xi,glyphName:Xi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bn,rev:Bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bn,requiredFeatures:Bn,requiredFonts:Bn,requiredFormats:Bn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:y1}),b1=Us({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()}}),x1=Us({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:T1}),_1=Us({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Tk={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"},bk=/[A-Z]/g,w1=/-[a-z]/g,xk=/^data[-\w.:]+$/i;function nl(e,t){const n=ia(t);let r=t,s=An;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&xk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(w1,wk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!w1.test(a)){let u=a.replace(bk,_k);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Tf}return new s(r,t)}function _k(e){return"-"+e.toLowerCase()}function wk(e){return e.charAt(1).toUpperCase()}const sa=m1([E1,Ek,b1,x1,_1],"html"),ui=m1([E1,yk,b1,x1,_1],"svg");function S1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function v1(e){return e.join(" ").trim()}var Hs={},bf,A1;function Sk(){if(A1)return bf;A1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
24
+ `,f="/",p="*",m="",x="comment",y="declaration";function b(A,w){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];w=w||{};var k=1,I=1;function U(he){var de=he.match(t);de&&(k+=de.length);var we=he.lastIndexOf(d);I=~we?he.length-we:I+he.length}function G(){var he={line:k,column:I};return function(de){return de.position=new L(he),le(),de}}function L(he){this.start=he,this.end={line:k,column:I},this.source=w.source}L.prototype.content=A;function V(he){var de=new Error(w.source+":"+k+":"+I+": "+he);if(de.reason=he,de.filename=w.source,de.line=k,de.column=I,de.source=A,!w.silent)throw de}function ie(he){var de=he.exec(A);if(de){var we=de[0];return U(we),A=A.slice(we.length),de}}function le(){ie(n)}function z(he){var de;for(he=he||[];de=oe();)de!==!1&&he.push(de);return he}function oe(){var he=G();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var de=2;m!=A.charAt(de)&&(p!=A.charAt(de)||f!=A.charAt(de+1));)++de;if(de+=2,m===A.charAt(de-1))return V("End of comment missing");var we=A.slice(2,de-2);return I+=2,U(we),A=A.slice(de),I+=2,he({type:x,comment:we})}}function te(){var he=G(),de=ie(r);if(de){if(oe(),!ie(s))return V("property missing ':'");var we=ie(a),ce=he({type:y,property:v(de[0].replace(e,m)),value:we?v(we[0].replace(e,m)):m});return ie(u),ce}}function fe(){var he=[];z(he);for(var de;de=te();)de!==!1&&(he.push(de),z(he));return he}return le(),fe()}function v(A){return A?A.replace(l,m):m}return bf=b,bf}var N1;function vk(){if(N1)return Hs;N1=1;var e=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=n;const t=e(Sk());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Hs}var oa={},k1;function Ak(){if(k1)return oa;k1=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return oa.camelCase=d,oa}var aa,C1;function Nk(){if(C1)return aa;C1=1;var e=aa&&aa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(vk()),n=Ak();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,aa=r,aa}var kk=Nk();const Ck=tt(kk),rl=O1("end"),wr=O1("start");function O1(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 I1(e){const t=wr(e),n=rl(e);if(t&&n)return{start:t,end:n}}function ua(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?P1(e.position):"start"in e||"end"in e?P1(e):"line"in e||"column"in e?xf(e):""}function xf(e){return R1(e&&e.line)+":"+R1(e&&e.column)}function P1(e){return xf(e&&e.start)+"-"+xf(e&&e.end)}function R1(e){return e&&typeof e=="number"?e:1}class un extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=j({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=ua(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}un.prototype.file="",un.prototype.name="",un.prototype.reason="",un.prototype.message="",un.prototype.stack="",un.prototype.column=void 0,un.prototype.line=void 0,un.prototype.ancestors=void 0,un.prototype.cause=void 0,un.prototype.fatal=void 0,un.prototype.place=void 0,un.prototype.ruleId=void 0,un.prototype.source=void 0;const _f={}.hasOwnProperty,Ok=new Map,Ik=/[A-Z]/g,Pk=new Set(["table","tbody","thead","tfoot","tr"]),Rk=new Set(["td","th"]),L1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Lk(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=$k(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=jk(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ui:sa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=D1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function D1(e,t,n){if(t.type==="element")return Dk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Mk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Bk(e,t,n);if(t.type==="mdxjsEsm")return Fk(e,t);if(t.type==="root")return Uk(e,t,n);if(t.type==="text")return Hk(e,t)}function Dk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ui,e.schema=s),e.ancestors.push(t);const a=F1(e,t.tagName,!1),u=zk(e,t);let l=Sf(e,t);return Pk.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!mk(d):!0})),M1(e,u,a,t),wf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Mk(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)}la(e,t.position)}function Fk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);la(e,t.position)}function Bk(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ui,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:F1(e,t.name,!0),u=Vk(e,t),l=Sf(e,t);return M1(e,u,a,t),wf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Uk(e,t,n){const r={};return wf(r,Sf(e,t)),e.create(t,e.Fragment,r,n)}function Hk(e,t){return t.value}function M1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jk(e,t,n){return r;function r(s,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function $k(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=wr(r);return t(s,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function zk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&_f.call(t.properties,s)){const a=qk(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&Rk.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Vk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else la(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else la(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Sf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Ok;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const l=D1(e,a,u);l!==void 0&&n.push(l)}return n}function qk(e,t,n){const r=nl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?f1(n):v1(n)),r.property==="style"){let s=typeof n=="object"?n:Yk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Wk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Tk[r.property]||r.property:r.attribute,n]}}function Yk(e,t){try{return Ck(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new un("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=L1+"#cannot-parse-style-attribute",s}}function F1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const l=h1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=h1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return _f.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);la(e)}function la(e,t){const n=new un("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=L1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wk(e){const t={};let n;for(n in e)_f.call(e,n)&&(t[Gk(n)]=e[n]);return t}function Gk(e){let t=e.replace(Ik,Xk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Xk(e){return"-"+e.toLowerCase()}const vf={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"]},Qk={};function Af(e,t){const n=Qk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return B1(e,r,s)}function B1(e,t,n){if(Kk(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 U1(e.children,t,n)}return Array.isArray(e)?U1(e,t,n):""}function U1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=B1(e[s],t,n);return r.join("")}function Kk(e){return!!(e&&typeof e=="object")}const H1=document.createElement("i");function Nf(e){const t="&"+e+";";H1.innerHTML=t;const n=H1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Un(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Wn(e,t){return e.length>0?(Un(e,e.length,0,t),e):t}const j1={}.hasOwnProperty;function $1(e){const t={};let n=-1;for(;++n<e.length;)Jk(t,e[n]);return t}function Jk(e,t){let n;for(n in t){const s=(j1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){j1.call(s,u)||(s[u]=[]);const l=a[u];Zk(s[u],Array.isArray(l)?l:l?[l]:[])}}}function Zk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Un(e,0,0,r)}function z1(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 ur(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const En=li(/[A-Za-z]/),ln=li(/[\dA-Za-z]/),eC=li(/[#-'*+\--9=?A-Z^-~]/);function il(e){return e!==null&&(e<32||e===127)}const kf=li(/\d/),tC=li(/[\dA-Fa-f]/),nC=li(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function nt(e){return e===-2||e===-1||e===32}const sl=li(new RegExp("\\p{P}|\\p{S}","u")),Ki=li(/\s/);function li(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function js(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&ln(e.charCodeAt(n+1))&&ln(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function it(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return nt(d)?(e.enter(n),l(d)):t(d)}function l(d){return nt(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const rC={tokenize:iC};function iC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),it(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return He(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const sC={tokenize:oC},V1={tokenize:aC};function oC(e){const t=this,n=[];let r=0,s,a,u;return l;function l(I){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const U=t.events.length;let G=U,L;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){L=t.events[G][1].end;break}w(r);let V=U;for(;V<t.events.length;)t.events[V][1].end=j({},L),V++;return Un(t.events,G+1,0,t.events.slice(U)),t.events.length=V,f(I)}return l(I)}function f(I){if(r===n.length){if(!s)return x(I);if(s.currentConstruct&&s.currentConstruct.concrete)return b(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(V1,p,m)(I)}function p(I){return s&&k(),w(r),x(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,b(I)}function x(I){return t.containerState={},e.attempt(V1,y,b)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),x(I)}function b(I){if(I===null){s&&k(),w(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),v(I)}function v(I){if(I===null){A(e.exit("chunkFlow"),!0),w(0),e.consume(I);return}return He(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),v)}function A(I,U){const G=t.sliceStream(I);if(U&&G.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(G),t.parser.lazy[I.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<u&&(!s.events[L][1].end||s.events[L][1].end.offset>u))return;const V=t.events.length;let ie=V,le,z;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(le){z=t.events[ie][1].end;break}le=!0}for(w(r),L=V;L<t.events.length;)t.events[L][1].end=j({},z),L++;Un(t.events,ie+1,0,t.events.slice(V)),t.events.length=L}}function w(I){let U=n.length;for(;U-- >I;){const G=n[U];t.containerState=G[1],G[0].exit.call(t,e)}n.length=I}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function aC(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $s(e){if(e===null||gt(e)||Ki(e))return 1;if(sl(e))return 2}function ol(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Cf={name:"attention",resolveAll:uC,tokenize:lC};function uC(e,t){let n=-1,r,s,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=j({},e[r][1].end),x=j({},e[n][1].start);q1(m,-d),q1(x,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:j({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:j({},e[n][1].start),end:x},a={type:d>1?"strongText":"emphasisText",start:j({},e[r][1].end),end:j({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:j({},u.start),end:j({},l.end)},e[r][1].end=j({},u.start),e[n][1].start=j({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Wn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Wn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Wn(f,ol(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Wn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=Wn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Un(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=$s(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=$s(d),m=!p||p===2&&s||n.includes(d),x=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!x)),f._close=!!(a===42?x:x&&(p||!m)),t(d)}}function q1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cC={name:"autolink",tokenize:dC};function dC(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return En(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||ln(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||ln(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||il(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):eC(y)?(e.consume(y),f):n(y)}function p(y){return ln(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):x(y)}function x(y){if((y===45||ln(y))&&r++<63){const b=y===45?x:m;return e.consume(y),b}return n(y)}}const ca={partial:!0,tokenize:fC};function fC(e,t,n){return r;function r(a){return nt(a)?it(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||He(a)?t(a):n(a)}}const Y1={continuation:{tokenize:pC},exit:mC,name:"blockQuote",tokenize:hC};function hC(e,t,n){const r=this;return s;function s(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return nt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function pC(e,t,n){const r=this;return s;function s(u){return nt(u)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Y1,t,n)(u)}}function mC(e){e.exit("blockQuote")}const W1={name:"characterEscape",tokenize:gC};function gC(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return nC(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const G1={name:"characterReference",tokenize:EC};function EC(e,t,n){const r=this;let s=0,a,u;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=ln,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=tC,p):(e.enter("characterReferenceValue"),a=7,u=kf,p(m))}function p(m){if(m===59&&s){const x=e.exit("characterReferenceValue");return u===ln&&!Nf(r.sliceSerialize(x))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const X1={partial:!0,tokenize:TC},Q1={concrete:!0,name:"codeFenced",tokenize:yC};function yC(e,t,n){const r=this,s={partial:!0,tokenize:G};let a=0,u=0,l;return d;function d(L){return f(L)}function f(L){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,l=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===l?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),nt(L)?it(e,m,"whitespace")(L):m(L))}function m(L){return L===null||He(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(X1,v,U)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(L))}function x(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):nt(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(L)):L===96&&L===l?n(L):(e.consume(L),x)}function y(L){return L===null||He(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===l?n(L):(e.consume(L),b)}function v(L){return e.attempt(s,U,A)(L)}function A(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w}function w(L){return a>0&&nt(L)?it(e,k,"linePrefix",a+1)(L):k(L)}function k(L){return L===null||He(L)?e.check(X1,v,U)(L):(e.enter("codeFlowValue"),I(L))}function I(L){return L===null||He(L)?(e.exit("codeFlowValue"),k(L)):(e.consume(L),I)}function U(L){return e.exit("codeFenced"),t(L)}function G(L,V,ie){let le=0;return z;function z(de){return L.enter("lineEnding"),L.consume(de),L.exit("lineEnding"),oe}function oe(de){return L.enter("codeFencedFence"),nt(de)?it(L,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(de):te(de)}function te(de){return de===l?(L.enter("codeFencedFenceSequence"),fe(de)):ie(de)}function fe(de){return de===l?(le++,L.consume(de),fe):le>=u?(L.exit("codeFencedFenceSequence"),nt(de)?it(L,he,"whitespace")(de):he(de)):ie(de)}function he(de){return de===null||He(de)?(L.exit("codeFencedFence"),V(de)):ie(de)}}}function TC(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Of={name:"codeIndented",tokenize:xC},bC={partial:!0,tokenize:_C};function xC(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),it(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):He(f)?e.attempt(bC,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function _C(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):it(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):He(u)?s(u):n(u)}}const wC={name:"codeText",previous:vC,resolve:SC,tokenize:AC};function SC(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function vC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function AC(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class NC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&da(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),da(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),da(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);da(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);da(this.left,n.reverse())}}}function da(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 K1(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new NC(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,kC(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=j({},p.get(s)[1].start),l=p.slice(s,n),l.unshift(r),p.splice(s,n-s+1,l))}}return Un(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function kC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,x=-1,y=n,b=0,v=0;const A=[v];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++x<l.length;)l[x][0]==="exit"&&l[x-1][0]==="enter"&&l[x][1].type===l[x-1][1].type&&l[x][1].start.line!==l[x][1].end.line&&(v=x+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(),x=A.length;x--;){const w=l.slice(A[x],A[x+1]),k=a.pop();d.push([k,k+w.length-1]),e.splice(k,2,w)}for(d.reverse(),x=-1;++x<d.length;)f[b+d[x][0]]=b+d[x][1],b+=d[x][1]-d[x][0]-1;return f}const CC={resolve:IC,tokenize:PC},OC={partial:!0,tokenize:RC};function IC(e){return K1(e),e}function PC(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):He(l)?e.check(OC,u,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function RC(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),it(e,a,"linePrefix")}function a(u){if(u===null||He(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function J1(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),x):w===null||w===32||w===41||il(w)?n(w):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(w))}function x(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(l),x(w)):w===null||w===60||He(w)?n(w):(e.consume(w),w===92?b:y)}function b(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function v(w){return!p&&(w===null||w===41||gt(w))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,v):w===41?(e.consume(w),p--,v):w===null||w===32||w===40||il(w)?n(w):(e.consume(w),w===92?A:v)}function A(w){return w===40||w===41||w===92?(e.consume(w),v):v(w)}}function Z1(e,t,n,r,s,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!nt(y)),y===92?x:m)}function x(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function eE(e,t,n,r,s,a){let u;return l;function l(x){return x===34||x===39||x===40?(e.enter(r),e.enter(s),e.consume(x),e.exit(s),u=x===40?41:x,d):n(x)}function d(x){return x===u?(e.enter(s),e.consume(x),e.exit(s),e.exit(r),t):(e.enter(a),f(x))}function f(x){return x===u?(e.exit(a),d(u)):x===null?n(x):He(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),it(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===u||x===null||He(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?m:p)}function m(x){return x===u||x===92?(e.consume(x),p):p(x)}}function fa(e,t){let n;return r;function r(s){return He(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):nt(s)?it(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const LC={name:"definition",tokenize:MC},DC={partial:!0,tokenize:FC};function MC(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return Z1.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=ur(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 gt(y)?fa(e,f)(y):f(y)}function f(y){return J1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(DC,m,m)(y)}function m(y){return nt(y)?it(e,x,"whitespace")(y):x(y)}function x(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function FC(e,t,n){return r;function r(l){return gt(l)?fa(e,s)(l):n(l)}function s(l){return eE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return nt(l)?it(e,u,"whitespace")(l):u(l)}function u(l){return l===null||He(l)?t(l):n(l)}}const BC={name:"hardBreakEscape",tokenize:UC};function UC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const HC={name:"headingAtx",resolve:jC,tokenize:$C};function jC(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Un(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function $C(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||gt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):nt(p)?it(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||gt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}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"],tE=["pre","script","style","textarea"],VC={concrete:!0,name:"htmlFlow",resolveTo:WC,tokenize:GC},qC={partial:!0,tokenize:QC},YC={partial:!0,tokenize:XC};function WC(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 GC(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),x):P===47?(e.consume(P),a=!0,v):P===63?(e.consume(P),s=3,r.interrupt?t:N):En(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function x(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,b):En(P)?(e.consume(P),s=4,r.interrupt?t:N):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:N):n(P)}function b(P){const Ae="CDATA[";return P===Ae.charCodeAt(l++)?(e.consume(P),l===Ae.length?r.interrupt?t:te:b):n(P)}function v(P){return En(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||gt(P)){const Ae=P===47,Ce=u.toLowerCase();return!Ae&&!a&&tE.includes(Ce)?(s=1,r.interrupt?t(P):te(P)):zC.includes(u.toLowerCase())?(s=6,Ae?(e.consume(P),w):r.interrupt?t(P):te(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?k(P):I(P))}return P===45||ln(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function w(P){return P===62?(e.consume(P),r.interrupt?t:te):n(P)}function k(P){return nt(P)?(e.consume(P),k):z(P)}function I(P){return P===47?(e.consume(P),z):P===58||P===95||En(P)?(e.consume(P),U):nt(P)?(e.consume(P),I):z(P)}function U(P){return P===45||P===46||P===58||P===95||ln(P)?(e.consume(P),U):G(P)}function G(P){return P===61?(e.consume(P),L):nt(P)?(e.consume(P),G):I(P)}function L(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,V):nt(P)?(e.consume(P),L):ie(P)}function V(P){return P===d?(e.consume(P),d=null,le):P===null||He(P)?n(P):(e.consume(P),V)}function ie(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||gt(P)?G(P):(e.consume(P),ie)}function le(P){return P===47||P===62||nt(P)?I(P):n(P)}function z(P){return P===62?(e.consume(P),oe):n(P)}function oe(P){return P===null||He(P)?te(P):nt(P)?(e.consume(P),oe):n(P)}function te(P){return P===45&&s===2?(e.consume(P),we):P===60&&s===1?(e.consume(P),ce):P===62&&s===4?(e.consume(P),M):P===63&&s===3?(e.consume(P),N):P===93&&s===5?(e.consume(P),re):He(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(qC,J,fe)(P)):P===null||He(P)?(e.exit("htmlFlowData"),fe(P)):(e.consume(P),te)}function fe(P){return e.check(YC,he,J)(P)}function he(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),de}function de(P){return P===null||He(P)?fe(P):(e.enter("htmlFlowData"),te(P))}function we(P){return P===45?(e.consume(P),N):te(P)}function ce(P){return P===47?(e.consume(P),u="",W):te(P)}function W(P){if(P===62){const Ae=u.toLowerCase();return tE.includes(Ae)?(e.consume(P),M):te(P)}return En(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),W):te(P)}function re(P){return P===93?(e.consume(P),N):te(P)}function N(P){return P===62?(e.consume(P),M):P===45&&s===2?(e.consume(P),N):te(P)}function M(P){return P===null||He(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),M)}function J(P){return e.exit("htmlFlow"),t(P)}}function XC(e,t,n){const r=this;return s;function s(u){return He(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 QC(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ca,t,n)}}const KC={name:"htmlText",tokenize:JC};function JC(e,t,n){const r=this;let s,a,u;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),G):N===63?(e.consume(N),I):En(N)?(e.consume(N),ie):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,b):En(N)?(e.consume(N),k):n(N)}function p(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),x):He(N)?(u=m,ce(N)):(e.consume(N),m)}function x(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?we(N):N===45?x(N):m(N)}function b(N){const M="CDATA[";return N===M.charCodeAt(a++)?(e.consume(N),a===M.length?v:b):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),A):He(N)?(u=v,ce(N)):(e.consume(N),v)}function A(N){return N===93?(e.consume(N),w):v(N)}function w(N){return N===62?we(N):N===93?(e.consume(N),w):v(N)}function k(N){return N===null||N===62?we(N):He(N)?(u=k,ce(N)):(e.consume(N),k)}function I(N){return N===null?n(N):N===63?(e.consume(N),U):He(N)?(u=I,ce(N)):(e.consume(N),I)}function U(N){return N===62?we(N):I(N)}function G(N){return En(N)?(e.consume(N),L):n(N)}function L(N){return N===45||ln(N)?(e.consume(N),L):V(N)}function V(N){return He(N)?(u=V,ce(N)):nt(N)?(e.consume(N),V):we(N)}function ie(N){return N===45||ln(N)?(e.consume(N),ie):N===47||N===62||gt(N)?le(N):n(N)}function le(N){return N===47?(e.consume(N),we):N===58||N===95||En(N)?(e.consume(N),z):He(N)?(u=le,ce(N)):nt(N)?(e.consume(N),le):we(N)}function z(N){return N===45||N===46||N===58||N===95||ln(N)?(e.consume(N),z):oe(N)}function oe(N){return N===61?(e.consume(N),te):He(N)?(u=oe,ce(N)):nt(N)?(e.consume(N),oe):le(N)}function te(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,fe):He(N)?(u=te,ce(N)):nt(N)?(e.consume(N),te):(e.consume(N),he)}function fe(N){return N===s?(e.consume(N),s=void 0,de):N===null?n(N):He(N)?(u=fe,ce(N)):(e.consume(N),fe)}function he(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||gt(N)?le(N):(e.consume(N),he)}function de(N){return N===47||N===62||gt(N)?le(N):n(N)}function we(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function ce(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),W}function W(N){return nt(N)?it(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):re(N)}function re(N){return e.enter("htmlTextData"),u(N)}}const If={name:"labelEnd",resolveAll:n3,resolveTo:r3,tokenize:i3},ZC={tokenize:s3},e3={tokenize:o3},t3={tokenize:a3};function n3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Un(e,0,e.length,n),e}function r3(e,t){let n=e.length,r=0,s,a,u,l;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:j({},e[a][1].start),end:j({},e[e.length-1][1].end)},f={type:"label",start:j({},e[a][1].start),end:j({},e[u][1].end)},p={type:"labelText",start:j({},e[a+r+2][1].end),end:j({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=Wn(l,e.slice(a+1,a+r+3)),l=Wn(l,[["enter",p,t]]),l=Wn(l,ol(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Wn(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=Wn(l,e.slice(u+1)),l=Wn(l,[["exit",d,t]]),Un(e,a,e.length,l),e}function i3(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return l;function l(x){return a?a._inactive?m(x):(u=r.parser.defined.includes(ur(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(ZC,p,u?p:m)(x):x===91?e.attempt(e3,p,u?f:m)(x):u?p(x):m(x)}function f(x){return e.attempt(t3,p,m)(x)}function p(x){return t(x)}function m(x){return a._balanced=!0,n(x)}}function s3(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return gt(m)?fa(e,a)(m):a(m)}function a(m){return m===41?p(m):J1(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return gt(m)?fa(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?eE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return gt(m)?fa(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function o3(e,t,n){const r=this;return s;function s(l){return Z1.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(ur(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function a3(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const u3={name:"labelStartImage",resolveAll:If.resolveAll,tokenize:l3};function l3(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const c3={name:"labelStartLink",resolveAll:If.resolveAll,tokenize:d3};function d3(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Pf={name:"lineEnding",tokenize:f3};function f3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const al={name:"thematicBreak",tokenize:h3};function h3(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,l(f)}function l(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),nt(f)?it(e,l,"whitespace")(f):l(f))}}const Nn={continuation:{tokenize:E3},exit:T3,name:"list",tokenize:g3},p3={partial:!0,tokenize:b3},m3={partial:!0,tokenize:y3};function g3(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return l;function l(y){const b=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:kf(y)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(al,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return kf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ca,r.interrupt?n:p,e.attempt(p3,x,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,x(y)}function m(y){return nt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),x):n(y)}function x(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function E3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ca,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!nt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(m3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function y3(e,t,n){const r=this;return it(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function T3(e){e.exit(this.containerState.type)}function b3(e,t,n){const r=this;return it(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!nt(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const nE={name:"setextUnderline",resolveTo:x3,tokenize:_3};function x3(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:j({},e[r][1].start),end:j({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=j({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function _3(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===s?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),nt(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const w3={tokenize:S3};function S3(e){const t=this,n=e.attempt(ca,r,e.attempt(this.parser.constructs.flowInitial,s,it(e,e.attempt(this.parser.constructs.flow,s,e.attempt(CC,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const v3={resolveAll:iE()},A3=rE("string"),N3=rE("text");function rE(e){return{resolveAll:iE(e==="text"?k3:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let x=-1;if(m)for(;++x<m.length;){const y=m[x];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function iE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function k3(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,l=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:j({},r.end)};r.end=j({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const C3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:LC},disable:{null:[]},document:{42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:Y1},flow:{35:HC,42:al,45:[nE,al],60:VC,61:nE,95:al,96:Q1,126:Q1},flowInitial:{[-2]:Of,[-1]:Of,32:Of},insideSpan:{null:[Cf,v3]},string:{38:G1,92:W1},text:{[-5]:Pf,[-4]:Pf,[-3]:Pf,33:u3,38:G1,42:Cf,60:[cC,KC],91:c3,92:[BC,W1],93:If,95:Cf,96:wC}},Symbol.toStringTag,{value:"Module"}));function O3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],l=[];const d={attempt:V(G),check:V(L),consume:k,enter:I,exit:U,interrupt:V(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:x,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(oe){return u=Wn(u,oe),A(),u[u.length-1]!==null?[]:(ie(t,0),f.events=ol(a,f.events,f),f.events)}function x(oe,te){return P3(y(oe),te)}function y(oe){return I3(u,oe)}function b(){const{_bufferIndex:oe,_index:te,line:fe,column:he,offset:de}=r;return{_bufferIndex:oe,_index:te,line:fe,column:he,offset:de}}function v(oe){s[oe.line]=oe.column,z()}function A(){let oe;for(;r._index<u.length;){const te=u[r._index];if(typeof te=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<te.length;)w(te.charCodeAt(r._bufferIndex));else w(te)}}function w(oe){p=p(oe)}function k(oe){He(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++)),f.previous=oe}function I(oe,te){const fe=te||{};return fe.type=oe,fe.start=b(),f.events.push(["enter",fe,f]),l.push(fe),fe}function U(oe){const te=l.pop();return te.end=b(),f.events.push(["exit",te,f]),te}function G(oe,te){ie(oe,te.from)}function L(oe,te){te.restore()}function V(oe,te){return fe;function fe(he,de,we){let ce,W,re,N;return Array.isArray(he)?J(he):"tokenize"in he?J([he]):M(he);function M(ge){return Le;function Le(je){const Ke=je!==null&&ge[je],pt=je!==null&&ge.null,Ot=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(pt)?pt:pt?[pt]:[]];return J(Ot)(je)}}function J(ge){return ce=ge,W=0,ge.length===0?we:P(ge[W])}function P(ge){return Le;function Le(je){return N=le(),re=ge,ge.partial||(f.currentConstruct=ge),ge.name&&f.parser.constructs.disable.null.includes(ge.name)?Ce():ge.tokenize.call(te?Object.assign(Object.create(f),te):f,d,Ae,Ce)(je)}}function Ae(ge){return oe(re,N),de}function Ce(ge){return N.restore(),++W<ce.length?P(ce[W]):we}}}function ie(oe,te){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&Un(f.events,te,f.events.length-te,oe.resolve(f.events.slice(te),f)),oe.resolveTo&&(f.events=oe.resolveTo(f.events,f))}function le(){const oe=b(),te=f.previous,fe=f.currentConstruct,he=f.events.length,de=Array.from(l);return{from:he,restore:we};function we(){r=oe,f.previous=te,f.currentConstruct=fe,f.events.length=he,l=de,z()}}function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function I3(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function P3(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
25
25
  `;break}case-3:{u=`\r
26
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function O3(e){const r={constructs:$1([A3,...(e||{}).extensions||[]]),content:s(eC),defined:[],document:s(nC),flow:s(b3),lazy:{},string:s(w3),text:s(S3)};return r;function s(a){return u;function u(c){return k3(r,a,c)}}}function I3(e){for(;!K1(e););return e}const sE=/[\0\t\n\r]/g;function P3(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(sE.lastIndex=m,f=sE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const R3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function L3(e){return e.replace(R3,D3)}function D3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return z1(n.slice(a?2:1),a?16:10)}return Af(n)||e}const oE={}.hasOwnProperty;function M3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),F3(n)(I3(O3(n).document().write(P3()(e,t,!0))))}function F3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_e),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(me),blockQuote:a(dt),characterEscape:de,characterReference:de,codeFenced:a(Vt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Vt,u),codeText:a(Lt,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(Qt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(kn),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(W,u),htmlFlowData:de,htmlText:a(W,u),htmlTextData:de,image:a(fe),label:u,link:a(_e),listItem:a(ut),listItemValue:b,listOrdered:a(Xe,m),listUnordered:a(Xe),paragraph:a(Kt),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(me),strong:a(cs),thematicBreak:a(rc)},exit:{atxHeading:d(),atxHeadingSequence:X,autolink:d(),autolinkEmail:Ge,autolinkProtocol:Be,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:ge,characterReference:Le,codeFenced:d(v),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:z,codeIndented:d(w),codeText:d(se),codeTextData:z,data:z,definition:d(),definitionDestinationString:j,definitionLabelString:N,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(oe),hardBreakTrailing:d(oe),htmlFlow:d(pe),htmlFlowData:z,htmlText:d(ce),htmlTextData:z,image:d(re),label:ie,labelText:Y,lineEnding:ae,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ke,resourceDestinationString:k,resourceTitleString:D,resource:Z,setextHeading:d(ne),setextHeadingLineSequence:G,setextHeadingText:L,strong:d(),thematicBreak:d()}};aE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let ve={type:"root",children:[]};const Ve={stack:[ve],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ke=[];let nt=-1;for(;++nt<ue.length;)if(ue[nt][1].type==="listOrdered"||ue[nt][1].type==="listUnordered")if(ue[nt][0]==="enter")Ke.push(nt);else{const Jt=Ke.pop();nt=s(ue,Jt,nt)}for(nt=-1;++nt<ue.length;){const Jt=t[ue[nt][0]];oE.call(Jt,ue[nt][1].type)&&Jt[ue[nt][1].type].call(Object.assign({sliceSerialize:ue[nt][2].sliceSerialize},Ve),ue[nt][1])}if(Ve.tokenStack.length>0){const Jt=Ve.tokenStack[Ve.tokenStack.length-1];(Jt[1]||uE).call(Ve,void 0,Jt[0])}for(ve.position={start:oi(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:oi(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)ve=t.transforms[nt](ve)||ve;return ve}function s(ue,ve,Ve){let Ke=ve-1,nt=-1,Jt=!1,Yr,Wn,mi,fs;for(;++Ke<=Ve;){const Zt=ue[Ke];switch(Zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zt[0]==="enter"?nt++:nt--,fs=void 0;break}case"lineEndingBlank":{Zt[0]==="enter"&&(Yr&&!fs&&!nt&&!mi&&(mi=Ke),fs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fs=void 0}if(!nt&&Zt[0]==="enter"&&Zt[1].type==="listItemPrefix"||nt===-1&&Zt[0]==="exit"&&(Zt[1].type==="listUnordered"||Zt[1].type==="listOrdered")){if(Yr){let Ir=Ke;for(Wn=void 0;Ir--;){const Bn=ue[Ir];if(Bn[1].type==="lineEnding"||Bn[1].type==="lineEndingBlank"){if(Bn[0]==="exit")continue;Wn&&(ue[Wn][1].type="lineEndingBlank",Jt=!0),Bn[1].type="lineEnding",Wn=Ir}else if(!(Bn[1].type==="linePrefix"||Bn[1].type==="blockQuotePrefix"||Bn[1].type==="blockQuotePrefixWhitespace"||Bn[1].type==="blockQuoteMarker"||Bn[1].type==="listItemIndent"))break}mi&&(!Wn||mi<Wn)&&(Yr._spread=!0),Yr.end=Object.assign({},Wn?ue[Wn][1].start:Zt[1].end),ue.splice(Wn||Ke,0,["exit",Yr,Zt[2]]),Ke++,Ve++}if(Zt[1].type==="listItemPrefix"){const Ir={type:"listItem",_spread:!1,start:Object.assign({},Zt[1].start),end:void 0};Yr=Ir,ue.splice(Ke,0,["enter",Ir,Zt[2]]),Ke++,Ve++,mi=void 0,fs=!0}}}return ue[ve][1]._spread=Jt,Ve}function a(ue,ve){return Ve;function Ve(Ke){c.call(this,ue(Ke),Ke),ve&&ve.call(this,Ke)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ue,ve,Ve){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([ve,Ve||void 0]),ue.position={start:oi(ve.start),end:void 0}}function d(ue){return ve;function ve(Ve){ue&&ue.call(this,Ve),f.call(this,Ve)}}function f(ue,ve){const Ve=this.stack.pop(),Ke=this.tokenStack.pop();if(Ke)Ke[0].type!==ue.type&&(ve?ve.call(this,ue,Ke[0]):(Ke[1]||uE).call(this,ue,Ke[0]));else throw new Error("Cannot close `"+ue.type+"` ("+aa({start:ue.start,end:ue.end})+"): it’s not open");Ve.position.end=oi(ue.end)}function p(){return vf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(ue){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ue}function x(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ue}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ue.replace(/(\r?\n|\r)$/g,"")}function N(ue){const ve=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=ve,Ve.identifier=sr(this.sliceSerialize(ue)).toLowerCase()}function C(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ue}function j(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ue}function X(ue){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Ve=this.sliceSerialize(ue).length;ve.depth=Ve}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function G(ue){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function de(ue){const Ve=this.stack[this.stack.length-1].children;let Ke=Ve[Ve.length-1];(!Ke||Ke.type!=="text")&&(Ke=ds(),Ke.position={start:oi(ue.start),end:void 0},Ve.push(Ke)),this.stack.push(Ke)}function z(ue){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ue),ve.position.end=oi(ue.end)}function ae(ue){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=ve.children[ve.children.length-1];Ve.position.end=oi(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ve.type)&&(de.call(this,ue),z.call(this,ue))}function oe(){this.data.atHardBreak=!0}function pe(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ue}function ce(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ue}function se(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ue}function Ae(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ve,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function re(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ve,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Y(ue){const ve=this.sliceSerialize(ue),Ve=this.stack[this.stack.length-2];Ve.label=L3(ve),Ve.identifier=sr(ve).toLowerCase()}function ie(){const ue=this.stack[this.stack.length-1],ve=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const Ke=ue.children;Ve.children=Ke}else Ve.alt=ve}function k(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ue}function D(){const ue=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ue}function Z(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ke(ue){const ve=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=ve,Ve.identifier=sr(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Ce(ue){this.data.characterReferenceType=ue.type}function ge(ue){const ve=this.sliceSerialize(ue),Ve=this.data.characterReferenceType;let Ke;Ve?(Ke=z1(ve,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ke=Af(ve);const nt=this.stack[this.stack.length-1];nt.value+=Ke}function Le(ue){const ve=this.stack.pop();ve.position.end=oi(ue.end)}function Be(ue){z.call(this,ue);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ue)}function Ge(ue){z.call(this,ue);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(ue)}function dt(){return{type:"blockquote",children:[]}}function Vt(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Qt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function kn(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function he(){return{type:"break"}}function W(){return{type:"html",value:""}}function fe(){return{type:"image",title:null,url:"",alt:null}}function _e(){return{type:"link",title:null,url:"",children:[]}}function Xe(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function ut(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Kt(){return{type:"paragraph",children:[]}}function cs(){return{type:"strong",children:[]}}function ds(){return{type:"text",value:""}}function rc(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function aE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?aE(e,r):B3(e,r)}}function B3(e,t){let n;for(n in t)if(oE.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 uE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+aa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is still open")}function U3(e){const t=this;t.parser=n;function n(r){return M3(r,le(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function H3(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function j3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
- `}]}function $3(e,t){const n=t.value?t.value+`
28
- `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function z3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function V3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Hs(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-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function Y3(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 W3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function lE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function G3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lE(e,t);const s={src:Hs(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function X3(e,t){const n={src:Hs(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 Q3(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 K3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lE(e,t);const s={href:Hs(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function J3(e,t){const n={href:Hs(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 Z3(e,t,n){const r=e.all(t),s=n?eO(n):cE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(s||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
26
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function R3(e){const r={constructs:$1([C3,...(e||{}).extensions||[]]),content:s(rC),defined:[],document:s(sC),flow:s(w3),lazy:{},string:s(A3),text:s(N3)};return r;function s(a){return u;function u(l){return O3(r,a,l)}}}function L3(e){for(;!K1(e););return e}const sE=/[\0\t\n\r]/g;function D3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,x,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(sE.lastIndex=m,f=sE.exec(a),x=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(x),!f){t=a.slice(m);break}if(y===10&&m===x&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<x&&(d.push(a.slice(m,x)),e+=x-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=x+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const M3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function F3(e){return e.replace(M3,B3)}function B3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return z1(n.slice(a?2:1),a?16:10)}return Nf(n)||e}const oE={}.hasOwnProperty;function U3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),H3(n)(L3(R3(n).document().write(D3()(e,t,!0))))}function H3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(et),autolinkProtocol:le,autolinkEmail:le,atxHeading:a(Lt),blockQuote:a(pt),characterEscape:le,characterReference:le,codeFenced:a(Ot),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Ot,u),codeText:a(Ut,u),codeTextData:le,data:le,codeFlowValue:le,definition:a(yn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Tn),hardBreakEscape:a(Be),hardBreakTrailing:a(Be),htmlFlow:a(ke,u),htmlFlowData:le,htmlText:a(ke,u),htmlTextData:le,image:a(We),label:u,link:a(et),listItem:a(Se),listItemValue:x,listOrdered:a(se,m),listUnordered:a(se),paragraph:a(ae),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Lt),strong:a(ve),thematicBreak:a(dt)},exit:{atxHeading:d(),atxHeadingSequence:G,autolink:d(),autolinkEmail:Ke,autolinkProtocol:je,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:ge,characterReference:Le,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:z,codeIndented:d(w),codeText:d(de),codeTextData:z,data:z,definition:d(),definitionDestinationString:U,definitionLabelString:k,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(fe),htmlFlowData:z,htmlText:d(he),htmlTextData:z,image:d(ce),label:re,labelText:W,lineEnding:oe,link:d(we),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Ae,resourceDestinationString:N,resourceTitleString:M,resource:J,setextHeading:d(ie),setextHeadingLineSequence:V,setextHeadingText:L,strong:d(),thematicBreak:d()}};aE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let xe={type:"root",children:[]};const qe={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Je=[];let st=-1;for(;++st<ee.length;)if(ee[st][1].type==="listOrdered"||ee[st][1].type==="listUnordered")if(ee[st][0]==="enter")Je.push(st);else{const en=Je.pop();st=s(ee,en,st)}for(st=-1;++st<ee.length;){const en=t[ee[st][0]];oE.call(en,ee[st][1].type)&&en[ee[st][1].type].call(Object.assign({sliceSerialize:ee[st][2].sliceSerialize},qe),ee[st][1])}if(qe.tokenStack.length>0){const en=qe.tokenStack[qe.tokenStack.length-1];(en[1]||uE).call(qe,void 0,en[0])}for(xe.position={start:ci(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:ci(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st<t.transforms.length;)xe=t.transforms[st](xe)||xe;return xe}function s(ee,xe,qe){let Je=xe-1,st=-1,en=!1,Xr,Qn,Ti,hs;for(;++Je<=qe;){const tn=ee[Je];switch(tn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tn[0]==="enter"?st++:st--,hs=void 0;break}case"lineEndingBlank":{tn[0]==="enter"&&(Xr&&!hs&&!st&&!Ti&&(Ti=Je),hs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hs=void 0}if(!st&&tn[0]==="enter"&&tn[1].type==="listItemPrefix"||st===-1&&tn[0]==="exit"&&(tn[1].type==="listUnordered"||tn[1].type==="listOrdered")){if(Xr){let Lr=Je;for(Qn=void 0;Lr--;){const jn=ee[Lr];if(jn[1].type==="lineEnding"||jn[1].type==="lineEndingBlank"){if(jn[0]==="exit")continue;Qn&&(ee[Qn][1].type="lineEndingBlank",en=!0),jn[1].type="lineEnding",Qn=Lr}else if(!(jn[1].type==="linePrefix"||jn[1].type==="blockQuotePrefix"||jn[1].type==="blockQuotePrefixWhitespace"||jn[1].type==="blockQuoteMarker"||jn[1].type==="listItemIndent"))break}Ti&&(!Qn||Ti<Qn)&&(Xr._spread=!0),Xr.end=Object.assign({},Qn?ee[Qn][1].start:tn[1].end),ee.splice(Qn||Je,0,["exit",Xr,tn[2]]),Je++,qe++}if(tn[1].type==="listItemPrefix"){const Lr={type:"listItem",_spread:!1,start:Object.assign({},tn[1].start),end:void 0};Xr=Lr,ee.splice(Je,0,["enter",Lr,tn[2]]),Je++,qe++,Ti=void 0,hs=!0}}}return ee[xe][1]._spread=en,qe}function a(ee,xe){return qe;function qe(Je){l.call(this,ee(Je),Je),xe&&xe.call(this,Je)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ee,xe,qe){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([xe,qe||void 0]),ee.position={start:ci(xe.start),end:void 0}}function d(ee){return xe;function xe(qe){ee&&ee.call(this,qe),f.call(this,qe)}}function f(ee,xe){const qe=this.stack.pop(),Je=this.tokenStack.pop();if(Je)Je[0].type!==ee.type&&(xe?xe.call(this,ee,Je[0]):(Je[1]||uE).call(this,ee,Je[0]));else throw new Error("Cannot close `"+ee.type+"` ("+ua({start:ee.start,end:ee.end})+"): it’s not open");qe.position.end=ci(ee.end)}function p(){return Af(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function x(ee){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ee}function b(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ee}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ee.replace(/(\r?\n|\r)$/g,"")}function k(ee){const xe=this.resume(),qe=this.stack[this.stack.length-1];qe.label=xe,qe.identifier=ur(this.sliceSerialize(ee)).toLowerCase()}function I(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ee}function U(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ee}function G(ee){const xe=this.stack[this.stack.length-1];if(!xe.depth){const qe=this.sliceSerialize(ee).length;xe.depth=qe}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function V(ee){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function le(ee){const qe=this.stack[this.stack.length-1].children;let Je=qe[qe.length-1];(!Je||Je.type!=="text")&&(Je=$e(),Je.position={start:ci(ee.start),end:void 0},qe.push(Je)),this.stack.push(Je)}function z(ee){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ee),xe.position.end=ci(ee.end)}function oe(ee){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=xe.children[xe.children.length-1];qe.position.end=ci(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(le.call(this,ee),z.call(this,ee))}function te(){this.data.atHardBreak=!0}function fe(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ee}function he(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ee}function de(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ee}function we(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=xe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function ce(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=xe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function W(ee){const xe=this.sliceSerialize(ee),qe=this.stack[this.stack.length-2];qe.label=F3(xe),qe.identifier=ur(xe).toLowerCase()}function re(){const ee=this.stack[this.stack.length-1],xe=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const Je=ee.children;qe.children=Je}else qe.alt=xe}function N(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ee}function M(){const ee=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ee}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Ae(ee){const xe=this.resume(),qe=this.stack[this.stack.length-1];qe.label=xe,qe.identifier=ur(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Ce(ee){this.data.characterReferenceType=ee.type}function ge(ee){const xe=this.sliceSerialize(ee),qe=this.data.characterReferenceType;let Je;qe?(Je=z1(xe,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=Nf(xe);const st=this.stack[this.stack.length-1];st.value+=Je}function Le(ee){const xe=this.stack.pop();xe.position.end=ci(ee.end)}function je(ee){z.call(this,ee);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ee)}function Ke(ee){z.call(this,ee);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ee)}function pt(){return{type:"blockquote",children:[]}}function Ot(){return{type:"code",lang:null,meta:null,value:""}}function Ut(){return{type:"inlineCode",value:""}}function yn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Tn(){return{type:"emphasis",children:[]}}function Lt(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function ke(){return{type:"html",value:""}}function We(){return{type:"image",title:null,url:"",alt:null}}function et(){return{type:"link",title:null,url:"",children:[]}}function se(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Se(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function ve(){return{type:"strong",children:[]}}function $e(){return{type:"text",value:""}}function dt(){return{type:"thematicBreak"}}}function ci(e){return{line:e.line,column:e.column,offset:e.offset}}function aE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?aE(e,r):j3(e,r)}}function j3(e,t){let n;for(n in t)if(oE.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 uE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ua({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is still open")}function $3(e){const t=this;t.parser=n;function n(r){return U3(r,ue(j(j({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function z3(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 V3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
+ `}]}function q3(e,t){const n=t.value?t.value+`
28
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Y3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function W3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function G3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=js(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function X3(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 Q3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function lE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function K3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lE(e,t);const s={src:js(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function J3(e,t){const n={src:js(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 Z3(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 eO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lE(e,t);const s={href:js(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function tO(e,t){const n={href:js(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 nO(e,t,n){const r=e.all(t),s=n?rO(n):cE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const p=r[l];(s||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
29
29
  `}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
30
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function eO(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=cE(n[r])}return t}function cE(e){const t=e.spread;return t==null?e.children.length>1:t}function tO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function nO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function iO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=br(t.children[1]),d=nl(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function oO(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 f=[];for(;++d<c;){const m=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let x={type:"element",tagName:a,properties:b,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function aO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const dE=9,fE=32;function uO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(hE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(hE(t.slice(s),s>0,!1)),a.join("")}function hE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===dE||a===fE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===dE||a===fE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function lO(e,t){const n={type:"text",value:uO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const dO={blockquote:H3,break:j3,code:$3,delete:z3,emphasis:V3,footnoteReference:q3,heading:Y3,html:W3,imageReference:G3,image:X3,inlineCode:Q3,linkReference:K3,link:J3,listItem:Z3,list:tO,paragraph:nO,root:rO,strong:iO,table:sO,tableCell:aO,tableRow:oO,text:lO,thematicBreak:cO,toml:al,yaml:al,definition:al,footnoteDefinition:al};function al(){}const pE=-1,ul=0,fa=1,ll=2,Pf=3,Rf=4,Lf=5,Df=6,mE=7,gE=8,EE=typeof self=="object"?self:globalThis,yE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new EE[e](t)},fO=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case ul:case pE:return n(u,s);case fa:{const c=n([],s);for(const d of u)c.push(r(d));return c}case ll:{const c=n({},s);for(const[d,f]of u)c[r(d)]=r(f);return c}case Pf:return n(new Date(u),s);case Rf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Lf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case Df:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case mE:{const{name:c,message:d}=u;return n(typeof EE[c]=="function"?yE(c,d):new Error(d),s)}case gE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(yE(a,u),s)};return r},TE=e=>fO(new Map,e)(0),Xi="",{toString:hO}={},{keys:pO}=Object,ha=e=>{const t=typeof e;if(t!=="object"||!e)return[ul,t];const n=hO.call(e).slice(8,-1);switch(n){case"Array":return[fa,Xi];case"Object":return[ll,Xi];case"Date":return[Pf,Xi];case"RegExp":return[Rf,Xi];case"Map":return[Lf,Xi];case"Set":return[Df,Xi];case"DataView":return[fa,n]}return n.includes("Array")?[fa,n]:e instanceof Error?[mE,e.name||"Error"]:[ll,n]},cl=([e,t])=>e===ul&&(t==="function"||t==="symbol"),mO=(e,t,n,r)=>{const s=(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]=ha(u);switch(c){case ul:{let p=u;switch(d){case"bigint":c=gE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([pE],u)}return s([c,p],u)}case fa:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],m=s([c,p],u);for(const b of u)p.push(a(b));return m}case ll:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([c,p],u);for(const b of pO(u))(e||!cl(ha(u[b])))&&p.push([a(b),a(u[b])]);return m}case Pf:return s([c,isNaN(u.getTime())?Xi:u.toISOString()],u);case Rf:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case Lf:{const p=[],m=s([c,p],u);for(const[b,y]of u)(e||!(cl(ha(b))||cl(ha(y))))&&p.push([a(b),a(y)]);return m}case Df:{const p=[],m=s([c,p],u);for(const b of u)(e||!cl(ha(b)))&&p.push(a(b));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},bE=(e,{json:t,lossy:n}={})=>{const r=[];return mO(!(t||n),!!t,new Map,r)(e),r},Qi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?TE(bE(e,t)):structuredClone(e):(e,t)=>TE(bE(e,t));function gO(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 EO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function yO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gO,r=e.options.footnoteBackLabel||EO,s=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 f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=Hs(m.toLowerCase());let y=0;const x=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++y<=A;){x.length>0&&x.push({type:"text",value:" "});let N=typeof n=="string"?n:n(d,y);typeof N=="string"&&(N={type:"text",value:N}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const N=v.children[v.children.length-1];N&&N.type==="text"?N.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else p.push(...x);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:le(H({},Qi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
31
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
32
- `}]}}const dl=(function(e){if(e==null)return _O;if(typeof e=="function")return fl(e);if(typeof e=="object")return Array.isArray(e)?TO(e):bO(e);if(typeof e=="string")return xO(e);throw new Error("Expected function, string, or object as test")});function TO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=dl(e[n]);return fl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function bO(e){const t=e;return fl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function xO(e){return fl(t);function t(n){return n&&n.type===e}}function fl(e){return t;function t(n,r,s){return!!(wO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function _O(){return!0}function wO(e){return e!==null&&typeof e=="object"&&"type"in e}function hU(e){return e}const xE=[],SO=!0,Mf=!1,vO="skip";function _E(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=dl(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=xE,x,A,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=AO(n(d,p)),y[0]===Mf))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==vO)for(A=(r?w.children.length:-1)+u,v=p.concat(w);A>-1&&A<w.children.length;){const N=w.children[A];if(x=c(N,A,v)(),x[0]===Mf)return x;A=typeof x[1]=="number"?x[1]:A+u}}return y}}}function AO(e){return Array.isArray(e)?e:typeof e=="number"?[SO,e]:e==null?xE:[e]}function hl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),_E(e,a,c,s);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Ff={}.hasOwnProperty,kO={};function NO(e,t){const n=t||kO,r=new Map,s=new Map,a=new Map,u=H(H({},dO),n.handlers),c={all:f,applyData:OO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:CO,wrap:PO};return hl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),c;function d(p,m){const b=p.type,y=c.handlers[b];if(Ff.call(c.handlers,b)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const A=p,{children:v}=A,w=yn(A,["children"]),N=Qi(w);return N.children=c.all(p),N}return Qi(p)}return(c.options.unknownHandler||IO)(c,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const x=c.one(b[y],p);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=wE(x.value)),!Array.isArray(x)&&x.type==="element")){const A=x.children[0];A&&A.type==="text"&&(A.value=wE(A.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function CO(e,t){e.position&&(t.position=I1(e))}function OO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Qi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function IO(e,t){const n=t.data||{},r="value"in t&&!(Ff.call(n,"hProperties")||Ff.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 PO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
30
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function rO(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=cE(n[r])}return t}function cE(e){const t=e.spread;return t==null?e.children.length>1:t}function iO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function sO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function aO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=wr(t.children[1]),d=rl(t.children[t.children.length-1]);l&&d&&(u.position={start:l,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function lO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],x={},y=u?u[d]:void 0;y&&(x.align=y);let b={type:"element",tagName:a,properties:x,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),f.push(b)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function cO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const dE=9,fE=32;function dO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(hE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(hE(t.slice(s),s>0,!1)),a.join("")}function hE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===dE||a===fE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===dE||a===fE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function fO(e,t){const n={type:"text",value:dO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function hO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pO={blockquote:z3,break:V3,code:q3,delete:Y3,emphasis:W3,footnoteReference:G3,heading:X3,html:Q3,imageReference:K3,image:J3,inlineCode:Z3,linkReference:eO,link:tO,listItem:nO,list:iO,paragraph:sO,root:oO,strong:aO,table:uO,tableCell:cO,tableRow:lO,text:fO,thematicBreak:hO,toml:ul,yaml:ul,definition:ul,footnoteDefinition:ul};function ul(){}const pE=-1,ll=0,ha=1,cl=2,Rf=3,Lf=4,Df=5,Mf=6,mE=7,gE=8,EE=typeof self=="object"?self:globalThis,yE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new EE[e](t)},mO=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case ll:case pE:return n(u,s);case ha:{const l=n([],s);for(const d of u)l.push(r(d));return l}case cl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case Rf:return n(new Date(u),s);case Lf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Df:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Mf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case mE:{const{name:l,message:d}=u;return n(typeof EE[l]=="function"?yE(l,d):new Error(d),s)}case gE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(yE(a,u),s)};return r},TE=e=>mO(new Map,e)(0),Ji="",{toString:gO}={},{keys:EO}=Object,pa=e=>{const t=typeof e;if(t!=="object"||!e)return[ll,t];const n=gO.call(e).slice(8,-1);switch(n){case"Array":return[ha,Ji];case"Object":return[cl,Ji];case"Date":return[Rf,Ji];case"RegExp":return[Lf,Ji];case"Map":return[Df,Ji];case"Set":return[Mf,Ji];case"DataView":return[ha,n]}return n.includes("Array")?[ha,n]:e instanceof Error?[mE,e.name||"Error"]:[cl,n]},dl=([e,t])=>e===ll&&(t==="function"||t==="symbol"),yO=(e,t,n,r)=>{const s=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=pa(u);switch(l){case ll:{let p=u;switch(d){case"bigint":l=gE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([pE],u)}return s([l,p],u)}case ha:{if(d){let x=u;return d==="DataView"?x=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(u)),s([d,[...x]],u)}const p=[],m=s([l,p],u);for(const x of u)p.push(a(x));return m}case cl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([l,p],u);for(const x of EO(u))(e||!dl(pa(u[x])))&&p.push([a(x),a(u[x])]);return m}case Rf:return s([l,isNaN(u.getTime())?Ji:u.toISOString()],u);case Lf:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case Df:{const p=[],m=s([l,p],u);for(const[x,y]of u)(e||!(dl(pa(x))||dl(pa(y))))&&p.push([a(x),a(y)]);return m}case Mf:{const p=[],m=s([l,p],u);for(const x of u)(e||!dl(pa(x)))&&p.push(a(x));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},bE=(e,{json:t,lossy:n}={})=>{const r=[];return yO(!(t||n),!!t,new Map,r)(e),r},Zi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?TE(bE(e,t)):structuredClone(e):(e,t)=>TE(bE(e,t));function TO(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 bO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function xO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||TO,r=e.options.footnoteBackLabel||bO,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),x=js(m.toLowerCase());let y=0;const b=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){b.length>0&&b.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(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(...b)}else p.push(...b);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(p,!0)};e.patch(f,w),l.push(w)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ue(j({},Zi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
31
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
32
+ `}]}}const fl=(function(e){if(e==null)return vO;if(typeof e=="function")return hl(e);if(typeof e=="object")return Array.isArray(e)?_O(e):wO(e);if(typeof e=="string")return SO(e);throw new Error("Expected function, string, or object as test")});function _O(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fl(e[n]);return hl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function wO(e){const t=e;return hl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function SO(e){return hl(t);function t(n){return n&&n.type===e}}function hl(e){return t;function t(n,r,s){return!!(AO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function vO(){return!0}function AO(e){return e!==null&&typeof e=="object"&&"type"in e}function gU(e){return e}const xE=[],NO=!0,Ff=!1,kO="skip";function _E(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=fl(s),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return x;function x(){let y=xE,b,v,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=CO(n(d,p)),y[0]===Ff))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==kO)for(v=(r?w.children.length:-1)+u,A=p.concat(w);v>-1&&v<w.children.length;){const k=w.children[v];if(b=l(k,v,A)(),b[0]===Ff)return b;v=typeof b[1]=="number"?b[1]:v+u}}return y}}}function CO(e){return Array.isArray(e)?e:typeof e=="number"?[NO,e]:e==null?xE:[e]}function pl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),_E(e,a,l,s);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Bf={}.hasOwnProperty,OO={};function IO(e,t){const n=t||OO,r=new Map,s=new Map,a=new Map,u=j(j({},pO),n.handlers),l={all:f,applyData:RO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:PO,wrap:DO};return pl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,x=String(p.identifier).toUpperCase();m.has(x)||m.set(x,p)}}),l;function d(p,m){const x=p.type,y=l.handlers[x];if(Bf.call(l.handlers,x)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(x)){if("children"in p){const v=p,{children:A}=v,w=_n(v,["children"]),k=Zi(w);return k.children=l.all(p),k}return Zi(p)}return(l.options.unknownHandler||LO)(l,p,m)}function f(p){const m=[];if("children"in p){const x=p.children;let y=-1;for(;++y<x.length;){const b=l.one(x[y],p);if(b){if(y&&x[y-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=wE(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=wE(v.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function PO(e,t){e.position&&(t.position=I1(e))}function RO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Zi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function LO(e,t){const n=t.data||{},r="value"in t&&!(Bf.call(n,"hProperties")||Bf.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 DO(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 wE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function SE(e,t){const n=NO(e,t),r=n.one(e,void 0),s=yO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
- `},s),a}function RO(e,t){return e&&"run"in e?function(n,r){return Ue(this,null,function*(){const s=SE(n,H({file:r},t));yield e.run(s,r)})}:function(n,r){return SE(n,H({file:r},e||t))}}function vE(e){if(e)throw e}var Bf,AE;function LO(){if(AE)return Bf;AE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Bf=function d(){var f,p,m,b,y,x,A=arguments[0],v=1,w=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});v<w;++v)if(f=arguments[v],f!=null)for(p in f)m=c(A,p),b=c(f,p),A!==b&&(N&&b&&(a(b)||(y=s(b)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(A,{name:p,newValue:d(N,x,b)})):typeof b!="undefined"&&u(A,{name:p,newValue:b}));return A},Bf}var DO=LO();const Uf=Je(DO);function Hf(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 MO(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?FO(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function FO(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const xr={basename:BO,dirname:UO,extname:HO,join:jO,sep:"/"};function BO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pa(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function UO(e){if(pa(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 HO(e){pa(e);let t=e.length,n=-1,r=0,s=-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?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function jO(...e){let t=-1,n;for(;++t<e.length;)pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$O(n)}function $O(e){pa(e);const t=e.codePointAt(0)===47;let n=zO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function zO(e,t){let n="",r=0,s=-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(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VO={cwd:qO};function qO(){return"/"}function jf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function YO(e){if(typeof e=="string")e=new URL(e);else if(!jf(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 WO(e)}function WO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const $f=["history","path","basename","stem","extname","dirname"];class kE{constructor(t){let n;t?jf(t)?n={path:t}:typeof t=="string"||GO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":VO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$f.length;){const a=$f[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)$f.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?xr.basename(this.path):void 0}set basename(t){Vf(t,"basename"),zf(t,"basename"),this.path=xr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xr.dirname(this.path):void 0}set dirname(t){NE(this.basename,"dirname"),this.path=xr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xr.extname(this.path):void 0}set extname(t){if(zf(t,"extname"),NE(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=xr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jf(t)&&(t=YO(t)),Vf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xr.basename(this.path,this.extname):void 0}set stem(t){Vf(t,"stem"),zf(t,"stem"),this.path=xr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new on(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zf(e,t){if(e&&e.includes(xr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xr.sep+"`")}function Vf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function NE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),QO={}.hasOwnProperty;class qf extends XO{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=MO()}copy(){const t=new qf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Uf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gf("data",this.frozen),this.namespace[t]=n,this):QO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=pl(t),r=this.parser||this.Parser;return Yf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Yf("process",this.parser||this.Parser),Wf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=pl(t),d=r.parse(c);r.run(d,c,function(p,m,b){if(p||!m||!b)return f(p);const y=m,x=r.stringify(y,b);ZO(x)?b.value=x:b.result=x,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Yf("processSync",this.parser||this.Parser),Wf("processSync",this.compiler||this.Compiler),this.process(t,s),OE("processSync","process",n),r;function s(a,u){n=!0,vE(a),r=u}}run(t,n,r){CE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=pl(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),OE("runSync","run",r),s;function a(u,c){vE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=pl(n),s=this.compiler||this.Compiler;return Wf("stringify",s),CE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Gf("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(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Uf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const A=r[b][1];Hf(A)&&Hf(y)&&(y=Uf(!0,A,y)),r[b]=[f,y,...x]}}}}const KO=new qf().freeze();function Yf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gf(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 CE(e){if(!Hf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function OE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pl(e){return JO(e)?e:new kE(e)}function JO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZO(e){return typeof e=="string"||eI(e)}function eI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",IE=[],PE={allowDangerousHtml:!0},nI=/^(https?|ircs?|mailto|xmpp)$/i,rI=[{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 RE(e){const t=iI(e),n=sI(e);return oI(t.runSync(t.parse(n),n),e)}function iI(e){const t=e.rehypePlugins||IE,n=e.remarkPlugins||IE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),PE):PE;return KO().use(U3).use(n).use(RO,r).use(t)}function sI(e){const t=e.children||"",n=new kE;return typeof t=="string"&&(n.value=t),n}function oI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||aI;for(const p of rI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+tI+p.id,void 0);return hl(e,f),IN(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Sf)if(Object.hasOwn(Sf,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],A=Sf[y];(A===null||A.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return c&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function aI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||nI.test(e.slice(0,t))?e:""}const LE=/[#.]/g;function uI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){LE.lastIndex=s;const c=LE.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function DE(e,t,n){const r=n?fI(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=uI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,lI(u))c.unshift(u);else for(const[m,b]of Object.entries(u))cI(e,d.properties,m,b)}for(const f of c)Xf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function lI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function cI(e,t,n,r){const s=tl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=S1(r):s.commaSeparated?a=d1(r):s.commaOrSpaceSeparated?a=S1(d1(r).join(" ")):a=ME(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?dI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ME(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function Xf(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)Xf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Xf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ME(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ra(n)===ra(t)))return!0}return n}function dI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function fI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const hI=["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"],pI=DE(ia,"div"),mI=DE(ii,"g",hI);function gI(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=FE(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 s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=FE(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function FE(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 Ki={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/"},BE={}.hasOwnProperty,EI=Object.prototype;function yI(e,t){const n=t||{};return Qf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ii:ia,verbose:n.verbose||!1},e)}function Qf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:UE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=gI(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"},ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ml(e,r,n),n}default:return n=TI(e,t),n}}function UE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Qf(e,t[n]);r.push(s)}return r}function TI(e,t){const n=e.schema;e.schema=t.namespaceURI===Ki.svg?ii:ia;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;BE.call(EI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?mI:pI)(t.tagName,s,UE(e,t.childNodes));if(ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&$s(d.startTag),p=d&&d.endTag&&$s(d.endTag),m=Qf(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=bI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function bI(e,t,n){const r=$s(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)BE.call(n.attrs,u)&&(a[tl(e.schema,u).property]=$s(n.attrs[u]));n.startTag;const c=$s(n.startTag),d=n.endTag?$s(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function $s(e){const t=HE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=HE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function HE(e){return e.line&&e.column?e:void 0}const jE={}.hasOwnProperty;function $E(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&jE.call(s,e)){const d=String(s[e]);u=jE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const xI={},_I={}.hasOwnProperty,zE=$E("type",{handlers:{root:SI,element:CI,text:kI,comment:NI,doctype:AI}});function wI(e,t){const r=(t||xI).space;return zE(e,r==="svg"?ii:ia)}function SI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Kf(e.children,n,t),zs(e,n),n}function vI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Kf(e.children,n,t),zs(e,n),n}function AI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return zs(e,t),t}function kI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return zs(e,t),t}function NI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return zs(e,t),t}function CI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ii);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&_I.call(e.properties,a)){const d=OI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Ki[u],childNodes:[],parentNode:null};return c.childNodes=Kf(e.children,c,r),zs(e,c),e.tagName==="template"&&e.content&&(c.content=vI(e.content,r)),c}function OI(e,t,n){const r=tl(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?f1(n):v1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=Ki[r.space]}return s}function Kf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=zE(e[r],n);a.parentNode=t,s.push(a)}return s}function zs(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 II=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],PI=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]),xt="�";var I;(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"})(I||(I={}));const Sn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function VE(e){return e>=55296&&e<=57343}function RI(e){return e>=56320&&e<=57343}function LI(e,t){return(e-55296)*1024+9216+t}function qE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function YE(e){return e>=64976&&e<=65007||PI.has(e)}var te;(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"})(te||(te={}));const DI=65536;class MI{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=DI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,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(RI(n))return this.pos++,this._addGap(),LI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(te.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,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,VE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){qE(t)?this._err(te.controlCharacterInInputStream):YE(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Qe;(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"})(Qe||(Qe={}));function WE(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 FI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),BI=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 UI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=BI.get(e))!==null&&t!==void 0?t:e}var Ht;(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"})(Ht||(Ht={}));const HI=32;var ai;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ai||(ai={}));function Jf(e){return e>=Ht.ZERO&&e<=Ht.NINE}function jI(e){return e>=Ht.UPPER_A&&e<=Ht.UPPER_F||e>=Ht.LOWER_A&&e<=Ht.LOWER_F}function $I(e){return e>=Ht.UPPER_A&&e<=Ht.UPPER_Z||e>=Ht.LOWER_A&&e<=Ht.LOWER_Z||Jf(e)}function zI(e){return e===Ht.EQUALS||$I(e)}var jt;(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"})(jt||(jt={}));var Ur;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ur||(Ur={}));class VI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=jt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ur.Strict}startEntity(t){this.decodeMode=t,this.state=jt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case jt.EntityStart:return t.charCodeAt(n)===Ht.NUM?(this.state=jt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=jt.NamedEntity,this.stateNamedEntity(t,n));case jt.NumericStart:return this.stateNumericStart(t,n);case jt.NumericDecimal:return this.stateNumericDecimal(t,n);case jt.NumericHex:return this.stateNumericHex(t,n);case jt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|HI)===Ht.LOWER_X?(this.state=jt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=jt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Jf(s)||jI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Jf(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ht.SEMI)this.consumed+=1;else if(this.decodeMode===Ur.Strict)return 0;return this.emitCodePoint(UI(this.result),this.consumed),this.errors&&(t!==Ht.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=qI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ur.Attribute&&(a===0||zI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14,a!==0){if(u===Ht.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ur.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&ai.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~ai.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case jt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ur.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case jt.NumericDecimal:return this.emitNumericEntity(0,2);case jt.NumericHex:return this.emitNumericEntity(0,3);case jt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case jt.EntityStart:return 0}}}function qI(e,t,n,r){const s=(t&ai.BRANCH_LENGTH)>>7,a=t&ai.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var ye;(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/"})(ye||(ye={}));var Ji;(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"})(Ji||(Ji={}));var qn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(qn||(qn={}));var K;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(K||(K={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const YI=new Map([[K.A,g.A],[K.ADDRESS,g.ADDRESS],[K.ANNOTATION_XML,g.ANNOTATION_XML],[K.APPLET,g.APPLET],[K.AREA,g.AREA],[K.ARTICLE,g.ARTICLE],[K.ASIDE,g.ASIDE],[K.B,g.B],[K.BASE,g.BASE],[K.BASEFONT,g.BASEFONT],[K.BGSOUND,g.BGSOUND],[K.BIG,g.BIG],[K.BLOCKQUOTE,g.BLOCKQUOTE],[K.BODY,g.BODY],[K.BR,g.BR],[K.BUTTON,g.BUTTON],[K.CAPTION,g.CAPTION],[K.CENTER,g.CENTER],[K.CODE,g.CODE],[K.COL,g.COL],[K.COLGROUP,g.COLGROUP],[K.DD,g.DD],[K.DESC,g.DESC],[K.DETAILS,g.DETAILS],[K.DIALOG,g.DIALOG],[K.DIR,g.DIR],[K.DIV,g.DIV],[K.DL,g.DL],[K.DT,g.DT],[K.EM,g.EM],[K.EMBED,g.EMBED],[K.FIELDSET,g.FIELDSET],[K.FIGCAPTION,g.FIGCAPTION],[K.FIGURE,g.FIGURE],[K.FONT,g.FONT],[K.FOOTER,g.FOOTER],[K.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[K.FORM,g.FORM],[K.FRAME,g.FRAME],[K.FRAMESET,g.FRAMESET],[K.H1,g.H1],[K.H2,g.H2],[K.H3,g.H3],[K.H4,g.H4],[K.H5,g.H5],[K.H6,g.H6],[K.HEAD,g.HEAD],[K.HEADER,g.HEADER],[K.HGROUP,g.HGROUP],[K.HR,g.HR],[K.HTML,g.HTML],[K.I,g.I],[K.IMG,g.IMG],[K.IMAGE,g.IMAGE],[K.INPUT,g.INPUT],[K.IFRAME,g.IFRAME],[K.KEYGEN,g.KEYGEN],[K.LABEL,g.LABEL],[K.LI,g.LI],[K.LINK,g.LINK],[K.LISTING,g.LISTING],[K.MAIN,g.MAIN],[K.MALIGNMARK,g.MALIGNMARK],[K.MARQUEE,g.MARQUEE],[K.MATH,g.MATH],[K.MENU,g.MENU],[K.META,g.META],[K.MGLYPH,g.MGLYPH],[K.MI,g.MI],[K.MO,g.MO],[K.MN,g.MN],[K.MS,g.MS],[K.MTEXT,g.MTEXT],[K.NAV,g.NAV],[K.NOBR,g.NOBR],[K.NOFRAMES,g.NOFRAMES],[K.NOEMBED,g.NOEMBED],[K.NOSCRIPT,g.NOSCRIPT],[K.OBJECT,g.OBJECT],[K.OL,g.OL],[K.OPTGROUP,g.OPTGROUP],[K.OPTION,g.OPTION],[K.P,g.P],[K.PARAM,g.PARAM],[K.PLAINTEXT,g.PLAINTEXT],[K.PRE,g.PRE],[K.RB,g.RB],[K.RP,g.RP],[K.RT,g.RT],[K.RTC,g.RTC],[K.RUBY,g.RUBY],[K.S,g.S],[K.SCRIPT,g.SCRIPT],[K.SEARCH,g.SEARCH],[K.SECTION,g.SECTION],[K.SELECT,g.SELECT],[K.SOURCE,g.SOURCE],[K.SMALL,g.SMALL],[K.SPAN,g.SPAN],[K.STRIKE,g.STRIKE],[K.STRONG,g.STRONG],[K.STYLE,g.STYLE],[K.SUB,g.SUB],[K.SUMMARY,g.SUMMARY],[K.SUP,g.SUP],[K.TABLE,g.TABLE],[K.TBODY,g.TBODY],[K.TEMPLATE,g.TEMPLATE],[K.TEXTAREA,g.TEXTAREA],[K.TFOOT,g.TFOOT],[K.TD,g.TD],[K.TH,g.TH],[K.THEAD,g.THEAD],[K.TITLE,g.TITLE],[K.TR,g.TR],[K.TRACK,g.TRACK],[K.TT,g.TT],[K.U,g.U],[K.UL,g.UL],[K.SVG,g.SVG],[K.VAR,g.VAR],[K.WBR,g.WBR],[K.XMP,g.XMP]]);function Vs(e){var t;return(t=YI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const be=g,WI={[ye.HTML]:new Set([be.ADDRESS,be.APPLET,be.AREA,be.ARTICLE,be.ASIDE,be.BASE,be.BASEFONT,be.BGSOUND,be.BLOCKQUOTE,be.BODY,be.BR,be.BUTTON,be.CAPTION,be.CENTER,be.COL,be.COLGROUP,be.DD,be.DETAILS,be.DIR,be.DIV,be.DL,be.DT,be.EMBED,be.FIELDSET,be.FIGCAPTION,be.FIGURE,be.FOOTER,be.FORM,be.FRAME,be.FRAMESET,be.H1,be.H2,be.H3,be.H4,be.H5,be.H6,be.HEAD,be.HEADER,be.HGROUP,be.HR,be.HTML,be.IFRAME,be.IMG,be.INPUT,be.LI,be.LINK,be.LISTING,be.MAIN,be.MARQUEE,be.MENU,be.META,be.NAV,be.NOEMBED,be.NOFRAMES,be.NOSCRIPT,be.OBJECT,be.OL,be.P,be.PARAM,be.PLAINTEXT,be.PRE,be.SCRIPT,be.SECTION,be.SELECT,be.SOURCE,be.STYLE,be.SUMMARY,be.TABLE,be.TBODY,be.TD,be.TEMPLATE,be.TEXTAREA,be.TFOOT,be.TH,be.THEAD,be.TITLE,be.TR,be.TRACK,be.UL,be.WBR,be.XMP]),[ye.MATHML]:new Set([be.MI,be.MO,be.MN,be.MS,be.MTEXT,be.ANNOTATION_XML]),[ye.SVG]:new Set([be.TITLE,be.FOREIGN_OBJECT,be.DESC]),[ye.XLINK]:new Set,[ye.XML]:new Set,[ye.XMLNS]:new Set},Zf=new Set([be.H1,be.H2,be.H3,be.H4,be.H5,be.H6]);K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT;var R;(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"})(R||(R={}));const Ct={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function GI(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function ma(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function XI(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function ui(e){return XI(e)||ma(e)}function GE(e){return ui(e)||GI(e)}function gl(e){return e+32}function XE(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function QE(e){return XE(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function QI(e){return e===I.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:VE(e)?te.surrogateCharacterReference:YE(e)?te.noncharacterCharacterReference:qE(e)||e===I.CARRIAGE_RETURN?te.controlCharacterReference:null}class KI{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=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new MI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new VI(FI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=QI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Qe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Qe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Qe.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(WE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.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=Vs(t.tagName),t.type===Qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.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 Qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qe.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:Qe.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=XE(t)?Qe.WHITESPACE_CHARACTER:t===I.NULL?Qe.NULL_CHARACTER:Qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ur.Attribute:Ur.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ui(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ui(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=R.DATA;break}case I.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=xt;break}case I.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ma(t)?gl(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ui(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ui(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ui(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case I.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case I.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case I.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ui(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ui(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&QE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case I.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case I.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case I.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&QE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=xt;break}default:this.currentAttr.name+=String.fromCodePoint(ma(t)?gl(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case I.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case I.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.data+=xt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Sn.DASH_DASH,!0)?(this._createCommentToken(Sn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Sn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Sn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Sn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Sn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.data+=xt;break}case I.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(te.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case I.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ma(t))this._createDoctypeToken(String.fromCharCode(gl(t))),this.state=R.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(xt),this.state=R.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(te.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=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.name+=xt;break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ma(t)?gl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Sn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Sn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=xt;break}case I.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(te.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 I.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=xt;break}case I.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(te.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=xt;break}case I.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(te.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 I.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=xt;break}case I.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(te.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case I.NULL:{this._err(te.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=R.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&GE(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){GE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const KE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),JE=new Set([...KE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),El=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),JI=new Set([...El,g.OL,g.UL]),ZI=new Set([...El,g.BUTTON]),ZE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),ey=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),eP=new Set([g.TR,g.TEMPLATE,g.HTML]),tP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),nP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),rP=new Set([g.TD,g.TH]);class iP{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ye.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ye.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(Zf,ye.HTML)}popUntilTableCellPopped(){this.popUntilPopped(rP,ye.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(nP,ye.HTML)}clearBackToTableBodyContext(){this.clearBackTo(tP,ye.HTML)}clearBackToTableRowContext(){this.clearBackTo(eP,ye.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ye.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ye.SVG:{if(ey.has(s))return!1;break}case ye.MATHML:{if(ZE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,El)}hasInListItemScope(t){return this.hasInDynamicScope(t,JI)}hasInButtonScope(t){return this.hasInDynamicScope(t,ZI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ye.HTML:{if(Zf.has(n))return!0;if(El.has(n))return!1;break}case ye.SVG:{if(ey.has(n))return!1;break}case ye.MATHML:{if(ZE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ye.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ye.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ye.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&KE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&JE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&JE.has(this.currentTagId);)this.pop()}}const eh=3;var _r;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(_r||(_r={}));const ty={type:_r.Marker};class sP{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===_r.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<eh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<eh)return;const s=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=>s.get(d.name)===d.value)&&(a+=1,a>=eh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(ty)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:_r.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:_r.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(ty);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===_r.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===_r.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===_r.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:qn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};li.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(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.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=H(H({},e.sourceCodeLocation),t)}},ny="html",oP="about:legacy-compat",aP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ry=["+//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//"],uP=[...ry,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],lP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),iy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],cP=[...iy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function sy(e,t){return t.some(n=>e.startsWith(n))}function dP(e){return e.name===ny&&e.publicId===null&&(e.systemId===null||e.systemId===oP)}function fP(e){if(e.name!==ny)return qn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===aP)return qn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),lP.has(n))return qn.QUIRKS;let r=t===null?uP:ry;if(sy(n,r))return qn.QUIRKS;if(r=t===null?iy:cP,sy(n,r))return qn.LIMITED_QUIRKS}return qn.NO_QUIRKS}const oy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},hP="definitionurl",pP="definitionURL",mP=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])),gP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ye.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ye.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ye.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ye.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ye.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ye.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ye.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ye.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ye.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ye.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ye.XMLNS}]]),EP=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])),yP=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function TP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Ji.COLOR||r===Ji.SIZE||r===Ji.FACE)||yP.has(t)}function ay(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===hP){e.attrs[t].name=pP;break}}function uy(e){for(let t=0;t<e.attrs.length;t++){const n=mP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function th(e){for(let t=0;t<e.attrs.length;t++){const n=gP.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 bP(e){const t=EP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Vs(e.tagName))}function xP(e,t){return t===ye.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function _P(e,t,n){if(t===ye.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ji.ENCODING){const s=n[r].value.toLowerCase();return s===oy.TEXT_HTML||s===oy.APPLICATION_XML}}return t===ye.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function wP(e,t,n,r){return(!r||r===ye.HTML)&&_P(e,t,n)||(!r||r===ye.MATHML)&&xP(e,t)}const SP="hidden",vP=8,AP=3;var U;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(U||(U={}));const kP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ly=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),cy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class dy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=H(H({},cy),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 KI(this.options,this),this.activeFormattingElements=new sP(this.treeAdapter),this.fragmentContextID=r?Vs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new iP(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=H(H({},cy),n);t!=null||(t=r.treeAdapter.createElement(K.TEMPLATE,ye.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ye.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:kP,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ye.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ye.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=Ct.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===K.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ye.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ct.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ct.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ct.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ct.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&le(H({},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,ye.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ye.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(K.HTML,ye.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Qe.END_TAG&&s===n.tagName?{endTag:H({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ye.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ye.HTML)}_processToken(t){switch(t.type){case Qe.CHARACTER:{this.onCharacter(t);break}case Qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qe.COMMENT:{this.onComment(t);break}case Qe.DOCTYPE:{this.onDoctype(t);break}case Qe.START_TAG:{this._processStartTag(t);break}case Qe.END_TAG:{this.onEndTag(t);break}case Qe.EOF:{this.onEof(t);break}case Qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return wP(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===_r.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=U.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=U.IN_TABLE;return}case g.BODY:{this.insertionMode=U.IN_BODY;return}case g.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return ly.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ye.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return WI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){r6(this,t);return}switch(this.insertionMode){case U.INITIAL:{ga(this,t);break}case U.BEFORE_HTML:{Ea(this,t);break}case U.BEFORE_HEAD:{ya(this,t);break}case U.IN_HEAD:{Ta(this,t);break}case U.IN_HEAD_NO_SCRIPT:{ba(this,t);break}case U.AFTER_HEAD:{xa(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{hy(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{sh(this,t);break}case U.IN_TABLE_TEXT:{xy(this,t);break}case U.IN_COLUMN_GROUP:{bl(this,t);break}case U.AFTER_BODY:{wl(this,t);break}case U.AFTER_AFTER_BODY:{Sl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){n6(this,t);return}switch(this.insertionMode){case U.INITIAL:{ga(this,t);break}case U.BEFORE_HTML:{Ea(this,t);break}case U.BEFORE_HEAD:{ya(this,t);break}case U.IN_HEAD:{Ta(this,t);break}case U.IN_HEAD_NO_SCRIPT:{ba(this,t);break}case U.AFTER_HEAD:{xa(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{sh(this,t);break}case U.IN_COLUMN_GROUP:{bl(this,t);break}case U.AFTER_BODY:{wl(this,t);break}case U.AFTER_AFTER_BODY:{Sl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){rh(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{rh(this,t);break}case U.IN_TABLE_TEXT:{Sa(this,t);break}case U.AFTER_BODY:{LP(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{DP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{MP(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case U.IN_TABLE_TEXT:{Sa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?i6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{ga(this,t);break}case U.BEFORE_HTML:{FP(this,t);break}case U.BEFORE_HEAD:{UP(this,t);break}case U.IN_HEAD:{or(this,t);break}case U.IN_HEAD_NO_SCRIPT:{$P(this,t);break}case U.AFTER_HEAD:{VP(this,t);break}case U.IN_BODY:{un(this,t);break}case U.IN_TABLE:{qs(this,t);break}case U.IN_TABLE_TEXT:{Sa(this,t);break}case U.IN_CAPTION:{HR(this,t);break}case U.IN_COLUMN_GROUP:{oh(this,t);break}case U.IN_TABLE_BODY:{xl(this,t);break}case U.IN_ROW:{_l(this,t);break}case U.IN_CELL:{zR(this,t);break}case U.IN_SELECT:{Sy(this,t);break}case U.IN_SELECT_IN_TABLE:{qR(this,t);break}case U.IN_TEMPLATE:{WR(this,t);break}case U.AFTER_BODY:{XR(this,t);break}case U.IN_FRAMESET:{QR(this,t);break}case U.AFTER_FRAMESET:{JR(this,t);break}case U.AFTER_AFTER_BODY:{e6(this,t);break}case U.AFTER_AFTER_FRAMESET:{t6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?s6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{ga(this,t);break}case U.BEFORE_HTML:{BP(this,t);break}case U.BEFORE_HEAD:{HP(this,t);break}case U.IN_HEAD:{jP(this,t);break}case U.IN_HEAD_NO_SCRIPT:{zP(this,t);break}case U.AFTER_HEAD:{qP(this,t);break}case U.IN_BODY:{Tl(this,t);break}case U.TEXT:{OR(this,t);break}case U.IN_TABLE:{_a(this,t);break}case U.IN_TABLE_TEXT:{Sa(this,t);break}case U.IN_CAPTION:{jR(this,t);break}case U.IN_COLUMN_GROUP:{$R(this,t);break}case U.IN_TABLE_BODY:{ah(this,t);break}case U.IN_ROW:{wy(this,t);break}case U.IN_CELL:{VR(this,t);break}case U.IN_SELECT:{vy(this,t);break}case U.IN_SELECT_IN_TABLE:{YR(this,t);break}case U.IN_TEMPLATE:{GR(this,t);break}case U.AFTER_BODY:{ky(this,t);break}case U.IN_FRAMESET:{KR(this,t);break}case U.AFTER_FRAMESET:{ZR(this,t);break}case U.AFTER_AFTER_BODY:{Sl(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{ga(this,t);break}case U.BEFORE_HTML:{Ea(this,t);break}case U.BEFORE_HEAD:{ya(this,t);break}case U.IN_HEAD:{Ta(this,t);break}case U.IN_HEAD_NO_SCRIPT:{ba(this,t);break}case U.AFTER_HEAD:{xa(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{Ty(this,t);break}case U.TEXT:{IR(this,t);break}case U.IN_TABLE_TEXT:{Sa(this,t);break}case U.IN_TEMPLATE:{Ay(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{ih(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{fy(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{sh(this,t);break}case U.IN_TABLE_TEXT:{by(this,t);break}}}}function NP(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):yy(e,t),n}function CP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function OP(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=AP;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=IP(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function IP(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 PP(e,t,n){const r=e.treeAdapter.getTagName(t),s=Vs(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===ye.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function RP(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function nh(e,t){for(let n=0;n<vP;n++){const r=NP(e,t);if(!r)break;const s=CP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=OP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&PP(e,u,a),RP(e,s,r)}}function rh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function LP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function DP(e,t){e._appendCommentNode(t,e.document)}function ih(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function MP(e,t){e._setDocumentType(t);const n=t.forceQuirks?qn.QUIRKS:fP(t);dP(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function ga(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,qn.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function FP(e,t){t.tagID===g.HTML?(e._insertElement(t,ye.HTML),e.insertionMode=U.BEFORE_HEAD):Ea(e,t)}function BP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ea(e,t)}function Ea(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function UP(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.HEAD:{e._insertElement(t,ye.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:ya(e,t)}}function HP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?ya(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function ya(e,t){e._insertFakeElement(K.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function or(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ct.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ct.RAWTEXT):(e._insertElement(t,ye.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ct.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ct.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ta(e,t)}}function jP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ta(e,t);break}case g.TEMPLATE:{Zi(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Zi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ta(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function $P(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{or(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:ba(e,t)}}function zP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case g.BR:{ba(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ba(e,t){const n=t.type===Qe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function VP(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.BODY:{e._insertElement(t,ye.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ye.HTML),e.insertionMode=U.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),or(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function qP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{xa(e,t);break}case g.TEMPLATE:{Zi(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function xa(e,t){e._insertFakeElement(K.BODY,g.BODY),e.insertionMode=U.IN_BODY,yl(e,t)}function yl(e,t){switch(t.type){case Qe.CHARACTER:{hy(e,t);break}case Qe.WHITESPACE_CHARACTER:{fy(e,t);break}case Qe.COMMENT:{rh(e,t);break}case Qe.START_TAG:{un(e,t);break}case Qe.END_TAG:{Tl(e,t);break}case Qe.EOF:{Ty(e,t);break}}}function fy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function YP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function WP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function GP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ye.HTML),e.insertionMode=U.IN_FRAMESET)}function XP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ye.HTML)}function QP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Zf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ye.HTML)}function KP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ye.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function JP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ye.HTML),n||(e.formElement=e.openElements.current))}function ZP(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ye.HTML)}function eR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ye.HTML),e.tokenizer.state=Ct.PLAINTEXT}function tR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.framesetOk=!1}function nR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(nh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function rR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function iR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(nh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ye.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function oR(e,t){e.treeAdapter.getDocumentMode(e.document)!==qn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ye.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function py(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ye.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function my(e){const t=WE(e,Ji.TYPE);return t!=null&&t.toLowerCase()===SP}function aR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ye.HTML),my(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function uR(e,t){e._appendElement(t,ye.HTML),t.ackSelfClosing=!0}function lR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ye.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cR(e,t){t.tagName=K.IMG,t.tagID=g.IMG,py(e,t)}function dR(e,t){e._insertElement(t,ye.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ct.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function fR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ct.RAWTEXT)}function hR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ct.RAWTEXT)}function gy(e,t){e._switchToTextParsing(t,Ct.RAWTEXT)}function pR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function mR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML)}function gR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ye.HTML)}function ER(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ye.HTML)}function yR(e,t){e._reconstructActiveFormattingElements(),ay(t),th(t),t.selfClosing?e._appendElement(t,ye.MATHML):e._insertElement(t,ye.MATHML),t.ackSelfClosing=!0}function TR(e,t){e._reconstructActiveFormattingElements(),uy(t),th(t),t.selfClosing?e._appendElement(t,ye.SVG):e._insertElement(t,ye.SVG),t.ackSelfClosing=!0}function Ey(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ye.HTML)}function un(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{rR(e,t);break}case g.A:{nR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{QP(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{XP(e,t);break}case g.LI:case g.DD:case g.DT:{ZP(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{py(e,t);break}case g.HR:{lR(e,t);break}case g.RB:case g.RTC:{gR(e,t);break}case g.RT:case g.RP:{ER(e,t);break}case g.PRE:case g.LISTING:{KP(e,t);break}case g.XMP:{fR(e,t);break}case g.SVG:{TR(e,t);break}case g.HTML:{YP(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{or(e,t);break}case g.BODY:{WP(e,t);break}case g.FORM:{JP(e,t);break}case g.NOBR:{iR(e,t);break}case g.MATH:{yR(e,t);break}case g.TABLE:{oR(e,t);break}case g.INPUT:{aR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{uR(e,t);break}case g.IMAGE:{cR(e,t);break}case g.BUTTON:{tR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{sR(e,t);break}case g.IFRAME:{hR(e,t);break}case g.SELECT:{pR(e,t);break}case g.OPTION:case g.OPTGROUP:{mR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{gy(e,t);break}case g.FRAMESET:{GP(e,t);break}case g.TEXTAREA:{dR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?gy(e,t):Ey(e,t);break}case g.PLAINTEXT:{eR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Ey(e,t)}}function bR(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function xR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=U.AFTER_BODY,ky(e,t))}function _R(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function wR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function SR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(K.P,g.P),e._closePElement()}function vR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function AR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function kR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function NR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function CR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function yy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function Tl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{nh(e,t);break}case g.P:{SR(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{_R(e,t);break}case g.LI:{vR(e);break}case g.DD:case g.DT:{AR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{kR(e);break}case g.BR:{CR(e);break}case g.BODY:{bR(e,t);break}case g.HTML:{xR(e,t);break}case g.FORM:{wR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{NR(e,t);break}case g.TEMPLATE:{Zi(e,t);break}default:yy(e,t)}}function Ty(e,t){e.tmplInsertionModeStack.length>0?Ay(e,t):ih(e,t)}function OR(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function IR(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function sh(e,t){if(e.openElements.currentTagId!==void 0&&ly.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case Qe.CHARACTER:{xy(e,t);break}case Qe.WHITESPACE_CHARACTER:{by(e,t);break}}else wa(e,t)}function PR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ye.HTML),e.insertionMode=U.IN_CAPTION}function RR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ye.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function LR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,g.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,oh(e,t)}function DR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ye.HTML),e.insertionMode=U.IN_TABLE_BODY}function MR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,g.TBODY),e.insertionMode=U.IN_TABLE_BODY,xl(e,t)}function FR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function BR(e,t){my(t)?e._appendElement(t,ye.HTML):wa(e,t),t.ackSelfClosing=!0}function UR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ye.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function qs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{MR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{or(e,t);break}case g.COL:{LR(e,t);break}case g.FORM:{UR(e,t);break}case g.TABLE:{FR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{DR(e,t);break}case g.INPUT:{BR(e,t);break}case g.CAPTION:{PR(e,t);break}case g.COLGROUP:{RR(e,t);break}default:wa(e,t)}}function _a(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Zi(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:wa(e,t)}}function wa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,yl(e,t),e.fosterParentingEnabled=n}function by(e,t){e.pendingCharacterTokens.push(t)}function xy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Sa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)wa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const _y=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function HR(e,t){const n=t.tagID;_y.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,qs(e,t)):un(e,t)}function jR(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===g.TABLE&&_a(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Tl(e,t)}}function oh(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.COL:{e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{or(e,t);break}default:bl(e,t)}}function $R(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TEMPLATE:{Zi(e,t);break}case g.COL:break;default:bl(e,t)}}function bl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function xl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ye.HTML),e.insertionMode=U.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,g.TR),e.insertionMode=U.IN_ROW,_l(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,qs(e,t));break}default:qs(e,t)}}function ah(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,_a(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:_a(e,t)}}function _l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ye.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,xl(e,t));break}default:qs(e,t)}}function wy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,ah(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,ah(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:_a(e,t)}}function zR(e,t){const n=t.tagID;_y.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),_l(e,t)):un(e,t)}function VR(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),wy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Tl(e,t)}}function Sy(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ye.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ye.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{or(e,t);break}}}function vy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Zi(e,t);break}}}function qR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Sy(e,t)}function YR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):vy(e,t)}function WR(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{or(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,qs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,oh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,xl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,_l(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,un(e,t)}}function GR(e,t){t.tagID===g.TEMPLATE&&Zi(e,t)}function Ay(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ih(e,t)}function XR(e,t){t.tagID===g.HTML?un(e,t):wl(e,t)}function ky(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else wl(e,t)}function wl(e,t){e.insertionMode=U.IN_BODY,yl(e,t)}function QR(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.FRAMESET:{e._insertElement(t,ye.HTML);break}case g.FRAME:{e._appendElement(t,ye.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{or(e,t);break}}}function KR(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function JR(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.NOFRAMES:{or(e,t);break}}}function ZR(e,t){t.tagID===g.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function e6(e,t){t.tagID===g.HTML?un(e,t):Sl(e,t)}function Sl(e,t){e.insertionMode=U.IN_BODY,yl(e,t)}function t6(e,t){switch(t.tagID){case g.HTML:{un(e,t);break}case g.NOFRAMES:{or(e,t);break}}}function n6(e,t){t.chars=xt,e._insertCharacters(t)}function r6(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ny(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ye.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function i6(e,t){if(TP(t))Ny(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ye.MATHML?ay(t):r===ye.SVG&&(bP(t),uy(t)),th(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function s6(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ny(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)===ye.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR;const o6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,a6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Cy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Oy(e,t){const n=E6(e),r=$E("type",{handlers:{root:u6,element:l6,text:c6,comment:Py,doctype:d6,raw:h6},unknown:p6}),s={parser:n?new dy(Cy):dy.getFragmentParser(void 0,Cy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),Ys(s,br());const a=n?s.parser.document:s.parser.getFragment(),u=yI(a,{file:s.options.file});return s.stitches&&hl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Iy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function u6(e,t){Iy(e.children,t)}function l6(e,t){m6(e,t),Iy(e.children,t),g6(e,t)}function c6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Qe.CHARACTER,chars:e.value,location:va(e)};Ys(t,br(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function d6(e,t){const n={type:Qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:va(e)};Ys(t,br(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function f6(e,t){t.stitches=!0;const n=y6(e);if("children"in e&&"children"in n){const r=Oy({type:"root",children:e.children},t.options);n.children=r.children}Py({type:"comment",value:{stitch:n}},t)}function Py(e,t){const n=e.value,r={type:Qe.COMMENT,data:n,location:va(e)};Ys(t,br(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function h6(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,Ry(t,br(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(o6,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function p6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))f6(n,t);else{let r="";throw a6.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 Ys(e,t){Ry(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=Ct.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 Ry(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 m6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ct.PLAINTEXT)return;Ys(t,br(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Ki.html;s===Ki.html&&n==="svg"&&(s=Ki.svg);const a=wI(le(H({},e),{children:[]}),{space:s===Ki.svg?"svg":"html"}),u={type:Qe.START_TAG,tagName:n,tagID:Vs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:va(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function g6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&II.includes(n)||t.parser.tokenizer.state===Ct.PLAINTEXT)return;Ys(t,nl(e));const r={type:Qe.END_TAG,tagName:n,tagID:Vs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:va(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ct.RCDATA||t.parser.tokenizer.state===Ct.RAWTEXT||t.parser.tokenizer.state===Ct.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ct.DATA)}function E6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function va(e){const t=br(e)||{line:void 0,column:void 0,offset:void 0},n=nl(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 y6(e){return"children"in e?Qi(le(H({},e),{children:[]})):Qi(e)}function Ly(e){return function(t,n){return Oy(t,le(H({},e),{file:n}))}}const es=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Dy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...es,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...es],h2:[["className","sr-only"]],img:[...es,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...es,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...es],table:[...es],ul:[...es,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ci={}.hasOwnProperty;function T6(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},Dy),t):Dy,stack:[]},s=My(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function My(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return b6(e,n);case"doctype":return x6(e,n);case"element":return _6(e,n);case"root":return w6(e,n);case"text":return S6(e,n)}}}function b6(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 Aa(a,t),a}}function x6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Aa(n,t),n}}function _6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Fy(e,t.children),s=v6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ci.call(e.schema.ancestors,n))){const 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:s,children:r};return Aa(u,t),u}function w6(e,t){const r={type:"root",children:Fy(e,t.children)};return Aa(r,t),r}function S6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Aa(r,t),r}function Fy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=My(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function v6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&ci.call(r,n)?r[n]:void 0,u=r&&ci.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(ci.call(c,f)){const p=c[f];let m=By(e,Hy(a,f),f,p);m==null&&(m=By(e,Hy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&ci.call(s,n)){const p=s[n];for(f in p)ci.call(p,f)&&!ci.call(d,f)&&(d[f]=p[f])}return d}function By(e,t,n,r){return t?Array.isArray(r)?A6(e,t,n,r):Uy(e,t,n,r):void 0}function A6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Uy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Uy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&k6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function k6(e,t,n){const r=e.schema.protocols&&ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function Aa(e,t){const n=I1(t);t.data&&(e.data=Qi(t.data)),n&&(e.position=n)}function Hy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function N6(e){return function(t){return T6(t,e)}}const jy=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",le(H(H({className:M(e,`${O}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},C6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=at();return!e&&!t?null:_.jsx("div",{className:M(n,`${O}-disclaimer`),children:t?_.jsx(RE,{rehypePlugins:[Ly,N6],components:{ul:({children:r})=>_.jsx("ul",{className:M(n,`${O}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:M(n,`${O}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:M(n,`${O}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(jy,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:M(n,`${O}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:M(n,`${O}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:M(n,`${O}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:M(n,`${O}-disclaimer-text`),children:e})})},uh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=sn(),{globalClassName:u,searchConfig:c,enableEscalationToAgent:d}=at(),f=B.useRef(null),p=t||!s&&!a,m=y=>{var A;y.preventDefault();const x=(((A=f.current)==null?void 0:A.value)||"").trim();x&&(f.current.value="",r(x))},b=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:M(u,e,`cim-${n}-component`,`${O}-search-bar-wrapper`),children:[_.jsxs("form",{className:M(u,e,`cim-${n}-component`,`${O}-search-bar`),name:`${O}-search-form`,onSubmit:m,children:[_.jsx("input",{className:M(u,e,`cim-${n}-component`,`${O}-search-input`),type:"text",ref:f,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${O}-user-input`,disabled:p}),_.jsx(aN,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:p}),d&&_.jsx(ir,{className:M(u,`${O}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:b,icon:_.jsx(Xk,{})})]}),_.jsx(C6,{})]})};function O6(e){return ot({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function I6(e){return ot({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 $y=B.createContext({isOpen:!1}),lh=B.createContext(null),zy=B.createContext(null),Ws=()=>{var n,r;const e=B.useContext(lh),t=B.useContext(zy);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Vy=({onClearChat:e,componentType:t})=>{const n=Ws(),r=()=>{e(),n()};return _.jsxs("button",{className:M(`${O}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(I6,{}),"Clear chat"]})},qy=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=at(),r=Ws(),[s,a]=B.useState(!1),u=()=>Ue(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return _.jsxs("button",{className:M(`${O}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(O6,{}),"Download transcript"]})};function P6(e){return e==null?[]:Array.isArray(e)?e:[e]}var R6=(e,...t)=>e.concat(t),L6=(e,...t)=>e.filter(n=>!t.includes(n)),D6=e=>Array.from(new Set(e));function Yy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function M6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Yy(e,t,{step:-r,loop:s})}var F6=e=>Array.isArray(e),Wy=e=>e!=null&&typeof e=="object",B6=e=>Wy(e)&&!F6(e),vl=e=>typeof e=="string",Gs=e=>typeof e=="function",U6=e=>e==null,H6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),j6=e=>Object.prototype.toString.call(e),Gy=Function.prototype.toString,$6=Gy.call(Object),z6=e=>{if(!Wy(e)||j6(e)!="[object Object]"||Y6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=H6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gy.call(n)==$6},V6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,q6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Y6=e=>V6(e)||q6(e),W6=e=>e(),G6=()=>{},ch=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function X6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:Q6,max:K6}=Math,J6=e=>Number.isNaN(e),Z6=e=>J6(e)?0:e,Xy=(e,t,n)=>Q6(K6(Z6(e),t),n);function dh(e){if(!z6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=dh(s))}return n}function fh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function e4(e,t){if(e==null)throw new Error(t())}function t4(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var n4=Object.defineProperty,r4=(e,t,n)=>t in e?n4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hh=(e,t,n)=>r4(e,typeof t!="symbol"?t+"":t,n),Qy=()=>{},Al=e=>typeof e=="object"&&e!==null,Xs=e=>e?"":void 0,Ky=e=>e?"true":void 0,i4=1,s4=9,o4=11,$t=e=>Al(e)&&e.nodeType===i4&&typeof e.nodeName=="string",kl=e=>Al(e)&&e.nodeType===s4,a4=e=>Al(e)&&e===e.window,Jy=e=>$t(e)?e.localName||"":"#document";function u4(e){return["html","body","#document"].includes(Jy(e))}var l4=e=>Al(e)&&e.nodeType!==void 0,ts=e=>l4(e)&&e.nodeType===o4&&"host"in e,c4=e=>$t(e)&&e.localName==="input",d4=e=>$t(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ka(e){if(!e)return!1;const t=e.getRootNode();return Js(t)===e}var f4=/(textarea|select)/;function h4(e){if(e==null||!$t(e))return!1;try{return c4(e)&&e.selectionStart!=null||f4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Qs(e,t){var r;if(!e||!t||!$t(e)||!$t(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ts(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function wr(e){var t;return kl(e)?e:a4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function p4(e){return wr(e).documentElement}function Ks(e){var t,n,r;return ts(e)?Ks(e.host):kl(e)?(t=e.defaultView)!=null?t:window:$t(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Js(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 m4(e){if(Jy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ts(e)&&e.host||p4(e);return ts(t)?t.host:t}function ph(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),kl(t)||ts(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var mh=new WeakMap;function Zs(e){return mh.has(e)||mh.set(e,Ks(e).getComputedStyle(e)),mh.get(e)}var gh=new Set(["menu","listbox","dialog","grid","tree","region"]),g4=e=>gh.has(e),Zy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function eT(e,t){const n=new Set,r=ph(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Zy(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&g4(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function tT(e,t){const n=ph(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Zy(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&gh.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function E4(e){const t=new Set;return tT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function y4(e){const t=e.getAttribute("role");return!!(t&&gh.has(t))}function T4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function b4(e){var t;return T4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function x4(e){if(!e.id)return!1;const t=ph(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&y4(e))}var Eh=()=>typeof document!="undefined";function _4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var yh=e=>Eh()&&e.test(_4()),w4=e=>Eh()&&e.test(navigator.vendor),nT=()=>Eh()&&!!navigator.maxTouchPoints,S4=()=>yh(/^iPhone/i),v4=()=>yh(/^iPad/i)||Th()&&navigator.maxTouchPoints>1,Nl=()=>S4()||v4(),A4=()=>Th()||Nl(),Th=()=>yh(/^Mac/i),k4=()=>A4()&&w4(/apple/i);function N4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function ar(e){var n;const t=N4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var rT=e=>e.button===0,C4=e=>e.button===2||Th()&&e.ctrlKey&&e.button===0,O4=e=>"touches"in e&&e.touches.length>0,I4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},iT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function P4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=I4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in iT&&(s=iT[s]),s}function sT(e,t="client"){const n=O4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var zt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},oT=e=>$t(e)&&e.tagName==="IFRAME",R4=/^(audio|video|details)$/;function aT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var L4=e=>!Number.isNaN(aT(e)),D4=e=>aT(e)<0;function M4(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 uT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=M4(d,t);if(f){const p=Array.from(f.querySelectorAll(Cl)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,b+x)})}s.push(...p)}}return r}var Cl="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",lT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Cl));(n==!0||n=="if-empty"&&s.length===0)&&$t(e)&&Sr(e)&&s.unshift(e);const u=[];for(const c of s)if(Sr(c)){if(oT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...lT(d,{getShadowRoot:r}));continue}u.push(c)}return r?uT(u,r,Sr):u};function Sr(e){return!$t(e)||e.closest("[inert]")?!1:e.matches(Cl)&&d4(e)}function eo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Cl));n&&ns(e)&&s.unshift(e);const a=[];for(const u of s)if(ns(u)){if(oT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...eo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=uT(a,r,ns);return!u.length&&n?s:u}return!a.length&&n?s:a}function ns(e){return $t(e)&&e.tabIndex>0?!0:Sr(e)&&!D4(e)}function F4(e,t={}){const n=eo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function B4(e,t={}){const{current:n,getShadowRoot:r}=t,s=eo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Js(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function Na(e){return e.tabIndex<0&&(R4.test(e.localName)||h4(e))&&!L4(e)?0:e.tabIndex}function cT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=eo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var U4=class y2{constructor(){hh(this,"id",null),hh(this,"fn_cleanup"),hh(this,"cleanup",()=>{this.cancel()})}static create(){return new y2}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 Mt(e){const t=U4.create();return t.request(e),t.cleanup}function dT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function bh(e){const t=m4(e);return u4(t)?wr(t).body:$t(t)&&$4(t)?t:bh(t)}var H4=/auto|scroll|overlay|hidden|clip/,j4=new Set(["inline","contents"]);function $4(e){const t=Ks(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return H4.test(n+s+r)&&!j4.has(a)}var to="default",xh="",Ol=new WeakMap;function z4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Nl()?(to==="default"&&(xh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),to="disabled"):t&&(Ol.set(t,t.style.userSelect),t.style.userSelect="none"),()=>V4({target:t,doc:r})}function V4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Nl()){if(to!=="disabled")return;to="restoring",setTimeout(()=>{dT(()=>{to==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=xh||""),xh="",to="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 q4(e={}){const u=e,{defer:t,target:n}=u,r=yn(u,["defer","target"]),s=t?Mt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(z4(le(H({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function Y4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=sT(c),f=Math.sqrt(fd(d.x,2)+fd(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=sT(c);r({point:d,event:c})},u=[zt(e,"pointermove",s,!1),zt(e,"pointerup",a,!1),zt(e,"pointercancel",a,!1),zt(e,"contextmenu",a,!1),q4({doc:e})];return()=>{u.forEach(c=>c())}}function W4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=F4(e,{includeContainer:!0,getShadowRoot:a}),y=B4(c,{current:n,getShadowRoot:a}),x=!m&&!b;f.shiftKey&&ka(y)?(s==null||s(),p=b):f.shiftKey&&(ka(m)||x)?p=n:!f.shiftKey&&ka(n)?(s==null||s(),p=m):!f.shiftKey&&(ka(b)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return zt(u,"keydown",d,!0)}function G4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=yn(c,["defer","triggerElement"]),a=n?Mt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(W4(d,H({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function X4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Il(e,t){if(!e)return Qy;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function Q4(e,t,n){if(!e)return Qy;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 K4(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(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function J4(e,t){const{timeout:n,rootNode:r}=t,s=Ks(r),a=wr(r),u=new s.AbortController;return K4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var Z4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),eL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,fT=e=>{const t={};let n;for(;n=eL.exec(e);)t[n[1]]=n[2];return t},tL=(e,t)=>{if(vl(e)){if(vl(t))return`${e};${t}`;e=fT(e)}else vl(t)&&(t=fT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Ft(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=ch(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=Z4(t[s],n[s]);continue}if(s==="style"){t[s]=tL(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function pU(e){return e}var no=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(no||{}),_h="__init__";function nL(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>wr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Js(t()),a=u=>t().getElementById(u);return le(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:ka,getById:a})}function rL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ro=()=>e=>Array.from(new Set(e)),hT=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Pl(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=B.useState(t),[s,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(s);c.current=u?e().value:s;const d=B.useRef(c.current);hT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,w;const x=d.current,A=Gs(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:x}),u||a(A),n(A,x)||(w=(v=e()).onChange)==null||w.call(v,A,x)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Fs.flushSync:W6)(()=>f(y))},invoke(y,x){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,x)},hash(y){var x,A,v;return(v=(A=(x=e()).hash)==null?void 0:A.call(x,y))!=null?v:String(y)}}}Pl.cleanup=e=>{B.useEffect(()=>e,[])},Pl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function iL(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var sL=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Rl(e,t={}){var ae,oe,pe,ce,se,Ae;const n=B.useMemo(()=>{const{id:re,ids:Y,getRootNode:ie}=t;return nL({id:re,ids:Y,getRootNode:ie})},[t]),r=(...re)=>{e.debug&&console.log(...re)},s=(oe=(ae=e.props)==null?void 0:ae.call(e,{props:dh(t),scope:n}))!=null?oe:t,a=oL(s),u=(pe=e.context)==null?void 0:pe.call(e,{prop:a,bindable:Pl,scope:n,flush:mT,getContext(){return d},getComputed(){return X},getRefs(){return A},getEvent(){return y()}}),c=pT(u),d={get(re){var Y;return(Y=c.current)==null?void 0:Y[re].ref.current},set(re,Y){var ie;(ie=c.current)==null||ie[re].set(Y)},initial(re){var Y;return(Y=c.current)==null?void 0:Y[re].initial},hash(re){var ie,k;const Y=(ie=c.current)==null?void 0:ie[re].get();return(k=c.current)==null?void 0:k[re].hash(Y)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),b=B.useRef({type:""}),y=()=>le(H({},b.current),{current(){return b.current},previous(){return m.current}}),x=()=>le(H({},L),{matches(...re){return re.includes(L.ref.current)},hasTag(re){var Y,ie;return!!((ie=(Y=e.states[L.ref.current])==null?void 0:Y.tags)!=null&&ie.includes(re))}}),A=iL((se=(ce=e.refs)==null?void 0:ce.call(e,{prop:a,context:d}))!=null?se:{}),v=()=>({state:x(),context:d,event:y(),prop:a,send:z,action:w,guard:N,track:sL,refs:A,computed:X,flush:mT,scope:n,choose:j}),w=re=>{const Y=Gs(re)?re(v()):re;if(!Y)return;const ie=Y.map(k=>{var Z,P;const D=(P=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:P[k];return D||fh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),D});for(const k of ie)k==null||k(v())},N=re=>{var Y,ie;return Gs(re)?re(v()):(ie=(Y=e.implementations)==null?void 0:Y.guards)==null?void 0:ie[re](v())},C=re=>{const Y=Gs(re)?re(v()):re;if(!Y)return;const ie=Y.map(D=>{var P,ke;const Z=(ke=(P=e.implementations)==null?void 0:P.effects)==null?void 0:ke[D];return Z||fh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),Z}),k=[];for(const D of ie){const Z=D==null?void 0:D(v());Z&&k.push(Z)}return()=>k.forEach(D=>D==null?void 0:D())},j=re=>P6(re).find(Y=>{let ie=!Y.guard;return vl(Y.guard)?ie=!!N(Y.guard):Gs(Y.guard)&&(ie=Y.guard(v())),ie}),X=re=>{e4(e.computed,()=>"[zag-js] No computed object found on machine");const Y=e.computed[re];return Y({context:d,event:y(),prop:a,refs:A,scope:n,computed:X})},L=Pl(()=>({defaultValue:e.initialState({prop:a}),onChange(re,Y){var k,D,Z,P;if(Y){const ke=f.current.get(Y);ke==null||ke(),f.current.delete(Y)}Y&&w((k=e.states[Y])==null?void 0:k.exit),w((D=p.current)==null?void 0:D.actions);const ie=C((Z=e.states[re])==null?void 0:Z.effects);if(ie&&f.current.set(re,ie),Y===_h){w(e.entry);const ke=C(e.effects);ke&&f.current.set(_h,ke)}w((P=e.states[re])==null?void 0:P.entry)}})),G=B.useRef(void 0),ne=B.useRef(no.NotStarted);hT(()=>{queueMicrotask(()=>{var D;const ie=ne.current===no.Started;ne.current=no.Started,r(ie?"rehydrating...":"initializing...");const k=(D=G.current)!=null?D:L.initial;L.invoke(k,ie?L.get():_h)});const re=f.current,Y=L.ref.current;return()=>{r("unmounting..."),G.current=Y,ne.current=no.Stopped,re.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const de=()=>"ref"in L?L.ref.current:L.get(),z=re=>{queueMicrotask(()=>{var P,ke,Ce,ge,Le;if(ne.current!==no.Started)return;m.current=b.current,b.current=re;let Y=de();const ie=(Ce=(P=e.states[Y].on)==null?void 0:P[re.type])!=null?Ce:(ke=e.on)==null?void 0:ke[re.type],k=j(ie);if(!k)return;p.current=k;const D=(ge=k.target)!=null?ge:Y;r("transition",re.type,k.target||Y,`(${k.actions})`);const Z=D!==Y;Z?Fs.flushSync(()=>L.set(D)):k.reenter&&!Z?L.invoke(Y,Y):w((Le=k.actions)!=null?Le:[])})};return(Ae=e.watch)==null||Ae.call(e,v()),{state:x(),send:z,context:d,prop:a,scope:n,refs:A,computed:X,event:y(),getStatus:()=>ne.current}}function pT(e){const t=B.useRef(e);return t.current=e,t}function oL(e){const t=pT(e);return function(r){return t.current[r]}}function mT(e){queueMicrotask(()=>{Fs.flushSync(()=>e())})}var wh=rL(e=>e);function Ll(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function aL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Sh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=yn(f,["asChild","children"]);if(!s)return B.createElement(e,le(H({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=aL(c);return B.cloneElement(c,le(H({},Ft(u,c.props)),{ref:r?Ll(r,d):d}))}));return t.displayName=e.displayName||e.name,t},ln=(()=>{const e=new Map;return new Proxy(Sh,{apply(t,n,r){return Sh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Sh(r)),e.get(r)}})})();function uL(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function rs(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:uL(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[lL,vh]=rs({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[gT,Ca]=rs({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),ET=B.forwardRef((e,t)=>{const n=vh(),r=Ca(),s=Ft(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(ln.div,le(H({},s),{ref:Ll(r.ref,t)}))});ET.displayName="PopoverContent";const yT=B.forwardRef((e,t)=>{const n=vh(),r=Ca(),s=Ft(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(ln.div,le(H({},s),{ref:t}))});yT.displayName="PopoverPositioner";const Oa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},H({},e)]),TT=e=>Oa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function cL(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var dL={props({props:e}){return le(H({},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",Zs(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Mt(()=>{var c,d;const u=Dl(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})=>{Mt(()=>{e.set("prevAnimationName",Dl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Dl(t.get("styles")))},u=d=>{const f=Dl(t.get("styles"));ar(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=Il(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),dT(()=>c())}}}}};function Dl(e){return(e==null?void 0:e.animationName)||"none"}ro()(["onExitComplete","present","immediate"]);function fL(e,t={}){const{sync:n=!1}=t,r=hL(e);return B.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function hL(e){const t=B.useRef(e);return t.current=e,t}const Ah=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=yn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=le(H({},a),{present:r,onExitComplete:fL(e.onExitComplete)}),d=Rl(dL,c),f=cL(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var is=(e,t=[])=>({parts:(...n)=>{if(pL(t))return is(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>is(e,[...t,...n]),omit:(...n)=>is(e,t.filter(r=>!n.includes(r))),rename:n=>is(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${io(e)}"][data-part="${io(r)}"]`,`& [data-scope="${io(e)}"][data-part="${io(r)}"]`].join(", "),attrs:{"data-scope":io(e),"data-part":io(r)}}}),{})}),io=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),pL=e=>e.length===0;const mL=["top","right","bottom","left"],di=Math.min,Hr=Math.max,Ml=Math.round,Fl=Math.floor,vr=e=>({x:e,y:e}),gL={left:"right",right:"left",bottom:"top",top:"bottom"};function bT(e,t,n){return Hr(e,di(t,n))}function jr(e,t){return typeof e=="function"?e(t):e}function fi(e){return e.split("-")[0]}function so(e){return e.split("-")[1]}function kh(e){return e==="x"?"y":"x"}function Nh(e){return e==="y"?"height":"width"}function Ar(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ch(e){return kh(Ar(e))}function EL(e,t,n){n===void 0&&(n=!1);const r=so(e),s=Ch(e),a=Nh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Bl(u)),[u,Bl(u)]}function yL(e){const t=Bl(e);return[Oh(e),t,Oh(t)]}function Oh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const xT=["left","right"],_T=["right","left"],TL=["top","bottom"],bL=["bottom","top"];function xL(e,t,n){switch(e){case"top":case"bottom":return n?t?_T:xT:t?xT:_T;case"left":case"right":return t?TL:bL;default:return[]}}function _L(e,t,n,r){const s=so(e);let a=xL(fi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Oh)))),a}function Bl(e){const t=fi(e);return gL[t]+e.slice(t.length)}function wL(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function wT(e){return typeof e!="number"?wL(e):{top:e,right:e,bottom:e,left:e}}function Ul(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ST(e,t,n){let{reference:r,floating:s}=e;const a=Ar(t),u=Ch(t),c=Nh(u),d=fi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const x=so(t);return x&&(y[u]+=b*(x==="end"?1:-1)*(n&&f?-1:1)),y}function SL(e,t){return Ue(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=jr(t,e),x=wT(y),v=c[b?m==="floating"?"reference":"floating":m],w=Ul(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),N=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),j=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},X=Ul(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:C,strategy:d}):N);return{top:(w.top-X.top+x.top)/j.y,bottom:(X.bottom-w.bottom+x.bottom)/j.y,left:(w.left-X.left+x.left)/j.x,right:(X.right-w.right+x.right)/j.x}})}const vL=50,AL=(e,t,n)=>Ue(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:le(H({},u),{detectOverflow:SL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=ST(f,r,d),b=r,y=0;const x={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:w,fn:N}=v,{x:C,y:j,data:X,reset:L}=yield N({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=j!=null?j:m,x[w]=H(H({},x[w]),X),L&&y<vL&&(y++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:p,y:m}=ST(f,b,d)),A=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:x}}),kL=e=>({name:"arrow",options:e,fn(n){return Ue(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=jr(e,n)||{};if(p==null)return{};const b=wT(m),y={x:r,y:s},x=Ch(a),A=Nh(x),v=yield c.getDimensions(p),w=x==="y",N=w?"top":"left",C=w?"bottom":"right",j=w?"clientHeight":"clientWidth",X=u.reference[A]+u.reference[x]-y[x]-u.floating[A],L=y[x]-u.reference[x],G=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=G?G[j]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(G)))&&(ne=d.floating[j]||u.floating[A]);const de=X/2-L/2,z=ne/2-v[A]/2-1,ae=di(b[N],z),oe=di(b[C],z),pe=ne-v[A]-oe,ce=ne/2-v[A]/2+de,se=bT(ae,ce,pe),Ae=!f.arrow&&so(a)!=null&&ce!==se&&u.reference[A]/2-(ce<ae?ae:oe)-v[A]/2<0,re=Ae?ce<ae?ce-ae:ce-pe:0;return{[x]:y[x]+re,data:H({[x]:se,centerOffset:ce-se-re},Ae&&{alignmentOffset:re}),reset:Ae}})}}),NL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ue(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,se=jr(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=se,w=yn(se,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=fi(a),C=Ar(d),j=fi(d)===d,X=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(j||!v?[Bl(d)]:yL(d)),G=A!=="none";!y&&G&&L.push(..._L(d,v,A,X));const ne=[d,...L],de=yield f.detectOverflow(n,w),z=[];let ae=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&z.push(de[N]),b){const Ae=EL(a,c,X);z.push(de[Ae[0]],de[Ae[1]])}if(ae=[...ae,{placement:a,overflows:z}],!z.every(Ae=>Ae<=0)){var oe,pe;const Ae=(((oe=u.flip)==null?void 0:oe.index)||0)+1,re=ne[Ae];if(re&&(!(b==="alignment"?C!==Ar(re):!1)||ae.every(k=>Ar(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:Ae,overflows:ae},reset:{placement:re}};let Y=(pe=ae.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:pe.placement;if(!Y)switch(x){case"bestFit":{var ce;const ie=(ce=ae.filter(k=>{if(G){const D=Ar(k.placement);return D===C||D==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(D=>D>0).reduce((D,Z)=>D+Z,0)]).sort((k,D)=>k[1]-D[1])[0])==null?void 0:ce[0];ie&&(Y=ie);break}case"initialPlacement":Y=d;break}if(a!==Y)return{reset:{placement:Y}}}return{}})}}};function vT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AT(e){return mL.some(t=>e[t]>=0)}const CL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ue(this,null,function*(){const{rects:r,platform:s}=n,c=jr(e,n),{strategy:a="referenceHidden"}=c,u=yn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,le(H({},u),{elementContext:"reference"})),f=vT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:AT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,le(H({},u),{altBoundary:!0})),f=vT(d,r.floating);return{data:{escapedOffsets:f,escaped:AT(f)}}}default:return{}}})}}},kT=new Set(["left","top"]);function OL(e,t){return Ue(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=fi(n),c=so(n),d=Ar(n)==="y",f=kT.has(u)?-1:1,p=a&&d?-1:1,m=jr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const IL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ue(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield OL(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:le(H({},f),{placement:c})}})}}},PL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ue(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=jr(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:X,y:L}=j;return{x:X,y:L}}}}=C,p=yn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Ar(a),x=kh(y);let A=m[x],v=m[y];const w=(j,X)=>bT(X+b[j==="y"?"top":"left"],X,X-b[j==="y"?"bottom":"right"]);c&&(A=w(x,A)),d&&(v=w(y,v));const N=f.fn(le(H({},n),{[x]:A,[y]:v}));return le(H({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[x]:c,[y]:d}}})})}}},RL=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=jr(e,t),b={x:s,y:a},y=Ar(u),x=kh(y);let A=b[x],v=b[y];const w=jr(f,t),N=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const X=x==="y"?"height":"width",L=c.reference[x]-c.floating[X]+N.mainAxis,G=c.reference[x]+c.reference[X]-N.mainAxis;A<L?A=L:A>G&&(A=G)}if(m){var C,j;const X=x==="y"?"width":"height",L=kT.has(fi(u)),G=c.reference[y]-c.floating[X]+(L&&((C=d.offset)==null?void 0:C[y])||0)+(L?0:N.crossAxis),ne=c.reference[y]+c.reference[X]+(L?0:((j=d.offset)==null?void 0:j[y])||0)-(L?N.crossAxis:0);v<G?v=G:v>ne&&(v=ne)}return{[x]:A,[y]:v}}}},LL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ue(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,z=jr(e,n),{apply:c=()=>{}}=z,d=yn(z,["apply"]),f=yield a.detectOverflow(n,d),p=fi(r),m=so(r),b=Ar(r)==="y",{width:y,height:x}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const w=x-f.top-f.bottom,N=y-f.left-f.right,C=di(x-f[A],w),j=di(y-f[v],N),X=n.middlewareData.shift,L=!X;let G=C,ne=j;X!=null&&X.enabled.x&&(ne=N),X!=null&&X.enabled.y&&(G=w),L&&!m&&(b?ne=y-2*Hr(f.left,f.right):G=x-2*Hr(f.top,f.bottom)),yield c(le(H({},n),{availableWidth:ne,availableHeight:G}));const de=yield a.getDimensions(u.floating);return y!==de.width||x!==de.height?{reset:{rects:!0}}:{}})}}};function Hl(){return typeof window!="undefined"}function oo(e){return NT(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kr(e){var t;return(t=(NT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function NT(e){return Hl()?e instanceof Node||e instanceof Fn(e).Node:!1}function ur(e){return Hl()?e instanceof Element||e instanceof Fn(e).Element:!1}function Nr(e){return Hl()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function CT(e){return!Hl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function Ia(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function DL(e){return/^(table|td|th)$/.test(oo(e))}function jl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const ML=/transform|translate|scale|rotate|perspective|filter/,FL=/paint|layout|strict|content/,ss=e=>!!e&&e!=="none";let Ih;function Ph(e){const t=ur(e)?lr(e):e;return ss(t.transform)||ss(t.translate)||ss(t.scale)||ss(t.rotate)||ss(t.perspective)||!Rh()&&(ss(t.backdropFilter)||ss(t.filter))||ML.test(t.willChange||"")||FL.test(t.contain||"")}function BL(e){let t=hi(e);for(;Nr(t)&&!ao(t);){if(Ph(t))return t;if(jl(t))return null;t=hi(t)}return null}function Rh(){return Ih==null&&(Ih=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ih}function ao(e){return/^(html|body|#document)$/.test(oo(e))}function lr(e){return Fn(e).getComputedStyle(e)}function $l(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(oo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||CT(e)&&e.host||kr(e);return CT(t)?t.host:t}function OT(e){const t=hi(e);return ao(t)?(e.ownerDocument||e).body:Nr(t)&&Ia(t)?t:OT(t)}function Pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=OT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Fn(s);if(a){const c=Lh(u);return t.concat(u,u.visualViewport||[],Ia(s)?s:[],c&&n?Pa(c):[])}else return t.concat(s,Pa(s,[],n))}function Lh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IT(e){const t=lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Ml(n)!==a||Ml(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Dh(e){return ur(e)?e:e.contextElement}function uo(e){const t=Dh(e);if(!Nr(t))return vr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=IT(t);let u=(a?Ml(n.width):n.width)/r,c=(a?Ml(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const UL=vr(0);function PT(e){const t=Fn(e);return!Rh()||!t.visualViewport?UL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function os(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Dh(e);let u=vr(1);t&&(r?ur(r)&&(u=uo(r)):u=uo(e));const c=HL(a,n,r)?PT(a):vr(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=Fn(a),y=r&&ur(r)?Fn(r):r;let x=b,A=Lh(x);for(;A&&r&&y!==x;){const v=uo(A),w=A.getBoundingClientRect(),N=lr(A),C=w.left+(A.clientLeft+parseFloat(N.paddingLeft))*v.x,j=w.top+(A.clientTop+parseFloat(N.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=j,x=Fn(A),A=Lh(x)}}return Ul({width:p,height:m,x:d,y:f})}function zl(e,t){const n=$l(e).scrollLeft;return t?t.left+n:os(kr(e)).left+n}function RT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-zl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function jL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=kr(r),c=t?jl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=vr(1);const p=vr(0),m=Nr(r);if((m||!m&&!a)&&((oo(r)!=="body"||Ia(u))&&(d=$l(r)),Nr(r))){const y=os(r);f=uo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?RT(u,d):vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function $L(e){return Array.from(e.getClientRects())}function zL(e){const t=kr(e),n=$l(e),r=e.ownerDocument.body,s=Hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+zl(e);const c=-n.scrollTop;return lr(r).direction==="rtl"&&(u+=Hr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const LT=25;function VL(e,t){const n=Fn(e),r=kr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=Rh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=zl(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=LT&&(a-=x)}else f<=LT&&(a+=f);return{width:a,height:u,x:c,y:d}}const qL=new Set(["absolute","fixed"]);function YL(e,t){const n=os(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Nr(e)?uo(e):vr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function DT(e,t,n){let r;if(t==="viewport")r=VL(e,n);else if(t==="document")r=zL(kr(e));else if(ur(t))r=YL(t,n);else{const s=PT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ul(r)}function MT(e,t){const n=hi(e);return n===t||!ur(n)||ao(n)?!1:lr(n).position==="fixed"||MT(n,t)}function WL(e,t){const n=t.get(e);if(n)return n;let r=Pa(e,[],!1).filter(c=>ur(c)&&oo(c)!=="body"),s=null;const a=lr(e).position==="fixed";let u=a?hi(e):e;for(;ur(u)&&!ao(u);){const c=lr(u),d=Ph(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&qL.has(s.position)||Ia(u)&&!d&&MT(e,u))?r=r.filter(p=>p!==u):s=c,u=hi(u)}return t.set(e,r),r}function GL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?jl(t)?[]:WL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=DT(t,p,s);return f.top=Hr(m.top,f.top),f.right=di(m.right,f.right),f.bottom=di(m.bottom,f.bottom),f.left=Hr(m.left,f.left),f},DT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function XL(e){const{width:t,height:n}=IT(e);return{width:t,height:n}}function QL(e,t,n){const r=Nr(t),s=kr(t),a=n==="fixed",u=os(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=vr(0);function f(){d.x=zl(s)}if(r||!r&&!a)if((oo(t)!=="body"||Ia(s))&&(c=$l(t)),r){const y=os(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?RT(s,c):vr(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function Mh(e){return lr(e).position==="static"}function FT(e,t){if(!Nr(e)||lr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kr(e)===n&&(n=n.ownerDocument.body),n}function BT(e,t){const n=Fn(e);if(jl(e))return n;if(!Nr(e)){let s=hi(e);for(;s&&!ao(s);){if(ur(s)&&!Mh(s))return s;s=hi(s)}return n}let r=FT(e,t);for(;r&&DL(r)&&Mh(r);)r=FT(r,t);return r&&ao(r)&&Mh(r)&&!Ph(r)?n:r||BL(e)||n}const KL=function(e){return Ue(this,null,function*(){const t=this.getOffsetParent||BT,n=this.getDimensions,r=yield n(e.floating);return{reference:QL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function JL(e){return lr(e).direction==="rtl"}const ZL={convertOffsetParentRelativeRectToViewportRelativeRect:jL,getDocumentElement:kr,getClippingRect:GL,getOffsetParent:BT,getElementRects:KL,getClientRects:$L,getDimensions:XL,getScale:uo,isElement:ur,isRTL:JL};function UT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function e5(e,t){let n=null,r;const s=kr(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 f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const x=Fl(m),A=Fl(s.clientWidth-(p+b)),v=Fl(s.clientHeight-(m+y)),w=Fl(p),C={rootMargin:-x+"px "+-A+"px "+-v+"px "+-w+"px",threshold:Hr(0,di(1,d))||1};let j=!0;function X(L){const G=L[0].intersectionRatio;if(G!==d){if(!j)return u();G?u(!1,G):r=setTimeout(()=>{u(!1,1e-7)},1e3)}G===1&&!UT(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(X,le(H({},C),{root:s.ownerDocument}))}catch(L){n=new IntersectionObserver(X,C)}n.observe(e)}return u(!0),a}function t5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Dh(e),p=s||a?[...f?Pa(f):[],...Pa(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&c?e5(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(w=>{let[N]=w;N&&N.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,A=d?os(e):null;d&&v();function v(){const w=os(e);A&&!UT(A,w)&&n(),A=w,x=requestAnimationFrame(v)}return n(),()=>{var w;p.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const n5=IL,r5=PL,i5=NL,s5=LL,o5=CL,a5=kL,u5=RL,l5=(e,t,n)=>{const r=new Map,s=H({platform:ZL},n),a=le(H({},s.platform),{_c:r});return AL(e,t,le(H({},s),{platform:a}))};function HT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return le(H({},s),{toJSON:()=>s})}function c5(e){if(!e)return HT();const{x:t,y:n,width:r,height:s}=e;return HT(t,n,r,s)}function d5(e,t){return{contextElement:$t(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?c5(r):n.getBoundingClientRect()}}}var Ra=e=>({variable:e,reference:`var(${e})`}),$r={arrowSize:Ra("--arrow-size"),arrowSizeHalf:Ra("--arrow-size-half"),arrowBg:Ra("--arrow-background"),transformOrigin:Ra("--transform-origin"),arrowOffset:Ra("--arrow-offset")},f5=e=>e==="top"||e==="bottom"?"y":"x";function h5(e,t){return{name:"transformOrigin",fn(n){var de,z,ae,oe,pe;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=f5(d),p=((de=s.arrow)==null?void 0:de.x)||0,m=((z=s.arrow)==null?void 0:z.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+b/2,A=m+y/2,v=Math.abs(((ae=s.shift)==null?void 0:ae.y)||0),w=u.reference.height/2,N=y/2,C=(pe=(oe=e.offset)==null?void 0:oe.mainAxis)!=null?pe:e.gutter,j=typeof C=="number"?C+N:C!=null?C:N,X=v>j,L={top:`${x}px calc(100% + ${j}px)`,bottom:`${x}px ${-j}px`,left:`calc(100% + ${j}px) ${A}px`,right:`${-j}px ${A}px`}[d],G=`${x}px ${u.reference.y+w-c}px`,ne=!!e.overlap&&f==="y"&&X;return r.floating.style.setProperty($r.transformOrigin.variable,ne?G:L),{data:{transformOrigin:ne?G:L}}}}}var p5={name:"rects",fn({rects:e}){return{data:e}}},m5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${$r.arrowOffset.reference})`}),{}}}};function g5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var E5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function jT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Fh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function y5(e,t,n){const r=e||t.createElement("div");return a5({element:r,padding:n.arrowPadding})}function T5(e,t){var n;if(!U6((n=t.offset)!=null?n:t.gutter))return n5(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=g5(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return dh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function b5(e){if(!e.flip)return;const t=Fh(e.boundary);return i5(le(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function x5(e){if(!e.slide&&!e.overlap)return;const t=Fh(e.boundary);return r5(le(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:u5()}))}function _5(e){return s5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function w5(e){var t;if(e.hideWhenDetached)return o5({strategy:"referenceHidden",boundary:(t=Fh(e.boundary))!=null?t:"clippingAncestors"})}function S5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function v5(e,t,n={}){const r=d5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},E5,n),a=t.querySelector("[data-part=arrow]"),u=[T5(a,s),b5(s),x5(s),y5(a,t.ownerDocument,s),m5(a),h5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),_5(s),w5(s),p5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ue(null,null,function*(){var j;if(!r||!t)return;const A=yield l5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=Ks(t),w=jT(v,A.x),N=jT(v,A.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${N}px`),s.hideWhenDetached&&(((j=A.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const X=Zs(C);t.style.setProperty("--z-index",X.zIndex)}}),b=()=>Ue(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=S5(s.listeners),x=s.listeners?t5(r,t,b,y):G6;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function $T(e,t,n={}){const c=n,{defer:r}=c,s=yn(c,["defer"]),a=r?Mt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(v5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var A5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function k5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:$r.arrowSize.reference,height:$r.arrowSize.reference,[$r.arrowSizeHalf.variable]:`calc(${$r.arrowSize.reference} / 2)`,[$r.arrowOffset.variable]:`calc(${$r.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?A5[t.split("-")[0]]:void 0,background:$r.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var lo=new WeakMap,Vl=new WeakMap,ql={},Bh=0,zT=e=>e&&(e.host||zT(e.parentNode)),N5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=zT(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),C5=new Set(["script","output","status","next-route-announcer"]),O5=e=>C5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),I5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=N5(n,Array.isArray(e)?e:[e]);ql[r]||(ql[r]=new WeakMap);const c=ql[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&$t(y)&&tT(y,x=>{m(x)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))b(x);else try{if(O5(x))return;const v=x.getAttribute(s)==="true",w=(lo.get(x)||0)+1,N=(c.get(x)||0)+1;lo.set(x,w),c.set(x,N),d.push(x),w===1&&v&&Vl.set(x,!0),N===1&&x.setAttribute(r,""),v||x.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",x,A)}})};return b(n),f.clear(),Bh++,()=>{d.forEach(y=>{const x=lo.get(y)-1,A=c.get(y)-1;lo.set(y,x),c.set(y,A),x||(Vl.has(y)||y.removeAttribute(s),Vl.delete(y)),A||y.removeAttribute(r)}),Bh--,Bh||(lo=new WeakMap,lo=new WeakMap,Vl=new WeakMap,ql={})}},P5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,R5=(e,t=P5(e),n="data-aria-hidden",r=!0)=>{if(t)return I5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},L5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function VT(e,t={}){const{defer:n=!0}=t,r=n?L5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(R5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function D5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function M5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var qT="pointerdown.outside",YT="focus.outside";function F5(e){for(const t of e)if($t(t)&&Sr(t))return!0;return!1}var WT=e=>"clientY"in e;function B5(e,t){if(!WT(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 U5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function GT(e,t){if(!t||!WT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return U5(u,c)?r||a:!1}function H5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=wr(e),f=Ks(e),p=D5(f),m=M5(f);function b(C,j){if(!$t(j)||!j.isConnected||Qs(e,j)||B5(e,C)||c&&eT(e,j))return!1;const X=d.querySelector(`[aria-controls="${e.id}"]`);if(X){const G=bh(X);if(GT(C,G))return!1}const L=bh(e);return GT(C,L)?!1:!(n!=null&&n(j))}const y=new Set,x=ts(e==null?void 0:e.getRootNode());function A(C){function j(X){var de,z;const L=u&&!nT()?Mt:ae=>ae(),G=X!=null?X:C,ne=(z=(de=G==null?void 0:G.composedPath)==null?void 0:de.call(G))!=null?z:[G==null?void 0:G.target];L(()=>{const ae=x?ne[0]:ar(C);if(!(!e||!b(C,ae))){if(s||a){const oe=ch(s,a);e.addEventListener(qT,oe,{once:!0})}XT(e,qT,{bubbles:!1,cancelable:!0,detail:{originalEvent:G,contextmenu:C4(G),focusable:F5(ne),target:ae}})}})}C.pointerType==="touch"?(y.forEach(X=>X()),y.add(zt(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const v=new Set,w=setTimeout(()=>{v.add(zt(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function N(C){(u?Mt:X=>X())(()=>{var G,ne;const X=(ne=(G=C==null?void 0:C.composedPath)==null?void 0:G.call(C))!=null?ne:[C==null?void 0:C.target],L=x?X[0]:ar(C);if(!(!e||!b(C,L))){if(r||a){const de=ch(r,a);e.addEventListener(YT,de,{once:!0})}XT(e,YT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Sr(L),target:L}})}})}return nT()||(v.add(zt(d,"focusin",N,!0)),v.add(m.addEventListener("focusin",N,!0)),v.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(w),y.forEach(C=>C()),v.forEach(C=>C())}}function j5(e,t){const{defer:n}=t,r=n?Mt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(H5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function XT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function $5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return zt(wr(e),"keydown",n,{capture:!0})}var QT="layer:request-dismiss",Yn={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=>Qs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Qs(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=>Yn.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];V5(e,QT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),z5(e,QT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function z5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function V5(e,t,n){e.addEventListener(t,n,{once:!0})}var KT;function JT(){Yn.layers.forEach(({node:e})=>{e.style.pointerEvents=Yn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function q5(e){e.style.pointerEvents=""}function Y5(e,t){const n=wr(e),r=[];return Yn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(KT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=J4(()=>{const c=s();return $t(c)?c:null},{timeout:1e3});a.then(c=>r.push(Il(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Yn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=KT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function W5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){fh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Yn.add(f),JT();function p(A){var w,N;const v=ar(A.detail.originalEvent);Yn.isBelowPointerBlockingLayer(e)||Yn.isInBranch(v)||((w=t.onPointerDownOutside)==null||w.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(c&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var w,N;const v=ar(A.detail.originalEvent);Yn.isInBranch(v)||((w=t.onFocusOutside)==null||w.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(c&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function b(A){var v;Yn.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var C;if(!e)return!1;const v=typeof u=="function"?u():u,w=Array.isArray(v)?v:[v],N=(C=t.persistentElements)==null?void 0:C.map(j=>j()).filter($t);return N&&w.push(...N),w.some(j=>Qs(j,A))||Yn.isInNestedLayer(e,A)}const x=[a?Y5(e,t.persistentElements):void 0,$5(e,b),j5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{Yn.remove(e),JT(),q5(e),x.forEach(A=>A==null?void 0:A())}}function ZT(e,t){const{defer:n}=t,r=n?Mt:a=>a(),s=[];return s.push(r(()=>{const a=Gs(e)?e():e;s.push(W5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var G5=Object.defineProperty,X5=(e,t,n)=>t in e?G5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_t=(e,t,n)=>X5(e,typeof t!="symbol"?t+"":t,n),eb={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()}},Q5=[],K5=class{constructor(e,t){_t(this,"trapStack"),_t(this,"config"),_t(this,"doc"),_t(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),_t(this,"portalContainers",new Set),_t(this,"listenerCleanups",[]),_t(this,"handleFocus",r=>{const s=ar(r),a=this.findContainerIndex(s,r)>=0;if(a||kl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Na(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Na(f)>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}),_t(this,"handlePointerDown",r=>{const s=ar(r);if(!(this.findContainerIndex(s,r)>=0)){if(Da(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Da(this.config.allowOutsideClick,r)||r.preventDefault()}}),_t(this,"handleClick",r=>{const s=ar(r);this.findContainerIndex(s,r)>=0||Da(this.config.clickOutsideDeactivates,r)||Da(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),_t(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;La(r)&&r.preventDefault(),this.tryFocus(a)}}),_t(this,"handleEscapeKey",r=>{J5(r)&&Da(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),_t(this,"_mutationObserver"),_t(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.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 f=d;return b4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?x4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),_t(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),_t(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Sr(r)){const s=Js(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),_t(this,"tryFocus",r=>{if(r!==!1&&r!==Js(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,Z5(r)&&r.select()}}),_t(this,"deactivate",r=>{if(!this.state.active)return this;const s=H({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(),eb.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{tb(()=>{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(f,f),this}return f(),this}),_t(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),_t(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),_t(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),_t(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),_t(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),_t(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let 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&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),_t(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||ar(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?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:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Sr(u)&&!ns(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];c=Na(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else La(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Sr(u)&&!ns(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];c=Na(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else La(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||Q5;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return La(r)&&!r.shiftKey},isKeyBackward(r){return La(r)&&r.shiftKey}},t);this.doc=n.document||wr(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=>{E4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?eT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=eo(e,{getShadowRoot:this.config.getShadowRoot}),n=lT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(Na(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ns(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ns(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return eb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?tb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(zt(this.doc,"focusin",this.handleFocus,!0),zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),zt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Js(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},La=e=>e.key==="Tab",Da=(e,...t)=>typeof e=="function"?e(...t):e,J5=e=>!e.isComposing&&e.key==="Escape",tb=e=>setTimeout(e,0),Z5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function nb(e,t={}){let n;const r=Mt(()=>{const s=typeof e=="function"?e():e;if(s){n=new K5(s,le(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:wr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Uh="data-scroll-lock";function eD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function rb(e){const t=Zs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function ib(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Uh))return;const u=rb(r)||rb(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Uh,"");const d=()=>Q4(r,"--scrollbar-width",`${c}px`),f=eD(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[f]=`${c}px`),Il(s,x)},m=()=>{var X,L;const{scrollX:x,scrollY:A,visualViewport:v}=n,w=(X=v==null?void 0:v.offsetLeft)!=null?X:0,N=(L=v==null?void 0:v.offsetTop)!=null?L:0,C={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(N))}px`,left:`${-(x-Math.floor(w))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const j=Il(s,C);return()=>{j==null||j(),n.scrollTo({left:x,top:A,behavior:"instant"})}},b=[d(),Nl()?m():p()];return()=>{b.forEach(x=>x==null?void 0:x()),s.removeAttribute(Uh)}}var tD=is("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Cr=tD.build(),sb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},nD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},$h=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},rD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ub=e=>e.getById(sb(e)),co=e=>e.getById(ob(e)),fo=e=>e.getById(Hh(e)),lb=e=>e.getById(ab(e)),iD=e=>e.getById(jh(e)),sD=e=>e.getById($h(e));function oD(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=k5(le(H({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(le(H({id:nD(c)},Cr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(le(H({},Cr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(le(H({},Cr.anchor.attrs),{dir:u("dir"),id:sb(c)}))},getTriggerProps(){return t.button(le(H({},Cr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:ob(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Hh(c),onPointerDown(y){rT(y)&&k4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(le(H({},Cr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(H({id:ab(c)},Cr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(le(H({},Cr.content.attrs),{dir:u("dir"),id:Hh(c),tabIndex:-1,role:"dialog","aria-modal":Ky(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Xs(d),"aria-labelledby":m.title?jh(c):void 0,"aria-describedby":m.description?$h(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(le(H({},Cr.title.attrs),{id:jh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(le(H({},Cr.description.attrs),{id:$h(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(le(H({},Cr.closeTrigger.attrs),{dir:u("dir"),id:rD(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var aD={props({props:e}){return le(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({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=ub(n))!=null?a:co(n);return $T(r,()=>lb(n),le(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>fo(n);let s=!0;return ZT(r,{type:"popover",pointerBlocking:t("modal"),exclude:co(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:G4(()=>fo(t),{triggerElement:co(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?VT(()=>[fo(t),co(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return ib(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?nb(()=>fo(t),{initialFocus:()=>cT({root:fo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=ub(n))!=null?u:co(n);$T(s,()=>lb(n),le(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Mt(()=>{Object.assign(e.get("renderedElements"),{title:!!iD(t),description:!!sD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Mt(()=>{const n=cT({root:fo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Mt(()=>{const a=co(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})}}}};ro()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[gU,Yl]=rs({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[EU,zh]=rs({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),uD=e=>{const t=B.useId(),{getRootNode:n}=Yl(),{dir:r}=zh(),s=H({id:t,dir:r,getRootNode:n},e),a=Rl(aD,s);return oD(a,wh)},lD=e=>{const[t,u]=TT(e),c=u,{children:n}=c,r=yn(c,["children"]),s=uD(r),a=Ah(Ft({present:s.open},t));return _.jsx(lL,{value:s,children:_.jsx(gT,{value:a,children:n})})},cb=B.forwardRef((e,t)=>{const n=vh(),r=Ca(),s=Ft(le(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(ln.button,le(H({},s),{ref:t}))});cb.displayName="PopoverTrigger";function cD(e){return ot({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 dD(e){return ot({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 db(e){return ot({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 fb(e){return ot({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 fD(e){return ot({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function hD(e){return ot({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function Vh(e){return ot({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function hb(e){return ot({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 pD=({className:e,componentType:t,children:n})=>{const[r,s]=B.useState(!1),{globalClassName:a}=at(),u=f=>{s(f.open)},c=B.useCallback(()=>{s(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return _.jsxs(lD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(cb,{"aria-label":`Overflow menu for ${t}`,className:M(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(hb,{})}),_.jsx(yT,{children:_.jsx(ET,{className:M(`${O}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(zy.Provider,{value:d,children:n})})})]})};function pb(e){return ot({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 mb(e){return ot({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[mD,as]=rs({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),qh=B.forwardRef((e,t)=>{const n=as(),r=Ft(n.getControlProps(),e);return _.jsx(ln.div,le(H(H({},r),e),{ref:t}))});qh.displayName="CarouselControl";const Yh=B.forwardRef((e,t)=>{const[n,r]=Oa()(e,["readOnly","index"]),s=as(),a=Ft(s.getIndicatorProps(n),r);return _.jsx(ln.button,le(H({},a),{ref:t}))});Yh.displayName="CarouselIndicator";const Wh=B.forwardRef((e,t)=>{const n=as(),r=Ft(n.getIndicatorGroupProps(),e);return _.jsx(ln.div,le(H({},r),{ref:t}))});Wh.displayName="CarouselIndicatorGroup";const Gh=B.forwardRef((e,t)=>{const[n,r]=Oa()(e,["index","snapAlign"]),s=as(),a=Ft(s.getItemProps(n),r);return _.jsx(ln.div,le(H({},a),{ref:t}))});Gh.displayName="CarouselItem";const Xh=B.forwardRef((e,t)=>{const n=as(),r=Ft(n.getItemGroupProps(),e);return _.jsx(ln.div,le(H({},r),{ref:t}))});Xh.displayName="CarouselItemGroup";const Qh=B.forwardRef((e,t)=>{const n=as(),r=Ft(n.getNextTriggerProps(),e);return _.jsx(ln.button,le(H({},r),{ref:t}))});Qh.displayName="CarouselNextTrigger";const Kh=B.forwardRef((e,t)=>{const n=as(),r=Ft(n.getPrevTriggerProps(),e);return _.jsx(ln.button,le(H({},r),{ref:t}))});Kh.displayName="CarouselPrevTrigger";function gD(e){const t=Zs(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function ED(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 gb(e){let t=[];for(const n of e.children)t=t.concat(n,gb(n));return t}function Eb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?gb(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",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!ED(n,m,u))continue;const b=Zs(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const A=a==="x"?x:y,v=m[c]-n[c]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function yb(e){const t=e.getBoundingClientRect(),n=gD(e),r=Eb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Tb([...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(bb(0,s.x))),y:Tb([...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(bb(0,s.y)))}}function yD(e,t,n){const r=Eb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Tb=e=>[...new Set(e)],bb=(e,t)=>n=>Math.max(e,Math.min(t,n)),TD=is("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),zr=TD.build(),bD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},xD=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},Wl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},_D=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},wD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},SD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},xb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},vn=e=>e.getById(Wl(e)),_b=e=>X4(vn(e),"[data-part=item]"),vD=(e,t)=>e.getById(xb(e,t)),wb=e=>{const t=vn(e);if(!t)return;const n=eo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function AD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),A=c("slidesPerPage"),v=c("padding"),w=c("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(N,C){a({type:"INDEX.SET",index:N,instant:C})},scrollTo(N,C){a({type:"PAGE.SET",index:N,instant:C})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(le(H({},zr.root.attrs),{id:bD(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":A,"--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(le(H({},zr.itemGroup.attrs),{id:Wl(u),"data-orientation":c("orientation"),"data-dragging":Xs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){Qs(N.currentTarget,ar(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){Qs(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!rT(N))return;const C=ar(N);Sr(C)&&C!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:X6(N=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";N[C]<0&&!s("canScrollPrev")||N[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:v,[b?"paddingInline":"paddingBlock"]:v,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const C=r.get("slidesInView").includes(N.index);return t.element(le(H({},zr.item.attrs),{id:xD(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":Xs(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":w.item(N.index,c("slideCount")),"aria-hidden":Ky(!C),style:{scrollSnapAlign:(()=>{var ne;const j=(ne=N.snapAlign)!=null?ne:"start",X=c("slidesPerMove"),L=X==="auto"?Math.floor(c("slidesPerPage")):X;return(N.index+L)%L===0?j:void 0})()}}))},getControlProps(){return t.element(le(H({},zr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(le(H({},zr.prevTrigger.attrs),{id:wD(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":w.prevTrigger,"data-orientation":c("orientation"),"aria-controls":Wl(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(le(H({},zr.nextTrigger.attrs),{dir:c("dir"),id:_D(u),type:"button","aria-label":w.nextTrigger,"data-orientation":c("orientation"),"aria-controls":Wl(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(le(H({},zr.indicatorGroup.attrs),{dir:c("dir"),id:SD(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const C="indicator",j={ArrowDown(G){b||(a({type:"PAGE.NEXT",src:C}),G.preventDefault())},ArrowUp(G){b||(a({type:"PAGE.PREV",src:C}),G.preventDefault())},ArrowRight(G){b&&(a({type:"PAGE.NEXT",src:C}),G.preventDefault())},ArrowLeft(G){b&&(a({type:"PAGE.PREV",src:C}),G.preventDefault())},Home(G){a({type:"PAGE.SET",index:0,src:C}),G.preventDefault()},End(G){a({type:"PAGE.SET",index:y.length-1,src:C}),G.preventDefault()}},X=P4(N,{dir:c("dir"),orientation:c("orientation")}),L=j[X];L==null||L(N)}}))},getIndicatorProps(N){return t.button(le(H({},zr.indicator.attrs),{dir:c("dir"),id:xb(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":Xs(N.readOnly),"data-current":Xs(N.index===x),"aria-label":w.indicator(N.index),onClick(C){C.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(le(H({},zr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":Xs(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var kD={props({props:e}){return t4(e,["slideCount"],"carousel"),le(H({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:H({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:ND(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 B6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(vn(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=vn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),wb(e)});return wb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!vn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Mt(()=>{s(),Mt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return _b(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=vn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?R6(d,m):L6(d,m)},n.get("slidesInView"));n.set("slidesInView",D6(c))},{root:r,threshold:t("inViewThreshold")});return _b(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=vn(n);return r?zt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return Y4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return zt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=Xy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=vn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=vn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Yy(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=M6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=vn(r);if(!s)return;const a=yD(s,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=Xy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=vn(n);if(!r)return;const s=yb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=vn(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=vn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=vn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=yb(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Mt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=vD(n,e.get("page"));r&&Mt(()=>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 ND(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}ro()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ro()(["index","readOnly"]),ro()(["index","snapAlign"]);const CD=e=>{const t=B.useId(),{getRootNode:n}=Yl(),{dir:r}=zh(),s=H({id:t,dir:r,getRootNode:n},e),a=Rl(kD,s);return AD(a,wh)},Jh=B.forwardRef((e,t)=>{const[n,r]=Oa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=CD(n),a=Ft(s.getRootProps(),r);return _.jsx(mD,{value:s,children:_.jsx(ln.div,le(H({},a),{ref:t}))})});Jh.displayName="CarouselRoot";const OD=180,ID=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},PD=({globalClassName:e,className:t,itemMinWidth:n=OD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ne,de)=>({node:ne,key:B.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${de}`})),b=m.length,y=B.useRef(null),[x,A]=B.useState(0),{width:v}=kk();B.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,b]);const w=ID(r),N=n+w,C=x>0?(x+w)/N:1,j=Math.max(1,Math.floor(C));if(b===0)return null;const X=b>j,L=Math.ceil(b/j),G=X?Math.max(1,C):j;return _.jsxs(Jh,{ref:y,className:M(e,t,`${O}-carousel`),slidesPerPage:G,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[_.jsx(Xh,{className:M(e,`${O}-carousel__item-group`,{"carousel-row-container":!X}),children:m.map(({node:ne,key:de},z)=>_.jsx(Gh,{index:z,className:M(e,`${O}-carousel__item`),children:ne},de))}),c&&X&&_.jsxs(qh,{className:M(e,`${O}-carousel__control`),children:[_.jsx(Kh,{className:M(e,`${O}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(db,{size:"16px"})}),_.jsx(Qh,{className:M(e,`${O}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(fb,{size:"16px"})})]}),u&&X&&_.jsx(Wh,{className:M(e,`${O}-carousel__indicator-group`),children:Array.from({length:L},(ne,de)=>_.jsx(Yh,{index:de,className:M(e,`${O}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},RD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:M(e,`${O}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.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"})})}),[LD,DD]=rs({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),MD=e=>Oa()(e,["lazyMount","unmountOnExit"]),[FD,Ma]=rs({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Sb=B.forwardRef((e,t)=>{const n=Ma(),r=DD(),s=Ah(le(H({},r),{present:n.open})),a=Ft(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(ln.div,le(H({},a),{ref:Ll(s.ref,t)}))});Sb.displayName="DialogBackdrop";const Zh=B.forwardRef((e,t)=>{const n=Ma(),r=Ca(),s=Ft(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(ln.div,le(H({},s),{ref:Ll(r.ref,t)}))});Zh.displayName="DialogContent";const ep=B.forwardRef((e,t)=>{const n=Ma(),r=Ft(n.getDescriptionProps(),e);return _.jsx(ln.div,le(H({},r),{ref:t}))});ep.displayName="DialogDescription";const tp=B.forwardRef((e,t)=>{const n=Ma(),r=Ft(n.getPositionerProps(),e);return Ca().unmounted?null:_.jsx(ln.div,le(H({},r),{ref:t}))});tp.displayName="DialogPositioner";var BD=is("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),us=BD.build(),vb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},np=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Nb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Gl=e=>e.getById(np(e)),UD=e=>e.getById(vb(e)),HD=e=>e.getById(Ab(e)),jD=e=>e.getById(kb(e)),$D=e=>e.getById(rp(e)),zD=e=>e.getById(ip(e)),VD=e=>e.getById(Nb(e));function qD(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(le(H({},us.trigger.attrs),{dir:a("dir"),id:kb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":np(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(le(H({},us.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Ab(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(H({},us.positioner.attrs),{dir:a("dir"),id:vb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(le(H({},us.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:np(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:rp(u),"aria-describedby":f.description?ip(u):void 0}))},getTitleProps(){return t.element(le(H({},us.title.attrs),{dir:a("dir"),id:rp(u)}))},getDescriptionProps(){return t.element(le(H({},us.description.attrs),{dir:a("dir"),id:ip(u)}))},getCloseTriggerProps(){return t.button(le(H({},us.closeTrigger.attrs),{dir:a("dir"),id:Nb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var YD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>VD(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return H({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return ZT(()=>Gl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[jD(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return ib(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?nb(()=>Gl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?VT(()=>[Gl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Mt(()=>{e.set("rendered",{title:!!$D(t),description:!!zD(t)})})},syncZIndex({scope:e}){Mt(()=>{const t=Gl(e);if(!t)return;const n=Zs(t);[UD(e),HD(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ro()(["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 WD=e=>{const t=B.useId(),{getRootNode:n}=Yl(),{dir:r}=zh(),s=H({id:t,getRootNode:n,dir:r},e),a=Rl(YD,s);return qD(a,wh)},Cb=e=>{const[t,c]=TT(e),d=c,{children:n}=d,r=yn(d,["children"]),[s]=MD(t),a=WD(r),u=Ah(Ft({present:a.open},t));return _.jsx(FD,{value:a,children:_.jsx(LD,{value:s,children:_.jsx(gT,{value:u,children:n})})})},Ob=B.forwardRef((e,t)=>{const n=Ma(),r=Ft(n.getTitleProps(),e);return _.jsx(ln.h2,le(H({},r),{ref:t}))});Ob.displayName="DialogTitle";const GD=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=B.useMemo(()=>({isOpen:t}),[t]);return _.jsx(lh.Provider,{value:r,children:_.jsx($y.Provider,{value:s,children:e})})},Ib=()=>B.useContext($y),Pb=()=>{const e=B.useContext(lh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},XD=`${O}-overflow-menu-button-trigger`,QD=({componentType:e,children:t})=>{const{isOpen:n}=Ib(),{closeMenu:r}=Pb(),{globalClassName:s}=at(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${XD}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:M(`${O}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},KD=({componentType:e,className:t})=>{const{toggleMenu:n}=Pb(),{isOpen:r}=Ib(),{globalClassName:s}=at();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:M(`${O}-overflow-menu-button-trigger`,`${O}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(hb,{})})};class JD{constructor(){Ye(this,"initialState",Vg);Ye(this,"promptsStateProxy");Ye(this,"promptsParamsProxy");Ye(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ye(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return t8(n,r),Reflect.set(t,n,r)});Ye(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ye(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ye(this,"updatePromptsParamsProxy",t=>new Proxy(H({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const pi=new JD,ZD=e=>{window.addEventListener(Od,e)},e8=e=>{window.removeEventListener(Od,e)},t8=(e,t)=>{const n=new CustomEvent(Od,{detail:{property:e,value:t}});window.dispatchEvent(n)},Rb=e=>{const t=pi.isOpen,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isOpen=n},n8=e=>{const t=pi.isInline,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isInline=n},r8=({elementId:e,entryType:t,params:n,isInline:r})=>{pi.promptsStateProxy.elementId=e,t&&(pi.promptsStateProxy.entryType=t),typeof r=="boolean"&&n8(r),n&&pi.updatePromptsParamsProxy(n),pi.isOpen||Rb(!0)},i8=()=>{const e=B.useContext(Gg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},s8=()=>{const e=B.useContext(Yg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Xl=()=>{const e=B.useContext(qg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},o8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{previousComponentType:r}=ri(),s=Ws(),a=()=>{Ou(r||"dialog"),s()};return t?_.jsx(ir,{className:M(n,`${O}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(pb,{})}):_.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(pb,{}),"Show ",r||"dialog"]})},a8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{isModalFullscreen:r}=ri(),s=Ws(),a=()=>{Pd(!r),s()},u=r?rN:iN,c="Toggle Fullscreen";return t?_.jsx(ir,{ariaLabel:c,title:c,className:M(n,`${O}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),c]})},u8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{dialogPosition:r}=ri(),s=Ws(),a=r==="bottom-left",u=()=>{Rd(a?"bottom-right":"bottom-left"),s()},c=a?dD:cD,d=a?"Move right":"Move left";return t?_.jsx(ir,{className:M(n,`${O}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(c,{})}):_.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(c,{}),d]})},Lb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:c}=at(),{mode:d}=ri(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",b=m?o8:Fb,y=m?a8:u8,x=B.useMemo(()=>s?Qk(s):{},[s]);return _.jsx(GD,{children:_.jsxs("div",{className:M(a,`${O}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:M(a,`${O}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:M(a,`${O}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(Ob,{className:M(a,`${O}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:M(a,`${O}-${e}-controls`),children:[_.jsx(b,{componentType:e,isIcon:!0}),_.jsx(KD,{componentType:e}),_.jsx(RD,{className:M(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(QD,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(h8,{componentType:e}),_.jsx(Vy,{componentType:e,onClearChat:t}),f&&_.jsx(qy,{componentType:e,onDownloadTranscript:r})]})]})})},Ql="USD",Vr=(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}`}},l8=({retailPrice:e,discountPrice:t,currencyCode:n=Ql})=>{const r=n||Ql,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Vr(a,r),comparePrice:Vr(u,r),hasDiscount:s}},Db=e=>typeof e=="number"&&Number.isFinite(e),c8=({priceBreakdown:e,currencyCode:t=Ql})=>{if(!e)return null;const n=t||Ql,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Db),a=r.map(p=>p==null?void 0:p.max).filter(Db);if(s.length===0||a.length===0)return null;const u=Math.min(...s),c=Math.max(...a);if(u===c)return null;const d=Vr(u,n),f=Vr(c,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},sp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=l8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:M(s,a,`${O}-price`),style:f,children:[_.jsx("span",{className:M(s,`${O}-price__amount`),children:u}),d&&c&&_.jsx("span",{className:M(s,`${O}-price__compare`),children:c})]})},d8={sparkle:Vh,plus:fD,"paper-plane":hD},Mb=({icon:e,className:t})=>{const n=d8[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},f8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=at(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=x=>_.jsxs(_.Fragment,{children:[c&&_.jsx(Mb,{icon:c,className:`${O}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:M(t,`${O}-suggestion-container ${f}`,e),children:n.map(x=>s?_.jsx(el,{disabled:r,className:M(t,`${O}-suggestion-button standalone`,m),onClick:p(x),children:b(x)},x):_.jsx("button",{disabled:r,className:M(t,`${O}-suggestion-button embedded`,m),onClick:p(x),children:b(x)},x))})},h8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=at();if(!r)return null;const s=()=>{Br(!1),Cu(!0)};return t?_.jsx(ir,{className:M(n,`${O}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(a1,{})}):_.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(a1,{}),"Minimize"]})},Fb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),r=Ws(),s=()=>{Ou("modal"),r()};return t?_.jsx(ir,{className:M(n,`${O}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(mb,{})}):_.jsxs("button",{className:M(n,`${O}-overflow-menu-button`,`${O}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(mb,{}),"Show modal"]})},p8=["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"],m8=3e3,g8=400,E8=({globalClassName:e,isWidgetStandalone:t,messages:n=p8})=>{const[r,s]=B.useState(0),[a,u]=B.useState(!0);return B.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},g8)},m8);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),_.jsxs("div",{className:M(e,`${O}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${O}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${O}-connecting-pulse`}),_.jsx("div",{className:`${O}-connecting-ring`})]}),_.jsx("span",{className:M(`${O}-connecting-text`,a&&`${O}-connecting-text--visible`),children:n[r]})]})},y8=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${O}-processing-text`,children:t}):null,T8=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${O}-processing-shimmer-bar`}),_.jsx("div",{className:`${O}-processing-shimmer-bar`}),_.jsx("div",{className:`${O}-processing-shimmer-bar`})]}):null,op=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:M(e,`${O}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(y8,{shouldShow:!!n,loadingText:n}),_.jsx(T8,{shouldShow:!n})]});function Bb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function b8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function x8(e,t,n){const s=dl((n||{}).ignore||[]),a=_8(t);let u=-1;for(;++u<a.length;)_E(e,"text",c);function c(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],x=b?b.children:void 0;if(s(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let x=0;const v=m.children.indexOf(f);let w=!1,N=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const j=C.index,X={index:C.index,input:C.input,stack:[...p,f]};let L=y(...C,X);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?b.lastIndex=j+1:(x!==j&&N.push({type:"text",value:f.value.slice(x,j)}),Array.isArray(L)?N.push(...L):L&&N.push(L),x=j+C[0].length,w=!0),!b.global)break;C=b.exec(f.value)}return w?(x<f.value.length&&N.push({type:"text",value:f.value.slice(x)}),m.children.splice(v,1,...N)):N=[f],v+N.length}}function _8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([w8(s[0]),S8(s[1])])}return t}function w8(e){return typeof e=="string"?new RegExp(b8(e),"g"):e}function S8(e){return typeof e=="function"?e:function(){return e}}const ap="phrasing",up=["autolink","link","image","label"];function v8(){return{transforms:[P8],enter:{literalAutolink:k8,literalAutolinkEmail:lp,literalAutolinkHttp:lp,literalAutolinkWww:lp},exit:{literalAutolink:I8,literalAutolinkEmail:O8,literalAutolinkHttp:N8,literalAutolinkWww:C8}}}function A8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ap,notInConstruct:up},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ap,notInConstruct:up},{character:":",before:"[ps]",after:"\\/",inConstruct:ap,notInConstruct:up}]}}function k8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lp(e){this.config.enter.autolinkProtocol.call(this,e)}function N8(e){this.config.exit.autolinkProtocol.call(this,e)}function C8(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 O8(e){this.config.exit.autolinkEmail.call(this,e)}function I8(e){this.exit(e)}function P8(e){x8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),L8]],{ignore:["link","linkReference"]})}function R8(e,t,n,r,s){let a="";if(!Ub(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!D8(n)))return!1;const u=M8(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 L8(e,t,n,r){return!Ub(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function D8(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 M8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=Bb(e,"(");let a=Bb(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ub(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Gi(n)||il(n))&&(!t||n!==47)}Hb.peek=q8;function F8(){this.buffer()}function B8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function U8(){this.buffer()}function H8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function j8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $8(e){this.exit(e)}function z8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function V8(e){this.exit(e)}function q8(){return"["}function Hb(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function Y8(){return{enter:{gfmFootnoteCallString:F8,gfmFootnoteCall:B8,gfmFootnoteDefinitionLabelString:U8,gfmFootnoteDefinition:H8},exit:{gfmFootnoteCallString:j8,gfmFootnoteCall:$8,gfmFootnoteDefinitionLabelString:z8,gfmFootnoteDefinition:V8}}}function W8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Hb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=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?jb:G8))),f(),d}}function G8(e,t,n){return t===0?e:jb(e,t,n)}function jb(e,t,n){return(n?"":" ")+e}const X8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$b.peek=eM;function Q8(){return{canContainEols:["delete"],enter:{strikethrough:J8},exit:{strikethrough:Z8}}}function K8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:X8}],handlers:{delete:$b}}}function J8(e){this.enter({type:"delete",children:[]},e)}function Z8(e){this.exit(e)}function $b(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,le(H({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function eM(){return"~"}function tM(e){return e.length}function nM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||tM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],v=[];let w=-1;for(e[p].length>f&&(f=e[p].length);++w<e[p].length;){const N=rM(e[p][w]);if(n.alignDelimiters!==!1){const C=s(N);v[w]=C,(d[w]===void 0||C>d[w])&&(d[w]=C)}A.push(N)}u[p]=A,c[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=zb(r[m]);else{const A=zb(r);for(;++m<f;)a[m]=A}m=-1;const b=[],y=[];for(;++m<f;){const A=a[m];let v="",w="";A===99?(v=":",w=":"):A===108?v=":":A===114&&(w=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-w.length);const C=v+"-".repeat(N)+w;n.alignDelimiters!==!1&&(N=v.length+N+w.length,N>d[m]&&(d[m]=N),y[m]=N),b[m]=C}u.splice(1,0,b),c.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const A=u[p],v=c[p];m=-1;const w=[];for(;++m<f;){const N=A[m]||"";let C="",j="";if(n.alignDelimiters!==!1){const X=d[m]-(v[m]||0),L=a[m];L===114?C=" ".repeat(X):L===99?X%2?(C=" ".repeat(X/2+.5),j=" ".repeat(X/2-.5)):(C=" ".repeat(X/2),j=C):j=" ".repeat(X)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(C),w.push(N),n.alignDelimiters!==!1&&w.push(j),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}x.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return x.join(`
39
- `)}function rM(e){return e==null?"":String(e)}function zb(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 iM(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),sM);return s(),u}function sM(e,t,n){return">"+(n?"":" ")+e}function oM(e,t){return Vb(e,t.inConstruct,!0)&&!Vb(e,t.notInConstruct,!1)}function Vb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function qb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
- `&&oM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function aM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function uM(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 lM(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 cM(e,t,n,r){const s=lM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(uM(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,dM);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(aM(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,H({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,H({before:p,after:`
42
- `,encode:["`"]},c.current()))),m()}return p+=c.move(`
43
- `),a&&(p+=c.move(a+`
44
- `)),p+=c.move(d),f(),p}function dM(e,t,n){return(n?"":" ")+e}function cp(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 fM(e,t,n,r){const s=cp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),H({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":`
45
- `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,H({before:f,after:s},d.current()))),f+=d.move(s),c()),u(),f}function hM(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 Fa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kl(e,t,n){const r=js(e),s=js(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Yb.peek=pM;function Yb(e,t,n,r){const s=hM(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,H({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=Kl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Fa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=Kl(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Fa(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function pM(e,t,n){return n.options.emphasis||"*"}function mM(e,t){let n=!1;return hl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Mf}),!!((!e.depth||e.depth<3)&&vf(e)&&(t.options.setext||n))}function gM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(mM(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,le(H({},a.current()),{before:`
35
+ `}),n}function wE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function SE(e,t){const n=IO(e,t),r=n.one(e,void 0),s=xO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
+ `},s),a}function MO(e,t){return e&&"run"in e?function(n,r){return Fe(this,null,function*(){const s=SE(n,j({file:r},t));yield e.run(s,r)})}:function(n,r){return SE(n,j({file:r},e||t))}}function vE(e){if(e)throw e}var Uf,AE;function FO(){if(AE)return Uf;AE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var x;for(x in f);return typeof x=="undefined"||e.call(f,x)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Uf=function d(){var f,p,m,x,y,b,v=arguments[0],A=1,w=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<w;++A)if(f=arguments[A],f!=null)for(p in f)m=l(v,p),x=l(f,p),v!==x&&(k&&x&&(a(x)||(y=s(x)))?(y?(y=!1,b=m&&s(m)?m:[]):b=m&&a(m)?m:{},u(v,{name:p,newValue:d(k,b,x)})):typeof x!="undefined"&&u(v,{name:p,newValue:x}));return v},Uf}var BO=FO();const Hf=tt(BO);function jf(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 UO(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...s);function l(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?HO(p,l)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function HO(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return s(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...l){n||(n=!0,t(u,...l))}function a(u){s(null,u)}}const Sr={basename:jO,dirname:$O,extname:zO,join:VO,sep:"/"};function jO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ma(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function $O(e){if(ma(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 zO(e){ma(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function VO(...e){let t=-1,n;for(;++t<e.length;)ma(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qO(n)}function qO(e){ma(e);const t=e.codePointAt(0)===47;let n=YO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function YO(e,t){let n="",r=0,s=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function ma(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WO={cwd:GO};function GO(){return"/"}function $f(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function XO(e){if(typeof e=="string")e=new URL(e);else if(!$f(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 QO(e)}function QO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const zf=["history","path","basename","stem","extname","dirname"];class NE{constructor(t){let n;t?$f(t)?n={path:t}:typeof t=="string"||KO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":WO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<zf.length;){const a=zf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)zf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Sr.basename(this.path):void 0}set basename(t){qf(t,"basename"),Vf(t,"basename"),this.path=Sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Sr.dirname(this.path):void 0}set dirname(t){kE(this.basename,"dirname"),this.path=Sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Sr.extname(this.path):void 0}set extname(t){if(Vf(t,"extname"),kE(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=Sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$f(t)&&(t=XO(t)),qf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Sr.basename(this.path,this.extname):void 0}set stem(t){qf(t,"stem"),Vf(t,"stem"),this.path=Sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new un(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Vf(e,t){if(e&&e.includes(Sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sr.sep+"`")}function qf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function kE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function KO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),ZO={}.hasOwnProperty;class Yf extends JO{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=UO()}copy(){const t=new Yf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Hf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Xf("data",this.frozen),this.namespace[t]=n,this):ZO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ml(t),r=this.parser||this.Parser;return Wf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Wf("process",this.parser||this.Parser),Gf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=ml(t),d=r.parse(l);r.run(d,l,function(p,m,x){if(p||!m||!x)return f(p);const y=m,b=r.stringify(y,x);nI(b)?x.value=b:x.result=b,f(p,x)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Wf("processSync",this.parser||this.Parser),Gf("processSync",this.compiler||this.Compiler),this.process(t,s),OE("processSync","process",n),r;function s(a,u){n=!0,vE(a),r=u}}run(t,n,r){CE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=ml(n);s.run(t,d,f);function f(p,m,x){const y=m||t;p?l(p):u?u(y):r(void 0,y,x)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),OE("runSync","run",r),s;function a(u,l){vE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=ml(n),s=this.compiler||this.Compiler;return Gf("stringify",s),CE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Xf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(s.settings=Hf(!0,s.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,x=-1;for(;++m<r.length;)if(r[m][0]===f){x=m;break}if(x===-1)r.push([f,...p]);else if(p.length>0){let[y,...b]=p;const v=r[x][1];jf(v)&&jf(y)&&(y=Hf(!0,v,y)),r[x]=[f,y,...b]}}}}const eI=new Yf().freeze();function Wf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xf(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 CE(e){if(!jf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function OE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ml(e){return tI(e)?e:new NE(e)}function tI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function nI(e){return typeof e=="string"||rI(e)}function rI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",IE=[],PE={allowDangerousHtml:!0},sI=/^(https?|ircs?|mailto|xmpp)$/i,oI=[{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 RE(e){const t=aI(e),n=uI(e);return lI(t.runSync(t.parse(n),n),e)}function aI(e){const t=e.rehypePlugins||IE,n=e.remarkPlugins||IE,r=e.remarkRehypeOptions?j(j({},e.remarkRehypeOptions),PE):PE;return eI().use($3).use(n).use(MO,r).use(t)}function uI(e){const t=e.children||"",n=new NE;return typeof t=="string"&&(n.value=t),n}function lI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||cI;for(const p of oI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+iI+p.id,void 0);return pl(e,f),Lk(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,x){if(p.type==="raw"&&x&&typeof m=="number")return u?x.children.splice(m,1):x.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in vf)if(Object.hasOwn(vf,y)&&Object.hasOwn(p.properties,y)){const b=p.properties[y],v=vf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(b||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,x)),y&&x&&typeof m=="number")return l&&p.children?x.children.splice(m,1,...p.children):x.children.splice(m,1),m}}}function cI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||sI.test(e.slice(0,t))?e:""}const LE=/[#.]/g;function dI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){LE.lastIndex=s;const l=LE.exec(n),d=n.slice(s,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),l&&(a=l[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function DE(e,t,n){const r=n?mI(n):void 0;function s(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=dI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,fI(u))l.unshift(u);else for(const[m,x]of Object.entries(u))hI(e,d.properties,m,x)}for(const f of l)Qf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function fI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function hI(e,t,n,r){const s=nl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=S1(r):s.commaSeparated?a=d1(r):s.commaOrSpaceSeparated?a=S1(d1(r).join(" ")):a=ME(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?pI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(ME(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function Qf(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)Qf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Qf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ME(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ia(n)===ia(t)))return!0}return n}function pI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function mI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const gI=["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"],EI=DE(sa,"div"),yI=DE(ui,"g",gI);function TI(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=FE(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],d=FE(t,l),f=d===-1?t.length+1:d+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function FE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const es={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},BE={}.hasOwnProperty,bI=Object.prototype;function xI(e,t){const n=t||{};return Kf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ui:sa,verbose:n.verbose||!1},e)}function Kf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},gl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:UE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=TI(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},gl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},gl(e,r,n),n}default:return n=_I(e,t),n}}function UE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Kf(e,t[n]);r.push(s)}return r}function _I(e,t){const n=e.schema;e.schema=t.namespaceURI===es.svg?ui:sa;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;BE.call(bI,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?yI:EI)(t.tagName,s,UE(e,t.childNodes));if(gl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&zs(d.startTag),p=d&&d.endTag&&zs(d.endTag),m=Kf(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function gl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=wI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function wI(e,t,n){const r=zs(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)BE.call(n.attrs,u)&&(a[nl(e.schema,u).property]=zs(n.attrs[u]));n.startTag;const l=zs(n.startTag),d=n.endTag?zs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function zs(e){const t=HE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=HE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function HE(e){return e.line&&e.column?e:void 0}const jE={}.hasOwnProperty;function $E(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&jE.call(s,e)){const d=String(s[e]);u=jE.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const SI={},vI={}.hasOwnProperty,zE=$E("type",{handlers:{root:NI,element:PI,text:OI,comment:II,doctype:CI}});function AI(e,t){const r=(t||SI).space;return zE(e,r==="svg"?ui:sa)}function NI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Jf(e.children,n,t),Vs(e,n),n}function kI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Jf(e.children,n,t),Vs(e,n),n}function CI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Vs(e,t),t}function OI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Vs(e,t),t}function II(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Vs(e,t),t}function PI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ui);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&vI.call(e.properties,a)){const d=RI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:es[u],childNodes:[],parentNode:null};return l.childNodes=Jf(e.children,l,r),Vs(e,l),e.tagName==="template"&&e.content&&(l.content=kI(e.content,r)),l}function RI(e,t,n){const r=nl(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?f1(n):v1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=es[r.space]}return s}function Jf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=zE(e[r],n);a.parentNode=t,s.push(a)}return s}function Vs(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 LI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],DI=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]),St="�";var O;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(O||(O={}));const kn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function VE(e){return e>=55296&&e<=57343}function MI(e){return e>=56320&&e<=57343}function FI(e,t){return(e-55296)*1024+9216+t}function qE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function YE(e){return e>=64976&&e<=65007||DI.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 BI=65536;class UI{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=BI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(MI(n))return this.pos++,this._addGap(),FI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,VE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){qE(t)?this._err(ne.controlCharacterInInputStream):YE(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 Ze;(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"})(Ze||(Ze={}));function WE(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 HI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),jI=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 $I(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=jI.get(e))!==null&&t!==void 0?t:e}var qt;(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"})(qt||(qt={}));const zI=32;var di;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(di||(di={}));function Zf(e){return e>=qt.ZERO&&e<=qt.NINE}function VI(e){return e>=qt.UPPER_A&&e<=qt.UPPER_F||e>=qt.LOWER_A&&e<=qt.LOWER_F}function qI(e){return e>=qt.UPPER_A&&e<=qt.UPPER_Z||e>=qt.LOWER_A&&e<=qt.LOWER_Z||Zf(e)}function YI(e){return e===qt.EQUALS||qI(e)}var Yt;(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"})(Yt||(Yt={}));var $r;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})($r||($r={}));class WI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Yt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$r.Strict}startEntity(t){this.decodeMode=t,this.state=Yt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Yt.EntityStart:return t.charCodeAt(n)===qt.NUM?(this.state=Yt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Yt.NamedEntity,this.stateNamedEntity(t,n));case Yt.NumericStart:return this.stateNumericStart(t,n);case Yt.NumericDecimal:return this.stateNumericDecimal(t,n);case Yt.NumericHex:return this.stateNumericHex(t,n);case Yt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|zI)===qt.LOWER_X?(this.state=Yt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Yt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Zf(s)||VI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Zf(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===qt.SEMI)this.consumed+=1;else if(this.decodeMode===$r.Strict)return 0;return this.emitCodePoint($I(this.result),this.consumed),this.errors&&(t!==qt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&di.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=GI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===$r.Attribute&&(a===0||YI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&di.VALUE_LENGTH)>>14,a!==0){if(u===qt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==$r.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&di.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~di.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Yt.NamedEntity:return this.result!==0&&(this.decodeMode!==$r.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Yt.NumericDecimal:return this.emitNumericEntity(0,2);case Yt.NumericHex:return this.emitNumericEntity(0,3);case Yt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Yt.EntityStart:return 0}}}function GI(e,t,n,r){const s=(t&di.BRANCH_LENGTH)>>7,a=t&di.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,l=u+s-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+s]}return-1}var me;(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/"})(me||(me={}));var ts;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ts||(ts={}));var Gn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Gn||(Gn={}));var Q;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Q||(Q={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const XI=new Map([[Q.A,g.A],[Q.ADDRESS,g.ADDRESS],[Q.ANNOTATION_XML,g.ANNOTATION_XML],[Q.APPLET,g.APPLET],[Q.AREA,g.AREA],[Q.ARTICLE,g.ARTICLE],[Q.ASIDE,g.ASIDE],[Q.B,g.B],[Q.BASE,g.BASE],[Q.BASEFONT,g.BASEFONT],[Q.BGSOUND,g.BGSOUND],[Q.BIG,g.BIG],[Q.BLOCKQUOTE,g.BLOCKQUOTE],[Q.BODY,g.BODY],[Q.BR,g.BR],[Q.BUTTON,g.BUTTON],[Q.CAPTION,g.CAPTION],[Q.CENTER,g.CENTER],[Q.CODE,g.CODE],[Q.COL,g.COL],[Q.COLGROUP,g.COLGROUP],[Q.DD,g.DD],[Q.DESC,g.DESC],[Q.DETAILS,g.DETAILS],[Q.DIALOG,g.DIALOG],[Q.DIR,g.DIR],[Q.DIV,g.DIV],[Q.DL,g.DL],[Q.DT,g.DT],[Q.EM,g.EM],[Q.EMBED,g.EMBED],[Q.FIELDSET,g.FIELDSET],[Q.FIGCAPTION,g.FIGCAPTION],[Q.FIGURE,g.FIGURE],[Q.FONT,g.FONT],[Q.FOOTER,g.FOOTER],[Q.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[Q.FORM,g.FORM],[Q.FRAME,g.FRAME],[Q.FRAMESET,g.FRAMESET],[Q.H1,g.H1],[Q.H2,g.H2],[Q.H3,g.H3],[Q.H4,g.H4],[Q.H5,g.H5],[Q.H6,g.H6],[Q.HEAD,g.HEAD],[Q.HEADER,g.HEADER],[Q.HGROUP,g.HGROUP],[Q.HR,g.HR],[Q.HTML,g.HTML],[Q.I,g.I],[Q.IMG,g.IMG],[Q.IMAGE,g.IMAGE],[Q.INPUT,g.INPUT],[Q.IFRAME,g.IFRAME],[Q.KEYGEN,g.KEYGEN],[Q.LABEL,g.LABEL],[Q.LI,g.LI],[Q.LINK,g.LINK],[Q.LISTING,g.LISTING],[Q.MAIN,g.MAIN],[Q.MALIGNMARK,g.MALIGNMARK],[Q.MARQUEE,g.MARQUEE],[Q.MATH,g.MATH],[Q.MENU,g.MENU],[Q.META,g.META],[Q.MGLYPH,g.MGLYPH],[Q.MI,g.MI],[Q.MO,g.MO],[Q.MN,g.MN],[Q.MS,g.MS],[Q.MTEXT,g.MTEXT],[Q.NAV,g.NAV],[Q.NOBR,g.NOBR],[Q.NOFRAMES,g.NOFRAMES],[Q.NOEMBED,g.NOEMBED],[Q.NOSCRIPT,g.NOSCRIPT],[Q.OBJECT,g.OBJECT],[Q.OL,g.OL],[Q.OPTGROUP,g.OPTGROUP],[Q.OPTION,g.OPTION],[Q.P,g.P],[Q.PARAM,g.PARAM],[Q.PLAINTEXT,g.PLAINTEXT],[Q.PRE,g.PRE],[Q.RB,g.RB],[Q.RP,g.RP],[Q.RT,g.RT],[Q.RTC,g.RTC],[Q.RUBY,g.RUBY],[Q.S,g.S],[Q.SCRIPT,g.SCRIPT],[Q.SEARCH,g.SEARCH],[Q.SECTION,g.SECTION],[Q.SELECT,g.SELECT],[Q.SOURCE,g.SOURCE],[Q.SMALL,g.SMALL],[Q.SPAN,g.SPAN],[Q.STRIKE,g.STRIKE],[Q.STRONG,g.STRONG],[Q.STYLE,g.STYLE],[Q.SUB,g.SUB],[Q.SUMMARY,g.SUMMARY],[Q.SUP,g.SUP],[Q.TABLE,g.TABLE],[Q.TBODY,g.TBODY],[Q.TEMPLATE,g.TEMPLATE],[Q.TEXTAREA,g.TEXTAREA],[Q.TFOOT,g.TFOOT],[Q.TD,g.TD],[Q.TH,g.TH],[Q.THEAD,g.THEAD],[Q.TITLE,g.TITLE],[Q.TR,g.TR],[Q.TRACK,g.TRACK],[Q.TT,g.TT],[Q.U,g.U],[Q.UL,g.UL],[Q.SVG,g.SVG],[Q.VAR,g.VAR],[Q.WBR,g.WBR],[Q.XMP,g.XMP]]);function qs(e){var t;return(t=XI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,QI={[me.HTML]:new Set([ye.ADDRESS,ye.APPLET,ye.AREA,ye.ARTICLE,ye.ASIDE,ye.BASE,ye.BASEFONT,ye.BGSOUND,ye.BLOCKQUOTE,ye.BODY,ye.BR,ye.BUTTON,ye.CAPTION,ye.CENTER,ye.COL,ye.COLGROUP,ye.DD,ye.DETAILS,ye.DIR,ye.DIV,ye.DL,ye.DT,ye.EMBED,ye.FIELDSET,ye.FIGCAPTION,ye.FIGURE,ye.FOOTER,ye.FORM,ye.FRAME,ye.FRAMESET,ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6,ye.HEAD,ye.HEADER,ye.HGROUP,ye.HR,ye.HTML,ye.IFRAME,ye.IMG,ye.INPUT,ye.LI,ye.LINK,ye.LISTING,ye.MAIN,ye.MARQUEE,ye.MENU,ye.META,ye.NAV,ye.NOEMBED,ye.NOFRAMES,ye.NOSCRIPT,ye.OBJECT,ye.OL,ye.P,ye.PARAM,ye.PLAINTEXT,ye.PRE,ye.SCRIPT,ye.SECTION,ye.SELECT,ye.SOURCE,ye.STYLE,ye.SUMMARY,ye.TABLE,ye.TBODY,ye.TD,ye.TEMPLATE,ye.TEXTAREA,ye.TFOOT,ye.TH,ye.THEAD,ye.TITLE,ye.TR,ye.TRACK,ye.UL,ye.WBR,ye.XMP]),[me.MATHML]:new Set([ye.MI,ye.MO,ye.MN,ye.MS,ye.MTEXT,ye.ANNOTATION_XML]),[me.SVG]:new Set([ye.TITLE,ye.FOREIGN_OBJECT,ye.DESC]),[me.XLINK]:new Set,[me.XML]:new Set,[me.XMLNS]:new Set},eh=new Set([ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var R;(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"})(R||(R={}));const Rt={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function KI(e){return e>=O.DIGIT_0&&e<=O.DIGIT_9}function ga(e){return e>=O.LATIN_CAPITAL_A&&e<=O.LATIN_CAPITAL_Z}function JI(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function fi(e){return JI(e)||ga(e)}function GE(e){return fi(e)||KI(e)}function El(e){return e+32}function XE(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function QE(e){return XE(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function ZI(e){return e===O.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:VE(e)?ne.surrogateCharacterReference:YE(e)?ne.noncharacterCharacterReference:qE(e)||e===O.CARRIAGE_RETURN?ne.controlCharacterReference:null}class eP{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=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new UI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new WI(HI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=ZI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ze.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ze.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ze.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ze.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(WE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=qs(t.tagName),t.type===Ze.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 Ze.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ze.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ze.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:Ze.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=XE(t)?Ze.WHITESPACE_CHARACTER:t===O.NULL?Ze.NULL_CHARACTER:Ze.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ze.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$r.Attribute:$r.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case O.AMPERSAND:{this._startCharacterReference();break}case O.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case O.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(fi(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case O.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case O.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case O.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case O.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(fi(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case O.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=R.DATA;break}case O.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=St;break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ga(t)?El(t):t)}}_stateRcdataLessThanSign(t){t===O.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){fi(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case O.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case O.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===O.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){fi(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case O.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case O.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){fi(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===O.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===O.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===O.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:fi(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){fi(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&QE(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case O.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===O.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&QE(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=St;break}default:this.currentAttr.name+=String.fromCodePoint(ga(t)?El(t):t)}}_stateAfterAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case O.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case O.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case O.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=St;break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case O.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=St;break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=St;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:case O.EQUALS_SIGN:case O.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case O.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case O.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=St;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(kn.DASH_DASH,!0)?(this._createCommentToken(kn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(kn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(kn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(kn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(kn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case O.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case O.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=St;break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case O.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case O.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===O.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===O.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==O.GREATER_THAN_SIGN&&t!==O.EOF&&this._err(ne.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case O.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case O.HYPHEN_MINUS:{n.data+="-";break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case O.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case O.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ga(t))this._createDoctypeToken(String.fromCharCode(El(t))),this.state=R.DOCTYPE_NAME;else switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(St),this.state=R.DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=St;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ga(t)?El(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(kn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(kn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=St;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=St;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case O.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case O.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=St;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case O.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=St;break}case O.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case O.NULL:{this._err(ne.unexpectedNullCharacter);break}case O.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case O.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case O.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===O.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case O.GREATER_THAN_SIGN:{this.state=R.DATA;break}case O.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(O.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&GE(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){GE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const KE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),JE=new Set([...KE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),yl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),tP=new Set([...yl,g.OL,g.UL]),nP=new Set([...yl,g.BUTTON]),ZE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),ey=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),rP=new Set([g.TR,g.TEMPLATE,g.HTML]),iP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),sP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),oP=new Set([g.TD,g.TH]);class aP{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===me.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==me.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(eh,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(oP,me.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(sP,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(iP,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(rP,me.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case me.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case me.SVG:{if(ey.has(s))return!1;break}case me.MATHML:{if(ZE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,yl)}hasInListItemScope(t){return this.hasInDynamicScope(t,tP)}hasInButtonScope(t){return this.hasInDynamicScope(t,nP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case me.HTML:{if(eh.has(n))return!0;if(yl.has(n))return!1;break}case me.SVG:{if(ey.has(n))return!1;break}case me.MATHML:{if(ZE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===me.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&KE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&JE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&JE.has(this.currentTagId);)this.pop()}}const th=3;var vr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vr||(vr={}));const ty={type:vr.Marker};class uP{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===vr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<th)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<th)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=th&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(ty)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:vr.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(ty);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===vr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===vr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vr.Element&&n.element===t)}}const hi={createDocument(){return{nodeName:"#document",mode:Gn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};hi.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(hi.isTextNode(n)){n.value+=t;return}}hi.appendChild(e,hi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&hi.isTextNode(r)?r.value+=t:hi.insertBefore(e,hi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=j(j({},e.sourceCodeLocation),t)}},ny="html",lP="about:legacy-compat",cP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ry=["+//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//"],dP=[...ry,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],fP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),iy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],hP=[...iy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function sy(e,t){return t.some(n=>e.startsWith(n))}function pP(e){return e.name===ny&&e.publicId===null&&(e.systemId===null||e.systemId===lP)}function mP(e){if(e.name!==ny)return Gn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===cP)return Gn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),fP.has(n))return Gn.QUIRKS;let r=t===null?dP:ry;if(sy(n,r))return Gn.QUIRKS;if(r=t===null?iy:hP,sy(n,r))return Gn.LIMITED_QUIRKS}return Gn.NO_QUIRKS}const oy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},gP="definitionurl",EP="definitionURL",yP=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])),TP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:me.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:me.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:me.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:me.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:me.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:me.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:me.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:me.XML}],["xml:space",{prefix:"xml",name:"space",namespace:me.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:me.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:me.XMLNS}]]),bP=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])),xP=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function _P(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ts.COLOR||r===ts.SIZE||r===ts.FACE)||xP.has(t)}function ay(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===gP){e.attrs[t].name=EP;break}}function uy(e){for(let t=0;t<e.attrs.length;t++){const n=yP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function nh(e){for(let t=0;t<e.attrs.length;t++){const n=TP.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 wP(e){const t=bP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=qs(e.tagName))}function SP(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function vP(e,t,n){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ts.ENCODING){const s=n[r].value.toLowerCase();return s===oy.TEXT_HTML||s===oy.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function AP(e,t,n,r){return(!r||r===me.HTML)&&vP(e,t,n)||(!r||r===me.MATHML)&&SP(e,t)}const NP="hidden",kP=8,CP=3;var H;(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"})(H||(H={}));const OP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ly=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),cy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:hi,onParseError:null};class dy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=j(j({},cy),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 eP(this.options,this),this.activeFormattingElements=new uP(this.treeAdapter),this.fragmentContextID=r?qs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new aP(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=j(j({},cy),n);t!=null||(t=r.treeAdapter.createElement(Q.TEMPLATE,me.HTML,[]));const s=r.treeAdapter.createElement("documentmock",me.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(H.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:OP,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===me.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,me.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=Rt.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)!==me.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Rt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ue(j({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,me.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,me.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,me.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Ze.END_TAG&&s===n.tagName?{endTag:j({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===me.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,me.HTML)}_processToken(t){switch(t.type){case Ze.CHARACTER:{this.onCharacter(t);break}case Ze.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ze.COMMENT:{this.onComment(t);break}case Ze.DOCTYPE:{this.onDoctype(t);break}case Ze.START_TAG:{this._processStartTag(t);break}case Ze.END_TAG:{this.onEndTag(t);break}case Ze.EOF:{this.onEof(t);break}case Ze.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return AP(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===vr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=H.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=H.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=H.IN_TABLE;return}case g.BODY:{this.insertionMode=H.IN_BODY;return}case g.FRAMESET:{this.insertionMode=H.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?H.AFTER_HEAD:H.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return ly.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===me.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return QI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){o6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{ya(this,t);break}case H.BEFORE_HEAD:{Ta(this,t);break}case H.IN_HEAD:{ba(this,t);break}case H.IN_HEAD_NO_SCRIPT:{xa(this,t);break}case H.AFTER_HEAD:{_a(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{hy(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{oh(this,t);break}case H.IN_TABLE_TEXT:{xy(this,t);break}case H.IN_COLUMN_GROUP:{xl(this,t);break}case H.AFTER_BODY:{Sl(this,t);break}case H.AFTER_AFTER_BODY:{vl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){s6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{ya(this,t);break}case H.BEFORE_HEAD:{Ta(this,t);break}case H.IN_HEAD:{ba(this,t);break}case H.IN_HEAD_NO_SCRIPT:{xa(this,t);break}case H.AFTER_HEAD:{_a(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{oh(this,t);break}case H.IN_COLUMN_GROUP:{xl(this,t);break}case H.AFTER_BODY:{Sl(this,t);break}case H.AFTER_AFTER_BODY:{vl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ih(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{ih(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.AFTER_BODY:{FP(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{BP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{UP(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case H.IN_TABLE_TEXT:{va(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)?a6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{HP(this,t);break}case H.BEFORE_HEAD:{$P(this,t);break}case H.IN_HEAD:{lr(this,t);break}case H.IN_HEAD_NO_SCRIPT:{qP(this,t);break}case H.AFTER_HEAD:{WP(this,t);break}case H.IN_BODY:{cn(this,t);break}case H.IN_TABLE:{Ys(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.IN_CAPTION:{zR(this,t);break}case H.IN_COLUMN_GROUP:{ah(this,t);break}case H.IN_TABLE_BODY:{_l(this,t);break}case H.IN_ROW:{wl(this,t);break}case H.IN_CELL:{YR(this,t);break}case H.IN_SELECT:{Sy(this,t);break}case H.IN_SELECT_IN_TABLE:{GR(this,t);break}case H.IN_TEMPLATE:{QR(this,t);break}case H.AFTER_BODY:{JR(this,t);break}case H.IN_FRAMESET:{ZR(this,t);break}case H.AFTER_FRAMESET:{t6(this,t);break}case H.AFTER_AFTER_BODY:{r6(this,t);break}case H.AFTER_AFTER_FRAMESET:{i6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?u6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{jP(this,t);break}case H.BEFORE_HEAD:{zP(this,t);break}case H.IN_HEAD:{VP(this,t);break}case H.IN_HEAD_NO_SCRIPT:{YP(this,t);break}case H.AFTER_HEAD:{GP(this,t);break}case H.IN_BODY:{bl(this,t);break}case H.TEXT:{RR(this,t);break}case H.IN_TABLE:{wa(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.IN_CAPTION:{VR(this,t);break}case H.IN_COLUMN_GROUP:{qR(this,t);break}case H.IN_TABLE_BODY:{uh(this,t);break}case H.IN_ROW:{wy(this,t);break}case H.IN_CELL:{WR(this,t);break}case H.IN_SELECT:{vy(this,t);break}case H.IN_SELECT_IN_TABLE:{XR(this,t);break}case H.IN_TEMPLATE:{KR(this,t);break}case H.AFTER_BODY:{Ny(this,t);break}case H.IN_FRAMESET:{e6(this,t);break}case H.AFTER_FRAMESET:{n6(this,t);break}case H.AFTER_AFTER_BODY:{vl(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{Ea(this,t);break}case H.BEFORE_HTML:{ya(this,t);break}case H.BEFORE_HEAD:{Ta(this,t);break}case H.IN_HEAD:{ba(this,t);break}case H.IN_HEAD_NO_SCRIPT:{xa(this,t);break}case H.AFTER_HEAD:{_a(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{Ty(this,t);break}case H.TEXT:{LR(this,t);break}case H.IN_TABLE_TEXT:{va(this,t);break}case H.IN_TEMPLATE:{Ay(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{sh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===O.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{fy(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{oh(this,t);break}case H.IN_TABLE_TEXT:{by(this,t);break}}}}function IP(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):yy(e,t),n}function PP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function RP(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=CP;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=LP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function LP(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 DP(e,t,n){const r=e.treeAdapter.getTagName(t),s=qs(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===me.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function MP(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function rh(e,t){for(let n=0;n<kP;n++){const r=IP(e,t);if(!r)break;const s=PP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=RP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&DP(e,u,a),MP(e,s,r)}}function ih(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function FP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function BP(e,t){e._appendCommentNode(t,e.document)}function sh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function UP(e,t){e._setDocumentType(t);const n=t.forceQuirks?Gn.QUIRKS:mP(t);pP(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function Ea(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Gn.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function HP(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=H.BEFORE_HEAD):ya(e,t)}function jP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&ya(e,t)}function ya(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function $P(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:Ta(e,t)}}function zP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ta(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Ta(e,t){e._insertFakeElement(Q.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function lr(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Rt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:ba(e,t)}}function VP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{ba(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function ns(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function ba(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function qP(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{lr(e,t);break}case g.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:xa(e,t)}}function YP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case g.BR:{xa(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function xa(e,t){const n=t.type===Ze.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function WP(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=H.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),lr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:_a(e,t)}}function GP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{_a(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function _a(e,t){e._insertFakeElement(Q.BODY,g.BODY),e.insertionMode=H.IN_BODY,Tl(e,t)}function Tl(e,t){switch(t.type){case Ze.CHARACTER:{hy(e,t);break}case Ze.WHITESPACE_CHARACTER:{fy(e,t);break}case Ze.COMMENT:{ih(e,t);break}case Ze.START_TAG:{cn(e,t);break}case Ze.END_TAG:{bl(e,t);break}case Ze.EOF:{Ty(e,t);break}}}function fy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function XP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function QP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function KP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_FRAMESET)}function JP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function ZP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&eh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function eR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function tR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),n||(e.formElement=e.openElements.current))}function nR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function rR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=Rt.PLAINTEXT}function iR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1}function sR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(rh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function oR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function aR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(rh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function lR(e,t){e.treeAdapter.getDocumentMode(e.document)!==Gn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function py(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function my(e){const t=WE(e,ts.TYPE);return t!=null&&t.toLowerCase()===NP}function cR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),my(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function dR(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function fR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function hR(e,t){t.tagName=Q.IMG,t.tagID=g.IMG,py(e,t)}function pR(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function mR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function gR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function gy(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function ER(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function yR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function TR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function bR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function xR(e,t){e._reconstructActiveFormattingElements(),ay(t),nh(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function _R(e,t){e._reconstructActiveFormattingElements(),uy(t),nh(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function Ey(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function cn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{oR(e,t);break}case g.A:{sR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{ZP(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{JP(e,t);break}case g.LI:case g.DD:case g.DT:{nR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{py(e,t);break}case g.HR:{fR(e,t);break}case g.RB:case g.RTC:{TR(e,t);break}case g.RT:case g.RP:{bR(e,t);break}case g.PRE:case g.LISTING:{eR(e,t);break}case g.XMP:{mR(e,t);break}case g.SVG:{_R(e,t);break}case g.HTML:{XP(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{lr(e,t);break}case g.BODY:{QP(e,t);break}case g.FORM:{tR(e,t);break}case g.NOBR:{aR(e,t);break}case g.MATH:{xR(e,t);break}case g.TABLE:{lR(e,t);break}case g.INPUT:{cR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{dR(e,t);break}case g.IMAGE:{hR(e,t);break}case g.BUTTON:{iR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{uR(e,t);break}case g.IFRAME:{gR(e,t);break}case g.SELECT:{ER(e,t);break}case g.OPTION:case g.OPTGROUP:{yR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{gy(e,t);break}case g.FRAMESET:{KP(e,t);break}case g.TEXTAREA:{pR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?gy(e,t):Ey(e,t);break}case g.PLAINTEXT:{rR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Ey(e,t)}}function wR(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function SR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,Ny(e,t))}function vR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function AR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function NR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(Q.P,g.P),e._closePElement()}function kR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function CR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function OR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function IR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function PR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function yy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function bl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{rh(e,t);break}case g.P:{NR(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{vR(e,t);break}case g.LI:{kR(e);break}case g.DD:case g.DT:{CR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{OR(e);break}case g.BR:{PR(e);break}case g.BODY:{wR(e,t);break}case g.HTML:{SR(e,t);break}case g.FORM:{AR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{IR(e,t);break}case g.TEMPLATE:{ns(e,t);break}default:yy(e,t)}}function Ty(e,t){e.tmplInsertionModeStack.length>0?Ay(e,t):sh(e,t)}function RR(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function LR(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function oh(e,t){if(e.openElements.currentTagId!==void 0&&ly.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case Ze.CHARACTER:{xy(e,t);break}case Ze.WHITESPACE_CHARACTER:{by(e,t);break}}else Sa(e,t)}function DR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_CAPTION}function MR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function FR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,g.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,ah(e,t)}function BR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_TABLE_BODY}function UR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,g.TBODY),e.insertionMode=H.IN_TABLE_BODY,_l(e,t)}function HR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function jR(e,t){my(t)?e._appendElement(t,me.HTML):Sa(e,t),t.ackSelfClosing=!0}function $R(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ys(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{UR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{lr(e,t);break}case g.COL:{FR(e,t);break}case g.FORM:{$R(e,t);break}case g.TABLE:{HR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{BR(e,t);break}case g.INPUT:{jR(e,t);break}case g.CAPTION:{DR(e,t);break}case g.COLGROUP:{MR(e,t);break}default:Sa(e,t)}}function wa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ns(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Sa(e,t)}}function Sa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Tl(e,t),e.fosterParentingEnabled=n}function by(e,t){e.pendingCharacterTokens.push(t)}function xy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function va(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Sa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const _y=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function zR(e,t){const n=t.tagID;_y.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,Ys(e,t)):cn(e,t)}function VR(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,n===g.TABLE&&wa(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:bl(e,t)}}function ah(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{lr(e,t);break}default:xl(e,t)}}function qR(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case g.TEMPLATE:{ns(e,t);break}case g.COL:break;default:xl(e,t)}}function xl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function _l(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,g.TR),e.insertionMode=H.IN_ROW,wl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Ys(e,t));break}default:Ys(e,t)}}function uh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,wa(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:wa(e,t)}}function wl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,_l(e,t));break}default:Ys(e,t)}}function wy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,uh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,uh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:wa(e,t)}}function YR(e,t){const n=t.tagID;_y.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),wl(e,t)):cn(e,t)}function WR(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),wy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:bl(e,t)}}function Sy(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{lr(e,t);break}}}function vy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{ns(e,t);break}}}function GR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Sy(e,t)}function XR(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):vy(e,t)}function QR(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{lr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,Ys(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,ah(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,_l(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,wl(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,cn(e,t)}}function KR(e,t){t.tagID===g.TEMPLATE&&ns(e,t)}function Ay(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):sh(e,t)}function JR(e,t){t.tagID===g.HTML?cn(e,t):Sl(e,t)}function Ny(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=H.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Sl(e,t)}function Sl(e,t){e.insertionMode=H.IN_BODY,Tl(e,t)}function ZR(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.FRAMESET:{e._insertElement(t,me.HTML);break}case g.FRAME:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{lr(e,t);break}}}function e6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function t6(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.NOFRAMES:{lr(e,t);break}}}function n6(e,t){t.tagID===g.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function r6(e,t){t.tagID===g.HTML?cn(e,t):vl(e,t)}function vl(e,t){e.insertionMode=H.IN_BODY,Tl(e,t)}function i6(e,t){switch(t.tagID){case g.HTML:{cn(e,t);break}case g.NOFRAMES:{lr(e,t);break}}}function s6(e,t){t.chars=St,e._insertCharacters(t)}function o6(e,t){e._insertCharacters(t),e.framesetOk=!1}function ky(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==me.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function a6(e,t){if(_P(t))ky(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?ay(t):r===me.SVG&&(wP(t),uy(t)),nh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function u6(e,t){if(t.tagID===g.P||t.tagID===g.BR){ky(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)===me.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const l6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,c6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Cy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Oy(e,t){const n=b6(e),r=$E("type",{handlers:{root:d6,element:f6,text:h6,comment:Py,doctype:p6,raw:g6},unknown:E6}),s={parser:n?new dy(Cy):dy.getFragmentParser(void 0,Cy),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Ws(s,wr());const a=n?s.parser.document:s.parser.getFragment(),u=xI(a,{file:s.options.file});return s.stitches&&pl(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Iy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function d6(e,t){Iy(e.children,t)}function f6(e,t){y6(e,t),Iy(e.children,t),T6(e,t)}function h6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ze.CHARACTER,chars:e.value,location:Aa(e)};Ws(t,wr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function p6(e,t){const n={type:Ze.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Aa(e)};Ws(t,wr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function m6(e,t){t.stitches=!0;const n=x6(e);if("children"in e&&"children"in n){const r=Oy({type:"root",children:e.children},t.options);n.children=r.children}Py({type:"comment",value:{stitch:n}},t)}function Py(e,t){const n=e.value,r={type:Ze.COMMENT,data:n,location:Aa(e)};Ws(t,wr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function g6(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,Ry(t,wr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(l6,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function E6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))m6(n,t);else{let r="";throw c6.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 Ws(e,t){Ry(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=Rt.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 Ry(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 y6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;Ws(t,wr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:es.html;s===es.html&&n==="svg"&&(s=es.svg);const a=AI(ue(j({},e),{children:[]}),{space:s===es.svg?"svg":"html"}),u={type:Ze.START_TAG,tagName:n,tagID:qs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Aa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function T6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&LI.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;Ws(t,rl(e));const r={type:Ze.END_TAG,tagName:n,tagID:qs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Aa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function b6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Aa(e){const t=wr(e)||{line:void 0,column:void 0,offset:void 0},n=rl(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 x6(e){return"children"in e?Zi(ue(j({},e),{children:[]})):Zi(e)}function Ly(e){return function(t,n){return Oy(t,ue(j({},e),{file:n}))}}const rs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Dy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...rs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...rs],h2:[["className","sr-only"]],img:[...rs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...rs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...rs],table:[...rs],ul:[...rs,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},pi={}.hasOwnProperty;function _6(e,t){let n={type:"root",children:[]};const r={schema:t?j(j({},Dy),t):Dy,stack:[]},s=My(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function My(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return w6(e,n);case"doctype":return S6(e,n);case"element":return v6(e,n);case"root":return A6(e,n);case"text":return N6(e,n)}}}function w6(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 S6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Na(n,t),n}}function v6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Fy(e,t.children),s=k6(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&&pi.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return Na(u,t),u}function A6(e,t){const r={type:"root",children:Fy(e,t.children)};return Na(r,t),r}function N6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Na(r,t),r}function Fy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=My(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function k6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&pi.call(r,n)?r[n]:void 0,u=r&&pi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(pi.call(l,f)){const p=l[f];let m=By(e,Hy(a,f),f,p);m==null&&(m=By(e,Hy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&pi.call(s,n)){const p=s[n];for(f in p)pi.call(p,f)&&!pi.call(d,f)&&(d[f]=p[f])}return d}function By(e,t,n,r){return t?Array.isArray(r)?C6(e,t,n,r):Uy(e,t,n,r):void 0}function C6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Uy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Uy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&O6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function O6(e,t,n){const r=e.schema.protocols&&pi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),l=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function Na(e,t){const n=I1(t);t.data&&(e.data=Zi(t.data)),n&&(e.position=n)}function Hy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function I6(e){return function(t){return _6(t,e)}}const jy=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",ue(j(j({className:F(e,`${C}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},P6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ct();return!e&&!t?null:_.jsx("div",{className:F(n,`${C}-disclaimer`),children:t?_.jsx(RE,{rehypePlugins:[Ly,I6],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${C}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${C}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${C}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(jy,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${C}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${C}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${C}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${C}-disclaimer-text`),children:e})})},lh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=an(),{globalClassName:u,searchConfig:l,enableEscalationToAgent:d}=ct(),f=D.useRef(null),p=t||!s&&!a,m=D.useRef(t);D.useEffect(()=>{var v;const b=m.current&&!t;m.current=t,b&&!p&&((v=f.current)==null||v.focus({preventScroll:!0}))},[t,p]);const x=b=>{var A;b.preventDefault();const v=(((A=f.current)==null?void 0:A.value)||"").trim();v&&(f.current.value="",r(v))},y=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${C}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${C}-search-bar`),name:`${C}-search-form`,onSubmit:x,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${C}-search-input`),type:"text",ref:f,placeholder:(l==null?void 0:l.placeholder)||"Ask us anything",name:`${C}-user-input`,disabled:p}),_.jsx(ck,{className:e,globalClassName:u,searchConfig:l,componentType:n,isLoading:p}),d&&_.jsx(ar,{className:F(u,`${C}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:y,icon:_.jsx(JN,{})})]}),_.jsx(P6,{})]})};function R6(e){return lt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function L6(e){return lt({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 $y=D.createContext({isOpen:!1}),ch=D.createContext(null),zy=D.createContext(null),Gs=()=>{var n,r;const e=D.useContext(ch),t=D.useContext(zy);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Vy=({onClearChat:e,componentType:t})=>{const n=Gs(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${C}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(L6,{}),"Clear chat"]})},qy=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ct(),r=Gs(),[s,a]=D.useState(!1),u=()=>Fe(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:F(`${C}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(R6,{}),"Download transcript"]})};function D6(e){return e==null?[]:Array.isArray(e)?e:[e]}var M6=(e,...t)=>e.concat(t),F6=(e,...t)=>e.filter(n=>!t.includes(n)),B6=e=>Array.from(new Set(e));function Yy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?s?l:0:a>=u?s?0:t>u?u:t:a}function U6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Yy(e,t,{step:-r,loop:s})}var H6=e=>Array.isArray(e),Wy=e=>e!=null&&typeof e=="object",j6=e=>Wy(e)&&!H6(e),Al=e=>typeof e=="string",Xs=e=>typeof e=="function",$6=e=>e==null,z6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),V6=e=>Object.prototype.toString.call(e),Gy=Function.prototype.toString,q6=Gy.call(Object),Y6=e=>{if(!Wy(e)||V6(e)!="[object Object]"||X6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=z6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gy.call(n)==q6},W6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,G6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,X6=e=>W6(e)||G6(e),Q6=e=>e(),K6=()=>{},dh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function J6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:Z6,max:e4}=Math,t4=e=>Number.isNaN(e),n4=e=>t4(e)?0:e,Xy=(e,t,n)=>Z6(e4(n4(e),t),n);function fh(e){if(!Y6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=fh(s))}return n}function hh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function r4(e,t){if(e==null)throw new Error(t())}function i4(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var s4=Object.defineProperty,o4=(e,t,n)=>t in e?s4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ph=(e,t,n)=>o4(e,typeof t!="symbol"?t+"":t,n),Qy=()=>{},Nl=e=>typeof e=="object"&&e!==null,Qs=e=>e?"":void 0,Ky=e=>e?"true":void 0,a4=1,u4=9,l4=11,Wt=e=>Nl(e)&&e.nodeType===a4&&typeof e.nodeName=="string",kl=e=>Nl(e)&&e.nodeType===u4,c4=e=>Nl(e)&&e===e.window,Jy=e=>Wt(e)?e.localName||"":"#document";function d4(e){return["html","body","#document"].includes(Jy(e))}var f4=e=>Nl(e)&&e.nodeType!==void 0,is=e=>f4(e)&&e.nodeType===l4&&"host"in e,h4=e=>Wt(e)&&e.localName==="input",p4=e=>Wt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ka(e){if(!e)return!1;const t=e.getRootNode();return Zs(t)===e}var m4=/(textarea|select)/;function g4(e){if(e==null||!Wt(e))return!1;try{return h4(e)&&e.selectionStart!=null||m4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ks(e,t){var r;if(!e||!t||!Wt(e)||!Wt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&is(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Ar(e){var t;return kl(e)?e:c4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function E4(e){return Ar(e).documentElement}function Js(e){var t,n,r;return is(e)?Js(e.host):kl(e)?(t=e.defaultView)!=null?t:window:Wt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Zs(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 y4(e){if(Jy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||is(e)&&e.host||E4(e);return is(t)?t.host:t}function mh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),kl(t)||is(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var gh=new WeakMap;function eo(e){return gh.has(e)||gh.set(e,Js(e).getComputedStyle(e)),gh.get(e)}var Eh=new Set(["menu","listbox","dialog","grid","tree","region"]),T4=e=>Eh.has(e),Zy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function eT(e,t){const n=new Set,r=mh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Zy(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),x=p.getAttribute("aria-modal")==="true";if(m&&T4(m)&&!x&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function tT(e,t){const n=mh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Zy(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),x=p.getAttribute("aria-modal")==="true";m&&Eh.has(m)&&!x&&(t(p),s(p))}}}};s(e)}function b4(e){const t=new Set;return tT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function x4(e){const t=e.getAttribute("role");return!!(t&&Eh.has(t))}function _4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function w4(e){var t;return _4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function S4(e){if(!e.id)return!1;const t=mh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&x4(e))}var yh=()=>typeof document!="undefined";function v4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Th=e=>yh()&&e.test(v4()),A4=e=>yh()&&e.test(navigator.vendor),nT=()=>yh()&&!!navigator.maxTouchPoints,N4=()=>Th(/^iPhone/i),k4=()=>Th(/^iPad/i)||bh()&&navigator.maxTouchPoints>1,Cl=()=>N4()||k4(),C4=()=>bh()||Cl(),bh=()=>Th(/^Mac/i),O4=()=>C4()&&A4(/apple/i);function I4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function cr(e){var n;const t=I4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var rT=e=>e.button===0,P4=e=>e.button===2||bh()&&e.ctrlKey&&e.button===0,R4=e=>"touches"in e&&e.touches.length>0,L4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},iT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function D4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=L4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in iT&&(s=iT[s]),s}function sT(e,t="client"){const n=R4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Gt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},oT=e=>Wt(e)&&e.tagName==="IFRAME",M4=/^(audio|video|details)$/;function aT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var F4=e=>!Number.isNaN(aT(e)),B4=e=>aT(e)<0;function U4(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 uT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<s.length;){const d=s[l++];if(!d||a.has(d))continue;a.add(d);const f=U4(d,t);if(f){const p=Array.from(f.querySelectorAll(Ol)).filter(n),m=u.get(d);if(m!==void 0){const x=m+1;r.splice(x,0,...p),p.forEach((y,b)=>{u.set(y,x+b)});for(let y=x+p.length;y<r.length;y++)u.set(r[y],y)}else{const x=r.length;r.push(...p),p.forEach((y,b)=>{u.set(y,x+b)})}s.push(...p)}}return r}var Ol="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",lT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Ol));(n==!0||n=="if-empty"&&s.length===0)&&Wt(e)&&Nr(e)&&s.unshift(e);const u=[];for(const l of s)if(Nr(l)){if(oT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...lT(d,{getShadowRoot:r}));continue}u.push(l)}return r?uT(u,r,Nr):u};function Nr(e){return!Wt(e)||e.closest("[inert]")?!1:e.matches(Ol)&&p4(e)}function to(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Ol));n&&ss(e)&&s.unshift(e);const a=[];for(const u of s)if(ss(u)){if(oT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...to(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=uT(a,r,ss);return!u.length&&n?s:u}return!a.length&&n?s:a}function ss(e){return Wt(e)&&e.tabIndex>0?!0:Nr(e)&&!B4(e)}function H4(e,t={}){const n=to(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function j4(e,t={}){const{current:n,getShadowRoot:r}=t,s=to(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Zs(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function Ca(e){return e.tabIndex<0&&(M4.test(e.localName)||g4(e))&&!F4(e)?0:e.tabIndex}function cT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=to(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var $4=class y2{constructor(){ph(this,"id",null),ph(this,"fn_cleanup"),ph(this,"cleanup",()=>{this.cancel()})}static create(){return new y2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function jt(e){const t=$4.create();return t.request(e),t.cleanup}function dT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function xh(e){const t=y4(e);return d4(t)?Ar(t).body:Wt(t)&&q4(t)?t:xh(t)}var z4=/auto|scroll|overlay|hidden|clip/,V4=new Set(["inline","contents"]);function q4(e){const t=Js(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return z4.test(n+s+r)&&!V4.has(a)}var no="default",_h="",Il=new WeakMap;function Y4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Cl()?(no==="default"&&(_h=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),no="disabled"):t&&(Il.set(t,t.style.userSelect),t.style.userSelect="none"),()=>W4({target:t,doc:r})}function W4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Cl()){if(no!=="disabled")return;no="restoring",setTimeout(()=>{dT(()=>{no==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=_h||""),_h="",no="default")})},300)}else if(t&&Il.has(t)){const a=Il.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Il.delete(t)}}function G4(e={}){const u=e,{defer:t,target:n}=u,r=_n(u,["defer","target"]),s=t?jt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(Y4(ue(j({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function X4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=sT(l),f=Math.sqrt(fd(d.x,2)+fd(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=sT(l);r({point:d,event:l})},u=[Gt(e,"pointermove",s,!1),Gt(e,"pointerup",a,!1),Gt(e,"pointercancel",a,!1),Gt(e,"contextmenu",a,!1),G4({doc:e})];return()=>{u.forEach(l=>l())}}function Q4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,x]=H4(e,{includeContainer:!0,getShadowRoot:a}),y=j4(l,{current:n,getShadowRoot:a}),b=!m&&!x;f.shiftKey&&ka(y)?(s==null||s(),p=x):f.shiftKey&&(ka(m)||b)?p=n:!f.shiftKey&&ka(n)?(s==null||s(),p=m):!f.shiftKey&&(ka(x)||b)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Gt(u,"keydown",d,!0)}function K4(e,t){const l=t,{defer:n,triggerElement:r}=l,s=_n(l,["defer","triggerElement"]),a=n?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(Q4(d,j({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function J4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Pl(e,t){if(!e)return Qy;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function Z4(e,t,n){if(!e)return Qy;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 eL(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function tL(e,t){const{timeout:n,rootNode:r}=t,s=Js(r),a=Ar(r),u=new s.AbortController;return eL(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var nL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),rL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,fT=e=>{const t={};let n;for(;n=rL.exec(e);)t[n[1]]=n[2];return t},iL=(e,t)=>{if(Al(e)){if(Al(t))return`${e};${t}`;e=fT(e)}else Al(t)&&(t=fT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function $t(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=dh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=nL(t[s],n[s]);continue}if(s==="style"){t[s]=iL(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function EU(e){return e}var ro=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ro||{}),wh="__init__";function sL(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Ar(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Zs(t()),a=u=>t().getElementById(u);return ue(j({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:ka,getById:a})}function oL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var io=()=>e=>Array.from(new Set(e)),hT=typeof globalThis.document!="undefined"?D.useLayoutEffect:D.useEffect;function Rl(e){var m,x;const t=(m=e().value)!=null?m:e().defaultValue,n=(x=e().isEqual)!=null?x:Object.is,[r]=D.useState(t),[s,a]=D.useState(r),u=e().value!==void 0,l=D.useRef(s);l.current=u?e().value:s;const d=D.useRef(l.current);hT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,w;const b=d.current,v=Xs(y)?y(b):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:b}),u||a(v),n(v,b)||(w=(A=e()).onChange)==null||w.call(A,v,b)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?Bs.flushSync:Q6)(()=>f(y))},invoke(y,b){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,b)},hash(y){var b,v,A;return(A=(v=(b=e()).hash)==null?void 0:v.call(b,y))!=null?A:String(y)}}}Rl.cleanup=e=>{D.useEffect(()=>e,[])},Rl.ref=e=>{const t=D.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function aL(e){const t=D.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var uL=(e,t)=>{const n=D.useRef(!1),r=D.useRef(!1);D.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),D.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Ll(e,t={}){var oe,te,fe,he,de,we;const n=D.useMemo(()=>{const{id:ce,ids:W,getRootNode:re}=t;return sL({id:ce,ids:W,getRootNode:re})},[t]),r=(...ce)=>{e.debug&&console.log(...ce)},s=(te=(oe=e.props)==null?void 0:oe.call(e,{props:fh(t),scope:n}))!=null?te:t,a=lL(s),u=(fe=e.context)==null?void 0:fe.call(e,{prop:a,bindable:Rl,scope:n,flush:mT,getContext(){return d},getComputed(){return G},getRefs(){return v},getEvent(){return y()}}),l=pT(u),d={get(ce){var W;return(W=l.current)==null?void 0:W[ce].ref.current},set(ce,W){var re;(re=l.current)==null||re[ce].set(W)},initial(ce){var W;return(W=l.current)==null?void 0:W[ce].initial},hash(ce){var re,N;const W=(re=l.current)==null?void 0:re[ce].get();return(N=l.current)==null?void 0:N[ce].hash(W)}},f=D.useRef(new Map),p=D.useRef(null),m=D.useRef(null),x=D.useRef({type:""}),y=()=>ue(j({},x.current),{current(){return x.current},previous(){return m.current}}),b=()=>ue(j({},L),{matches(...ce){return ce.includes(L.ref.current)},hasTag(ce){var W,re;return!!((re=(W=e.states[L.ref.current])==null?void 0:W.tags)!=null&&re.includes(ce))}}),v=aL((de=(he=e.refs)==null?void 0:he.call(e,{prop:a,context:d}))!=null?de:{}),A=()=>({state:b(),context:d,event:y(),prop:a,send:z,action:w,guard:k,track:uL,refs:v,computed:G,flush:mT,scope:n,choose:U}),w=ce=>{const W=Xs(ce)?ce(A()):ce;if(!W)return;const re=W.map(N=>{var J,P;const M=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[N];return M||hh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),M});for(const N of re)N==null||N(A())},k=ce=>{var W,re;return Xs(ce)?ce(A()):(re=(W=e.implementations)==null?void 0:W.guards)==null?void 0:re[ce](A())},I=ce=>{const W=Xs(ce)?ce(A()):ce;if(!W)return;const re=W.map(M=>{var P,Ae;const J=(Ae=(P=e.implementations)==null?void 0:P.effects)==null?void 0:Ae[M];return J||hh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),J}),N=[];for(const M of re){const J=M==null?void 0:M(A());J&&N.push(J)}return()=>N.forEach(M=>M==null?void 0:M())},U=ce=>D6(ce).find(W=>{let re=!W.guard;return Al(W.guard)?re=!!k(W.guard):Xs(W.guard)&&(re=W.guard(A())),re}),G=ce=>{r4(e.computed,()=>"[zag-js] No computed object found on machine");const W=e.computed[ce];return W({context:d,event:y(),prop:a,refs:v,scope:n,computed:G})},L=Rl(()=>({defaultValue:e.initialState({prop:a}),onChange(ce,W){var N,M,J,P;if(W){const Ae=f.current.get(W);Ae==null||Ae(),f.current.delete(W)}W&&w((N=e.states[W])==null?void 0:N.exit),w((M=p.current)==null?void 0:M.actions);const re=I((J=e.states[ce])==null?void 0:J.effects);if(re&&f.current.set(ce,re),W===wh){w(e.entry);const Ae=I(e.effects);Ae&&f.current.set(wh,Ae)}w((P=e.states[ce])==null?void 0:P.entry)}})),V=D.useRef(void 0),ie=D.useRef(ro.NotStarted);hT(()=>{queueMicrotask(()=>{var M;const re=ie.current===ro.Started;ie.current=ro.Started,r(re?"rehydrating...":"initializing...");const N=(M=V.current)!=null?M:L.initial;L.invoke(N,re?L.get():wh)});const ce=f.current,W=L.ref.current;return()=>{r("unmounting..."),V.current=W,ie.current=ro.Stopped,ce.forEach(re=>re==null?void 0:re()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const le=()=>"ref"in L?L.ref.current:L.get(),z=ce=>{queueMicrotask(()=>{var P,Ae,Ce,ge,Le;if(ie.current!==ro.Started)return;m.current=x.current,x.current=ce;let W=le();const re=(Ce=(P=e.states[W].on)==null?void 0:P[ce.type])!=null?Ce:(Ae=e.on)==null?void 0:Ae[ce.type],N=U(re);if(!N)return;p.current=N;const M=(ge=N.target)!=null?ge:W;r("transition",ce.type,N.target||W,`(${N.actions})`);const J=M!==W;J?Bs.flushSync(()=>L.set(M)):N.reenter&&!J?L.invoke(W,W):w((Le=N.actions)!=null?Le:[])})};return(we=e.watch)==null||we.call(e,A()),{state:b(),send:z,context:d,prop:a,scope:n,refs:v,computed:G,event:y(),getStatus:()=>ie.current}}function pT(e){const t=D.useRef(e);return t.current=e,t}function lL(e){const t=pT(e);return function(r){return t.current[r]}}function mT(e){queueMicrotask(()=>{Bs.flushSync(()=>e())})}var Sh=oL(e=>e);function Dl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function cL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const vh=e=>{const t=D.memo(D.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=_n(f,["asChild","children"]);if(!s)return D.createElement(e,ue(j({},u),{ref:r}),a);if(!D.isValidElement(a))return null;const l=D.Children.only(a),d=cL(l);return D.cloneElement(l,ue(j({},$t(u,l.props)),{ref:r?Dl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},dn=(()=>{const e=new Map;return new Proxy(vh,{apply(t,n,r){return vh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,vh(r)),e.get(r)}})})();function dL(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function os(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=D.createContext(u);l.displayName=t;function d(){var p;const f=D.useContext(l);if(!f&&n){const m=new Error(a!=null?a:dL(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[fL,Ah]=os({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[gT,Oa]=os({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),ET=D.forwardRef((e,t)=>{const n=Ah(),r=Oa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(dn.div,ue(j({},s),{ref:Dl(r.ref,t)}))});ET.displayName="PopoverContent";const yT=D.forwardRef((e,t)=>{const n=Ah(),r=Oa(),s=$t(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(dn.div,ue(j({},s),{ref:t}))});yT.displayName="PopoverPositioner";const Ia=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},j({},e)]),TT=e=>Ia()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function hL(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var pL={props({props:e}){return ue(j({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",eo(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});jt(()=>{var l,d;const u=Ml(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{jt(()=>{e.set("prevAnimationName",Ml(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,x;((x=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?x:d.target)===s&&e.set("prevAnimationName",Ml(t.get("styles")))},u=d=>{const f=Ml(t.get("styles"));cr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const l=Pl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),dT(()=>l())}}}}};function Ml(e){return(e==null?void 0:e.animationName)||"none"}io()(["onExitComplete","present","immediate"]);function mL(e,t={}){const{sync:n=!1}=t,r=gL(e);return D.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function gL(e){const t=D.useRef(e);return t.current=e,t}const Nh=(e={})=>{const x=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=x,a=_n(x,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=D.useRef(!1),l=ue(j({},a),{present:r,onExitComplete:mL(e.onExitComplete)}),d=Ll(pL,l),f=hL(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var as=(e,t=[])=>({parts:(...n)=>{if(EL(t))return as(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>as(e,[...t,...n]),omit:(...n)=>as(e,t.filter(r=>!n.includes(r))),rename:n=>as(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${so(e)}"][data-part="${so(r)}"]`,`& [data-scope="${so(e)}"][data-part="${so(r)}"]`].join(", "),attrs:{"data-scope":so(e),"data-part":so(r)}}}),{})}),so=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),EL=e=>e.length===0;const yL=["top","right","bottom","left"],mi=Math.min,zr=Math.max,Fl=Math.round,Bl=Math.floor,kr=e=>({x:e,y:e}),TL={left:"right",right:"left",bottom:"top",top:"bottom"};function bT(e,t,n){return zr(e,mi(t,n))}function Vr(e,t){return typeof e=="function"?e(t):e}function gi(e){return e.split("-")[0]}function oo(e){return e.split("-")[1]}function kh(e){return e==="x"?"y":"x"}function Ch(e){return e==="y"?"height":"width"}function Cr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Oh(e){return kh(Cr(e))}function bL(e,t,n){n===void 0&&(n=!1);const r=oo(e),s=Oh(e),a=Ch(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Ul(u)),[u,Ul(u)]}function xL(e){const t=Ul(e);return[Ih(e),t,Ih(t)]}function Ih(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const xT=["left","right"],_T=["right","left"],_L=["top","bottom"],wL=["bottom","top"];function SL(e,t,n){switch(e){case"top":case"bottom":return n?t?_T:xT:t?xT:_T;case"left":case"right":return t?_L:wL;default:return[]}}function vL(e,t,n,r){const s=oo(e);let a=SL(gi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Ih)))),a}function Ul(e){const t=gi(e);return TL[t]+e.slice(t.length)}function AL(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function wT(e){return typeof e!="number"?AL(e):{top:e,right:e,bottom:e,left:e}}function Hl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ST(e,t,n){let{reference:r,floating:s}=e;const a=Cr(t),u=Oh(t),l=Ch(u),d=gi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,x=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const b=oo(t);return b&&(y[u]+=x*(b==="end"?1:-1)*(n&&f?-1:1)),y}function NL(e,t){return Fe(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:x=!1,padding:y=0}=Vr(t,e),b=wT(y),A=l[x?m==="floating"?"reference":"floating":m],w=Hl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),U=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},G=Hl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:I,strategy:d}):k);return{top:(w.top-G.top+b.top)/U.y,bottom:(G.bottom-w.bottom+b.bottom)/U.y,left:(w.left-G.left+b.left)/U.x,right:(G.right-w.right+b.right)/U.x}})}const kL=50,CL=(e,t,n)=>Fe(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ue(j({},u),{detectOverflow:NL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=ST(f,r,d),x=r,y=0;const b={};for(let v=0;v<a.length;v++){const A=a[v];if(!A)continue;const{name:w,fn:k}=A,{x:I,y:U,data:G,reset:L}=yield k({x:p,y:m,initialPlacement:r,placement:x,strategy:s,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=U!=null?U:m,b[w]=j(j({},b[w]),G),L&&y<kL&&(y++,typeof L=="object"&&(L.placement&&(x=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:p,y:m}=ST(f,x,d)),v=-1)}return{x:p,y:m,placement:x,strategy:s,middlewareData:b}}),OL=e=>({name:"arrow",options:e,fn(n){return Fe(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Vr(e,n)||{};if(p==null)return{};const x=wT(m),y={x:r,y:s},b=Oh(a),v=Ch(b),A=yield l.getDimensions(p),w=b==="y",k=w?"top":"left",I=w?"bottom":"right",U=w?"clientHeight":"clientWidth",G=u.reference[v]+u.reference[b]-y[b]-u.floating[v],L=y[b]-u.reference[b],V=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ie=V?V[U]:0;(!ie||!(yield l.isElement==null?void 0:l.isElement(V)))&&(ie=d.floating[U]||u.floating[v]);const le=G/2-L/2,z=ie/2-A[v]/2-1,oe=mi(x[k],z),te=mi(x[I],z),fe=ie-A[v]-te,he=ie/2-A[v]/2+le,de=bT(oe,he,fe),we=!f.arrow&&oo(a)!=null&&he!==de&&u.reference[v]/2-(he<oe?oe:te)-A[v]/2<0,ce=we?he<oe?he-oe:he-fe:0;return{[b]:y[b]+ce,data:j({[b]:de,centerOffset:he-de-ce},we&&{alignmentOffset:ce}),reset:we}})}}),IL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Fe(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,de=Vr(e,n),{mainAxis:m=!0,crossAxis:x=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=de,w=_n(de,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=gi(a),I=Cr(d),U=gi(d)===d,G=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(U||!A?[Ul(d)]:xL(d)),V=v!=="none";!y&&V&&L.push(...vL(d,A,v,G));const ie=[d,...L],le=yield f.detectOverflow(n,w),z=[];let oe=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&z.push(le[k]),x){const we=bL(a,l,G);z.push(le[we[0]],le[we[1]])}if(oe=[...oe,{placement:a,overflows:z}],!z.every(we=>we<=0)){var te,fe;const we=(((te=u.flip)==null?void 0:te.index)||0)+1,ce=ie[we];if(ce&&(!(x==="alignment"?I!==Cr(ce):!1)||oe.every(N=>Cr(N.placement)===I?N.overflows[0]>0:!0)))return{data:{index:we,overflows:oe},reset:{placement:ce}};let W=(fe=oe.filter(re=>re.overflows[0]<=0).sort((re,N)=>re.overflows[1]-N.overflows[1])[0])==null?void 0:fe.placement;if(!W)switch(b){case"bestFit":{var he;const re=(he=oe.filter(N=>{if(V){const M=Cr(N.placement);return M===I||M==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(M=>M>0).reduce((M,J)=>M+J,0)]).sort((N,M)=>N[1]-M[1])[0])==null?void 0:he[0];re&&(W=re);break}case"initialPlacement":W=d;break}if(a!==W)return{reset:{placement:W}}}return{}})}}};function vT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AT(e){return yL.some(t=>e[t]>=0)}const PL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Fe(this,null,function*(){const{rects:r,platform:s}=n,l=Vr(e,n),{strategy:a="referenceHidden"}=l,u=_n(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ue(j({},u),{elementContext:"reference"})),f=vT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:AT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ue(j({},u),{altBoundary:!0})),f=vT(d,r.floating);return{data:{escapedOffsets:f,escaped:AT(f)}}}default:return{}}})}}},NT=new Set(["left","top"]);function RL(e,t){return Fe(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=gi(n),l=oo(n),d=Cr(n)==="y",f=NT.has(u)?-1:1,p=a&&d?-1:1,m=Vr(t,e);let{mainAxis:x,crossAxis:y,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof b=="number"&&(y=l==="end"?b*-1:b),d?{x:y*p,y:x*f}:{x:x*f,y:y*p}})}const LL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Fe(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield RL(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:ue(j({},f),{placement:l})}})}}},DL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Fe(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=Vr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:G,y:L}=U;return{x:G,y:L}}}}=I,p=_n(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},x=yield u.detectOverflow(n,p),y=Cr(a),b=kh(y);let v=m[b],A=m[y];const w=(U,G)=>bT(G+x[U==="y"?"top":"left"],G,G-x[U==="y"?"bottom":"right"]);l&&(v=w(b,v)),d&&(A=w(y,A));const k=f.fn(ue(j({},n),{[b]:v,[y]:A}));return ue(j({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[b]:l,[y]:d}}})})}}},ML=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=Vr(e,t),x={x:s,y:a},y=Cr(u),b=kh(y);let v=x[b],A=x[y];const w=Vr(f,t),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const G=b==="y"?"height":"width",L=l.reference[b]-l.floating[G]+k.mainAxis,V=l.reference[b]+l.reference[G]-k.mainAxis;v<L?v=L:v>V&&(v=V)}if(m){var I,U;const G=b==="y"?"width":"height",L=NT.has(gi(u)),V=l.reference[y]-l.floating[G]+(L&&((I=d.offset)==null?void 0:I[y])||0)+(L?0:k.crossAxis),ie=l.reference[y]+l.reference[G]+(L?0:((U=d.offset)==null?void 0:U[y])||0)-(L?k.crossAxis:0);A<V?A=V:A>ie&&(A=ie)}return{[b]:v,[y]:A}}}},FL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Fe(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,z=Vr(e,n),{apply:l=()=>{}}=z,d=_n(z,["apply"]),f=yield a.detectOverflow(n,d),p=gi(r),m=oo(r),x=Cr(r)==="y",{width:y,height:b}=s.floating;let v,A;p==="top"||p==="bottom"?(v=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,v=m==="end"?"top":"bottom");const w=b-f.top-f.bottom,k=y-f.left-f.right,I=mi(b-f[v],w),U=mi(y-f[A],k),G=n.middlewareData.shift,L=!G;let V=I,ie=U;G!=null&&G.enabled.x&&(ie=k),G!=null&&G.enabled.y&&(V=w),L&&!m&&(x?ie=y-2*zr(f.left,f.right):V=b-2*zr(f.top,f.bottom)),yield l(ue(j({},n),{availableWidth:ie,availableHeight:V}));const le=yield a.getDimensions(u.floating);return y!==le.width||b!==le.height?{reset:{rects:!0}}:{}})}}};function jl(){return typeof window!="undefined"}function ao(e){return kT(e)?(e.nodeName||"").toLowerCase():"#document"}function Hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(kT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kT(e){return jl()?e instanceof Node||e instanceof Hn(e).Node:!1}function dr(e){return jl()?e instanceof Element||e instanceof Hn(e).Element:!1}function Ir(e){return jl()?e instanceof HTMLElement||e instanceof Hn(e).HTMLElement:!1}function CT(e){return!jl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Hn(e).ShadowRoot}function Pa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function BL(e){return/^(table|td|th)$/.test(ao(e))}function $l(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const UL=/transform|translate|scale|rotate|perspective|filter/,HL=/paint|layout|strict|content/,us=e=>!!e&&e!=="none";let Ph;function Rh(e){const t=dr(e)?fr(e):e;return us(t.transform)||us(t.translate)||us(t.scale)||us(t.rotate)||us(t.perspective)||!Lh()&&(us(t.backdropFilter)||us(t.filter))||UL.test(t.willChange||"")||HL.test(t.contain||"")}function jL(e){let t=Ei(e);for(;Ir(t)&&!uo(t);){if(Rh(t))return t;if($l(t))return null;t=Ei(t)}return null}function Lh(){return Ph==null&&(Ph=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ph}function uo(e){return/^(html|body|#document)$/.test(ao(e))}function fr(e){return Hn(e).getComputedStyle(e)}function zl(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ei(e){if(ao(e)==="html")return e;const t=e.assignedSlot||e.parentNode||CT(e)&&e.host||Or(e);return CT(t)?t.host:t}function OT(e){const t=Ei(e);return uo(t)?(e.ownerDocument||e).body:Ir(t)&&Pa(t)?t:OT(t)}function Ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=OT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Hn(s);if(a){const l=Dh(u);return t.concat(u,u.visualViewport||[],Pa(s)?s:[],l&&n?Ra(l):[])}else return t.concat(s,Ra(s,[],n))}function Dh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IT(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Ir(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=Fl(n)!==a||Fl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Mh(e){return dr(e)?e:e.contextElement}function lo(e){const t=Mh(e);if(!Ir(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=IT(t);let u=(a?Fl(n.width):n.width)/r,l=(a?Fl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const $L=kr(0);function PT(e){const t=Hn(e);return!Lh()||!t.visualViewport?$L:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hn(e)?!1:t}function ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Mh(e);let u=kr(1);t&&(r?dr(r)&&(u=lo(r)):u=lo(e));const l=zL(a,n,r)?PT(a):kr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const x=Hn(a),y=r&&dr(r)?Hn(r):r;let b=x,v=Dh(b);for(;v&&r&&y!==b;){const A=lo(v),w=v.getBoundingClientRect(),k=fr(v),I=w.left+(v.clientLeft+parseFloat(k.paddingLeft))*A.x,U=w.top+(v.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=I,f+=U,b=Hn(v),v=Dh(b)}}return Hl({width:p,height:m,x:d,y:f})}function Vl(e,t){const n=zl(e).scrollLeft;return t?t.left+n:ls(Or(e)).left+n}function RT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Vl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function VL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Or(r),l=t?$l(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=kr(1);const p=kr(0),m=Ir(r);if((m||!m&&!a)&&((ao(r)!=="body"||Pa(u))&&(d=zl(r)),Ir(r))){const y=ls(r);f=lo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const x=u&&!m&&!a?RT(u,d):kr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+x.x,y:n.y*f.y-d.scrollTop*f.y+p.y+x.y}}function qL(e){return Array.from(e.getClientRects())}function YL(e){const t=Or(e),n=zl(e),r=e.ownerDocument.body,s=zr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=zr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Vl(e);const l=-n.scrollTop;return fr(r).direction==="rtl"&&(u+=zr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const LT=25;function WL(e,t){const n=Hn(e),r=Or(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const p=Lh();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Vl(r);if(f<=0){const p=r.ownerDocument,m=p.body,x=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,b=Math.abs(r.clientWidth-m.clientWidth-y);b<=LT&&(a-=b)}else f<=LT&&(a+=f);return{width:a,height:u,x:l,y:d}}const GL=new Set(["absolute","fixed"]);function XL(e,t){const n=ls(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Ir(e)?lo(e):kr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function DT(e,t,n){let r;if(t==="viewport")r=WL(e,n);else if(t==="document")r=YL(Or(e));else if(dr(t))r=XL(t,n);else{const s=PT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Hl(r)}function MT(e,t){const n=Ei(e);return n===t||!dr(n)||uo(n)?!1:fr(n).position==="fixed"||MT(n,t)}function QL(e,t){const n=t.get(e);if(n)return n;let r=Ra(e,[],!1).filter(l=>dr(l)&&ao(l)!=="body"),s=null;const a=fr(e).position==="fixed";let u=a?Ei(e):e;for(;dr(u)&&!uo(u);){const l=fr(u),d=Rh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&GL.has(s.position)||Pa(u)&&!d&&MT(e,u))?r=r.filter(p=>p!==u):s=l,u=Ei(u)}return t.set(e,r),r}function KL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?$l(t)?[]:QL(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=DT(t,p,s);return f.top=zr(m.top,f.top),f.right=mi(m.right,f.right),f.bottom=mi(m.bottom,f.bottom),f.left=zr(m.left,f.left),f},DT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function JL(e){const{width:t,height:n}=IT(e);return{width:t,height:n}}function ZL(e,t,n){const r=Ir(t),s=Or(t),a=n==="fixed",u=ls(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=kr(0);function f(){d.x=Vl(s)}if(r||!r&&!a)if((ao(t)!=="body"||Pa(s))&&(l=zl(t)),r){const y=ls(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?RT(s,l):kr(0),m=u.left+l.scrollLeft-d.x-p.x,x=u.top+l.scrollTop-d.y-p.y;return{x:m,y:x,width:u.width,height:u.height}}function Fh(e){return fr(e).position==="static"}function FT(e,t){if(!Ir(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Or(e)===n&&(n=n.ownerDocument.body),n}function BT(e,t){const n=Hn(e);if($l(e))return n;if(!Ir(e)){let s=Ei(e);for(;s&&!uo(s);){if(dr(s)&&!Fh(s))return s;s=Ei(s)}return n}let r=FT(e,t);for(;r&&BL(r)&&Fh(r);)r=FT(r,t);return r&&uo(r)&&Fh(r)&&!Rh(r)?n:r||jL(e)||n}const e5=function(e){return Fe(this,null,function*(){const t=this.getOffsetParent||BT,n=this.getDimensions,r=yield n(e.floating);return{reference:ZL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function t5(e){return fr(e).direction==="rtl"}const n5={convertOffsetParentRelativeRectToViewportRelativeRect:VL,getDocumentElement:Or,getClippingRect:KL,getOffsetParent:BT,getElementRects:e5,getClientRects:qL,getDimensions:JL,getScale:lo,isElement:dr,isRTL:t5};function UT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function r5(e,t){let n=null,r;const s=Or(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:x,height:y}=f;if(l||t(),!x||!y)return;const b=Bl(m),v=Bl(s.clientWidth-(p+x)),A=Bl(s.clientHeight-(m+y)),w=Bl(p),I={rootMargin:-b+"px "+-v+"px "+-A+"px "+-w+"px",threshold:zr(0,mi(1,d))||1};let U=!0;function G(L){const V=L[0].intersectionRatio;if(V!==d){if(!U)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!UT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(G,ue(j({},I),{root:s.ownerDocument}))}catch(L){n=new IntersectionObserver(G,I)}n.observe(e)}return u(!0),a}function i5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Mh(e),p=s||a?[...f?Ra(f):[],...Ra(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&l?r5(f,n):null;let x=-1,y=null;u&&(y=new ResizeObserver(w=>{let[k]=w;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let b,v=d?ls(e):null;d&&A();function A(){const w=ls(e);v&&!UT(v,w)&&n(),v=w,b=requestAnimationFrame(A)}return n(),()=>{var w;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(b)}}const s5=LL,o5=DL,a5=IL,u5=FL,l5=PL,c5=OL,d5=ML,f5=(e,t,n)=>{const r=new Map,s=j({platform:n5},n),a=ue(j({},s.platform),{_c:r});return CL(e,t,ue(j({},s),{platform:a}))};function HT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ue(j({},s),{toJSON:()=>s})}function h5(e){if(!e)return HT();const{x:t,y:n,width:r,height:s}=e;return HT(t,n,r,s)}function p5(e,t){return{contextElement:Wt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?h5(r):n.getBoundingClientRect()}}}var La=e=>({variable:e,reference:`var(${e})`}),qr={arrowSize:La("--arrow-size"),arrowSizeHalf:La("--arrow-size-half"),arrowBg:La("--arrow-background"),transformOrigin:La("--transform-origin"),arrowOffset:La("--arrow-offset")},m5=e=>e==="top"||e==="bottom"?"y":"x";function g5(e,t){return{name:"transformOrigin",fn(n){var le,z,oe,te,fe;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=m5(d),p=((le=s.arrow)==null?void 0:le.x)||0,m=((z=s.arrow)==null?void 0:z.y)||0,x=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,b=p+x/2,v=m+y/2,A=Math.abs(((oe=s.shift)==null?void 0:oe.y)||0),w=u.reference.height/2,k=y/2,I=(fe=(te=e.offset)==null?void 0:te.mainAxis)!=null?fe:e.gutter,U=typeof I=="number"?I+k:I!=null?I:k,G=A>U,L={top:`${b}px calc(100% + ${U}px)`,bottom:`${b}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],V=`${b}px ${u.reference.y+w-l}px`,ie=!!e.overlap&&f==="y"&&G;return r.floating.style.setProperty(qr.transformOrigin.variable,ie?V:L),{data:{transformOrigin:ie?V:L}}}}}var E5={name:"rects",fn({rects:e}){return{data:e}}},y5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${qr.arrowOffset.reference})`}),{}}}};function T5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var b5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function jT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Bh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function x5(e,t,n){const r=e||t.createElement("div");return c5({element:r,padding:n.arrowPadding})}function _5(e,t){var n;if(!$6((n=t.offset)!=null?n:t.gutter))return s5(({placement:r})=>{var p,m,x,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=T5(r),d=l?void 0:t.shift,f=(y=(x=t.offset)==null?void 0:x.crossAxis)!=null?y:d;return fh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function w5(e){if(!e.flip)return;const t=Bh(e.boundary);return a5(ue(j({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function S5(e){if(!e.slide&&!e.overlap)return;const t=Bh(e.boundary);return o5(ue(j({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:d5()}))}function v5(e){return u5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),l=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${l}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function A5(e){var t;if(e.hideWhenDetached)return l5({strategy:"referenceHidden",boundary:(t=Bh(e.boundary))!=null?t:"clippingAncestors"})}function N5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function k5(e,t,n={}){const r=p5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},b5,n),a=t.querySelector("[data-part=arrow]"),u=[_5(a,s),w5(s),S5(s),x5(a,t.ownerDocument,s),y5(a),g5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),v5(s),A5(s),E5],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Fe(null,null,function*(){var U;if(!r||!t)return;const v=yield f5(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const A=Js(t),w=jT(A,v.x),k=jT(A,v.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${k}px`),s.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 I=t.firstElementChild;if(I){const G=eo(I);t.style.setProperty("--z-index",G.zIndex)}}),x=()=>Fe(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=N5(s.listeners),b=s.listeners?i5(r,t,x,y):K6;return x(),()=>{b==null||b(),p==null||p({placed:!1})}}function $T(e,t,n={}){const l=n,{defer:r}=l,s=_n(l,["defer"]),a=r?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(k5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var C5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function O5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:qr.arrowSize.reference,height:qr.arrowSize.reference,[qr.arrowSizeHalf.variable]:`calc(${qr.arrowSize.reference} / 2)`,[qr.arrowOffset.variable]:`calc(${qr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?C5[t.split("-")[0]]:void 0,background:qr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var co=new WeakMap,ql=new WeakMap,Yl={},Uh=0,zT=e=>e&&(e.host||zT(e.parentNode)),I5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=zT(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),P5=new Set(["script","output","status","next-route-announcer"]),R5=e=>P5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),L5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=I5(n,Array.isArray(e)?e:[e]);Yl[r]||(Yl[r]=new WeakMap);const l=Yl[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Wt(y)&&tT(y,b=>{m(b)})});const x=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,b=>{if(f.has(b))x(b);else try{if(R5(b))return;const A=b.getAttribute(s)==="true",w=(co.get(b)||0)+1,k=(l.get(b)||0)+1;co.set(b,w),l.set(b,k),d.push(b),w===1&&A&&ql.set(b,!0),k===1&&b.setAttribute(r,""),A||b.setAttribute(s,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",b,v)}})};return x(n),f.clear(),Uh++,()=>{d.forEach(y=>{const b=co.get(y)-1,v=l.get(y)-1;co.set(y,b),l.set(y,v),b||(ql.has(y)||y.removeAttribute(s),ql.delete(y)),v||y.removeAttribute(r)}),Uh--,Uh||(co=new WeakMap,co=new WeakMap,ql=new WeakMap,Yl={})}},D5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,M5=(e,t=D5(e),n="data-aria-hidden",r=!0)=>{if(t)return L5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},F5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function VT(e,t={}){const{defer:n=!0}=t,r=n?F5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(M5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function B5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function U5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var qT="pointerdown.outside",YT="focus.outside";function H5(e){for(const t of e)if(Wt(t)&&Nr(t))return!0;return!1}var WT=e=>"clientY"in e;function j5(e,t){if(!WT(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 $5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function GT(e,t){if(!t||!WT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},l={x:e.clientX,y:e.clientY};return $5(u,l)?r||a:!1}function z5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Ar(e),f=Js(e),p=B5(f),m=U5(f);function x(I,U){if(!Wt(U)||!U.isConnected||Ks(e,U)||j5(e,I)||l&&eT(e,U))return!1;const G=d.querySelector(`[aria-controls="${e.id}"]`);if(G){const V=xh(G);if(GT(I,V))return!1}const L=xh(e);return GT(I,L)?!1:!(n!=null&&n(U))}const y=new Set,b=is(e==null?void 0:e.getRootNode());function v(I){function U(G){var le,z;const L=u&&!nT()?jt:oe=>oe(),V=G!=null?G:I,ie=(z=(le=V==null?void 0:V.composedPath)==null?void 0:le.call(V))!=null?z:[V==null?void 0:V.target];L(()=>{const oe=b?ie[0]:cr(I);if(!(!e||!x(I,oe))){if(s||a){const te=dh(s,a);e.addEventListener(qT,te,{once:!0})}XT(e,qT,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:P4(V),focusable:H5(ie),target:oe}})}})}I.pointerType==="touch"?(y.forEach(G=>G()),y.add(Gt(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const A=new Set,w=setTimeout(()=>{A.add(Gt(d,"pointerdown",v,!0)),A.add(m.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function k(I){(u?jt:G=>G())(()=>{var V,ie;const G=(ie=(V=I==null?void 0:I.composedPath)==null?void 0:V.call(I))!=null?ie:[I==null?void 0:I.target],L=b?G[0]:cr(I);if(!(!e||!x(I,L))){if(r||a){const le=dh(r,a);e.addEventListener(YT,le,{once:!0})}XT(e,YT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Nr(L),target:L}})}})}return nT()||(A.add(Gt(d,"focusin",k,!0)),A.add(m.addEventListener("focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(w),y.forEach(I=>I()),A.forEach(I=>I())}}function V5(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(z5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function XT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function q5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Gt(Ar(e),"keydown",n,{capture:!0})}var QT="layer:request-dismiss",Xn={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=>Ks(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ks(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=>Xn.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];W5(e,QT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),Y5(e,QT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Y5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function W5(e,t,n){e.addEventListener(t,n,{once:!0})}var KT;function JT(){Xn.layers.forEach(({node:e})=>{e.style.pointerEvents=Xn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function G5(e){e.style.pointerEvents=""}function X5(e,t){const n=Ar(e),r=[];return Xn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(KT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=tL(()=>{const l=s();return Wt(l)?l:null},{timeout:1e3});a.then(l=>r.push(Pl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{Xn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=KT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function Q5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){hh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Xn.add(f),JT();function p(v){var w,k;const A=cr(v.detail.originalEvent);Xn.isBelowPointerBlockingLayer(e)||Xn.isInBranch(A)||((w=t.onPointerDownOutside)==null||w.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var w,k;const A=cr(v.detail.originalEvent);Xn.isInBranch(A)||((w=t.onFocusOutside)==null||w.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function x(v){var A;Xn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var I;if(!e)return!1;const A=typeof u=="function"?u():u,w=Array.isArray(A)?A:[A],k=(I=t.persistentElements)==null?void 0:I.map(U=>U()).filter(Wt);return k&&w.push(...k),w.some(U=>Ks(U,v))||Xn.isInNestedLayer(e,v)}const b=[a?X5(e,t.persistentElements):void 0,q5(e,x),V5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{Xn.remove(e),JT(),G5(e),b.forEach(v=>v==null?void 0:v())}}function ZT(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=Xs(e)?e():e;s.push(Q5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var K5=Object.defineProperty,J5=(e,t,n)=>t in e?K5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t,n)=>J5(e,typeof t!="symbol"?t+"":t,n),eb={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()}},Z5=[],eD=class{constructor(e,t){vt(this,"trapStack"),vt(this,"config"),vt(this,"doc"),vt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),vt(this,"portalContainers",new Set),vt(this,"listenerCleanups",[]),vt(this,"handleFocus",r=>{const s=cr(r),a=this.findContainerIndex(s,r)>=0;if(a||kl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Ca(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ca(f)>0))||(l=!1);else l=!1;l&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),vt(this,"handlePointerDown",r=>{const s=cr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Ma(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ma(this.config.allowOutsideClick,r)||r.preventDefault()}}),vt(this,"handleClick",r=>{const s=cr(r);this.findContainerIndex(s,r)>=0||Ma(this.config.clickOutsideDeactivates,r)||Ma(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),vt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Da(r)&&r.preventDefault(),this.tryFocus(a)}}),vt(this,"handleEscapeKey",r=>{tD(r)&&Ma(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),vt(this,"_mutationObserver"),vt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return w4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?S4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),vt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),vt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Nr(r)){const s=Zs(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),vt(this,"tryFocus",r=>{if(r!==!1&&r!==Zs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,nD(r)&&r.select()}}),vt(this,"deactivate",r=>{if(!this.state.active)return this;const s=j({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),eb.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),l=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{tb(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),vt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),vt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),vt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),vt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),vt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),vt(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),vt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||cr(s);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Nr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,x=this.state.tabbableGroups[m];l=Ca(u)>=0?x.lastTabbableNode:x.lastDomTabbableNode}else Da(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Nr(u)&&!ss(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,x=this.state.tabbableGroups[m];l=Ca(u)>=0?x.firstTabbableNode:x.firstDomTabbableNode}else Da(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||Z5;const n=j({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Da(r)&&!r.shiftKey},isKeyBackward(r){return Da(r)&&r.shiftKey}},t);this.doc=n.document||Ar(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=>{b4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?eT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=to(e,{getShadowRoot:this.config.getShadowRoot}),n=lT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let l=!1;for(let f=0;f<t.length;f++)if(Ca(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const x=n.indexOf(f);if(!(x<0)){if(p){for(let y=x+1;y<n.length;y++)if(ss(n[y]))return n[y]}else for(let y=x-1;y>=0;y--)if(ss(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return eb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?tb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Gt(this.doc,"focusin",this.handleFocus,!0),Gt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Gt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Gt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Gt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Gt(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=Zs(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Da=e=>e.key==="Tab",Ma=(e,...t)=>typeof e=="function"?e(...t):e,tD=e=>!e.isComposing&&e.key==="Escape",tb=e=>setTimeout(e,0),nD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function nb(e,t={}){let n;const r=jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new eD(s,ue(j({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Ar(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Hh="data-scroll-lock";function rD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function rb(e){const t=eo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function ib(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Hh))return;const u=rb(r)||rb(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Hh,"");const d=()=>Z4(r,"--scrollbar-width",`${l}px`),f=rD(r),p=()=>{const b={overflow:"hidden"};return!u&&l>0&&(b[f]=`${l}px`),Pl(s,b)},m=()=>{var G,L;const{scrollX:b,scrollY:v,visualViewport:A}=n,w=(G=A==null?void 0:A.offsetLeft)!=null?G:0,k=(L=A==null?void 0:A.offsetTop)!=null?L:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(k))}px`,left:`${-(b-Math.floor(w))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const U=Pl(s,I);return()=>{U==null||U(),n.scrollTo({left:b,top:v,behavior:"instant"})}},x=[d(),Cl()?m():p()];return()=>{x.forEach(b=>b==null?void 0:b()),s.removeAttribute(Hh)}}var iD=as("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Pr=iD.build(),sb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},ob=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},sD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},$h=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},oD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ub=e=>e.getById(sb(e)),fo=e=>e.getById(ob(e)),ho=e=>e.getById(jh(e)),lb=e=>e.getById(ab(e)),aD=e=>e.getById($h(e)),uD=e=>e.getById(zh(e));function lD(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),x=O5(ue(j({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ue(j({id:sD(l)},Pr.arrow.attrs),{dir:u("dir"),style:x.arrow}))},getArrowTipProps(){return t.element(ue(j({},Pr.arrowTip.attrs),{dir:u("dir"),style:x.arrowTip}))},getAnchorProps(){return t.element(ue(j({},Pr.anchor.attrs),{dir:u("dir"),id:sb(l)}))},getTriggerProps(){return t.button(ue(j({},Pr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:ob(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":jh(l),onPointerDown(y){rT(y)&&O4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ue(j({},Pr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(j({id:ab(l)},Pr.positioner.attrs),{dir:u("dir"),style:x.floating}))},getContentProps(){return t.element(ue(j({},Pr.content.attrs),{dir:u("dir"),id:jh(l),tabIndex:-1,role:"dialog","aria-modal":Ky(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Qs(d),"aria-labelledby":m.title?$h(l):void 0,"aria-describedby":m.description?zh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ue(j({},Pr.title.attrs),{id:$h(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ue(j({},Pr.description.attrs),{id:zh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ue(j({},Pr.closeTrigger.attrs),{dir:u("dir"),id:oD(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var cD={props({props:e}){return ue(j({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:j({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=ub(n))!=null?a:fo(n);return $T(r,()=>lb(n),ue(j({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>ho(n);let s=!0;return ZT(r,{type:"popover",pointerBlocking:t("modal"),exclude:fo(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:K4(()=>ho(t),{triggerElement:fo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?VT(()=>[ho(t),fo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return ib(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?nb(()=>ho(t),{initialFocus:()=>cT({root:ho(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=ub(n))!=null?u:fo(n);$T(s,()=>lb(n),ue(j(j({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){jt(()=>{Object.assign(e.get("renderedElements"),{title:!!aD(t),description:!!uD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||jt(()=>{const n=cT({root:ho(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||jt(()=>{const a=fo(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})}}}};io()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[TU,Wl]=os({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[bU,Vh]=os({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),dD=e=>{const t=D.useId(),{getRootNode:n}=Wl(),{dir:r}=Vh(),s=j({id:t,dir:r,getRootNode:n},e),a=Ll(cD,s);return lD(a,Sh)},fD=e=>{const[t,u]=TT(e),l=u,{children:n}=l,r=_n(l,["children"]),s=dD(r),a=Nh($t({present:s.open},t));return _.jsx(fL,{value:s,children:_.jsx(gT,{value:a,children:n})})},cb=D.forwardRef((e,t)=>{const n=Ah(),r=Oa(),s=$t(ue(j({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(dn.button,ue(j({},s),{ref:t}))});cb.displayName="PopoverTrigger";function hD(e){return lt({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 pD(e){return lt({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 db(e){return lt({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 fb(e){return lt({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 mD(e){return lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function gD(e){return lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function qh(e){return lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function hb(e){return lt({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 ED=({className:e,componentType:t,children:n})=>{const[r,s]=D.useState(!1),{globalClassName:a}=ct(),u=f=>{s(f.open)},l=D.useCallback(()=>{s(!1)},[]),d=D.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(fD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(cb,{"aria-label":`Overflow menu for ${t}`,className:F(`${C}-overflow-menu-button-trigger`,`${C}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(hb,{})}),_.jsx(yT,{children:_.jsx(ET,{className:F(`${C}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(zy.Provider,{value:d,children:n})})})]})};function pb(e){return lt({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 mb(e){return lt({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[yD,cs]=os({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Yh=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getControlProps(),e);return _.jsx(dn.div,ue(j(j({},r),e),{ref:t}))});Yh.displayName="CarouselControl";const Wh=D.forwardRef((e,t)=>{const[n,r]=Ia()(e,["readOnly","index"]),s=cs(),a=$t(s.getIndicatorProps(n),r);return _.jsx(dn.button,ue(j({},a),{ref:t}))});Wh.displayName="CarouselIndicator";const Gh=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getIndicatorGroupProps(),e);return _.jsx(dn.div,ue(j({},r),{ref:t}))});Gh.displayName="CarouselIndicatorGroup";const Xh=D.forwardRef((e,t)=>{const[n,r]=Ia()(e,["index","snapAlign"]),s=cs(),a=$t(s.getItemProps(n),r);return _.jsx(dn.div,ue(j({},a),{ref:t}))});Xh.displayName="CarouselItem";const Qh=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getItemGroupProps(),e);return _.jsx(dn.div,ue(j({},r),{ref:t}))});Qh.displayName="CarouselItemGroup";const Kh=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getNextTriggerProps(),e);return _.jsx(dn.button,ue(j({},r),{ref:t}))});Kh.displayName="CarouselNextTrigger";const Jh=D.forwardRef((e,t)=>{const n=cs(),r=$t(n.getPrevTriggerProps(),e);return _.jsx(dn.button,ue(j({},r),{ref:t}))});Jh.displayName="CarouselPrevTrigger";function TD(e){const t=eo(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function l(x,y){let b=parseFloat(x);return/%/.test(x)&&(b/=100,b*=y),Number.isNaN(b)?0:b}let d=l(r,n.width),f=l(s,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function bD(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 gb(e){let t=[];for(const n of e.children)t=t.concat(n,gb(n));return t}function Eb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?gb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!bD(n,m,u))continue;const x=eo(p);let[y,b]=x.getPropertyValue("scroll-snap-align").split(" ");typeof b=="undefined"&&(b=y);const v=a==="x"?b:y,A=m[l]-n[l]+e[f];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+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function yb(e){const t=e.getBoundingClientRect(),n=TD(e),r=Eb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Tb([...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(bb(0,s.x))),y:Tb([...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(bb(0,s.y)))}}function xD(e,t,n){const r=Eb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Tb=e=>[...new Set(e)],bb=(e,t)=>n=>Math.max(e,Math.min(t,n)),_D=as("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Yr=_D.build(),wD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},SD=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},Gl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},vD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},AD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},ND=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},xb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Cn=e=>e.getById(Gl(e)),_b=e=>J4(Cn(e),"[data-part=item]"),kD=(e,t)=>e.getById(xb(e,t)),wb=e=>{const t=Cn(e);if(!t)return;const n=to(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function CD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),x=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),b=r.get("page"),v=l("slidesPerPage"),A=l("padding"),w=l("translations");return{isPlaying:d,isDragging:f,page:b,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return b/y.length},scrollToIndex(k,I){a({type:"INDEX.SET",index:k,instant:I})},scrollTo(k,I){a({type:"PAGE.SET",index:k,instant:I})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ue(j({},Yr.root.attrs),{id:wD(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(ue(j({},Yr.itemGroup.attrs),{id:Gl(u),"data-orientation":l("orientation"),"data-dragging":Qs(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(k){Ks(k.currentTarget,cr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Ks(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!l("allowMouseDrag")||!rT(k))return;const I=cr(k);Nr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:J6(k=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";k[I]<0&&!s("canScrollPrev")||k[I]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[x?"x":"y",l("snapType")].join(" "),gridAutoFlow:x?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[x?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[x?"scrollPaddingInline":"scrollPaddingBlock"]:A,[x?"paddingInline":"paddingBlock"]:A,[x?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const I=r.get("slidesInView").includes(k.index);return t.element(ue(j({},Yr.item.attrs),{id:SD(u,k.index),dir:l("dir"),role:"group","data-index":k.index,"data-inview":Qs(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":w.item(k.index,l("slideCount")),"aria-hidden":Ky(!I),style:{scrollSnapAlign:(()=>{var ie;const U=(ie=k.snapAlign)!=null?ie:"start",G=l("slidesPerMove"),L=G==="auto"?Math.floor(l("slidesPerPage")):G;return(k.index+L)%L===0?U:void 0})()}}))},getControlProps(){return t.element(ue(j({},Yr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ue(j({},Yr.prevTrigger.attrs),{id:AD(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":w.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Gl(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ue(j({},Yr.nextTrigger.attrs),{dir:l("dir"),id:vD(u),type:"button","aria-label":w.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Gl(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ue(j({},Yr.indicatorGroup.attrs),{dir:l("dir"),id:ND(u),"data-orientation":l("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",U={ArrowDown(V){x||(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowUp(V){x||(a({type:"PAGE.PREV",src:I}),V.preventDefault())},ArrowRight(V){x&&(a({type:"PAGE.NEXT",src:I}),V.preventDefault())},ArrowLeft(V){x&&(a({type:"PAGE.PREV",src:I}),V.preventDefault())},Home(V){a({type:"PAGE.SET",index:0,src:I}),V.preventDefault()},End(V){a({type:"PAGE.SET",index:y.length-1,src:I}),V.preventDefault()}},G=D4(k,{dir:l("dir"),orientation:l("orientation")}),L=U[G];L==null||L(k)}}))},getIndicatorProps(k){return t.button(ue(j({},Yr.indicator.attrs),{dir:l("dir"),id:xb(u,k.index),type:"button","data-orientation":l("orientation"),"data-index":k.index,"data-readonly":Qs(k.readOnly),"data-current":Qs(k.index===b),"aria-label":w.indicator(k.index),onClick(I){I.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ue(j({},Yr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":Qs(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var OD={props({props:e}){return i4(e,["slideCount"],"carousel"),ue(j({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:j({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:ID(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 j6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Cn(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=Cn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),wb(e)});return wb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Cn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};jt(()=>{s(),jt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return _b(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Cn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var x;const p=f.target,m=Number((x=p.dataset.index)!=null?x:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?M6(d,m):F6(d,m)},n.get("slidesInView"));n.set("slidesInView",B6(l))},{root:r,threshold:t("inViewThreshold")});return _b(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Cn(n);return r?Gt(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 Gt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return X4(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 Gt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=Xy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Cn(n);if(!l)return;const d=r("isHorizontal")?"left":"top";s(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Cn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=Yy(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=U6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Cn(r);if(!s)return;const a=xD(s,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Xy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Cn(n);if(!r)return;const s=yb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Cn(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=Cn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Cn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=yb(r),l=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);jt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=kD(n,e.get("page"));r&&jt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function ID(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}io()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),io()(["index","readOnly"]),io()(["index","snapAlign"]);const PD=e=>{const t=D.useId(),{getRootNode:n}=Wl(),{dir:r}=Vh(),s=j({id:t,dir:r,getRootNode:n},e),a=Ll(OD,s);return CD(a,Sh)},Zh=D.forwardRef((e,t)=>{const[n,r]=Ia()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=PD(n),a=$t(s.getRootProps(),r);return _.jsx(yD,{value:s,children:_.jsx(dn.div,ue(j({},a),{ref:t}))})});Zh.displayName="CarouselRoot";const RD=180,LD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},DD=({globalClassName:e,className:t,itemMinWidth:n=RD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ie,le)=>({node:ie,key:D.isValidElement(ie)&&ie.key!=null?ie.key:`carousel-item-${le}`})),x=m.length,y=D.useRef(null),[b,v]=D.useState(0),{width:A}=ON();D.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,x]);const w=LD(r),k=n+w,I=b>0?(b+w)/k:1,U=Math.max(1,Math.floor(I));if(x===0)return null;const G=x>U,L=Math.ceil(x/U),V=G?Math.max(1,I):U;return _.jsxs(Zh,{ref:y,className:F(e,t,`${C}-carousel`),slidesPerPage:V,slidesPerMove:U,spacing:r,loop:s,allowMouseDrag:a,slideCount:x,onPageChange:d,"aria-label":f,children:[_.jsx(Qh,{className:F(e,`${C}-carousel__item-group`,{"carousel-row-container":!G}),children:m.map(({node:ie,key:le},z)=>_.jsx(Xh,{index:z,className:F(e,`${C}-carousel__item`),children:ie},le))}),l&&G&&_.jsxs(Yh,{className:F(e,`${C}-carousel__control`),children:[_.jsx(Jh,{className:F(e,`${C}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(db,{size:"16px"})}),_.jsx(Kh,{className:F(e,`${C}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(fb,{size:"16px"})})]}),u&&G&&_.jsx(Gh,{className:F(e,`${C}-carousel__indicator-group`),children:Array.from({length:L},(ie,le)=>_.jsx(Wh,{index:le,className:F(e,`${C}-carousel__indicator`),"aria-label":`Go to slide group ${le+1}`},le))})]})},MD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${C}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.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"})})}),[FD,BD]=os({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),UD=e=>Ia()(e,["lazyMount","unmountOnExit"]),[HD,Fa]=os({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Sb=D.forwardRef((e,t)=>{const n=Fa(),r=BD(),s=Nh(ue(j({},r),{present:n.open})),a=$t(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(dn.div,ue(j({},a),{ref:Dl(s.ref,t)}))});Sb.displayName="DialogBackdrop";const ep=D.forwardRef((e,t)=>{const n=Fa(),r=Oa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(dn.div,ue(j({},s),{ref:Dl(r.ref,t)}))});ep.displayName="DialogContent";const tp=D.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getDescriptionProps(),e);return _.jsx(dn.div,ue(j({},r),{ref:t}))});tp.displayName="DialogDescription";const np=D.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getPositionerProps(),e);return Oa().unmounted?null:_.jsx(dn.div,ue(j({},r),{ref:t}))});np.displayName="DialogPositioner";var jD=as("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ds=jD.build(),vb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Nb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Xl=e=>e.getById(rp(e)),$D=e=>e.getById(vb(e)),zD=e=>e.getById(Ab(e)),VD=e=>e.getById(Nb(e)),qD=e=>e.getById(ip(e)),YD=e=>e.getById(sp(e)),WD=e=>e.getById(kb(e));function GD(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,l=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ue(j({},ds.trigger.attrs),{dir:a("dir"),id:Nb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":rp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ue(j({},ds.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Ab(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(j({},ds.positioner.attrs),{dir:a("dir"),id:vb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ue(j({},ds.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:rp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:ip(u),"aria-describedby":f.description?sp(u):void 0}))},getTitleProps(){return t.element(ue(j({},ds.title.attrs),{dir:a("dir"),id:ip(u)}))},getDescriptionProps(){return t.element(ue(j({},ds.description.attrs),{dir:a("dir"),id:sp(u)}))},getCloseTriggerProps(){return t.button(ue(j({},ds.closeTrigger.attrs),{dir:a("dir"),id:kb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var XD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>WD(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return j({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return ZT(()=>Xl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[VD(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return ib(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?nb(()=>Xl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?VT(()=>[Xl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){jt(()=>{e.set("rendered",{title:!!qD(t),description:!!YD(t)})})},syncZIndex({scope:e}){jt(()=>{const t=Xl(e);if(!t)return;const n=eo(t);[$D(e),zD(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};io()(["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 QD=e=>{const t=D.useId(),{getRootNode:n}=Wl(),{dir:r}=Vh(),s=j({id:t,getRootNode:n,dir:r},e),a=Ll(XD,s);return GD(a,Sh)},Cb=e=>{const[t,l]=TT(e),d=l,{children:n}=d,r=_n(d,["children"]),[s]=UD(t),a=QD(r),u=Nh($t({present:a.open},t));return _.jsx(HD,{value:a,children:_.jsx(FD,{value:s,children:_.jsx(gT,{value:u,children:n})})})},Ob=D.forwardRef((e,t)=>{const n=Fa(),r=$t(n.getTitleProps(),e);return _.jsx(dn.h2,ue(j({},r),{ref:t}))});Ob.displayName="DialogTitle";const KD=({children:e})=>{const[t,n]=D.useState(!1),r=D.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=D.useMemo(()=>({isOpen:t}),[t]);return _.jsx(ch.Provider,{value:r,children:_.jsx($y.Provider,{value:s,children:e})})},Ib=()=>D.useContext($y),Pb=()=>{const e=D.useContext(ch);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},JD=`${C}-overflow-menu-button-trigger`,ZD=({componentType:e,children:t})=>{const{isOpen:n}=Ib(),{closeMenu:r}=Pb(),{globalClassName:s}=ct(),a=D.useRef(null);return D.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${JD}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",l)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${C}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},e8=({componentType:e,className:t})=>{const{toggleMenu:n}=Pb(),{isOpen:r}=Ib(),{globalClassName:s}=ct();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${C}-overflow-menu-button-trigger`,`${C}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(hb,{})})};class t8{constructor(){Xe(this,"initialState",Vg);Xe(this,"promptsStateProxy");Xe(this,"promptsParamsProxy");Xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return i8(n,r),Reflect.set(t,n,r)});Xe(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Xe(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Xe(this,"updatePromptsParamsProxy",t=>new Proxy(j({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const yi=new t8,n8=e=>{window.addEventListener(Od,e)},r8=e=>{window.removeEventListener(Od,e)},i8=(e,t)=>{const n=new CustomEvent(Od,{detail:{property:e,value:t}});window.dispatchEvent(n)},Rb=e=>{const t=yi.isOpen,n=typeof e=="boolean"?e:!t;yi.promptsStateProxy.isOpen=n},s8=e=>{const t=yi.isInline,n=typeof e=="boolean"?e:!t;yi.promptsStateProxy.isInline=n},o8=({elementId:e,entryType:t,params:n,isInline:r})=>{yi.promptsStateProxy.elementId=e,t&&(yi.promptsStateProxy.entryType=t),typeof r=="boolean"&&s8(r),n&&yi.updatePromptsParamsProxy(n),yi.isOpen||Rb(!0)},a8=()=>{const e=D.useContext(Gg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},u8=()=>{const e=D.useContext(Yg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Ql=()=>{const e=D.useContext(qg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},l8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{previousComponentType:r}=ai(),s=Gs(),a=()=>{Iu(r||"dialog"),s()};return t?_.jsx(ar,{className:F(n,`${C}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(pb,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(pb,{}),"Show ",r||"dialog"]})},c8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{isModalFullscreen:r}=ai(),s=Gs(),a=()=>{Pd(!r),s()},u=r?ok:ak,l="Toggle Fullscreen";return t?_.jsx(ar,{ariaLabel:l,title:l,className:F(n,`${C}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},d8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{dialogPosition:r}=ai(),s=Gs(),a=r==="bottom-left",u=()=>{Rd(a?"bottom-right":"bottom-left"),s()},l=a?pD:hD,d=a?"Move right":"Move left";return t?_.jsx(ar,{className:F(n,`${C}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},Lb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=ct(),{mode:d}=ai(),f=u==="messaging"&&l&&!!r,p=d==="standalone",m=e==="modal",x=m?l8:Fb,y=m?c8:d8,b=D.useMemo(()=>s?ZN(s):{},[s]);return _.jsx(KD,{children:_.jsxs("div",{className:F(a,`${C}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${C}-${e}-header`,{standalone:p,embedded:!p}),style:b,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${C}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(Ob,{className:F(a,`${C}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${C}-${e}-controls`),children:[_.jsx(x,{componentType:e,isIcon:!0}),_.jsx(e8,{componentType:e}),_.jsx(MD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(ZD,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(g8,{componentType:e}),_.jsx(Vy,{componentType:e,onClearChat:t}),f&&_.jsx(qy,{componentType:e,onDownloadTranscript:r})]})]})})},Kl="USD",Wr=(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}`}},f8=({retailPrice:e,discountPrice:t,currencyCode:n=Kl})=>{const r=n||Kl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Wr(a,r),comparePrice:Wr(u,r),hasDiscount:s}},Db=e=>typeof e=="number"&&Number.isFinite(e),h8=({priceBreakdown:e,currencyCode:t=Kl})=>{if(!e)return null;const n=t||Kl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Db),a=r.map(p=>p==null?void 0:p.max).filter(Db);if(s.length===0||a.length===0)return null;const u=Math.min(...s),l=Math.max(...a);if(u===l)return null;const d=Wr(u,n),f=Wr(l,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},op=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=f8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${C}-price`),style:f,children:[_.jsx("span",{className:F(s,`${C}-price__amount`),children:u}),d&&l&&_.jsx("span",{className:F(s,`${C}-price__compare`),children:l})]})},p8={sparkle:qh,plus:mD,"paper-plane":gD},Mb=({icon:e,className:t})=>{const n=p8[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},m8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ct(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=b=>()=>{a(b)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},x=b=>_.jsxs(_.Fragment,{children:[l&&_.jsx(Mb,{icon:l,className:`${C}-suggestion-button-icon`}),_.jsx("span",{children:b})]});return _.jsx("div",{className:F(t,`${C}-suggestion-container ${f}`,e),children:n.map(b=>s?_.jsx(tl,{disabled:r,className:F(t,`${C}-suggestion-button standalone`,m),onClick:p(b),children:x(b)},b):_.jsx("button",{disabled:r,className:F(t,`${C}-suggestion-button embedded`,m),onClick:p(b),children:x(b)},b))})},g8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ct();if(!r)return null;const s=()=>{jr(!1),Ou(!0)};return t?_.jsx(ar,{className:F(n,`${C}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(a1,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(a1,{}),"Minimize"]})},Fb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),r=Gs(),s=()=>{Iu("modal"),r()};return t?_.jsx(ar,{className:F(n,`${C}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(mb,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(mb,{}),"Show modal"]})},E8=["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"],y8=3e3,T8=400,b8=({globalClassName:e,isWidgetStandalone:t,messages:n=E8})=>{const[r,s]=D.useState(0),[a,u]=D.useState(!0);return D.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},T8)},y8);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),_.jsxs("div",{className:F(e,`${C}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${C}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${C}-connecting-pulse`}),_.jsx("div",{className:`${C}-connecting-ring`})]}),_.jsx("span",{className:F(`${C}-connecting-text`,a&&`${C}-connecting-text--visible`),children:n[r]})]})},x8=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${C}-processing-text`,children:t}):null,_8=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${C}-processing-shimmer-bar`}),_.jsx("div",{className:`${C}-processing-shimmer-bar`}),_.jsx("div",{className:`${C}-processing-shimmer-bar`})]}):null,ap=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${C}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(x8,{shouldShow:!!n,loadingText:n}),_.jsx(_8,{shouldShow:!n})]});function Bb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function w8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S8(e,t,n){const s=fl((n||{}).ignore||[]),a=v8(t);let u=-1;for(;++u<a.length;)_E(e,"text",l);function l(f,p){let m=-1,x;for(;++m<p.length;){const y=p[m],b=x?x.children:void 0;if(s(y,b?b.indexOf(y):void 0,x))return;x=y}if(x)return d(f,p)}function d(f,p){const m=p[p.length-1],x=a[u][0],y=a[u][1];let b=0;const A=m.children.indexOf(f);let w=!1,k=[];x.lastIndex=0;let I=x.exec(f.value);for(;I;){const U=I.index,G={index:I.index,input:I.input,stack:[...p,f]};let L=y(...I,G);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?x.lastIndex=U+1:(b!==U&&k.push({type:"text",value:f.value.slice(b,U)}),Array.isArray(L)?k.push(...L):L&&k.push(L),b=U+I[0].length,w=!0),!x.global)break;I=x.exec(f.value)}return w?(b<f.value.length&&k.push({type:"text",value:f.value.slice(b)}),m.children.splice(A,1,...k)):k=[f],A+k.length}}function v8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([A8(s[0]),N8(s[1])])}return t}function A8(e){return typeof e=="string"?new RegExp(w8(e),"g"):e}function N8(e){return typeof e=="function"?e:function(){return e}}const up="phrasing",lp=["autolink","link","image","label"];function k8(){return{transforms:[D8],enter:{literalAutolink:O8,literalAutolinkEmail:cp,literalAutolinkHttp:cp,literalAutolinkWww:cp},exit:{literalAutolink:L8,literalAutolinkEmail:R8,literalAutolinkHttp:I8,literalAutolinkWww:P8}}}function C8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:up,notInConstruct:lp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:up,notInConstruct:lp},{character:":",before:"[ps]",after:"\\/",inConstruct:up,notInConstruct:lp}]}}function O8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function cp(e){this.config.enter.autolinkProtocol.call(this,e)}function I8(e){this.config.exit.autolinkProtocol.call(this,e)}function P8(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 R8(e){this.config.exit.autolinkEmail.call(this,e)}function L8(e){this.exit(e)}function D8(e){S8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,M8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),F8]],{ignore:["link","linkReference"]})}function M8(e,t,n,r,s){let a="";if(!Ub(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!B8(n)))return!1;const u=U8(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function F8(e,t,n,r){return!Ub(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function B8(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 U8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=Bb(e,"(");let a=Bb(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ub(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ki(n)||sl(n))&&(!t||n!==47)}Hb.peek=G8;function H8(){this.buffer()}function j8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $8(){this.buffer()}function z8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function V8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ur(this.sliceSerialize(e)).toLowerCase(),n.label=t}function q8(e){this.exit(e)}function Y8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ur(this.sliceSerialize(e)).toLowerCase(),n.label=t}function W8(e){this.exit(e)}function G8(){return"["}function Hb(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=s.move("]"),a}function X8(){return{enter:{gfmFootnoteCallString:H8,gfmFootnoteCall:j8,gfmFootnoteDefinitionLabelString:$8,gfmFootnoteDefinition:z8},exit:{gfmFootnoteCallString:V8,gfmFootnoteCall:q8,gfmFootnoteDefinitionLabelString:Y8,gfmFootnoteDefinition:W8}}}function Q8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Hb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
38
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?jb:K8))),f(),d}}function K8(e,t,n){return t===0?e:jb(e,t,n)}function jb(e,t,n){return(n?"":" ")+e}const J8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$b.peek=rM;function Z8(){return{canContainEols:["delete"],enter:{strikethrough:tM},exit:{strikethrough:nM}}}function eM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:J8}],handlers:{delete:$b}}}function tM(e){this.enter({type:"delete",children:[]},e)}function nM(e){this.exit(e)}function $b(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,ue(j({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function rM(){return"~"}function iM(e){return e.length}function sM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||iM,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],A=[];let w=-1;for(e[p].length>f&&(f=e[p].length);++w<e[p].length;){const k=oM(e[p][w]);if(n.alignDelimiters!==!1){const I=s(k);A[w]=I,(d[w]===void 0||I>d[w])&&(d[w]=I)}v.push(k)}u[p]=v,l[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=zb(r[m]);else{const v=zb(r);for(;++m<f;)a[m]=v}m=-1;const x=[],y=[];for(;++m<f;){const v=a[m];let A="",w="";v===99?(A=":",w=":"):v===108?A=":":v===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-w.length);const I=A+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=A.length+k+w.length,k>d[m]&&(d[m]=k),y[m]=k),x[m]=I}u.splice(1,0,x),l.splice(1,0,y),p=-1;const b=[];for(;++p<u.length;){const v=u[p],A=l[p];m=-1;const w=[];for(;++m<f;){const k=v[m]||"";let I="",U="";if(n.alignDelimiters!==!1){const G=d[m]-(A[m]||0),L=a[m];L===114?I=" ".repeat(G):L===99?G%2?(I=" ".repeat(G/2+.5),U=" ".repeat(G/2-.5)):(I=" ".repeat(G/2),U=I):U=" ".repeat(G)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(I),w.push(k),n.alignDelimiters!==!1&&w.push(U),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}b.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return b.join(`
39
+ `)}function oM(e){return e==null?"":String(e)}function zb(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 aM(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),uM);return s(),u}function uM(e,t,n){return">"+(n?"":" ")+e}function lM(e,t){return Vb(e,t.inConstruct,!0)&&!Vb(e,t.notInConstruct,!1)}function Vb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function qb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
+ `&&lM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
+ `}function cM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function dM(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 fM(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 hM(e,t,n,r){const s=fM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(dM(e,n)){const m=n.enter("codeIndented"),x=n.indentLines(a,pM);return m(),x}const l=n.createTracker(r),d=s.repeat(Math.max(cM(a,s)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,j({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,j({before:p,after:`
42
+ `,encode:["`"]},l.current()))),m()}return p+=l.move(`
43
+ `),a&&(p+=l.move(a+`
44
+ `)),p+=l.move(d),f(),p}function pM(e,t,n){return(n?"":" ")+e}function dp(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 mM(e,t,n,r){const s=dp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),j({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,j({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,j({before:f,after:e.title?" ":`
45
+ `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,j({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function gM(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 Ba(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Jl(e,t,n){const r=$s(e),s=$s(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Yb.peek=EM;function Yb(e,t,n,r){const s=gM(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(s);let d=u.move(n.containerPhrasing(e,j({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=Jl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Ba(f)+d.slice(1));const m=d.charCodeAt(d.length-1),x=Jl(r.after.charCodeAt(0),m,s);x.inside&&(d=d.slice(0,-1)+Ba(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:x.outside,before:p.outside},l+d+y}function EM(e,t,n){return n.options.emphasis||"*"}function yM(e,t){let n=!1;return pl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ff}),!!((!e.depth||e.depth<3)&&Af(e)&&(t.options.setext||n))}function TM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(yM(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),x=n.containerPhrasing(e,ue(j({},a.current()),{before:`
46
46
  `,after:`
47
- `}));return m(),p(),b+`
48
- `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
49
- `))+1))}const u="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,H({before:"# ",after:`
50
- `},a.current()));return/^[\t ]/.test(f)&&(f=Fa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}Wb.peek=EM;function Wb(e){return e.value||""}function EM(){return"<"}Gb.peek=yM;function Gb(e,t,n,r){const s=cp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,H({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,H({before:f,after:s},d.current()))),f+=d.move(s),c()),f+=d.move(")"),u(),f}function yM(){return"!"}Xb.peek=TM;function Xb(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function TM(){return"!"}Qb.peek=bM;function Qb(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function bM(){return"`"}function Kb(e,t){const n=vf(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))}Jb.peek=xM;function Jb(e,t,n,r){const s=cp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(Kb(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,H({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,H({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,H({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,H({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),c(),f}function xM(e,t,n){return Kb(e,n)?"<":"["}Zb.peek=_M;function Zb(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function _M(){return"["}function dp(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 wM(e){const t=dp(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 SM(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 ex(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 vM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?SM(n):dp(n);const c=e.ordered?u==="."?")":".":wM(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),ex(n)===u&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function AM(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 kM(e,t,n,r){const s=AM(n);let a=n.bulletCurrent||dp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function NM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const CM=dl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OM(e,t,n,r){return(e.children.some(function(u){return CM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function IM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tx.peek=PM;function tx(e,t,n,r){const s=IM(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(s+s);let d=u.move(n.containerPhrasing(e,H({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=Kl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Fa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=Kl(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Fa(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function PM(e,t,n){return n.options.strong||"*"}function RM(e,t,n,r){return n.safe(e.value,r)}function LM(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 DM(e,t,n){const r=(ex(n)+(n.options.ruleSpaces?" ":"")).repeat(LM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const nx={blockquote:iM,break:qb,code:cM,definition:fM,emphasis:Yb,hardBreak:qb,heading:gM,html:Wb,image:Gb,imageReference:Xb,inlineCode:Qb,link:Jb,linkReference:Zb,list:vM,listItem:kM,paragraph:NM,root:OM,strong:tx,text:RM,thematicBreak:DM};function MM(){return{enter:{table:FM,tableData:rx,tableHeader:rx,tableRow:UM},exit:{codeText:HM,table:BM,tableData:fp,tableHeader:fp,tableRow:fp}}}function FM(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 BM(e){this.exit(e),this.data.inTable=void 0}function UM(e){this.enter({type:"tableRow",children:[]},e)}function fp(e){this.exit(e)}function rx(e){this.enter({type:"tableCell",children:[]},e)}function HM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,jM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function jM(e,t){return t==="|"?t:e}function $M(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(y,x,A,v){return f(p(y,A,v),y.align)}function c(y,x,A,v){const w=m(y,A,v),N=f([w]);return N.slice(0,N.indexOf(`
52
- `))}function d(y,x,A,v){const w=A.enter("tableCell"),N=A.enter("phrasing"),C=A.containerPhrasing(y,le(H({},v),{before:a,after:a}));return N(),w(),C}function f(y,x){return nM(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,A){const v=y.children;let w=-1;const N=[],C=x.enter("table");for(;++w<v.length;)N[w]=m(v[w],x,A);return C(),N}function m(y,x,A){const v=y.children;let w=-1;const N=[],C=x.enter("tableRow");for(;++w<v.length;)N[w]=d(v[w],y,x,A);return C(),N}function b(y,x,A){let v=nx.inlineCode(y,x,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function zM(){return{exit:{taskListCheckValueChecked:ix,taskListCheckValueUnchecked:ix,paragraph:qM}}}function VM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:YM}}}function ix(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function qM(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[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 YM(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=nx.listItem(e,t,n,H(H({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function WM(){return[v8(),Y8(),Q8(),MM(),zM()]}function GM(e){return{extensions:[A8(),W8(e),K8(),$M(e),VM()]}}const XM={tokenize:t9,partial:!0},sx={tokenize:n9,partial:!0},ox={tokenize:r9,partial:!0},ax={tokenize:i9,partial:!0},QM={tokenize:s9,partial:!0},ux={name:"wwwAutolink",tokenize:ZM,previous:cx},lx={name:"protocolAutolink",tokenize:e9,previous:dx},qr={name:"emailAutolink",tokenize:JM,previous:fx},Or={};function KM(){return{text:Or}}let ls=48;for(;ls<123;)Or[ls]=qr,ls++,ls===58?ls=65:ls===91&&(ls=97);Or[43]=qr,Or[45]=qr,Or[46]=qr,Or[95]=qr,Or[72]=[qr,lx],Or[104]=[qr,lx],Or[87]=[qr,ux],Or[119]=[qr,ux];function JM(e,t,n){const r=this;let s,a;return u;function u(m){return!hp(m)||!fx.call(r,r.previous)||pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return hp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(QM,p,f)(m):m===45||m===95||an(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&mn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function ZM(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!cx.call(r,r.previous)||pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(XM,e.attempt(sx,e.attempt(ox,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function e9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&dx.call(r,r.previous)&&!pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(mn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||rl(m)||ht(m)||Gi(m)||il(m)?n(m):e.attempt(sx,e.attempt(ox,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function t9(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function n9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(ax,d,c)(f):f===null||ht(f)||Gi(f)||f!==45&&il(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function r9(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(ax,t,a)(u):u===null||ht(u)||Gi(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function i9(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),s):c===60||c===null||ht(c)||Gi(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ht(c)||Gi(c)?t(c):r(c)}function a(c){return mn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):mn(c)?(e.consume(c),u):n(c)}}function s9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return an(a)?n(a):t(a)}}function cx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function dx(e){return!mn(e)}function fx(e){return!(e===47||hp(e))}function hp(e){return e===43||e===45||e===46||e===95||an(e)}function pp(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 o9={tokenize:p9,partial:!0};function a9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:d9,continuation:{tokenize:f9},exit:h9}},text:{91:{name:"gfmFootnoteCall",tokenize:c9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:u9,resolveTo:l9}}}}function u9(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=sr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function l9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function c9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ht(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(sr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ht(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function d9(e,t,n){const r=this,s=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"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!c||x===null||x===91||ht(x))return n(x);if(x===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=sr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ht(x)||(c=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),tt(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function f9(e,t,n){return e.check(la,t,e.attempt(o9,t,n))}function h9(e){e.exit("gfmFootnoteDefinition")}function p9(e,t,n){const r=this;return tt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function m9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Mn(b,b.length,0,sl(y,u.slice(f+1,d),c)),Mn(b,b.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Mn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let m=0;return b;function b(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const A=js(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const v=u.exit("strikethroughSequenceTemporary"),w=js(x);return v._open=!w||w===2&&!!A,v._close=!A||A===2&&!!w,c(x)}}}class g9{constructor(){this.map=[]}add(t,n,r){E9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function E9(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function y9(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function T9(){return{flow:{null:{name:"table",tokenize:b9,resolveAll:x9}}}}function b9(e,t,n){const r=this;let s=0,a=0,u;return c;function c(z){let ae=r.events.length-1;for(;ae>-1;){const ce=r.events[ae][1].type;if(ce==="lineEnding"||ce==="linePrefix")ae--;else break}const oe=ae>-1?r.events[ae][1].type:null,pe=oe==="tableHead"||oe==="tableRow"?L:d;return pe===L&&r.parser.lazy[r.now().line]?n(z):pe(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):He(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):Ze(z)?tt(e,p,"whitespace")(z):(a+=1,u&&(u=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||ht(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?b:m)}function b(z){return z===92||z===124?(e.consume(z),m):m(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,Ze(z)?tt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):x(z))}function x(z){return z===45||z===58?v(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),A):X(z)}function A(z){return Ze(z)?tt(e,v,"whitespace")(z):v(z)}function v(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),w):z===45?(a+=1,w(z)):z===null||He(z)?j(z):X(z)}function w(z){return z===45?(e.enter("tableDelimiterFiller"),N(z)):X(z)}function N(z){return z===45?(e.consume(z),N):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(z))}function C(z){return Ze(z)?tt(e,j,"whitespace")(z):j(z)}function j(z){return z===124?x(z):z===null||He(z)?!u||s!==a?X(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):X(z)}function X(z){return n(z)}function L(z){return e.enter("tableRow"),G(z)}function G(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),G):z===null||He(z)?(e.exit("tableRow"),t(z)):Ze(z)?tt(e,G,"whitespace")(z):(e.enter("data"),ne(z))}function ne(z){return z===null||z===124||ht(z)?(e.exit("data"),G(z)):(e.consume(z),z===92?de:ne)}function de(z){return z===92||z===124?(e.consume(z),ne):ne(z)}}function x9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const b=new g9;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(hx(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Jl(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Jl(b,t,a,s,void 0,m)),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],m=Jl(b,t,a,s,n,m)):u[1]!==0&&(m=Jl(b,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&hx(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=y9(t.events,n))}return e}function Jl(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ho(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ho(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=ho(t.events,n[2]),p=ho(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,A=n[3]-n[2]-1;e.add(x,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},ho(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function hx(e,t,n,r,s){const a=[],u=ho(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function ho(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _9={name:"tasklistCheck",tokenize:S9};function w9(){return{text:{91:_9}}}function S9(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ht(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 He(d)?t(d):Ze(d)?e.check({tokenize:v9},t,n)(d):n(d)}}function v9(e,t,n){return tt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function A9(e){return $1([KM(),a9(),m9(e),T9(),w9()])}const k9={};function N9(e){const t=this,n=e||k9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(A9(n)),a.push(WM()),u.push(GM(n))}const C9=()=>_.jsx("span",{className:`${O}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),po=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(RE,{remarkPlugins:[N9],rehypePlugins:[Ly],components:{h1:({children:s})=>_.jsx("h1",{className:M(e,`${O}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:M(e,`${O}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:M(e,`${O}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:M(e,`${O}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:M(e,`${O}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:M(e,`${O}-li`),children:s}),a:({href:s,children:a})=>_.jsx(jy,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:M(e,`${O}-table-container`),children:_.jsx("table",{className:M(e,`${O}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:M(e,`${O}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:M(e,`${O}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:M(e,`${O}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:M(e,`${O}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:M(e,`${O}-td`),children:s}),span:({className:s,children:a})=>s===`${O}-blinking-cursor`?_.jsx(C9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${O}-blinking-cursor'></span>`:"")}),mo=()=>B.useContext(Xg),go=()=>{const{sendMessage:e,loading:t,isConnected:n}=sn(),{mode:r,status:s}=ri();return B.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function O9(e){return e.includes("-")&&e===e.toLowerCase()}function Eo({tagName:e,props:t,label:n}){const r=B.useRef(null),s=B.useRef(null),a=B.useRef(e),u=B.useRef(null);return B.useEffect(()=>{const c=r.current;if(!c)return;if(a.current!==e&&(a.current=e,s.current=null),!O9(e)){u.current!==e&&(u.current=e,yt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,c.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){yt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,c.replaceChildren();return}try{const f=document.createElement(e);f.props=t,c.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){yt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,c.replaceChildren()}},[e,t,n]),B.useEffect(()=>{const c=r.current;return()=>{s.current=null,c==null||c.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class I9 extends B.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){yt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function P9(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const R9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:c})=>{const{loading:d}=sn();return _.jsx("div",{className:M(t,`${O}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:M(t,`${O}-msg-product-card__image-button`),onClick:c,disabled:d,"aria-label":a,children:_.jsx("img",{className:M(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:M(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:M(t,`${O}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:M(t,`${O}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(P9,{"aria-hidden":"true"})})})},L9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:c}=sn();return n?_.jsx("button",{type:"button",disabled:c,onClick:u,className:M(t,`${O}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:M(t,`${O}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:M(t,`${O}-msg-product-card__title`),children:e})},D9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=at(),{overrides:u,isInitialized:c}=mo(),{sendMessage:d,loading:f}=sn(),p=go(),m=c?u.ProductTile:void 0;if(m){const z={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(Eo,{tagName:m,props:z,label:"ProductTile"})}const{id:b,name:y,imageUrl:x,description:A,productPageUrl:v,price:w,priceBreakdown:N,discountPrice:C,listPrice:j,currencyCode:X}=e,L=C!=null?C:w,G=c8({priceBreakdown:N,currencyCode:X}),ne=()=>{if(f)return;const z=y||"this product",ae=b?` [SKU: ${b}]`:"";d(`Show me details for ${z}${ae}`)},de=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:M(t,`${O}-msg-product-card`),children:[_.jsx(R9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:de,name:y,showInWidgetDetails:ne}),_.jsxs("div",{className:M(t,`${O}-msg-product-card__content`),children:[_.jsxs("div",{className:M(t,`${O}-msg-product-card__content-header`),children:[_.jsx(L9,{name:y||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:de,showInWidgetDetails:ne}),a&&A&&_.jsx("div",{className:M(t,`${O}-msg-product-card__description`),title:A,children:_.jsx(po,{globalClassName:t,text:A})})]}),_.jsx("div",{className:M(t,`${O}-msg-product-card__price-row`),children:G?_.jsx("span",{className:M(t,`${O}-msg-product-card__price`),"aria-label":`Price from ${G.low} to ${G.high}`,children:G.range}):_.jsx(sp,{globalClassName:t,retailPrice:j,discountPrice:L,currencyCode:X})})]})]})},M9=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},F9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=at(),{overrides:c,isInitialized:d}=mo(),f=go(),p=d?c.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(Eo,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:M(n,`${O}-product-carousel-title`),children:e}),_.jsx(PD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:M(n,`${O}-product-carousel-item`),children:[_.jsx(D9,{product:M9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:M(n,`${O}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},mp=44,B9=400,U9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?mp:Math.min(Math.max(Math.round(t),mp),B9)},H9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},j9="parentOrigin",$9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(j9,t),n.toString()}catch(n){return e}},z9=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},px=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=B.useRef(null),[s,a]=B.useState(!1),[u,c]=B.useState(mp),d=typeof window!="undefined"?window.location.origin:"",f=$9(e,d),p=H9(e);return B.useEffect(()=>{const m=b=>{var x,A,v;if(p&&b.origin!==p||r.current&&b.source!==r.current.contentWindow)return;const y=b.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),c(U9((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((v=(A=y.payload)==null?void 0:A.orderId)!=null?v:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),_.jsx("div",{className:M(t,`${O}-cart-express`,{[`${O}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:M(t,`${O}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})};function V9(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Zl(e){return(e!=null?e:[]).map(V9).filter(t=>t!==null)}const ec=({code:e,globalClassName:t})=>_.jsxs("span",{className:M(t,`${O}-cart-chip`),children:[_.jsx(c1,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),An=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:c,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=Vr(u?-n:n,r);else if(c)f=c;else return null;return _.jsxs("div",{className:M(s,`${O}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:M(s,`${O}-cart-total-label`),children:[e,t&&_.jsx("span",{className:M(s,`${O}-cart-total-badge`),children:t})]}),_.jsx("span",{className:M(s,`${O}-cart-total-value`),children:d?_.jsx("span",{className:M(s,`${O}-cart-total-shimmer`)}):f})]})},q9=({quantity:e,loading:t,disabled:n,globalClassName:r,onChange:s})=>{const[a,u]=B.useState(e.toString());B.useEffect(()=>{u(e.toString())},[e]);const c=p=>{if(n)return;const m=p.target.value;/^\d*$/.test(m)&&u(m)},d=()=>{const p=parseInt(a,10);!n&&!isNaN(p)&&p>0&&p!==e?s(p):u(e.toString())},f=p=>{p.key==="Enter"&&(p.preventDefault(),d())};return _.jsx("div",{className:M(r,`${O}-cart-qty-input-wrapper`),children:t?_.jsx(Jk,{className:M(r,`${O}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:M(r,`${O}-cart-qty-input`),value:a,disabled:n,onChange:c,onBlur:d,onKeyDown:f,"aria-label":"Quantity"})})},Y9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var f,p;const c=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,d=Zl(e.coupons);return _.jsxs("li",{className:M(s,`${O}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:M(s,`${O}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:M(s,`${O}-cart-item-details`),children:[_.jsx("p",{className:M(s,`${O}-cart-item-name`),children:e.name}),_.jsxs("div",{className:M(s,`${O}-cart-item-attrs`),children:[((f=e.variants)!=null?f:[]).map(m=>_.jsxs("p",{className:M(s,`${O}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((p=e.promotions)!=null?p:[]).map(m=>_.jsxs("p",{className:M(s,`${O}-cart-item-attr`),children:["Promotion: ",m]},m))]}),d.length>0&&_.jsx("div",{className:M(s,`${O}-cart-chips`),children:d.map(m=>_.jsx(ec,{code:m,globalClassName:s},m))}),_.jsx("span",{className:M(s,`${O}-cart-item-price`),children:n?_.jsx("span",{className:M(s,`${O}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[c&&_.jsx("span",{className:M(s,`${O}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:M(s,`${O}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:M(s,`${O}-cart-item-footer`),children:[_.jsx("span",{className:M(s,`${O}-cart-qty-heading`),children:"Quantity"}),_.jsx(q9,{quantity:e.quantity,loading:n,disabled:r,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:M(s,`${O}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},W9=({cart:e,messageId:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a,cartUpdating:u}=sn(),[c,d]=B.useState(!0),[f,p]=B.useState(""),[m,b]=B.useState(null),y=a||u,{items:x=[],currencyCode:A="USD",subtotal:v,total:w,taxes:N,shippingCost:C,shippingDiscount:j,shippingPromotions:X=[],promotionsDiscount:L,promotions:G=[],couponsDiscount:ne,bodyMessage:de,footerMessage:z,checkoutButtonUrl:ae,expressPaymentUrl:oe}=e,pe=Zl(e.couponsApplied),ce=Y=>{y||s(`Remove ${Y.name} from my cart`)},se=Y=>{s(Y?`I completed express payment. Show my order confirmation for order ${Y}.`:"I completed express payment. Show my order confirmation.")},Ae=(Y,ie)=>{y||m||ie<1||(b(Y.itemId),s(`Update ${Y.name} quantity to ${ie}`,{silent:!0,reconcileMessageId:t}).then(k=>{k.outcome==="success"?setTimeout(()=>b(null),300):b(null)}))},re=()=>{const Y=f.trim();!Y||y||(s(`Apply coupon code ${Y}`),p(""))};return _.jsxs("div",{className:M(n,`${O}-cart`),children:[_.jsxs("div",{className:M(n,`${O}-cart-box`),children:[de&&_.jsxs("button",{type:"button",className:M(n,`${O}-cart-summary`),"aria-expanded":c,onClick:()=>d(Y=>!Y),children:[_.jsx("span",{className:M(n,`${O}-cart-summary-text`),children:_.jsx(po,{text:de,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),_.jsx("span",{className:M(n,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:c?_.jsx(u1,{}):_.jsx(l1,{})})]}),c&&_.jsxs("div",{className:M(n,`${O}-cart-expanded`),children:[_.jsxs("div",{className:M(n,`${O}-cart-items-section`),children:[_.jsx("ul",{className:M(n,`${O}-cart-items`),children:x.map(Y=>_.jsx(Y9,{item:Y,currencyCode:A,loading:m===Y.itemId,disabled:y||m===Y.itemId,globalClassName:n,onRemove:ce,onQuantityChange:Ae},Y.itemId))}),pe.length>0&&_.jsx("div",{className:M(n,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:pe.map(Y=>_.jsx(ec,{code:Y,globalClassName:n},Y))})]}),_.jsxs("div",{className:M(n,`${O}-cart-totals`),children:[_.jsx(An,{label:"Subtotal",value:v,currencyCode:A,globalClassName:n,loading:!!m}),_.jsx(An,{label:"Coupon",value:ne,currencyCode:A,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(An,{label:"Promotions",badge:G[0],value:L,currencyCode:A,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(An,{label:"Shipping",value:C,currencyCode:A,globalClassName:n,fallback:"TBD",loading:!!m}),_.jsx(An,{label:"Shipping Discount",badge:X[0],value:j,currencyCode:A,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(An,{label:"Tax",value:N,currencyCode:A,globalClassName:n,fallback:"TBD",loading:!!m}),_.jsx(An,{label:"Total",value:w,currencyCode:A,globalClassName:n,emphasized:!0,loading:!!m})]})]})]}),_.jsxs("div",{className:M(n,`${O}-cart-coupon`),children:[_.jsxs("div",{className:M(n,`${O}-cart-coupon-field`),children:[_.jsx("span",{className:M(n,`${O}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(c1,{})}),_.jsx("input",{type:"text",className:M(n,`${O}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:f,disabled:y,onChange:Y=>p(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&(Y.preventDefault(),re())}})]}),_.jsx("button",{type:"button",className:M(n,`${O}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!f.trim(),onClick:re,children:_.jsx(tN,{"aria-hidden":"true"})})]}),oe&&_.jsx(px,{expressPaymentUrl:oe,globalClassName:n,onOrderComplete:se}),ae&&_.jsxs("a",{className:M(n,`${O}-cart-checkout-button`),href:ae,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(Zk,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:M(n,`${O}-cart-footer`),children:z||"Shipping and taxes calculated at checkout."})]})},G9=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=Zl(e.coupons);return _.jsxs("li",{className:M(n,`${O}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:M(n,`${O}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:M(n,`${O}-cart-item-details`),children:[_.jsx("p",{className:M(n,`${O}-cart-item-name`),children:e.name}),_.jsxs("div",{className:M(n,`${O}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(c=>_.jsxs("p",{className:M(n,`${O}-cart-item-attr`),children:[c.lbl,": ",c.value]},`${c.type}-${c.value}`)),((u=e.promotions)!=null?u:[]).map(c=>_.jsxs("p",{className:M(n,`${O}-cart-item-attr`),children:["Promotion: ",c]},c))]}),s.length>0&&_.jsx("div",{className:M(n,`${O}-cart-chips`),children:s.map(c=>_.jsx(ec,{code:c,globalClassName:n},c))}),_.jsxs("span",{className:M(n,`${O}-cart-item-price`),children:[r&&_.jsx("span",{className:M(n,`${O}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:M(n,`${O}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]}),_.jsx("div",{className:M(n,`${O}-cart-item-footer`),children:_.jsxs("span",{className:M(n,`${O}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},X9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},Q9=({order:e,globalClassName:t})=>{const[n,r]=B.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:c="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:b,shippingPromotions:y=[],promotionsDiscount:x,promotions:A=[],couponsDiscount:v,bodyMessage:w,footerMessage:N}=e,C=Zl(e.couponsApplied);return _.jsxs("div",{className:M(t,`${O}-cart`),children:[_.jsxs("div",{className:M(t,`${O}-cart-banner`),children:[_.jsx("span",{className:M(t,`${O}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(nN,{})}),_.jsx("p",{className:M(t,`${O}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:M(t,`${O}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",X9(a)]})]}),_.jsxs("div",{className:M(t,`${O}-cart-box`),children:[w&&_.jsxs("button",{type:"button",className:M(t,`${O}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[_.jsx("span",{className:M(t,`${O}-cart-summary-text`),children:_.jsx(po,{text:w,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:M(t,`${O}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(u1,{}):_.jsx(l1,{})})]}),n&&_.jsxs("div",{className:M(t,`${O}-cart-expanded`),children:[_.jsx("ul",{className:M(t,`${O}-cart-items`),children:u.map(j=>_.jsx(G9,{item:j,currencyCode:c,globalClassName:t},j.itemId))}),C.length>0&&_.jsx("div",{className:M(t,`${O}-cart-chips`,`${O}-cart-applied-coupons`),children:C.map(j=>_.jsx(ec,{code:j,globalClassName:t},j))}),_.jsxs("div",{className:M(t,`${O}-cart-totals`),children:[_.jsx(An,{label:"Subtotal",value:d,currencyCode:c,globalClassName:t}),_.jsx(An,{label:"Coupon",value:v,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(An,{label:"Promotions",badge:A[0],value:x,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(An,{label:"Shipping",value:m,currencyCode:c,globalClassName:t,fallback:"TBD"}),_.jsx(An,{label:"Shipping Discount",badge:y[0],value:b,currencyCode:c,globalClassName:t,isDiscount:!0}),_.jsx(An,{label:"Tax",value:p,currencyCode:c,globalClassName:t,fallback:"TBD"}),_.jsx(An,{label:"Total",value:f,currencyCode:c,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:M(t,`${O}-cart-footer`),children:N||"Shipping and taxes calculated at checkout."})]})},K9=({image:e,alt:t,globalClassName:n})=>{const[r,s]=B.useState(e.src),[a,u]=B.useState(!1),c=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:M(n,`${O}-pdp-gallery__image`,{[`${O}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:c})},J9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(Jh,{className:M(n,`${O}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(Xh,{className:M(n,`${O}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(Gh,{index:a,className:M(n,`${O}-pdp-gallery__item`),children:_.jsx(K9,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(qh,{className:M(n,`${O}-pdp-gallery__control`),children:[_.jsx(Kh,{className:M(n,`${O}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(db,{size:"16px"})}),_.jsx(Qh,{className:M(n,`${O}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(fb,{size:"16px"})})]}),r&&_.jsx(Wh,{className:M(n,`${O}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Yh,{index:a,className:M(n,`${O}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ba="color",gp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,Z9=e=>e.replace(/(^|\/)large\//,"$1medium/"),mx=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ba&&n.vals.includes(t)),gx=(e,t)=>{const n=Z9(t),r=gp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:gp(e,t)}},eF=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>mx(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>gx(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[gx(e.baseUrl,e.imageUrl)]:[]},tF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(c=>c.viewType==="swatch"&&mx(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?gp(e.baseUrl,r):""},tc=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===c})}),nF=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},rF=(e,t,n,r,s)=>{if(!e||e.length===0)return le(H({},s),{[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(s).every(([f,p])=>{var m;return f===n||((m=c.vars)==null?void 0:m[f])===p})});if(a)return H({},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?H({},u.vars):le(H({},s),{[n]:r})},Ex=(e,t)=>{var s,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},iF=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},sF=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>tc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},oF=300,aF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var dt,Vt,Lt,Qt,kn,me,he;const{addToCart:s,sendMessage:a,loading:u}=sn(),{overrides:c,isInitialized:d}=mo(),f=go(),p=e.data,m=(dt=p.vattr)!=null?dt:[],[b,y]=B.useState(()=>sF(p)),x=nF(p.vmat,b),A=(Lt=(Vt=p.quantity)==null?void 0:Vt.minQuantity)!=null?Lt:1,v=(kn=(Qt=p.quantity)==null?void 0:Qt.maxQuantity)!=null?kn:Number.POSITIVE_INFINITY,w=(he=(me=p.quantity)==null?void 0:me.increment)!=null?he:1,[N,C]=B.useState(A),[j,X]=B.useState(!1),L=B.useRef(!1);B.useEffect(()=>{j&&(u?L.current=!0:L.current&&(L.current=!1,X(!1)))},[j,u]);const G=b[Ba],ne=B.useMemo(()=>eF(p,G),[p,G]),de=B.useMemo(()=>iF(p,b),[p,b]),z=m.find(W=>W.id===Ba),ae=m.filter(W=>W.id!==Ba),oe=Ex(p,b),[pe,ce]=B.useState(N),se=B.useRef(oe),Ae=se.current===oe?pe:N;B.useEffect(()=>{if(se.current!==oe){se.current=oe,ce(N);return}const W=window.setTimeout(()=>ce(N),oF);return()=>window.clearTimeout(W)},[N,oe]);const re=N===pe,Y=B.useMemo(()=>x&&(se.current!==oe||re)?z9(p.expressPaymentUrl,oe,Ae):null,[p.expressPaymentUrl,oe,Ae,x,re]),ie=B.useCallback(W=>{a(W?`I completed express payment. Show my order confirmation for order ${W}.`:"I completed express payment. Show my order confirmation.")},[a]),k=d?c.ProductDetailCard:void 0;if(k){const W={name:"ProductDetailCard",payload:e,api:f};return _.jsx(Eo,{tagName:k,props:W,label:"ProductDetailCard"})}const D=(W,fe)=>()=>{y(_e=>{const Xe=!tc(p.vmat,W,fe,_e);return W===Ba||Xe?rF(p.vmat,m,W,fe,_e):le(H({},_e),{[W]:fe})})},Z=()=>{if(u)return;const W=Ex(p,b);if(!W)return;const fe=m.map(_e=>{const Xe=_e.opts.find(ut=>ut.val===b[_e.id]);return Xe?{label:_e.lbl||_e.id,value:Xe.name||Xe.val}:null}).filter(_e=>_e!==null);X(!0),s({productName:p.name,sku:W,quantity:N,variants:fe})},P=!x||N-w<A,ke=!x||N+w>v,Ce=W=>{var _e;const fe=b[W.id];return(_e=W.opts.find(Xe=>Xe.val===fe))==null?void 0:_e.name},ge=()=>C(W=>Math.max(A,W-w)),Le=()=>C(W=>Math.min(v,W+w)),Be=W=>_.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[_.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${W.id}`,className:M(t,`${O}-msg-pdp__variant-name`),children:W.lbl||W.id}),Ce(W)&&_.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:Ce(W)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${W.id}`,className:M(t,`${O}-msg-pdp__chips`),children:W.opts.map(fe=>{const _e=tc(p.vmat,W.id,fe.val,b),Xe=b[W.id]===fe.val;return _.jsxs("label",{className:M(`${O}-msg-pdp__chip`,{selected:Xe,unavailable:!_e}),children:[_.jsx("input",{type:"radio",name:`variant-${W.id}`,value:fe.val,checked:Xe,"aria-description":_e?void 0:"unavailable",onChange:D(W.id,fe.val),className:`${O}-msg-pdp__radio-input`}),_.jsx("span",{children:fe.name||fe.val})]},fe.val)})})]},W.id),Ge=W=>_.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[_.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${W.id}`,className:M(t,`${O}-msg-pdp__variant-name`),children:W.lbl||"Color"}),Ce(W)&&_.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:Ce(W)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${W.id}`,className:M(t,`${O}-msg-pdp__swatches`),children:W.opts.map(fe=>{const _e=tc(p.vmat,W.id,fe.val,b),Xe=b[W.id]===fe.val,ut=tF(p,fe.val);return ut?_.jsxs("label",{className:M(`${O}-msg-pdp__swatch`,{selected:Xe,unavailable:!_e}),children:[_.jsx("input",{type:"radio",name:`variant-${W.id}`,value:fe.val,checked:Xe,"aria-label":fe.name||fe.val,"aria-description":_e?void 0:"unavailable",onChange:D(W.id,fe.val),className:`${O}-msg-pdp__radio-input`}),_.jsx("img",{className:M(t,`${O}-msg-pdp__swatch-image`),src:ut,alt:fe.name||fe.val,loading:"lazy"})]},fe.val):_.jsxs("label",{className:M(`${O}-msg-pdp__chip`,{selected:Xe,unavailable:!_e}),children:[_.jsx("input",{type:"radio",name:`variant-${W.id}`,value:fe.val,checked:Xe,"aria-description":_e?void 0:"unavailable",onChange:D(W.id,fe.val),className:`${O}-msg-pdp__radio-input`}),_.jsx("span",{children:fe.name||fe.val})]},fe.val)})})]});return _.jsx("div",{className:M(t,`${O}-msg-pdp`),children:_.jsxs("div",{className:M(t,`${O}-msg-pdp__card`),children:[_.jsx("div",{className:M(t,`${O}-msg-pdp__gallery`),children:_.jsx(J9,{images:ne,altText:p.name,globalClassName:t})}),_.jsxs("div",{className:M(t,`${O}-msg-pdp__content`),children:[p.slugUrl?_.jsx("a",{href:p.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:M(t,`${O}-msg-pdp__title-link`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("p",{className:M(t,`${O}-msg-pdp__title`),children:p.name}),_.jsx(sp,{globalClassName:t,className:`${O}-msg-pdp__price`,retailPrice:de==null?void 0:de.orig,discountPrice:(de==null?void 0:de.cur)||(de==null?void 0:de.prom),currencyCode:p.ccy,fontSize:"14px"}),p.dscr&&_.jsx("div",{className:M(t,`${O}-msg-pdp__description`),children:_.jsx(po,{globalClassName:t,text:p.dscr})}),z&&Ge(z),ae.map(Be),r&&_.jsxs("div",{className:M(t,`${O}-msg-pdp__variant`),children:[_.jsxs("div",{className:M(t,`${O}-msg-pdp__variant-label`),children:[_.jsx("span",{className:M(t,`${O}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:M(t,`${O}-msg-pdp__variant-value`),children:N})]}),_.jsxs("div",{className:M(t,`${O}-msg-pdp__stepper`),children:[_.jsx(ir,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(zk,{}),disabled:P,onClick:ge}),_.jsx("span",{className:M(t,`${O}-msg-pdp__quantity`),children:N}),_.jsx(ir,{className:`${O}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(Vk,{}),disabled:ke,onClick:Le})]})]}),r&&_.jsxs("div",{className:M(t,`${O}-msg-pdp__actions`),children:[Y&&_.jsx(px,{expressPaymentUrl:Y,globalClassName:t,onOrderComplete:ie},Y),_.jsx(el,{className:`${O}-msg-pdp__add-to-cart`,disabled:!x||u||j,onClick:Z,children:j?"Adding...":"Add to cart"})]})]})]})})},uF=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},lF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=sn(),{overrides:c,isInitialized:d}=mo(),f=go(),p=d?c.ProductComparison:void 0;if(p){const x={name:"ProductComparison",payload:{products:e,table:t},api:f};return _.jsx(Eo,{tagName:p,props:x,label:"ProductComparison"})}if(!e.length)return null;const m=`auto repeat(${e.length}, 1fr)`,b=`${90+e.length*140}px`,y=x=>()=>{u||a({productName:x.name,sku:x.id})};return _.jsx("div",{className:M(n,`${O}-product-comparison`),children:_.jsxs("div",{className:`${O}-product-comparison__grid`,style:{gridTemplateColumns:m,minWidth:b},children:[_.jsxs("div",{className:`${O}-product-comparison__header`,children:[_.jsx("div",{className:`${O}-product-comparison__header-spacer`}),e.map(x=>{var v,w,N,C;const A=uF(x);return _.jsxs("div",{className:M(n,`${O}-product-comparison__product-col`),children:[A&&_.jsx("img",{className:M(n,`${O}-product-comparison__image`),src:A,alt:x.name||"Product image",loading:"eager"}),x.slugUrl?_.jsx("a",{href:x.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:M(n,`${O}-product-comparison__name`),"aria-label":`Go to product page for ${x.name}`,children:x.name}):_.jsx("span",{className:M(n,`${O}-product-comparison__name`),children:x.name}),_.jsx(sp,{globalClassName:n,retailPrice:(v=x.pr)==null?void 0:v.orig,discountPrice:(C=(w=x.pr)==null?void 0:w.prom)!=null?C:(N=x.pr)==null?void 0:N.cur,currencyCode:x.ccy,fontSize:"0.875rem"})]},x.id)})]}),_.jsx("div",{className:`${O}-product-comparison__table`,children:t.map(x=>_.jsxs("div",{className:`${O}-product-comparison__row`,children:[_.jsx("div",{className:M(n,`${O}-product-comparison__row-label`),children:x.row_name}),e.map((A,v)=>_.jsx("div",{className:M(n,`${O}-product-comparison__row-value`),children:x.values[v]},`${x.row_name}-${A.id}`))]},x.row_name))}),s&&_.jsxs("div",{className:`${O}-product-comparison__footer`,children:[_.jsx("div",{className:`${O}-product-comparison__footer-spacer`}),e.map(x=>_.jsx("div",{className:M(n,`${O}-product-comparison__footer-cell`),children:_.jsxs(el,{className:`${O}-product-comparison__add-to-cart`,disabled:u,onClick:y(x),children:[_.jsx(Kk,{size:"14px"}),"Add to cart"]})},`cart-${x.id}`))]})]})})},yx=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u,cartUpdating:c}=sn(),{isCartMgmtSupported:d,logger:f}=at(),{overrides:p,isInitialized:m}=mo(),b=go(),y=B.useMemo(()=>e.response.map(x=>{var v,w;if(x.type!=="markdown")return x;const A=_g((w=(v=x.data)==null?void 0:v.content)!=null?w:"");return A&&A.type!=="markdown"?A:x}),[e.response]);return _.jsx(_.Fragment,{children:y.map((x,A)=>{var v,w,N,C,j,X,L,G,ne,de,z,ae,oe,pe,ce,se,Ae,re,Y,ie,k,D,Z,P,ke;switch(x.type){case"markdown":{const Ce=(w=(v=x.data)==null?void 0:v.content)!=null?w:"";return x.index===ji&&wg(Ce)?null:_.jsx(po,{text:Ce,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${x.type}-${(N=x.index)!=null?N:A}`)}case"product_carousel":return _.jsx(F9,{title:(j=(C=x.data)==null?void 0:C.title)!=null?j:"",products:(L=(X=x.data)==null?void 0:X.products)!=null?L:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(G=x.index)!=null?G:A}`);case"product_tile":return _.jsx(aF,{product:x.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(ne=x.index)!=null?ne:A}`);case"product_comparison":return _.jsx(lF,{products:(z=(de=x.data)==null?void 0:de.products)!=null?z:[],table:(oe=(ae=x.data)==null?void 0:ae.table)!=null?oe:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(pe=x.index)!=null?pe:A}`);case"cart":{const Ce=(Ae=(se=(ce=x.data)==null?void 0:ce.cart)==null?void 0:se.cartSummary)==null?void 0:Ae.cartDetails;return Ce?_.jsx(W9,{cart:Ce,messageId:t,productsToHighlight:x.data.products_to_highlight,globalClassName:n,openLinksInNewTab:r},`${x.type}-${(re=x.index)!=null?re:A}`):null}case"order_confirmation":{const Ce=(ie=(Y=x.data)==null?void 0:Y.order)==null?void 0:ie.orderDetails;return Ce?_.jsx(Q9,{order:Ce,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(k=x.index)!=null?k:A}`):null}case"tool_results":{const Ce=x.data,ge=x.output_name,Le=m&&ge&&Object.prototype.hasOwnProperty.call(p,ge)?p[ge]:void 0,Be=typeof Le=="string"?Le:void 0;if(!Be||!ge)return f!=null&&f.isDevelopment&&(ge?f.warn(`🦜 tool_results "${ge}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${ge}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(p),payload:Ce}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:Ce})),null;const Ge={name:ge,payload:Ce,api:b};return _.jsx(I9,{overrideName:ge,children:_.jsx(Eo,{tagName:Be,props:Ge,label:`toolResult:${ge}`})},`${x.type}-${ge}-${(D=x.index)!=null?D:A}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(f8,{disabled:u||c,suggestions:(P=(Z=x.data)==null?void 0:Z.display_text)!=null?P:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:a})},`${x.type}-${(ke=x.index)!=null?ke:A}`);default:return null}})})};class Tx extends B.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){yt(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?_.jsx("p",{className:M(this.props.globalClassName,`${O}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const cF=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=at(),a=B.useMemo(()=>{if(typeof e.content!="string")return null;const c=ju(e.content);if(c)return c;const d=_g(e.content);return d?{response:[d]}:null},[e.content]),u=B.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||c}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:M(t,`${O}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:M(t,`${O}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:M(t,`${O}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:M(t,`${O}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(eN,{})}),_.jsx("p",{className:M(t,`${O}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:M(t,`${O}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${O}-message-group-child`,children:a?_.jsx(Tx,{globalClassName:t,children:_.jsx(yx,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):_.jsx(po,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:M(t,`${O}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:M(t,`${O}-reset-message`),children:e.content})})}},dF=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:M(n,`${O}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:M(n,`${O}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:M(n,`${O}-retry-button`),onClick:t,children:[_.jsx(sN,{"aria-hidden":"true"})," Retry"]})]}),fF="You are offline or we couldn't reach the assistant. Check connection and try again.",Ep=({isWidgetStandalone:e})=>{var z,ae;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=at(),{messages:a,streamingBlocks:u,isAgentTyping:c,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:b,retryLastMessage:y,retryConnection:x}=sn(),A=B.useRef(null),v=a.length>0,w=u.some(NA),N=a[a.length-1],C=N?kA(N.content,"suggestions"):!1,j=v&&(d||c)&&!w&&!C,X=p==="reconnecting"&&!j,L=p==="error";let G=null;L?G={message:m!=null?m:fF,kind:"connection",onRetry:x}:b&&(G={message:b.message,kind:"send",onRetry:y}),B.useEffect(()=>{var oe;(oe=A.current)==null||oe.scrollIntoView({behavior:"smooth"})},[]),B.useEffect(()=>{var oe;s&&((oe=A.current)==null||oe.scrollIntoView({behavior:"smooth"}))},[a,u,b,m,s]);const ne=(z=G==null?void 0:G.message)!=null?z:null,de=(ae=G==null?void 0:G.kind)!=null?ae:null;return B.useEffect(()=>{ne&&(r==null||r.error("Error message shown to user",{message:ne,kind:de}))},[ne,de,r]),_.jsxs(_.Fragment,{children:[d&&!v&&_.jsx(E8,{globalClassName:t,isWidgetStandalone:e}),a.map(oe=>_.jsx(cF,{message:oe,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},oe.id)),G&&_.jsx(dF,{message:G.message,onRetry:G.onRetry,globalClassName:t,isWidgetStandalone:e}),w&&_.jsxs("div",{className:M(t,`${O}-message-group`,e?"standalone":"embedded"),children:[_.jsx(Tx,{globalClassName:t,children:_.jsx(yx,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||c)&&_.jsx(op,{globalClassName:t,isWidgetStandalone:e})]}),j&&_.jsx(op,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),X&&_.jsx(op,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:A})]})},hF=()=>_.jsxs("svg",{className:`${O}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),pF=()=>_.jsx("svg",{className:`${O}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.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"})}),mF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),yp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=at(),s=e!=null?e:r,{overrides:a,isInitialized:u}=mo(),c=go();if(t.length===0||s===0)return null;const d=mF(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:c};return _.jsx(Eo,{tagName:f,props:p,label:"ProgressSteps"})}return _.jsx("div",{className:M(n,`${O}-progress-steps-panel`),children:_.jsx("div",{className:`${O}-progress-steps`,children:_.jsx("ul",{className:`${O}-progress-steps-list`,children:d.map((p,m)=>{const b=m<d.length-1,y=m===d.length-1;return _.jsxs("li",{className:M(`${O}-progress-step`,y&&"active"),children:[y&&_.jsx("span",{className:`${O}-progress-step-arc`}),_.jsx("span",{className:`${O}-progress-step-text`,children:p}),_.jsx("span",{className:M(`${O}-progress-step-icon`,b?"done":"active"),children:b?_.jsx(hF,{}):_.jsx(pF,{})})]},`${m}-${p}`)})})})})},bx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=at(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:c,downloadTranscript:d}=sn(),f=s;return _.jsxs("div",{className:M(e,`${O}-container`,`${O}-embedded-chat`),style:t,children:[_.jsx("div",{className:M(e,`${O}-message-container`,`container-${n}`,"embedded"),children:_.jsx(Ep,{isWidgetStandalone:!1})}),_.jsx(yp,{steps:c,globalClassName:e}),_.jsx(uh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:M(`${O}-embedded-chat-menu`),children:_.jsxs(pD,{componentType:"chat",children:[_.jsx(Fb,{componentType:"chat"}),_.jsx(Vy,{componentType:"chat",onClearChat:u}),r&&_.jsx(qy,{componentType:"chat",onDownloadTranscript:d})]})})]})},xx=e=>{var d;const{children:t,disabled:n}=e,[r,s]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(EF,()=>!1,()=>!0),{getRootNode:u}=Yl();if(B.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const c=r!=null?r:gF(u);return _.jsx(_.Fragment,{children:B.Children.map(t,f=>Fs.createPortal(f,c))})},gF=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ts(n)?n:wr(t).body},EF=()=>()=>{},_x=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=at(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=ri(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:b,downloadTranscript:y}=sn(),{isOpen:x}=s||{},A=!!s.isOpen,v=r==="standalone",w=f||d,N=()=>{Br(!1)};return A?_.jsx(Cb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:A,children:_.jsx(xx,{children:_.jsx(tp,{className:M(e,`${O}-container`,`${O}-dialog`,a,u&&"full-height"),style:H(H({},t),c&&{width:c}),children:_.jsxs(Zh,{className:M(e,`${O}-dialog-content`,{standalone:v,embedded:!v}),children:[_.jsx(Lb,{componentType:"dialog",onClearChat:m,onClose:N,onDownloadTranscript:y}),_.jsx(ep,{className:M(e,`${O}-message-container`,`container-${n}`,{standalone:v,embedded:!v}),children:_.jsx(Ep,{isWidgetStandalone:v,isOpen:x})}),_.jsx(yp,{steps:b,globalClassName:e}),_.jsx(uh,{componentType:"dialog",isLoading:w,onSubmit:C=>p(C)})]})})})}):null},wx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=at(),{mode:r,status:s,isModalFullscreen:a}=ri(),{loading:u,isAgentTyping:c,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=sn(),{isOpen:b}=s||{},y=!!s.isOpen,x=r==="standalone",A=c||u,v=({open:N})=>{Br(N)},w=()=>{Br(!1)};return y?_.jsx(Cb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:v,children:_.jsx(xx,{children:_.jsxs("div",{className:M(e,`${O}-modal-container`),style:t,children:[_.jsx(Sb,{className:M(e,`${O}-modal-backdrop`)}),_.jsx(tp,{className:M(e,`${O}-container`,`${O}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Zh,{className:M(e,`${O}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(Lb,{componentType:"modal",onClearChat:f,onClose:w,onDownloadTranscript:m}),_.jsx(ep,{className:M(e,`${O}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(Ep,{isWidgetStandalone:x,isOpen:b})}),_.jsx(yp,{steps:p,globalClassName:e}),_.jsx(uh,{componentType:"modal",isLoading:A,onSubmit:N=>d(N)})]})})]})})}):null},yF=()=>{const e=ri(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(Gk,{}):t==="dialog"?_.jsx(_x,{}):t==="modal"?_.jsx(wx,{}):_.jsx(bx,{})},TF=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=s8();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return ZD(a),()=>{e8(a)}},[e,t,n,r,s])},Sx=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function bF({isReady:e,hasError:t,transmit:n}){const r=B.useRef([]),s=B.useRef(e);s.current=e;const a=B.useRef(n);a.current=n;const u=B.useCallback((c,d)=>{s.current?Sx(a.current,c,d):r.current.push({prompt:c,options:d})},[]);return B.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(({prompt:d,options:f})=>Sx(a.current,d,f))}},[e]),B.useEffect(()=>{t&&(r.current=[])},[t]),u}const vx={copilot:"Ask Copilot",messaging:"Ask a question"},xF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=at(),{placeholder:s,isResponseLoading:a}=Xl(),u=s||vx[r],[c,d]=B.useState(""),f=t||a,p=m=>{const b=c.trim();b&&(m.preventDefault(),e(b),d(""))};return _.jsxs("form",{className:M(n,`${O}-prompts-input-container`),name:`${O}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${O}-prompts-input`,"aria-label":u,children:_.jsx(Vh,{className:M(n,`${O}-prompts-input-icon`)})}),_.jsx("input",{id:`${O}-prompts-input`,className:M(n,`${O}-prompts-input`),name:`${O}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),_.jsx(ir,{className:M(n,`${O}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(pf,{}),disabled:f})]})},_F=()=>{const{globalClassName:e,mode:t}=at(),{placeholder:n}=Xl(),r=n||vx[t];return _.jsxs("div",{className:M(e,`${O}-prompts-header`),children:[_.jsx(Vh,{className:M(e,`${O}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:M(e,`${O}-prompts-header-text`),children:r})]})},Ax=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=at(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return _.jsxs("button",{className:M(r,`${O}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Mb,{icon:a,className:`${O}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},wF="Ask me something else",SF=({label:e,disabled:t=!1})=>_.jsx(Ax,{label:e||wF,disabled:t,onClick:()=>Br(!0)}),vF=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=at(),{messages:r}=sn(),{staticQuestions:s,askElseButtonLabel:a,disableAskElseButton:u}=Xl(),c=B.useMemo(()=>{var y;const f=r.filter(x=>x.role==="agent");if(!f.length)return s;const m=f.map(x=>ju(x.content)).filter(Boolean).flatMap(x=>x==null?void 0:x.response.filter(A=>A.type==="suggestions"));if(!m.length)return s;const b=m[m.length-1];return(y=b==null?void 0:b.data.display_text)!=null?y:s},[r,s]);if(c.length===0)return null;const d=f=>()=>{const p=f.trim();p&&e(p)};return _.jsxs("div",{className:M(n,`${O}-prompts-button-group`),children:[c.map(f=>_.jsx(Ax,{label:f,disabled:t,onClick:d(f)},f)),!u&&_.jsx(SF,{label:a,disabled:t})]})},AF=()=>{const{globalClassName:e,themeVariables:t}=at(),{isOpen:n,elementId:r,promptsDisplay:s,staticQuestions:a}=Xl(),{isConnected:u,sendMessage:c,connectionStatus:d}=sn(),{productId:f}=i8(),p=s!=="buttons",m=s!=="input",[b,y]=B.useState(null),x=d==="error",A=d==="connecting",v=bF({isReady:u,hasError:x,transmit:c});B.useEffect(()=>{if(!r||b)return;const N=document.getElementById(r);N&&y(N)},[r,b]);const w=B.useCallback(N=>{Br(!0);const C=(a||[]).includes(N.trim());if(f&&C){v(`${N} (Viewing product details for: ${f})`,{displayContent:N});return}v(N)},[v,a,f]);return!n||!b?null:Fs.createPortal(_.jsxs("div",{className:M(e,`${O}-prompts-extension-container`),style:t,children:[p&&_.jsx(xF,{onSubmit:w,disabled:x}),!p&&_.jsx(_F,{}),m&&_.jsx(vF,{onPromptClick:w,disabled:x}),!x&&A&&_.jsx("p",{className:M(e,`${O}-prompts-connecting-message`),children:"Connecting to agent..."}),x&&_.jsx("p",{className:M(e,`${O}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),b)},kF=()=>(TF(),_.jsx(AF,{})),kx=e=>_.jsxs(Qg,le(H({},e),{children:[_.jsx(yF,{}),_.jsx(kF,{})]}));var nc={},Nx;function NF(){if(Nx)return nc;Nx=1;var e=t1();return nc.createRoot=e.createRoot,nc.hydrateRoot=e.hydrateRoot,nc}var CF=NF();const Cx=(e,t,n,r)=>{CF.createRoot(e).render(_.jsx(kx,le(H({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},OF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=yn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let c;const d=(p,m)=>{for(const b of p)if(b.type==="childList"&&b.addedNodes.length)for(const y of b.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(yt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(c),Cx(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),c=setTimeout(()=>{f.disconnect(),yt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},IF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=yn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){yt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){yt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const c=document.getElementById(t);if(!c){yt(!0,"warn","Container element not found for id:",t),yt(!0,"warn","Beginning observation for element"),OF(H({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Cx(c,s,n,r)};class PF extends HTMLElement{constructor(){super(...arguments);Ye(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const RF={components:{setEntryType:P0,toggleWidgetOpen:Br,toggleWidgetMinimized:Cu,toggleModalFullscreen:Pd,setWidgetType:Ou,setWidgetDialogPosition:Rd,loadPromptsComponent:r8,togglePromptsExtensionOpen:Rb}};Me.AgentForceWidget=kx,Me.AgentforceWidgetProvider=Qg,Me.CIMULATE_WIDGET_READY_EVENT=I0,Me.MessagingDialog=_x,Me.MessagingEmbed=bx,Me.MessagingModal=wx,Me.MessagingProvider=Pg,Me.OverrideElement=PF,Me.eventHandlers=RF,Me.injectMessagingWidget=IF,Me.useMessaging=sn,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})}));
47
+ `}));return m(),p(),x+`
48
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
49
+ `))+1))}const u="#".repeat(s),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,j({before:"# ",after:`
50
+ `},a.current()));return/^[\t ]/.test(f)&&(f=Ba(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Wb.peek=bM;function Wb(e){return e.value||""}function bM(){return"<"}Gb.peek=xM;function Gb(e,t,n,r){const s=dp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,j({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,j({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,j({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,j({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function xM(){return"!"}Xb.peek=_M;function Xb(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");const f=n.safe(e.alt,j({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),j({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function _M(){return"!"}Qb.peek=wM;function Qb(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],l=n.compilePattern(u);let d;if(u.atBreak)for(;d=l.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function wM(){return"`"}function Kb(e,t){const n=Af(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))}Jb.peek=SM;function Jb(e,t,n,r){const s=dp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(Kb(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,j({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,j({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,j({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,j({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,j({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function SM(e,t,n){return Kb(e,n)?"<":"["}Zb.peek=vM;function Zb(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");const f=n.containerPhrasing(e,j({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),j({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function vM(){return"["}function fp(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 AM(e){const t=fp(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 NM(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 ex(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 kM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?NM(n):fp(n);const l=e.ordered?u==="."?")":".":AM(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),ex(n)===u&&p){let m=-1;for(;++m<e.children.length;){const x=e.children[m];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function CM(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 OM(e,t,n,r){const s=CM(n);let a=n.bulletCurrent||fp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,x,y){return x?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function IM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const PM=fl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function RM(e,t,n,r){return(e.children.some(function(u){return PM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function LM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tx.peek=DM;function tx(e,t,n,r){const s=LM(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,j({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=Jl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Ba(f)+d.slice(1));const m=d.charCodeAt(d.length-1),x=Jl(r.after.charCodeAt(0),m,s);x.inside&&(d=d.slice(0,-1)+Ba(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:x.outside,before:p.outside},l+d+y}function DM(e,t,n){return n.options.strong||"*"}function MM(e,t,n,r){return n.safe(e.value,r)}function FM(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 BM(e,t,n){const r=(ex(n)+(n.options.ruleSpaces?" ":"")).repeat(FM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const nx={blockquote:aM,break:qb,code:hM,definition:mM,emphasis:Yb,hardBreak:qb,heading:TM,html:Wb,image:Gb,imageReference:Xb,inlineCode:Qb,link:Jb,linkReference:Zb,list:kM,listItem:OM,paragraph:IM,root:RM,strong:tx,text:MM,thematicBreak:BM};function UM(){return{enter:{table:HM,tableData:rx,tableHeader:rx,tableRow:$M},exit:{codeText:zM,table:jM,tableData:hp,tableHeader:hp,tableRow:hp}}}function HM(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 jM(e){this.exit(e),this.data.inTable=void 0}function $M(e){this.enter({type:"tableRow",children:[]},e)}function hp(e){this.exit(e)}function rx(e){this.enter({type:"tableCell",children:[]},e)}function zM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,VM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function VM(e,t){return t==="|"?t:e}function qM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:u,tableCell:d,tableRow:l}};function u(y,b,v,A){return f(p(y,v,A),y.align)}function l(y,b,v,A){const w=m(y,v,A),k=f([w]);return k.slice(0,k.indexOf(`
52
+ `))}function d(y,b,v,A){const w=v.enter("tableCell"),k=v.enter("phrasing"),I=v.containerPhrasing(y,ue(j({},A),{before:a,after:a}));return k(),w(),I}function f(y,b){return sM(y,{align:b,alignDelimiters:r,padding:n,stringLength:s})}function p(y,b,v){const A=y.children;let w=-1;const k=[],I=b.enter("table");for(;++w<A.length;)k[w]=m(A[w],b,v);return I(),k}function m(y,b,v){const A=y.children;let w=-1;const k=[],I=b.enter("tableRow");for(;++w<A.length;)k[w]=d(A[w],y,b,v);return I(),k}function x(y,b,v){let A=nx.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function YM(){return{exit:{taskListCheckValueChecked:ix,taskListCheckValueUnchecked:ix,paragraph:GM}}}function WM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:XM}}}function ix(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function GM(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const l=s[a];if(l.type==="paragraph"){u=l;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function XM(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=nx.listItem(e,t,n,j(j({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function QM(){return[k8(),X8(),Z8(),UM(),YM()]}function KM(e){return{extensions:[C8(),Q8(e),eM(),qM(e),WM()]}}const JM={tokenize:i9,partial:!0},sx={tokenize:s9,partial:!0},ox={tokenize:o9,partial:!0},ax={tokenize:a9,partial:!0},ZM={tokenize:u9,partial:!0},ux={name:"wwwAutolink",tokenize:n9,previous:cx},lx={name:"protocolAutolink",tokenize:r9,previous:dx},Gr={name:"emailAutolink",tokenize:t9,previous:fx},Rr={};function e9(){return{text:Rr}}let fs=48;for(;fs<123;)Rr[fs]=Gr,fs++,fs===58?fs=65:fs===91&&(fs=97);Rr[43]=Gr,Rr[45]=Gr,Rr[46]=Gr,Rr[95]=Gr,Rr[72]=[Gr,lx],Rr[104]=[Gr,lx],Rr[87]=[Gr,ux],Rr[119]=[Gr,ux];function t9(e,t,n){const r=this;let s,a;return u;function u(m){return!pp(m)||!fx.call(r,r.previous)||mp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return pp(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(ZM,p,f)(m):m===45||m===95||ln(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&En(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function n9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!cx.call(r,r.previous)||mp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(JM,e.attempt(sx,e.attempt(ox,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function r9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&dx.call(r,r.previous)&&!mp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(En(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||il(m)||gt(m)||Ki(m)||sl(m)?n(m):e.attempt(sx,e.attempt(ox,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function i9(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function s9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(ax,d,l)(f):f===null||gt(f)||Ki(f)||f!==45&&sl(f)?d(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function o9(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(ax,t,a)(u):u===null||gt(u)||Ki(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function a9(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||gt(l)||Ki(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||gt(l)||Ki(l)?t(l):r(l)}function a(l){return En(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):En(l)?(e.consume(l),u):n(l)}}function u9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return ln(a)?n(a):t(a)}}function cx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function dx(e){return!En(e)}function fx(e){return!(e===47||pp(e))}function pp(e){return e===43||e===45||e===46||e===95||ln(e)}function mp(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 l9={tokenize:E9,partial:!0};function c9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p9,continuation:{tokenize:m9},exit:g9}},text:{91:{name:"gfmFootnoteCall",tokenize:h9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:d9,resolveTo:f9}}}}function d9(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return l;function l(d){if(!u||!u._balanced)return n(d);const f=ur(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function f9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function h9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||gt(m))return n(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(ur(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return gt(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function p9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(b)}function p(b){if(u>999||b===93&&!l||b===null||b===91||gt(b))return n(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=ur(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return gt(b)||(l=!0),u++,e.consume(b),b===92?m:p}function m(b){return b===91||b===92||b===93?(e.consume(b),u++,p):p(b)}function x(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),s.includes(a)||s.push(a),it(e,y,"gfmFootnoteDefinitionWhitespace")):n(b)}function y(b){return t(b)}}function m9(e,t,n){return e.check(ca,t,e.attempt(l9,t,n))}function g9(e){e.exit("gfmFootnoteDefinition")}function E9(e,t,n){const r=this;return it(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function y9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},x=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Un(x,x.length,0,ol(y,u.slice(f+1,d),l)),Un(x,x.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Un(u,f-1,d-f+3,x),d=f+x.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return x;function x(b){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(b):(u.enter("strikethroughSequenceTemporary"),y(b))}function y(b){const v=$s(f);if(b===126)return m>1?d(b):(u.consume(b),m++,y);if(m<2&&!n)return d(b);const A=u.exit("strikethroughSequenceTemporary"),w=$s(b);return A._open=!w||w===2&&!!v,A._close=!v||v===2&&!!w,l(b)}}}class T9{constructor(){this.map=[]}add(t,n,r){b9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function b9(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function x9(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function _9(){return{flow:{null:{name:"table",tokenize:w9,resolveAll:S9}}}}function w9(e,t,n){const r=this;let s=0,a=0,u;return l;function l(z){let oe=r.events.length-1;for(;oe>-1;){const he=r.events[oe][1].type;if(he==="lineEnding"||he==="linePrefix")oe--;else break}const te=oe>-1?r.events[oe][1].type:null,fe=te==="tableHead"||te==="tableRow"?L:d;return fe===L&&r.parser.lazy[r.now().line]?n(z):fe(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):He(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):nt(z)?it(e,p,"whitespace")(z):(a+=1,u&&(u=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||gt(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?x:m)}function x(z){return z===92||z===124?(e.consume(z),m):m(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,nt(z)?it(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):b(z))}function b(z){return z===45||z===58?A(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),v):G(z)}function v(z){return nt(z)?it(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"),w):z===45?(a+=1,w(z)):z===null||He(z)?U(z):G(z)}function w(z){return z===45?(e.enter("tableDelimiterFiller"),k(z)):G(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"),I):(e.exit("tableDelimiterFiller"),I(z))}function I(z){return nt(z)?it(e,U,"whitespace")(z):U(z)}function U(z){return z===124?b(z):z===null||He(z)?!u||s!==a?G(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):G(z)}function G(z){return n(z)}function L(z){return e.enter("tableRow"),V(z)}function V(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),V):z===null||He(z)?(e.exit("tableRow"),t(z)):nt(z)?it(e,V,"whitespace")(z):(e.enter("data"),ie(z))}function ie(z){return z===null||z===124||gt(z)?(e.exit("data"),V(z)):(e.consume(z),z===92?le:ie)}function le(z){return z===92||z===124?(e.consume(z),ie):ie(z)}}function S9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const x=new T9;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(l=!1,d!==0&&(hx(x,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},x.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},x.add(n,0,[["enter",p,t]])),s=b.type==="tableDelimiterRow"?2:p?3:1):s&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Zl(x,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Zl(x,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):b.type==="tableHead"?(l=!0,d=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=Zl(x,t,a,s,n,m)):u[1]!==0&&(m=Zl(x,t,u,s,n,m)),s=0):s&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&hx(x,t,d,f,p),x.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=x9(t.events,n))}return e}function Zl(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},po(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=po(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=po(t.events,n[2]),p=po(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const x=t.events[n[2]],y=t.events[n[3]];if(x[1].end=Object.assign({},y[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,v=n[3]-n[2]-1;e.add(b,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},po(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function hx(e,t,n,r,s){const a=[],u=po(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function po(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const v9={name:"tasklistCheck",tokenize:N9};function A9(){return{text:{91:v9}}}function N9(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return gt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(d)}function l(d){return He(d)?t(d):nt(d)?e.check({tokenize:k9},t,n)(d):n(d)}}function k9(e,t,n){return it(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function C9(e){return $1([e9(),c9(),y9(e),_9(),A9()])}const O9={};function I9(e){const t=this,n=e||O9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(C9(n)),a.push(QM()),u.push(KM(n))}const P9=()=>_.jsx("span",{className:`${C}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),mo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(RE,{remarkPlugins:[I9],rehypePlugins:[Ly],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${C}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${C}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${C}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${C}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${C}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${C}-li`),children:s}),a:({href:s,children:a})=>_.jsx(jy,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${C}-table-container`),children:_.jsx("table",{className:F(e,`${C}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${C}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${C}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${C}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${C}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${C}-td`),children:s}),span:({className:s,children:a})=>s===`${C}-blinking-cursor`?_.jsx(P9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${C}-blinking-cursor'></span>`:"")}),go=()=>D.useContext(Xg),Eo=()=>{const{sendMessage:e,loading:t,isConnected:n}=an(),{mode:r,status:s}=ai();return D.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function R9(e){return e.includes("-")&&e===e.toLowerCase()}function yo({tagName:e,props:t,label:n}){const r=D.useRef(null),s=D.useRef(null),a=D.useRef(e),u=D.useRef(null);return D.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!R9(e)){u.current!==e&&(u.current=e,xt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,l.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){xt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,l.replaceChildren();return}try{const f=document.createElement(e);f.props=t,l.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){xt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),D.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class L9 extends D.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){xt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function D9(e){return lt({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const M9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=an();return _.jsx("div",{className:F(t,`${C}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${C}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${C}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(D9,{"aria-hidden":"true"})})})},F9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=an();return n?_.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${C}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${C}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${C}-msg-product-card__title`),children:e})},B9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ct(),{overrides:u,isInitialized:l}=go(),{sendMessage:d,loading:f}=an(),p=Eo(),m=l?u.ProductTile:void 0;if(m){const z={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(yo,{tagName:m,props:z,label:"ProductTile"})}const{id:x,name:y,imageUrl:b,description:v,productPageUrl:A,price:w,priceBreakdown:k,discountPrice:I,listPrice:U,currencyCode:G}=e,L=I!=null?I:w,V=h8({priceBreakdown:k,currencyCode:G}),ie=()=>{if(f)return;const z=y||"this product",oe=x?` [SKU: ${x}]`:"";d(`Show me details for ${z}${oe}`)},le=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:F(t,`${C}-msg-product-card`),children:[_.jsx(M9,{imageUrl:b||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:le,name:y,showInWidgetDetails:ie}),_.jsxs("div",{className:F(t,`${C}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${C}-msg-product-card__content-header`),children:[_.jsx(F9,{name:y||x,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:le,showInWidgetDetails:ie}),a&&v&&_.jsx("div",{className:F(t,`${C}-msg-product-card__description`),title:v,children:_.jsx(mo,{globalClassName:t,text:v})})]}),_.jsx("div",{className:F(t,`${C}-msg-product-card__price-row`),children:V?_.jsx("span",{className:F(t,`${C}-msg-product-card__price`),"aria-label":`Price from ${V.low} to ${V.high}`,children:V.range}):_.jsx(op,{globalClassName:t,retailPrice:U,discountPrice:L,currencyCode:G})})]})]})},U9=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},H9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ct(),{overrides:l,isInitialized:d}=go(),f=Eo(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(yo,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${C}-product-carousel-title`),children:e}),_.jsx(DD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${C}-product-carousel-item`),children:[_.jsx(B9,{product:U9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${C}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},gp=44,j9=400,$9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?gp:Math.min(Math.max(Math.round(t),gp),j9)},z9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},V9="parentOrigin",q9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(V9,t),n.toString()}catch(n){return e}},Y9=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},px=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=D.useRef(null),[s,a]=D.useState(!1),[u,l]=D.useState(gp),d=typeof window!="undefined"?window.location.origin:"",f=q9(e,d),p=z9(e);return D.useEffect(()=>{const m=x=>{var b,v,A;if(p&&x.origin!==p||r.current&&x.source!==r.current.contentWindow)return;const y=x.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l($9((b=y.payload)==null?void 0:b.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(v=y.payload)==null?void 0:v.orderId)!=null?A:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),_.jsx("div",{className:F(t,`${C}-cart-express`,{[`${C}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:F(t,`${C}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},ec=({code:e,globalClassName:t})=>_.jsxs("span",{className:F(t,`${C}-cart-chip`),children:[_.jsx(c1,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),On=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=Wr(u?-n:n,r);else if(l)f=l;else return null;return _.jsxs("div",{className:F(s,`${C}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${C}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${C}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${C}-cart-total-value`),children:d?_.jsx("span",{className:F(s,`${C}-cart-total-shimmer`)}):f})]})};function W9(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function tc(e){return(e!=null?e:[]).map(W9).filter(t=>t!==null)}const G9=({quantity:e,loading:t,disabled:n,globalClassName:r,onChange:s})=>{const[a,u]=D.useState(e.toString());D.useEffect(()=>{u(e.toString())},[e]);const l=p=>{if(n)return;const m=p.target.value;/^\d*$/.test(m)&&u(m)},d=()=>{const p=parseInt(a,10);!n&&!isNaN(p)&&p>0&&p!==e?s(p):u(e.toString())},f=p=>{p.key==="Enter"&&(p.preventDefault(),d())};return _.jsx("div",{className:F(r,`${C}-cart-qty-input-wrapper`),children:t?_.jsx(tk,{className:F(r,`${C}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(r,`${C}-cart-qty-input`),value:a,disabled:n,onChange:l,onBlur:d,onKeyDown:f,"aria-label":"Quantity"})})},X9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var f,p;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,d=tc(e.coupons);return _.jsxs("li",{className:F(s,`${C}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(s,`${C}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(s,`${C}-cart-item-details`),children:[_.jsx("p",{className:F(s,`${C}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(s,`${C}-cart-item-attrs`),children:[((f=e.variants)!=null?f:[]).map(m=>_.jsxs("p",{className:F(s,`${C}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((p=e.promotions)!=null?p:[]).map(m=>_.jsxs("p",{className:F(s,`${C}-cart-item-attr`),children:["Promotion: ",m]},m))]}),d.length>0&&_.jsx("div",{className:F(s,`${C}-cart-chips`),children:d.map(m=>_.jsx(ec,{code:m,globalClassName:s},m))}),_.jsx("span",{className:F(s,`${C}-cart-item-price`),children:n?_.jsx("span",{className:F(s,`${C}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[l&&_.jsx("span",{className:F(s,`${C}-cart-item-original-price`),children:Wr(e.originalSubtotal,t)}),_.jsx("span",{className:F(s,`${C}-cart-item-final-price`),children:Wr(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:F(s,`${C}-cart-item-footer`),children:[_.jsx("span",{className:F(s,`${C}-cart-qty-heading`),children:"Quantity"}),_.jsx(G9,{quantity:e.quantity,loading:n,disabled:r,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:F(s,`${C}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},Q9=({cart:e,messageId:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a,cartUpdating:u}=an(),[l,d]=D.useState(!1),[f,p]=D.useState(""),[m,x]=D.useState(null),y=a||u,{items:b=[],currencyCode:v="USD",subtotal:A,total:w,taxes:k,shippingCost:I,shippingDiscount:U,shippingPromotions:G=[],promotionsDiscount:L,promotions:V=[],couponsDiscount:ie,bodyMessage:le,footerMessage:z,checkoutButtonUrl:oe,expressPaymentUrl:te}=e,fe=tc(e.couponsApplied),he=W=>{y||s(`Remove ${W.name} from my cart`)},de=W=>{s(W?`I completed express payment. Show my order confirmation for order ${W}.`:"I completed express payment. Show my order confirmation.")},we=(W,re)=>{y||m||re<1||(x(W.itemId),s(`Update ${W.name} quantity to ${re}`,{silent:!0,reconcileMessageId:t}).then(N=>{N.outcome==="success"?setTimeout(()=>x(null),300):x(null)}))},ce=()=>{const W=f.trim();!W||y||(s(`Apply coupon code ${W}`),p(""))};return _.jsxs("div",{className:F(n,`${C}-cart`),children:[_.jsxs("div",{className:F(n,`${C}-cart-box`),children:[le&&_.jsxs("button",{type:"button",className:F(n,`${C}-cart-summary`),"aria-expanded":l,onClick:()=>d(W=>!W),children:[_.jsx("span",{className:F(n,`${C}-cart-summary-text`),children:_.jsx(mo,{text:le,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),_.jsx("span",{className:F(n,`${C}-cart-summary-toggle`),"aria-hidden":"true",children:l?_.jsx(u1,{}):_.jsx(l1,{})})]}),l&&_.jsxs("div",{className:F(n,`${C}-cart-expanded`),children:[_.jsxs("div",{className:F(n,`${C}-cart-items-section`),children:[_.jsx("ul",{className:F(n,`${C}-cart-items`),children:b.map(W=>_.jsx(X9,{item:W,currencyCode:v,loading:m===W.itemId,disabled:y||m===W.itemId,globalClassName:n,onRemove:he,onQuantityChange:we},W.itemId))}),fe.length>0&&_.jsx("div",{className:F(n,`${C}-cart-chips`,`${C}-cart-applied-coupons`),children:fe.map(W=>_.jsx(ec,{code:W,globalClassName:n},W))})]}),_.jsxs("div",{className:F(n,`${C}-cart-totals`),children:[_.jsx(On,{label:"Subtotal",value:A,currencyCode:v,globalClassName:n,loading:!!m}),_.jsx(On,{label:"Coupon",value:ie,currencyCode:v,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(On,{label:"Promotions",badge:V[0],value:L,currencyCode:v,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(On,{label:"Shipping",value:I,currencyCode:v,globalClassName:n,fallback:"TBD",loading:!!m}),_.jsx(On,{label:"Shipping Discount",badge:G[0],value:U,currencyCode:v,globalClassName:n,isDiscount:!0,loading:!!m}),_.jsx(On,{label:"Tax",value:k,currencyCode:v,globalClassName:n,fallback:"TBD",loading:!!m}),_.jsx(On,{label:"Total",value:w,currencyCode:v,globalClassName:n,emphasized:!0,loading:!!m})]})]})]}),_.jsxs("div",{className:F(n,`${C}-cart-coupon`),children:[_.jsxs("div",{className:F(n,`${C}-cart-coupon-field`),children:[_.jsx("span",{className:F(n,`${C}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(c1,{})}),_.jsx("input",{type:"text",className:F(n,`${C}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:f,disabled:y,onChange:W=>p(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),ce())}})]}),_.jsx("button",{type:"button",className:F(n,`${C}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:y||!f.trim(),onClick:ce,children:_.jsx(ik,{"aria-hidden":"true"})})]}),te&&_.jsx(px,{expressPaymentUrl:te,globalClassName:n,onOrderComplete:de}),oe&&_.jsxs("a",{className:F(n,`${C}-cart-checkout-button`),href:oe,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(nk,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(n,`${C}-cart-footer`),children:z||"Shipping and taxes calculated at checkout."})]})},K9=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=tc(e.coupons);return _.jsxs("li",{className:F(n,`${C}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${C}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${C}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${C}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${C}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>_.jsxs("p",{className:F(n,`${C}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>_.jsxs("p",{className:F(n,`${C}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&_.jsx("div",{className:F(n,`${C}-cart-chips`),children:s.map(l=>_.jsx(ec,{code:l,globalClassName:n},l))}),_.jsxs("span",{className:F(n,`${C}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${C}-cart-item-original-price`),children:Wr(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${C}-cart-item-final-price`),children:Wr(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${C}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${C}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},J9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},Z9=({order:e,globalClassName:t})=>{const[n,r]=D.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:x,shippingPromotions:y=[],promotionsDiscount:b,promotions:v=[],couponsDiscount:A,bodyMessage:w,footerMessage:k}=e,I=tc(e.couponsApplied);return _.jsxs("div",{className:F(t,`${C}-cart`),children:[_.jsxs("div",{className:F(t,`${C}-cart-banner`),children:[_.jsx("span",{className:F(t,`${C}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(sk,{})}),_.jsx("p",{className:F(t,`${C}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${C}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",J9(a)]})]}),_.jsxs("div",{className:F(t,`${C}-cart-box`),children:[w&&_.jsxs("button",{type:"button",className:F(t,`${C}-cart-summary`),"aria-expanded":n,onClick:()=>r(U=>!U),children:[_.jsx("span",{className:F(t,`${C}-cart-summary-text`),children:_.jsx(mo,{text:w,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${C}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(u1,{}):_.jsx(l1,{})})]}),n&&_.jsxs("div",{className:F(t,`${C}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${C}-cart-items`),children:u.map(U=>_.jsx(K9,{item:U,currencyCode:l,globalClassName:t},U.itemId))}),I.length>0&&_.jsx("div",{className:F(t,`${C}-cart-chips`,`${C}-cart-applied-coupons`),children:I.map(U=>_.jsx(ec,{code:U,globalClassName:t},U))}),_.jsxs("div",{className:F(t,`${C}-cart-totals`),children:[_.jsx(On,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),_.jsx(On,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(On,{label:"Promotions",badge:v[0],value:b,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(On,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(On,{label:"Shipping Discount",badge:y[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(On,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(On,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${C}-cart-footer`),children:k||"Shipping and taxes calculated at checkout."})]})},eF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=D.useState(e.src),[a,u]=D.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:F(n,`${C}-pdp-gallery__image`,{[`${C}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},tF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(Zh,{className:F(n,`${C}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(Qh,{className:F(n,`${C}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(Xh,{index:a,className:F(n,`${C}-pdp-gallery__item`),children:_.jsx(eF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(Yh,{className:F(n,`${C}-pdp-gallery__control`),children:[_.jsx(Jh,{className:F(n,`${C}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(db,{size:"16px"})}),_.jsx(Kh,{className:F(n,`${C}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(fb,{size:"16px"})})]}),r&&_.jsx(Gh,{className:F(n,`${C}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Wh,{index:a,className:F(n,`${C}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ua="color",Ep=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,nF=e=>e.replace(/(^|\/)large\//,"$1medium/"),mx=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ua&&n.vals.includes(t)),gx=(e,t)=>{const n=nF(t),r=Ep(e,n);return n===t?{src:r}:{src:r,fallbackSrc:Ep(e,t)}},rF=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>mx(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>gx(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[gx(e.baseUrl,e.imageUrl)]:[]},iF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&mx(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Ep(e.baseUrl,r):""},nc=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),sF=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},oF=(e,t,n,r,s)=>{if(!e||e.length===0)return ue(j({},s),{[n]:r});const a=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length&&Object.entries(s).every(([f,p])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===p})});if(a)return j({},a.vars);const u=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length});return u?j({},u.vars):ue(j({},s),{[n]:r})},Ex=(e,t)=>{var s,a,u,l;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},aF=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},uF=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>nc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},lF=300,cF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var pt,Ot,Ut,yn,Tn,Lt,Be;const{addToCart:s,sendMessage:a,loading:u}=an(),{overrides:l,isInitialized:d}=go(),f=Eo(),p=e.data,m=(pt=p.vattr)!=null?pt:[],[x,y]=D.useState(()=>uF(p)),b=sF(p.vmat,x),v=(Ut=(Ot=p.quantity)==null?void 0:Ot.minQuantity)!=null?Ut:1,A=(Tn=(yn=p.quantity)==null?void 0:yn.maxQuantity)!=null?Tn:Number.POSITIVE_INFINITY,w=(Be=(Lt=p.quantity)==null?void 0:Lt.increment)!=null?Be:1,[k,I]=D.useState(v),[U,G]=D.useState(!1),L=D.useRef(!1);D.useEffect(()=>{U&&(u?L.current=!0:L.current&&(L.current=!1,G(!1)))},[U,u]);const V=x[Ua],ie=D.useMemo(()=>rF(p,V),[p,V]),le=D.useMemo(()=>aF(p,x),[p,x]),z=m.find(ke=>ke.id===Ua),oe=m.filter(ke=>ke.id!==Ua),te=Ex(p,x),[fe,he]=D.useState(k),de=D.useRef(te),we=de.current===te?fe:k;D.useEffect(()=>{if(de.current!==te){de.current=te,he(k);return}const ke=window.setTimeout(()=>he(k),lF);return()=>window.clearTimeout(ke)},[k,te]);const ce=k===fe,W=D.useMemo(()=>b&&(de.current!==te||ce)?Y9(p.expressPaymentUrl,te,we):null,[p.expressPaymentUrl,te,we,b,ce]),re=D.useCallback(ke=>{a(ke?`I completed express payment. Show my order confirmation for order ${ke}.`:"I completed express payment. Show my order confirmation.")},[a]),N=d?l.ProductDetailCard:void 0;if(N){const ke={name:"ProductDetailCard",payload:e,api:f};return _.jsx(yo,{tagName:N,props:ke,label:"ProductDetailCard"})}const M=(ke,We)=>()=>{y(et=>{const se=!nc(p.vmat,ke,We,et);return ke===Ua||se?oF(p.vmat,m,ke,We,et):ue(j({},et),{[ke]:We})})},J=()=>{if(u)return;const ke=Ex(p,x);if(!ke)return;const We=m.map(et=>{const se=et.opts.find(Se=>Se.val===x[et.id]);return se?{label:et.lbl||et.id,value:se.name||se.val}:null}).filter(et=>et!==null);G(!0),s({productName:p.name,sku:ke,quantity:k,variants:We})},P=!b||k-w<v,Ae=!b||k+w>A,Ce=ke=>{var et;const We=x[ke.id];return(et=ke.opts.find(se=>se.val===We))==null?void 0:et.name},ge=()=>I(ke=>Math.max(v,ke-w)),Le=()=>I(ke=>Math.min(A,ke+w)),je=ke=>_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${ke.id}`,className:F(t,`${C}-msg-pdp__variant-name`),children:ke.lbl||ke.id}),Ce(ke)&&_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:Ce(ke)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${ke.id}`,className:F(t,`${C}-msg-pdp__chips`),children:ke.opts.map(We=>{const et=nc(p.vmat,ke.id,We.val,x),se=x[ke.id]===We.val;return _.jsxs("label",{className:F(`${C}-msg-pdp__chip`,{selected:se,unavailable:!et}),children:[_.jsx("input",{type:"radio",name:`variant-${ke.id}`,value:We.val,checked:se,"aria-description":et?void 0:"unavailable",onChange:M(ke.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]},ke.id),Ke=ke=>_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${ke.id}`,className:F(t,`${C}-msg-pdp__variant-name`),children:ke.lbl||"Color"}),Ce(ke)&&_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:Ce(ke)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${ke.id}`,className:F(t,`${C}-msg-pdp__swatches`),children:ke.opts.map(We=>{const et=nc(p.vmat,ke.id,We.val,x),se=x[ke.id]===We.val,Se=iF(p,We.val);return Se?_.jsxs("label",{className:F(`${C}-msg-pdp__swatch`,{selected:se,unavailable:!et}),children:[_.jsx("input",{type:"radio",name:`variant-${ke.id}`,value:We.val,checked:se,"aria-label":We.name||We.val,"aria-description":et?void 0:"unavailable",onChange:M(ke.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${C}-msg-pdp__swatch-image`),src:Se,alt:We.name||We.val,loading:"lazy"})]},We.val):_.jsxs("label",{className:F(`${C}-msg-pdp__chip`,{selected:se,unavailable:!et}),children:[_.jsx("input",{type:"radio",name:`variant-${ke.id}`,value:We.val,checked:se,"aria-description":et?void 0:"unavailable",onChange:M(ke.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]});return _.jsx("div",{className:F(t,`${C}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${C}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${C}-msg-pdp__gallery`),children:_.jsx(tF,{images:ie,altText:p.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${C}-msg-pdp__content`),children:[p.slugUrl?_.jsx("a",{href:p.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${C}-msg-pdp__title-link`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("p",{className:F(t,`${C}-msg-pdp__title`),children:p.name}),_.jsx(op,{globalClassName:t,className:`${C}-msg-pdp__price`,retailPrice:le==null?void 0:le.orig,discountPrice:(le==null?void 0:le.cur)||(le==null?void 0:le.prom),currencyCode:p.ccy,fontSize:"14px"}),p.dscr&&_.jsx("div",{className:F(t,`${C}-msg-pdp__description`),children:_.jsx(mo,{globalClassName:t,text:p.dscr})}),z&&Ke(z),oe.map(je),r&&_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:k})]}),_.jsxs("div",{className:F(t,`${C}-msg-pdp__stepper`),children:[_.jsx(ar,{className:`${C}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(YN,{}),disabled:P,onClick:ge}),_.jsx("span",{className:F(t,`${C}-msg-pdp__quantity`),children:k}),_.jsx(ar,{className:`${C}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(WN,{}),disabled:Ae,onClick:Le})]})]}),r&&_.jsxs("div",{className:F(t,`${C}-msg-pdp__actions`),children:[W&&_.jsx(px,{expressPaymentUrl:W,globalClassName:t,onOrderComplete:re},W),_.jsx(tl,{className:`${C}-msg-pdp__add-to-cart`,disabled:!b||u||U,onClick:J,children:U?"Adding...":"Add to cart"})]})]})]})})},dF=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},fF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=an(),{overrides:l,isInitialized:d}=go(),f=Eo(),p=d?l.ProductComparison:void 0;if(p){const b={name:"ProductComparison",payload:{products:e,table:t},api:f};return _.jsx(yo,{tagName:p,props:b,label:"ProductComparison"})}if(!e.length)return null;const m=`auto repeat(${e.length}, 1fr)`,x=`${90+e.length*140}px`,y=b=>()=>{u||a({productName:b.name,sku:b.id})};return _.jsx("div",{className:F(n,`${C}-product-comparison`),children:_.jsxs("div",{className:`${C}-product-comparison__grid`,style:{gridTemplateColumns:m,minWidth:x},children:[_.jsxs("div",{className:`${C}-product-comparison__header`,children:[_.jsx("div",{className:`${C}-product-comparison__header-spacer`}),e.map(b=>{var A,w,k,I;const v=dF(b);return _.jsxs("div",{className:F(n,`${C}-product-comparison__product-col`),children:[v&&_.jsx("img",{className:F(n,`${C}-product-comparison__image`),src:v,alt:b.name||"Product image",loading:"eager"}),b.slugUrl?_.jsx("a",{href:b.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${C}-product-comparison__name`),"aria-label":`Go to product page for ${b.name}`,children:b.name}):_.jsx("span",{className:F(n,`${C}-product-comparison__name`),children:b.name}),_.jsx(op,{globalClassName:n,retailPrice:(A=b.pr)==null?void 0:A.orig,discountPrice:(I=(w=b.pr)==null?void 0:w.prom)!=null?I:(k=b.pr)==null?void 0:k.cur,currencyCode:b.ccy,fontSize:"0.875rem"})]},b.id)})]}),_.jsx("div",{className:`${C}-product-comparison__table`,children:t.map(b=>_.jsxs("div",{className:`${C}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${C}-product-comparison__row-label`),children:b.row_name}),e.map((v,A)=>_.jsx("div",{className:F(n,`${C}-product-comparison__row-value`),children:b.values[A]},`${b.row_name}-${v.id}`))]},b.row_name))}),s&&_.jsxs("div",{className:`${C}-product-comparison__footer`,children:[_.jsx("div",{className:`${C}-product-comparison__footer-spacer`}),e.map(b=>_.jsx("div",{className:F(n,`${C}-product-comparison__footer-cell`),children:_.jsxs(tl,{className:`${C}-product-comparison__add-to-cart`,disabled:u,onClick:y(b),children:[_.jsx(ek,{size:"14px"}),"Add to cart"]})},`cart-${b.id}`))]})]})})},yx=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u,cartUpdating:l}=an(),{isCartMgmtSupported:d,logger:f}=ct(),{overrides:p,isInitialized:m}=go(),x=Eo(),y=D.useMemo(()=>e.response.map(b=>{var A,w;if(b.type!=="markdown")return b;const v=wg((w=(A=b.data)==null?void 0:A.content)!=null?w:"");return v&&v.type!=="markdown"?v:b}),[e.response]);return _.jsx(_.Fragment,{children:y.map((b,v)=>{var A,w,k,I,U,G,L,V,ie,le,z,oe,te,fe,he,de,we,ce,W,re,N,M,J,P,Ae;switch(b.type){case"markdown":{const Ce=(w=(A=b.data)==null?void 0:A.content)!=null?w:"";return b.index===qi&&Sg(Ce)?null:_.jsx(mo,{text:Ce,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${b.type}-${(k=b.index)!=null?k:v}`)}case"product_carousel":return _.jsx(H9,{title:(U=(I=b.data)==null?void 0:I.title)!=null?U:"",products:(L=(G=b.data)==null?void 0:G.products)!=null?L:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${b.type}-${(V=b.index)!=null?V:v}`);case"product_tile":return _.jsx(cF,{product:b.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${b.type}-${(ie=b.index)!=null?ie:v}`);case"product_comparison":return _.jsx(fF,{products:(z=(le=b.data)==null?void 0:le.products)!=null?z:[],table:(te=(oe=b.data)==null?void 0:oe.table)!=null?te:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${b.type}-${(fe=b.index)!=null?fe:v}`);case"cart":{const Ce=(we=(de=(he=b.data)==null?void 0:he.cart)==null?void 0:de.cartSummary)==null?void 0:we.cartDetails;return Ce?_.jsx(Q9,{cart:Ce,messageId:t,productsToHighlight:b.data.products_to_highlight,globalClassName:n,openLinksInNewTab:r},`${b.type}-${(ce=b.index)!=null?ce:v}`):null}case"order_confirmation":{const Ce=(re=(W=b.data)==null?void 0:W.order)==null?void 0:re.orderDetails;return Ce?_.jsx(Z9,{order:Ce,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${b.type}-${(N=b.index)!=null?N:v}`):null}case"tool_results":{const Ce=b.data,ge=b.output_name,Le=m&&ge&&Object.prototype.hasOwnProperty.call(p,ge)?p[ge]:void 0,je=typeof Le=="string"?Le:void 0;if(!je||!ge)return f!=null&&f.isDevelopment&&(ge?f.warn(`🦜 tool_results "${ge}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${ge}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(p),payload:Ce}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:Ce})),null;const Ke={name:ge,payload:Ce,api:x};return _.jsx(L9,{overrideName:ge,children:_.jsx(yo,{tagName:je,props:Ke,label:`toolResult:${ge}`})},`${b.type}-${ge}-${(M=b.index)!=null?M:v}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(m8,{disabled:u||l,suggestions:(P=(J=b.data)==null?void 0:J.display_text)!=null?P:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:a})},`${b.type}-${(Ae=b.index)!=null?Ae:v}`);default:return null}})})};class Tx extends D.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){xt(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?_.jsx("p",{className:F(this.props.globalClassName,`${C}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const hF=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ct(),a=D.useMemo(()=>{if(typeof e.content!="string")return null;const l=$u(e.content);if(l)return l;const d=wg(e.content);return d?{response:[d]}:null},[e.content]),u=D.useMemo(()=>{const l="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),l;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||l}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),l}return e.content||l},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:F(t,`${C}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${C}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${C}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${C}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(rk,{})}),_.jsx("p",{className:F(t,`${C}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${C}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${C}-message-group-child`,children:a?_.jsx(Tx,{globalClassName:t,children:_.jsx(yx,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):_.jsx(mo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:F(t,`${C}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${C}-reset-message`),children:e.content})})}},pF=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${C}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${C}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${C}-retry-button`),onClick:t,children:[_.jsx(uk,{"aria-hidden":"true"})," Retry"]})]}),mF="You are offline or we couldn't reach the assistant. Check connection and try again.",yp=({isWidgetStandalone:e})=>{var z,oe;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ct(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:x,retryLastMessage:y,retryConnection:b}=an(),v=D.useRef(null),A=a.length>0,w=u.some(kA),k=a[a.length-1],I=k?NA(k.content,"suggestions"):!1,U=A&&(d||l)&&!w&&!I,G=p==="reconnecting"&&!U,L=p==="error";let V=null;L?V={message:m!=null?m:mF,kind:"connection",onRetry:b}:x&&(V={message:x.message,kind:"send",onRetry:y}),D.useEffect(()=>{var te;(te=v.current)==null||te.scrollIntoView({behavior:"smooth"})},[]),D.useEffect(()=>{var te;s&&((te=v.current)==null||te.scrollIntoView({behavior:"smooth"}))},[a,u,x,m,s]);const ie=(z=V==null?void 0:V.message)!=null?z:null,le=(oe=V==null?void 0:V.kind)!=null?oe:null;return D.useEffect(()=>{ie&&(r==null||r.error("Error message shown to user",{message:ie,kind:le}))},[ie,le,r]),_.jsxs(_.Fragment,{children:[d&&!A&&_.jsx(b8,{globalClassName:t,isWidgetStandalone:e}),a.map(te=>_.jsx(hF,{message:te,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},te.id)),V&&_.jsx(pF,{message:V.message,onRetry:V.onRetry,globalClassName:t,isWidgetStandalone:e}),w&&_.jsxs("div",{className:F(t,`${C}-message-group`,e?"standalone":"embedded"),children:[_.jsx(Tx,{globalClassName:t,children:_.jsx(yx,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||l)&&_.jsx(ap,{globalClassName:t,isWidgetStandalone:e})]}),U&&_.jsx(ap,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),G&&_.jsx(ap,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:v})]})},gF=()=>_.jsxs("svg",{className:`${C}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),EF=()=>_.jsx("svg",{className:`${C}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.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"})}),yF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Tp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ct(),s=e!=null?e:r,{overrides:a,isInitialized:u}=go(),l=Eo();if(t.length===0||s===0)return null;const d=yF(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return _.jsx(yo,{tagName:f,props:p,label:"ProgressSteps"})}return _.jsx("div",{className:F(n,`${C}-progress-steps-panel`),children:_.jsx("div",{className:`${C}-progress-steps`,children:_.jsx("ul",{className:`${C}-progress-steps-list`,children:d.map((p,m)=>{const x=m<d.length-1,y=m===d.length-1;return _.jsxs("li",{className:F(`${C}-progress-step`,y&&"active"),children:[y&&_.jsx("span",{className:`${C}-progress-step-arc`}),_.jsx("span",{className:`${C}-progress-step-text`,children:p}),_.jsx("span",{className:F(`${C}-progress-step-icon`,x?"done":"active"),children:x?_.jsx(gF,{}):_.jsx(EF,{})})]},`${m}-${p}`)})})})})},bx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ct(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=an(),f=s;return _.jsxs("div",{className:F(e,`${C}-container`,`${C}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${C}-message-container`,`container-${n}`,"embedded"),children:_.jsx(yp,{isWidgetStandalone:!1})}),_.jsx(Tp,{steps:l,globalClassName:e}),_.jsx(lh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:F(`${C}-embedded-chat-menu`),children:_.jsxs(ED,{componentType:"chat",children:[_.jsx(Fb,{componentType:"chat"}),_.jsx(Vy,{componentType:"chat",onClearChat:u}),r&&_.jsx(qy,{componentType:"chat",onDownloadTranscript:d})]})})]})},xx=e=>{var d;const{children:t,disabled:n}=e,[r,s]=D.useState((d=e.container)==null?void 0:d.current),a=D.useSyncExternalStore(bF,()=>!1,()=>!0),{getRootNode:u}=Wl();if(D.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:TF(u);return _.jsx(_.Fragment,{children:D.Children.map(t,f=>Bs.createPortal(f,l))})},TF=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return is(n)?n:Ar(t).body},bF=()=>()=>{},_x=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=ai(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:x,downloadTranscript:y}=an(),{isOpen:b}=s||{},v=!!s.isOpen,A=r==="standalone",w=f||d,k=()=>{jr(!1)};return v?_.jsx(Cb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:_.jsx(xx,{children:_.jsx(np,{className:F(e,`${C}-container`,`${C}-dialog`,a,u&&"full-height"),style:j(j({},t),l&&{width:l}),children:_.jsxs(ep,{className:F(e,`${C}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(Lb,{componentType:"dialog",onClearChat:m,onClose:k,onDownloadTranscript:y}),_.jsx(tp,{className:F(e,`${C}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(yp,{isWidgetStandalone:A,isOpen:b})}),_.jsx(Tp,{steps:x,globalClassName:e}),_.jsx(lh,{componentType:"dialog",isLoading:w,onSubmit:I=>p(I)})]})})})}):null},wx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,isModalFullscreen:a}=ai(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=an(),{isOpen:x}=s||{},y=!!s.isOpen,b=r==="standalone",v=l||u,A=({open:k})=>{jr(k)},w=()=>{jr(!1)};return y?_.jsx(Cb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(xx,{children:_.jsxs("div",{className:F(e,`${C}-modal-container`),style:t,children:[_.jsx(Sb,{className:F(e,`${C}-modal-backdrop`)}),_.jsx(np,{className:F(e,`${C}-container`,`${C}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:_.jsxs(ep,{className:F(e,`${C}-modal-content`,{standalone:b,embedded:!b}),children:[_.jsx(Lb,{componentType:"modal",onClearChat:f,onClose:w,onDownloadTranscript:m}),_.jsx(tp,{className:F(e,`${C}-message-container`,`container-${n}`,{standalone:b,embedded:!b}),children:_.jsx(yp,{isWidgetStandalone:b,isOpen:x})}),_.jsx(Tp,{steps:p,globalClassName:e}),_.jsx(lh,{componentType:"modal",isLoading:v,onSubmit:k=>d(k)})]})})]})})}):null},xF=()=>{const e=ai(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(KN,{}):t==="dialog"?_.jsx(_x,{}):t==="modal"?_.jsx(wx,{}):_.jsx(bx,{})},_F=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=u8();D.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&s(d))};return n8(a),()=>{r8(a)}},[e,t,n,r,s])},Sx=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function wF({isReady:e,hasError:t,transmit:n}){const r=D.useRef([]),s=D.useRef(e);s.current=e;const a=D.useRef(n);a.current=n;const u=D.useCallback((l,d)=>{s.current?Sx(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return D.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>Sx(a.current,d,f))}},[e]),D.useEffect(()=>{t&&(r.current=[])},[t]),u}const vx={copilot:"Ask Copilot",messaging:"Ask a question"},SF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ct(),{placeholder:s,isResponseLoading:a}=Ql(),u=s||vx[r],[l,d]=D.useState(""),f=t||a,p=m=>{const x=l.trim();x&&(m.preventDefault(),e(x),d(""))};return _.jsxs("form",{className:F(n,`${C}-prompts-input-container`),name:`${C}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${C}-prompts-input`,"aria-label":u,children:_.jsx(qh,{className:F(n,`${C}-prompts-input-icon`)})}),_.jsx("input",{id:`${C}-prompts-input`,className:F(n,`${C}-prompts-input`),name:`${C}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(ar,{className:F(n,`${C}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(mf,{}),disabled:f})]})},vF=()=>{const{globalClassName:e,mode:t}=ct(),{placeholder:n}=Ql(),r=n||vx[t];return _.jsxs("div",{className:F(e,`${C}-prompts-header`),children:[_.jsx(qh,{className:F(e,`${C}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${C}-prompts-header-text`),children:r})]})},Ax=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=ct(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return _.jsxs("button",{className:F(r,`${C}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Mb,{icon:a,className:`${C}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},AF="Ask me something else",NF=({label:e,disabled:t=!1})=>_.jsx(Ax,{label:e||AF,disabled:t,onClick:()=>jr(!0)}),kF=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ct(),{messages:r}=an(),{staticQuestions:s,askElseButtonLabel:a,disableAskElseButton:u}=Ql(),l=D.useMemo(()=>{var y;const f=r.filter(b=>b.role==="agent");if(!f.length)return s;const m=f.map(b=>$u(b.content)).filter(Boolean).flatMap(b=>b==null?void 0:b.response.filter(v=>v.type==="suggestions"));if(!m.length)return s;const x=m[m.length-1];return(y=x==null?void 0:x.data.display_text)!=null?y:s},[r,s]);if(l.length===0)return null;const d=f=>()=>{const p=f.trim();p&&e(p)};return _.jsxs("div",{className:F(n,`${C}-prompts-button-group`),children:[l.map(f=>_.jsx(Ax,{label:f,disabled:t,onClick:d(f)},f)),!u&&_.jsx(NF,{label:a,disabled:t})]})},CF=()=>{const{globalClassName:e,themeVariables:t}=ct(),{isOpen:n,elementId:r,promptsDisplay:s,staticQuestions:a}=Ql(),{isConnected:u,sendMessage:l,connectionStatus:d}=an(),{productId:f}=a8(),p=s!=="buttons",m=s!=="input",[x,y]=D.useState(null),b=d==="error",v=d==="connecting",A=wF({isReady:u,hasError:b,transmit:l});D.useEffect(()=>{if(!r||x)return;const k=document.getElementById(r);k&&y(k)},[r,x]);const w=D.useCallback(k=>{jr(!0);const I=(a||[]).includes(k.trim());if(f&&I){A(`${k} (Viewing product details for: ${f})`,{displayContent:k});return}A(k)},[A,a,f]);return!n||!x?null:Bs.createPortal(_.jsxs("div",{className:F(e,`${C}-prompts-extension-container`),style:t,children:[p&&_.jsx(SF,{onSubmit:w,disabled:b}),!p&&_.jsx(vF,{}),m&&_.jsx(kF,{onPromptClick:w,disabled:b}),!b&&v&&_.jsx("p",{className:F(e,`${C}-prompts-connecting-message`),children:"Connecting to agent..."}),b&&_.jsx("p",{className:F(e,`${C}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),x)},OF=()=>(_F(),_.jsx(CF,{})),Nx=e=>_.jsxs(Qg,ue(j({},e),{children:[_.jsx(xF,{}),_.jsx(OF,{})]}));var rc={},kx;function IF(){if(kx)return rc;kx=1;var e=t1();return rc.createRoot=e.createRoot,rc.hydrateRoot=e.hydrateRoot,rc}var PF=IF();const Cx=(e,t,n,r)=>{PF.createRoot(e).render(_.jsx(Nx,ue(j({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},RF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=_n(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const x of p)if(x.type==="childList"&&x.addedNodes.length)for(const y of x.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(xt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),Cx(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),xt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},LF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=_n(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){xt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){xt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){xt(!0,"warn","Container element not found for id:",t),xt(!0,"warn","Beginning observation for element"),RF(j({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Cx(l,s,n,r)};class DF extends HTMLElement{constructor(){super(...arguments);Xe(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const MF={components:{setEntryType:R0,toggleWidgetOpen:jr,toggleWidgetMinimized:Ou,toggleModalFullscreen:Pd,setWidgetType:Iu,setWidgetDialogPosition:Rd,loadPromptsComponent:o8,togglePromptsExtensionOpen:Rb}};Me.AgentForceWidget=Nx,Me.AgentforceWidgetProvider=Qg,Me.CIMULATE_WIDGET_READY_EVENT=P0,Me.MessagingDialog=_x,Me.MessagingEmbed=bx,Me.MessagingModal=wx,Me.MessagingProvider=Pg,Me.OverrideElement=DF,Me.eventHandlers=MF,Me.injectMessagingWidget=LF,Me.useMessaging=an,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})}));